You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13399 lines
533 KiB

  1. // Package dlp provides access to the Cloud Data Loss Prevention (DLP) API.
  2. //
  3. // See https://cloud.google.com/dlp/docs/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/dlp/v2beta2"
  8. // ...
  9. // dlpService, err := dlp.New(oauthHttpClient)
  10. package dlp // import "google.golang.org/api/dlp/v2beta2"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "dlp:v2beta2"
  41. const apiName = "dlp"
  42. const apiVersion = "v2beta2"
  43. const basePath = "https://dlp.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.InfoTypes = NewInfoTypesService(s)
  55. s.Organizations = NewOrganizationsService(s)
  56. s.Projects = NewProjectsService(s)
  57. return s, nil
  58. }
  59. type Service struct {
  60. client *http.Client
  61. BasePath string // API endpoint base URL
  62. UserAgent string // optional additional User-Agent fragment
  63. InfoTypes *InfoTypesService
  64. Organizations *OrganizationsService
  65. Projects *ProjectsService
  66. }
  67. func (s *Service) userAgent() string {
  68. if s.UserAgent == "" {
  69. return googleapi.UserAgent
  70. }
  71. return googleapi.UserAgent + " " + s.UserAgent
  72. }
  73. func NewInfoTypesService(s *Service) *InfoTypesService {
  74. rs := &InfoTypesService{s: s}
  75. return rs
  76. }
  77. type InfoTypesService struct {
  78. s *Service
  79. }
  80. func NewOrganizationsService(s *Service) *OrganizationsService {
  81. rs := &OrganizationsService{s: s}
  82. rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s)
  83. rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s)
  84. return rs
  85. }
  86. type OrganizationsService struct {
  87. s *Service
  88. DeidentifyTemplates *OrganizationsDeidentifyTemplatesService
  89. InspectTemplates *OrganizationsInspectTemplatesService
  90. }
  91. func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService {
  92. rs := &OrganizationsDeidentifyTemplatesService{s: s}
  93. return rs
  94. }
  95. type OrganizationsDeidentifyTemplatesService struct {
  96. s *Service
  97. }
  98. func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService {
  99. rs := &OrganizationsInspectTemplatesService{s: s}
  100. return rs
  101. }
  102. type OrganizationsInspectTemplatesService struct {
  103. s *Service
  104. }
  105. func NewProjectsService(s *Service) *ProjectsService {
  106. rs := &ProjectsService{s: s}
  107. rs.Content = NewProjectsContentService(s)
  108. rs.DataSource = NewProjectsDataSourceService(s)
  109. rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s)
  110. rs.DlpJobs = NewProjectsDlpJobsService(s)
  111. rs.Image = NewProjectsImageService(s)
  112. rs.InspectTemplates = NewProjectsInspectTemplatesService(s)
  113. rs.JobTriggers = NewProjectsJobTriggersService(s)
  114. return rs
  115. }
  116. type ProjectsService struct {
  117. s *Service
  118. Content *ProjectsContentService
  119. DataSource *ProjectsDataSourceService
  120. DeidentifyTemplates *ProjectsDeidentifyTemplatesService
  121. DlpJobs *ProjectsDlpJobsService
  122. Image *ProjectsImageService
  123. InspectTemplates *ProjectsInspectTemplatesService
  124. JobTriggers *ProjectsJobTriggersService
  125. }
  126. func NewProjectsContentService(s *Service) *ProjectsContentService {
  127. rs := &ProjectsContentService{s: s}
  128. return rs
  129. }
  130. type ProjectsContentService struct {
  131. s *Service
  132. }
  133. func NewProjectsDataSourceService(s *Service) *ProjectsDataSourceService {
  134. rs := &ProjectsDataSourceService{s: s}
  135. return rs
  136. }
  137. type ProjectsDataSourceService struct {
  138. s *Service
  139. }
  140. func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService {
  141. rs := &ProjectsDeidentifyTemplatesService{s: s}
  142. return rs
  143. }
  144. type ProjectsDeidentifyTemplatesService struct {
  145. s *Service
  146. }
  147. func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService {
  148. rs := &ProjectsDlpJobsService{s: s}
  149. return rs
  150. }
  151. type ProjectsDlpJobsService struct {
  152. s *Service
  153. }
  154. func NewProjectsImageService(s *Service) *ProjectsImageService {
  155. rs := &ProjectsImageService{s: s}
  156. return rs
  157. }
  158. type ProjectsImageService struct {
  159. s *Service
  160. }
  161. func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService {
  162. rs := &ProjectsInspectTemplatesService{s: s}
  163. return rs
  164. }
  165. type ProjectsInspectTemplatesService struct {
  166. s *Service
  167. }
  168. func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService {
  169. rs := &ProjectsJobTriggersService{s: s}
  170. return rs
  171. }
  172. type ProjectsJobTriggersService struct {
  173. s *Service
  174. }
  175. // GooglePrivacyDlpV2beta1AuxiliaryTable: An auxiliary table contains
  176. // statistical information on the relative
  177. // frequency of different quasi-identifiers values. It has one or
  178. // several
  179. // quasi-identifiers columns, and one column that indicates the
  180. // relative
  181. // frequency of each quasi-identifier tuple.
  182. // If a tuple is present in the data but not in the auxiliary table,
  183. // the
  184. // corresponding relative frequency is assumed to be zero (and thus,
  185. // the
  186. // tuple is highly reidentifiable).
  187. type GooglePrivacyDlpV2beta1AuxiliaryTable struct {
  188. // QuasiIds: Quasi-identifier columns. [required]
  189. QuasiIds []*GooglePrivacyDlpV2beta1QuasiIdField `json:"quasiIds,omitempty"`
  190. // RelativeFrequency: The relative frequency column must contain a
  191. // floating-point number
  192. // between 0 and 1 (inclusive). Null values are assumed to be
  193. // zero.
  194. // [required]
  195. RelativeFrequency *GooglePrivacyDlpV2beta1FieldId `json:"relativeFrequency,omitempty"`
  196. // Table: Auxiliary table location. [required]
  197. Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"`
  198. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  199. // unconditionally include in API requests. By default, fields with
  200. // empty values are omitted from API requests. However, any non-pointer,
  201. // non-interface field appearing in ForceSendFields will be sent to the
  202. // server regardless of whether the field is empty or not. This may be
  203. // used to include empty fields in Patch requests.
  204. ForceSendFields []string `json:"-"`
  205. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  206. // API requests with the JSON null value. By default, fields with empty
  207. // values are omitted from API requests. However, any field with an
  208. // empty value appearing in NullFields will be sent to the server as
  209. // null. It is an error if a field in this list has a non-empty value.
  210. // This may be used to include null fields in Patch requests.
  211. NullFields []string `json:"-"`
  212. }
  213. func (s *GooglePrivacyDlpV2beta1AuxiliaryTable) MarshalJSON() ([]byte, error) {
  214. type NoMethod GooglePrivacyDlpV2beta1AuxiliaryTable
  215. raw := NoMethod(*s)
  216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  217. }
  218. // GooglePrivacyDlpV2beta1BigQueryOptions: Options defining BigQuery
  219. // table and row identifiers.
  220. type GooglePrivacyDlpV2beta1BigQueryOptions struct {
  221. // IdentifyingFields: References to fields uniquely identifying rows
  222. // within the table.
  223. // Nested fields in the format, like `person.birthdate.year`, are
  224. // allowed.
  225. IdentifyingFields []*GooglePrivacyDlpV2beta1FieldId `json:"identifyingFields,omitempty"`
  226. // TableReference: Complete BigQuery table reference.
  227. TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"`
  228. // ForceSendFields is a list of field names (e.g. "IdentifyingFields")
  229. // to unconditionally include in API requests. By default, fields with
  230. // empty values are omitted from API requests. However, any non-pointer,
  231. // non-interface field appearing in ForceSendFields will be sent to the
  232. // server regardless of whether the field is empty or not. This may be
  233. // used to include empty fields in Patch requests.
  234. ForceSendFields []string `json:"-"`
  235. // NullFields is a list of field names (e.g. "IdentifyingFields") to
  236. // include in API requests with the JSON null value. By default, fields
  237. // with empty values are omitted from API requests. However, any field
  238. // with an empty value appearing in NullFields will be sent to the
  239. // server as null. It is an error if a field in this list has a
  240. // non-empty value. This may be used to include null fields in Patch
  241. // requests.
  242. NullFields []string `json:"-"`
  243. }
  244. func (s *GooglePrivacyDlpV2beta1BigQueryOptions) MarshalJSON() ([]byte, error) {
  245. type NoMethod GooglePrivacyDlpV2beta1BigQueryOptions
  246. raw := NoMethod(*s)
  247. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  248. }
  249. // GooglePrivacyDlpV2beta1BigQueryTable: Message defining the location
  250. // of a BigQuery table. A table is uniquely
  251. // identified by its project_id, dataset_id, and table_name. Within a
  252. // query
  253. // a table is often referenced with a string in the format
  254. // of:
  255. // `<project_id>:<dataset_id>.<table_id>`
  256. // or
  257. // `<project_id>.<dataset_id>.<table_id>`.
  258. type GooglePrivacyDlpV2beta1BigQueryTable struct {
  259. // DatasetId: Dataset ID of the table.
  260. DatasetId string `json:"datasetId,omitempty"`
  261. // ProjectId: The Google Cloud Platform project ID of the project
  262. // containing the table.
  263. // If omitted, project ID is inferred from the API call.
  264. ProjectId string `json:"projectId,omitempty"`
  265. // TableId: Name of the table.
  266. TableId string `json:"tableId,omitempty"`
  267. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  268. // unconditionally include in API requests. By default, fields with
  269. // empty values are omitted from API requests. However, any non-pointer,
  270. // non-interface field appearing in ForceSendFields will be sent to the
  271. // server regardless of whether the field is empty or not. This may be
  272. // used to include empty fields in Patch requests.
  273. ForceSendFields []string `json:"-"`
  274. // NullFields is a list of field names (e.g. "DatasetId") to include in
  275. // API requests with the JSON null value. By default, fields with empty
  276. // values are omitted from API requests. However, any field with an
  277. // empty value appearing in NullFields will be sent to the server as
  278. // null. It is an error if a field in this list has a non-empty value.
  279. // This may be used to include null fields in Patch requests.
  280. NullFields []string `json:"-"`
  281. }
  282. func (s *GooglePrivacyDlpV2beta1BigQueryTable) MarshalJSON() ([]byte, error) {
  283. type NoMethod GooglePrivacyDlpV2beta1BigQueryTable
  284. raw := NoMethod(*s)
  285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  286. }
  287. // GooglePrivacyDlpV2beta1CategoricalStatsConfig: Compute numerical
  288. // stats over an individual column, including
  289. // number of distinct values and value count distribution.
  290. type GooglePrivacyDlpV2beta1CategoricalStatsConfig struct {
  291. // Field: Field to compute categorical stats on. All column types
  292. // are
  293. // supported except for arrays and structs. However, it may be
  294. // more
  295. // informative to use NumericalStats when the field type is
  296. // supported,
  297. // depending on the data.
  298. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  299. // ForceSendFields is a list of field names (e.g. "Field") to
  300. // unconditionally include in API requests. By default, fields with
  301. // empty values are omitted from API requests. However, any non-pointer,
  302. // non-interface field appearing in ForceSendFields will be sent to the
  303. // server regardless of whether the field is empty or not. This may be
  304. // used to include empty fields in Patch requests.
  305. ForceSendFields []string `json:"-"`
  306. // NullFields is a list of field names (e.g. "Field") to include in API
  307. // requests with the JSON null value. By default, fields with empty
  308. // values are omitted from API requests. However, any field with an
  309. // empty value appearing in NullFields will be sent to the server as
  310. // null. It is an error if a field in this list has a non-empty value.
  311. // This may be used to include null fields in Patch requests.
  312. NullFields []string `json:"-"`
  313. }
  314. func (s *GooglePrivacyDlpV2beta1CategoricalStatsConfig) MarshalJSON() ([]byte, error) {
  315. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsConfig
  316. raw := NoMethod(*s)
  317. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  318. }
  319. // GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket: Histogram
  320. // bucket of value frequencies in the column.
  321. type GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket struct {
  322. // BucketSize: Total number of records in this bucket.
  323. BucketSize int64 `json:"bucketSize,omitempty,string"`
  324. // BucketValues: Sample of value frequencies in this bucket. The total
  325. // number of
  326. // values returned per bucket is capped at 20.
  327. BucketValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"bucketValues,omitempty"`
  328. // ValueFrequencyLowerBound: Lower bound on the value frequency of the
  329. // values in this bucket.
  330. ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"`
  331. // ValueFrequencyUpperBound: Upper bound on the value frequency of the
  332. // values in this bucket.
  333. ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"`
  334. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  335. // unconditionally include in API requests. By default, fields with
  336. // empty values are omitted from API requests. However, any non-pointer,
  337. // non-interface field appearing in ForceSendFields will be sent to the
  338. // server regardless of whether the field is empty or not. This may be
  339. // used to include empty fields in Patch requests.
  340. ForceSendFields []string `json:"-"`
  341. // NullFields is a list of field names (e.g. "BucketSize") to include in
  342. // API requests with the JSON null value. By default, fields with empty
  343. // values are omitted from API requests. However, any field with an
  344. // empty value appearing in NullFields will be sent to the server as
  345. // null. It is an error if a field in this list has a non-empty value.
  346. // This may be used to include null fields in Patch requests.
  347. NullFields []string `json:"-"`
  348. }
  349. func (s *GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) {
  350. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket
  351. raw := NoMethod(*s)
  352. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  353. }
  354. // GooglePrivacyDlpV2beta1CategoricalStatsResult: Result of the
  355. // categorical stats computation.
  356. type GooglePrivacyDlpV2beta1CategoricalStatsResult struct {
  357. // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the
  358. // column.
  359. ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"`
  360. // ForceSendFields is a list of field names (e.g.
  361. // "ValueFrequencyHistogramBuckets") to unconditionally include in API
  362. // requests. By default, fields with empty values are omitted from API
  363. // requests. However, any non-pointer, non-interface field appearing in
  364. // ForceSendFields will be sent to the server regardless of whether the
  365. // field is empty or not. This may be used to include empty fields in
  366. // Patch requests.
  367. ForceSendFields []string `json:"-"`
  368. // NullFields is a list of field names (e.g.
  369. // "ValueFrequencyHistogramBuckets") to include in API requests with the
  370. // JSON null value. By default, fields with empty values are omitted
  371. // from API requests. However, any field with an empty value appearing
  372. // in NullFields will be sent to the server as null. It is an error if a
  373. // field in this list has a non-empty value. This may be used to include
  374. // null fields in Patch requests.
  375. NullFields []string `json:"-"`
  376. }
  377. func (s *GooglePrivacyDlpV2beta1CategoricalStatsResult) MarshalJSON() ([]byte, error) {
  378. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsResult
  379. raw := NoMethod(*s)
  380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  381. }
  382. // GooglePrivacyDlpV2beta1CloudStorageOptions: Options defining a file
  383. // or a set of files (path ending with *) within
  384. // a Google Cloud Storage bucket.
  385. type GooglePrivacyDlpV2beta1CloudStorageOptions struct {
  386. FileSet *GooglePrivacyDlpV2beta1FileSet `json:"fileSet,omitempty"`
  387. // ForceSendFields is a list of field names (e.g. "FileSet") to
  388. // unconditionally include in API requests. By default, fields with
  389. // empty values are omitted from API requests. However, any non-pointer,
  390. // non-interface field appearing in ForceSendFields will be sent to the
  391. // server regardless of whether the field is empty or not. This may be
  392. // used to include empty fields in Patch requests.
  393. ForceSendFields []string `json:"-"`
  394. // NullFields is a list of field names (e.g. "FileSet") to include in
  395. // API requests with the JSON null value. By default, fields with empty
  396. // values are omitted from API requests. However, any field with an
  397. // empty value appearing in NullFields will be sent to the server as
  398. // null. It is an error if a field in this list has a non-empty value.
  399. // This may be used to include null fields in Patch requests.
  400. NullFields []string `json:"-"`
  401. }
  402. func (s *GooglePrivacyDlpV2beta1CloudStorageOptions) MarshalJSON() ([]byte, error) {
  403. type NoMethod GooglePrivacyDlpV2beta1CloudStorageOptions
  404. raw := NoMethod(*s)
  405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  406. }
  407. // GooglePrivacyDlpV2beta1CloudStoragePath: A location in Cloud Storage.
  408. type GooglePrivacyDlpV2beta1CloudStoragePath struct {
  409. // Path: The url, in the format of `gs://bucket/<path>`.
  410. Path string `json:"path,omitempty"`
  411. // ForceSendFields is a list of field names (e.g. "Path") to
  412. // unconditionally include in API requests. By default, fields with
  413. // empty values are omitted from API requests. However, any non-pointer,
  414. // non-interface field appearing in ForceSendFields will be sent to the
  415. // server regardless of whether the field is empty or not. This may be
  416. // used to include empty fields in Patch requests.
  417. ForceSendFields []string `json:"-"`
  418. // NullFields is a list of field names (e.g. "Path") to include in API
  419. // requests with the JSON null value. By default, fields with empty
  420. // values are omitted from API requests. However, any field with an
  421. // empty value appearing in NullFields will be sent to the server as
  422. // null. It is an error if a field in this list has a non-empty value.
  423. // This may be used to include null fields in Patch requests.
  424. NullFields []string `json:"-"`
  425. }
  426. func (s *GooglePrivacyDlpV2beta1CloudStoragePath) MarshalJSON() ([]byte, error) {
  427. type NoMethod GooglePrivacyDlpV2beta1CloudStoragePath
  428. raw := NoMethod(*s)
  429. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  430. }
  431. // GooglePrivacyDlpV2beta1CustomInfoType: Custom information type
  432. // provided by the user. Used to find domain-specific
  433. // sensitive information configurable to the data in question.
  434. type GooglePrivacyDlpV2beta1CustomInfoType struct {
  435. // Dictionary: Dictionary-based custom info type.
  436. Dictionary *GooglePrivacyDlpV2beta1Dictionary `json:"dictionary,omitempty"`
  437. // InfoType: Info type configuration. All custom info types must have
  438. // configurations
  439. // that do not conflict with built-in info types or other custom info
  440. // types.
  441. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  442. // SurrogateType: Surrogate info type.
  443. SurrogateType *GooglePrivacyDlpV2beta1SurrogateType `json:"surrogateType,omitempty"`
  444. // ForceSendFields is a list of field names (e.g. "Dictionary") to
  445. // unconditionally include in API requests. By default, fields with
  446. // empty values are omitted from API requests. However, any non-pointer,
  447. // non-interface field appearing in ForceSendFields will be sent to the
  448. // server regardless of whether the field is empty or not. This may be
  449. // used to include empty fields in Patch requests.
  450. ForceSendFields []string `json:"-"`
  451. // NullFields is a list of field names (e.g. "Dictionary") to include in
  452. // API requests with the JSON null value. By default, fields with empty
  453. // values are omitted from API requests. However, any field with an
  454. // empty value appearing in NullFields will be sent to the server as
  455. // null. It is an error if a field in this list has a non-empty value.
  456. // This may be used to include null fields in Patch requests.
  457. NullFields []string `json:"-"`
  458. }
  459. func (s *GooglePrivacyDlpV2beta1CustomInfoType) MarshalJSON() ([]byte, error) {
  460. type NoMethod GooglePrivacyDlpV2beta1CustomInfoType
  461. raw := NoMethod(*s)
  462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  463. }
  464. // GooglePrivacyDlpV2beta1DatastoreOptions: Options defining a data set
  465. // within Google Cloud Datastore.
  466. type GooglePrivacyDlpV2beta1DatastoreOptions struct {
  467. // Kind: The kind to process.
  468. Kind *GooglePrivacyDlpV2beta1KindExpression `json:"kind,omitempty"`
  469. // PartitionId: A partition ID identifies a grouping of entities. The
  470. // grouping is always
  471. // by project and namespace, however the namespace ID may be empty.
  472. PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"`
  473. // Projection: Properties to scan. If none are specified, all properties
  474. // will be scanned
  475. // by default.
  476. Projection []*GooglePrivacyDlpV2beta1Projection `json:"projection,omitempty"`
  477. // ForceSendFields is a list of field names (e.g. "Kind") to
  478. // unconditionally include in API requests. By default, fields with
  479. // empty values are omitted from API requests. However, any non-pointer,
  480. // non-interface field appearing in ForceSendFields will be sent to the
  481. // server regardless of whether the field is empty or not. This may be
  482. // used to include empty fields in Patch requests.
  483. ForceSendFields []string `json:"-"`
  484. // NullFields is a list of field names (e.g. "Kind") to include in API
  485. // requests with the JSON null value. By default, fields with empty
  486. // values are omitted from API requests. However, any field with an
  487. // empty value appearing in NullFields will be sent to the server as
  488. // null. It is an error if a field in this list has a non-empty value.
  489. // This may be used to include null fields in Patch requests.
  490. NullFields []string `json:"-"`
  491. }
  492. func (s *GooglePrivacyDlpV2beta1DatastoreOptions) MarshalJSON() ([]byte, error) {
  493. type NoMethod GooglePrivacyDlpV2beta1DatastoreOptions
  494. raw := NoMethod(*s)
  495. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  496. }
  497. // GooglePrivacyDlpV2beta1Dictionary: Custom information type based on a
  498. // dictionary of words or phrases. This can
  499. // be used to match sensitive information specific to the data, such as
  500. // a list
  501. // of employee IDs or job titles.
  502. //
  503. // Dictionary words are case-insensitive and all characters other than
  504. // letters
  505. // and digits in the unicode [Basic
  506. // Multilingual
  507. // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#
  508. // Basic_Multilingual_Plane)
  509. // will be replaced with whitespace when scanning for matches, so
  510. // the
  511. // dictionary phrase "Sam Johnson" will match all three phrases "sam
  512. // johnson",
  513. // "Sam, Johnson", and "Sam (Johnson)". Additionally, the
  514. // characters
  515. // surrounding any match must be of a different type than the
  516. // adjacent
  517. // characters within the word, so letters must be next to non-letters
  518. // and
  519. // digits next to non-digits. For example, the dictionary word "jen"
  520. // will
  521. // match the first three letters of the text "jen123" but will return
  522. // no
  523. // matches for "jennifer".
  524. //
  525. // Dictionary words containing a large number of characters that are
  526. // not
  527. // letters or digits may result in unexpected findings because such
  528. // characters
  529. // are treated as whitespace.
  530. type GooglePrivacyDlpV2beta1Dictionary struct {
  531. // WordList: List of words or phrases to search for.
  532. WordList *GooglePrivacyDlpV2beta1WordList `json:"wordList,omitempty"`
  533. // ForceSendFields is a list of field names (e.g. "WordList") to
  534. // unconditionally include in API requests. By default, fields with
  535. // empty values are omitted from API requests. However, any non-pointer,
  536. // non-interface field appearing in ForceSendFields will be sent to the
  537. // server regardless of whether the field is empty or not. This may be
  538. // used to include empty fields in Patch requests.
  539. ForceSendFields []string `json:"-"`
  540. // NullFields is a list of field names (e.g. "WordList") to include in
  541. // API requests with the JSON null value. By default, fields with empty
  542. // values are omitted from API requests. However, any field with an
  543. // empty value appearing in NullFields will be sent to the server as
  544. // null. It is an error if a field in this list has a non-empty value.
  545. // This may be used to include null fields in Patch requests.
  546. NullFields []string `json:"-"`
  547. }
  548. func (s *GooglePrivacyDlpV2beta1Dictionary) MarshalJSON() ([]byte, error) {
  549. type NoMethod GooglePrivacyDlpV2beta1Dictionary
  550. raw := NoMethod(*s)
  551. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  552. }
  553. // GooglePrivacyDlpV2beta1EntityId: An entity in a dataset is a field or
  554. // set of fields that correspond to a
  555. // single person. For example, in medical records the `EntityId` might
  556. // be
  557. // a patient identifier, or for financial records it might be an
  558. // account
  559. // identifier. This message is used when generalizations or analysis
  560. // must be
  561. // consistent across multiple rows pertaining to the same entity.
  562. type GooglePrivacyDlpV2beta1EntityId struct {
  563. // Field: Composite key indicating which field contains the entity
  564. // identifier.
  565. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  566. // ForceSendFields is a list of field names (e.g. "Field") to
  567. // unconditionally include in API requests. By default, fields with
  568. // empty values are omitted from API requests. However, any non-pointer,
  569. // non-interface field appearing in ForceSendFields will be sent to the
  570. // server regardless of whether the field is empty or not. This may be
  571. // used to include empty fields in Patch requests.
  572. ForceSendFields []string `json:"-"`
  573. // NullFields is a list of field names (e.g. "Field") to include in API
  574. // requests with the JSON null value. By default, fields with empty
  575. // values are omitted from API requests. However, any field with an
  576. // empty value appearing in NullFields will be sent to the server as
  577. // null. It is an error if a field in this list has a non-empty value.
  578. // This may be used to include null fields in Patch requests.
  579. NullFields []string `json:"-"`
  580. }
  581. func (s *GooglePrivacyDlpV2beta1EntityId) MarshalJSON() ([]byte, error) {
  582. type NoMethod GooglePrivacyDlpV2beta1EntityId
  583. raw := NoMethod(*s)
  584. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  585. }
  586. // GooglePrivacyDlpV2beta1FieldId: General identifier of a data field in
  587. // a storage service.
  588. type GooglePrivacyDlpV2beta1FieldId struct {
  589. // ColumnName: Name describing the field.
  590. ColumnName string `json:"columnName,omitempty"`
  591. // ForceSendFields is a list of field names (e.g. "ColumnName") to
  592. // unconditionally include in API requests. By default, fields with
  593. // empty values are omitted from API requests. However, any non-pointer,
  594. // non-interface field appearing in ForceSendFields will be sent to the
  595. // server regardless of whether the field is empty or not. This may be
  596. // used to include empty fields in Patch requests.
  597. ForceSendFields []string `json:"-"`
  598. // NullFields is a list of field names (e.g. "ColumnName") to include in
  599. // API requests with the JSON null value. By default, fields with empty
  600. // values are omitted from API requests. However, any field with an
  601. // empty value appearing in NullFields will be sent to the server as
  602. // null. It is an error if a field in this list has a non-empty value.
  603. // This may be used to include null fields in Patch requests.
  604. NullFields []string `json:"-"`
  605. }
  606. func (s *GooglePrivacyDlpV2beta1FieldId) MarshalJSON() ([]byte, error) {
  607. type NoMethod GooglePrivacyDlpV2beta1FieldId
  608. raw := NoMethod(*s)
  609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  610. }
  611. // GooglePrivacyDlpV2beta1FileSet: Set of files to scan.
  612. type GooglePrivacyDlpV2beta1FileSet struct {
  613. // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard
  614. // in the
  615. // path is allowed.
  616. Url string `json:"url,omitempty"`
  617. // ForceSendFields is a list of field names (e.g. "Url") to
  618. // unconditionally include in API requests. By default, fields with
  619. // empty values are omitted from API requests. However, any non-pointer,
  620. // non-interface field appearing in ForceSendFields will be sent to the
  621. // server regardless of whether the field is empty or not. This may be
  622. // used to include empty fields in Patch requests.
  623. ForceSendFields []string `json:"-"`
  624. // NullFields is a list of field names (e.g. "Url") to include in API
  625. // requests with the JSON null value. By default, fields with empty
  626. // values are omitted from API requests. However, any field with an
  627. // empty value appearing in NullFields will be sent to the server as
  628. // null. It is an error if a field in this list has a non-empty value.
  629. // This may be used to include null fields in Patch requests.
  630. NullFields []string `json:"-"`
  631. }
  632. func (s *GooglePrivacyDlpV2beta1FileSet) MarshalJSON() ([]byte, error) {
  633. type NoMethod GooglePrivacyDlpV2beta1FileSet
  634. raw := NoMethod(*s)
  635. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  636. }
  637. // GooglePrivacyDlpV2beta1InfoType: Type of information detected by the
  638. // API.
  639. type GooglePrivacyDlpV2beta1InfoType struct {
  640. // Name: Name of the information type.
  641. Name string `json:"name,omitempty"`
  642. // ForceSendFields is a list of field names (e.g. "Name") to
  643. // unconditionally include in API requests. By default, fields with
  644. // empty values are omitted from API requests. However, any non-pointer,
  645. // non-interface field appearing in ForceSendFields will be sent to the
  646. // server regardless of whether the field is empty or not. This may be
  647. // used to include empty fields in Patch requests.
  648. ForceSendFields []string `json:"-"`
  649. // NullFields is a list of field names (e.g. "Name") to include in API
  650. // requests with the JSON null value. By default, fields with empty
  651. // values are omitted from API requests. However, any field with an
  652. // empty value appearing in NullFields will be sent to the server as
  653. // null. It is an error if a field in this list has a non-empty value.
  654. // This may be used to include null fields in Patch requests.
  655. NullFields []string `json:"-"`
  656. }
  657. func (s *GooglePrivacyDlpV2beta1InfoType) MarshalJSON() ([]byte, error) {
  658. type NoMethod GooglePrivacyDlpV2beta1InfoType
  659. raw := NoMethod(*s)
  660. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  661. }
  662. // GooglePrivacyDlpV2beta1InfoTypeLimit: Max findings configuration per
  663. // info type, per content item or long running
  664. // operation.
  665. type GooglePrivacyDlpV2beta1InfoTypeLimit struct {
  666. // InfoType: Type of information the findings limit applies to. Only one
  667. // limit per
  668. // info_type should be provided. If InfoTypeLimit does not have
  669. // an
  670. // info_type, the DLP API applies the limit against all info_types that
  671. // are
  672. // found but not specified in another InfoTypeLimit.
  673. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  674. // MaxFindings: Max findings limit for the given infoType.
  675. MaxFindings int64 `json:"maxFindings,omitempty"`
  676. // ForceSendFields is a list of field names (e.g. "InfoType") to
  677. // unconditionally include in API requests. By default, fields with
  678. // empty values are omitted from API requests. However, any non-pointer,
  679. // non-interface field appearing in ForceSendFields will be sent to the
  680. // server regardless of whether the field is empty or not. This may be
  681. // used to include empty fields in Patch requests.
  682. ForceSendFields []string `json:"-"`
  683. // NullFields is a list of field names (e.g. "InfoType") to include in
  684. // API requests with the JSON null value. By default, fields with empty
  685. // values are omitted from API requests. However, any field with an
  686. // empty value appearing in NullFields will be sent to the server as
  687. // null. It is an error if a field in this list has a non-empty value.
  688. // This may be used to include null fields in Patch requests.
  689. NullFields []string `json:"-"`
  690. }
  691. func (s *GooglePrivacyDlpV2beta1InfoTypeLimit) MarshalJSON() ([]byte, error) {
  692. type NoMethod GooglePrivacyDlpV2beta1InfoTypeLimit
  693. raw := NoMethod(*s)
  694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  695. }
  696. // GooglePrivacyDlpV2beta1InfoTypeStatistics: Statistics regarding a
  697. // specific InfoType.
  698. type GooglePrivacyDlpV2beta1InfoTypeStatistics struct {
  699. // Count: Number of findings for this info type.
  700. Count int64 `json:"count,omitempty,string"`
  701. // InfoType: The type of finding this stat is for.
  702. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  703. // ForceSendFields is a list of field names (e.g. "Count") to
  704. // unconditionally include in API requests. By default, fields with
  705. // empty values are omitted from API requests. However, any non-pointer,
  706. // non-interface field appearing in ForceSendFields will be sent to the
  707. // server regardless of whether the field is empty or not. This may be
  708. // used to include empty fields in Patch requests.
  709. ForceSendFields []string `json:"-"`
  710. // NullFields is a list of field names (e.g. "Count") to include in API
  711. // requests with the JSON null value. By default, fields with empty
  712. // values are omitted from API requests. However, any field with an
  713. // empty value appearing in NullFields will be sent to the server as
  714. // null. It is an error if a field in this list has a non-empty value.
  715. // This may be used to include null fields in Patch requests.
  716. NullFields []string `json:"-"`
  717. }
  718. func (s *GooglePrivacyDlpV2beta1InfoTypeStatistics) MarshalJSON() ([]byte, error) {
  719. type NoMethod GooglePrivacyDlpV2beta1InfoTypeStatistics
  720. raw := NoMethod(*s)
  721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  722. }
  723. // GooglePrivacyDlpV2beta1InspectConfig: Configuration description of
  724. // the scanning process.
  725. // When used with redactContent only info_types and min_likelihood are
  726. // currently
  727. // used.
  728. type GooglePrivacyDlpV2beta1InspectConfig struct {
  729. // CustomInfoTypes: Custom info types provided by the user.
  730. CustomInfoTypes []*GooglePrivacyDlpV2beta1CustomInfoType `json:"customInfoTypes,omitempty"`
  731. // ExcludeTypes: When true, excludes type information of the findings.
  732. ExcludeTypes bool `json:"excludeTypes,omitempty"`
  733. // IncludeQuote: When true, a contextual quote from the data that
  734. // triggered a finding is
  735. // included in the response; see Finding.quote.
  736. IncludeQuote bool `json:"includeQuote,omitempty"`
  737. // InfoTypeLimits: Configuration of findings limit given for specified
  738. // info types.
  739. InfoTypeLimits []*GooglePrivacyDlpV2beta1InfoTypeLimit `json:"infoTypeLimits,omitempty"`
  740. // InfoTypes: Restricts what info_types to look for. The values must
  741. // correspond to
  742. // InfoType values returned by ListInfoTypes or found in
  743. // documentation.
  744. // Empty info_types runs all enabled detectors.
  745. InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"`
  746. // MaxFindings: Limits the number of findings per content item or long
  747. // running operation.
  748. MaxFindings int64 `json:"maxFindings,omitempty"`
  749. // MinLikelihood: Only returns findings equal or above this threshold.
  750. //
  751. // Possible values:
  752. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  753. // likelihoods is included.
  754. // "VERY_UNLIKELY" - Few matching elements.
  755. // "UNLIKELY"
  756. // "POSSIBLE" - Some matching elements.
  757. // "LIKELY"
  758. // "VERY_LIKELY" - Many matching elements.
  759. MinLikelihood string `json:"minLikelihood,omitempty"`
  760. // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") to
  761. // unconditionally include in API requests. By default, fields with
  762. // empty values are omitted from API requests. However, any non-pointer,
  763. // non-interface field appearing in ForceSendFields will be sent to the
  764. // server regardless of whether the field is empty or not. This may be
  765. // used to include empty fields in Patch requests.
  766. ForceSendFields []string `json:"-"`
  767. // NullFields is a list of field names (e.g. "CustomInfoTypes") to
  768. // include in API requests with the JSON null value. By default, fields
  769. // with empty values are omitted from API requests. However, any field
  770. // with an empty value appearing in NullFields will be sent to the
  771. // server as null. It is an error if a field in this list has a
  772. // non-empty value. This may be used to include null fields in Patch
  773. // requests.
  774. NullFields []string `json:"-"`
  775. }
  776. func (s *GooglePrivacyDlpV2beta1InspectConfig) MarshalJSON() ([]byte, error) {
  777. type NoMethod GooglePrivacyDlpV2beta1InspectConfig
  778. raw := NoMethod(*s)
  779. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  780. }
  781. // GooglePrivacyDlpV2beta1InspectOperationMetadata: Metadata returned
  782. // within GetOperation for an inspect request.
  783. type GooglePrivacyDlpV2beta1InspectOperationMetadata struct {
  784. // CreateTime: The time which this request was started.
  785. CreateTime string `json:"createTime,omitempty"`
  786. InfoTypeStats []*GooglePrivacyDlpV2beta1InfoTypeStatistics `json:"infoTypeStats,omitempty"`
  787. // ProcessedBytes: Total size in bytes that were processed.
  788. ProcessedBytes int64 `json:"processedBytes,omitempty,string"`
  789. // RequestInspectConfig: The inspect config used to create the
  790. // Operation.
  791. RequestInspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"requestInspectConfig,omitempty"`
  792. // RequestOutputConfig: Optional location to store findings.
  793. RequestOutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"requestOutputConfig,omitempty"`
  794. // RequestStorageConfig: The storage config used to create the
  795. // Operation.
  796. RequestStorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"requestStorageConfig,omitempty"`
  797. // TotalEstimatedBytes: Estimate of the number of bytes to process.
  798. TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"`
  799. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  800. // unconditionally include in API requests. By default, fields with
  801. // empty values are omitted from API requests. However, any non-pointer,
  802. // non-interface field appearing in ForceSendFields will be sent to the
  803. // server regardless of whether the field is empty or not. This may be
  804. // used to include empty fields in Patch requests.
  805. ForceSendFields []string `json:"-"`
  806. // NullFields is a list of field names (e.g. "CreateTime") to include in
  807. // API requests with the JSON null value. By default, fields with empty
  808. // values are omitted from API requests. However, any field with an
  809. // empty value appearing in NullFields will be sent to the server as
  810. // null. It is an error if a field in this list has a non-empty value.
  811. // This may be used to include null fields in Patch requests.
  812. NullFields []string `json:"-"`
  813. }
  814. func (s *GooglePrivacyDlpV2beta1InspectOperationMetadata) MarshalJSON() ([]byte, error) {
  815. type NoMethod GooglePrivacyDlpV2beta1InspectOperationMetadata
  816. raw := NoMethod(*s)
  817. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  818. }
  819. // GooglePrivacyDlpV2beta1InspectOperationResult: The operational data.
  820. type GooglePrivacyDlpV2beta1InspectOperationResult struct {
  821. // Name: The server-assigned name, which is only unique within the same
  822. // service that
  823. // originally returns it. If you use the default HTTP mapping,
  824. // the
  825. // `name` should have the format of `inspect/results/{id}`.
  826. Name string `json:"name,omitempty"`
  827. // ForceSendFields is a list of field names (e.g. "Name") to
  828. // unconditionally include in API requests. By default, fields with
  829. // empty values are omitted from API requests. However, any non-pointer,
  830. // non-interface field appearing in ForceSendFields will be sent to the
  831. // server regardless of whether the field is empty or not. This may be
  832. // used to include empty fields in Patch requests.
  833. ForceSendFields []string `json:"-"`
  834. // NullFields is a list of field names (e.g. "Name") to include in API
  835. // requests with the JSON null value. By default, fields with empty
  836. // values are omitted from API requests. However, any field with an
  837. // empty value appearing in NullFields will be sent to the server as
  838. // null. It is an error if a field in this list has a non-empty value.
  839. // This may be used to include null fields in Patch requests.
  840. NullFields []string `json:"-"`
  841. }
  842. func (s *GooglePrivacyDlpV2beta1InspectOperationResult) MarshalJSON() ([]byte, error) {
  843. type NoMethod GooglePrivacyDlpV2beta1InspectOperationResult
  844. raw := NoMethod(*s)
  845. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  846. }
  847. // GooglePrivacyDlpV2beta1KAnonymityConfig: k-anonymity metric, used for
  848. // analysis of reidentification risk.
  849. type GooglePrivacyDlpV2beta1KAnonymityConfig struct {
  850. // EntityId: Optional message indicating that each distinct entity_id
  851. // should not
  852. // contribute to the k-anonymity count more than once per equivalence
  853. // class.
  854. // If an entity_id appears on several rows with different
  855. // quasi-identifier
  856. // tuples, it will contribute to each count exactly once.
  857. //
  858. // This can lead to unexpected results. Consider a table where ID 1
  859. // is
  860. // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to
  861. // *both*
  862. // quasi-identifiers "foo" and "bar" (on separate rows), and where this
  863. // ID
  864. // is used as entity_id. Then, the anonymity value associated to ID 3
  865. // will
  866. // be 2, even if it is the only ID to be associated to both values "foo"
  867. // and
  868. // "bar".
  869. EntityId *GooglePrivacyDlpV2beta1EntityId `json:"entityId,omitempty"`
  870. // QuasiIds: Set of fields to compute k-anonymity over. When multiple
  871. // fields are
  872. // specified, they are considered a single composite key. Structs
  873. // and
  874. // repeated data types are not supported; however, nested fields
  875. // are
  876. // supported so long as they are not structs themselves or nested
  877. // within
  878. // a repeated field.
  879. QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"`
  880. // ForceSendFields is a list of field names (e.g. "EntityId") to
  881. // unconditionally include in API requests. By default, fields with
  882. // empty values are omitted from API requests. However, any non-pointer,
  883. // non-interface field appearing in ForceSendFields will be sent to the
  884. // server regardless of whether the field is empty or not. This may be
  885. // used to include empty fields in Patch requests.
  886. ForceSendFields []string `json:"-"`
  887. // NullFields is a list of field names (e.g. "EntityId") to include in
  888. // API requests with the JSON null value. By default, fields with empty
  889. // values are omitted from API requests. However, any field with an
  890. // empty value appearing in NullFields will be sent to the server as
  891. // null. It is an error if a field in this list has a non-empty value.
  892. // This may be used to include null fields in Patch requests.
  893. NullFields []string `json:"-"`
  894. }
  895. func (s *GooglePrivacyDlpV2beta1KAnonymityConfig) MarshalJSON() ([]byte, error) {
  896. type NoMethod GooglePrivacyDlpV2beta1KAnonymityConfig
  897. raw := NoMethod(*s)
  898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  899. }
  900. // GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass: The set of
  901. // columns' values that share the same k-anonymity value.
  902. type GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass struct {
  903. // EquivalenceClassSize: Size of the equivalence class, for example
  904. // number of rows with the
  905. // above set of values.
  906. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  907. // QuasiIdsValues: Set of values defining the equivalence class. One
  908. // value per
  909. // quasi-identifier column in the original KAnonymity metric
  910. // message.
  911. // The order is always the same as the original request.
  912. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  913. // ForceSendFields is a list of field names (e.g.
  914. // "EquivalenceClassSize") to unconditionally include in API requests.
  915. // By default, fields with empty values are omitted from API requests.
  916. // However, any non-pointer, non-interface field appearing in
  917. // ForceSendFields will be sent to the server regardless of whether the
  918. // field is empty or not. This may be used to include empty fields in
  919. // Patch requests.
  920. ForceSendFields []string `json:"-"`
  921. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  922. // include in API requests with the JSON null value. By default, fields
  923. // with empty values are omitted from API requests. However, any field
  924. // with an empty value appearing in NullFields will be sent to the
  925. // server as null. It is an error if a field in this list has a
  926. // non-empty value. This may be used to include null fields in Patch
  927. // requests.
  928. NullFields []string `json:"-"`
  929. }
  930. func (s *GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) {
  931. type NoMethod GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass
  932. raw := NoMethod(*s)
  933. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  934. }
  935. // GooglePrivacyDlpV2beta1KAnonymityHistogramBucket: Histogram bucket of
  936. // equivalence class sizes in the table.
  937. type GooglePrivacyDlpV2beta1KAnonymityHistogramBucket struct {
  938. // BucketSize: Total number of records in this bucket.
  939. BucketSize int64 `json:"bucketSize,omitempty,string"`
  940. // BucketValues: Sample of equivalence classes in this bucket. The total
  941. // number of
  942. // classes returned per bucket is capped at 20.
  943. BucketValues []*GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass `json:"bucketValues,omitempty"`
  944. // EquivalenceClassSizeLowerBound: Lower bound on the size of the
  945. // equivalence classes in this bucket.
  946. EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"`
  947. // EquivalenceClassSizeUpperBound: Upper bound on the size of the
  948. // equivalence classes in this bucket.
  949. EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"`
  950. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  951. // unconditionally include in API requests. By default, fields with
  952. // empty values are omitted from API requests. However, any non-pointer,
  953. // non-interface field appearing in ForceSendFields will be sent to the
  954. // server regardless of whether the field is empty or not. This may be
  955. // used to include empty fields in Patch requests.
  956. ForceSendFields []string `json:"-"`
  957. // NullFields is a list of field names (e.g. "BucketSize") to include in
  958. // API requests with the JSON null value. By default, fields with empty
  959. // values are omitted from API requests. However, any field with an
  960. // empty value appearing in NullFields will be sent to the server as
  961. // null. It is an error if a field in this list has a non-empty value.
  962. // This may be used to include null fields in Patch requests.
  963. NullFields []string `json:"-"`
  964. }
  965. func (s *GooglePrivacyDlpV2beta1KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) {
  966. type NoMethod GooglePrivacyDlpV2beta1KAnonymityHistogramBucket
  967. raw := NoMethod(*s)
  968. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  969. }
  970. // GooglePrivacyDlpV2beta1KAnonymityResult: Result of the k-anonymity
  971. // computation.
  972. type GooglePrivacyDlpV2beta1KAnonymityResult struct {
  973. // EquivalenceClassHistogramBuckets: Histogram of k-anonymity
  974. // equivalence classes.
  975. EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta1KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"`
  976. // ForceSendFields is a list of field names (e.g.
  977. // "EquivalenceClassHistogramBuckets") to unconditionally include in API
  978. // requests. By default, fields with empty values are omitted from API
  979. // requests. However, any non-pointer, non-interface field appearing in
  980. // ForceSendFields will be sent to the server regardless of whether the
  981. // field is empty or not. This may be used to include empty fields in
  982. // Patch requests.
  983. ForceSendFields []string `json:"-"`
  984. // NullFields is a list of field names (e.g.
  985. // "EquivalenceClassHistogramBuckets") to include in API requests with
  986. // the JSON null value. By default, fields with empty values are omitted
  987. // from API requests. However, any field with an empty value appearing
  988. // in NullFields will be sent to the server as null. It is an error if a
  989. // field in this list has a non-empty value. This may be used to include
  990. // null fields in Patch requests.
  991. NullFields []string `json:"-"`
  992. }
  993. func (s *GooglePrivacyDlpV2beta1KAnonymityResult) MarshalJSON() ([]byte, error) {
  994. type NoMethod GooglePrivacyDlpV2beta1KAnonymityResult
  995. raw := NoMethod(*s)
  996. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  997. }
  998. // GooglePrivacyDlpV2beta1KMapEstimationConfig: Reidentifiability
  999. // metric. This corresponds to a risk model similar to what
  1000. // is called "journalist risk" in the literature, except the attack
  1001. // dataset is
  1002. // statistically modeled instead of being perfectly known. This can be
  1003. // done
  1004. // using publicly available data (like the US Census), or using a
  1005. // custom
  1006. // statistical model (indicated as one or several BigQuery tables), or
  1007. // by
  1008. // extrapolating from the distribution of values in the input dataset.
  1009. type GooglePrivacyDlpV2beta1KMapEstimationConfig struct {
  1010. // AuxiliaryTables: Several auxiliary tables can be used in the
  1011. // analysis. Each custom_tag
  1012. // used to tag a quasi-identifiers column must appear in exactly one
  1013. // column
  1014. // of one auxiliary table.
  1015. AuxiliaryTables []*GooglePrivacyDlpV2beta1AuxiliaryTable `json:"auxiliaryTables,omitempty"`
  1016. // QuasiIds: Fields considered to be quasi-identifiers. No two columns
  1017. // can have the
  1018. // same tag. [required]
  1019. QuasiIds []*GooglePrivacyDlpV2beta1TaggedField `json:"quasiIds,omitempty"`
  1020. // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
  1021. // modeling.
  1022. // Required if no column is tagged with a region-specific InfoType
  1023. // (like
  1024. // US_ZIP_5) or a region code.
  1025. RegionCode string `json:"regionCode,omitempty"`
  1026. // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
  1027. // unconditionally include in API requests. By default, fields with
  1028. // empty values are omitted from API requests. However, any non-pointer,
  1029. // non-interface field appearing in ForceSendFields will be sent to the
  1030. // server regardless of whether the field is empty or not. This may be
  1031. // used to include empty fields in Patch requests.
  1032. ForceSendFields []string `json:"-"`
  1033. // NullFields is a list of field names (e.g. "AuxiliaryTables") to
  1034. // include in API requests with the JSON null value. By default, fields
  1035. // with empty values are omitted from API requests. However, any field
  1036. // with an empty value appearing in NullFields will be sent to the
  1037. // server as null. It is an error if a field in this list has a
  1038. // non-empty value. This may be used to include null fields in Patch
  1039. // requests.
  1040. NullFields []string `json:"-"`
  1041. }
  1042. func (s *GooglePrivacyDlpV2beta1KMapEstimationConfig) MarshalJSON() ([]byte, error) {
  1043. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationConfig
  1044. raw := NoMethod(*s)
  1045. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1046. }
  1047. // GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket: A
  1048. // KMapEstimationHistogramBucket message with the following values:
  1049. // min_anonymity: 3
  1050. // max_anonymity: 5
  1051. // frequency: 42
  1052. // means that there are 42 records whose quasi-identifier values
  1053. // correspond
  1054. // to 3, 4 or 5 people in the overlying population. An important
  1055. // particular
  1056. // case is when min_anonymity = max_anonymity = 1: the frequency field
  1057. // then
  1058. // corresponds to the number of uniquely identifiable records.
  1059. type GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket struct {
  1060. // BucketSize: Number of records within these anonymity bounds.
  1061. BucketSize int64 `json:"bucketSize,omitempty,string"`
  1062. // BucketValues: Sample of quasi-identifier tuple values in this bucket.
  1063. // The total
  1064. // number of classes returned per bucket is capped at 20.
  1065. BucketValues []*GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"`
  1066. // MaxAnonymity: Always greater than or equal to min_anonymity.
  1067. MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"`
  1068. // MinAnonymity: Always positive.
  1069. MinAnonymity int64 `json:"minAnonymity,omitempty,string"`
  1070. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  1071. // unconditionally include in API requests. By default, fields with
  1072. // empty values are omitted from API requests. However, any non-pointer,
  1073. // non-interface field appearing in ForceSendFields will be sent to the
  1074. // server regardless of whether the field is empty or not. This may be
  1075. // used to include empty fields in Patch requests.
  1076. ForceSendFields []string `json:"-"`
  1077. // NullFields is a list of field names (e.g. "BucketSize") to include in
  1078. // API requests with the JSON null value. By default, fields with empty
  1079. // values are omitted from API requests. However, any field with an
  1080. // empty value appearing in NullFields will be sent to the server as
  1081. // null. It is an error if a field in this list has a non-empty value.
  1082. // This may be used to include null fields in Patch requests.
  1083. NullFields []string `json:"-"`
  1084. }
  1085. func (s *GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
  1086. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket
  1087. raw := NoMethod(*s)
  1088. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1089. }
  1090. // GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues: A tuple of values
  1091. // for the quasi-identifier columns.
  1092. type GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues struct {
  1093. // EstimatedAnonymity: The estimated anonymity for these
  1094. // quasi-identifier values.
  1095. EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"`
  1096. // QuasiIdsValues: The quasi-identifier values.
  1097. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  1098. // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity")
  1099. // to unconditionally include in API requests. By default, fields with
  1100. // empty values are omitted from API requests. However, any non-pointer,
  1101. // non-interface field appearing in ForceSendFields will be sent to the
  1102. // server regardless of whether the field is empty or not. This may be
  1103. // used to include empty fields in Patch requests.
  1104. ForceSendFields []string `json:"-"`
  1105. // NullFields is a list of field names (e.g. "EstimatedAnonymity") to
  1106. // include in API requests with the JSON null value. By default, fields
  1107. // with empty values are omitted from API requests. However, any field
  1108. // with an empty value appearing in NullFields will be sent to the
  1109. // server as null. It is an error if a field in this list has a
  1110. // non-empty value. This may be used to include null fields in Patch
  1111. // requests.
  1112. NullFields []string `json:"-"`
  1113. }
  1114. func (s *GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
  1115. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues
  1116. raw := NoMethod(*s)
  1117. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1118. }
  1119. // GooglePrivacyDlpV2beta1KMapEstimationResult: Result of the
  1120. // reidentifiability analysis. Note that these results are
  1121. // an
  1122. // estimation, not exact values.
  1123. type GooglePrivacyDlpV2beta1KMapEstimationResult struct {
  1124. // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity]
  1125. // do not overlap. If a value
  1126. // doesn't correspond to any such interval, the associated frequency
  1127. // is
  1128. // zero. For example, the following records:
  1129. // {min_anonymity: 1, max_anonymity: 1, frequency: 17}
  1130. // {min_anonymity: 2, max_anonymity: 3, frequency: 42}
  1131. // {min_anonymity: 5, max_anonymity: 10, frequency: 99}
  1132. // mean that there are no record with an estimated anonymity of 4, 5,
  1133. // or
  1134. // larger than 10.
  1135. KMapEstimationHistogram []*GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"`
  1136. // ForceSendFields is a list of field names (e.g.
  1137. // "KMapEstimationHistogram") to unconditionally include in API
  1138. // requests. By default, fields with empty values are omitted from API
  1139. // requests. However, any non-pointer, non-interface field appearing in
  1140. // ForceSendFields will be sent to the server regardless of whether the
  1141. // field is empty or not. This may be used to include empty fields in
  1142. // Patch requests.
  1143. ForceSendFields []string `json:"-"`
  1144. // NullFields is a list of field names (e.g. "KMapEstimationHistogram")
  1145. // to include in API requests with the JSON null value. By default,
  1146. // fields with empty values are omitted from API requests. However, any
  1147. // field with an empty value appearing in NullFields will be sent to the
  1148. // server as null. It is an error if a field in this list has a
  1149. // non-empty value. This may be used to include null fields in Patch
  1150. // requests.
  1151. NullFields []string `json:"-"`
  1152. }
  1153. func (s *GooglePrivacyDlpV2beta1KMapEstimationResult) MarshalJSON() ([]byte, error) {
  1154. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationResult
  1155. raw := NoMethod(*s)
  1156. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1157. }
  1158. // GooglePrivacyDlpV2beta1KindExpression: A representation of a
  1159. // Datastore kind.
  1160. type GooglePrivacyDlpV2beta1KindExpression struct {
  1161. // Name: The name of the kind.
  1162. Name string `json:"name,omitempty"`
  1163. // ForceSendFields is a list of field names (e.g. "Name") to
  1164. // unconditionally include in API requests. By default, fields with
  1165. // empty values are omitted from API requests. However, any non-pointer,
  1166. // non-interface field appearing in ForceSendFields will be sent to the
  1167. // server regardless of whether the field is empty or not. This may be
  1168. // used to include empty fields in Patch requests.
  1169. ForceSendFields []string `json:"-"`
  1170. // NullFields is a list of field names (e.g. "Name") to include in API
  1171. // requests with the JSON null value. By default, fields with empty
  1172. // values are omitted from API requests. However, any field with an
  1173. // empty value appearing in NullFields will be sent to the server as
  1174. // null. It is an error if a field in this list has a non-empty value.
  1175. // This may be used to include null fields in Patch requests.
  1176. NullFields []string `json:"-"`
  1177. }
  1178. func (s *GooglePrivacyDlpV2beta1KindExpression) MarshalJSON() ([]byte, error) {
  1179. type NoMethod GooglePrivacyDlpV2beta1KindExpression
  1180. raw := NoMethod(*s)
  1181. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1182. }
  1183. // GooglePrivacyDlpV2beta1LDiversityConfig: l-diversity metric, used for
  1184. // analysis of reidentification risk.
  1185. type GooglePrivacyDlpV2beta1LDiversityConfig struct {
  1186. // QuasiIds: Set of quasi-identifiers indicating how equivalence classes
  1187. // are
  1188. // defined for the l-diversity computation. When multiple fields
  1189. // are
  1190. // specified, they are considered a single composite key.
  1191. QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"`
  1192. // SensitiveAttribute: Sensitive field for computing the l-value.
  1193. SensitiveAttribute *GooglePrivacyDlpV2beta1FieldId `json:"sensitiveAttribute,omitempty"`
  1194. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  1195. // unconditionally include in API requests. By default, fields with
  1196. // empty values are omitted from API requests. However, any non-pointer,
  1197. // non-interface field appearing in ForceSendFields will be sent to the
  1198. // server regardless of whether the field is empty or not. This may be
  1199. // used to include empty fields in Patch requests.
  1200. ForceSendFields []string `json:"-"`
  1201. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  1202. // API requests with the JSON null value. By default, fields with empty
  1203. // values are omitted from API requests. However, any field with an
  1204. // empty value appearing in NullFields will be sent to the server as
  1205. // null. It is an error if a field in this list has a non-empty value.
  1206. // This may be used to include null fields in Patch requests.
  1207. NullFields []string `json:"-"`
  1208. }
  1209. func (s *GooglePrivacyDlpV2beta1LDiversityConfig) MarshalJSON() ([]byte, error) {
  1210. type NoMethod GooglePrivacyDlpV2beta1LDiversityConfig
  1211. raw := NoMethod(*s)
  1212. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1213. }
  1214. // GooglePrivacyDlpV2beta1LDiversityEquivalenceClass: The set of
  1215. // columns' values that share the same l-diversity value.
  1216. type GooglePrivacyDlpV2beta1LDiversityEquivalenceClass struct {
  1217. // EquivalenceClassSize: Size of the k-anonymity equivalence class.
  1218. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  1219. // NumDistinctSensitiveValues: Number of distinct sensitive values in
  1220. // this equivalence class.
  1221. NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"`
  1222. // QuasiIdsValues: Quasi-identifier values defining the k-anonymity
  1223. // equivalence
  1224. // class. The order is always the same as the original request.
  1225. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  1226. // TopSensitiveValues: Estimated frequencies of top sensitive values.
  1227. TopSensitiveValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"topSensitiveValues,omitempty"`
  1228. // ForceSendFields is a list of field names (e.g.
  1229. // "EquivalenceClassSize") to unconditionally include in API requests.
  1230. // By default, fields with empty values are omitted from API requests.
  1231. // However, any non-pointer, non-interface field appearing in
  1232. // ForceSendFields will be sent to the server regardless of whether the
  1233. // field is empty or not. This may be used to include empty fields in
  1234. // Patch requests.
  1235. ForceSendFields []string `json:"-"`
  1236. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  1237. // include in API requests with the JSON null value. By default, fields
  1238. // with empty values are omitted from API requests. However, any field
  1239. // with an empty value appearing in NullFields will be sent to the
  1240. // server as null. It is an error if a field in this list has a
  1241. // non-empty value. This may be used to include null fields in Patch
  1242. // requests.
  1243. NullFields []string `json:"-"`
  1244. }
  1245. func (s *GooglePrivacyDlpV2beta1LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) {
  1246. type NoMethod GooglePrivacyDlpV2beta1LDiversityEquivalenceClass
  1247. raw := NoMethod(*s)
  1248. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1249. }
  1250. // GooglePrivacyDlpV2beta1LDiversityHistogramBucket: Histogram bucket of
  1251. // sensitive value frequencies in the table.
  1252. type GooglePrivacyDlpV2beta1LDiversityHistogramBucket struct {
  1253. // BucketSize: Total number of records in this bucket.
  1254. BucketSize int64 `json:"bucketSize,omitempty,string"`
  1255. // BucketValues: Sample of equivalence classes in this bucket. The total
  1256. // number of
  1257. // classes returned per bucket is capped at 20.
  1258. BucketValues []*GooglePrivacyDlpV2beta1LDiversityEquivalenceClass `json:"bucketValues,omitempty"`
  1259. // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value
  1260. // frequencies of the equivalence
  1261. // classes in this bucket.
  1262. SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"`
  1263. // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value
  1264. // frequencies of the equivalence
  1265. // classes in this bucket.
  1266. SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"`
  1267. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  1268. // unconditionally include in API requests. By default, fields with
  1269. // empty values are omitted from API requests. However, any non-pointer,
  1270. // non-interface field appearing in ForceSendFields will be sent to the
  1271. // server regardless of whether the field is empty or not. This may be
  1272. // used to include empty fields in Patch requests.
  1273. ForceSendFields []string `json:"-"`
  1274. // NullFields is a list of field names (e.g. "BucketSize") to include in
  1275. // API requests with the JSON null value. By default, fields with empty
  1276. // values are omitted from API requests. However, any field with an
  1277. // empty value appearing in NullFields will be sent to the server as
  1278. // null. It is an error if a field in this list has a non-empty value.
  1279. // This may be used to include null fields in Patch requests.
  1280. NullFields []string `json:"-"`
  1281. }
  1282. func (s *GooglePrivacyDlpV2beta1LDiversityHistogramBucket) MarshalJSON() ([]byte, error) {
  1283. type NoMethod GooglePrivacyDlpV2beta1LDiversityHistogramBucket
  1284. raw := NoMethod(*s)
  1285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1286. }
  1287. // GooglePrivacyDlpV2beta1LDiversityResult: Result of the l-diversity
  1288. // computation.
  1289. type GooglePrivacyDlpV2beta1LDiversityResult struct {
  1290. // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity
  1291. // equivalence class sensitive value frequencies.
  1292. SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"`
  1293. // ForceSendFields is a list of field names (e.g.
  1294. // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include
  1295. // in API requests. By default, fields with empty values are omitted
  1296. // from API requests. However, any non-pointer, non-interface field
  1297. // appearing in ForceSendFields will be sent to the server regardless of
  1298. // whether the field is empty or not. This may be used to include empty
  1299. // fields in Patch requests.
  1300. ForceSendFields []string `json:"-"`
  1301. // NullFields is a list of field names (e.g.
  1302. // "SensitiveValueFrequencyHistogramBuckets") to include in API requests
  1303. // with the JSON null value. By default, fields with empty values are
  1304. // omitted from API requests. However, any field with an empty value
  1305. // appearing in NullFields will be sent to the server as null. It is an
  1306. // error if a field in this list has a non-empty value. This may be used
  1307. // to include null fields in Patch requests.
  1308. NullFields []string `json:"-"`
  1309. }
  1310. func (s *GooglePrivacyDlpV2beta1LDiversityResult) MarshalJSON() ([]byte, error) {
  1311. type NoMethod GooglePrivacyDlpV2beta1LDiversityResult
  1312. raw := NoMethod(*s)
  1313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1314. }
  1315. // GooglePrivacyDlpV2beta1NumericalStatsConfig: Compute numerical stats
  1316. // over an individual column, including
  1317. // min, max, and quantiles.
  1318. type GooglePrivacyDlpV2beta1NumericalStatsConfig struct {
  1319. // Field: Field to compute numerical stats on. Supported types
  1320. // are
  1321. // integer, float, date, datetime, timestamp, time.
  1322. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  1323. // ForceSendFields is a list of field names (e.g. "Field") to
  1324. // unconditionally include in API requests. By default, fields with
  1325. // empty values are omitted from API requests. However, any non-pointer,
  1326. // non-interface field appearing in ForceSendFields will be sent to the
  1327. // server regardless of whether the field is empty or not. This may be
  1328. // used to include empty fields in Patch requests.
  1329. ForceSendFields []string `json:"-"`
  1330. // NullFields is a list of field names (e.g. "Field") to include in API
  1331. // requests with the JSON null value. By default, fields with empty
  1332. // values are omitted from API requests. However, any field with an
  1333. // empty value appearing in NullFields will be sent to the server as
  1334. // null. It is an error if a field in this list has a non-empty value.
  1335. // This may be used to include null fields in Patch requests.
  1336. NullFields []string `json:"-"`
  1337. }
  1338. func (s *GooglePrivacyDlpV2beta1NumericalStatsConfig) MarshalJSON() ([]byte, error) {
  1339. type NoMethod GooglePrivacyDlpV2beta1NumericalStatsConfig
  1340. raw := NoMethod(*s)
  1341. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1342. }
  1343. // GooglePrivacyDlpV2beta1NumericalStatsResult: Result of the numerical
  1344. // stats computation.
  1345. type GooglePrivacyDlpV2beta1NumericalStatsResult struct {
  1346. // MaxValue: Maximum value appearing in the column.
  1347. MaxValue *GooglePrivacyDlpV2beta1Value `json:"maxValue,omitempty"`
  1348. // MinValue: Minimum value appearing in the column.
  1349. MinValue *GooglePrivacyDlpV2beta1Value `json:"minValue,omitempty"`
  1350. // QuantileValues: List of 99 values that partition the set of field
  1351. // values into 100 equal
  1352. // sized buckets.
  1353. QuantileValues []*GooglePrivacyDlpV2beta1Value `json:"quantileValues,omitempty"`
  1354. // ForceSendFields is a list of field names (e.g. "MaxValue") to
  1355. // unconditionally include in API requests. By default, fields with
  1356. // empty values are omitted from API requests. However, any non-pointer,
  1357. // non-interface field appearing in ForceSendFields will be sent to the
  1358. // server regardless of whether the field is empty or not. This may be
  1359. // used to include empty fields in Patch requests.
  1360. ForceSendFields []string `json:"-"`
  1361. // NullFields is a list of field names (e.g. "MaxValue") to include in
  1362. // API requests with the JSON null value. By default, fields with empty
  1363. // values are omitted from API requests. However, any field with an
  1364. // empty value appearing in NullFields will be sent to the server as
  1365. // null. It is an error if a field in this list has a non-empty value.
  1366. // This may be used to include null fields in Patch requests.
  1367. NullFields []string `json:"-"`
  1368. }
  1369. func (s *GooglePrivacyDlpV2beta1NumericalStatsResult) MarshalJSON() ([]byte, error) {
  1370. type NoMethod GooglePrivacyDlpV2beta1NumericalStatsResult
  1371. raw := NoMethod(*s)
  1372. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1373. }
  1374. // GooglePrivacyDlpV2beta1OutputStorageConfig: Cloud repository for
  1375. // storing output.
  1376. type GooglePrivacyDlpV2beta1OutputStorageConfig struct {
  1377. // StoragePath: The path to a Google Cloud Storage location to store
  1378. // output.
  1379. // The bucket must already exist and
  1380. // the Google APIs service account for DLP must have write permission
  1381. // to
  1382. // write to the given bucket.
  1383. // Results are split over multiple csv files with each file name
  1384. // matching
  1385. // the pattern "[operation_id]_[count].csv", for
  1386. // example
  1387. // `3094877188788974909_1.csv`. The `operation_id` matches
  1388. // the
  1389. // identifier for the Operation, and the `count` is a counter used
  1390. // for
  1391. // tracking the number of files written.
  1392. //
  1393. // The CSV file(s) contain the following columns regardless of storage
  1394. // type
  1395. // scanned:
  1396. // - id
  1397. // - info_type
  1398. // - likelihood
  1399. // - byte size of finding
  1400. // - quote
  1401. // - timestamp
  1402. //
  1403. // For Cloud Storage the next columns are:
  1404. //
  1405. // - file_path
  1406. // - start_offset
  1407. //
  1408. // For Cloud Datastore the next columns are:
  1409. //
  1410. // - project_id
  1411. // - namespace_id
  1412. // - path
  1413. // - column_name
  1414. // - offset
  1415. //
  1416. // For BigQuery the next columns are:
  1417. //
  1418. // - row_number
  1419. // - project_id
  1420. // - dataset_id
  1421. // - table_id
  1422. StoragePath *GooglePrivacyDlpV2beta1CloudStoragePath `json:"storagePath,omitempty"`
  1423. // Table: Store findings in a new table in the dataset.
  1424. Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"`
  1425. // ForceSendFields is a list of field names (e.g. "StoragePath") to
  1426. // unconditionally include in API requests. By default, fields with
  1427. // empty values are omitted from API requests. However, any non-pointer,
  1428. // non-interface field appearing in ForceSendFields will be sent to the
  1429. // server regardless of whether the field is empty or not. This may be
  1430. // used to include empty fields in Patch requests.
  1431. ForceSendFields []string `json:"-"`
  1432. // NullFields is a list of field names (e.g. "StoragePath") to include
  1433. // in API requests with the JSON null value. By default, fields with
  1434. // empty values are omitted from API requests. However, any field with
  1435. // an empty value appearing in NullFields will be sent to the server as
  1436. // null. It is an error if a field in this list has a non-empty value.
  1437. // This may be used to include null fields in Patch requests.
  1438. NullFields []string `json:"-"`
  1439. }
  1440. func (s *GooglePrivacyDlpV2beta1OutputStorageConfig) MarshalJSON() ([]byte, error) {
  1441. type NoMethod GooglePrivacyDlpV2beta1OutputStorageConfig
  1442. raw := NoMethod(*s)
  1443. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1444. }
  1445. // GooglePrivacyDlpV2beta1PartitionId: Datastore partition ID.
  1446. // A partition ID identifies a grouping of entities. The grouping is
  1447. // always
  1448. // by project and namespace, however the namespace ID may be empty.
  1449. //
  1450. // A partition ID contains several dimensions:
  1451. // project ID and namespace ID.
  1452. type GooglePrivacyDlpV2beta1PartitionId struct {
  1453. // NamespaceId: If not empty, the ID of the namespace to which the
  1454. // entities belong.
  1455. NamespaceId string `json:"namespaceId,omitempty"`
  1456. // ProjectId: The ID of the project to which the entities belong.
  1457. ProjectId string `json:"projectId,omitempty"`
  1458. // ForceSendFields is a list of field names (e.g. "NamespaceId") to
  1459. // unconditionally include in API requests. By default, fields with
  1460. // empty values are omitted from API requests. However, any non-pointer,
  1461. // non-interface field appearing in ForceSendFields will be sent to the
  1462. // server regardless of whether the field is empty or not. This may be
  1463. // used to include empty fields in Patch requests.
  1464. ForceSendFields []string `json:"-"`
  1465. // NullFields is a list of field names (e.g. "NamespaceId") to include
  1466. // in API requests with the JSON null value. By default, fields with
  1467. // empty values are omitted from API requests. However, any field with
  1468. // an empty value appearing in NullFields will be sent to the server as
  1469. // null. It is an error if a field in this list has a non-empty value.
  1470. // This may be used to include null fields in Patch requests.
  1471. NullFields []string `json:"-"`
  1472. }
  1473. func (s *GooglePrivacyDlpV2beta1PartitionId) MarshalJSON() ([]byte, error) {
  1474. type NoMethod GooglePrivacyDlpV2beta1PartitionId
  1475. raw := NoMethod(*s)
  1476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1477. }
  1478. // GooglePrivacyDlpV2beta1PrivacyMetric: Privacy metric to compute for
  1479. // reidentification risk analysis.
  1480. type GooglePrivacyDlpV2beta1PrivacyMetric struct {
  1481. CategoricalStatsConfig *GooglePrivacyDlpV2beta1CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"`
  1482. KAnonymityConfig *GooglePrivacyDlpV2beta1KAnonymityConfig `json:"kAnonymityConfig,omitempty"`
  1483. KMapEstimationConfig *GooglePrivacyDlpV2beta1KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"`
  1484. LDiversityConfig *GooglePrivacyDlpV2beta1LDiversityConfig `json:"lDiversityConfig,omitempty"`
  1485. NumericalStatsConfig *GooglePrivacyDlpV2beta1NumericalStatsConfig `json:"numericalStatsConfig,omitempty"`
  1486. // ForceSendFields is a list of field names (e.g.
  1487. // "CategoricalStatsConfig") to unconditionally include in API requests.
  1488. // By default, fields with empty values are omitted from API requests.
  1489. // However, any non-pointer, non-interface field appearing in
  1490. // ForceSendFields will be sent to the server regardless of whether the
  1491. // field is empty or not. This may be used to include empty fields in
  1492. // Patch requests.
  1493. ForceSendFields []string `json:"-"`
  1494. // NullFields is a list of field names (e.g. "CategoricalStatsConfig")
  1495. // to include in API requests with the JSON null value. By default,
  1496. // fields with empty values are omitted from API requests. However, any
  1497. // field with an empty value appearing in NullFields will be sent to the
  1498. // server as null. It is an error if a field in this list has a
  1499. // non-empty value. This may be used to include null fields in Patch
  1500. // requests.
  1501. NullFields []string `json:"-"`
  1502. }
  1503. func (s *GooglePrivacyDlpV2beta1PrivacyMetric) MarshalJSON() ([]byte, error) {
  1504. type NoMethod GooglePrivacyDlpV2beta1PrivacyMetric
  1505. raw := NoMethod(*s)
  1506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1507. }
  1508. // GooglePrivacyDlpV2beta1Projection: A representation of a Datastore
  1509. // property in a projection.
  1510. type GooglePrivacyDlpV2beta1Projection struct {
  1511. // Property: The property to project.
  1512. Property *GooglePrivacyDlpV2beta1PropertyReference `json:"property,omitempty"`
  1513. // ForceSendFields is a list of field names (e.g. "Property") to
  1514. // unconditionally include in API requests. By default, fields with
  1515. // empty values are omitted from API requests. However, any non-pointer,
  1516. // non-interface field appearing in ForceSendFields will be sent to the
  1517. // server regardless of whether the field is empty or not. This may be
  1518. // used to include empty fields in Patch requests.
  1519. ForceSendFields []string `json:"-"`
  1520. // NullFields is a list of field names (e.g. "Property") to include in
  1521. // API requests with the JSON null value. By default, fields with empty
  1522. // values are omitted from API requests. However, any field with an
  1523. // empty value appearing in NullFields will be sent to the server as
  1524. // null. It is an error if a field in this list has a non-empty value.
  1525. // This may be used to include null fields in Patch requests.
  1526. NullFields []string `json:"-"`
  1527. }
  1528. func (s *GooglePrivacyDlpV2beta1Projection) MarshalJSON() ([]byte, error) {
  1529. type NoMethod GooglePrivacyDlpV2beta1Projection
  1530. raw := NoMethod(*s)
  1531. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1532. }
  1533. // GooglePrivacyDlpV2beta1PropertyReference: A reference to a property
  1534. // relative to the Datastore kind expressions.
  1535. type GooglePrivacyDlpV2beta1PropertyReference struct {
  1536. // Name: The name of the property.
  1537. // If name includes "."s, it may be interpreted as a property name path.
  1538. Name string `json:"name,omitempty"`
  1539. // ForceSendFields is a list of field names (e.g. "Name") to
  1540. // unconditionally include in API requests. By default, fields with
  1541. // empty values are omitted from API requests. However, any non-pointer,
  1542. // non-interface field appearing in ForceSendFields will be sent to the
  1543. // server regardless of whether the field is empty or not. This may be
  1544. // used to include empty fields in Patch requests.
  1545. ForceSendFields []string `json:"-"`
  1546. // NullFields is a list of field names (e.g. "Name") to include in API
  1547. // requests with the JSON null value. By default, fields with empty
  1548. // values are omitted from API requests. However, any field with an
  1549. // empty value appearing in NullFields will be sent to the server as
  1550. // null. It is an error if a field in this list has a non-empty value.
  1551. // This may be used to include null fields in Patch requests.
  1552. NullFields []string `json:"-"`
  1553. }
  1554. func (s *GooglePrivacyDlpV2beta1PropertyReference) MarshalJSON() ([]byte, error) {
  1555. type NoMethod GooglePrivacyDlpV2beta1PropertyReference
  1556. raw := NoMethod(*s)
  1557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1558. }
  1559. // GooglePrivacyDlpV2beta1QuasiIdField: A quasi-identifier column has a
  1560. // custom_tag, used to know which column
  1561. // in the data corresponds to which column in the statistical model.
  1562. type GooglePrivacyDlpV2beta1QuasiIdField struct {
  1563. CustomTag string `json:"customTag,omitempty"`
  1564. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  1565. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  1566. // unconditionally include in API requests. By default, fields with
  1567. // empty values are omitted from API requests. However, any non-pointer,
  1568. // non-interface field appearing in ForceSendFields will be sent to the
  1569. // server regardless of whether the field is empty or not. This may be
  1570. // used to include empty fields in Patch requests.
  1571. ForceSendFields []string `json:"-"`
  1572. // NullFields is a list of field names (e.g. "CustomTag") to include in
  1573. // API requests with the JSON null value. By default, fields with empty
  1574. // values are omitted from API requests. However, any field with an
  1575. // empty value appearing in NullFields will be sent to the server as
  1576. // null. It is an error if a field in this list has a non-empty value.
  1577. // This may be used to include null fields in Patch requests.
  1578. NullFields []string `json:"-"`
  1579. }
  1580. func (s *GooglePrivacyDlpV2beta1QuasiIdField) MarshalJSON() ([]byte, error) {
  1581. type NoMethod GooglePrivacyDlpV2beta1QuasiIdField
  1582. raw := NoMethod(*s)
  1583. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1584. }
  1585. // GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata: Metadata
  1586. // returned within
  1587. // the
  1588. // [`riskAnalysis.operations.get`](/dlp/docs/reference/rest/v2beta1/r
  1589. // iskAnalysis.operations/get)
  1590. // for risk analysis.
  1591. type GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata struct {
  1592. // CreateTime: The time which this request was started.
  1593. CreateTime string `json:"createTime,omitempty"`
  1594. // RequestedPrivacyMetric: Privacy metric to compute.
  1595. RequestedPrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"requestedPrivacyMetric,omitempty"`
  1596. // RequestedSourceTable: Input dataset to compute metrics over.
  1597. RequestedSourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"requestedSourceTable,omitempty"`
  1598. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  1599. // unconditionally include in API requests. By default, fields with
  1600. // empty values are omitted from API requests. However, any non-pointer,
  1601. // non-interface field appearing in ForceSendFields will be sent to the
  1602. // server regardless of whether the field is empty or not. This may be
  1603. // used to include empty fields in Patch requests.
  1604. ForceSendFields []string `json:"-"`
  1605. // NullFields is a list of field names (e.g. "CreateTime") to include in
  1606. // API requests with the JSON null value. By default, fields with empty
  1607. // values are omitted from API requests. However, any field with an
  1608. // empty value appearing in NullFields will be sent to the server as
  1609. // null. It is an error if a field in this list has a non-empty value.
  1610. // This may be used to include null fields in Patch requests.
  1611. NullFields []string `json:"-"`
  1612. }
  1613. func (s *GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata) MarshalJSON() ([]byte, error) {
  1614. type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata
  1615. raw := NoMethod(*s)
  1616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1617. }
  1618. // GooglePrivacyDlpV2beta1RiskAnalysisOperationResult: Result of a risk
  1619. // analysis
  1620. // [`Operation`](/dlp/docs/reference/rest/v2beta1/inspect.operat
  1621. // ions)
  1622. // request.
  1623. type GooglePrivacyDlpV2beta1RiskAnalysisOperationResult struct {
  1624. CategoricalStatsResult *GooglePrivacyDlpV2beta1CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
  1625. KAnonymityResult *GooglePrivacyDlpV2beta1KAnonymityResult `json:"kAnonymityResult,omitempty"`
  1626. KMapEstimationResult *GooglePrivacyDlpV2beta1KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
  1627. LDiversityResult *GooglePrivacyDlpV2beta1LDiversityResult `json:"lDiversityResult,omitempty"`
  1628. NumericalStatsResult *GooglePrivacyDlpV2beta1NumericalStatsResult `json:"numericalStatsResult,omitempty"`
  1629. // ForceSendFields is a list of field names (e.g.
  1630. // "CategoricalStatsResult") to unconditionally include in API requests.
  1631. // By default, fields with empty values are omitted from API requests.
  1632. // However, any non-pointer, non-interface field appearing in
  1633. // ForceSendFields will be sent to the server regardless of whether the
  1634. // field is empty or not. This may be used to include empty fields in
  1635. // Patch requests.
  1636. ForceSendFields []string `json:"-"`
  1637. // NullFields is a list of field names (e.g. "CategoricalStatsResult")
  1638. // to include in API requests with the JSON null value. By default,
  1639. // fields with empty values are omitted from API requests. However, any
  1640. // field with an empty value appearing in NullFields will be sent to the
  1641. // server as null. It is an error if a field in this list has a
  1642. // non-empty value. This may be used to include null fields in Patch
  1643. // requests.
  1644. NullFields []string `json:"-"`
  1645. }
  1646. func (s *GooglePrivacyDlpV2beta1RiskAnalysisOperationResult) MarshalJSON() ([]byte, error) {
  1647. type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationResult
  1648. raw := NoMethod(*s)
  1649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1650. }
  1651. // GooglePrivacyDlpV2beta1StorageConfig: Shared message indicating Cloud
  1652. // storage type.
  1653. type GooglePrivacyDlpV2beta1StorageConfig struct {
  1654. // BigQueryOptions: BigQuery options specification.
  1655. BigQueryOptions *GooglePrivacyDlpV2beta1BigQueryOptions `json:"bigQueryOptions,omitempty"`
  1656. // CloudStorageOptions: Google Cloud Storage options specification.
  1657. CloudStorageOptions *GooglePrivacyDlpV2beta1CloudStorageOptions `json:"cloudStorageOptions,omitempty"`
  1658. // DatastoreOptions: Google Cloud Datastore options specification.
  1659. DatastoreOptions *GooglePrivacyDlpV2beta1DatastoreOptions `json:"datastoreOptions,omitempty"`
  1660. // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to
  1661. // unconditionally include in API requests. By default, fields with
  1662. // empty values are omitted from API requests. However, any non-pointer,
  1663. // non-interface field appearing in ForceSendFields will be sent to the
  1664. // server regardless of whether the field is empty or not. This may be
  1665. // used to include empty fields in Patch requests.
  1666. ForceSendFields []string `json:"-"`
  1667. // NullFields is a list of field names (e.g. "BigQueryOptions") to
  1668. // include in API requests with the JSON null value. By default, fields
  1669. // with empty values are omitted from API requests. However, any field
  1670. // with an empty value appearing in NullFields will be sent to the
  1671. // server as null. It is an error if a field in this list has a
  1672. // non-empty value. This may be used to include null fields in Patch
  1673. // requests.
  1674. NullFields []string `json:"-"`
  1675. }
  1676. func (s *GooglePrivacyDlpV2beta1StorageConfig) MarshalJSON() ([]byte, error) {
  1677. type NoMethod GooglePrivacyDlpV2beta1StorageConfig
  1678. raw := NoMethod(*s)
  1679. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1680. }
  1681. // GooglePrivacyDlpV2beta1SurrogateType: Message for detecting output
  1682. // from deidentification transformations
  1683. // such
  1684. // as
  1685. // [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont
  1686. // ent/deidentify#CryptoReplaceFfxFpeConfig).
  1687. // These types of transformations are
  1688. // those that perform pseudonymization, thereby producing a "surrogate"
  1689. // as
  1690. // output. This should be used in conjunction with a field on
  1691. // the
  1692. // transformation such as `surrogate_info_type`. This custom info type
  1693. // does
  1694. // not support the use of `detection_rules`.
  1695. type GooglePrivacyDlpV2beta1SurrogateType struct {
  1696. }
  1697. // GooglePrivacyDlpV2beta1TaggedField: A column with a semantic tag
  1698. // attached.
  1699. type GooglePrivacyDlpV2beta1TaggedField struct {
  1700. // CustomTag: A column can be tagged with a custom tag. In this case,
  1701. // the user must
  1702. // indicate an auxiliary table that contains statistical information
  1703. // on
  1704. // the possible values of this column (below).
  1705. CustomTag string `json:"customTag,omitempty"`
  1706. // Field: Identifies the column. [required]
  1707. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  1708. // Inferred: If no semantic tag is indicated, we infer the statistical
  1709. // model from
  1710. // the distribution of values in the input data
  1711. Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"`
  1712. // InfoType: A column can be tagged with a InfoType to use the relevant
  1713. // public
  1714. // dataset as a statistical model of population, if available.
  1715. // We
  1716. // currently support US ZIP codes, region codes, ages and genders.
  1717. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1718. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  1719. // unconditionally include in API requests. By default, fields with
  1720. // empty values are omitted from API requests. However, any non-pointer,
  1721. // non-interface field appearing in ForceSendFields will be sent to the
  1722. // server regardless of whether the field is empty or not. This may be
  1723. // used to include empty fields in Patch requests.
  1724. ForceSendFields []string `json:"-"`
  1725. // NullFields is a list of field names (e.g. "CustomTag") to include in
  1726. // API requests with the JSON null value. By default, fields with empty
  1727. // values are omitted from API requests. However, any field with an
  1728. // empty value appearing in NullFields will be sent to the server as
  1729. // null. It is an error if a field in this list has a non-empty value.
  1730. // This may be used to include null fields in Patch requests.
  1731. NullFields []string `json:"-"`
  1732. }
  1733. func (s *GooglePrivacyDlpV2beta1TaggedField) MarshalJSON() ([]byte, error) {
  1734. type NoMethod GooglePrivacyDlpV2beta1TaggedField
  1735. raw := NoMethod(*s)
  1736. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1737. }
  1738. // GooglePrivacyDlpV2beta1Value: Set of primitive values supported by
  1739. // the system.
  1740. // Note that for the purposes of inspection or transformation, the
  1741. // number
  1742. // of bytes considered to comprise a 'Value' is based on its
  1743. // representation
  1744. // as a UTF-8 encoded string. For example, if 'integer_value' is set
  1745. // to
  1746. // 123456789, the number of bytes would be counted as 9, even though
  1747. // an
  1748. // int64 only holds up to 8 bytes of data.
  1749. type GooglePrivacyDlpV2beta1Value struct {
  1750. BooleanValue bool `json:"booleanValue,omitempty"`
  1751. DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
  1752. FloatValue float64 `json:"floatValue,omitempty"`
  1753. IntegerValue int64 `json:"integerValue,omitempty,string"`
  1754. StringValue string `json:"stringValue,omitempty"`
  1755. TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"`
  1756. TimestampValue string `json:"timestampValue,omitempty"`
  1757. // ForceSendFields is a list of field names (e.g. "BooleanValue") to
  1758. // unconditionally include in API requests. By default, fields with
  1759. // empty values are omitted from API requests. However, any non-pointer,
  1760. // non-interface field appearing in ForceSendFields will be sent to the
  1761. // server regardless of whether the field is empty or not. This may be
  1762. // used to include empty fields in Patch requests.
  1763. ForceSendFields []string `json:"-"`
  1764. // NullFields is a list of field names (e.g. "BooleanValue") to include
  1765. // in API requests with the JSON null value. By default, fields with
  1766. // empty values are omitted from API requests. However, any field with
  1767. // an empty value appearing in NullFields will be sent to the server as
  1768. // null. It is an error if a field in this list has a non-empty value.
  1769. // This may be used to include null fields in Patch requests.
  1770. NullFields []string `json:"-"`
  1771. }
  1772. func (s *GooglePrivacyDlpV2beta1Value) MarshalJSON() ([]byte, error) {
  1773. type NoMethod GooglePrivacyDlpV2beta1Value
  1774. raw := NoMethod(*s)
  1775. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1776. }
  1777. func (s *GooglePrivacyDlpV2beta1Value) UnmarshalJSON(data []byte) error {
  1778. type NoMethod GooglePrivacyDlpV2beta1Value
  1779. var s1 struct {
  1780. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  1781. *NoMethod
  1782. }
  1783. s1.NoMethod = (*NoMethod)(s)
  1784. if err := json.Unmarshal(data, &s1); err != nil {
  1785. return err
  1786. }
  1787. s.FloatValue = float64(s1.FloatValue)
  1788. return nil
  1789. }
  1790. // GooglePrivacyDlpV2beta1ValueFrequency: A value of a field, including
  1791. // its frequency.
  1792. type GooglePrivacyDlpV2beta1ValueFrequency struct {
  1793. // Count: How many times the value is contained in the field.
  1794. Count int64 `json:"count,omitempty,string"`
  1795. // Value: A value contained in the field in question.
  1796. Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"`
  1797. // ForceSendFields is a list of field names (e.g. "Count") to
  1798. // unconditionally include in API requests. By default, fields with
  1799. // empty values are omitted from API requests. However, any non-pointer,
  1800. // non-interface field appearing in ForceSendFields will be sent to the
  1801. // server regardless of whether the field is empty or not. This may be
  1802. // used to include empty fields in Patch requests.
  1803. ForceSendFields []string `json:"-"`
  1804. // NullFields is a list of field names (e.g. "Count") to include in API
  1805. // requests with the JSON null value. By default, fields with empty
  1806. // values are omitted from API requests. However, any field with an
  1807. // empty value appearing in NullFields will be sent to the server as
  1808. // null. It is an error if a field in this list has a non-empty value.
  1809. // This may be used to include null fields in Patch requests.
  1810. NullFields []string `json:"-"`
  1811. }
  1812. func (s *GooglePrivacyDlpV2beta1ValueFrequency) MarshalJSON() ([]byte, error) {
  1813. type NoMethod GooglePrivacyDlpV2beta1ValueFrequency
  1814. raw := NoMethod(*s)
  1815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1816. }
  1817. // GooglePrivacyDlpV2beta1WordList: Message defining a list of words or
  1818. // phrases to search for in the data.
  1819. type GooglePrivacyDlpV2beta1WordList struct {
  1820. // Words: Words or phrases defining the dictionary. The dictionary must
  1821. // contain
  1822. // at least one phrase and every phrase must contain at least 2
  1823. // characters
  1824. // that are letters or digits. [required]
  1825. Words []string `json:"words,omitempty"`
  1826. // ForceSendFields is a list of field names (e.g. "Words") to
  1827. // unconditionally include in API requests. By default, fields with
  1828. // empty values are omitted from API requests. However, any non-pointer,
  1829. // non-interface field appearing in ForceSendFields will be sent to the
  1830. // server regardless of whether the field is empty or not. This may be
  1831. // used to include empty fields in Patch requests.
  1832. ForceSendFields []string `json:"-"`
  1833. // NullFields is a list of field names (e.g. "Words") to include in API
  1834. // requests with the JSON null value. By default, fields with empty
  1835. // values are omitted from API requests. However, any field with an
  1836. // empty value appearing in NullFields will be sent to the server as
  1837. // null. It is an error if a field in this list has a non-empty value.
  1838. // This may be used to include null fields in Patch requests.
  1839. NullFields []string `json:"-"`
  1840. }
  1841. func (s *GooglePrivacyDlpV2beta1WordList) MarshalJSON() ([]byte, error) {
  1842. type NoMethod GooglePrivacyDlpV2beta1WordList
  1843. raw := NoMethod(*s)
  1844. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1845. }
  1846. // GooglePrivacyDlpV2beta2Action: A task to execute on the completion of
  1847. // a job.
  1848. type GooglePrivacyDlpV2beta2Action struct {
  1849. // PubSub: Publish a notification to a pubsub topic.
  1850. PubSub *GooglePrivacyDlpV2beta2PublishToPubSub `json:"pubSub,omitempty"`
  1851. // SaveFindings: Save resulting findings in a provided location.
  1852. SaveFindings *GooglePrivacyDlpV2beta2SaveFindings `json:"saveFindings,omitempty"`
  1853. // ForceSendFields is a list of field names (e.g. "PubSub") to
  1854. // unconditionally include in API requests. By default, fields with
  1855. // empty values are omitted from API requests. However, any non-pointer,
  1856. // non-interface field appearing in ForceSendFields will be sent to the
  1857. // server regardless of whether the field is empty or not. This may be
  1858. // used to include empty fields in Patch requests.
  1859. ForceSendFields []string `json:"-"`
  1860. // NullFields is a list of field names (e.g. "PubSub") to include in API
  1861. // requests with the JSON null value. By default, fields with empty
  1862. // values are omitted from API requests. However, any field with an
  1863. // empty value appearing in NullFields will be sent to the server as
  1864. // null. It is an error if a field in this list has a non-empty value.
  1865. // This may be used to include null fields in Patch requests.
  1866. NullFields []string `json:"-"`
  1867. }
  1868. func (s *GooglePrivacyDlpV2beta2Action) MarshalJSON() ([]byte, error) {
  1869. type NoMethod GooglePrivacyDlpV2beta2Action
  1870. raw := NoMethod(*s)
  1871. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1872. }
  1873. // GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails: Result of a risk
  1874. // analysis operation request.
  1875. type GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails struct {
  1876. CategoricalStatsResult *GooglePrivacyDlpV2beta2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
  1877. KAnonymityResult *GooglePrivacyDlpV2beta2KAnonymityResult `json:"kAnonymityResult,omitempty"`
  1878. KMapEstimationResult *GooglePrivacyDlpV2beta2KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
  1879. LDiversityResult *GooglePrivacyDlpV2beta2LDiversityResult `json:"lDiversityResult,omitempty"`
  1880. NumericalStatsResult *GooglePrivacyDlpV2beta2NumericalStatsResult `json:"numericalStatsResult,omitempty"`
  1881. // RequestedPrivacyMetric: Privacy metric to compute.
  1882. RequestedPrivacyMetric *GooglePrivacyDlpV2beta2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"`
  1883. // RequestedSourceTable: Input dataset to compute metrics over.
  1884. RequestedSourceTable *GooglePrivacyDlpV2beta2BigQueryTable `json:"requestedSourceTable,omitempty"`
  1885. // ForceSendFields is a list of field names (e.g.
  1886. // "CategoricalStatsResult") to unconditionally include in API requests.
  1887. // By default, fields with empty values are omitted from API requests.
  1888. // However, any non-pointer, non-interface field appearing in
  1889. // ForceSendFields will be sent to the server regardless of whether the
  1890. // field is empty or not. This may be used to include empty fields in
  1891. // Patch requests.
  1892. ForceSendFields []string `json:"-"`
  1893. // NullFields is a list of field names (e.g. "CategoricalStatsResult")
  1894. // to include in API requests with the JSON null value. By default,
  1895. // fields with empty values are omitted from API requests. However, any
  1896. // field with an empty value appearing in NullFields will be sent to the
  1897. // server as null. It is an error if a field in this list has a
  1898. // non-empty value. This may be used to include null fields in Patch
  1899. // requests.
  1900. NullFields []string `json:"-"`
  1901. }
  1902. func (s *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) {
  1903. type NoMethod GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails
  1904. raw := NoMethod(*s)
  1905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1906. }
  1907. // GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest: Request for
  1908. // creating a risk analysis DlpJob.
  1909. type GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest struct {
  1910. // JobConfig: Configuration for this risk analysis job.
  1911. JobConfig *GooglePrivacyDlpV2beta2RiskAnalysisJobConfig `json:"jobConfig,omitempty"`
  1912. // JobId: Optional job ID to use for the created job. If not provided, a
  1913. // job ID will
  1914. // automatically be generated. Must be unique within the project. The
  1915. // job ID
  1916. // can contain uppercase and lowercase letters, numbers, and hyphens;
  1917. // that is,
  1918. // it must match the regular expression: `[a-zA-Z\\d-]+`. The maximum
  1919. // length
  1920. // is 100 characters. Can be empty to allow the system to generate one.
  1921. JobId string `json:"jobId,omitempty"`
  1922. // ForceSendFields is a list of field names (e.g. "JobConfig") to
  1923. // unconditionally include in API requests. By default, fields with
  1924. // empty values are omitted from API requests. However, any non-pointer,
  1925. // non-interface field appearing in ForceSendFields will be sent to the
  1926. // server regardless of whether the field is empty or not. This may be
  1927. // used to include empty fields in Patch requests.
  1928. ForceSendFields []string `json:"-"`
  1929. // NullFields is a list of field names (e.g. "JobConfig") to include in
  1930. // API requests with the JSON null value. By default, fields with empty
  1931. // values are omitted from API requests. However, any field with an
  1932. // empty value appearing in NullFields will be sent to the server as
  1933. // null. It is an error if a field in this list has a non-empty value.
  1934. // This may be used to include null fields in Patch requests.
  1935. NullFields []string `json:"-"`
  1936. }
  1937. func (s *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest) MarshalJSON() ([]byte, error) {
  1938. type NoMethod GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest
  1939. raw := NoMethod(*s)
  1940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1941. }
  1942. // GooglePrivacyDlpV2beta2AuxiliaryTable: An auxiliary table contains
  1943. // statistical information on the relative
  1944. // frequency of different quasi-identifiers values. It has one or
  1945. // several
  1946. // quasi-identifiers columns, and one column that indicates the
  1947. // relative
  1948. // frequency of each quasi-identifier tuple.
  1949. // If a tuple is present in the data but not in the auxiliary table,
  1950. // the
  1951. // corresponding relative frequency is assumed to be zero (and thus,
  1952. // the
  1953. // tuple is highly reidentifiable).
  1954. type GooglePrivacyDlpV2beta2AuxiliaryTable struct {
  1955. // QuasiIds: Quasi-identifier columns. [required]
  1956. QuasiIds []*GooglePrivacyDlpV2beta2QuasiIdField `json:"quasiIds,omitempty"`
  1957. // RelativeFrequency: The relative frequency column must contain a
  1958. // floating-point number
  1959. // between 0 and 1 (inclusive). Null values are assumed to be
  1960. // zero.
  1961. // [required]
  1962. RelativeFrequency *GooglePrivacyDlpV2beta2FieldId `json:"relativeFrequency,omitempty"`
  1963. // Table: Auxiliary table location. [required]
  1964. Table *GooglePrivacyDlpV2beta2BigQueryTable `json:"table,omitempty"`
  1965. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  1966. // unconditionally include in API requests. By default, fields with
  1967. // empty values are omitted from API requests. However, any non-pointer,
  1968. // non-interface field appearing in ForceSendFields will be sent to the
  1969. // server regardless of whether the field is empty or not. This may be
  1970. // used to include empty fields in Patch requests.
  1971. ForceSendFields []string `json:"-"`
  1972. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  1973. // API requests with the JSON null value. By default, fields with empty
  1974. // values are omitted from API requests. However, any field with an
  1975. // empty value appearing in NullFields will be sent to the server as
  1976. // null. It is an error if a field in this list has a non-empty value.
  1977. // This may be used to include null fields in Patch requests.
  1978. NullFields []string `json:"-"`
  1979. }
  1980. func (s *GooglePrivacyDlpV2beta2AuxiliaryTable) MarshalJSON() ([]byte, error) {
  1981. type NoMethod GooglePrivacyDlpV2beta2AuxiliaryTable
  1982. raw := NoMethod(*s)
  1983. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1984. }
  1985. // GooglePrivacyDlpV2beta2BigQueryKey: Row key for identifying a record
  1986. // in BigQuery table.
  1987. type GooglePrivacyDlpV2beta2BigQueryKey struct {
  1988. // RowNumber: Absolute number of the row from the beginning of the table
  1989. // at the time
  1990. // of scanning.
  1991. RowNumber int64 `json:"rowNumber,omitempty,string"`
  1992. // TableReference: Complete BigQuery table reference.
  1993. TableReference *GooglePrivacyDlpV2beta2BigQueryTable `json:"tableReference,omitempty"`
  1994. // ForceSendFields is a list of field names (e.g. "RowNumber") to
  1995. // unconditionally include in API requests. By default, fields with
  1996. // empty values are omitted from API requests. However, any non-pointer,
  1997. // non-interface field appearing in ForceSendFields will be sent to the
  1998. // server regardless of whether the field is empty or not. This may be
  1999. // used to include empty fields in Patch requests.
  2000. ForceSendFields []string `json:"-"`
  2001. // NullFields is a list of field names (e.g. "RowNumber") to include in
  2002. // API requests with the JSON null value. By default, fields with empty
  2003. // values are omitted from API requests. However, any field with an
  2004. // empty value appearing in NullFields will be sent to the server as
  2005. // null. It is an error if a field in this list has a non-empty value.
  2006. // This may be used to include null fields in Patch requests.
  2007. NullFields []string `json:"-"`
  2008. }
  2009. func (s *GooglePrivacyDlpV2beta2BigQueryKey) MarshalJSON() ([]byte, error) {
  2010. type NoMethod GooglePrivacyDlpV2beta2BigQueryKey
  2011. raw := NoMethod(*s)
  2012. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2013. }
  2014. // GooglePrivacyDlpV2beta2BigQueryOptions: Options defining BigQuery
  2015. // table and row identifiers.
  2016. type GooglePrivacyDlpV2beta2BigQueryOptions struct {
  2017. // IdentifyingFields: References to fields uniquely identifying rows
  2018. // within the table.
  2019. // Nested fields in the format, like `person.birthdate.year`, are
  2020. // allowed.
  2021. IdentifyingFields []*GooglePrivacyDlpV2beta2FieldId `json:"identifyingFields,omitempty"`
  2022. // TableReference: Complete BigQuery table reference.
  2023. TableReference *GooglePrivacyDlpV2beta2BigQueryTable `json:"tableReference,omitempty"`
  2024. // ForceSendFields is a list of field names (e.g. "IdentifyingFields")
  2025. // to unconditionally include in API requests. By default, fields with
  2026. // empty values are omitted from API requests. However, any non-pointer,
  2027. // non-interface field appearing in ForceSendFields will be sent to the
  2028. // server regardless of whether the field is empty or not. This may be
  2029. // used to include empty fields in Patch requests.
  2030. ForceSendFields []string `json:"-"`
  2031. // NullFields is a list of field names (e.g. "IdentifyingFields") to
  2032. // include in API requests with the JSON null value. By default, fields
  2033. // with empty values are omitted from API requests. However, any field
  2034. // with an empty value appearing in NullFields will be sent to the
  2035. // server as null. It is an error if a field in this list has a
  2036. // non-empty value. This may be used to include null fields in Patch
  2037. // requests.
  2038. NullFields []string `json:"-"`
  2039. }
  2040. func (s *GooglePrivacyDlpV2beta2BigQueryOptions) MarshalJSON() ([]byte, error) {
  2041. type NoMethod GooglePrivacyDlpV2beta2BigQueryOptions
  2042. raw := NoMethod(*s)
  2043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2044. }
  2045. // GooglePrivacyDlpV2beta2BigQueryTable: Message defining the location
  2046. // of a BigQuery table. A table is uniquely
  2047. // identified by its project_id, dataset_id, and table_name. Within a
  2048. // query
  2049. // a table is often referenced with a string in the format
  2050. // of:
  2051. // `<project_id>:<dataset_id>.<table_id>`
  2052. // or
  2053. // `<project_id>.<dataset_id>.<table_id>`.
  2054. type GooglePrivacyDlpV2beta2BigQueryTable struct {
  2055. // DatasetId: Dataset ID of the table.
  2056. DatasetId string `json:"datasetId,omitempty"`
  2057. // ProjectId: The Google Cloud Platform project ID of the project
  2058. // containing the table.
  2059. // If omitted, project ID is inferred from the API call.
  2060. ProjectId string `json:"projectId,omitempty"`
  2061. // TableId: Name of the table.
  2062. TableId string `json:"tableId,omitempty"`
  2063. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  2064. // unconditionally include in API requests. By default, fields with
  2065. // empty values are omitted from API requests. However, any non-pointer,
  2066. // non-interface field appearing in ForceSendFields will be sent to the
  2067. // server regardless of whether the field is empty or not. This may be
  2068. // used to include empty fields in Patch requests.
  2069. ForceSendFields []string `json:"-"`
  2070. // NullFields is a list of field names (e.g. "DatasetId") to include in
  2071. // API requests with the JSON null value. By default, fields with empty
  2072. // values are omitted from API requests. However, any field with an
  2073. // empty value appearing in NullFields will be sent to the server as
  2074. // null. It is an error if a field in this list has a non-empty value.
  2075. // This may be used to include null fields in Patch requests.
  2076. NullFields []string `json:"-"`
  2077. }
  2078. func (s *GooglePrivacyDlpV2beta2BigQueryTable) MarshalJSON() ([]byte, error) {
  2079. type NoMethod GooglePrivacyDlpV2beta2BigQueryTable
  2080. raw := NoMethod(*s)
  2081. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2082. }
  2083. // GooglePrivacyDlpV2beta2Bucket: Bucket is represented as a range,
  2084. // along with replacement values.
  2085. type GooglePrivacyDlpV2beta2Bucket struct {
  2086. // Max: Upper bound of the range, exclusive; type must match min.
  2087. Max *GooglePrivacyDlpV2beta2Value `json:"max,omitempty"`
  2088. // Min: Lower bound of the range, inclusive. Type should be the same as
  2089. // max if
  2090. // used.
  2091. Min *GooglePrivacyDlpV2beta2Value `json:"min,omitempty"`
  2092. // ReplacementValue: Replacement value for this bucket. If not
  2093. // provided
  2094. // the default behavior will be to hyphenate the min-max range.
  2095. ReplacementValue *GooglePrivacyDlpV2beta2Value `json:"replacementValue,omitempty"`
  2096. // ForceSendFields is a list of field names (e.g. "Max") to
  2097. // unconditionally include in API requests. By default, fields with
  2098. // empty values are omitted from API requests. However, any non-pointer,
  2099. // non-interface field appearing in ForceSendFields will be sent to the
  2100. // server regardless of whether the field is empty or not. This may be
  2101. // used to include empty fields in Patch requests.
  2102. ForceSendFields []string `json:"-"`
  2103. // NullFields is a list of field names (e.g. "Max") to include in API
  2104. // requests with the JSON null value. By default, fields with empty
  2105. // values are omitted from API requests. However, any field with an
  2106. // empty value appearing in NullFields will be sent to the server as
  2107. // null. It is an error if a field in this list has a non-empty value.
  2108. // This may be used to include null fields in Patch requests.
  2109. NullFields []string `json:"-"`
  2110. }
  2111. func (s *GooglePrivacyDlpV2beta2Bucket) MarshalJSON() ([]byte, error) {
  2112. type NoMethod GooglePrivacyDlpV2beta2Bucket
  2113. raw := NoMethod(*s)
  2114. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2115. }
  2116. // GooglePrivacyDlpV2beta2BucketingConfig: Generalization function that
  2117. // buckets values based on ranges. The ranges and
  2118. // replacement values are dynamically provided by the user for custom
  2119. // behavior,
  2120. // such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
  2121. // This can be used on
  2122. // data of type: number, long, string, timestamp.
  2123. // If the bound `Value` type differs from the type of data being
  2124. // transformed, we
  2125. // will first attempt converting the type of the data to be transformed
  2126. // to match
  2127. // the type of the bound before comparing.
  2128. type GooglePrivacyDlpV2beta2BucketingConfig struct {
  2129. // Buckets: Set of buckets. Ranges must be non-overlapping.
  2130. Buckets []*GooglePrivacyDlpV2beta2Bucket `json:"buckets,omitempty"`
  2131. // ForceSendFields is a list of field names (e.g. "Buckets") to
  2132. // unconditionally include in API requests. By default, fields with
  2133. // empty values are omitted from API requests. However, any non-pointer,
  2134. // non-interface field appearing in ForceSendFields will be sent to the
  2135. // server regardless of whether the field is empty or not. This may be
  2136. // used to include empty fields in Patch requests.
  2137. ForceSendFields []string `json:"-"`
  2138. // NullFields is a list of field names (e.g. "Buckets") to include in
  2139. // API requests with the JSON null value. By default, fields with empty
  2140. // values are omitted from API requests. However, any field with an
  2141. // empty value appearing in NullFields will be sent to the server as
  2142. // null. It is an error if a field in this list has a non-empty value.
  2143. // This may be used to include null fields in Patch requests.
  2144. NullFields []string `json:"-"`
  2145. }
  2146. func (s *GooglePrivacyDlpV2beta2BucketingConfig) MarshalJSON() ([]byte, error) {
  2147. type NoMethod GooglePrivacyDlpV2beta2BucketingConfig
  2148. raw := NoMethod(*s)
  2149. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2150. }
  2151. // GooglePrivacyDlpV2beta2CancelDlpJobRequest: The request message for
  2152. // canceling a DLP job.
  2153. type GooglePrivacyDlpV2beta2CancelDlpJobRequest struct {
  2154. }
  2155. // GooglePrivacyDlpV2beta2CategoricalStatsConfig: Compute numerical
  2156. // stats over an individual column, including
  2157. // number of distinct values and value count distribution.
  2158. type GooglePrivacyDlpV2beta2CategoricalStatsConfig struct {
  2159. // Field: Field to compute categorical stats on. All column types
  2160. // are
  2161. // supported except for arrays and structs. However, it may be
  2162. // more
  2163. // informative to use NumericalStats when the field type is
  2164. // supported,
  2165. // depending on the data.
  2166. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  2167. // ForceSendFields is a list of field names (e.g. "Field") to
  2168. // unconditionally include in API requests. By default, fields with
  2169. // empty values are omitted from API requests. However, any non-pointer,
  2170. // non-interface field appearing in ForceSendFields will be sent to the
  2171. // server regardless of whether the field is empty or not. This may be
  2172. // used to include empty fields in Patch requests.
  2173. ForceSendFields []string `json:"-"`
  2174. // NullFields is a list of field names (e.g. "Field") to include in API
  2175. // requests with the JSON null value. By default, fields with empty
  2176. // values are omitted from API requests. However, any field with an
  2177. // empty value appearing in NullFields will be sent to the server as
  2178. // null. It is an error if a field in this list has a non-empty value.
  2179. // This may be used to include null fields in Patch requests.
  2180. NullFields []string `json:"-"`
  2181. }
  2182. func (s *GooglePrivacyDlpV2beta2CategoricalStatsConfig) MarshalJSON() ([]byte, error) {
  2183. type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsConfig
  2184. raw := NoMethod(*s)
  2185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2186. }
  2187. type GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket struct {
  2188. // BucketSize: Total number of values in this bucket.
  2189. BucketSize int64 `json:"bucketSize,omitempty,string"`
  2190. // BucketValueCount: Total number of distinct values in this bucket.
  2191. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  2192. // BucketValues: Sample of value frequencies in this bucket. The total
  2193. // number of
  2194. // values returned per bucket is capped at 20.
  2195. BucketValues []*GooglePrivacyDlpV2beta2ValueFrequency `json:"bucketValues,omitempty"`
  2196. // ValueFrequencyLowerBound: Lower bound on the value frequency of the
  2197. // values in this bucket.
  2198. ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"`
  2199. // ValueFrequencyUpperBound: Upper bound on the value frequency of the
  2200. // values in this bucket.
  2201. ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"`
  2202. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  2203. // unconditionally include in API requests. By default, fields with
  2204. // empty values are omitted from API requests. However, any non-pointer,
  2205. // non-interface field appearing in ForceSendFields will be sent to the
  2206. // server regardless of whether the field is empty or not. This may be
  2207. // used to include empty fields in Patch requests.
  2208. ForceSendFields []string `json:"-"`
  2209. // NullFields is a list of field names (e.g. "BucketSize") to include in
  2210. // API requests with the JSON null value. By default, fields with empty
  2211. // values are omitted from API requests. However, any field with an
  2212. // empty value appearing in NullFields will be sent to the server as
  2213. // null. It is an error if a field in this list has a non-empty value.
  2214. // This may be used to include null fields in Patch requests.
  2215. NullFields []string `json:"-"`
  2216. }
  2217. func (s *GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) {
  2218. type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket
  2219. raw := NoMethod(*s)
  2220. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2221. }
  2222. // GooglePrivacyDlpV2beta2CategoricalStatsResult: Result of the
  2223. // categorical stats computation.
  2224. type GooglePrivacyDlpV2beta2CategoricalStatsResult struct {
  2225. // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the
  2226. // column.
  2227. ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"`
  2228. // ForceSendFields is a list of field names (e.g.
  2229. // "ValueFrequencyHistogramBuckets") to unconditionally include in API
  2230. // requests. By default, fields with empty values are omitted from API
  2231. // requests. However, any non-pointer, non-interface field appearing in
  2232. // ForceSendFields will be sent to the server regardless of whether the
  2233. // field is empty or not. This may be used to include empty fields in
  2234. // Patch requests.
  2235. ForceSendFields []string `json:"-"`
  2236. // NullFields is a list of field names (e.g.
  2237. // "ValueFrequencyHistogramBuckets") to include in API requests with the
  2238. // JSON null value. By default, fields with empty values are omitted
  2239. // from API requests. However, any field with an empty value appearing
  2240. // in NullFields will be sent to the server as null. It is an error if a
  2241. // field in this list has a non-empty value. This may be used to include
  2242. // null fields in Patch requests.
  2243. NullFields []string `json:"-"`
  2244. }
  2245. func (s *GooglePrivacyDlpV2beta2CategoricalStatsResult) MarshalJSON() ([]byte, error) {
  2246. type NoMethod GooglePrivacyDlpV2beta2CategoricalStatsResult
  2247. raw := NoMethod(*s)
  2248. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2249. }
  2250. // GooglePrivacyDlpV2beta2CharacterMaskConfig: Partially mask a string
  2251. // by replacing a given number of characters with a
  2252. // fixed character. Masking can start from the beginning or end of the
  2253. // string.
  2254. // This can be used on data of any type (numbers, longs, and so on) and
  2255. // when
  2256. // de-identifying structured data we'll attempt to preserve the original
  2257. // data's
  2258. // type. (This allows you to take a long like 123 and modify it to a
  2259. // string like
  2260. // **3.
  2261. type GooglePrivacyDlpV2beta2CharacterMaskConfig struct {
  2262. // CharactersToIgnore: When masking a string, items in this list will be
  2263. // skipped when replacing.
  2264. // For example, if your string is 555-555-5555 and you ask us to skip
  2265. // `-` and
  2266. // mask 5 chars with * we would produce ***-*55-5555.
  2267. CharactersToIgnore []*GooglePrivacyDlpV2beta2CharsToIgnore `json:"charactersToIgnore,omitempty"`
  2268. // MaskingCharacter: Character to mask the sensitive values&mdash;for
  2269. // example, "*" for an
  2270. // alphabetic string such as name, or "0" for a numeric string such as
  2271. // ZIP
  2272. // code or credit card number. String must have length 1. If not
  2273. // supplied, we
  2274. // will default to "*" for strings, 0 for digits.
  2275. MaskingCharacter string `json:"maskingCharacter,omitempty"`
  2276. // NumberToMask: Number of characters to mask. If not set, all matching
  2277. // chars will be
  2278. // masked. Skipped characters do not count towards this tally.
  2279. NumberToMask int64 `json:"numberToMask,omitempty"`
  2280. // ReverseOrder: Mask characters in reverse order. For example, if
  2281. // `masking_character` is
  2282. // '0', number_to_mask is 14, and `reverse_order` is false,
  2283. // then
  2284. // 1234-5678-9012-3456 -> 00000000000000-3456
  2285. // If `masking_character` is '*', `number_to_mask` is 3, and
  2286. // `reverse_order`
  2287. // is true, then 12345 -> 12***
  2288. ReverseOrder bool `json:"reverseOrder,omitempty"`
  2289. // ForceSendFields is a list of field names (e.g. "CharactersToIgnore")
  2290. // to unconditionally include in API requests. By default, fields with
  2291. // empty values are omitted from API requests. However, any non-pointer,
  2292. // non-interface field appearing in ForceSendFields will be sent to the
  2293. // server regardless of whether the field is empty or not. This may be
  2294. // used to include empty fields in Patch requests.
  2295. ForceSendFields []string `json:"-"`
  2296. // NullFields is a list of field names (e.g. "CharactersToIgnore") to
  2297. // include in API requests with the JSON null value. By default, fields
  2298. // with empty values are omitted from API requests. However, any field
  2299. // with an empty value appearing in NullFields will be sent to the
  2300. // server as null. It is an error if a field in this list has a
  2301. // non-empty value. This may be used to include null fields in Patch
  2302. // requests.
  2303. NullFields []string `json:"-"`
  2304. }
  2305. func (s *GooglePrivacyDlpV2beta2CharacterMaskConfig) MarshalJSON() ([]byte, error) {
  2306. type NoMethod GooglePrivacyDlpV2beta2CharacterMaskConfig
  2307. raw := NoMethod(*s)
  2308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2309. }
  2310. // GooglePrivacyDlpV2beta2CharsToIgnore: Characters to skip when doing
  2311. // deidentification of a value. These will be left
  2312. // alone and skipped.
  2313. type GooglePrivacyDlpV2beta2CharsToIgnore struct {
  2314. CharactersToSkip string `json:"charactersToSkip,omitempty"`
  2315. // Possible values:
  2316. // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED"
  2317. // "NUMERIC" - 0-9
  2318. // "ALPHA_UPPER_CASE" - A-Z
  2319. // "ALPHA_LOWER_CASE" - a-z
  2320. // "PUNCTUATION" - US Punctuation, one of
  2321. // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  2322. // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r]
  2323. CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"`
  2324. // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to
  2325. // unconditionally include in API requests. By default, fields with
  2326. // empty values are omitted from API requests. However, any non-pointer,
  2327. // non-interface field appearing in ForceSendFields will be sent to the
  2328. // server regardless of whether the field is empty or not. This may be
  2329. // used to include empty fields in Patch requests.
  2330. ForceSendFields []string `json:"-"`
  2331. // NullFields is a list of field names (e.g. "CharactersToSkip") to
  2332. // include in API requests with the JSON null value. By default, fields
  2333. // with empty values are omitted from API requests. However, any field
  2334. // with an empty value appearing in NullFields will be sent to the
  2335. // server as null. It is an error if a field in this list has a
  2336. // non-empty value. This may be used to include null fields in Patch
  2337. // requests.
  2338. NullFields []string `json:"-"`
  2339. }
  2340. func (s *GooglePrivacyDlpV2beta2CharsToIgnore) MarshalJSON() ([]byte, error) {
  2341. type NoMethod GooglePrivacyDlpV2beta2CharsToIgnore
  2342. raw := NoMethod(*s)
  2343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2344. }
  2345. // GooglePrivacyDlpV2beta2CloudStorageKey: Record key for a finding in a
  2346. // Cloud Storage file.
  2347. type GooglePrivacyDlpV2beta2CloudStorageKey struct {
  2348. // FilePath: Path to the file.
  2349. FilePath string `json:"filePath,omitempty"`
  2350. // StartOffset: Byte offset of the referenced data in the file.
  2351. StartOffset int64 `json:"startOffset,omitempty,string"`
  2352. // ForceSendFields is a list of field names (e.g. "FilePath") to
  2353. // unconditionally include in API requests. By default, fields with
  2354. // empty values are omitted from API requests. However, any non-pointer,
  2355. // non-interface field appearing in ForceSendFields will be sent to the
  2356. // server regardless of whether the field is empty or not. This may be
  2357. // used to include empty fields in Patch requests.
  2358. ForceSendFields []string `json:"-"`
  2359. // NullFields is a list of field names (e.g. "FilePath") to include in
  2360. // API requests with the JSON null value. By default, fields with empty
  2361. // values are omitted from API requests. However, any field with an
  2362. // empty value appearing in NullFields will be sent to the server as
  2363. // null. It is an error if a field in this list has a non-empty value.
  2364. // This may be used to include null fields in Patch requests.
  2365. NullFields []string `json:"-"`
  2366. }
  2367. func (s *GooglePrivacyDlpV2beta2CloudStorageKey) MarshalJSON() ([]byte, error) {
  2368. type NoMethod GooglePrivacyDlpV2beta2CloudStorageKey
  2369. raw := NoMethod(*s)
  2370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2371. }
  2372. // GooglePrivacyDlpV2beta2CloudStorageOptions: Options defining a file
  2373. // or a set of files (path ending with *) within
  2374. // a Google Cloud Storage bucket.
  2375. type GooglePrivacyDlpV2beta2CloudStorageOptions struct {
  2376. // BytesLimitPerFile: Max number of bytes to scan from a file. If a
  2377. // scanned file's size is bigger
  2378. // than this value then the rest of the bytes are omitted.
  2379. BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"`
  2380. FileSet *GooglePrivacyDlpV2beta2FileSet `json:"fileSet,omitempty"`
  2381. // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile")
  2382. // to unconditionally include in API requests. By default, fields with
  2383. // empty values are omitted from API requests. However, any non-pointer,
  2384. // non-interface field appearing in ForceSendFields will be sent to the
  2385. // server regardless of whether the field is empty or not. This may be
  2386. // used to include empty fields in Patch requests.
  2387. ForceSendFields []string `json:"-"`
  2388. // NullFields is a list of field names (e.g. "BytesLimitPerFile") to
  2389. // include in API requests with the JSON null value. By default, fields
  2390. // with empty values are omitted from API requests. However, any field
  2391. // with an empty value appearing in NullFields will be sent to the
  2392. // server as null. It is an error if a field in this list has a
  2393. // non-empty value. This may be used to include null fields in Patch
  2394. // requests.
  2395. NullFields []string `json:"-"`
  2396. }
  2397. func (s *GooglePrivacyDlpV2beta2CloudStorageOptions) MarshalJSON() ([]byte, error) {
  2398. type NoMethod GooglePrivacyDlpV2beta2CloudStorageOptions
  2399. raw := NoMethod(*s)
  2400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2401. }
  2402. // GooglePrivacyDlpV2beta2Color: Represents a color in the RGB color
  2403. // space.
  2404. type GooglePrivacyDlpV2beta2Color struct {
  2405. // Blue: The amount of blue in the color as a value in the interval [0,
  2406. // 1].
  2407. Blue float64 `json:"blue,omitempty"`
  2408. // Green: The amount of green in the color as a value in the interval
  2409. // [0, 1].
  2410. Green float64 `json:"green,omitempty"`
  2411. // Red: The amount of red in the color as a value in the interval [0,
  2412. // 1].
  2413. Red float64 `json:"red,omitempty"`
  2414. // ForceSendFields is a list of field names (e.g. "Blue") to
  2415. // unconditionally include in API requests. By default, fields with
  2416. // empty values are omitted from API requests. However, any non-pointer,
  2417. // non-interface field appearing in ForceSendFields will be sent to the
  2418. // server regardless of whether the field is empty or not. This may be
  2419. // used to include empty fields in Patch requests.
  2420. ForceSendFields []string `json:"-"`
  2421. // NullFields is a list of field names (e.g. "Blue") to include in API
  2422. // requests with the JSON null value. By default, fields with empty
  2423. // values are omitted from API requests. However, any field with an
  2424. // empty value appearing in NullFields will be sent to the server as
  2425. // null. It is an error if a field in this list has a non-empty value.
  2426. // This may be used to include null fields in Patch requests.
  2427. NullFields []string `json:"-"`
  2428. }
  2429. func (s *GooglePrivacyDlpV2beta2Color) MarshalJSON() ([]byte, error) {
  2430. type NoMethod GooglePrivacyDlpV2beta2Color
  2431. raw := NoMethod(*s)
  2432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2433. }
  2434. func (s *GooglePrivacyDlpV2beta2Color) UnmarshalJSON(data []byte) error {
  2435. type NoMethod GooglePrivacyDlpV2beta2Color
  2436. var s1 struct {
  2437. Blue gensupport.JSONFloat64 `json:"blue"`
  2438. Green gensupport.JSONFloat64 `json:"green"`
  2439. Red gensupport.JSONFloat64 `json:"red"`
  2440. *NoMethod
  2441. }
  2442. s1.NoMethod = (*NoMethod)(s)
  2443. if err := json.Unmarshal(data, &s1); err != nil {
  2444. return err
  2445. }
  2446. s.Blue = float64(s1.Blue)
  2447. s.Green = float64(s1.Green)
  2448. s.Red = float64(s1.Red)
  2449. return nil
  2450. }
  2451. // GooglePrivacyDlpV2beta2Condition: The field type of `value` and
  2452. // `field` do not need to match to be
  2453. // considered equal, but not all comparisons are possible.
  2454. //
  2455. // A `value` of type:
  2456. //
  2457. // - `string` can be compared against all other types
  2458. // - `boolean` can only be compared against other booleans
  2459. // - `integer` can be compared against doubles or a string if the string
  2460. // value
  2461. // can be parsed as an integer.
  2462. // - `double` can be compared against integers or a string if the string
  2463. // can
  2464. // be parsed as a double.
  2465. // - `Timestamp` can be compared against strings in RFC 3339 date
  2466. // string
  2467. // format.
  2468. // - `TimeOfDay` can be compared against timestamps and strings in the
  2469. // format
  2470. // of 'HH:mm:ss'.
  2471. //
  2472. // If we fail to compare do to type mismatch, a warning will be given
  2473. // and
  2474. // the condition will evaluate to false.
  2475. type GooglePrivacyDlpV2beta2Condition struct {
  2476. // Field: Field within the record this condition is evaluated against.
  2477. // [required]
  2478. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  2479. // Operator: Operator used to compare the field or infoType to the
  2480. // value. [required]
  2481. //
  2482. // Possible values:
  2483. // "RELATIONAL_OPERATOR_UNSPECIFIED"
  2484. // "EQUAL_TO" - Equal.
  2485. // "NOT_EQUAL_TO" - Not equal to.
  2486. // "GREATER_THAN" - Greater than.
  2487. // "LESS_THAN" - Less than.
  2488. // "GREATER_THAN_OR_EQUALS" - Greater than or equals.
  2489. // "LESS_THAN_OR_EQUALS" - Less than or equals.
  2490. // "EXISTS" - Exists
  2491. Operator string `json:"operator,omitempty"`
  2492. // Value: Value to compare against. [Required, except for `EXISTS`
  2493. // tests.]
  2494. Value *GooglePrivacyDlpV2beta2Value `json:"value,omitempty"`
  2495. // ForceSendFields is a list of field names (e.g. "Field") to
  2496. // unconditionally include in API requests. By default, fields with
  2497. // empty values are omitted from API requests. However, any non-pointer,
  2498. // non-interface field appearing in ForceSendFields will be sent to the
  2499. // server regardless of whether the field is empty or not. This may be
  2500. // used to include empty fields in Patch requests.
  2501. ForceSendFields []string `json:"-"`
  2502. // NullFields is a list of field names (e.g. "Field") to include in API
  2503. // requests with the JSON null value. By default, fields with empty
  2504. // values are omitted from API requests. However, any field with an
  2505. // empty value appearing in NullFields will be sent to the server as
  2506. // null. It is an error if a field in this list has a non-empty value.
  2507. // This may be used to include null fields in Patch requests.
  2508. NullFields []string `json:"-"`
  2509. }
  2510. func (s *GooglePrivacyDlpV2beta2Condition) MarshalJSON() ([]byte, error) {
  2511. type NoMethod GooglePrivacyDlpV2beta2Condition
  2512. raw := NoMethod(*s)
  2513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2514. }
  2515. // GooglePrivacyDlpV2beta2Conditions: A collection of conditions.
  2516. type GooglePrivacyDlpV2beta2Conditions struct {
  2517. Conditions []*GooglePrivacyDlpV2beta2Condition `json:"conditions,omitempty"`
  2518. // ForceSendFields is a list of field names (e.g. "Conditions") to
  2519. // unconditionally include in API requests. By default, fields with
  2520. // empty values are omitted from API requests. However, any non-pointer,
  2521. // non-interface field appearing in ForceSendFields will be sent to the
  2522. // server regardless of whether the field is empty or not. This may be
  2523. // used to include empty fields in Patch requests.
  2524. ForceSendFields []string `json:"-"`
  2525. // NullFields is a list of field names (e.g. "Conditions") to include in
  2526. // API requests with the JSON null value. By default, fields with empty
  2527. // values are omitted from API requests. However, any field with an
  2528. // empty value appearing in NullFields will be sent to the server as
  2529. // null. It is an error if a field in this list has a non-empty value.
  2530. // This may be used to include null fields in Patch requests.
  2531. NullFields []string `json:"-"`
  2532. }
  2533. func (s *GooglePrivacyDlpV2beta2Conditions) MarshalJSON() ([]byte, error) {
  2534. type NoMethod GooglePrivacyDlpV2beta2Conditions
  2535. raw := NoMethod(*s)
  2536. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2537. }
  2538. // GooglePrivacyDlpV2beta2ContentItem: Container structure for the
  2539. // content to inspect.
  2540. type GooglePrivacyDlpV2beta2ContentItem struct {
  2541. // Data: Content data to inspect or redact.
  2542. Data string `json:"data,omitempty"`
  2543. // Table: Structured content for inspection.
  2544. Table *GooglePrivacyDlpV2beta2Table `json:"table,omitempty"`
  2545. // Type: Type of the content, as defined in Content-Type HTTP
  2546. // header.
  2547. // Supported types are: all "text" types, octet streams, PNG
  2548. // images,
  2549. // JPEG images.
  2550. Type string `json:"type,omitempty"`
  2551. // Value: String data to inspect or redact.
  2552. Value string `json:"value,omitempty"`
  2553. // ForceSendFields is a list of field names (e.g. "Data") to
  2554. // unconditionally include in API requests. By default, fields with
  2555. // empty values are omitted from API requests. However, any non-pointer,
  2556. // non-interface field appearing in ForceSendFields will be sent to the
  2557. // server regardless of whether the field is empty or not. This may be
  2558. // used to include empty fields in Patch requests.
  2559. ForceSendFields []string `json:"-"`
  2560. // NullFields is a list of field names (e.g. "Data") to include in API
  2561. // requests with the JSON null value. By default, fields with empty
  2562. // values are omitted from API requests. However, any field with an
  2563. // empty value appearing in NullFields will be sent to the server as
  2564. // null. It is an error if a field in this list has a non-empty value.
  2565. // This may be used to include null fields in Patch requests.
  2566. NullFields []string `json:"-"`
  2567. }
  2568. func (s *GooglePrivacyDlpV2beta2ContentItem) MarshalJSON() ([]byte, error) {
  2569. type NoMethod GooglePrivacyDlpV2beta2ContentItem
  2570. raw := NoMethod(*s)
  2571. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2572. }
  2573. // GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest: Request
  2574. // message for CreateDeidentifyTemplate.
  2575. type GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest struct {
  2576. // DeidentifyTemplate: The DeidentifyTemplate to create.
  2577. DeidentifyTemplate *GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
  2578. // TemplateId: The template id can contain uppercase and lowercase
  2579. // letters,
  2580. // numbers, and hyphens; that is, it must match the regular
  2581. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  2582. // characters. Can be empty to allow the system to generate one.
  2583. TemplateId string `json:"templateId,omitempty"`
  2584. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate")
  2585. // to unconditionally include in API requests. By default, fields with
  2586. // empty values are omitted from API requests. However, any non-pointer,
  2587. // non-interface field appearing in ForceSendFields will be sent to the
  2588. // server regardless of whether the field is empty or not. This may be
  2589. // used to include empty fields in Patch requests.
  2590. ForceSendFields []string `json:"-"`
  2591. // NullFields is a list of field names (e.g. "DeidentifyTemplate") to
  2592. // include in API requests with the JSON null value. By default, fields
  2593. // with empty values are omitted from API requests. However, any field
  2594. // with an empty value appearing in NullFields will be sent to the
  2595. // server as null. It is an error if a field in this list has a
  2596. // non-empty value. This may be used to include null fields in Patch
  2597. // requests.
  2598. NullFields []string `json:"-"`
  2599. }
  2600. func (s *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) {
  2601. type NoMethod GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest
  2602. raw := NoMethod(*s)
  2603. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2604. }
  2605. // GooglePrivacyDlpV2beta2CreateInspectTemplateRequest: Request message
  2606. // for CreateInspectTemplate.
  2607. type GooglePrivacyDlpV2beta2CreateInspectTemplateRequest struct {
  2608. // InspectTemplate: The InspectTemplate to create.
  2609. InspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplate,omitempty"`
  2610. // TemplateId: The template id can contain uppercase and lowercase
  2611. // letters,
  2612. // numbers, and hyphens; that is, it must match the regular
  2613. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  2614. // characters. Can be empty to allow the system to generate one.
  2615. TemplateId string `json:"templateId,omitempty"`
  2616. // ForceSendFields is a list of field names (e.g. "InspectTemplate") to
  2617. // unconditionally include in API requests. By default, fields with
  2618. // empty values are omitted from API requests. However, any non-pointer,
  2619. // non-interface field appearing in ForceSendFields will be sent to the
  2620. // server regardless of whether the field is empty or not. This may be
  2621. // used to include empty fields in Patch requests.
  2622. ForceSendFields []string `json:"-"`
  2623. // NullFields is a list of field names (e.g. "InspectTemplate") to
  2624. // include in API requests with the JSON null value. By default, fields
  2625. // with empty values are omitted from API requests. However, any field
  2626. // with an empty value appearing in NullFields will be sent to the
  2627. // server as null. It is an error if a field in this list has a
  2628. // non-empty value. This may be used to include null fields in Patch
  2629. // requests.
  2630. NullFields []string `json:"-"`
  2631. }
  2632. func (s *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) {
  2633. type NoMethod GooglePrivacyDlpV2beta2CreateInspectTemplateRequest
  2634. raw := NoMethod(*s)
  2635. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2636. }
  2637. // GooglePrivacyDlpV2beta2CreateJobTriggerRequest: Request message for
  2638. // CreateJobTrigger.
  2639. type GooglePrivacyDlpV2beta2CreateJobTriggerRequest struct {
  2640. // JobTrigger: The JobTrigger to create.
  2641. JobTrigger *GooglePrivacyDlpV2beta2JobTrigger `json:"jobTrigger,omitempty"`
  2642. // TriggerId: The trigger id can contain uppercase and lowercase
  2643. // letters,
  2644. // numbers, and hyphens; that is, it must match the regular
  2645. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  2646. // characters. Can be empty to allow the system to generate one.
  2647. TriggerId string `json:"triggerId,omitempty"`
  2648. // ForceSendFields is a list of field names (e.g. "JobTrigger") to
  2649. // unconditionally include in API requests. By default, fields with
  2650. // empty values are omitted from API requests. However, any non-pointer,
  2651. // non-interface field appearing in ForceSendFields will be sent to the
  2652. // server regardless of whether the field is empty or not. This may be
  2653. // used to include empty fields in Patch requests.
  2654. ForceSendFields []string `json:"-"`
  2655. // NullFields is a list of field names (e.g. "JobTrigger") to include in
  2656. // API requests with the JSON null value. By default, fields with empty
  2657. // values are omitted from API requests. However, any field with an
  2658. // empty value appearing in NullFields will be sent to the server as
  2659. // null. It is an error if a field in this list has a non-empty value.
  2660. // This may be used to include null fields in Patch requests.
  2661. NullFields []string `json:"-"`
  2662. }
  2663. func (s *GooglePrivacyDlpV2beta2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) {
  2664. type NoMethod GooglePrivacyDlpV2beta2CreateJobTriggerRequest
  2665. raw := NoMethod(*s)
  2666. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2667. }
  2668. // GooglePrivacyDlpV2beta2CryptoHashConfig: Pseudonymization method that
  2669. // generates surrogates via cryptographic hashing.
  2670. // Uses SHA-256.
  2671. // The key size must be either 32 or 64 bytes.
  2672. // Outputs a 32 byte digest as an uppercase hex string
  2673. // (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
  2674. // Currently, only string and integer values can be hashed.
  2675. type GooglePrivacyDlpV2beta2CryptoHashConfig struct {
  2676. // CryptoKey: The key used by the hash function.
  2677. CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"`
  2678. // ForceSendFields is a list of field names (e.g. "CryptoKey") to
  2679. // unconditionally include in API requests. By default, fields with
  2680. // empty values are omitted from API requests. However, any non-pointer,
  2681. // non-interface field appearing in ForceSendFields will be sent to the
  2682. // server regardless of whether the field is empty or not. This may be
  2683. // used to include empty fields in Patch requests.
  2684. ForceSendFields []string `json:"-"`
  2685. // NullFields is a list of field names (e.g. "CryptoKey") to include in
  2686. // API requests with the JSON null value. By default, fields with empty
  2687. // values are omitted from API requests. However, any field with an
  2688. // empty value appearing in NullFields will be sent to the server as
  2689. // null. It is an error if a field in this list has a non-empty value.
  2690. // This may be used to include null fields in Patch requests.
  2691. NullFields []string `json:"-"`
  2692. }
  2693. func (s *GooglePrivacyDlpV2beta2CryptoHashConfig) MarshalJSON() ([]byte, error) {
  2694. type NoMethod GooglePrivacyDlpV2beta2CryptoHashConfig
  2695. raw := NoMethod(*s)
  2696. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2697. }
  2698. // GooglePrivacyDlpV2beta2CryptoKey: This is a data encryption key (DEK)
  2699. // (as opposed to
  2700. // a key encryption key (KEK) stored by KMS).
  2701. // When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
  2702. // IAM policy on the KMS CryptoKey (KEK) to ensure an attacker
  2703. // cannot
  2704. // unwrap the data crypto key.
  2705. type GooglePrivacyDlpV2beta2CryptoKey struct {
  2706. KmsWrapped *GooglePrivacyDlpV2beta2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
  2707. Transient *GooglePrivacyDlpV2beta2TransientCryptoKey `json:"transient,omitempty"`
  2708. Unwrapped *GooglePrivacyDlpV2beta2UnwrappedCryptoKey `json:"unwrapped,omitempty"`
  2709. // ForceSendFields is a list of field names (e.g. "KmsWrapped") to
  2710. // unconditionally include in API requests. By default, fields with
  2711. // empty values are omitted from API requests. However, any non-pointer,
  2712. // non-interface field appearing in ForceSendFields will be sent to the
  2713. // server regardless of whether the field is empty or not. This may be
  2714. // used to include empty fields in Patch requests.
  2715. ForceSendFields []string `json:"-"`
  2716. // NullFields is a list of field names (e.g. "KmsWrapped") to include in
  2717. // API requests with the JSON null value. By default, fields with empty
  2718. // values are omitted from API requests. However, any field with an
  2719. // empty value appearing in NullFields will be sent to the server as
  2720. // null. It is an error if a field in this list has a non-empty value.
  2721. // This may be used to include null fields in Patch requests.
  2722. NullFields []string `json:"-"`
  2723. }
  2724. func (s *GooglePrivacyDlpV2beta2CryptoKey) MarshalJSON() ([]byte, error) {
  2725. type NoMethod GooglePrivacyDlpV2beta2CryptoKey
  2726. raw := NoMethod(*s)
  2727. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2728. }
  2729. // GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig: Replaces an
  2730. // identifier with a surrogate using FPE with the FFX
  2731. // mode of operation; however when used in the `ReidentifyContent` API
  2732. // method,
  2733. // it serves the opposite function by reversing the surrogate back
  2734. // into
  2735. // the original identifier.
  2736. // The identifier must be encoded as ASCII.
  2737. // For a given crypto key and context, the same identifier will
  2738. // be
  2739. // replaced with the same surrogate.
  2740. // Identifiers must be at least two characters long.
  2741. // In the case that the identifier is the empty string, it will be
  2742. // skipped.
  2743. // See [Pseudonymization](/dlp/docs/pseudonymization) for example usage.
  2744. type GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig struct {
  2745. // Possible values:
  2746. // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED"
  2747. // "NUMERIC" - [0-9] (radix of 10)
  2748. // "HEXADECIMAL" - [0-9A-F] (radix of 16)
  2749. // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36)
  2750. // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62)
  2751. CommonAlphabet string `json:"commonAlphabet,omitempty"`
  2752. // Context: The 'tweak', a context may be used for higher security since
  2753. // the same
  2754. // identifier in two different contexts won't be given the same
  2755. // surrogate. If
  2756. // the context is not set, a default tweak will be used.
  2757. //
  2758. // If the context is set but:
  2759. //
  2760. // 1. there is no record present when transforming a given value or
  2761. // 1. the field is not present when transforming a given value,
  2762. //
  2763. // a default tweak will be used.
  2764. //
  2765. // Note that case (1) is expected when an `InfoTypeTransformation`
  2766. // is
  2767. // applied to both structured and non-structured
  2768. // `ContentItem`s.
  2769. // Currently, the referenced field may be of value type integer or
  2770. // string.
  2771. //
  2772. // The tweak is constructed as a sequence of bytes in big endian byte
  2773. // order
  2774. // such that:
  2775. //
  2776. // - a 64 bit integer is encoded followed by a single byte of value 1
  2777. // - a string is encoded in UTF-8 format followed by a single byte of
  2778. // value
  2779. // å 2
  2780. Context *GooglePrivacyDlpV2beta2FieldId `json:"context,omitempty"`
  2781. // CryptoKey: The key used by the encryption algorithm. [required]
  2782. CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"`
  2783. // CustomAlphabet: This is supported by mapping these to the
  2784. // alphanumeric characters
  2785. // that the FFX mode natively supports. This happens
  2786. // before/after
  2787. // encryption/decryption.
  2788. // Each character listed must appear only once.
  2789. // Number of characters must be in the range [2, 62].
  2790. // This must be encoded as ASCII.
  2791. // The order of characters does not matter.
  2792. CustomAlphabet string `json:"customAlphabet,omitempty"`
  2793. // Radix: The native way to select the alphabet. Must be in the range
  2794. // [2, 62].
  2795. Radix int64 `json:"radix,omitempty"`
  2796. // SurrogateInfoType: The custom infoType to annotate the surrogate
  2797. // with.
  2798. // This annotation will be applied to the surrogate by prefixing it
  2799. // with
  2800. // the name of the custom infoType followed by the number of
  2801. // characters comprising the surrogate. The following scheme defines
  2802. // the
  2803. // format: info_type_name(surrogate_character_count):surrogate
  2804. //
  2805. // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE'
  2806. // and
  2807. // the surrogate is 'abc', the full replacement value
  2808. // will be: 'MY_TOKEN_INFO_TYPE(3):abc'
  2809. //
  2810. // This annotation identifies the surrogate when inspecting content
  2811. // using the
  2812. // custom
  2813. // infoType
  2814. // [`SurrogateType`](/dlp/docs/reference/rest/v2beta2/InspectCon
  2815. // fig#surrogatetype).
  2816. // This facilitates reversal of the surrogate when it occurs in free
  2817. // text.
  2818. //
  2819. // In order for inspection to work properly, the name of this infoType
  2820. // must
  2821. // not occur naturally anywhere in your data; otherwise, inspection
  2822. // may
  2823. // find a surrogate that does not correspond to an actual
  2824. // identifier.
  2825. // Therefore, choose your custom infoType name carefully after
  2826. // considering
  2827. // what your data looks like. One way to select a name that has a high
  2828. // chance
  2829. // of yielding reliable detection is to include one or more unicode
  2830. // characters
  2831. // that are highly improbable to exist in your data.
  2832. // For example, assuming your data is entered from a regular ASCII
  2833. // keyboard,
  2834. // the symbol with the hex code point 29DD might be used like
  2835. // so:
  2836. // ⧝MY_TOKEN_TYPE
  2837. SurrogateInfoType *GooglePrivacyDlpV2beta2InfoType `json:"surrogateInfoType,omitempty"`
  2838. // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to
  2839. // unconditionally include in API requests. By default, fields with
  2840. // empty values are omitted from API requests. However, any non-pointer,
  2841. // non-interface field appearing in ForceSendFields will be sent to the
  2842. // server regardless of whether the field is empty or not. This may be
  2843. // used to include empty fields in Patch requests.
  2844. ForceSendFields []string `json:"-"`
  2845. // NullFields is a list of field names (e.g. "CommonAlphabet") to
  2846. // include in API requests with the JSON null value. By default, fields
  2847. // with empty values are omitted from API requests. However, any field
  2848. // with an empty value appearing in NullFields will be sent to the
  2849. // server as null. It is an error if a field in this list has a
  2850. // non-empty value. This may be used to include null fields in Patch
  2851. // requests.
  2852. NullFields []string `json:"-"`
  2853. }
  2854. func (s *GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) {
  2855. type NoMethod GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig
  2856. raw := NoMethod(*s)
  2857. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2858. }
  2859. // GooglePrivacyDlpV2beta2CustomInfoType: Custom information type
  2860. // provided by the user. Used to find domain-specific
  2861. // sensitive information configurable to the data in question.
  2862. type GooglePrivacyDlpV2beta2CustomInfoType struct {
  2863. // DetectionRules: Set of detection rules to apply to all findings of
  2864. // this custom info type.
  2865. // Rules are applied in order that they are specified. Not supported for
  2866. // the
  2867. // `surrogate_type` custom info type.
  2868. DetectionRules []*GooglePrivacyDlpV2beta2DetectionRule `json:"detectionRules,omitempty"`
  2869. // Dictionary: Dictionary-based custom info type.
  2870. Dictionary *GooglePrivacyDlpV2beta2Dictionary `json:"dictionary,omitempty"`
  2871. // InfoType: Info type configuration. All custom info types must have
  2872. // configurations
  2873. // that do not conflict with built-in info types or other custom info
  2874. // types.
  2875. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  2876. // Likelihood: Likelihood to return for this custom info type. This base
  2877. // value can be
  2878. // altered by a detection rule if the finding meets the criteria
  2879. // specified by
  2880. // the rule. Defaults to `VERY_LIKELY` if not specified.
  2881. //
  2882. // Possible values:
  2883. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  2884. // likelihoods is included.
  2885. // "VERY_UNLIKELY" - Few matching elements.
  2886. // "UNLIKELY"
  2887. // "POSSIBLE" - Some matching elements.
  2888. // "LIKELY"
  2889. // "VERY_LIKELY" - Many matching elements.
  2890. Likelihood string `json:"likelihood,omitempty"`
  2891. // Regex: Regex-based custom info type.
  2892. Regex *GooglePrivacyDlpV2beta2Regex `json:"regex,omitempty"`
  2893. // SurrogateType: Surrogate info type.
  2894. SurrogateType *GooglePrivacyDlpV2beta2SurrogateType `json:"surrogateType,omitempty"`
  2895. // ForceSendFields is a list of field names (e.g. "DetectionRules") to
  2896. // unconditionally include in API requests. By default, fields with
  2897. // empty values are omitted from API requests. However, any non-pointer,
  2898. // non-interface field appearing in ForceSendFields will be sent to the
  2899. // server regardless of whether the field is empty or not. This may be
  2900. // used to include empty fields in Patch requests.
  2901. ForceSendFields []string `json:"-"`
  2902. // NullFields is a list of field names (e.g. "DetectionRules") to
  2903. // include in API requests with the JSON null value. By default, fields
  2904. // with empty values are omitted from API requests. However, any field
  2905. // with an empty value appearing in NullFields will be sent to the
  2906. // server as null. It is an error if a field in this list has a
  2907. // non-empty value. This may be used to include null fields in Patch
  2908. // requests.
  2909. NullFields []string `json:"-"`
  2910. }
  2911. func (s *GooglePrivacyDlpV2beta2CustomInfoType) MarshalJSON() ([]byte, error) {
  2912. type NoMethod GooglePrivacyDlpV2beta2CustomInfoType
  2913. raw := NoMethod(*s)
  2914. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2915. }
  2916. // GooglePrivacyDlpV2beta2DatastoreKey: Record key for a finding in
  2917. // Cloud Datastore.
  2918. type GooglePrivacyDlpV2beta2DatastoreKey struct {
  2919. // EntityKey: Datastore entity key.
  2920. EntityKey *GooglePrivacyDlpV2beta2Key `json:"entityKey,omitempty"`
  2921. // ForceSendFields is a list of field names (e.g. "EntityKey") to
  2922. // unconditionally include in API requests. By default, fields with
  2923. // empty values are omitted from API requests. However, any non-pointer,
  2924. // non-interface field appearing in ForceSendFields will be sent to the
  2925. // server regardless of whether the field is empty or not. This may be
  2926. // used to include empty fields in Patch requests.
  2927. ForceSendFields []string `json:"-"`
  2928. // NullFields is a list of field names (e.g. "EntityKey") to include in
  2929. // API requests with the JSON null value. By default, fields with empty
  2930. // values are omitted from API requests. However, any field with an
  2931. // empty value appearing in NullFields will be sent to the server as
  2932. // null. It is an error if a field in this list has a non-empty value.
  2933. // This may be used to include null fields in Patch requests.
  2934. NullFields []string `json:"-"`
  2935. }
  2936. func (s *GooglePrivacyDlpV2beta2DatastoreKey) MarshalJSON() ([]byte, error) {
  2937. type NoMethod GooglePrivacyDlpV2beta2DatastoreKey
  2938. raw := NoMethod(*s)
  2939. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2940. }
  2941. // GooglePrivacyDlpV2beta2DatastoreOptions: Options defining a data set
  2942. // within Google Cloud Datastore.
  2943. type GooglePrivacyDlpV2beta2DatastoreOptions struct {
  2944. // Kind: The kind to process.
  2945. Kind *GooglePrivacyDlpV2beta2KindExpression `json:"kind,omitempty"`
  2946. // PartitionId: A partition ID identifies a grouping of entities. The
  2947. // grouping is always
  2948. // by project and namespace, however the namespace ID may be empty.
  2949. PartitionId *GooglePrivacyDlpV2beta2PartitionId `json:"partitionId,omitempty"`
  2950. // ForceSendFields is a list of field names (e.g. "Kind") to
  2951. // unconditionally include in API requests. By default, fields with
  2952. // empty values are omitted from API requests. However, any non-pointer,
  2953. // non-interface field appearing in ForceSendFields will be sent to the
  2954. // server regardless of whether the field is empty or not. This may be
  2955. // used to include empty fields in Patch requests.
  2956. ForceSendFields []string `json:"-"`
  2957. // NullFields is a list of field names (e.g. "Kind") to include in API
  2958. // requests with the JSON null value. By default, fields with empty
  2959. // values are omitted from API requests. However, any field with an
  2960. // empty value appearing in NullFields will be sent to the server as
  2961. // null. It is an error if a field in this list has a non-empty value.
  2962. // This may be used to include null fields in Patch requests.
  2963. NullFields []string `json:"-"`
  2964. }
  2965. func (s *GooglePrivacyDlpV2beta2DatastoreOptions) MarshalJSON() ([]byte, error) {
  2966. type NoMethod GooglePrivacyDlpV2beta2DatastoreOptions
  2967. raw := NoMethod(*s)
  2968. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2969. }
  2970. // GooglePrivacyDlpV2beta2DateShiftConfig: Shifts dates by random number
  2971. // of days, with option to be consistent for the
  2972. // same context.
  2973. type GooglePrivacyDlpV2beta2DateShiftConfig struct {
  2974. // Context: Points to the field that contains the context, for example,
  2975. // an entity id.
  2976. // If set, must also set method. If set, shift will be consistent for
  2977. // the
  2978. // given context.
  2979. Context *GooglePrivacyDlpV2beta2FieldId `json:"context,omitempty"`
  2980. // CryptoKey: Causes the shift to be computed based on this key and the
  2981. // context. This
  2982. // results in the same shift for the same context and crypto_key.
  2983. CryptoKey *GooglePrivacyDlpV2beta2CryptoKey `json:"cryptoKey,omitempty"`
  2984. // LowerBoundDays: For example, -5 means shift date to at most 5 days
  2985. // back in the past.
  2986. // [Required]
  2987. LowerBoundDays int64 `json:"lowerBoundDays,omitempty"`
  2988. // UpperBoundDays: Range of shift in days. Actual shift will be selected
  2989. // at random within this
  2990. // range (inclusive ends). Negative means shift to earlier in time. Must
  2991. // not
  2992. // be more than 365250 days (1000 years) each direction.
  2993. //
  2994. // For example, 3 means shift date to at most 3 days into the
  2995. // future.
  2996. // [Required]
  2997. UpperBoundDays int64 `json:"upperBoundDays,omitempty"`
  2998. // ForceSendFields is a list of field names (e.g. "Context") to
  2999. // unconditionally include in API requests. By default, fields with
  3000. // empty values are omitted from API requests. However, any non-pointer,
  3001. // non-interface field appearing in ForceSendFields will be sent to the
  3002. // server regardless of whether the field is empty or not. This may be
  3003. // used to include empty fields in Patch requests.
  3004. ForceSendFields []string `json:"-"`
  3005. // NullFields is a list of field names (e.g. "Context") to include in
  3006. // API requests with the JSON null value. By default, fields with empty
  3007. // values are omitted from API requests. However, any field with an
  3008. // empty value appearing in NullFields will be sent to the server as
  3009. // null. It is an error if a field in this list has a non-empty value.
  3010. // This may be used to include null fields in Patch requests.
  3011. NullFields []string `json:"-"`
  3012. }
  3013. func (s *GooglePrivacyDlpV2beta2DateShiftConfig) MarshalJSON() ([]byte, error) {
  3014. type NoMethod GooglePrivacyDlpV2beta2DateShiftConfig
  3015. raw := NoMethod(*s)
  3016. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3017. }
  3018. // GooglePrivacyDlpV2beta2DateTime: Message for a date time object.
  3019. type GooglePrivacyDlpV2beta2DateTime struct {
  3020. // Date: One or more of the following must be set. All fields are
  3021. // optional, but
  3022. // when set must be valid date or time values.
  3023. Date *GoogleTypeDate `json:"date,omitempty"`
  3024. // Possible values:
  3025. // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week.
  3026. // "MONDAY" - The day-of-week of Monday.
  3027. // "TUESDAY" - The day-of-week of Tuesday.
  3028. // "WEDNESDAY" - The day-of-week of Wednesday.
  3029. // "THURSDAY" - The day-of-week of Thursday.
  3030. // "FRIDAY" - The day-of-week of Friday.
  3031. // "SATURDAY" - The day-of-week of Saturday.
  3032. // "SUNDAY" - The day-of-week of Sunday.
  3033. DayOfWeek string `json:"dayOfWeek,omitempty"`
  3034. Time *GoogleTypeTimeOfDay `json:"time,omitempty"`
  3035. TimeZone *GooglePrivacyDlpV2beta2TimeZone `json:"timeZone,omitempty"`
  3036. // ForceSendFields is a list of field names (e.g. "Date") to
  3037. // unconditionally include in API requests. By default, fields with
  3038. // empty values are omitted from API requests. However, any non-pointer,
  3039. // non-interface field appearing in ForceSendFields will be sent to the
  3040. // server regardless of whether the field is empty or not. This may be
  3041. // used to include empty fields in Patch requests.
  3042. ForceSendFields []string `json:"-"`
  3043. // NullFields is a list of field names (e.g. "Date") to include in API
  3044. // requests with the JSON null value. By default, fields with empty
  3045. // values are omitted from API requests. However, any field with an
  3046. // empty value appearing in NullFields will be sent to the server as
  3047. // null. It is an error if a field in this list has a non-empty value.
  3048. // This may be used to include null fields in Patch requests.
  3049. NullFields []string `json:"-"`
  3050. }
  3051. func (s *GooglePrivacyDlpV2beta2DateTime) MarshalJSON() ([]byte, error) {
  3052. type NoMethod GooglePrivacyDlpV2beta2DateTime
  3053. raw := NoMethod(*s)
  3054. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3055. }
  3056. // GooglePrivacyDlpV2beta2DeidentifyConfig: The configuration that
  3057. // controls how the data will change.
  3058. type GooglePrivacyDlpV2beta2DeidentifyConfig struct {
  3059. // InfoTypeTransformations: Treat the dataset as free-form text and
  3060. // apply the same free text
  3061. // transformation everywhere.
  3062. InfoTypeTransformations *GooglePrivacyDlpV2beta2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  3063. // RecordTransformations: Treat the dataset as structured.
  3064. // Transformations can be applied to
  3065. // specific locations within structured datasets, such as transforming
  3066. // a column within a table.
  3067. RecordTransformations *GooglePrivacyDlpV2beta2RecordTransformations `json:"recordTransformations,omitempty"`
  3068. // ForceSendFields is a list of field names (e.g.
  3069. // "InfoTypeTransformations") to unconditionally include in API
  3070. // requests. By default, fields with empty values are omitted from API
  3071. // requests. However, any non-pointer, non-interface field appearing in
  3072. // ForceSendFields will be sent to the server regardless of whether the
  3073. // field is empty or not. This may be used to include empty fields in
  3074. // Patch requests.
  3075. ForceSendFields []string `json:"-"`
  3076. // NullFields is a list of field names (e.g. "InfoTypeTransformations")
  3077. // to include in API requests with the JSON null value. By default,
  3078. // fields with empty values are omitted from API requests. However, any
  3079. // field with an empty value appearing in NullFields will be sent to the
  3080. // server as null. It is an error if a field in this list has a
  3081. // non-empty value. This may be used to include null fields in Patch
  3082. // requests.
  3083. NullFields []string `json:"-"`
  3084. }
  3085. func (s *GooglePrivacyDlpV2beta2DeidentifyConfig) MarshalJSON() ([]byte, error) {
  3086. type NoMethod GooglePrivacyDlpV2beta2DeidentifyConfig
  3087. raw := NoMethod(*s)
  3088. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3089. }
  3090. // GooglePrivacyDlpV2beta2DeidentifyContentRequest: Request to
  3091. // de-identify a list of items.
  3092. type GooglePrivacyDlpV2beta2DeidentifyContentRequest struct {
  3093. // DeidentifyConfig: Configuration for the de-identification of the
  3094. // content item.
  3095. // Items specified here will override the template referenced by
  3096. // the
  3097. // deidentify_template_name argument.
  3098. DeidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
  3099. // DeidentifyTemplateName: Optional template to use. Any configuration
  3100. // directly specified in
  3101. // deidentify_config will override those set in the template. Singular
  3102. // fields
  3103. // that are set in this request will replace their corresponding fields
  3104. // in the
  3105. // template. Repeated fields are appended. Singular sub-messages and
  3106. // groups
  3107. // are recursively merged.
  3108. DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"`
  3109. // InspectConfig: Configuration for the inspector.
  3110. // Items specified here will override the template referenced by
  3111. // the
  3112. // inspect_template_name argument.
  3113. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  3114. // InspectTemplateName: Optional template to use. Any configuration
  3115. // directly specified in
  3116. // inspect_config will override those set in the template. Singular
  3117. // fields
  3118. // that are set in this request will replace their corresponding fields
  3119. // in the
  3120. // template. Repeated fields are appended. Singular sub-messages and
  3121. // groups
  3122. // are recursively merged.
  3123. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  3124. // Item: The item to de-identify. Will be treated as text.
  3125. Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"`
  3126. // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to
  3127. // unconditionally include in API requests. By default, fields with
  3128. // empty values are omitted from API requests. However, any non-pointer,
  3129. // non-interface field appearing in ForceSendFields will be sent to the
  3130. // server regardless of whether the field is empty or not. This may be
  3131. // used to include empty fields in Patch requests.
  3132. ForceSendFields []string `json:"-"`
  3133. // NullFields is a list of field names (e.g. "DeidentifyConfig") to
  3134. // include in API requests with the JSON null value. By default, fields
  3135. // with empty values are omitted from API requests. However, any field
  3136. // with an empty value appearing in NullFields will be sent to the
  3137. // server as null. It is an error if a field in this list has a
  3138. // non-empty value. This may be used to include null fields in Patch
  3139. // requests.
  3140. NullFields []string `json:"-"`
  3141. }
  3142. func (s *GooglePrivacyDlpV2beta2DeidentifyContentRequest) MarshalJSON() ([]byte, error) {
  3143. type NoMethod GooglePrivacyDlpV2beta2DeidentifyContentRequest
  3144. raw := NoMethod(*s)
  3145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3146. }
  3147. // GooglePrivacyDlpV2beta2DeidentifyContentResponse: Results of
  3148. // de-identifying a ContentItem.
  3149. type GooglePrivacyDlpV2beta2DeidentifyContentResponse struct {
  3150. // Item: The de-identified item.
  3151. Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"`
  3152. // Overview: An overview of the changes that were made on the `item`.
  3153. Overview *GooglePrivacyDlpV2beta2TransformationOverview `json:"overview,omitempty"`
  3154. // ServerResponse contains the HTTP response code and headers from the
  3155. // server.
  3156. googleapi.ServerResponse `json:"-"`
  3157. // ForceSendFields is a list of field names (e.g. "Item") to
  3158. // unconditionally include in API requests. By default, fields with
  3159. // empty values are omitted from API requests. However, any non-pointer,
  3160. // non-interface field appearing in ForceSendFields will be sent to the
  3161. // server regardless of whether the field is empty or not. This may be
  3162. // used to include empty fields in Patch requests.
  3163. ForceSendFields []string `json:"-"`
  3164. // NullFields is a list of field names (e.g. "Item") to include in API
  3165. // requests with the JSON null value. By default, fields with empty
  3166. // values are omitted from API requests. However, any field with an
  3167. // empty value appearing in NullFields will be sent to the server as
  3168. // null. It is an error if a field in this list has a non-empty value.
  3169. // This may be used to include null fields in Patch requests.
  3170. NullFields []string `json:"-"`
  3171. }
  3172. func (s *GooglePrivacyDlpV2beta2DeidentifyContentResponse) MarshalJSON() ([]byte, error) {
  3173. type NoMethod GooglePrivacyDlpV2beta2DeidentifyContentResponse
  3174. raw := NoMethod(*s)
  3175. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3176. }
  3177. // GooglePrivacyDlpV2beta2DeidentifyTemplate: The DeidentifyTemplates
  3178. // contains instructions on how to deidentify content.
  3179. type GooglePrivacyDlpV2beta2DeidentifyTemplate struct {
  3180. // CreateTime: The creation timestamp of a inspectTemplate, output only
  3181. // field.
  3182. CreateTime string `json:"createTime,omitempty"`
  3183. // DeidentifyConfig: ///////////// // The core content of the template
  3184. // // ///////////////
  3185. DeidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
  3186. // Description: Short description (max 256 chars).
  3187. Description string `json:"description,omitempty"`
  3188. // DisplayName: Display name (max 256 chars).
  3189. DisplayName string `json:"displayName,omitempty"`
  3190. // Name: The template name. Output only.
  3191. //
  3192. // The template will have one of the following
  3193. // formats:
  3194. // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID`
  3195. // OR
  3196. // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
  3197. Name string `json:"name,omitempty"`
  3198. // UpdateTime: The last update timestamp of a inspectTemplate, output
  3199. // only field.
  3200. UpdateTime string `json:"updateTime,omitempty"`
  3201. // ServerResponse contains the HTTP response code and headers from the
  3202. // server.
  3203. googleapi.ServerResponse `json:"-"`
  3204. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3205. // unconditionally include in API requests. By default, fields with
  3206. // empty values are omitted from API requests. However, any non-pointer,
  3207. // non-interface field appearing in ForceSendFields will be sent to the
  3208. // server regardless of whether the field is empty or not. This may be
  3209. // used to include empty fields in Patch requests.
  3210. ForceSendFields []string `json:"-"`
  3211. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3212. // API requests with the JSON null value. By default, fields with empty
  3213. // values are omitted from API requests. However, any field with an
  3214. // empty value appearing in NullFields will be sent to the server as
  3215. // null. It is an error if a field in this list has a non-empty value.
  3216. // This may be used to include null fields in Patch requests.
  3217. NullFields []string `json:"-"`
  3218. }
  3219. func (s *GooglePrivacyDlpV2beta2DeidentifyTemplate) MarshalJSON() ([]byte, error) {
  3220. type NoMethod GooglePrivacyDlpV2beta2DeidentifyTemplate
  3221. raw := NoMethod(*s)
  3222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3223. }
  3224. // GooglePrivacyDlpV2beta2DetectionRule: Rule for modifying a custom
  3225. // info type to alter behavior under certain
  3226. // circumstances, depending on the specific details of the rule. Not
  3227. // supported
  3228. // for the `surrogate_type` custom info type.
  3229. type GooglePrivacyDlpV2beta2DetectionRule struct {
  3230. // HotwordRule: Hotword-based detection rule.
  3231. HotwordRule *GooglePrivacyDlpV2beta2HotwordRule `json:"hotwordRule,omitempty"`
  3232. // ForceSendFields is a list of field names (e.g. "HotwordRule") to
  3233. // unconditionally include in API requests. By default, fields with
  3234. // empty values are omitted from API requests. However, any non-pointer,
  3235. // non-interface field appearing in ForceSendFields will be sent to the
  3236. // server regardless of whether the field is empty or not. This may be
  3237. // used to include empty fields in Patch requests.
  3238. ForceSendFields []string `json:"-"`
  3239. // NullFields is a list of field names (e.g. "HotwordRule") to include
  3240. // in API requests with the JSON null value. By default, fields with
  3241. // empty values are omitted from API requests. However, any field with
  3242. // an empty value appearing in NullFields will be sent to the server as
  3243. // null. It is an error if a field in this list has a non-empty value.
  3244. // This may be used to include null fields in Patch requests.
  3245. NullFields []string `json:"-"`
  3246. }
  3247. func (s *GooglePrivacyDlpV2beta2DetectionRule) MarshalJSON() ([]byte, error) {
  3248. type NoMethod GooglePrivacyDlpV2beta2DetectionRule
  3249. raw := NoMethod(*s)
  3250. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3251. }
  3252. // GooglePrivacyDlpV2beta2Dictionary: Custom information type based on a
  3253. // dictionary of words or phrases. This can
  3254. // be used to match sensitive information specific to the data, such as
  3255. // a list
  3256. // of employee IDs or job titles.
  3257. //
  3258. // Dictionary words are case-insensitive and all characters other than
  3259. // letters
  3260. // and digits in the unicode [Basic
  3261. // Multilingual
  3262. // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#
  3263. // Basic_Multilingual_Plane)
  3264. // will be replaced with whitespace when scanning for matches, so
  3265. // the
  3266. // dictionary phrase "Sam Johnson" will match all three phrases "sam
  3267. // johnson",
  3268. // "Sam, Johnson", and "Sam (Johnson)". Additionally, the
  3269. // characters
  3270. // surrounding any match must be of a different type than the
  3271. // adjacent
  3272. // characters within the word, so letters must be next to non-letters
  3273. // and
  3274. // digits next to non-digits. For example, the dictionary word "jen"
  3275. // will
  3276. // match the first three letters of the text "jen123" but will return
  3277. // no
  3278. // matches for "jennifer".
  3279. //
  3280. // Dictionary words containing a large number of characters that are
  3281. // not
  3282. // letters or digits may result in unexpected findings because such
  3283. // characters
  3284. // are treated as whitespace.
  3285. type GooglePrivacyDlpV2beta2Dictionary struct {
  3286. // WordList: List of words or phrases to search for.
  3287. WordList *GooglePrivacyDlpV2beta2WordList `json:"wordList,omitempty"`
  3288. // ForceSendFields is a list of field names (e.g. "WordList") to
  3289. // unconditionally include in API requests. By default, fields with
  3290. // empty values are omitted from API requests. However, any non-pointer,
  3291. // non-interface field appearing in ForceSendFields will be sent to the
  3292. // server regardless of whether the field is empty or not. This may be
  3293. // used to include empty fields in Patch requests.
  3294. ForceSendFields []string `json:"-"`
  3295. // NullFields is a list of field names (e.g. "WordList") to include in
  3296. // API requests with the JSON null value. By default, fields with empty
  3297. // values are omitted from API requests. However, any field with an
  3298. // empty value appearing in NullFields will be sent to the server as
  3299. // null. It is an error if a field in this list has a non-empty value.
  3300. // This may be used to include null fields in Patch requests.
  3301. NullFields []string `json:"-"`
  3302. }
  3303. func (s *GooglePrivacyDlpV2beta2Dictionary) MarshalJSON() ([]byte, error) {
  3304. type NoMethod GooglePrivacyDlpV2beta2Dictionary
  3305. raw := NoMethod(*s)
  3306. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3307. }
  3308. // GooglePrivacyDlpV2beta2DlpJob: Combines all of the information about
  3309. // a DLP job.
  3310. type GooglePrivacyDlpV2beta2DlpJob struct {
  3311. // CreateTime: Time when the job was created.
  3312. CreateTime string `json:"createTime,omitempty"`
  3313. // EndTime: Time when the job finished.
  3314. EndTime string `json:"endTime,omitempty"`
  3315. // ErrorResults: A stream of errors encountered running the job.
  3316. ErrorResults []*GoogleRpcStatus `json:"errorResults,omitempty"`
  3317. // InspectDetails: Results from inspecting a data source.
  3318. InspectDetails *GooglePrivacyDlpV2beta2InspectDataSourceDetails `json:"inspectDetails,omitempty"`
  3319. // JobTriggerName: If created by a job trigger, the resource name of the
  3320. // trigger that
  3321. // instantiated the job.
  3322. JobTriggerName string `json:"jobTriggerName,omitempty"`
  3323. // Name: The server-assigned name.
  3324. Name string `json:"name,omitempty"`
  3325. // RiskDetails: Results from analyzing risk of a data source.
  3326. RiskDetails *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"`
  3327. // StartTime: Time when the job started.
  3328. StartTime string `json:"startTime,omitempty"`
  3329. // State: State of a job.
  3330. //
  3331. // Possible values:
  3332. // "JOB_STATE_UNSPECIFIED"
  3333. // "PENDING" - The job has not yet started.
  3334. // "RUNNING" - The job is currently running.
  3335. // "DONE" - The job is no longer running.
  3336. // "CANCELED" - The job was canceled before it could complete.
  3337. // "FAILED" - The job had an error and did not complete.
  3338. State string `json:"state,omitempty"`
  3339. // Type: The type of job.
  3340. //
  3341. // Possible values:
  3342. // "DLP_JOB_TYPE_UNSPECIFIED"
  3343. // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data.
  3344. // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation.
  3345. Type string `json:"type,omitempty"`
  3346. // ServerResponse contains the HTTP response code and headers from the
  3347. // server.
  3348. googleapi.ServerResponse `json:"-"`
  3349. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3350. // unconditionally include in API requests. By default, fields with
  3351. // empty values are omitted from API requests. However, any non-pointer,
  3352. // non-interface field appearing in ForceSendFields will be sent to the
  3353. // server regardless of whether the field is empty or not. This may be
  3354. // used to include empty fields in Patch requests.
  3355. ForceSendFields []string `json:"-"`
  3356. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3357. // API requests with the JSON null value. By default, fields with empty
  3358. // values are omitted from API requests. However, any field with an
  3359. // empty value appearing in NullFields will be sent to the server as
  3360. // null. It is an error if a field in this list has a non-empty value.
  3361. // This may be used to include null fields in Patch requests.
  3362. NullFields []string `json:"-"`
  3363. }
  3364. func (s *GooglePrivacyDlpV2beta2DlpJob) MarshalJSON() ([]byte, error) {
  3365. type NoMethod GooglePrivacyDlpV2beta2DlpJob
  3366. raw := NoMethod(*s)
  3367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3368. }
  3369. // GooglePrivacyDlpV2beta2EntityId: An entity in a dataset is a field or
  3370. // set of fields that correspond to a
  3371. // single person. For example, in medical records the `EntityId` might
  3372. // be
  3373. // a patient identifier, or for financial records it might be an
  3374. // account
  3375. // identifier. This message is used when generalizations or analysis
  3376. // must be
  3377. // consistent across multiple rows pertaining to the same entity.
  3378. type GooglePrivacyDlpV2beta2EntityId struct {
  3379. // Field: Composite key indicating which field contains the entity
  3380. // identifier.
  3381. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  3382. // ForceSendFields is a list of field names (e.g. "Field") to
  3383. // unconditionally include in API requests. By default, fields with
  3384. // empty values are omitted from API requests. However, any non-pointer,
  3385. // non-interface field appearing in ForceSendFields will be sent to the
  3386. // server regardless of whether the field is empty or not. This may be
  3387. // used to include empty fields in Patch requests.
  3388. ForceSendFields []string `json:"-"`
  3389. // NullFields is a list of field names (e.g. "Field") to include in API
  3390. // requests with the JSON null value. By default, fields with empty
  3391. // values are omitted from API requests. However, any field with an
  3392. // empty value appearing in NullFields will be sent to the server as
  3393. // null. It is an error if a field in this list has a non-empty value.
  3394. // This may be used to include null fields in Patch requests.
  3395. NullFields []string `json:"-"`
  3396. }
  3397. func (s *GooglePrivacyDlpV2beta2EntityId) MarshalJSON() ([]byte, error) {
  3398. type NoMethod GooglePrivacyDlpV2beta2EntityId
  3399. raw := NoMethod(*s)
  3400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3401. }
  3402. // GooglePrivacyDlpV2beta2Error: The results of an unsuccessful
  3403. // activation of the JobTrigger.
  3404. type GooglePrivacyDlpV2beta2Error struct {
  3405. Details *GoogleRpcStatus `json:"details,omitempty"`
  3406. // Timestamps: The times the error occurred.
  3407. Timestamps []string `json:"timestamps,omitempty"`
  3408. // ForceSendFields is a list of field names (e.g. "Details") to
  3409. // unconditionally include in API requests. By default, fields with
  3410. // empty values are omitted from API requests. However, any non-pointer,
  3411. // non-interface field appearing in ForceSendFields will be sent to the
  3412. // server regardless of whether the field is empty or not. This may be
  3413. // used to include empty fields in Patch requests.
  3414. ForceSendFields []string `json:"-"`
  3415. // NullFields is a list of field names (e.g. "Details") to include in
  3416. // API requests with the JSON null value. By default, fields with empty
  3417. // values are omitted from API requests. However, any field with an
  3418. // empty value appearing in NullFields will be sent to the server as
  3419. // null. It is an error if a field in this list has a non-empty value.
  3420. // This may be used to include null fields in Patch requests.
  3421. NullFields []string `json:"-"`
  3422. }
  3423. func (s *GooglePrivacyDlpV2beta2Error) MarshalJSON() ([]byte, error) {
  3424. type NoMethod GooglePrivacyDlpV2beta2Error
  3425. raw := NoMethod(*s)
  3426. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3427. }
  3428. // GooglePrivacyDlpV2beta2Expressions: An expression, consisting or an
  3429. // operator and conditions.
  3430. type GooglePrivacyDlpV2beta2Expressions struct {
  3431. Conditions *GooglePrivacyDlpV2beta2Conditions `json:"conditions,omitempty"`
  3432. // LogicalOperator: The operator to apply to the result of conditions.
  3433. // Default and currently
  3434. // only supported value is `AND`.
  3435. //
  3436. // Possible values:
  3437. // "LOGICAL_OPERATOR_UNSPECIFIED"
  3438. // "AND"
  3439. LogicalOperator string `json:"logicalOperator,omitempty"`
  3440. // ForceSendFields is a list of field names (e.g. "Conditions") to
  3441. // unconditionally include in API requests. By default, fields with
  3442. // empty values are omitted from API requests. However, any non-pointer,
  3443. // non-interface field appearing in ForceSendFields will be sent to the
  3444. // server regardless of whether the field is empty or not. This may be
  3445. // used to include empty fields in Patch requests.
  3446. ForceSendFields []string `json:"-"`
  3447. // NullFields is a list of field names (e.g. "Conditions") to include in
  3448. // API requests with the JSON null value. By default, fields with empty
  3449. // values are omitted from API requests. However, any field with an
  3450. // empty value appearing in NullFields will be sent to the server as
  3451. // null. It is an error if a field in this list has a non-empty value.
  3452. // This may be used to include null fields in Patch requests.
  3453. NullFields []string `json:"-"`
  3454. }
  3455. func (s *GooglePrivacyDlpV2beta2Expressions) MarshalJSON() ([]byte, error) {
  3456. type NoMethod GooglePrivacyDlpV2beta2Expressions
  3457. raw := NoMethod(*s)
  3458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3459. }
  3460. // GooglePrivacyDlpV2beta2FieldId: General identifier of a data field in
  3461. // a storage service.
  3462. type GooglePrivacyDlpV2beta2FieldId struct {
  3463. // Name: Name describing the field.
  3464. Name string `json:"name,omitempty"`
  3465. // ForceSendFields is a list of field names (e.g. "Name") to
  3466. // unconditionally include in API requests. By default, fields with
  3467. // empty values are omitted from API requests. However, any non-pointer,
  3468. // non-interface field appearing in ForceSendFields will be sent to the
  3469. // server regardless of whether the field is empty or not. This may be
  3470. // used to include empty fields in Patch requests.
  3471. ForceSendFields []string `json:"-"`
  3472. // NullFields is a list of field names (e.g. "Name") to include in API
  3473. // requests with the JSON null value. By default, fields with empty
  3474. // values are omitted from API requests. However, any field with an
  3475. // empty value appearing in NullFields will be sent to the server as
  3476. // null. It is an error if a field in this list has a non-empty value.
  3477. // This may be used to include null fields in Patch requests.
  3478. NullFields []string `json:"-"`
  3479. }
  3480. func (s *GooglePrivacyDlpV2beta2FieldId) MarshalJSON() ([]byte, error) {
  3481. type NoMethod GooglePrivacyDlpV2beta2FieldId
  3482. raw := NoMethod(*s)
  3483. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3484. }
  3485. // GooglePrivacyDlpV2beta2FieldTransformation: The transformation to
  3486. // apply to the field.
  3487. type GooglePrivacyDlpV2beta2FieldTransformation struct {
  3488. // Condition: Only apply the transformation if the condition evaluates
  3489. // to true for the
  3490. // given `RecordCondition`. The conditions are allowed to reference
  3491. // fields
  3492. // that are not used in the actual transformation. [optional]
  3493. //
  3494. // Example Use Cases:
  3495. //
  3496. // - Apply a different bucket transformation to an age column if the zip
  3497. // code
  3498. // column for the same record is within a specific range.
  3499. // - Redact a field if the date of birth field is greater than 85.
  3500. Condition *GooglePrivacyDlpV2beta2RecordCondition `json:"condition,omitempty"`
  3501. // Fields: Input field(s) to apply the transformation to. [required]
  3502. Fields []*GooglePrivacyDlpV2beta2FieldId `json:"fields,omitempty"`
  3503. // InfoTypeTransformations: Treat the contents of the field as free
  3504. // text, and selectively
  3505. // transform content that matches an `InfoType`.
  3506. InfoTypeTransformations *GooglePrivacyDlpV2beta2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  3507. // PrimitiveTransformation: Apply the transformation to the entire
  3508. // field.
  3509. PrimitiveTransformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  3510. // ForceSendFields is a list of field names (e.g. "Condition") to
  3511. // unconditionally include in API requests. By default, fields with
  3512. // empty values are omitted from API requests. However, any non-pointer,
  3513. // non-interface field appearing in ForceSendFields will be sent to the
  3514. // server regardless of whether the field is empty or not. This may be
  3515. // used to include empty fields in Patch requests.
  3516. ForceSendFields []string `json:"-"`
  3517. // NullFields is a list of field names (e.g. "Condition") to include in
  3518. // API requests with the JSON null value. By default, fields with empty
  3519. // values are omitted from API requests. However, any field with an
  3520. // empty value appearing in NullFields will be sent to the server as
  3521. // null. It is an error if a field in this list has a non-empty value.
  3522. // This may be used to include null fields in Patch requests.
  3523. NullFields []string `json:"-"`
  3524. }
  3525. func (s *GooglePrivacyDlpV2beta2FieldTransformation) MarshalJSON() ([]byte, error) {
  3526. type NoMethod GooglePrivacyDlpV2beta2FieldTransformation
  3527. raw := NoMethod(*s)
  3528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3529. }
  3530. // GooglePrivacyDlpV2beta2FileSet: Set of files to scan.
  3531. type GooglePrivacyDlpV2beta2FileSet struct {
  3532. // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard
  3533. // in the
  3534. // path is allowed.
  3535. Url string `json:"url,omitempty"`
  3536. // ForceSendFields is a list of field names (e.g. "Url") to
  3537. // unconditionally include in API requests. By default, fields with
  3538. // empty values are omitted from API requests. However, any non-pointer,
  3539. // non-interface field appearing in ForceSendFields will be sent to the
  3540. // server regardless of whether the field is empty or not. This may be
  3541. // used to include empty fields in Patch requests.
  3542. ForceSendFields []string `json:"-"`
  3543. // NullFields is a list of field names (e.g. "Url") to include in API
  3544. // requests with the JSON null value. By default, fields with empty
  3545. // values are omitted from API requests. However, any field with an
  3546. // empty value appearing in NullFields will be sent to the server as
  3547. // null. It is an error if a field in this list has a non-empty value.
  3548. // This may be used to include null fields in Patch requests.
  3549. NullFields []string `json:"-"`
  3550. }
  3551. func (s *GooglePrivacyDlpV2beta2FileSet) MarshalJSON() ([]byte, error) {
  3552. type NoMethod GooglePrivacyDlpV2beta2FileSet
  3553. raw := NoMethod(*s)
  3554. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3555. }
  3556. // GooglePrivacyDlpV2beta2Finding: Represents a piece of potentially
  3557. // sensitive content.
  3558. type GooglePrivacyDlpV2beta2Finding struct {
  3559. // CreateTime: Timestamp when finding was detected.
  3560. CreateTime string `json:"createTime,omitempty"`
  3561. // InfoType: The type of content that might have been found.
  3562. // Provided if requested by the `InspectConfig`.
  3563. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  3564. // Likelihood: Estimate of how likely it is that the `info_type` is
  3565. // correct.
  3566. //
  3567. // Possible values:
  3568. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  3569. // likelihoods is included.
  3570. // "VERY_UNLIKELY" - Few matching elements.
  3571. // "UNLIKELY"
  3572. // "POSSIBLE" - Some matching elements.
  3573. // "LIKELY"
  3574. // "VERY_LIKELY" - Many matching elements.
  3575. Likelihood string `json:"likelihood,omitempty"`
  3576. // Location: Where the content was found.
  3577. Location *GooglePrivacyDlpV2beta2Location `json:"location,omitempty"`
  3578. // Quote: The content that was found. Even if the content is not
  3579. // textual, it
  3580. // may be converted to a textual representation here.
  3581. // Provided if requested by the `InspectConfig` and the finding is
  3582. // less than or equal to 4096 bytes long. If the finding exceeds 4096
  3583. // bytes
  3584. // in length, the quote may be omitted.
  3585. Quote string `json:"quote,omitempty"`
  3586. // QuoteInfo: Contains data parsed from quotes. Only populated if
  3587. // include_quote was set
  3588. // to true and a supported infoType was requested. Currently
  3589. // supported
  3590. // infoTypes: DATE, DATE_OF_BIRTH and TIME.
  3591. QuoteInfo *GooglePrivacyDlpV2beta2QuoteInfo `json:"quoteInfo,omitempty"`
  3592. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3593. // unconditionally include in API requests. By default, fields with
  3594. // empty values are omitted from API requests. However, any non-pointer,
  3595. // non-interface field appearing in ForceSendFields will be sent to the
  3596. // server regardless of whether the field is empty or not. This may be
  3597. // used to include empty fields in Patch requests.
  3598. ForceSendFields []string `json:"-"`
  3599. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3600. // API requests with the JSON null value. By default, fields with empty
  3601. // values are omitted from API requests. However, any field with an
  3602. // empty value appearing in NullFields will be sent to the server as
  3603. // null. It is an error if a field in this list has a non-empty value.
  3604. // This may be used to include null fields in Patch requests.
  3605. NullFields []string `json:"-"`
  3606. }
  3607. func (s *GooglePrivacyDlpV2beta2Finding) MarshalJSON() ([]byte, error) {
  3608. type NoMethod GooglePrivacyDlpV2beta2Finding
  3609. raw := NoMethod(*s)
  3610. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3611. }
  3612. type GooglePrivacyDlpV2beta2FindingLimits struct {
  3613. // MaxFindingsPerInfoType: Configuration of findings limit given for
  3614. // specified infoTypes.
  3615. MaxFindingsPerInfoType []*GooglePrivacyDlpV2beta2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"`
  3616. // MaxFindingsPerItem: Max number of findings that will be returned for
  3617. // each item scanned.
  3618. // When set within `InspectDataSourceRequest`,
  3619. // the maximum returned is 1000 regardless if this is set higher.
  3620. // When set within `InspectContentRequest`, this field is ignored.
  3621. MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"`
  3622. // MaxFindingsPerRequest: Max number of findings that will be returned
  3623. // per request/job.
  3624. // When set within `InspectContentRequest`, the maximum returned is
  3625. // 1000
  3626. // regardless if this is set higher.
  3627. MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"`
  3628. // ForceSendFields is a list of field names (e.g.
  3629. // "MaxFindingsPerInfoType") to unconditionally include in API requests.
  3630. // By default, fields with empty values are omitted from API requests.
  3631. // However, any non-pointer, non-interface field appearing in
  3632. // ForceSendFields will be sent to the server regardless of whether the
  3633. // field is empty or not. This may be used to include empty fields in
  3634. // Patch requests.
  3635. ForceSendFields []string `json:"-"`
  3636. // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType")
  3637. // to include in API requests with the JSON null value. By default,
  3638. // fields with empty values are omitted from API requests. However, any
  3639. // field with an empty value appearing in NullFields will be sent to the
  3640. // server as null. It is an error if a field in this list has a
  3641. // non-empty value. This may be used to include null fields in Patch
  3642. // requests.
  3643. NullFields []string `json:"-"`
  3644. }
  3645. func (s *GooglePrivacyDlpV2beta2FindingLimits) MarshalJSON() ([]byte, error) {
  3646. type NoMethod GooglePrivacyDlpV2beta2FindingLimits
  3647. raw := NoMethod(*s)
  3648. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3649. }
  3650. // GooglePrivacyDlpV2beta2FixedSizeBucketingConfig: Buckets values based
  3651. // on fixed size ranges. The
  3652. // Bucketing transformation can provide all of this functionality,
  3653. // but requires more configuration. This message is provided as a
  3654. // convenience to
  3655. // the user for simple bucketing strategies.
  3656. //
  3657. // The transformed value will be a hyphenated string
  3658. // of
  3659. // <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound
  3660. // = 20
  3661. // all values that are within this bucket will be replaced with
  3662. // "10-20".
  3663. //
  3664. // This can be used on data of type: double, long.
  3665. //
  3666. // If the bound Value type differs from the type of data
  3667. // being transformed, we will first attempt converting the type of the
  3668. // data to
  3669. // be transformed to match the type of the bound before comparing.
  3670. type GooglePrivacyDlpV2beta2FixedSizeBucketingConfig struct {
  3671. // BucketSize: Size of each bucket (except for minimum and maximum
  3672. // buckets). So if
  3673. // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then
  3674. // the
  3675. // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50,
  3676. // 50-60,
  3677. // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
  3678. // [Required].
  3679. BucketSize float64 `json:"bucketSize,omitempty"`
  3680. // LowerBound: Lower bound value of buckets. All values less than
  3681. // `lower_bound` are
  3682. // grouped together into a single bucket; for example if `lower_bound` =
  3683. // 10,
  3684. // then all values less than 10 are replaced with the value “-10”.
  3685. // [Required].
  3686. LowerBound *GooglePrivacyDlpV2beta2Value `json:"lowerBound,omitempty"`
  3687. // UpperBound: Upper bound value of buckets. All values greater than
  3688. // upper_bound are
  3689. // grouped together into a single bucket; for example if `upper_bound` =
  3690. // 89,
  3691. // then all values greater than 89 are replaced with the value
  3692. // “89+”.
  3693. // [Required].
  3694. UpperBound *GooglePrivacyDlpV2beta2Value `json:"upperBound,omitempty"`
  3695. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  3696. // unconditionally include in API requests. By default, fields with
  3697. // empty values are omitted from API requests. However, any non-pointer,
  3698. // non-interface field appearing in ForceSendFields will be sent to the
  3699. // server regardless of whether the field is empty or not. This may be
  3700. // used to include empty fields in Patch requests.
  3701. ForceSendFields []string `json:"-"`
  3702. // NullFields is a list of field names (e.g. "BucketSize") to include in
  3703. // API requests with the JSON null value. By default, fields with empty
  3704. // values are omitted from API requests. However, any field with an
  3705. // empty value appearing in NullFields will be sent to the server as
  3706. // null. It is an error if a field in this list has a non-empty value.
  3707. // This may be used to include null fields in Patch requests.
  3708. NullFields []string `json:"-"`
  3709. }
  3710. func (s *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) {
  3711. type NoMethod GooglePrivacyDlpV2beta2FixedSizeBucketingConfig
  3712. raw := NoMethod(*s)
  3713. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3714. }
  3715. func (s *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error {
  3716. type NoMethod GooglePrivacyDlpV2beta2FixedSizeBucketingConfig
  3717. var s1 struct {
  3718. BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
  3719. *NoMethod
  3720. }
  3721. s1.NoMethod = (*NoMethod)(s)
  3722. if err := json.Unmarshal(data, &s1); err != nil {
  3723. return err
  3724. }
  3725. s.BucketSize = float64(s1.BucketSize)
  3726. return nil
  3727. }
  3728. // GooglePrivacyDlpV2beta2HotwordRule: Detection rule that adjusts the
  3729. // likelihood of findings within a certain
  3730. // proximity of hotwords.
  3731. type GooglePrivacyDlpV2beta2HotwordRule struct {
  3732. // HotwordRegex: Regex pattern defining what qualifies as a hotword.
  3733. HotwordRegex *GooglePrivacyDlpV2beta2Regex `json:"hotwordRegex,omitempty"`
  3734. // LikelihoodAdjustment: Likelihood adjustment to apply to all matching
  3735. // findings.
  3736. LikelihoodAdjustment *GooglePrivacyDlpV2beta2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"`
  3737. // Proximity: Proximity of the finding within which the entire hotword
  3738. // must reside.
  3739. // The total length of the window cannot exceed 1000 characters. Note
  3740. // that
  3741. // the finding itself will be included in the window, so that hotwords
  3742. // may
  3743. // be used to match substrings of the finding itself. For example,
  3744. // the
  3745. // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could
  3746. // be
  3747. // adjusted upwards if the area code is known to be the local area code
  3748. // of
  3749. // a company office using the hotword regex "\(xxx\)", where "xxx"
  3750. // is the area code in question.
  3751. Proximity *GooglePrivacyDlpV2beta2Proximity `json:"proximity,omitempty"`
  3752. // ForceSendFields is a list of field names (e.g. "HotwordRegex") to
  3753. // unconditionally include in API requests. By default, fields with
  3754. // empty values are omitted from API requests. However, any non-pointer,
  3755. // non-interface field appearing in ForceSendFields will be sent to the
  3756. // server regardless of whether the field is empty or not. This may be
  3757. // used to include empty fields in Patch requests.
  3758. ForceSendFields []string `json:"-"`
  3759. // NullFields is a list of field names (e.g. "HotwordRegex") to include
  3760. // in API requests with the JSON null value. By default, fields with
  3761. // empty values are omitted from API requests. However, any field with
  3762. // an empty value appearing in NullFields will be sent to the server as
  3763. // null. It is an error if a field in this list has a non-empty value.
  3764. // This may be used to include null fields in Patch requests.
  3765. NullFields []string `json:"-"`
  3766. }
  3767. func (s *GooglePrivacyDlpV2beta2HotwordRule) MarshalJSON() ([]byte, error) {
  3768. type NoMethod GooglePrivacyDlpV2beta2HotwordRule
  3769. raw := NoMethod(*s)
  3770. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3771. }
  3772. // GooglePrivacyDlpV2beta2ImageLocation: Bounding box encompassing
  3773. // detected text within an image.
  3774. type GooglePrivacyDlpV2beta2ImageLocation struct {
  3775. // Height: Height of the bounding box in pixels.
  3776. Height int64 `json:"height,omitempty"`
  3777. // Left: Left coordinate of the bounding box. (0,0) is upper left.
  3778. Left int64 `json:"left,omitempty"`
  3779. // Top: Top coordinate of the bounding box. (0,0) is upper left.
  3780. Top int64 `json:"top,omitempty"`
  3781. // Width: Width of the bounding box in pixels.
  3782. Width int64 `json:"width,omitempty"`
  3783. // ForceSendFields is a list of field names (e.g. "Height") to
  3784. // unconditionally include in API requests. By default, fields with
  3785. // empty values are omitted from API requests. However, any non-pointer,
  3786. // non-interface field appearing in ForceSendFields will be sent to the
  3787. // server regardless of whether the field is empty or not. This may be
  3788. // used to include empty fields in Patch requests.
  3789. ForceSendFields []string `json:"-"`
  3790. // NullFields is a list of field names (e.g. "Height") to include in API
  3791. // requests with the JSON null value. By default, fields with empty
  3792. // values are omitted from API requests. However, any field with an
  3793. // empty value appearing in NullFields will be sent to the server as
  3794. // null. It is an error if a field in this list has a non-empty value.
  3795. // This may be used to include null fields in Patch requests.
  3796. NullFields []string `json:"-"`
  3797. }
  3798. func (s *GooglePrivacyDlpV2beta2ImageLocation) MarshalJSON() ([]byte, error) {
  3799. type NoMethod GooglePrivacyDlpV2beta2ImageLocation
  3800. raw := NoMethod(*s)
  3801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3802. }
  3803. // GooglePrivacyDlpV2beta2ImageRedactionConfig: Configuration for
  3804. // determining how redaction of images should occur.
  3805. type GooglePrivacyDlpV2beta2ImageRedactionConfig struct {
  3806. // InfoType: Only one per info_type should be provided per request. If
  3807. // not
  3808. // specified, and redact_all_text is false, the DLP API will redact
  3809. // all
  3810. // text that it matches against all info_types that are found, but
  3811. // not
  3812. // specified in another ImageRedactionConfig.
  3813. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  3814. // RedactAllText: If true, all text found in the image, regardless
  3815. // whether it matches an
  3816. // info_type, is redacted.
  3817. RedactAllText bool `json:"redactAllText,omitempty"`
  3818. // RedactionColor: The color to use when redacting content from an
  3819. // image. If not specified,
  3820. // the default is black.
  3821. RedactionColor *GooglePrivacyDlpV2beta2Color `json:"redactionColor,omitempty"`
  3822. // ForceSendFields is a list of field names (e.g. "InfoType") to
  3823. // unconditionally include in API requests. By default, fields with
  3824. // empty values are omitted from API requests. However, any non-pointer,
  3825. // non-interface field appearing in ForceSendFields will be sent to the
  3826. // server regardless of whether the field is empty or not. This may be
  3827. // used to include empty fields in Patch requests.
  3828. ForceSendFields []string `json:"-"`
  3829. // NullFields is a list of field names (e.g. "InfoType") to include in
  3830. // API requests with the JSON null value. By default, fields with empty
  3831. // values are omitted from API requests. However, any field with an
  3832. // empty value appearing in NullFields will be sent to the server as
  3833. // null. It is an error if a field in this list has a non-empty value.
  3834. // This may be used to include null fields in Patch requests.
  3835. NullFields []string `json:"-"`
  3836. }
  3837. func (s *GooglePrivacyDlpV2beta2ImageRedactionConfig) MarshalJSON() ([]byte, error) {
  3838. type NoMethod GooglePrivacyDlpV2beta2ImageRedactionConfig
  3839. raw := NoMethod(*s)
  3840. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3841. }
  3842. // GooglePrivacyDlpV2beta2InfoType: Type of information detected by the
  3843. // API.
  3844. type GooglePrivacyDlpV2beta2InfoType struct {
  3845. // Name: Name of the information type.
  3846. Name string `json:"name,omitempty"`
  3847. // ForceSendFields is a list of field names (e.g. "Name") to
  3848. // unconditionally include in API requests. By default, fields with
  3849. // empty values are omitted from API requests. However, any non-pointer,
  3850. // non-interface field appearing in ForceSendFields will be sent to the
  3851. // server regardless of whether the field is empty or not. This may be
  3852. // used to include empty fields in Patch requests.
  3853. ForceSendFields []string `json:"-"`
  3854. // NullFields is a list of field names (e.g. "Name") to include in API
  3855. // requests with the JSON null value. By default, fields with empty
  3856. // values are omitted from API requests. However, any field with an
  3857. // empty value appearing in NullFields will be sent to the server as
  3858. // null. It is an error if a field in this list has a non-empty value.
  3859. // This may be used to include null fields in Patch requests.
  3860. NullFields []string `json:"-"`
  3861. }
  3862. func (s *GooglePrivacyDlpV2beta2InfoType) MarshalJSON() ([]byte, error) {
  3863. type NoMethod GooglePrivacyDlpV2beta2InfoType
  3864. raw := NoMethod(*s)
  3865. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3866. }
  3867. // GooglePrivacyDlpV2beta2InfoTypeDescription: InfoType description.
  3868. type GooglePrivacyDlpV2beta2InfoTypeDescription struct {
  3869. // DisplayName: Human readable form of the infoType name.
  3870. DisplayName string `json:"displayName,omitempty"`
  3871. // Name: Internal name of the infoType.
  3872. Name string `json:"name,omitempty"`
  3873. // SupportedBy: Which parts of the API supports this InfoType.
  3874. //
  3875. // Possible values:
  3876. // "ENUM_TYPE_UNSPECIFIED"
  3877. // "INSPECT" - Supported by the inspect operations.
  3878. // "RISK_ANALYSIS" - Supported by the risk analysis operations.
  3879. SupportedBy []string `json:"supportedBy,omitempty"`
  3880. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  3881. // unconditionally include in API requests. By default, fields with
  3882. // empty values are omitted from API requests. However, any non-pointer,
  3883. // non-interface field appearing in ForceSendFields will be sent to the
  3884. // server regardless of whether the field is empty or not. This may be
  3885. // used to include empty fields in Patch requests.
  3886. ForceSendFields []string `json:"-"`
  3887. // NullFields is a list of field names (e.g. "DisplayName") to include
  3888. // in API requests with the JSON null value. By default, fields with
  3889. // empty values are omitted from API requests. However, any field with
  3890. // an empty value appearing in NullFields will be sent to the server as
  3891. // null. It is an error if a field in this list has a non-empty value.
  3892. // This may be used to include null fields in Patch requests.
  3893. NullFields []string `json:"-"`
  3894. }
  3895. func (s *GooglePrivacyDlpV2beta2InfoTypeDescription) MarshalJSON() ([]byte, error) {
  3896. type NoMethod GooglePrivacyDlpV2beta2InfoTypeDescription
  3897. raw := NoMethod(*s)
  3898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3899. }
  3900. // GooglePrivacyDlpV2beta2InfoTypeLimit: Max findings configuration per
  3901. // infoType, per content item or long
  3902. // running DlpJob.
  3903. type GooglePrivacyDlpV2beta2InfoTypeLimit struct {
  3904. // InfoType: Type of information the findings limit applies to. Only one
  3905. // limit per
  3906. // info_type should be provided. If InfoTypeLimit does not have
  3907. // an
  3908. // info_type, the DLP API applies the limit against all info_types
  3909. // that
  3910. // are found but not specified in another InfoTypeLimit.
  3911. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  3912. // MaxFindings: Max findings limit for the given infoType.
  3913. MaxFindings int64 `json:"maxFindings,omitempty"`
  3914. // ForceSendFields is a list of field names (e.g. "InfoType") to
  3915. // unconditionally include in API requests. By default, fields with
  3916. // empty values are omitted from API requests. However, any non-pointer,
  3917. // non-interface field appearing in ForceSendFields will be sent to the
  3918. // server regardless of whether the field is empty or not. This may be
  3919. // used to include empty fields in Patch requests.
  3920. ForceSendFields []string `json:"-"`
  3921. // NullFields is a list of field names (e.g. "InfoType") to include in
  3922. // API requests with the JSON null value. By default, fields with empty
  3923. // values are omitted from API requests. However, any field with an
  3924. // empty value appearing in NullFields will be sent to the server as
  3925. // null. It is an error if a field in this list has a non-empty value.
  3926. // This may be used to include null fields in Patch requests.
  3927. NullFields []string `json:"-"`
  3928. }
  3929. func (s *GooglePrivacyDlpV2beta2InfoTypeLimit) MarshalJSON() ([]byte, error) {
  3930. type NoMethod GooglePrivacyDlpV2beta2InfoTypeLimit
  3931. raw := NoMethod(*s)
  3932. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3933. }
  3934. // GooglePrivacyDlpV2beta2InfoTypeStatistics: Statistics regarding a
  3935. // specific InfoType.
  3936. type GooglePrivacyDlpV2beta2InfoTypeStatistics struct {
  3937. // Count: Number of findings for this infoType.
  3938. Count int64 `json:"count,omitempty,string"`
  3939. // InfoType: The type of finding this stat is for.
  3940. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  3941. // ForceSendFields is a list of field names (e.g. "Count") to
  3942. // unconditionally include in API requests. By default, fields with
  3943. // empty values are omitted from API requests. However, any non-pointer,
  3944. // non-interface field appearing in ForceSendFields will be sent to the
  3945. // server regardless of whether the field is empty or not. This may be
  3946. // used to include empty fields in Patch requests.
  3947. ForceSendFields []string `json:"-"`
  3948. // NullFields is a list of field names (e.g. "Count") to include in API
  3949. // requests with the JSON null value. By default, fields with empty
  3950. // values are omitted from API requests. However, any field with an
  3951. // empty value appearing in NullFields will be sent to the server as
  3952. // null. It is an error if a field in this list has a non-empty value.
  3953. // This may be used to include null fields in Patch requests.
  3954. NullFields []string `json:"-"`
  3955. }
  3956. func (s *GooglePrivacyDlpV2beta2InfoTypeStatistics) MarshalJSON() ([]byte, error) {
  3957. type NoMethod GooglePrivacyDlpV2beta2InfoTypeStatistics
  3958. raw := NoMethod(*s)
  3959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3960. }
  3961. // GooglePrivacyDlpV2beta2InfoTypeTransformation: A transformation to
  3962. // apply to text that is identified as a specific
  3963. // info_type.
  3964. type GooglePrivacyDlpV2beta2InfoTypeTransformation struct {
  3965. // InfoTypes: InfoTypes to apply the transformation to. Empty list will
  3966. // match all
  3967. // available infoTypes for this transformation.
  3968. InfoTypes []*GooglePrivacyDlpV2beta2InfoType `json:"infoTypes,omitempty"`
  3969. // PrimitiveTransformation: Primitive transformation to apply to the
  3970. // infoType. [required]
  3971. PrimitiveTransformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  3972. // ForceSendFields is a list of field names (e.g. "InfoTypes") to
  3973. // unconditionally include in API requests. By default, fields with
  3974. // empty values are omitted from API requests. However, any non-pointer,
  3975. // non-interface field appearing in ForceSendFields will be sent to the
  3976. // server regardless of whether the field is empty or not. This may be
  3977. // used to include empty fields in Patch requests.
  3978. ForceSendFields []string `json:"-"`
  3979. // NullFields is a list of field names (e.g. "InfoTypes") to include in
  3980. // API requests with the JSON null value. By default, fields with empty
  3981. // values are omitted from API requests. However, any field with an
  3982. // empty value appearing in NullFields will be sent to the server as
  3983. // null. It is an error if a field in this list has a non-empty value.
  3984. // This may be used to include null fields in Patch requests.
  3985. NullFields []string `json:"-"`
  3986. }
  3987. func (s *GooglePrivacyDlpV2beta2InfoTypeTransformation) MarshalJSON() ([]byte, error) {
  3988. type NoMethod GooglePrivacyDlpV2beta2InfoTypeTransformation
  3989. raw := NoMethod(*s)
  3990. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3991. }
  3992. // GooglePrivacyDlpV2beta2InfoTypeTransformations: A type of
  3993. // transformation that will scan unstructured text and
  3994. // apply various `PrimitiveTransformation`s to each finding, where
  3995. // the
  3996. // transformation is applied to only values that were identified as a
  3997. // specific
  3998. // info_type.
  3999. type GooglePrivacyDlpV2beta2InfoTypeTransformations struct {
  4000. // Transformations: Transformation for each infoType. Cannot specify
  4001. // more than one
  4002. // for a given infoType. [required]
  4003. Transformations []*GooglePrivacyDlpV2beta2InfoTypeTransformation `json:"transformations,omitempty"`
  4004. // ForceSendFields is a list of field names (e.g. "Transformations") to
  4005. // unconditionally include in API requests. By default, fields with
  4006. // empty values are omitted from API requests. However, any non-pointer,
  4007. // non-interface field appearing in ForceSendFields will be sent to the
  4008. // server regardless of whether the field is empty or not. This may be
  4009. // used to include empty fields in Patch requests.
  4010. ForceSendFields []string `json:"-"`
  4011. // NullFields is a list of field names (e.g. "Transformations") to
  4012. // include in API requests with the JSON null value. By default, fields
  4013. // with empty values are omitted from API requests. However, any field
  4014. // with an empty value appearing in NullFields will be sent to the
  4015. // server as null. It is an error if a field in this list has a
  4016. // non-empty value. This may be used to include null fields in Patch
  4017. // requests.
  4018. NullFields []string `json:"-"`
  4019. }
  4020. func (s *GooglePrivacyDlpV2beta2InfoTypeTransformations) MarshalJSON() ([]byte, error) {
  4021. type NoMethod GooglePrivacyDlpV2beta2InfoTypeTransformations
  4022. raw := NoMethod(*s)
  4023. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4024. }
  4025. // GooglePrivacyDlpV2beta2InspectConfig: Configuration description of
  4026. // the scanning process.
  4027. // When used with redactContent only info_types and min_likelihood are
  4028. // currently
  4029. // used.
  4030. type GooglePrivacyDlpV2beta2InspectConfig struct {
  4031. // CustomInfoTypes: Custom infoTypes provided by the user.
  4032. CustomInfoTypes []*GooglePrivacyDlpV2beta2CustomInfoType `json:"customInfoTypes,omitempty"`
  4033. // ExcludeInfoTypes: When true, excludes type information of the
  4034. // findings.
  4035. ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"`
  4036. // IncludeQuote: When true, a contextual quote from the data that
  4037. // triggered a finding is
  4038. // included in the response; see Finding.quote.
  4039. IncludeQuote bool `json:"includeQuote,omitempty"`
  4040. // InfoTypes: Restricts what info_types to look for. The values must
  4041. // correspond to
  4042. // InfoType values returned by ListInfoTypes or found in
  4043. // documentation.
  4044. // Empty info_types runs all enabled detectors.
  4045. InfoTypes []*GooglePrivacyDlpV2beta2InfoType `json:"infoTypes,omitempty"`
  4046. Limits *GooglePrivacyDlpV2beta2FindingLimits `json:"limits,omitempty"`
  4047. // MinLikelihood: Only returns findings equal or above this threshold.
  4048. // The default is
  4049. // POSSIBLE.
  4050. //
  4051. // Possible values:
  4052. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  4053. // likelihoods is included.
  4054. // "VERY_UNLIKELY" - Few matching elements.
  4055. // "UNLIKELY"
  4056. // "POSSIBLE" - Some matching elements.
  4057. // "LIKELY"
  4058. // "VERY_LIKELY" - Many matching elements.
  4059. MinLikelihood string `json:"minLikelihood,omitempty"`
  4060. // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") to
  4061. // unconditionally include in API requests. By default, fields with
  4062. // empty values are omitted from API requests. However, any non-pointer,
  4063. // non-interface field appearing in ForceSendFields will be sent to the
  4064. // server regardless of whether the field is empty or not. This may be
  4065. // used to include empty fields in Patch requests.
  4066. ForceSendFields []string `json:"-"`
  4067. // NullFields is a list of field names (e.g. "CustomInfoTypes") to
  4068. // include in API requests with the JSON null value. By default, fields
  4069. // with empty values are omitted from API requests. However, any field
  4070. // with an empty value appearing in NullFields will be sent to the
  4071. // server as null. It is an error if a field in this list has a
  4072. // non-empty value. This may be used to include null fields in Patch
  4073. // requests.
  4074. NullFields []string `json:"-"`
  4075. }
  4076. func (s *GooglePrivacyDlpV2beta2InspectConfig) MarshalJSON() ([]byte, error) {
  4077. type NoMethod GooglePrivacyDlpV2beta2InspectConfig
  4078. raw := NoMethod(*s)
  4079. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4080. }
  4081. // GooglePrivacyDlpV2beta2InspectContentRequest: Request to search for
  4082. // potentially sensitive info in a ContentItem.
  4083. type GooglePrivacyDlpV2beta2InspectContentRequest struct {
  4084. // InspectConfig: Configuration for the inspector. What specified here
  4085. // will override
  4086. // the template referenced by the inspect_template_name argument.
  4087. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  4088. // InspectTemplateName: Optional template to use. Any configuration
  4089. // directly specified in
  4090. // inspect_config will override those set in the template. Singular
  4091. // fields
  4092. // that are set in this request will replace their corresponding fields
  4093. // in the
  4094. // template. Repeated fields are appended. Singular sub-messages and
  4095. // groups
  4096. // are recursively merged.
  4097. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  4098. // Item: The item to inspect.
  4099. Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"`
  4100. // ForceSendFields is a list of field names (e.g. "InspectConfig") to
  4101. // unconditionally include in API requests. By default, fields with
  4102. // empty values are omitted from API requests. However, any non-pointer,
  4103. // non-interface field appearing in ForceSendFields will be sent to the
  4104. // server regardless of whether the field is empty or not. This may be
  4105. // used to include empty fields in Patch requests.
  4106. ForceSendFields []string `json:"-"`
  4107. // NullFields is a list of field names (e.g. "InspectConfig") to include
  4108. // in API requests with the JSON null value. By default, fields with
  4109. // empty values are omitted from API requests. However, any field with
  4110. // an empty value appearing in NullFields will be sent to the server as
  4111. // null. It is an error if a field in this list has a non-empty value.
  4112. // This may be used to include null fields in Patch requests.
  4113. NullFields []string `json:"-"`
  4114. }
  4115. func (s *GooglePrivacyDlpV2beta2InspectContentRequest) MarshalJSON() ([]byte, error) {
  4116. type NoMethod GooglePrivacyDlpV2beta2InspectContentRequest
  4117. raw := NoMethod(*s)
  4118. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4119. }
  4120. // GooglePrivacyDlpV2beta2InspectContentResponse: Results of inspecting
  4121. // an item.
  4122. type GooglePrivacyDlpV2beta2InspectContentResponse struct {
  4123. // Result: The findings.
  4124. Result *GooglePrivacyDlpV2beta2InspectResult `json:"result,omitempty"`
  4125. // ServerResponse contains the HTTP response code and headers from the
  4126. // server.
  4127. googleapi.ServerResponse `json:"-"`
  4128. // ForceSendFields is a list of field names (e.g. "Result") to
  4129. // unconditionally include in API requests. By default, fields with
  4130. // empty values are omitted from API requests. However, any non-pointer,
  4131. // non-interface field appearing in ForceSendFields will be sent to the
  4132. // server regardless of whether the field is empty or not. This may be
  4133. // used to include empty fields in Patch requests.
  4134. ForceSendFields []string `json:"-"`
  4135. // NullFields is a list of field names (e.g. "Result") to include in API
  4136. // requests with the JSON null value. By default, fields with empty
  4137. // values are omitted from API requests. However, any field with an
  4138. // empty value appearing in NullFields will be sent to the server as
  4139. // null. It is an error if a field in this list has a non-empty value.
  4140. // This may be used to include null fields in Patch requests.
  4141. NullFields []string `json:"-"`
  4142. }
  4143. func (s *GooglePrivacyDlpV2beta2InspectContentResponse) MarshalJSON() ([]byte, error) {
  4144. type NoMethod GooglePrivacyDlpV2beta2InspectContentResponse
  4145. raw := NoMethod(*s)
  4146. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4147. }
  4148. // GooglePrivacyDlpV2beta2InspectDataSourceDetails: The results of an
  4149. // inspect DataSource job.
  4150. type GooglePrivacyDlpV2beta2InspectDataSourceDetails struct {
  4151. // RequestedOptions: The configuration used for this job.
  4152. RequestedOptions *GooglePrivacyDlpV2beta2RequestedOptions `json:"requestedOptions,omitempty"`
  4153. // Result: A summary of the outcome of this inspect job.
  4154. Result *GooglePrivacyDlpV2beta2Result `json:"result,omitempty"`
  4155. // ForceSendFields is a list of field names (e.g. "RequestedOptions") to
  4156. // unconditionally include in API requests. By default, fields with
  4157. // empty values are omitted from API requests. However, any non-pointer,
  4158. // non-interface field appearing in ForceSendFields will be sent to the
  4159. // server regardless of whether the field is empty or not. This may be
  4160. // used to include empty fields in Patch requests.
  4161. ForceSendFields []string `json:"-"`
  4162. // NullFields is a list of field names (e.g. "RequestedOptions") to
  4163. // include in API requests with the JSON null value. By default, fields
  4164. // with empty values are omitted from API requests. However, any field
  4165. // with an empty value appearing in NullFields will be sent to the
  4166. // server as null. It is an error if a field in this list has a
  4167. // non-empty value. This may be used to include null fields in Patch
  4168. // requests.
  4169. NullFields []string `json:"-"`
  4170. }
  4171. func (s *GooglePrivacyDlpV2beta2InspectDataSourceDetails) MarshalJSON() ([]byte, error) {
  4172. type NoMethod GooglePrivacyDlpV2beta2InspectDataSourceDetails
  4173. raw := NoMethod(*s)
  4174. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4175. }
  4176. // GooglePrivacyDlpV2beta2InspectDataSourceRequest: Request for
  4177. // scheduling a scan of a data subset from a Google Platform
  4178. // data
  4179. // repository.
  4180. type GooglePrivacyDlpV2beta2InspectDataSourceRequest struct {
  4181. // JobConfig: A configuration for the job.
  4182. JobConfig *GooglePrivacyDlpV2beta2InspectJobConfig `json:"jobConfig,omitempty"`
  4183. // JobId: Optional job ID to use for the created job. If not provided, a
  4184. // job ID will
  4185. // automatically be generated. Must be unique within the project. The
  4186. // job ID
  4187. // can contain uppercase and lowercase letters, numbers, and hyphens;
  4188. // that is,
  4189. // it must match the regular expression: `[a-zA-Z\\d-]+`. The maximum
  4190. // length
  4191. // is 100 characters. Can be empty to allow the system to generate one.
  4192. JobId string `json:"jobId,omitempty"`
  4193. // ForceSendFields is a list of field names (e.g. "JobConfig") to
  4194. // unconditionally include in API requests. By default, fields with
  4195. // empty values are omitted from API requests. However, any non-pointer,
  4196. // non-interface field appearing in ForceSendFields will be sent to the
  4197. // server regardless of whether the field is empty or not. This may be
  4198. // used to include empty fields in Patch requests.
  4199. ForceSendFields []string `json:"-"`
  4200. // NullFields is a list of field names (e.g. "JobConfig") to include in
  4201. // API requests with the JSON null value. By default, fields with empty
  4202. // values are omitted from API requests. However, any field with an
  4203. // empty value appearing in NullFields will be sent to the server as
  4204. // null. It is an error if a field in this list has a non-empty value.
  4205. // This may be used to include null fields in Patch requests.
  4206. NullFields []string `json:"-"`
  4207. }
  4208. func (s *GooglePrivacyDlpV2beta2InspectDataSourceRequest) MarshalJSON() ([]byte, error) {
  4209. type NoMethod GooglePrivacyDlpV2beta2InspectDataSourceRequest
  4210. raw := NoMethod(*s)
  4211. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4212. }
  4213. type GooglePrivacyDlpV2beta2InspectJobConfig struct {
  4214. // Actions: Actions to execute at the completion of the job. Are
  4215. // executed in the order
  4216. // provided.
  4217. Actions []*GooglePrivacyDlpV2beta2Action `json:"actions,omitempty"`
  4218. // InspectConfig: How and what to scan for.
  4219. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  4220. // InspectTemplateName: If provided, will be used as the default for all
  4221. // values in InspectConfig.
  4222. // `inspect_config` will be merged into the values persisted as part of
  4223. // the
  4224. // template.
  4225. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  4226. // OutputConfig: Where to put the findings.
  4227. OutputConfig *GooglePrivacyDlpV2beta2OutputStorageConfig `json:"outputConfig,omitempty"`
  4228. // StorageConfig: The data to scan.
  4229. StorageConfig *GooglePrivacyDlpV2beta2StorageConfig `json:"storageConfig,omitempty"`
  4230. // ForceSendFields is a list of field names (e.g. "Actions") to
  4231. // unconditionally include in API requests. By default, fields with
  4232. // empty values are omitted from API requests. However, any non-pointer,
  4233. // non-interface field appearing in ForceSendFields will be sent to the
  4234. // server regardless of whether the field is empty or not. This may be
  4235. // used to include empty fields in Patch requests.
  4236. ForceSendFields []string `json:"-"`
  4237. // NullFields is a list of field names (e.g. "Actions") to include in
  4238. // API requests with the JSON null value. By default, fields with empty
  4239. // values are omitted from API requests. However, any field with an
  4240. // empty value appearing in NullFields will be sent to the server as
  4241. // null. It is an error if a field in this list has a non-empty value.
  4242. // This may be used to include null fields in Patch requests.
  4243. NullFields []string `json:"-"`
  4244. }
  4245. func (s *GooglePrivacyDlpV2beta2InspectJobConfig) MarshalJSON() ([]byte, error) {
  4246. type NoMethod GooglePrivacyDlpV2beta2InspectJobConfig
  4247. raw := NoMethod(*s)
  4248. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4249. }
  4250. // GooglePrivacyDlpV2beta2InspectResult: All the findings for a single
  4251. // scanned item.
  4252. type GooglePrivacyDlpV2beta2InspectResult struct {
  4253. // Findings: List of findings for an item.
  4254. Findings []*GooglePrivacyDlpV2beta2Finding `json:"findings,omitempty"`
  4255. // FindingsTruncated: If true, then this item might have more findings
  4256. // than were returned,
  4257. // and the findings returned are an arbitrary subset of all
  4258. // findings.
  4259. // The findings list might be truncated because the input items were
  4260. // too
  4261. // large, or because the server reached the maximum amount of
  4262. // resources
  4263. // allowed for a single API call. For best results, divide the input
  4264. // into
  4265. // smaller batches.
  4266. FindingsTruncated bool `json:"findingsTruncated,omitempty"`
  4267. // ForceSendFields is a list of field names (e.g. "Findings") to
  4268. // unconditionally include in API requests. By default, fields with
  4269. // empty values are omitted from API requests. However, any non-pointer,
  4270. // non-interface field appearing in ForceSendFields will be sent to the
  4271. // server regardless of whether the field is empty or not. This may be
  4272. // used to include empty fields in Patch requests.
  4273. ForceSendFields []string `json:"-"`
  4274. // NullFields is a list of field names (e.g. "Findings") to include in
  4275. // API requests with the JSON null value. By default, fields with empty
  4276. // values are omitted from API requests. However, any field with an
  4277. // empty value appearing in NullFields will be sent to the server as
  4278. // null. It is an error if a field in this list has a non-empty value.
  4279. // This may be used to include null fields in Patch requests.
  4280. NullFields []string `json:"-"`
  4281. }
  4282. func (s *GooglePrivacyDlpV2beta2InspectResult) MarshalJSON() ([]byte, error) {
  4283. type NoMethod GooglePrivacyDlpV2beta2InspectResult
  4284. raw := NoMethod(*s)
  4285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4286. }
  4287. // GooglePrivacyDlpV2beta2InspectTemplate: The inspectTemplate contains
  4288. // a configuration (set of types of sensitive data
  4289. // to be detected) to be used anywhere you otherwise would normally
  4290. // specify
  4291. // InspectConfig.
  4292. type GooglePrivacyDlpV2beta2InspectTemplate struct {
  4293. // CreateTime: The creation timestamp of a inspectTemplate, output only
  4294. // field.
  4295. CreateTime string `json:"createTime,omitempty"`
  4296. // Description: Short description (max 256 chars).
  4297. Description string `json:"description,omitempty"`
  4298. // DisplayName: Display name (max 256 chars).
  4299. DisplayName string `json:"displayName,omitempty"`
  4300. // InspectConfig: The core content of the template. Configuration of the
  4301. // scanning process.
  4302. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  4303. // Name: The template name. Output only.
  4304. //
  4305. // The template will have one of the following
  4306. // formats:
  4307. // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID`
  4308. // OR
  4309. // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
  4310. Name string `json:"name,omitempty"`
  4311. // UpdateTime: The last update timestamp of a inspectTemplate, output
  4312. // only field.
  4313. UpdateTime string `json:"updateTime,omitempty"`
  4314. // ServerResponse contains the HTTP response code and headers from the
  4315. // server.
  4316. googleapi.ServerResponse `json:"-"`
  4317. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  4318. // unconditionally include in API requests. By default, fields with
  4319. // empty values are omitted from API requests. However, any non-pointer,
  4320. // non-interface field appearing in ForceSendFields will be sent to the
  4321. // server regardless of whether the field is empty or not. This may be
  4322. // used to include empty fields in Patch requests.
  4323. ForceSendFields []string `json:"-"`
  4324. // NullFields is a list of field names (e.g. "CreateTime") to include in
  4325. // API requests with the JSON null value. By default, fields with empty
  4326. // values are omitted from API requests. However, any field with an
  4327. // empty value appearing in NullFields will be sent to the server as
  4328. // null. It is an error if a field in this list has a non-empty value.
  4329. // This may be used to include null fields in Patch requests.
  4330. NullFields []string `json:"-"`
  4331. }
  4332. func (s *GooglePrivacyDlpV2beta2InspectTemplate) MarshalJSON() ([]byte, error) {
  4333. type NoMethod GooglePrivacyDlpV2beta2InspectTemplate
  4334. raw := NoMethod(*s)
  4335. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4336. }
  4337. // GooglePrivacyDlpV2beta2JobTrigger: Contains a configuration to make
  4338. // dlp api calls on a repeating basis.
  4339. type GooglePrivacyDlpV2beta2JobTrigger struct {
  4340. // CreateTime: The creation timestamp of a triggeredJob, output only
  4341. // field.
  4342. CreateTime string `json:"createTime,omitempty"`
  4343. // Description: User provided description (max 256 chars)
  4344. Description string `json:"description,omitempty"`
  4345. // DisplayName: Display name (max 100 chars)
  4346. DisplayName string `json:"displayName,omitempty"`
  4347. // Errors: A stream of errors encountered when the trigger was
  4348. // activated. Repeated
  4349. // errors may result in the JobTrigger automaticaly being paused.
  4350. // Will return the last 100 errors. Whenever the JobTrigger is
  4351. // modified
  4352. // this list will be cleared. Output only field.
  4353. Errors []*GooglePrivacyDlpV2beta2Error `json:"errors,omitempty"`
  4354. InspectJob *GooglePrivacyDlpV2beta2InspectJobConfig `json:"inspectJob,omitempty"`
  4355. // LastRunTime: The timestamp of the last time this trigger executed.
  4356. LastRunTime string `json:"lastRunTime,omitempty"`
  4357. // Name: Unique resource name for the triggeredJob, assigned by the
  4358. // service when the
  4359. // triggeredJob is created, for
  4360. // example
  4361. // `projects/dlp-test-project/triggeredJobs/53234423`.
  4362. Name string `json:"name,omitempty"`
  4363. // Status: A status for this trigger. [required]
  4364. //
  4365. // Possible values:
  4366. // "STATUS_UNSPECIFIED"
  4367. // "HEALTHY" - Trigger is healthy.
  4368. // "PAUSED" - Trigger is temporarily paused.
  4369. // "CANCELLED" - Trigger is cancelled and can not be resumed.
  4370. Status string `json:"status,omitempty"`
  4371. // Triggers: A list of triggers which will be OR'ed together. Only one
  4372. // in the list
  4373. // needs to trigger for a job to be started. The list may contain only
  4374. // a single Schedule trigger and must have at least one object.
  4375. Triggers []*GooglePrivacyDlpV2beta2Trigger `json:"triggers,omitempty"`
  4376. // UpdateTime: The last update timestamp of a triggeredJob, output only
  4377. // field.
  4378. UpdateTime string `json:"updateTime,omitempty"`
  4379. // ServerResponse contains the HTTP response code and headers from the
  4380. // server.
  4381. googleapi.ServerResponse `json:"-"`
  4382. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  4383. // unconditionally include in API requests. By default, fields with
  4384. // empty values are omitted from API requests. However, any non-pointer,
  4385. // non-interface field appearing in ForceSendFields will be sent to the
  4386. // server regardless of whether the field is empty or not. This may be
  4387. // used to include empty fields in Patch requests.
  4388. ForceSendFields []string `json:"-"`
  4389. // NullFields is a list of field names (e.g. "CreateTime") to include in
  4390. // API requests with the JSON null value. By default, fields with empty
  4391. // values are omitted from API requests. However, any field with an
  4392. // empty value appearing in NullFields will be sent to the server as
  4393. // null. It is an error if a field in this list has a non-empty value.
  4394. // This may be used to include null fields in Patch requests.
  4395. NullFields []string `json:"-"`
  4396. }
  4397. func (s *GooglePrivacyDlpV2beta2JobTrigger) MarshalJSON() ([]byte, error) {
  4398. type NoMethod GooglePrivacyDlpV2beta2JobTrigger
  4399. raw := NoMethod(*s)
  4400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4401. }
  4402. // GooglePrivacyDlpV2beta2KAnonymityConfig: k-anonymity metric, used for
  4403. // analysis of reidentification risk.
  4404. type GooglePrivacyDlpV2beta2KAnonymityConfig struct {
  4405. // EntityId: Optional message indicating that each distinct entity_id
  4406. // should not
  4407. // contribute to the k-anonymity count more than once per equivalence
  4408. // class.
  4409. // If an entity_id appears on several rows with different
  4410. // quasi-identifier
  4411. // tuples, it will contribute to each count exactly once.
  4412. //
  4413. // This can lead to unexpected results. Consider a table where ID 1
  4414. // is
  4415. // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to
  4416. // *both*
  4417. // quasi-identifiers "foo" and "bar" (on separate rows), and where this
  4418. // ID
  4419. // is used as entity_id. Then, the anonymity value associated to ID 3
  4420. // will
  4421. // be 2, even if it is the only ID to be associated to both values "foo"
  4422. // and
  4423. // "bar".
  4424. EntityId *GooglePrivacyDlpV2beta2EntityId `json:"entityId,omitempty"`
  4425. // QuasiIds: Set of fields to compute k-anonymity over. When multiple
  4426. // fields are
  4427. // specified, they are considered a single composite key. Structs
  4428. // and
  4429. // repeated data types are not supported; however, nested fields
  4430. // are
  4431. // supported so long as they are not structs themselves or nested
  4432. // within
  4433. // a repeated field.
  4434. QuasiIds []*GooglePrivacyDlpV2beta2FieldId `json:"quasiIds,omitempty"`
  4435. // ForceSendFields is a list of field names (e.g. "EntityId") to
  4436. // unconditionally include in API requests. By default, fields with
  4437. // empty values are omitted from API requests. However, any non-pointer,
  4438. // non-interface field appearing in ForceSendFields will be sent to the
  4439. // server regardless of whether the field is empty or not. This may be
  4440. // used to include empty fields in Patch requests.
  4441. ForceSendFields []string `json:"-"`
  4442. // NullFields is a list of field names (e.g. "EntityId") to include in
  4443. // API requests with the JSON null value. By default, fields with empty
  4444. // values are omitted from API requests. However, any field with an
  4445. // empty value appearing in NullFields will be sent to the server as
  4446. // null. It is an error if a field in this list has a non-empty value.
  4447. // This may be used to include null fields in Patch requests.
  4448. NullFields []string `json:"-"`
  4449. }
  4450. func (s *GooglePrivacyDlpV2beta2KAnonymityConfig) MarshalJSON() ([]byte, error) {
  4451. type NoMethod GooglePrivacyDlpV2beta2KAnonymityConfig
  4452. raw := NoMethod(*s)
  4453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4454. }
  4455. // GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass: The set of
  4456. // columns' values that share the same ldiversity value
  4457. type GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass struct {
  4458. // EquivalenceClassSize: Size of the equivalence class, for example
  4459. // number of rows with the
  4460. // above set of values.
  4461. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  4462. // QuasiIdsValues: Set of values defining the equivalence class. One
  4463. // value per
  4464. // quasi-identifier column in the original KAnonymity metric
  4465. // message.
  4466. // The order is always the same as the original request.
  4467. QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"`
  4468. // ForceSendFields is a list of field names (e.g.
  4469. // "EquivalenceClassSize") to unconditionally include in API requests.
  4470. // By default, fields with empty values are omitted from API requests.
  4471. // However, any non-pointer, non-interface field appearing in
  4472. // ForceSendFields will be sent to the server regardless of whether the
  4473. // field is empty or not. This may be used to include empty fields in
  4474. // Patch requests.
  4475. ForceSendFields []string `json:"-"`
  4476. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  4477. // include in API requests with the JSON null value. By default, fields
  4478. // with empty values are omitted from API requests. However, any field
  4479. // with an empty value appearing in NullFields will be sent to the
  4480. // server as null. It is an error if a field in this list has a
  4481. // non-empty value. This may be used to include null fields in Patch
  4482. // requests.
  4483. NullFields []string `json:"-"`
  4484. }
  4485. func (s *GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) {
  4486. type NoMethod GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass
  4487. raw := NoMethod(*s)
  4488. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4489. }
  4490. type GooglePrivacyDlpV2beta2KAnonymityHistogramBucket struct {
  4491. // BucketSize: Total number of equivalence classes in this bucket.
  4492. BucketSize int64 `json:"bucketSize,omitempty,string"`
  4493. // BucketValueCount: Total number of distinct equivalence classes in
  4494. // this bucket.
  4495. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  4496. // BucketValues: Sample of equivalence classes in this bucket. The total
  4497. // number of
  4498. // classes returned per bucket is capped at 20.
  4499. BucketValues []*GooglePrivacyDlpV2beta2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"`
  4500. // EquivalenceClassSizeLowerBound: Lower bound on the size of the
  4501. // equivalence classes in this bucket.
  4502. EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"`
  4503. // EquivalenceClassSizeUpperBound: Upper bound on the size of the
  4504. // equivalence classes in this bucket.
  4505. EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"`
  4506. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  4507. // unconditionally include in API requests. By default, fields with
  4508. // empty values are omitted from API requests. However, any non-pointer,
  4509. // non-interface field appearing in ForceSendFields will be sent to the
  4510. // server regardless of whether the field is empty or not. This may be
  4511. // used to include empty fields in Patch requests.
  4512. ForceSendFields []string `json:"-"`
  4513. // NullFields is a list of field names (e.g. "BucketSize") to include in
  4514. // API requests with the JSON null value. By default, fields with empty
  4515. // values are omitted from API requests. However, any field with an
  4516. // empty value appearing in NullFields will be sent to the server as
  4517. // null. It is an error if a field in this list has a non-empty value.
  4518. // This may be used to include null fields in Patch requests.
  4519. NullFields []string `json:"-"`
  4520. }
  4521. func (s *GooglePrivacyDlpV2beta2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) {
  4522. type NoMethod GooglePrivacyDlpV2beta2KAnonymityHistogramBucket
  4523. raw := NoMethod(*s)
  4524. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4525. }
  4526. // GooglePrivacyDlpV2beta2KAnonymityResult: Result of the k-anonymity
  4527. // computation.
  4528. type GooglePrivacyDlpV2beta2KAnonymityResult struct {
  4529. // EquivalenceClassHistogramBuckets: Histogram of k-anonymity
  4530. // equivalence classes.
  4531. EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"`
  4532. // ForceSendFields is a list of field names (e.g.
  4533. // "EquivalenceClassHistogramBuckets") to unconditionally include in API
  4534. // requests. By default, fields with empty values are omitted from API
  4535. // requests. However, any non-pointer, non-interface field appearing in
  4536. // ForceSendFields will be sent to the server regardless of whether the
  4537. // field is empty or not. This may be used to include empty fields in
  4538. // Patch requests.
  4539. ForceSendFields []string `json:"-"`
  4540. // NullFields is a list of field names (e.g.
  4541. // "EquivalenceClassHistogramBuckets") to include in API requests with
  4542. // the JSON null value. By default, fields with empty values are omitted
  4543. // from API requests. However, any field with an empty value appearing
  4544. // in NullFields will be sent to the server as null. It is an error if a
  4545. // field in this list has a non-empty value. This may be used to include
  4546. // null fields in Patch requests.
  4547. NullFields []string `json:"-"`
  4548. }
  4549. func (s *GooglePrivacyDlpV2beta2KAnonymityResult) MarshalJSON() ([]byte, error) {
  4550. type NoMethod GooglePrivacyDlpV2beta2KAnonymityResult
  4551. raw := NoMethod(*s)
  4552. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4553. }
  4554. // GooglePrivacyDlpV2beta2KMapEstimationConfig: Reidentifiability
  4555. // metric. This corresponds to a risk model similar to what
  4556. // is called "journalist risk" in the literature, except the attack
  4557. // dataset is
  4558. // statistically modeled instead of being perfectly known. This can be
  4559. // done
  4560. // using publicly available data (like the US Census), or using a
  4561. // custom
  4562. // statistical model (indicated as one or several BigQuery tables), or
  4563. // by
  4564. // extrapolating from the distribution of values in the input dataset.
  4565. type GooglePrivacyDlpV2beta2KMapEstimationConfig struct {
  4566. // AuxiliaryTables: Several auxiliary tables can be used in the
  4567. // analysis. Each custom_tag
  4568. // used to tag a quasi-identifiers column must appear in exactly one
  4569. // column
  4570. // of one auxiliary table.
  4571. AuxiliaryTables []*GooglePrivacyDlpV2beta2AuxiliaryTable `json:"auxiliaryTables,omitempty"`
  4572. // QuasiIds: Fields considered to be quasi-identifiers. No two columns
  4573. // can have the
  4574. // same tag. [required]
  4575. QuasiIds []*GooglePrivacyDlpV2beta2TaggedField `json:"quasiIds,omitempty"`
  4576. // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
  4577. // modeling.
  4578. // Required if no column is tagged with a region-specific InfoType
  4579. // (like
  4580. // US_ZIP_5) or a region code.
  4581. RegionCode string `json:"regionCode,omitempty"`
  4582. // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
  4583. // unconditionally include in API requests. By default, fields with
  4584. // empty values are omitted from API requests. However, any non-pointer,
  4585. // non-interface field appearing in ForceSendFields will be sent to the
  4586. // server regardless of whether the field is empty or not. This may be
  4587. // used to include empty fields in Patch requests.
  4588. ForceSendFields []string `json:"-"`
  4589. // NullFields is a list of field names (e.g. "AuxiliaryTables") to
  4590. // include in API requests with the JSON null value. By default, fields
  4591. // with empty values are omitted from API requests. However, any field
  4592. // with an empty value appearing in NullFields will be sent to the
  4593. // server as null. It is an error if a field in this list has a
  4594. // non-empty value. This may be used to include null fields in Patch
  4595. // requests.
  4596. NullFields []string `json:"-"`
  4597. }
  4598. func (s *GooglePrivacyDlpV2beta2KMapEstimationConfig) MarshalJSON() ([]byte, error) {
  4599. type NoMethod GooglePrivacyDlpV2beta2KMapEstimationConfig
  4600. raw := NoMethod(*s)
  4601. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4602. }
  4603. // GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket: A
  4604. // KMapEstimationHistogramBucket message with the following values:
  4605. // min_anonymity: 3
  4606. // max_anonymity: 5
  4607. // frequency: 42
  4608. // means that there are 42 records whose quasi-identifier values
  4609. // correspond
  4610. // to 3, 4 or 5 people in the overlying population. An important
  4611. // particular
  4612. // case is when min_anonymity = max_anonymity = 1: the frequency field
  4613. // then
  4614. // corresponds to the number of uniquely identifiable records.
  4615. type GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket struct {
  4616. // BucketSize: Number of records within these anonymity bounds.
  4617. BucketSize int64 `json:"bucketSize,omitempty,string"`
  4618. // BucketValueCount: Total number of distinct quasi-identifier tuple
  4619. // values in this bucket.
  4620. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  4621. // BucketValues: Sample of quasi-identifier tuple values in this bucket.
  4622. // The total
  4623. // number of classes returned per bucket is capped at 20.
  4624. BucketValues []*GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"`
  4625. // MaxAnonymity: Always greater than or equal to min_anonymity.
  4626. MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"`
  4627. // MinAnonymity: Always positive.
  4628. MinAnonymity int64 `json:"minAnonymity,omitempty,string"`
  4629. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  4630. // unconditionally include in API requests. By default, fields with
  4631. // empty values are omitted from API requests. However, any non-pointer,
  4632. // non-interface field appearing in ForceSendFields will be sent to the
  4633. // server regardless of whether the field is empty or not. This may be
  4634. // used to include empty fields in Patch requests.
  4635. ForceSendFields []string `json:"-"`
  4636. // NullFields is a list of field names (e.g. "BucketSize") to include in
  4637. // API requests with the JSON null value. By default, fields with empty
  4638. // values are omitted from API requests. However, any field with an
  4639. // empty value appearing in NullFields will be sent to the server as
  4640. // null. It is an error if a field in this list has a non-empty value.
  4641. // This may be used to include null fields in Patch requests.
  4642. NullFields []string `json:"-"`
  4643. }
  4644. func (s *GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
  4645. type NoMethod GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket
  4646. raw := NoMethod(*s)
  4647. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4648. }
  4649. // GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues: A tuple of values
  4650. // for the quasi-identifier columns.
  4651. type GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues struct {
  4652. // EstimatedAnonymity: The estimated anonymity for these
  4653. // quasi-identifier values.
  4654. EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"`
  4655. // QuasiIdsValues: The quasi-identifier values.
  4656. QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"`
  4657. // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity")
  4658. // to unconditionally include in API requests. By default, fields with
  4659. // empty values are omitted from API requests. However, any non-pointer,
  4660. // non-interface field appearing in ForceSendFields will be sent to the
  4661. // server regardless of whether the field is empty or not. This may be
  4662. // used to include empty fields in Patch requests.
  4663. ForceSendFields []string `json:"-"`
  4664. // NullFields is a list of field names (e.g. "EstimatedAnonymity") to
  4665. // include in API requests with the JSON null value. By default, fields
  4666. // with empty values are omitted from API requests. However, any field
  4667. // with an empty value appearing in NullFields will be sent to the
  4668. // server as null. It is an error if a field in this list has a
  4669. // non-empty value. This may be used to include null fields in Patch
  4670. // requests.
  4671. NullFields []string `json:"-"`
  4672. }
  4673. func (s *GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
  4674. type NoMethod GooglePrivacyDlpV2beta2KMapEstimationQuasiIdValues
  4675. raw := NoMethod(*s)
  4676. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4677. }
  4678. // GooglePrivacyDlpV2beta2KMapEstimationResult: Result of the
  4679. // reidentifiability analysis. Note that these results are
  4680. // an
  4681. // estimation, not exact values.
  4682. type GooglePrivacyDlpV2beta2KMapEstimationResult struct {
  4683. // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity]
  4684. // do not overlap. If a value
  4685. // doesn't correspond to any such interval, the associated frequency
  4686. // is
  4687. // zero. For example, the following records:
  4688. // {min_anonymity: 1, max_anonymity: 1, frequency: 17}
  4689. // {min_anonymity: 2, max_anonymity: 3, frequency: 42}
  4690. // {min_anonymity: 5, max_anonymity: 10, frequency: 99}
  4691. // mean that there are no record with an estimated anonymity of 4, 5,
  4692. // or
  4693. // larger than 10.
  4694. KMapEstimationHistogram []*GooglePrivacyDlpV2beta2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"`
  4695. // ForceSendFields is a list of field names (e.g.
  4696. // "KMapEstimationHistogram") to unconditionally include in API
  4697. // requests. By default, fields with empty values are omitted from API
  4698. // requests. However, any non-pointer, non-interface field appearing in
  4699. // ForceSendFields will be sent to the server regardless of whether the
  4700. // field is empty or not. This may be used to include empty fields in
  4701. // Patch requests.
  4702. ForceSendFields []string `json:"-"`
  4703. // NullFields is a list of field names (e.g. "KMapEstimationHistogram")
  4704. // to include in API requests with the JSON null value. By default,
  4705. // fields with empty values are omitted from API requests. However, any
  4706. // field with an empty value appearing in NullFields will be sent to the
  4707. // server as null. It is an error if a field in this list has a
  4708. // non-empty value. This may be used to include null fields in Patch
  4709. // requests.
  4710. NullFields []string `json:"-"`
  4711. }
  4712. func (s *GooglePrivacyDlpV2beta2KMapEstimationResult) MarshalJSON() ([]byte, error) {
  4713. type NoMethod GooglePrivacyDlpV2beta2KMapEstimationResult
  4714. raw := NoMethod(*s)
  4715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4716. }
  4717. // GooglePrivacyDlpV2beta2Key: A unique identifier for a Datastore
  4718. // entity.
  4719. // If a key's partition ID or any of its path kinds or names
  4720. // are
  4721. // reserved/read-only, the key is reserved/read-only.
  4722. // A reserved/read-only key is forbidden in certain documented contexts.
  4723. type GooglePrivacyDlpV2beta2Key struct {
  4724. // PartitionId: Entities are partitioned into subsets, currently
  4725. // identified by a project
  4726. // ID and namespace ID.
  4727. // Queries are scoped to a single partition.
  4728. PartitionId *GooglePrivacyDlpV2beta2PartitionId `json:"partitionId,omitempty"`
  4729. // Path: The entity path.
  4730. // An entity path consists of one or more elements composed of a kind
  4731. // and a
  4732. // string or numerical identifier, which identify entities. The
  4733. // first
  4734. // element identifies a _root entity_, the second element identifies
  4735. // a _child_ of the root entity, the third element identifies a child of
  4736. // the
  4737. // second entity, and so forth. The entities identified by all prefixes
  4738. // of
  4739. // the path are called the element's _ancestors_.
  4740. //
  4741. // A path can never be empty, and a path can have at most 100 elements.
  4742. Path []*GooglePrivacyDlpV2beta2PathElement `json:"path,omitempty"`
  4743. // ForceSendFields is a list of field names (e.g. "PartitionId") to
  4744. // unconditionally include in API requests. By default, fields with
  4745. // empty values are omitted from API requests. However, any non-pointer,
  4746. // non-interface field appearing in ForceSendFields will be sent to the
  4747. // server regardless of whether the field is empty or not. This may be
  4748. // used to include empty fields in Patch requests.
  4749. ForceSendFields []string `json:"-"`
  4750. // NullFields is a list of field names (e.g. "PartitionId") to include
  4751. // in API requests with the JSON null value. By default, fields with
  4752. // empty values are omitted from API requests. However, any field with
  4753. // an empty value appearing in NullFields will be sent to the server as
  4754. // null. It is an error if a field in this list has a non-empty value.
  4755. // This may be used to include null fields in Patch requests.
  4756. NullFields []string `json:"-"`
  4757. }
  4758. func (s *GooglePrivacyDlpV2beta2Key) MarshalJSON() ([]byte, error) {
  4759. type NoMethod GooglePrivacyDlpV2beta2Key
  4760. raw := NoMethod(*s)
  4761. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4762. }
  4763. // GooglePrivacyDlpV2beta2KindExpression: A representation of a
  4764. // Datastore kind.
  4765. type GooglePrivacyDlpV2beta2KindExpression struct {
  4766. // Name: The name of the kind.
  4767. Name string `json:"name,omitempty"`
  4768. // ForceSendFields is a list of field names (e.g. "Name") to
  4769. // unconditionally include in API requests. By default, fields with
  4770. // empty values are omitted from API requests. However, any non-pointer,
  4771. // non-interface field appearing in ForceSendFields will be sent to the
  4772. // server regardless of whether the field is empty or not. This may be
  4773. // used to include empty fields in Patch requests.
  4774. ForceSendFields []string `json:"-"`
  4775. // NullFields is a list of field names (e.g. "Name") to include in API
  4776. // requests with the JSON null value. By default, fields with empty
  4777. // values are omitted from API requests. However, any field with an
  4778. // empty value appearing in NullFields will be sent to the server as
  4779. // null. It is an error if a field in this list has a non-empty value.
  4780. // This may be used to include null fields in Patch requests.
  4781. NullFields []string `json:"-"`
  4782. }
  4783. func (s *GooglePrivacyDlpV2beta2KindExpression) MarshalJSON() ([]byte, error) {
  4784. type NoMethod GooglePrivacyDlpV2beta2KindExpression
  4785. raw := NoMethod(*s)
  4786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4787. }
  4788. // GooglePrivacyDlpV2beta2KmsWrappedCryptoKey: Include to use an
  4789. // existing data crypto key wrapped by KMS.
  4790. // Authorization requires the following IAM permissions when sending a
  4791. // request
  4792. // to perform a crypto transformation using a kms-wrapped crypto
  4793. // key:
  4794. // dlp.kms.encrypt
  4795. type GooglePrivacyDlpV2beta2KmsWrappedCryptoKey struct {
  4796. // CryptoKeyName: The resource name of the KMS CryptoKey to use for
  4797. // unwrapping. [required]
  4798. CryptoKeyName string `json:"cryptoKeyName,omitempty"`
  4799. // WrappedKey: The wrapped data crypto key. [required]
  4800. WrappedKey string `json:"wrappedKey,omitempty"`
  4801. // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to
  4802. // unconditionally include in API requests. By default, fields with
  4803. // empty values are omitted from API requests. However, any non-pointer,
  4804. // non-interface field appearing in ForceSendFields will be sent to the
  4805. // server regardless of whether the field is empty or not. This may be
  4806. // used to include empty fields in Patch requests.
  4807. ForceSendFields []string `json:"-"`
  4808. // NullFields is a list of field names (e.g. "CryptoKeyName") to include
  4809. // in API requests with the JSON null value. By default, fields with
  4810. // empty values are omitted from API requests. However, any field with
  4811. // an empty value appearing in NullFields will be sent to the server as
  4812. // null. It is an error if a field in this list has a non-empty value.
  4813. // This may be used to include null fields in Patch requests.
  4814. NullFields []string `json:"-"`
  4815. }
  4816. func (s *GooglePrivacyDlpV2beta2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) {
  4817. type NoMethod GooglePrivacyDlpV2beta2KmsWrappedCryptoKey
  4818. raw := NoMethod(*s)
  4819. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4820. }
  4821. // GooglePrivacyDlpV2beta2LDiversityConfig: l-diversity metric, used for
  4822. // analysis of reidentification risk.
  4823. type GooglePrivacyDlpV2beta2LDiversityConfig struct {
  4824. // QuasiIds: Set of quasi-identifiers indicating how equivalence classes
  4825. // are
  4826. // defined for the l-diversity computation. When multiple fields
  4827. // are
  4828. // specified, they are considered a single composite key.
  4829. QuasiIds []*GooglePrivacyDlpV2beta2FieldId `json:"quasiIds,omitempty"`
  4830. // SensitiveAttribute: Sensitive field for computing the l-value.
  4831. SensitiveAttribute *GooglePrivacyDlpV2beta2FieldId `json:"sensitiveAttribute,omitempty"`
  4832. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  4833. // unconditionally include in API requests. By default, fields with
  4834. // empty values are omitted from API requests. However, any non-pointer,
  4835. // non-interface field appearing in ForceSendFields will be sent to the
  4836. // server regardless of whether the field is empty or not. This may be
  4837. // used to include empty fields in Patch requests.
  4838. ForceSendFields []string `json:"-"`
  4839. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  4840. // API requests with the JSON null value. By default, fields with empty
  4841. // values are omitted from API requests. However, any field with an
  4842. // empty value appearing in NullFields will be sent to the server as
  4843. // null. It is an error if a field in this list has a non-empty value.
  4844. // This may be used to include null fields in Patch requests.
  4845. NullFields []string `json:"-"`
  4846. }
  4847. func (s *GooglePrivacyDlpV2beta2LDiversityConfig) MarshalJSON() ([]byte, error) {
  4848. type NoMethod GooglePrivacyDlpV2beta2LDiversityConfig
  4849. raw := NoMethod(*s)
  4850. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4851. }
  4852. // GooglePrivacyDlpV2beta2LDiversityEquivalenceClass: The set of
  4853. // columns' values that share the same ldiversity value.
  4854. type GooglePrivacyDlpV2beta2LDiversityEquivalenceClass struct {
  4855. // EquivalenceClassSize: Size of the k-anonymity equivalence class.
  4856. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  4857. // NumDistinctSensitiveValues: Number of distinct sensitive values in
  4858. // this equivalence class.
  4859. NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"`
  4860. // QuasiIdsValues: Quasi-identifier values defining the k-anonymity
  4861. // equivalence
  4862. // class. The order is always the same as the original request.
  4863. QuasiIdsValues []*GooglePrivacyDlpV2beta2Value `json:"quasiIdsValues,omitempty"`
  4864. // TopSensitiveValues: Estimated frequencies of top sensitive values.
  4865. TopSensitiveValues []*GooglePrivacyDlpV2beta2ValueFrequency `json:"topSensitiveValues,omitempty"`
  4866. // ForceSendFields is a list of field names (e.g.
  4867. // "EquivalenceClassSize") to unconditionally include in API requests.
  4868. // By default, fields with empty values are omitted from API requests.
  4869. // However, any non-pointer, non-interface field appearing in
  4870. // ForceSendFields will be sent to the server regardless of whether the
  4871. // field is empty or not. This may be used to include empty fields in
  4872. // Patch requests.
  4873. ForceSendFields []string `json:"-"`
  4874. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  4875. // include in API requests with the JSON null value. By default, fields
  4876. // with empty values are omitted from API requests. However, any field
  4877. // with an empty value appearing in NullFields will be sent to the
  4878. // server as null. It is an error if a field in this list has a
  4879. // non-empty value. This may be used to include null fields in Patch
  4880. // requests.
  4881. NullFields []string `json:"-"`
  4882. }
  4883. func (s *GooglePrivacyDlpV2beta2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) {
  4884. type NoMethod GooglePrivacyDlpV2beta2LDiversityEquivalenceClass
  4885. raw := NoMethod(*s)
  4886. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4887. }
  4888. type GooglePrivacyDlpV2beta2LDiversityHistogramBucket struct {
  4889. // BucketSize: Total number of equivalence classes in this bucket.
  4890. BucketSize int64 `json:"bucketSize,omitempty,string"`
  4891. // BucketValueCount: Total number of distinct equivalence classes in
  4892. // this bucket.
  4893. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  4894. // BucketValues: Sample of equivalence classes in this bucket. The total
  4895. // number of
  4896. // classes returned per bucket is capped at 20.
  4897. BucketValues []*GooglePrivacyDlpV2beta2LDiversityEquivalenceClass `json:"bucketValues,omitempty"`
  4898. // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value
  4899. // frequencies of the equivalence
  4900. // classes in this bucket.
  4901. SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"`
  4902. // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value
  4903. // frequencies of the equivalence
  4904. // classes in this bucket.
  4905. SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"`
  4906. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  4907. // unconditionally include in API requests. By default, fields with
  4908. // empty values are omitted from API requests. However, any non-pointer,
  4909. // non-interface field appearing in ForceSendFields will be sent to the
  4910. // server regardless of whether the field is empty or not. This may be
  4911. // used to include empty fields in Patch requests.
  4912. ForceSendFields []string `json:"-"`
  4913. // NullFields is a list of field names (e.g. "BucketSize") to include in
  4914. // API requests with the JSON null value. By default, fields with empty
  4915. // values are omitted from API requests. However, any field with an
  4916. // empty value appearing in NullFields will be sent to the server as
  4917. // null. It is an error if a field in this list has a non-empty value.
  4918. // This may be used to include null fields in Patch requests.
  4919. NullFields []string `json:"-"`
  4920. }
  4921. func (s *GooglePrivacyDlpV2beta2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) {
  4922. type NoMethod GooglePrivacyDlpV2beta2LDiversityHistogramBucket
  4923. raw := NoMethod(*s)
  4924. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4925. }
  4926. // GooglePrivacyDlpV2beta2LDiversityResult: Result of the l-diversity
  4927. // computation.
  4928. type GooglePrivacyDlpV2beta2LDiversityResult struct {
  4929. // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity
  4930. // equivalence class sensitive value frequencies.
  4931. SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"`
  4932. // ForceSendFields is a list of field names (e.g.
  4933. // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include
  4934. // in API requests. By default, fields with empty values are omitted
  4935. // from API requests. However, any non-pointer, non-interface field
  4936. // appearing in ForceSendFields will be sent to the server regardless of
  4937. // whether the field is empty or not. This may be used to include empty
  4938. // fields in Patch requests.
  4939. ForceSendFields []string `json:"-"`
  4940. // NullFields is a list of field names (e.g.
  4941. // "SensitiveValueFrequencyHistogramBuckets") to include in API requests
  4942. // with the JSON null value. By default, fields with empty values are
  4943. // omitted from API requests. However, any field with an empty value
  4944. // appearing in NullFields will be sent to the server as null. It is an
  4945. // error if a field in this list has a non-empty value. This may be used
  4946. // to include null fields in Patch requests.
  4947. NullFields []string `json:"-"`
  4948. }
  4949. func (s *GooglePrivacyDlpV2beta2LDiversityResult) MarshalJSON() ([]byte, error) {
  4950. type NoMethod GooglePrivacyDlpV2beta2LDiversityResult
  4951. raw := NoMethod(*s)
  4952. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4953. }
  4954. // GooglePrivacyDlpV2beta2LikelihoodAdjustment: Message for specifying
  4955. // an adjustment to the likelihood of a finding as
  4956. // part of a detection rule.
  4957. type GooglePrivacyDlpV2beta2LikelihoodAdjustment struct {
  4958. // FixedLikelihood: Set the likelihood of a finding to a fixed value.
  4959. //
  4960. // Possible values:
  4961. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  4962. // likelihoods is included.
  4963. // "VERY_UNLIKELY" - Few matching elements.
  4964. // "UNLIKELY"
  4965. // "POSSIBLE" - Some matching elements.
  4966. // "LIKELY"
  4967. // "VERY_LIKELY" - Many matching elements.
  4968. FixedLikelihood string `json:"fixedLikelihood,omitempty"`
  4969. // RelativeLikelihood: Increase or decrease the likelihood by the
  4970. // specified number of
  4971. // levels. For example, if a finding would be `POSSIBLE` without
  4972. // the
  4973. // detection rule and `relative_likelihood` is 1, then it is upgraded
  4974. // to
  4975. // `LIKELY`, while a value of -1 would downgrade it to
  4976. // `UNLIKELY`.
  4977. // Likelihood may never drop below `VERY_UNLIKELY` or
  4978. // exceed
  4979. // `VERY_LIKELY`, so applying an adjustment of 1 followed by
  4980. // an
  4981. // adjustment of -1 when base likelihood is `VERY_LIKELY` will result
  4982. // in
  4983. // a final likelihood of `LIKELY`.
  4984. RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"`
  4985. // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to
  4986. // unconditionally include in API requests. By default, fields with
  4987. // empty values are omitted from API requests. However, any non-pointer,
  4988. // non-interface field appearing in ForceSendFields will be sent to the
  4989. // server regardless of whether the field is empty or not. This may be
  4990. // used to include empty fields in Patch requests.
  4991. ForceSendFields []string `json:"-"`
  4992. // NullFields is a list of field names (e.g. "FixedLikelihood") to
  4993. // include in API requests with the JSON null value. By default, fields
  4994. // with empty values are omitted from API requests. However, any field
  4995. // with an empty value appearing in NullFields will be sent to the
  4996. // server as null. It is an error if a field in this list has a
  4997. // non-empty value. This may be used to include null fields in Patch
  4998. // requests.
  4999. NullFields []string `json:"-"`
  5000. }
  5001. func (s *GooglePrivacyDlpV2beta2LikelihoodAdjustment) MarshalJSON() ([]byte, error) {
  5002. type NoMethod GooglePrivacyDlpV2beta2LikelihoodAdjustment
  5003. raw := NoMethod(*s)
  5004. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5005. }
  5006. // GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse: Response
  5007. // message for ListDeidentifyTemplates.
  5008. type GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse struct {
  5009. // DeidentifyTemplates: List of deidentify templates, up to page_size
  5010. // in
  5011. // ListDeidentifyTemplatesRequest.
  5012. DeidentifyTemplates []*GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"`
  5013. // NextPageToken: If the next page is available then the next page token
  5014. // to be used
  5015. // in following ListDeidentifyTemplates request.
  5016. NextPageToken string `json:"nextPageToken,omitempty"`
  5017. // ServerResponse contains the HTTP response code and headers from the
  5018. // server.
  5019. googleapi.ServerResponse `json:"-"`
  5020. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates")
  5021. // to unconditionally include in API requests. By default, fields with
  5022. // empty values are omitted from API requests. However, any non-pointer,
  5023. // non-interface field appearing in ForceSendFields will be sent to the
  5024. // server regardless of whether the field is empty or not. This may be
  5025. // used to include empty fields in Patch requests.
  5026. ForceSendFields []string `json:"-"`
  5027. // NullFields is a list of field names (e.g. "DeidentifyTemplates") to
  5028. // include in API requests with the JSON null value. By default, fields
  5029. // with empty values are omitted from API requests. However, any field
  5030. // with an empty value appearing in NullFields will be sent to the
  5031. // server as null. It is an error if a field in this list has a
  5032. // non-empty value. This may be used to include null fields in Patch
  5033. // requests.
  5034. NullFields []string `json:"-"`
  5035. }
  5036. func (s *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) {
  5037. type NoMethod GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse
  5038. raw := NoMethod(*s)
  5039. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5040. }
  5041. // GooglePrivacyDlpV2beta2ListDlpJobsResponse: The response message for
  5042. // listing DLP jobs.
  5043. type GooglePrivacyDlpV2beta2ListDlpJobsResponse struct {
  5044. // Jobs: A list of DlpJobs that matches the specified filter in the
  5045. // request.
  5046. Jobs []*GooglePrivacyDlpV2beta2DlpJob `json:"jobs,omitempty"`
  5047. // NextPageToken: The standard List next-page token.
  5048. NextPageToken string `json:"nextPageToken,omitempty"`
  5049. // ServerResponse contains the HTTP response code and headers from the
  5050. // server.
  5051. googleapi.ServerResponse `json:"-"`
  5052. // ForceSendFields is a list of field names (e.g. "Jobs") to
  5053. // unconditionally include in API requests. By default, fields with
  5054. // empty values are omitted from API requests. However, any non-pointer,
  5055. // non-interface field appearing in ForceSendFields will be sent to the
  5056. // server regardless of whether the field is empty or not. This may be
  5057. // used to include empty fields in Patch requests.
  5058. ForceSendFields []string `json:"-"`
  5059. // NullFields is a list of field names (e.g. "Jobs") to include in API
  5060. // requests with the JSON null value. By default, fields with empty
  5061. // values are omitted from API requests. However, any field with an
  5062. // empty value appearing in NullFields will be sent to the server as
  5063. // null. It is an error if a field in this list has a non-empty value.
  5064. // This may be used to include null fields in Patch requests.
  5065. NullFields []string `json:"-"`
  5066. }
  5067. func (s *GooglePrivacyDlpV2beta2ListDlpJobsResponse) MarshalJSON() ([]byte, error) {
  5068. type NoMethod GooglePrivacyDlpV2beta2ListDlpJobsResponse
  5069. raw := NoMethod(*s)
  5070. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5071. }
  5072. // GooglePrivacyDlpV2beta2ListInfoTypesResponse: Response to the
  5073. // ListInfoTypes request.
  5074. type GooglePrivacyDlpV2beta2ListInfoTypesResponse struct {
  5075. // InfoTypes: Set of sensitive infoTypes.
  5076. InfoTypes []*GooglePrivacyDlpV2beta2InfoTypeDescription `json:"infoTypes,omitempty"`
  5077. // ServerResponse contains the HTTP response code and headers from the
  5078. // server.
  5079. googleapi.ServerResponse `json:"-"`
  5080. // ForceSendFields is a list of field names (e.g. "InfoTypes") to
  5081. // unconditionally include in API requests. By default, fields with
  5082. // empty values are omitted from API requests. However, any non-pointer,
  5083. // non-interface field appearing in ForceSendFields will be sent to the
  5084. // server regardless of whether the field is empty or not. This may be
  5085. // used to include empty fields in Patch requests.
  5086. ForceSendFields []string `json:"-"`
  5087. // NullFields is a list of field names (e.g. "InfoTypes") to include in
  5088. // API requests with the JSON null value. By default, fields with empty
  5089. // values are omitted from API requests. However, any field with an
  5090. // empty value appearing in NullFields will be sent to the server as
  5091. // null. It is an error if a field in this list has a non-empty value.
  5092. // This may be used to include null fields in Patch requests.
  5093. NullFields []string `json:"-"`
  5094. }
  5095. func (s *GooglePrivacyDlpV2beta2ListInfoTypesResponse) MarshalJSON() ([]byte, error) {
  5096. type NoMethod GooglePrivacyDlpV2beta2ListInfoTypesResponse
  5097. raw := NoMethod(*s)
  5098. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5099. }
  5100. // GooglePrivacyDlpV2beta2ListInspectTemplatesResponse: Response message
  5101. // for ListInspectTemplates.
  5102. type GooglePrivacyDlpV2beta2ListInspectTemplatesResponse struct {
  5103. // InspectTemplates: List of inspectTemplates, up to page_size in
  5104. // ListInspectTemplatesRequest.
  5105. InspectTemplates []*GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplates,omitempty"`
  5106. // NextPageToken: If the next page is available then the next page token
  5107. // to be used
  5108. // in following ListInspectTemplates request.
  5109. NextPageToken string `json:"nextPageToken,omitempty"`
  5110. // ServerResponse contains the HTTP response code and headers from the
  5111. // server.
  5112. googleapi.ServerResponse `json:"-"`
  5113. // ForceSendFields is a list of field names (e.g. "InspectTemplates") to
  5114. // unconditionally include in API requests. By default, fields with
  5115. // empty values are omitted from API requests. However, any non-pointer,
  5116. // non-interface field appearing in ForceSendFields will be sent to the
  5117. // server regardless of whether the field is empty or not. This may be
  5118. // used to include empty fields in Patch requests.
  5119. ForceSendFields []string `json:"-"`
  5120. // NullFields is a list of field names (e.g. "InspectTemplates") to
  5121. // include in API requests with the JSON null value. By default, fields
  5122. // with empty values are omitted from API requests. However, any field
  5123. // with an empty value appearing in NullFields will be sent to the
  5124. // server as null. It is an error if a field in this list has a
  5125. // non-empty value. This may be used to include null fields in Patch
  5126. // requests.
  5127. NullFields []string `json:"-"`
  5128. }
  5129. func (s *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) {
  5130. type NoMethod GooglePrivacyDlpV2beta2ListInspectTemplatesResponse
  5131. raw := NoMethod(*s)
  5132. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5133. }
  5134. // GooglePrivacyDlpV2beta2ListJobTriggersResponse: Response message for
  5135. // ListJobTriggers.
  5136. type GooglePrivacyDlpV2beta2ListJobTriggersResponse struct {
  5137. // JobTriggers: List of triggeredJobs, up to page_size in
  5138. // ListJobTriggersRequest.
  5139. JobTriggers []*GooglePrivacyDlpV2beta2JobTrigger `json:"jobTriggers,omitempty"`
  5140. // NextPageToken: If the next page is available then the next page token
  5141. // to be used
  5142. // in following ListJobTriggers request.
  5143. NextPageToken string `json:"nextPageToken,omitempty"`
  5144. // ServerResponse contains the HTTP response code and headers from the
  5145. // server.
  5146. googleapi.ServerResponse `json:"-"`
  5147. // ForceSendFields is a list of field names (e.g. "JobTriggers") to
  5148. // unconditionally include in API requests. By default, fields with
  5149. // empty values are omitted from API requests. However, any non-pointer,
  5150. // non-interface field appearing in ForceSendFields will be sent to the
  5151. // server regardless of whether the field is empty or not. This may be
  5152. // used to include empty fields in Patch requests.
  5153. ForceSendFields []string `json:"-"`
  5154. // NullFields is a list of field names (e.g. "JobTriggers") to include
  5155. // in API requests with the JSON null value. By default, fields with
  5156. // empty values are omitted from API requests. However, any field with
  5157. // an empty value appearing in NullFields will be sent to the server as
  5158. // null. It is an error if a field in this list has a non-empty value.
  5159. // This may be used to include null fields in Patch requests.
  5160. NullFields []string `json:"-"`
  5161. }
  5162. func (s *GooglePrivacyDlpV2beta2ListJobTriggersResponse) MarshalJSON() ([]byte, error) {
  5163. type NoMethod GooglePrivacyDlpV2beta2ListJobTriggersResponse
  5164. raw := NoMethod(*s)
  5165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5166. }
  5167. // GooglePrivacyDlpV2beta2Location: Specifies the location of the
  5168. // finding.
  5169. type GooglePrivacyDlpV2beta2Location struct {
  5170. // ByteRange: Zero-based byte offsets delimiting the finding.
  5171. // These are relative to the finding's containing element.
  5172. // Note that when the content is not textual, this references
  5173. // the UTF-8 encoded textual representation of the content.
  5174. // Omitted if content is an image.
  5175. ByteRange *GooglePrivacyDlpV2beta2Range `json:"byteRange,omitempty"`
  5176. // CodepointRange: Unicode character offsets delimiting the
  5177. // finding.
  5178. // These are relative to the finding's containing element.
  5179. // Provided when the content is text.
  5180. CodepointRange *GooglePrivacyDlpV2beta2Range `json:"codepointRange,omitempty"`
  5181. // FieldId: The pointer to the property or cell that contained the
  5182. // finding.
  5183. // Provided when the finding's containing element is a cell in a
  5184. // table
  5185. // or a property of storage object.
  5186. FieldId *GooglePrivacyDlpV2beta2FieldId `json:"fieldId,omitempty"`
  5187. // ImageBoxes: The area within the image that contained the
  5188. // finding.
  5189. // Provided when the content is an image.
  5190. ImageBoxes []*GooglePrivacyDlpV2beta2ImageLocation `json:"imageBoxes,omitempty"`
  5191. // RecordKey: The pointer to the record in storage that contained the
  5192. // field the
  5193. // finding was found in.
  5194. // Provided when the finding's containing element is a property
  5195. // of a storage object.
  5196. RecordKey *GooglePrivacyDlpV2beta2RecordKey `json:"recordKey,omitempty"`
  5197. // TableLocation: The pointer to the row of the table that contained the
  5198. // finding.
  5199. // Provided when the finding's containing element is a cell of a table.
  5200. TableLocation *GooglePrivacyDlpV2beta2TableLocation `json:"tableLocation,omitempty"`
  5201. // ForceSendFields is a list of field names (e.g. "ByteRange") to
  5202. // unconditionally include in API requests. By default, fields with
  5203. // empty values are omitted from API requests. However, any non-pointer,
  5204. // non-interface field appearing in ForceSendFields will be sent to the
  5205. // server regardless of whether the field is empty or not. This may be
  5206. // used to include empty fields in Patch requests.
  5207. ForceSendFields []string `json:"-"`
  5208. // NullFields is a list of field names (e.g. "ByteRange") to include in
  5209. // API requests with the JSON null value. By default, fields with empty
  5210. // values are omitted from API requests. However, any field with an
  5211. // empty value appearing in NullFields will be sent to the server as
  5212. // null. It is an error if a field in this list has a non-empty value.
  5213. // This may be used to include null fields in Patch requests.
  5214. NullFields []string `json:"-"`
  5215. }
  5216. func (s *GooglePrivacyDlpV2beta2Location) MarshalJSON() ([]byte, error) {
  5217. type NoMethod GooglePrivacyDlpV2beta2Location
  5218. raw := NoMethod(*s)
  5219. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5220. }
  5221. // GooglePrivacyDlpV2beta2NumericalStatsConfig: Compute numerical stats
  5222. // over an individual column, including
  5223. // min, max, and quantiles.
  5224. type GooglePrivacyDlpV2beta2NumericalStatsConfig struct {
  5225. // Field: Field to compute numerical stats on. Supported types
  5226. // are
  5227. // integer, float, date, datetime, timestamp, time.
  5228. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  5229. // ForceSendFields is a list of field names (e.g. "Field") to
  5230. // unconditionally include in API requests. By default, fields with
  5231. // empty values are omitted from API requests. However, any non-pointer,
  5232. // non-interface field appearing in ForceSendFields will be sent to the
  5233. // server regardless of whether the field is empty or not. This may be
  5234. // used to include empty fields in Patch requests.
  5235. ForceSendFields []string `json:"-"`
  5236. // NullFields is a list of field names (e.g. "Field") to include in API
  5237. // requests with the JSON null value. By default, fields with empty
  5238. // values are omitted from API requests. However, any field with an
  5239. // empty value appearing in NullFields will be sent to the server as
  5240. // null. It is an error if a field in this list has a non-empty value.
  5241. // This may be used to include null fields in Patch requests.
  5242. NullFields []string `json:"-"`
  5243. }
  5244. func (s *GooglePrivacyDlpV2beta2NumericalStatsConfig) MarshalJSON() ([]byte, error) {
  5245. type NoMethod GooglePrivacyDlpV2beta2NumericalStatsConfig
  5246. raw := NoMethod(*s)
  5247. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5248. }
  5249. // GooglePrivacyDlpV2beta2NumericalStatsResult: Result of the numerical
  5250. // stats computation.
  5251. type GooglePrivacyDlpV2beta2NumericalStatsResult struct {
  5252. // MaxValue: Maximum value appearing in the column.
  5253. MaxValue *GooglePrivacyDlpV2beta2Value `json:"maxValue,omitempty"`
  5254. // MinValue: Minimum value appearing in the column.
  5255. MinValue *GooglePrivacyDlpV2beta2Value `json:"minValue,omitempty"`
  5256. // QuantileValues: List of 99 values that partition the set of field
  5257. // values into 100 equal
  5258. // sized buckets.
  5259. QuantileValues []*GooglePrivacyDlpV2beta2Value `json:"quantileValues,omitempty"`
  5260. // ForceSendFields is a list of field names (e.g. "MaxValue") to
  5261. // unconditionally include in API requests. By default, fields with
  5262. // empty values are omitted from API requests. However, any non-pointer,
  5263. // non-interface field appearing in ForceSendFields will be sent to the
  5264. // server regardless of whether the field is empty or not. This may be
  5265. // used to include empty fields in Patch requests.
  5266. ForceSendFields []string `json:"-"`
  5267. // NullFields is a list of field names (e.g. "MaxValue") to include in
  5268. // API requests with the JSON null value. By default, fields with empty
  5269. // values are omitted from API requests. However, any field with an
  5270. // empty value appearing in NullFields will be sent to the server as
  5271. // null. It is an error if a field in this list has a non-empty value.
  5272. // This may be used to include null fields in Patch requests.
  5273. NullFields []string `json:"-"`
  5274. }
  5275. func (s *GooglePrivacyDlpV2beta2NumericalStatsResult) MarshalJSON() ([]byte, error) {
  5276. type NoMethod GooglePrivacyDlpV2beta2NumericalStatsResult
  5277. raw := NoMethod(*s)
  5278. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5279. }
  5280. // GooglePrivacyDlpV2beta2OutputStorageConfig: Cloud repository for
  5281. // storing output.
  5282. type GooglePrivacyDlpV2beta2OutputStorageConfig struct {
  5283. // OutputSchema: Schema used for writing the findings. Columns are
  5284. // derived from the
  5285. // `Finding` object. If appending to an existing table, any columns from
  5286. // the
  5287. // predefined schema that are missing will be added. No columns in
  5288. // the
  5289. // existing table will be deleted.
  5290. //
  5291. // If unspecified, then all available columns will be used for a new
  5292. // table,
  5293. // and no changes will be made to an existing table.
  5294. //
  5295. // Possible values:
  5296. // "OUTPUT_SCHEMA_UNSPECIFIED"
  5297. // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`,
  5298. // `certainty`, and
  5299. // `timestamp`.
  5300. // "GCS_COLUMNS" - Schema tailored to findings from scanning Google
  5301. // Cloud Storage.
  5302. // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning
  5303. // Google Datastore.
  5304. // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning
  5305. // Google BigQuery.
  5306. // "ALL_COLUMNS" - Schema containing all columns.
  5307. OutputSchema string `json:"outputSchema,omitempty"`
  5308. // Table: Store findings in an existing table or a new table in an
  5309. // existing
  5310. // dataset. Each column in an existing table must have the same name,
  5311. // type,
  5312. // and mode of a field in the `Finding` object. If table_id is not set a
  5313. // new
  5314. // one will be generated for you with the following
  5315. // format:
  5316. // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used
  5317. // for
  5318. // generating the date details.
  5319. Table *GooglePrivacyDlpV2beta2BigQueryTable `json:"table,omitempty"`
  5320. // ForceSendFields is a list of field names (e.g. "OutputSchema") to
  5321. // unconditionally include in API requests. By default, fields with
  5322. // empty values are omitted from API requests. However, any non-pointer,
  5323. // non-interface field appearing in ForceSendFields will be sent to the
  5324. // server regardless of whether the field is empty or not. This may be
  5325. // used to include empty fields in Patch requests.
  5326. ForceSendFields []string `json:"-"`
  5327. // NullFields is a list of field names (e.g. "OutputSchema") to include
  5328. // in API requests with the JSON null value. By default, fields with
  5329. // empty values are omitted from API requests. However, any field with
  5330. // an empty value appearing in NullFields will be sent to the server as
  5331. // null. It is an error if a field in this list has a non-empty value.
  5332. // This may be used to include null fields in Patch requests.
  5333. NullFields []string `json:"-"`
  5334. }
  5335. func (s *GooglePrivacyDlpV2beta2OutputStorageConfig) MarshalJSON() ([]byte, error) {
  5336. type NoMethod GooglePrivacyDlpV2beta2OutputStorageConfig
  5337. raw := NoMethod(*s)
  5338. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5339. }
  5340. // GooglePrivacyDlpV2beta2PartitionId: Datastore partition ID.
  5341. // A partition ID identifies a grouping of entities. The grouping is
  5342. // always
  5343. // by project and namespace, however the namespace ID may be empty.
  5344. //
  5345. // A partition ID contains several dimensions:
  5346. // project ID and namespace ID.
  5347. type GooglePrivacyDlpV2beta2PartitionId struct {
  5348. // NamespaceId: If not empty, the ID of the namespace to which the
  5349. // entities belong.
  5350. NamespaceId string `json:"namespaceId,omitempty"`
  5351. // ProjectId: The ID of the project to which the entities belong.
  5352. ProjectId string `json:"projectId,omitempty"`
  5353. // ForceSendFields is a list of field names (e.g. "NamespaceId") to
  5354. // unconditionally include in API requests. By default, fields with
  5355. // empty values are omitted from API requests. However, any non-pointer,
  5356. // non-interface field appearing in ForceSendFields will be sent to the
  5357. // server regardless of whether the field is empty or not. This may be
  5358. // used to include empty fields in Patch requests.
  5359. ForceSendFields []string `json:"-"`
  5360. // NullFields is a list of field names (e.g. "NamespaceId") to include
  5361. // in API requests with the JSON null value. By default, fields with
  5362. // empty values are omitted from API requests. However, any field with
  5363. // an empty value appearing in NullFields will be sent to the server as
  5364. // null. It is an error if a field in this list has a non-empty value.
  5365. // This may be used to include null fields in Patch requests.
  5366. NullFields []string `json:"-"`
  5367. }
  5368. func (s *GooglePrivacyDlpV2beta2PartitionId) MarshalJSON() ([]byte, error) {
  5369. type NoMethod GooglePrivacyDlpV2beta2PartitionId
  5370. raw := NoMethod(*s)
  5371. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5372. }
  5373. // GooglePrivacyDlpV2beta2PathElement: A (kind, ID/name) pair used to
  5374. // construct a key path.
  5375. //
  5376. // If either name or ID is set, the element is complete.
  5377. // If neither is set, the element is incomplete.
  5378. type GooglePrivacyDlpV2beta2PathElement struct {
  5379. // Id: The auto-allocated ID of the entity.
  5380. // Never equal to zero. Values less than zero are discouraged and may
  5381. // not
  5382. // be supported in the future.
  5383. Id int64 `json:"id,omitempty,string"`
  5384. // Kind: The kind of the entity.
  5385. // A kind matching regex `__.*__` is reserved/read-only.
  5386. // A kind must not contain more than 1500 bytes when UTF-8
  5387. // encoded.
  5388. // Cannot be "".
  5389. Kind string `json:"kind,omitempty"`
  5390. // Name: The name of the entity.
  5391. // A name matching regex `__.*__` is reserved/read-only.
  5392. // A name must not be more than 1500 bytes when UTF-8 encoded.
  5393. // Cannot be "".
  5394. Name string `json:"name,omitempty"`
  5395. // ForceSendFields is a list of field names (e.g. "Id") to
  5396. // unconditionally include in API requests. By default, fields with
  5397. // empty values are omitted from API requests. However, any non-pointer,
  5398. // non-interface field appearing in ForceSendFields will be sent to the
  5399. // server regardless of whether the field is empty or not. This may be
  5400. // used to include empty fields in Patch requests.
  5401. ForceSendFields []string `json:"-"`
  5402. // NullFields is a list of field names (e.g. "Id") to include in API
  5403. // requests with the JSON null value. By default, fields with empty
  5404. // values are omitted from API requests. However, any field with an
  5405. // empty value appearing in NullFields will be sent to the server as
  5406. // null. It is an error if a field in this list has a non-empty value.
  5407. // This may be used to include null fields in Patch requests.
  5408. NullFields []string `json:"-"`
  5409. }
  5410. func (s *GooglePrivacyDlpV2beta2PathElement) MarshalJSON() ([]byte, error) {
  5411. type NoMethod GooglePrivacyDlpV2beta2PathElement
  5412. raw := NoMethod(*s)
  5413. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5414. }
  5415. // GooglePrivacyDlpV2beta2PrimitiveTransformation: A rule for
  5416. // transforming a value.
  5417. type GooglePrivacyDlpV2beta2PrimitiveTransformation struct {
  5418. BucketingConfig *GooglePrivacyDlpV2beta2BucketingConfig `json:"bucketingConfig,omitempty"`
  5419. CharacterMaskConfig *GooglePrivacyDlpV2beta2CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
  5420. CryptoHashConfig *GooglePrivacyDlpV2beta2CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
  5421. CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2beta2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"`
  5422. DateShiftConfig *GooglePrivacyDlpV2beta2DateShiftConfig `json:"dateShiftConfig,omitempty"`
  5423. FixedSizeBucketingConfig *GooglePrivacyDlpV2beta2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"`
  5424. RedactConfig *GooglePrivacyDlpV2beta2RedactConfig `json:"redactConfig,omitempty"`
  5425. ReplaceConfig *GooglePrivacyDlpV2beta2ReplaceValueConfig `json:"replaceConfig,omitempty"`
  5426. ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"`
  5427. TimePartConfig *GooglePrivacyDlpV2beta2TimePartConfig `json:"timePartConfig,omitempty"`
  5428. // ForceSendFields is a list of field names (e.g. "BucketingConfig") to
  5429. // unconditionally include in API requests. By default, fields with
  5430. // empty values are omitted from API requests. However, any non-pointer,
  5431. // non-interface field appearing in ForceSendFields will be sent to the
  5432. // server regardless of whether the field is empty or not. This may be
  5433. // used to include empty fields in Patch requests.
  5434. ForceSendFields []string `json:"-"`
  5435. // NullFields is a list of field names (e.g. "BucketingConfig") to
  5436. // include in API requests with the JSON null value. By default, fields
  5437. // with empty values are omitted from API requests. However, any field
  5438. // with an empty value appearing in NullFields will be sent to the
  5439. // server as null. It is an error if a field in this list has a
  5440. // non-empty value. This may be used to include null fields in Patch
  5441. // requests.
  5442. NullFields []string `json:"-"`
  5443. }
  5444. func (s *GooglePrivacyDlpV2beta2PrimitiveTransformation) MarshalJSON() ([]byte, error) {
  5445. type NoMethod GooglePrivacyDlpV2beta2PrimitiveTransformation
  5446. raw := NoMethod(*s)
  5447. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5448. }
  5449. // GooglePrivacyDlpV2beta2PrivacyMetric: Privacy metric to compute for
  5450. // reidentification risk analysis.
  5451. type GooglePrivacyDlpV2beta2PrivacyMetric struct {
  5452. CategoricalStatsConfig *GooglePrivacyDlpV2beta2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"`
  5453. KAnonymityConfig *GooglePrivacyDlpV2beta2KAnonymityConfig `json:"kAnonymityConfig,omitempty"`
  5454. KMapEstimationConfig *GooglePrivacyDlpV2beta2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"`
  5455. LDiversityConfig *GooglePrivacyDlpV2beta2LDiversityConfig `json:"lDiversityConfig,omitempty"`
  5456. NumericalStatsConfig *GooglePrivacyDlpV2beta2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"`
  5457. // ForceSendFields is a list of field names (e.g.
  5458. // "CategoricalStatsConfig") to unconditionally include in API requests.
  5459. // By default, fields with empty values are omitted from API requests.
  5460. // However, any non-pointer, non-interface field appearing in
  5461. // ForceSendFields will be sent to the server regardless of whether the
  5462. // field is empty or not. This may be used to include empty fields in
  5463. // Patch requests.
  5464. ForceSendFields []string `json:"-"`
  5465. // NullFields is a list of field names (e.g. "CategoricalStatsConfig")
  5466. // to include in API requests with the JSON null value. By default,
  5467. // fields with empty values are omitted from API requests. However, any
  5468. // field with an empty value appearing in NullFields will be sent to the
  5469. // server as null. It is an error if a field in this list has a
  5470. // non-empty value. This may be used to include null fields in Patch
  5471. // requests.
  5472. NullFields []string `json:"-"`
  5473. }
  5474. func (s *GooglePrivacyDlpV2beta2PrivacyMetric) MarshalJSON() ([]byte, error) {
  5475. type NoMethod GooglePrivacyDlpV2beta2PrivacyMetric
  5476. raw := NoMethod(*s)
  5477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5478. }
  5479. // GooglePrivacyDlpV2beta2Proximity: Message for specifying a window
  5480. // around a finding to apply a detection
  5481. // rule.
  5482. type GooglePrivacyDlpV2beta2Proximity struct {
  5483. // WindowAfter: Number of characters after the finding to consider.
  5484. WindowAfter int64 `json:"windowAfter,omitempty"`
  5485. // WindowBefore: Number of characters before the finding to consider.
  5486. WindowBefore int64 `json:"windowBefore,omitempty"`
  5487. // ForceSendFields is a list of field names (e.g. "WindowAfter") to
  5488. // unconditionally include in API requests. By default, fields with
  5489. // empty values are omitted from API requests. However, any non-pointer,
  5490. // non-interface field appearing in ForceSendFields will be sent to the
  5491. // server regardless of whether the field is empty or not. This may be
  5492. // used to include empty fields in Patch requests.
  5493. ForceSendFields []string `json:"-"`
  5494. // NullFields is a list of field names (e.g. "WindowAfter") to include
  5495. // in API requests with the JSON null value. By default, fields with
  5496. // empty values are omitted from API requests. However, any field with
  5497. // an empty value appearing in NullFields will be sent to the server as
  5498. // null. It is an error if a field in this list has a non-empty value.
  5499. // This may be used to include null fields in Patch requests.
  5500. NullFields []string `json:"-"`
  5501. }
  5502. func (s *GooglePrivacyDlpV2beta2Proximity) MarshalJSON() ([]byte, error) {
  5503. type NoMethod GooglePrivacyDlpV2beta2Proximity
  5504. raw := NoMethod(*s)
  5505. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5506. }
  5507. // GooglePrivacyDlpV2beta2PublishToPubSub: Publish the results of a
  5508. // DlpJob to a pub sub channel.
  5509. // Compatible with: Inpect, Risk
  5510. type GooglePrivacyDlpV2beta2PublishToPubSub struct {
  5511. // Topic: Cloud Pub/Sub topic to send notifications to. The topic must
  5512. // have given
  5513. // publishing access rights to the DLP API service account executing
  5514. // the long running DlpJob sending the notifications.
  5515. // Format is projects/{project}/topics/{topic}.
  5516. Topic string `json:"topic,omitempty"`
  5517. // ForceSendFields is a list of field names (e.g. "Topic") to
  5518. // unconditionally include in API requests. By default, fields with
  5519. // empty values are omitted from API requests. However, any non-pointer,
  5520. // non-interface field appearing in ForceSendFields will be sent to the
  5521. // server regardless of whether the field is empty or not. This may be
  5522. // used to include empty fields in Patch requests.
  5523. ForceSendFields []string `json:"-"`
  5524. // NullFields is a list of field names (e.g. "Topic") to include in API
  5525. // requests with the JSON null value. By default, fields with empty
  5526. // values are omitted from API requests. However, any field with an
  5527. // empty value appearing in NullFields will be sent to the server as
  5528. // null. It is an error if a field in this list has a non-empty value.
  5529. // This may be used to include null fields in Patch requests.
  5530. NullFields []string `json:"-"`
  5531. }
  5532. func (s *GooglePrivacyDlpV2beta2PublishToPubSub) MarshalJSON() ([]byte, error) {
  5533. type NoMethod GooglePrivacyDlpV2beta2PublishToPubSub
  5534. raw := NoMethod(*s)
  5535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5536. }
  5537. // GooglePrivacyDlpV2beta2QuasiIdField: A quasi-identifier column has a
  5538. // custom_tag, used to know which column
  5539. // in the data corresponds to which column in the statistical model.
  5540. type GooglePrivacyDlpV2beta2QuasiIdField struct {
  5541. CustomTag string `json:"customTag,omitempty"`
  5542. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  5543. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  5544. // unconditionally include in API requests. By default, fields with
  5545. // empty values are omitted from API requests. However, any non-pointer,
  5546. // non-interface field appearing in ForceSendFields will be sent to the
  5547. // server regardless of whether the field is empty or not. This may be
  5548. // used to include empty fields in Patch requests.
  5549. ForceSendFields []string `json:"-"`
  5550. // NullFields is a list of field names (e.g. "CustomTag") to include in
  5551. // API requests with the JSON null value. By default, fields with empty
  5552. // values are omitted from API requests. However, any field with an
  5553. // empty value appearing in NullFields will be sent to the server as
  5554. // null. It is an error if a field in this list has a non-empty value.
  5555. // This may be used to include null fields in Patch requests.
  5556. NullFields []string `json:"-"`
  5557. }
  5558. func (s *GooglePrivacyDlpV2beta2QuasiIdField) MarshalJSON() ([]byte, error) {
  5559. type NoMethod GooglePrivacyDlpV2beta2QuasiIdField
  5560. raw := NoMethod(*s)
  5561. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5562. }
  5563. // GooglePrivacyDlpV2beta2QuoteInfo: Message for infoType-dependent
  5564. // details parsed from quote.
  5565. type GooglePrivacyDlpV2beta2QuoteInfo struct {
  5566. DateTime *GooglePrivacyDlpV2beta2DateTime `json:"dateTime,omitempty"`
  5567. // ForceSendFields is a list of field names (e.g. "DateTime") to
  5568. // unconditionally include in API requests. By default, fields with
  5569. // empty values are omitted from API requests. However, any non-pointer,
  5570. // non-interface field appearing in ForceSendFields will be sent to the
  5571. // server regardless of whether the field is empty or not. This may be
  5572. // used to include empty fields in Patch requests.
  5573. ForceSendFields []string `json:"-"`
  5574. // NullFields is a list of field names (e.g. "DateTime") to include in
  5575. // API requests with the JSON null value. By default, fields with empty
  5576. // values are omitted from API requests. However, any field with an
  5577. // empty value appearing in NullFields will be sent to the server as
  5578. // null. It is an error if a field in this list has a non-empty value.
  5579. // This may be used to include null fields in Patch requests.
  5580. NullFields []string `json:"-"`
  5581. }
  5582. func (s *GooglePrivacyDlpV2beta2QuoteInfo) MarshalJSON() ([]byte, error) {
  5583. type NoMethod GooglePrivacyDlpV2beta2QuoteInfo
  5584. raw := NoMethod(*s)
  5585. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5586. }
  5587. // GooglePrivacyDlpV2beta2Range: Generic half-open interval [start, end)
  5588. type GooglePrivacyDlpV2beta2Range struct {
  5589. // End: Index of the last character of the range (exclusive).
  5590. End int64 `json:"end,omitempty,string"`
  5591. // Start: Index of the first character of the range (inclusive).
  5592. Start int64 `json:"start,omitempty,string"`
  5593. // ForceSendFields is a list of field names (e.g. "End") to
  5594. // unconditionally include in API requests. By default, fields with
  5595. // empty values are omitted from API requests. However, any non-pointer,
  5596. // non-interface field appearing in ForceSendFields will be sent to the
  5597. // server regardless of whether the field is empty or not. This may be
  5598. // used to include empty fields in Patch requests.
  5599. ForceSendFields []string `json:"-"`
  5600. // NullFields is a list of field names (e.g. "End") to include in API
  5601. // requests with the JSON null value. By default, fields with empty
  5602. // values are omitted from API requests. However, any field with an
  5603. // empty value appearing in NullFields will be sent to the server as
  5604. // null. It is an error if a field in this list has a non-empty value.
  5605. // This may be used to include null fields in Patch requests.
  5606. NullFields []string `json:"-"`
  5607. }
  5608. func (s *GooglePrivacyDlpV2beta2Range) MarshalJSON() ([]byte, error) {
  5609. type NoMethod GooglePrivacyDlpV2beta2Range
  5610. raw := NoMethod(*s)
  5611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5612. }
  5613. // GooglePrivacyDlpV2beta2RecordCondition: A condition for determining
  5614. // whether a transformation should be applied to
  5615. // a field.
  5616. type GooglePrivacyDlpV2beta2RecordCondition struct {
  5617. // Expressions: An expression.
  5618. Expressions *GooglePrivacyDlpV2beta2Expressions `json:"expressions,omitempty"`
  5619. // ForceSendFields is a list of field names (e.g. "Expressions") to
  5620. // unconditionally include in API requests. By default, fields with
  5621. // empty values are omitted from API requests. However, any non-pointer,
  5622. // non-interface field appearing in ForceSendFields will be sent to the
  5623. // server regardless of whether the field is empty or not. This may be
  5624. // used to include empty fields in Patch requests.
  5625. ForceSendFields []string `json:"-"`
  5626. // NullFields is a list of field names (e.g. "Expressions") to include
  5627. // in API requests with the JSON null value. By default, fields with
  5628. // empty values are omitted from API requests. However, any field with
  5629. // an empty value appearing in NullFields will be sent to the server as
  5630. // null. It is an error if a field in this list has a non-empty value.
  5631. // This may be used to include null fields in Patch requests.
  5632. NullFields []string `json:"-"`
  5633. }
  5634. func (s *GooglePrivacyDlpV2beta2RecordCondition) MarshalJSON() ([]byte, error) {
  5635. type NoMethod GooglePrivacyDlpV2beta2RecordCondition
  5636. raw := NoMethod(*s)
  5637. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5638. }
  5639. // GooglePrivacyDlpV2beta2RecordKey: Message for a unique key indicating
  5640. // a record that contains a finding.
  5641. type GooglePrivacyDlpV2beta2RecordKey struct {
  5642. BigQueryKey *GooglePrivacyDlpV2beta2BigQueryKey `json:"bigQueryKey,omitempty"`
  5643. CloudStorageKey *GooglePrivacyDlpV2beta2CloudStorageKey `json:"cloudStorageKey,omitempty"`
  5644. DatastoreKey *GooglePrivacyDlpV2beta2DatastoreKey `json:"datastoreKey,omitempty"`
  5645. // ForceSendFields is a list of field names (e.g. "BigQueryKey") to
  5646. // unconditionally include in API requests. By default, fields with
  5647. // empty values are omitted from API requests. However, any non-pointer,
  5648. // non-interface field appearing in ForceSendFields will be sent to the
  5649. // server regardless of whether the field is empty or not. This may be
  5650. // used to include empty fields in Patch requests.
  5651. ForceSendFields []string `json:"-"`
  5652. // NullFields is a list of field names (e.g. "BigQueryKey") to include
  5653. // in API requests with the JSON null value. By default, fields with
  5654. // empty values are omitted from API requests. However, any field with
  5655. // an empty value appearing in NullFields will be sent to the server as
  5656. // null. It is an error if a field in this list has a non-empty value.
  5657. // This may be used to include null fields in Patch requests.
  5658. NullFields []string `json:"-"`
  5659. }
  5660. func (s *GooglePrivacyDlpV2beta2RecordKey) MarshalJSON() ([]byte, error) {
  5661. type NoMethod GooglePrivacyDlpV2beta2RecordKey
  5662. raw := NoMethod(*s)
  5663. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5664. }
  5665. // GooglePrivacyDlpV2beta2RecordSuppression: Configuration to suppress
  5666. // records whose suppression conditions evaluate to
  5667. // true.
  5668. type GooglePrivacyDlpV2beta2RecordSuppression struct {
  5669. // Condition: A condition that when it evaluates to true will result in
  5670. // the record being
  5671. // evaluated to be suppressed from the transformed content.
  5672. Condition *GooglePrivacyDlpV2beta2RecordCondition `json:"condition,omitempty"`
  5673. // ForceSendFields is a list of field names (e.g. "Condition") to
  5674. // unconditionally include in API requests. By default, fields with
  5675. // empty values are omitted from API requests. However, any non-pointer,
  5676. // non-interface field appearing in ForceSendFields will be sent to the
  5677. // server regardless of whether the field is empty or not. This may be
  5678. // used to include empty fields in Patch requests.
  5679. ForceSendFields []string `json:"-"`
  5680. // NullFields is a list of field names (e.g. "Condition") to include in
  5681. // API requests with the JSON null value. By default, fields with empty
  5682. // values are omitted from API requests. However, any field with an
  5683. // empty value appearing in NullFields will be sent to the server as
  5684. // null. It is an error if a field in this list has a non-empty value.
  5685. // This may be used to include null fields in Patch requests.
  5686. NullFields []string `json:"-"`
  5687. }
  5688. func (s *GooglePrivacyDlpV2beta2RecordSuppression) MarshalJSON() ([]byte, error) {
  5689. type NoMethod GooglePrivacyDlpV2beta2RecordSuppression
  5690. raw := NoMethod(*s)
  5691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5692. }
  5693. // GooglePrivacyDlpV2beta2RecordTransformations: A type of
  5694. // transformation that is applied over structured data such as a
  5695. // table.
  5696. type GooglePrivacyDlpV2beta2RecordTransformations struct {
  5697. // FieldTransformations: Transform the record by applying various field
  5698. // transformations.
  5699. FieldTransformations []*GooglePrivacyDlpV2beta2FieldTransformation `json:"fieldTransformations,omitempty"`
  5700. // RecordSuppressions: Configuration defining which records get
  5701. // suppressed entirely. Records that
  5702. // match any suppression rule are omitted from the output [optional].
  5703. RecordSuppressions []*GooglePrivacyDlpV2beta2RecordSuppression `json:"recordSuppressions,omitempty"`
  5704. // ForceSendFields is a list of field names (e.g.
  5705. // "FieldTransformations") to unconditionally include in API requests.
  5706. // By default, fields with empty values are omitted from API requests.
  5707. // However, any non-pointer, non-interface field appearing in
  5708. // ForceSendFields will be sent to the server regardless of whether the
  5709. // field is empty or not. This may be used to include empty fields in
  5710. // Patch requests.
  5711. ForceSendFields []string `json:"-"`
  5712. // NullFields is a list of field names (e.g. "FieldTransformations") to
  5713. // include in API requests with the JSON null value. By default, fields
  5714. // with empty values are omitted from API requests. However, any field
  5715. // with an empty value appearing in NullFields will be sent to the
  5716. // server as null. It is an error if a field in this list has a
  5717. // non-empty value. This may be used to include null fields in Patch
  5718. // requests.
  5719. NullFields []string `json:"-"`
  5720. }
  5721. func (s *GooglePrivacyDlpV2beta2RecordTransformations) MarshalJSON() ([]byte, error) {
  5722. type NoMethod GooglePrivacyDlpV2beta2RecordTransformations
  5723. raw := NoMethod(*s)
  5724. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5725. }
  5726. // GooglePrivacyDlpV2beta2RedactConfig: Redact a given value. For
  5727. // example, if used with an `InfoTypeTransformation`
  5728. // transforming PHONE_NUMBER, and input 'My phone number is
  5729. // 206-555-0123', the
  5730. // output would be 'My phone number is '.
  5731. type GooglePrivacyDlpV2beta2RedactConfig struct {
  5732. }
  5733. // GooglePrivacyDlpV2beta2RedactImageRequest: Request to search for
  5734. // potentially sensitive info in a list of items
  5735. // and replace it with a default or provided content.
  5736. type GooglePrivacyDlpV2beta2RedactImageRequest struct {
  5737. // ImageData: The bytes of the image to redact.
  5738. ImageData string `json:"imageData,omitempty"`
  5739. // ImageRedactionConfigs: The configuration for specifying what content
  5740. // to redact from images.
  5741. ImageRedactionConfigs []*GooglePrivacyDlpV2beta2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"`
  5742. // ImageType: Type of the content, as defined in Content-Type HTTP
  5743. // header.
  5744. // Supported types are: PNG, JPEG, SVG, & BMP.
  5745. ImageType string `json:"imageType,omitempty"`
  5746. // InspectConfig: Configuration for the inspector.
  5747. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  5748. // ForceSendFields is a list of field names (e.g. "ImageData") to
  5749. // unconditionally include in API requests. By default, fields with
  5750. // empty values are omitted from API requests. However, any non-pointer,
  5751. // non-interface field appearing in ForceSendFields will be sent to the
  5752. // server regardless of whether the field is empty or not. This may be
  5753. // used to include empty fields in Patch requests.
  5754. ForceSendFields []string `json:"-"`
  5755. // NullFields is a list of field names (e.g. "ImageData") to include in
  5756. // API requests with the JSON null value. By default, fields with empty
  5757. // values are omitted from API requests. However, any field with an
  5758. // empty value appearing in NullFields will be sent to the server as
  5759. // null. It is an error if a field in this list has a non-empty value.
  5760. // This may be used to include null fields in Patch requests.
  5761. NullFields []string `json:"-"`
  5762. }
  5763. func (s *GooglePrivacyDlpV2beta2RedactImageRequest) MarshalJSON() ([]byte, error) {
  5764. type NoMethod GooglePrivacyDlpV2beta2RedactImageRequest
  5765. raw := NoMethod(*s)
  5766. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5767. }
  5768. // GooglePrivacyDlpV2beta2RedactImageResponse: Results of redacting an
  5769. // image.
  5770. type GooglePrivacyDlpV2beta2RedactImageResponse struct {
  5771. // ExtractedText: If an image was being inspected and the
  5772. // InspectConfig's include_quote was
  5773. // set to true, then this field will include all text, if any, that was
  5774. // found
  5775. // in the image.
  5776. ExtractedText string `json:"extractedText,omitempty"`
  5777. // RedactedImage: The redacted image. The type will be the same as the
  5778. // original image.
  5779. RedactedImage string `json:"redactedImage,omitempty"`
  5780. // ServerResponse contains the HTTP response code and headers from the
  5781. // server.
  5782. googleapi.ServerResponse `json:"-"`
  5783. // ForceSendFields is a list of field names (e.g. "ExtractedText") to
  5784. // unconditionally include in API requests. By default, fields with
  5785. // empty values are omitted from API requests. However, any non-pointer,
  5786. // non-interface field appearing in ForceSendFields will be sent to the
  5787. // server regardless of whether the field is empty or not. This may be
  5788. // used to include empty fields in Patch requests.
  5789. ForceSendFields []string `json:"-"`
  5790. // NullFields is a list of field names (e.g. "ExtractedText") to include
  5791. // in API requests with the JSON null value. By default, fields with
  5792. // empty values are omitted from API requests. However, any field with
  5793. // an empty value appearing in NullFields will be sent to the server as
  5794. // null. It is an error if a field in this list has a non-empty value.
  5795. // This may be used to include null fields in Patch requests.
  5796. NullFields []string `json:"-"`
  5797. }
  5798. func (s *GooglePrivacyDlpV2beta2RedactImageResponse) MarshalJSON() ([]byte, error) {
  5799. type NoMethod GooglePrivacyDlpV2beta2RedactImageResponse
  5800. raw := NoMethod(*s)
  5801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5802. }
  5803. // GooglePrivacyDlpV2beta2Regex: Message defining a custom regular
  5804. // expression.
  5805. type GooglePrivacyDlpV2beta2Regex struct {
  5806. // Pattern: Pattern defining the regular expression.
  5807. Pattern string `json:"pattern,omitempty"`
  5808. // ForceSendFields is a list of field names (e.g. "Pattern") to
  5809. // unconditionally include in API requests. By default, fields with
  5810. // empty values are omitted from API requests. However, any non-pointer,
  5811. // non-interface field appearing in ForceSendFields will be sent to the
  5812. // server regardless of whether the field is empty or not. This may be
  5813. // used to include empty fields in Patch requests.
  5814. ForceSendFields []string `json:"-"`
  5815. // NullFields is a list of field names (e.g. "Pattern") to include in
  5816. // API requests with the JSON null value. By default, fields with empty
  5817. // values are omitted from API requests. However, any field with an
  5818. // empty value appearing in NullFields will be sent to the server as
  5819. // null. It is an error if a field in this list has a non-empty value.
  5820. // This may be used to include null fields in Patch requests.
  5821. NullFields []string `json:"-"`
  5822. }
  5823. func (s *GooglePrivacyDlpV2beta2Regex) MarshalJSON() ([]byte, error) {
  5824. type NoMethod GooglePrivacyDlpV2beta2Regex
  5825. raw := NoMethod(*s)
  5826. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5827. }
  5828. // GooglePrivacyDlpV2beta2ReidentifyContentRequest: Request to
  5829. // re-identify an item.
  5830. type GooglePrivacyDlpV2beta2ReidentifyContentRequest struct {
  5831. // InspectConfig: Configuration for the inspector.
  5832. InspectConfig *GooglePrivacyDlpV2beta2InspectConfig `json:"inspectConfig,omitempty"`
  5833. // InspectTemplateName: Optional template to use. Any configuration
  5834. // directly specified in
  5835. // `inspect_config` will override those set in the template. Singular
  5836. // fields
  5837. // that are set in this request will replace their corresponding fields
  5838. // in the
  5839. // template. Repeated fields are appended. Singular sub-messages and
  5840. // groups
  5841. // are recursively merged.
  5842. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  5843. // Item: The item to re-identify. Will be treated as text.
  5844. Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"`
  5845. // ReidentifyConfig: Configuration for the re-identification of the
  5846. // content item.
  5847. // This field shares the same proto message type that is used
  5848. // for
  5849. // de-identification, however its usage here is for the reversal of
  5850. // the
  5851. // previous de-identification. Re-identification is performed by
  5852. // examining
  5853. // the transformations used to de-identify the items and executing
  5854. // the
  5855. // reverse. This requires that only reversible transformations
  5856. // be provided here. The reversible transformations are:
  5857. //
  5858. // - `CryptoReplaceFfxFpeConfig`
  5859. ReidentifyConfig *GooglePrivacyDlpV2beta2DeidentifyConfig `json:"reidentifyConfig,omitempty"`
  5860. // ReidentifyTemplateName: Optional template to use. References an
  5861. // instance of `DeidentifyTemplate`.
  5862. // Any configuration directly specified in `reidentify_config`
  5863. // or
  5864. // `inspect_config` will override those set in the template. Singular
  5865. // fields
  5866. // that are set in this request will replace their corresponding fields
  5867. // in the
  5868. // template. Repeated fields are appended. Singular sub-messages and
  5869. // groups
  5870. // are recursively merged.
  5871. ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"`
  5872. // ForceSendFields is a list of field names (e.g. "InspectConfig") to
  5873. // unconditionally include in API requests. By default, fields with
  5874. // empty values are omitted from API requests. However, any non-pointer,
  5875. // non-interface field appearing in ForceSendFields will be sent to the
  5876. // server regardless of whether the field is empty or not. This may be
  5877. // used to include empty fields in Patch requests.
  5878. ForceSendFields []string `json:"-"`
  5879. // NullFields is a list of field names (e.g. "InspectConfig") to include
  5880. // in API requests with the JSON null value. By default, fields with
  5881. // empty values are omitted from API requests. However, any field with
  5882. // an empty value appearing in NullFields will be sent to the server as
  5883. // null. It is an error if a field in this list has a non-empty value.
  5884. // This may be used to include null fields in Patch requests.
  5885. NullFields []string `json:"-"`
  5886. }
  5887. func (s *GooglePrivacyDlpV2beta2ReidentifyContentRequest) MarshalJSON() ([]byte, error) {
  5888. type NoMethod GooglePrivacyDlpV2beta2ReidentifyContentRequest
  5889. raw := NoMethod(*s)
  5890. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5891. }
  5892. // GooglePrivacyDlpV2beta2ReidentifyContentResponse: Results of
  5893. // re-identifying a item.
  5894. type GooglePrivacyDlpV2beta2ReidentifyContentResponse struct {
  5895. // Item: The re-identified item.
  5896. Item *GooglePrivacyDlpV2beta2ContentItem `json:"item,omitempty"`
  5897. // Overview: An overview of the changes that were made to the `item`.
  5898. Overview *GooglePrivacyDlpV2beta2TransformationOverview `json:"overview,omitempty"`
  5899. // ServerResponse contains the HTTP response code and headers from the
  5900. // server.
  5901. googleapi.ServerResponse `json:"-"`
  5902. // ForceSendFields is a list of field names (e.g. "Item") to
  5903. // unconditionally include in API requests. By default, fields with
  5904. // empty values are omitted from API requests. However, any non-pointer,
  5905. // non-interface field appearing in ForceSendFields will be sent to the
  5906. // server regardless of whether the field is empty or not. This may be
  5907. // used to include empty fields in Patch requests.
  5908. ForceSendFields []string `json:"-"`
  5909. // NullFields is a list of field names (e.g. "Item") to include in API
  5910. // requests with the JSON null value. By default, fields with empty
  5911. // values are omitted from API requests. However, any field with an
  5912. // empty value appearing in NullFields will be sent to the server as
  5913. // null. It is an error if a field in this list has a non-empty value.
  5914. // This may be used to include null fields in Patch requests.
  5915. NullFields []string `json:"-"`
  5916. }
  5917. func (s *GooglePrivacyDlpV2beta2ReidentifyContentResponse) MarshalJSON() ([]byte, error) {
  5918. type NoMethod GooglePrivacyDlpV2beta2ReidentifyContentResponse
  5919. raw := NoMethod(*s)
  5920. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5921. }
  5922. // GooglePrivacyDlpV2beta2ReplaceValueConfig: Replace each input value
  5923. // with a given `Value`.
  5924. type GooglePrivacyDlpV2beta2ReplaceValueConfig struct {
  5925. // NewValue: Value to replace it with.
  5926. NewValue *GooglePrivacyDlpV2beta2Value `json:"newValue,omitempty"`
  5927. // ForceSendFields is a list of field names (e.g. "NewValue") to
  5928. // unconditionally include in API requests. By default, fields with
  5929. // empty values are omitted from API requests. However, any non-pointer,
  5930. // non-interface field appearing in ForceSendFields will be sent to the
  5931. // server regardless of whether the field is empty or not. This may be
  5932. // used to include empty fields in Patch requests.
  5933. ForceSendFields []string `json:"-"`
  5934. // NullFields is a list of field names (e.g. "NewValue") to include in
  5935. // API requests with the JSON null value. By default, fields with empty
  5936. // values are omitted from API requests. However, any field with an
  5937. // empty value appearing in NullFields will be sent to the server as
  5938. // null. It is an error if a field in this list has a non-empty value.
  5939. // This may be used to include null fields in Patch requests.
  5940. NullFields []string `json:"-"`
  5941. }
  5942. func (s *GooglePrivacyDlpV2beta2ReplaceValueConfig) MarshalJSON() ([]byte, error) {
  5943. type NoMethod GooglePrivacyDlpV2beta2ReplaceValueConfig
  5944. raw := NoMethod(*s)
  5945. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5946. }
  5947. // GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig: Replace each
  5948. // matching finding with the name of the info_type.
  5949. type GooglePrivacyDlpV2beta2ReplaceWithInfoTypeConfig struct {
  5950. }
  5951. type GooglePrivacyDlpV2beta2RequestedOptions struct {
  5952. JobConfig *GooglePrivacyDlpV2beta2InspectJobConfig `json:"jobConfig,omitempty"`
  5953. // SnapshotInspectTemplate: If run with an inspect template, a snapshot
  5954. // of it's state at the time of
  5955. // this run.
  5956. SnapshotInspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"snapshotInspectTemplate,omitempty"`
  5957. // ForceSendFields is a list of field names (e.g. "JobConfig") to
  5958. // unconditionally include in API requests. By default, fields with
  5959. // empty values are omitted from API requests. However, any non-pointer,
  5960. // non-interface field appearing in ForceSendFields will be sent to the
  5961. // server regardless of whether the field is empty or not. This may be
  5962. // used to include empty fields in Patch requests.
  5963. ForceSendFields []string `json:"-"`
  5964. // NullFields is a list of field names (e.g. "JobConfig") to include in
  5965. // API requests with the JSON null value. By default, fields with empty
  5966. // values are omitted from API requests. However, any field with an
  5967. // empty value appearing in NullFields will be sent to the server as
  5968. // null. It is an error if a field in this list has a non-empty value.
  5969. // This may be used to include null fields in Patch requests.
  5970. NullFields []string `json:"-"`
  5971. }
  5972. func (s *GooglePrivacyDlpV2beta2RequestedOptions) MarshalJSON() ([]byte, error) {
  5973. type NoMethod GooglePrivacyDlpV2beta2RequestedOptions
  5974. raw := NoMethod(*s)
  5975. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5976. }
  5977. type GooglePrivacyDlpV2beta2Result struct {
  5978. // InfoTypeStats: Statistics of how many instances of each info type
  5979. // were found during
  5980. // inspect job.
  5981. InfoTypeStats []*GooglePrivacyDlpV2beta2InfoTypeStatistics `json:"infoTypeStats,omitempty"`
  5982. // ProcessedBytes: Total size in bytes that were processed.
  5983. ProcessedBytes int64 `json:"processedBytes,omitempty,string"`
  5984. // TotalEstimatedBytes: Estimate of the number of bytes to process.
  5985. TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"`
  5986. // ForceSendFields is a list of field names (e.g. "InfoTypeStats") to
  5987. // unconditionally include in API requests. By default, fields with
  5988. // empty values are omitted from API requests. However, any non-pointer,
  5989. // non-interface field appearing in ForceSendFields will be sent to the
  5990. // server regardless of whether the field is empty or not. This may be
  5991. // used to include empty fields in Patch requests.
  5992. ForceSendFields []string `json:"-"`
  5993. // NullFields is a list of field names (e.g. "InfoTypeStats") to include
  5994. // in API requests with the JSON null value. By default, fields with
  5995. // empty values are omitted from API requests. However, any field with
  5996. // an empty value appearing in NullFields will be sent to the server as
  5997. // null. It is an error if a field in this list has a non-empty value.
  5998. // This may be used to include null fields in Patch requests.
  5999. NullFields []string `json:"-"`
  6000. }
  6001. func (s *GooglePrivacyDlpV2beta2Result) MarshalJSON() ([]byte, error) {
  6002. type NoMethod GooglePrivacyDlpV2beta2Result
  6003. raw := NoMethod(*s)
  6004. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6005. }
  6006. // GooglePrivacyDlpV2beta2RiskAnalysisJobConfig: Configuration for a
  6007. // risk analysis job.
  6008. type GooglePrivacyDlpV2beta2RiskAnalysisJobConfig struct {
  6009. // Actions: Actions to execute at the completion of the job. Are
  6010. // executed in the order
  6011. // provided.
  6012. Actions []*GooglePrivacyDlpV2beta2Action `json:"actions,omitempty"`
  6013. // PrivacyMetric: Privacy metric to compute.
  6014. PrivacyMetric *GooglePrivacyDlpV2beta2PrivacyMetric `json:"privacyMetric,omitempty"`
  6015. // SourceTable: Input dataset to compute metrics over.
  6016. SourceTable *GooglePrivacyDlpV2beta2BigQueryTable `json:"sourceTable,omitempty"`
  6017. // ForceSendFields is a list of field names (e.g. "Actions") to
  6018. // unconditionally include in API requests. By default, fields with
  6019. // empty values are omitted from API requests. However, any non-pointer,
  6020. // non-interface field appearing in ForceSendFields will be sent to the
  6021. // server regardless of whether the field is empty or not. This may be
  6022. // used to include empty fields in Patch requests.
  6023. ForceSendFields []string `json:"-"`
  6024. // NullFields is a list of field names (e.g. "Actions") to include in
  6025. // API requests with the JSON null value. By default, fields with empty
  6026. // values are omitted from API requests. However, any field with an
  6027. // empty value appearing in NullFields will be sent to the server as
  6028. // null. It is an error if a field in this list has a non-empty value.
  6029. // This may be used to include null fields in Patch requests.
  6030. NullFields []string `json:"-"`
  6031. }
  6032. func (s *GooglePrivacyDlpV2beta2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) {
  6033. type NoMethod GooglePrivacyDlpV2beta2RiskAnalysisJobConfig
  6034. raw := NoMethod(*s)
  6035. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6036. }
  6037. type GooglePrivacyDlpV2beta2Row struct {
  6038. Values []*GooglePrivacyDlpV2beta2Value `json:"values,omitempty"`
  6039. // ForceSendFields is a list of field names (e.g. "Values") to
  6040. // unconditionally include in API requests. By default, fields with
  6041. // empty values are omitted from API requests. However, any non-pointer,
  6042. // non-interface field appearing in ForceSendFields will be sent to the
  6043. // server regardless of whether the field is empty or not. This may be
  6044. // used to include empty fields in Patch requests.
  6045. ForceSendFields []string `json:"-"`
  6046. // NullFields is a list of field names (e.g. "Values") to include in API
  6047. // requests with the JSON null value. By default, fields with empty
  6048. // values are omitted from API requests. However, any field with an
  6049. // empty value appearing in NullFields will be sent to the server as
  6050. // null. It is an error if a field in this list has a non-empty value.
  6051. // This may be used to include null fields in Patch requests.
  6052. NullFields []string `json:"-"`
  6053. }
  6054. func (s *GooglePrivacyDlpV2beta2Row) MarshalJSON() ([]byte, error) {
  6055. type NoMethod GooglePrivacyDlpV2beta2Row
  6056. raw := NoMethod(*s)
  6057. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6058. }
  6059. // GooglePrivacyDlpV2beta2SaveFindings: If set, the detailed findings
  6060. // will be persisted to the specified
  6061. // OutputStorageConfig. Compatible with: Inspect
  6062. type GooglePrivacyDlpV2beta2SaveFindings struct {
  6063. OutputConfig *GooglePrivacyDlpV2beta2OutputStorageConfig `json:"outputConfig,omitempty"`
  6064. // ForceSendFields is a list of field names (e.g. "OutputConfig") to
  6065. // unconditionally include in API requests. By default, fields with
  6066. // empty values are omitted from API requests. However, any non-pointer,
  6067. // non-interface field appearing in ForceSendFields will be sent to the
  6068. // server regardless of whether the field is empty or not. This may be
  6069. // used to include empty fields in Patch requests.
  6070. ForceSendFields []string `json:"-"`
  6071. // NullFields is a list of field names (e.g. "OutputConfig") to include
  6072. // in API requests with the JSON null value. By default, fields with
  6073. // empty values are omitted from API requests. However, any field with
  6074. // an empty value appearing in NullFields will be sent to the server as
  6075. // null. It is an error if a field in this list has a non-empty value.
  6076. // This may be used to include null fields in Patch requests.
  6077. NullFields []string `json:"-"`
  6078. }
  6079. func (s *GooglePrivacyDlpV2beta2SaveFindings) MarshalJSON() ([]byte, error) {
  6080. type NoMethod GooglePrivacyDlpV2beta2SaveFindings
  6081. raw := NoMethod(*s)
  6082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6083. }
  6084. // GooglePrivacyDlpV2beta2Schedule: Schedule for triggeredJobs.
  6085. type GooglePrivacyDlpV2beta2Schedule struct {
  6086. // ReccurrencePeriodDuration: With this option a job is started a
  6087. // regular periodic basis. For
  6088. // example: every 10 minutes.
  6089. //
  6090. // A scheduled start time will be skipped if the previous
  6091. // execution has not ended when its scheduled time occurs.
  6092. //
  6093. // This value must be set to a time duration greater than or equal
  6094. // to 60 minutes and can be no longer than 60 days.
  6095. ReccurrencePeriodDuration string `json:"reccurrencePeriodDuration,omitempty"`
  6096. // ForceSendFields is a list of field names (e.g.
  6097. // "ReccurrencePeriodDuration") to unconditionally include in API
  6098. // requests. By default, fields with empty values are omitted from API
  6099. // requests. However, any non-pointer, non-interface field appearing in
  6100. // ForceSendFields will be sent to the server regardless of whether the
  6101. // field is empty or not. This may be used to include empty fields in
  6102. // Patch requests.
  6103. ForceSendFields []string `json:"-"`
  6104. // NullFields is a list of field names (e.g.
  6105. // "ReccurrencePeriodDuration") to include in API requests with the JSON
  6106. // null value. By default, fields with empty values are omitted from API
  6107. // requests. However, any field with an empty value appearing in
  6108. // NullFields will be sent to the server as null. It is an error if a
  6109. // field in this list has a non-empty value. This may be used to include
  6110. // null fields in Patch requests.
  6111. NullFields []string `json:"-"`
  6112. }
  6113. func (s *GooglePrivacyDlpV2beta2Schedule) MarshalJSON() ([]byte, error) {
  6114. type NoMethod GooglePrivacyDlpV2beta2Schedule
  6115. raw := NoMethod(*s)
  6116. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6117. }
  6118. // GooglePrivacyDlpV2beta2StorageConfig: Shared message indicating Cloud
  6119. // storage type.
  6120. type GooglePrivacyDlpV2beta2StorageConfig struct {
  6121. // BigQueryOptions: BigQuery options specification.
  6122. BigQueryOptions *GooglePrivacyDlpV2beta2BigQueryOptions `json:"bigQueryOptions,omitempty"`
  6123. // CloudStorageOptions: Google Cloud Storage options specification.
  6124. CloudStorageOptions *GooglePrivacyDlpV2beta2CloudStorageOptions `json:"cloudStorageOptions,omitempty"`
  6125. // DatastoreOptions: Google Cloud Datastore options specification.
  6126. DatastoreOptions *GooglePrivacyDlpV2beta2DatastoreOptions `json:"datastoreOptions,omitempty"`
  6127. TimespanConfig *GooglePrivacyDlpV2beta2TimespanConfig `json:"timespanConfig,omitempty"`
  6128. // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to
  6129. // unconditionally include in API requests. By default, fields with
  6130. // empty values are omitted from API requests. However, any non-pointer,
  6131. // non-interface field appearing in ForceSendFields will be sent to the
  6132. // server regardless of whether the field is empty or not. This may be
  6133. // used to include empty fields in Patch requests.
  6134. ForceSendFields []string `json:"-"`
  6135. // NullFields is a list of field names (e.g. "BigQueryOptions") to
  6136. // include in API requests with the JSON null value. By default, fields
  6137. // with empty values are omitted from API requests. However, any field
  6138. // with an empty value appearing in NullFields will be sent to the
  6139. // server as null. It is an error if a field in this list has a
  6140. // non-empty value. This may be used to include null fields in Patch
  6141. // requests.
  6142. NullFields []string `json:"-"`
  6143. }
  6144. func (s *GooglePrivacyDlpV2beta2StorageConfig) MarshalJSON() ([]byte, error) {
  6145. type NoMethod GooglePrivacyDlpV2beta2StorageConfig
  6146. raw := NoMethod(*s)
  6147. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6148. }
  6149. // GooglePrivacyDlpV2beta2SummaryResult: A collection that informs the
  6150. // user the number of times a particular
  6151. // `TransformationResultCode` and error details occurred.
  6152. type GooglePrivacyDlpV2beta2SummaryResult struct {
  6153. // Possible values:
  6154. // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"
  6155. // "SUCCESS"
  6156. // "ERROR"
  6157. Code string `json:"code,omitempty"`
  6158. Count int64 `json:"count,omitempty,string"`
  6159. // Details: A place for warnings or errors to show up if a
  6160. // transformation didn't
  6161. // work as expected.
  6162. Details string `json:"details,omitempty"`
  6163. // ForceSendFields is a list of field names (e.g. "Code") to
  6164. // unconditionally include in API requests. By default, fields with
  6165. // empty values are omitted from API requests. However, any non-pointer,
  6166. // non-interface field appearing in ForceSendFields will be sent to the
  6167. // server regardless of whether the field is empty or not. This may be
  6168. // used to include empty fields in Patch requests.
  6169. ForceSendFields []string `json:"-"`
  6170. // NullFields is a list of field names (e.g. "Code") to include in API
  6171. // requests with the JSON null value. By default, fields with empty
  6172. // values are omitted from API requests. However, any field with an
  6173. // empty value appearing in NullFields will be sent to the server as
  6174. // null. It is an error if a field in this list has a non-empty value.
  6175. // This may be used to include null fields in Patch requests.
  6176. NullFields []string `json:"-"`
  6177. }
  6178. func (s *GooglePrivacyDlpV2beta2SummaryResult) MarshalJSON() ([]byte, error) {
  6179. type NoMethod GooglePrivacyDlpV2beta2SummaryResult
  6180. raw := NoMethod(*s)
  6181. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6182. }
  6183. // GooglePrivacyDlpV2beta2SurrogateType: Message for detecting output
  6184. // from deidentification transformations
  6185. // such
  6186. // as
  6187. // [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont
  6188. // ent/deidentify#CryptoReplaceFfxFpeConfig).
  6189. // These types of transformations are
  6190. // those that perform pseudonymization, thereby producing a "surrogate"
  6191. // as
  6192. // output. This should be used in conjunction with a field on
  6193. // the
  6194. // transformation such as `surrogate_info_type`. This custom info type
  6195. // does
  6196. // not support the use of `detection_rules`.
  6197. type GooglePrivacyDlpV2beta2SurrogateType struct {
  6198. }
  6199. // GooglePrivacyDlpV2beta2Table: Structured content to inspect. Up to
  6200. // 50,000 `Value`s per request allowed.
  6201. type GooglePrivacyDlpV2beta2Table struct {
  6202. Headers []*GooglePrivacyDlpV2beta2FieldId `json:"headers,omitempty"`
  6203. Rows []*GooglePrivacyDlpV2beta2Row `json:"rows,omitempty"`
  6204. // ForceSendFields is a list of field names (e.g. "Headers") to
  6205. // unconditionally include in API requests. By default, fields with
  6206. // empty values are omitted from API requests. However, any non-pointer,
  6207. // non-interface field appearing in ForceSendFields will be sent to the
  6208. // server regardless of whether the field is empty or not. This may be
  6209. // used to include empty fields in Patch requests.
  6210. ForceSendFields []string `json:"-"`
  6211. // NullFields is a list of field names (e.g. "Headers") to include in
  6212. // API requests with the JSON null value. By default, fields with empty
  6213. // values are omitted from API requests. However, any field with an
  6214. // empty value appearing in NullFields will be sent to the server as
  6215. // null. It is an error if a field in this list has a non-empty value.
  6216. // This may be used to include null fields in Patch requests.
  6217. NullFields []string `json:"-"`
  6218. }
  6219. func (s *GooglePrivacyDlpV2beta2Table) MarshalJSON() ([]byte, error) {
  6220. type NoMethod GooglePrivacyDlpV2beta2Table
  6221. raw := NoMethod(*s)
  6222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6223. }
  6224. // GooglePrivacyDlpV2beta2TableLocation: Location of a finding within a
  6225. // table.
  6226. type GooglePrivacyDlpV2beta2TableLocation struct {
  6227. // RowIndex: The zero-based index of the row where the finding is
  6228. // located.
  6229. RowIndex int64 `json:"rowIndex,omitempty,string"`
  6230. // ForceSendFields is a list of field names (e.g. "RowIndex") to
  6231. // unconditionally include in API requests. By default, fields with
  6232. // empty values are omitted from API requests. However, any non-pointer,
  6233. // non-interface field appearing in ForceSendFields will be sent to the
  6234. // server regardless of whether the field is empty or not. This may be
  6235. // used to include empty fields in Patch requests.
  6236. ForceSendFields []string `json:"-"`
  6237. // NullFields is a list of field names (e.g. "RowIndex") to include in
  6238. // API requests with the JSON null value. By default, fields with empty
  6239. // values are omitted from API requests. However, any field with an
  6240. // empty value appearing in NullFields will be sent to the server as
  6241. // null. It is an error if a field in this list has a non-empty value.
  6242. // This may be used to include null fields in Patch requests.
  6243. NullFields []string `json:"-"`
  6244. }
  6245. func (s *GooglePrivacyDlpV2beta2TableLocation) MarshalJSON() ([]byte, error) {
  6246. type NoMethod GooglePrivacyDlpV2beta2TableLocation
  6247. raw := NoMethod(*s)
  6248. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6249. }
  6250. // GooglePrivacyDlpV2beta2TaggedField: A column with a semantic tag
  6251. // attached.
  6252. type GooglePrivacyDlpV2beta2TaggedField struct {
  6253. // CustomTag: A column can be tagged with a custom tag. In this case,
  6254. // the user must
  6255. // indicate an auxiliary table that contains statistical information
  6256. // on
  6257. // the possible values of this column (below).
  6258. CustomTag string `json:"customTag,omitempty"`
  6259. // Field: Identifies the column. [required]
  6260. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  6261. // Inferred: If no semantic tag is indicated, we infer the statistical
  6262. // model from
  6263. // the distribution of values in the input data
  6264. Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"`
  6265. // InfoType: A column can be tagged with a InfoType to use the relevant
  6266. // public
  6267. // dataset as a statistical model of population, if available.
  6268. // We
  6269. // currently support US ZIP codes, region codes, ages and genders.
  6270. // To programmatically obtain the list of supported InfoTypes,
  6271. // use
  6272. // ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
  6273. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  6274. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  6275. // unconditionally include in API requests. By default, fields with
  6276. // empty values are omitted from API requests. However, any non-pointer,
  6277. // non-interface field appearing in ForceSendFields will be sent to the
  6278. // server regardless of whether the field is empty or not. This may be
  6279. // used to include empty fields in Patch requests.
  6280. ForceSendFields []string `json:"-"`
  6281. // NullFields is a list of field names (e.g. "CustomTag") to include in
  6282. // API requests with the JSON null value. By default, fields with empty
  6283. // values are omitted from API requests. However, any field with an
  6284. // empty value appearing in NullFields will be sent to the server as
  6285. // null. It is an error if a field in this list has a non-empty value.
  6286. // This may be used to include null fields in Patch requests.
  6287. NullFields []string `json:"-"`
  6288. }
  6289. func (s *GooglePrivacyDlpV2beta2TaggedField) MarshalJSON() ([]byte, error) {
  6290. type NoMethod GooglePrivacyDlpV2beta2TaggedField
  6291. raw := NoMethod(*s)
  6292. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6293. }
  6294. // GooglePrivacyDlpV2beta2TimePartConfig: For use with `Date`,
  6295. // `Timestamp`, and `TimeOfDay`, extract or preserve a
  6296. // portion of the value.
  6297. type GooglePrivacyDlpV2beta2TimePartConfig struct {
  6298. // Possible values:
  6299. // "TIME_PART_UNSPECIFIED"
  6300. // "YEAR" - [0-9999]
  6301. // "MONTH" - [1-12]
  6302. // "DAY_OF_MONTH" - [1-31]
  6303. // "DAY_OF_WEEK" - [1-7]
  6304. // "WEEK_OF_YEAR" - [1-52]
  6305. // "HOUR_OF_DAY" - [0-23]
  6306. PartToExtract string `json:"partToExtract,omitempty"`
  6307. // ForceSendFields is a list of field names (e.g. "PartToExtract") to
  6308. // unconditionally include in API requests. By default, fields with
  6309. // empty values are omitted from API requests. However, any non-pointer,
  6310. // non-interface field appearing in ForceSendFields will be sent to the
  6311. // server regardless of whether the field is empty or not. This may be
  6312. // used to include empty fields in Patch requests.
  6313. ForceSendFields []string `json:"-"`
  6314. // NullFields is a list of field names (e.g. "PartToExtract") to include
  6315. // in API requests with the JSON null value. By default, fields with
  6316. // empty values are omitted from API requests. However, any field with
  6317. // an empty value appearing in NullFields will be sent to the server as
  6318. // null. It is an error if a field in this list has a non-empty value.
  6319. // This may be used to include null fields in Patch requests.
  6320. NullFields []string `json:"-"`
  6321. }
  6322. func (s *GooglePrivacyDlpV2beta2TimePartConfig) MarshalJSON() ([]byte, error) {
  6323. type NoMethod GooglePrivacyDlpV2beta2TimePartConfig
  6324. raw := NoMethod(*s)
  6325. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6326. }
  6327. type GooglePrivacyDlpV2beta2TimeZone struct {
  6328. // OffsetMinutes: Set only if the offset can be determined. Positive for
  6329. // time ahead of UTC.
  6330. // E.g. For "UTC-9", this value is -540.
  6331. OffsetMinutes int64 `json:"offsetMinutes,omitempty"`
  6332. // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to
  6333. // unconditionally include in API requests. By default, fields with
  6334. // empty values are omitted from API requests. However, any non-pointer,
  6335. // non-interface field appearing in ForceSendFields will be sent to the
  6336. // server regardless of whether the field is empty or not. This may be
  6337. // used to include empty fields in Patch requests.
  6338. ForceSendFields []string `json:"-"`
  6339. // NullFields is a list of field names (e.g. "OffsetMinutes") to include
  6340. // in API requests with the JSON null value. By default, fields with
  6341. // empty values are omitted from API requests. However, any field with
  6342. // an empty value appearing in NullFields will be sent to the server as
  6343. // null. It is an error if a field in this list has a non-empty value.
  6344. // This may be used to include null fields in Patch requests.
  6345. NullFields []string `json:"-"`
  6346. }
  6347. func (s *GooglePrivacyDlpV2beta2TimeZone) MarshalJSON() ([]byte, error) {
  6348. type NoMethod GooglePrivacyDlpV2beta2TimeZone
  6349. raw := NoMethod(*s)
  6350. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6351. }
  6352. // GooglePrivacyDlpV2beta2TimespanConfig: Configuration of the timespan
  6353. // of the items to include in scanning.
  6354. // Currently only supported when inspecting Google Cloud Storage and
  6355. // BigQuery.
  6356. type GooglePrivacyDlpV2beta2TimespanConfig struct {
  6357. // EnableAutoPopulationOfTimespanConfig: When the job is started by a
  6358. // JobTrigger we will automatically figure out
  6359. // a valid start_time to avoid scanning files that have not been
  6360. // modified
  6361. // since the last time the JobTrigger executed. This will be based on
  6362. // the
  6363. // time of the execution of the last run of the JobTrigger.
  6364. EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"`
  6365. // EndTime: Exclude files newer than this value.
  6366. // If set to zero, no upper time limit is applied.
  6367. EndTime string `json:"endTime,omitempty"`
  6368. // StartTime: Exclude files older than this value.
  6369. StartTime string `json:"startTime,omitempty"`
  6370. // ForceSendFields is a list of field names (e.g.
  6371. // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in
  6372. // API requests. By default, fields with empty values are omitted from
  6373. // API requests. However, any non-pointer, non-interface field appearing
  6374. // in ForceSendFields will be sent to the server regardless of whether
  6375. // the field is empty or not. This may be used to include empty fields
  6376. // in Patch requests.
  6377. ForceSendFields []string `json:"-"`
  6378. // NullFields is a list of field names (e.g.
  6379. // "EnableAutoPopulationOfTimespanConfig") to include in API requests
  6380. // with the JSON null value. By default, fields with empty values are
  6381. // omitted from API requests. However, any field with an empty value
  6382. // appearing in NullFields will be sent to the server as null. It is an
  6383. // error if a field in this list has a non-empty value. This may be used
  6384. // to include null fields in Patch requests.
  6385. NullFields []string `json:"-"`
  6386. }
  6387. func (s *GooglePrivacyDlpV2beta2TimespanConfig) MarshalJSON() ([]byte, error) {
  6388. type NoMethod GooglePrivacyDlpV2beta2TimespanConfig
  6389. raw := NoMethod(*s)
  6390. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6391. }
  6392. // GooglePrivacyDlpV2beta2TransformationOverview: Overview of the
  6393. // modifications that occurred.
  6394. type GooglePrivacyDlpV2beta2TransformationOverview struct {
  6395. // TransformationSummaries: Transformations applied to the dataset.
  6396. TransformationSummaries []*GooglePrivacyDlpV2beta2TransformationSummary `json:"transformationSummaries,omitempty"`
  6397. // TransformedBytes: Total size in bytes that were transformed in some
  6398. // way.
  6399. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  6400. // ForceSendFields is a list of field names (e.g.
  6401. // "TransformationSummaries") to unconditionally include in API
  6402. // requests. By default, fields with empty values are omitted from API
  6403. // requests. However, any non-pointer, non-interface field appearing in
  6404. // ForceSendFields will be sent to the server regardless of whether the
  6405. // field is empty or not. This may be used to include empty fields in
  6406. // Patch requests.
  6407. ForceSendFields []string `json:"-"`
  6408. // NullFields is a list of field names (e.g. "TransformationSummaries")
  6409. // to include in API requests with the JSON null value. By default,
  6410. // fields with empty values are omitted from API requests. However, any
  6411. // field with an empty value appearing in NullFields will be sent to the
  6412. // server as null. It is an error if a field in this list has a
  6413. // non-empty value. This may be used to include null fields in Patch
  6414. // requests.
  6415. NullFields []string `json:"-"`
  6416. }
  6417. func (s *GooglePrivacyDlpV2beta2TransformationOverview) MarshalJSON() ([]byte, error) {
  6418. type NoMethod GooglePrivacyDlpV2beta2TransformationOverview
  6419. raw := NoMethod(*s)
  6420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6421. }
  6422. // GooglePrivacyDlpV2beta2TransformationSummary: Summary of a single
  6423. // tranformation.
  6424. // Only one of 'transformation', 'field_transformation', or
  6425. // 'record_suppress'
  6426. // will be set.
  6427. type GooglePrivacyDlpV2beta2TransformationSummary struct {
  6428. // Field: Set if the transformation was limited to a specific FieldId.
  6429. Field *GooglePrivacyDlpV2beta2FieldId `json:"field,omitempty"`
  6430. // FieldTransformations: The field transformation that was applied.
  6431. // If multiple field transformations are requested for a single
  6432. // field,
  6433. // this list will contain all of them; otherwise, only one is supplied.
  6434. FieldTransformations []*GooglePrivacyDlpV2beta2FieldTransformation `json:"fieldTransformations,omitempty"`
  6435. // InfoType: Set if the transformation was limited to a specific
  6436. // info_type.
  6437. InfoType *GooglePrivacyDlpV2beta2InfoType `json:"infoType,omitempty"`
  6438. // RecordSuppress: The specific suppression option these stats apply to.
  6439. RecordSuppress *GooglePrivacyDlpV2beta2RecordSuppression `json:"recordSuppress,omitempty"`
  6440. Results []*GooglePrivacyDlpV2beta2SummaryResult `json:"results,omitempty"`
  6441. // Transformation: The specific transformation these stats apply to.
  6442. Transformation *GooglePrivacyDlpV2beta2PrimitiveTransformation `json:"transformation,omitempty"`
  6443. // TransformedBytes: Total size in bytes that were transformed in some
  6444. // way.
  6445. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  6446. // ForceSendFields is a list of field names (e.g. "Field") to
  6447. // unconditionally include in API requests. By default, fields with
  6448. // empty values are omitted from API requests. However, any non-pointer,
  6449. // non-interface field appearing in ForceSendFields will be sent to the
  6450. // server regardless of whether the field is empty or not. This may be
  6451. // used to include empty fields in Patch requests.
  6452. ForceSendFields []string `json:"-"`
  6453. // NullFields is a list of field names (e.g. "Field") to include in API
  6454. // requests with the JSON null value. By default, fields with empty
  6455. // values are omitted from API requests. However, any field with an
  6456. // empty value appearing in NullFields will be sent to the server as
  6457. // null. It is an error if a field in this list has a non-empty value.
  6458. // This may be used to include null fields in Patch requests.
  6459. NullFields []string `json:"-"`
  6460. }
  6461. func (s *GooglePrivacyDlpV2beta2TransformationSummary) MarshalJSON() ([]byte, error) {
  6462. type NoMethod GooglePrivacyDlpV2beta2TransformationSummary
  6463. raw := NoMethod(*s)
  6464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6465. }
  6466. // GooglePrivacyDlpV2beta2TransientCryptoKey: Use this to have a random
  6467. // data crypto key generated.
  6468. // It will be discarded after the request finishes.
  6469. type GooglePrivacyDlpV2beta2TransientCryptoKey struct {
  6470. // Name: Name of the key. [required]
  6471. // This is an arbitrary string used to differentiate different keys.
  6472. // A unique key is generated per name: two separate
  6473. // `TransientCryptoKey`
  6474. // protos share the same generated key if their names are the same.
  6475. // When the data crypto key is generated, this name is not used in any
  6476. // way
  6477. // (repeating the api call will result in a different key being
  6478. // generated).
  6479. Name string `json:"name,omitempty"`
  6480. // ForceSendFields is a list of field names (e.g. "Name") to
  6481. // unconditionally include in API requests. By default, fields with
  6482. // empty values are omitted from API requests. However, any non-pointer,
  6483. // non-interface field appearing in ForceSendFields will be sent to the
  6484. // server regardless of whether the field is empty or not. This may be
  6485. // used to include empty fields in Patch requests.
  6486. ForceSendFields []string `json:"-"`
  6487. // NullFields is a list of field names (e.g. "Name") to include in API
  6488. // requests with the JSON null value. By default, fields with empty
  6489. // values are omitted from API requests. However, any field with an
  6490. // empty value appearing in NullFields will be sent to the server as
  6491. // null. It is an error if a field in this list has a non-empty value.
  6492. // This may be used to include null fields in Patch requests.
  6493. NullFields []string `json:"-"`
  6494. }
  6495. func (s *GooglePrivacyDlpV2beta2TransientCryptoKey) MarshalJSON() ([]byte, error) {
  6496. type NoMethod GooglePrivacyDlpV2beta2TransientCryptoKey
  6497. raw := NoMethod(*s)
  6498. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6499. }
  6500. // GooglePrivacyDlpV2beta2Trigger: What event needs to occur for a new
  6501. // job to be started.
  6502. type GooglePrivacyDlpV2beta2Trigger struct {
  6503. // Schedule: Create a job on a repeating basis based on the elapse of
  6504. // time.
  6505. Schedule *GooglePrivacyDlpV2beta2Schedule `json:"schedule,omitempty"`
  6506. // ForceSendFields is a list of field names (e.g. "Schedule") to
  6507. // unconditionally include in API requests. By default, fields with
  6508. // empty values are omitted from API requests. However, any non-pointer,
  6509. // non-interface field appearing in ForceSendFields will be sent to the
  6510. // server regardless of whether the field is empty or not. This may be
  6511. // used to include empty fields in Patch requests.
  6512. ForceSendFields []string `json:"-"`
  6513. // NullFields is a list of field names (e.g. "Schedule") to include in
  6514. // API requests with the JSON null value. By default, fields with empty
  6515. // values are omitted from API requests. However, any field with an
  6516. // empty value appearing in NullFields will be sent to the server as
  6517. // null. It is an error if a field in this list has a non-empty value.
  6518. // This may be used to include null fields in Patch requests.
  6519. NullFields []string `json:"-"`
  6520. }
  6521. func (s *GooglePrivacyDlpV2beta2Trigger) MarshalJSON() ([]byte, error) {
  6522. type NoMethod GooglePrivacyDlpV2beta2Trigger
  6523. raw := NoMethod(*s)
  6524. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6525. }
  6526. // GooglePrivacyDlpV2beta2UnwrappedCryptoKey: Using raw keys is prone to
  6527. // security risks due to accidentally
  6528. // leaking the key. Choose another type of key if possible.
  6529. type GooglePrivacyDlpV2beta2UnwrappedCryptoKey struct {
  6530. // Key: The AES 128/192/256 bit key. [required]
  6531. Key string `json:"key,omitempty"`
  6532. // ForceSendFields is a list of field names (e.g. "Key") to
  6533. // unconditionally include in API requests. By default, fields with
  6534. // empty values are omitted from API requests. However, any non-pointer,
  6535. // non-interface field appearing in ForceSendFields will be sent to the
  6536. // server regardless of whether the field is empty or not. This may be
  6537. // used to include empty fields in Patch requests.
  6538. ForceSendFields []string `json:"-"`
  6539. // NullFields is a list of field names (e.g. "Key") to include in API
  6540. // requests with the JSON null value. By default, fields with empty
  6541. // values are omitted from API requests. However, any field with an
  6542. // empty value appearing in NullFields will be sent to the server as
  6543. // null. It is an error if a field in this list has a non-empty value.
  6544. // This may be used to include null fields in Patch requests.
  6545. NullFields []string `json:"-"`
  6546. }
  6547. func (s *GooglePrivacyDlpV2beta2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) {
  6548. type NoMethod GooglePrivacyDlpV2beta2UnwrappedCryptoKey
  6549. raw := NoMethod(*s)
  6550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6551. }
  6552. // GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest: Request
  6553. // message for UpdateDeidentifyTemplate.
  6554. type GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest struct {
  6555. // DeidentifyTemplate: New DeidentifyTemplate value.
  6556. DeidentifyTemplate *GooglePrivacyDlpV2beta2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
  6557. // UpdateMask: Mask to control which fields get updated.
  6558. UpdateMask string `json:"updateMask,omitempty"`
  6559. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate")
  6560. // to unconditionally include in API requests. By default, fields with
  6561. // empty values are omitted from API requests. However, any non-pointer,
  6562. // non-interface field appearing in ForceSendFields will be sent to the
  6563. // server regardless of whether the field is empty or not. This may be
  6564. // used to include empty fields in Patch requests.
  6565. ForceSendFields []string `json:"-"`
  6566. // NullFields is a list of field names (e.g. "DeidentifyTemplate") to
  6567. // include in API requests with the JSON null value. By default, fields
  6568. // with empty values are omitted from API requests. However, any field
  6569. // with an empty value appearing in NullFields will be sent to the
  6570. // server as null. It is an error if a field in this list has a
  6571. // non-empty value. This may be used to include null fields in Patch
  6572. // requests.
  6573. NullFields []string `json:"-"`
  6574. }
  6575. func (s *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) {
  6576. type NoMethod GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest
  6577. raw := NoMethod(*s)
  6578. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6579. }
  6580. // GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest: Request message
  6581. // for UpdateInspectTemplate.
  6582. type GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest struct {
  6583. // InspectTemplate: New InspectTemplate value.
  6584. InspectTemplate *GooglePrivacyDlpV2beta2InspectTemplate `json:"inspectTemplate,omitempty"`
  6585. // UpdateMask: Mask to control which fields get updated.
  6586. UpdateMask string `json:"updateMask,omitempty"`
  6587. // ForceSendFields is a list of field names (e.g. "InspectTemplate") to
  6588. // unconditionally include in API requests. By default, fields with
  6589. // empty values are omitted from API requests. However, any non-pointer,
  6590. // non-interface field appearing in ForceSendFields will be sent to the
  6591. // server regardless of whether the field is empty or not. This may be
  6592. // used to include empty fields in Patch requests.
  6593. ForceSendFields []string `json:"-"`
  6594. // NullFields is a list of field names (e.g. "InspectTemplate") to
  6595. // include in API requests with the JSON null value. By default, fields
  6596. // with empty values are omitted from API requests. However, any field
  6597. // with an empty value appearing in NullFields will be sent to the
  6598. // server as null. It is an error if a field in this list has a
  6599. // non-empty value. This may be used to include null fields in Patch
  6600. // requests.
  6601. NullFields []string `json:"-"`
  6602. }
  6603. func (s *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) {
  6604. type NoMethod GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest
  6605. raw := NoMethod(*s)
  6606. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6607. }
  6608. // GooglePrivacyDlpV2beta2UpdateJobTriggerRequest: Request message for
  6609. // UpdateJobTrigger.
  6610. type GooglePrivacyDlpV2beta2UpdateJobTriggerRequest struct {
  6611. // JobTrigger: New JobTrigger value.
  6612. JobTrigger *GooglePrivacyDlpV2beta2JobTrigger `json:"jobTrigger,omitempty"`
  6613. // UpdateMask: Mask to control which fields get updated.
  6614. UpdateMask string `json:"updateMask,omitempty"`
  6615. // ForceSendFields is a list of field names (e.g. "JobTrigger") to
  6616. // unconditionally include in API requests. By default, fields with
  6617. // empty values are omitted from API requests. However, any non-pointer,
  6618. // non-interface field appearing in ForceSendFields will be sent to the
  6619. // server regardless of whether the field is empty or not. This may be
  6620. // used to include empty fields in Patch requests.
  6621. ForceSendFields []string `json:"-"`
  6622. // NullFields is a list of field names (e.g. "JobTrigger") to include in
  6623. // API requests with the JSON null value. By default, fields with empty
  6624. // values are omitted from API requests. However, any field with an
  6625. // empty value appearing in NullFields will be sent to the server as
  6626. // null. It is an error if a field in this list has a non-empty value.
  6627. // This may be used to include null fields in Patch requests.
  6628. NullFields []string `json:"-"`
  6629. }
  6630. func (s *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) {
  6631. type NoMethod GooglePrivacyDlpV2beta2UpdateJobTriggerRequest
  6632. raw := NoMethod(*s)
  6633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6634. }
  6635. // GooglePrivacyDlpV2beta2Value: Set of primitive values supported by
  6636. // the system.
  6637. // Note that for the purposes of inspection or transformation, the
  6638. // number
  6639. // of bytes considered to comprise a 'Value' is based on its
  6640. // representation
  6641. // as a UTF-8 encoded string. For example, if 'integer_value' is set
  6642. // to
  6643. // 123456789, the number of bytes would be counted as 9, even though
  6644. // an
  6645. // int64 only holds up to 8 bytes of data.
  6646. type GooglePrivacyDlpV2beta2Value struct {
  6647. BooleanValue bool `json:"booleanValue,omitempty"`
  6648. DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
  6649. // Possible values:
  6650. // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week.
  6651. // "MONDAY" - The day-of-week of Monday.
  6652. // "TUESDAY" - The day-of-week of Tuesday.
  6653. // "WEDNESDAY" - The day-of-week of Wednesday.
  6654. // "THURSDAY" - The day-of-week of Thursday.
  6655. // "FRIDAY" - The day-of-week of Friday.
  6656. // "SATURDAY" - The day-of-week of Saturday.
  6657. // "SUNDAY" - The day-of-week of Sunday.
  6658. DayOfWeekValue string `json:"dayOfWeekValue,omitempty"`
  6659. FloatValue float64 `json:"floatValue,omitempty"`
  6660. IntegerValue int64 `json:"integerValue,omitempty,string"`
  6661. StringValue string `json:"stringValue,omitempty"`
  6662. TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"`
  6663. TimestampValue string `json:"timestampValue,omitempty"`
  6664. // ForceSendFields is a list of field names (e.g. "BooleanValue") to
  6665. // unconditionally include in API requests. By default, fields with
  6666. // empty values are omitted from API requests. However, any non-pointer,
  6667. // non-interface field appearing in ForceSendFields will be sent to the
  6668. // server regardless of whether the field is empty or not. This may be
  6669. // used to include empty fields in Patch requests.
  6670. ForceSendFields []string `json:"-"`
  6671. // NullFields is a list of field names (e.g. "BooleanValue") to include
  6672. // in API requests with the JSON null value. By default, fields with
  6673. // empty values are omitted from API requests. However, any field with
  6674. // an empty value appearing in NullFields will be sent to the server as
  6675. // null. It is an error if a field in this list has a non-empty value.
  6676. // This may be used to include null fields in Patch requests.
  6677. NullFields []string `json:"-"`
  6678. }
  6679. func (s *GooglePrivacyDlpV2beta2Value) MarshalJSON() ([]byte, error) {
  6680. type NoMethod GooglePrivacyDlpV2beta2Value
  6681. raw := NoMethod(*s)
  6682. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6683. }
  6684. func (s *GooglePrivacyDlpV2beta2Value) UnmarshalJSON(data []byte) error {
  6685. type NoMethod GooglePrivacyDlpV2beta2Value
  6686. var s1 struct {
  6687. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  6688. *NoMethod
  6689. }
  6690. s1.NoMethod = (*NoMethod)(s)
  6691. if err := json.Unmarshal(data, &s1); err != nil {
  6692. return err
  6693. }
  6694. s.FloatValue = float64(s1.FloatValue)
  6695. return nil
  6696. }
  6697. // GooglePrivacyDlpV2beta2ValueFrequency: A value of a field, including
  6698. // its frequency.
  6699. type GooglePrivacyDlpV2beta2ValueFrequency struct {
  6700. // Count: How many times the value is contained in the field.
  6701. Count int64 `json:"count,omitempty,string"`
  6702. // Value: A value contained in the field in question.
  6703. Value *GooglePrivacyDlpV2beta2Value `json:"value,omitempty"`
  6704. // ForceSendFields is a list of field names (e.g. "Count") to
  6705. // unconditionally include in API requests. By default, fields with
  6706. // empty values are omitted from API requests. However, any non-pointer,
  6707. // non-interface field appearing in ForceSendFields will be sent to the
  6708. // server regardless of whether the field is empty or not. This may be
  6709. // used to include empty fields in Patch requests.
  6710. ForceSendFields []string `json:"-"`
  6711. // NullFields is a list of field names (e.g. "Count") to include in API
  6712. // requests with the JSON null value. By default, fields with empty
  6713. // values are omitted from API requests. However, any field with an
  6714. // empty value appearing in NullFields will be sent to the server as
  6715. // null. It is an error if a field in this list has a non-empty value.
  6716. // This may be used to include null fields in Patch requests.
  6717. NullFields []string `json:"-"`
  6718. }
  6719. func (s *GooglePrivacyDlpV2beta2ValueFrequency) MarshalJSON() ([]byte, error) {
  6720. type NoMethod GooglePrivacyDlpV2beta2ValueFrequency
  6721. raw := NoMethod(*s)
  6722. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6723. }
  6724. // GooglePrivacyDlpV2beta2WordList: Message defining a list of words or
  6725. // phrases to search for in the data.
  6726. type GooglePrivacyDlpV2beta2WordList struct {
  6727. // Words: Words or phrases defining the dictionary. The dictionary must
  6728. // contain
  6729. // at least one phrase and every phrase must contain at least 2
  6730. // characters
  6731. // that are letters or digits. [required]
  6732. Words []string `json:"words,omitempty"`
  6733. // ForceSendFields is a list of field names (e.g. "Words") to
  6734. // unconditionally include in API requests. By default, fields with
  6735. // empty values are omitted from API requests. However, any non-pointer,
  6736. // non-interface field appearing in ForceSendFields will be sent to the
  6737. // server regardless of whether the field is empty or not. This may be
  6738. // used to include empty fields in Patch requests.
  6739. ForceSendFields []string `json:"-"`
  6740. // NullFields is a list of field names (e.g. "Words") to include in API
  6741. // requests with the JSON null value. By default, fields with empty
  6742. // values are omitted from API requests. However, any field with an
  6743. // empty value appearing in NullFields will be sent to the server as
  6744. // null. It is an error if a field in this list has a non-empty value.
  6745. // This may be used to include null fields in Patch requests.
  6746. NullFields []string `json:"-"`
  6747. }
  6748. func (s *GooglePrivacyDlpV2beta2WordList) MarshalJSON() ([]byte, error) {
  6749. type NoMethod GooglePrivacyDlpV2beta2WordList
  6750. raw := NoMethod(*s)
  6751. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6752. }
  6753. // GoogleProtobufEmpty: A generic empty message that you can re-use to
  6754. // avoid defining duplicated
  6755. // empty messages in your APIs. A typical example is to use it as the
  6756. // request
  6757. // or the response type of an API method. For instance:
  6758. //
  6759. // service Foo {
  6760. // rpc Bar(google.protobuf.Empty) returns
  6761. // (google.protobuf.Empty);
  6762. // }
  6763. //
  6764. // The JSON representation for `Empty` is empty JSON object `{}`.
  6765. type GoogleProtobufEmpty struct {
  6766. // ServerResponse contains the HTTP response code and headers from the
  6767. // server.
  6768. googleapi.ServerResponse `json:"-"`
  6769. }
  6770. // GoogleRpcStatus: The `Status` type defines a logical error model that
  6771. // is suitable for different
  6772. // programming environments, including REST APIs and RPC APIs. It is
  6773. // used by
  6774. // [gRPC](https://github.com/grpc). The error model is designed to
  6775. // be:
  6776. //
  6777. // - Simple to use and understand for most users
  6778. // - Flexible enough to meet unexpected needs
  6779. //
  6780. // # Overview
  6781. //
  6782. // The `Status` message contains three pieces of data: error code, error
  6783. // message,
  6784. // and error details. The error code should be an enum value
  6785. // of
  6786. // google.rpc.Code, but it may accept additional error codes if needed.
  6787. // The
  6788. // error message should be a developer-facing English message that
  6789. // helps
  6790. // developers *understand* and *resolve* the error. If a localized
  6791. // user-facing
  6792. // error message is needed, put the localized message in the error
  6793. // details or
  6794. // localize it in the client. The optional error details may contain
  6795. // arbitrary
  6796. // information about the error. There is a predefined set of error
  6797. // detail types
  6798. // in the package `google.rpc` that can be used for common error
  6799. // conditions.
  6800. //
  6801. // # Language mapping
  6802. //
  6803. // The `Status` message is the logical representation of the error
  6804. // model, but it
  6805. // is not necessarily the actual wire format. When the `Status` message
  6806. // is
  6807. // exposed in different client libraries and different wire protocols,
  6808. // it can be
  6809. // mapped differently. For example, it will likely be mapped to some
  6810. // exceptions
  6811. // in Java, but more likely mapped to some error codes in C.
  6812. //
  6813. // # Other uses
  6814. //
  6815. // The error model and the `Status` message can be used in a variety
  6816. // of
  6817. // environments, either with or without APIs, to provide a
  6818. // consistent developer experience across different
  6819. // environments.
  6820. //
  6821. // Example uses of this error model include:
  6822. //
  6823. // - Partial errors. If a service needs to return partial errors to the
  6824. // client,
  6825. // it may embed the `Status` in the normal response to indicate the
  6826. // partial
  6827. // errors.
  6828. //
  6829. // - Workflow errors. A typical workflow has multiple steps. Each step
  6830. // may
  6831. // have a `Status` message for error reporting.
  6832. //
  6833. // - Batch operations. If a client uses batch request and batch
  6834. // response, the
  6835. // `Status` message should be used directly inside batch response,
  6836. // one for
  6837. // each error sub-response.
  6838. //
  6839. // - Asynchronous operations. If an API call embeds asynchronous
  6840. // operation
  6841. // results in its response, the status of those operations should
  6842. // be
  6843. // represented directly using the `Status` message.
  6844. //
  6845. // - Logging. If some API errors are stored in logs, the message
  6846. // `Status` could
  6847. // be used directly after any stripping needed for security/privacy
  6848. // reasons.
  6849. type GoogleRpcStatus struct {
  6850. // Code: The status code, which should be an enum value of
  6851. // google.rpc.Code.
  6852. Code int64 `json:"code,omitempty"`
  6853. // Details: A list of messages that carry the error details. There is a
  6854. // common set of
  6855. // message types for APIs to use.
  6856. Details []googleapi.RawMessage `json:"details,omitempty"`
  6857. // Message: A developer-facing error message, which should be in
  6858. // English. Any
  6859. // user-facing error message should be localized and sent in
  6860. // the
  6861. // google.rpc.Status.details field, or localized by the client.
  6862. Message string `json:"message,omitempty"`
  6863. // ForceSendFields is a list of field names (e.g. "Code") to
  6864. // unconditionally include in API requests. By default, fields with
  6865. // empty values are omitted from API requests. However, any non-pointer,
  6866. // non-interface field appearing in ForceSendFields will be sent to the
  6867. // server regardless of whether the field is empty or not. This may be
  6868. // used to include empty fields in Patch requests.
  6869. ForceSendFields []string `json:"-"`
  6870. // NullFields is a list of field names (e.g. "Code") to include in API
  6871. // requests with the JSON null value. By default, fields with empty
  6872. // values are omitted from API requests. However, any field with an
  6873. // empty value appearing in NullFields will be sent to the server as
  6874. // null. It is an error if a field in this list has a non-empty value.
  6875. // This may be used to include null fields in Patch requests.
  6876. NullFields []string `json:"-"`
  6877. }
  6878. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  6879. type NoMethod GoogleRpcStatus
  6880. raw := NoMethod(*s)
  6881. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6882. }
  6883. // GoogleTypeDate: Represents a whole calendar date, e.g. date of birth.
  6884. // The time of day and
  6885. // time zone are either specified elsewhere or are not significant. The
  6886. // date
  6887. // is relative to the Proleptic Gregorian Calendar. The day may be 0
  6888. // to
  6889. // represent a year and month where the day is not significant, e.g.
  6890. // credit card
  6891. // expiration date. The year may be 0 to represent a month and day
  6892. // independent
  6893. // of year, e.g. anniversary date. Related types are
  6894. // google.type.TimeOfDay
  6895. // and `google.protobuf.Timestamp`.
  6896. type GoogleTypeDate struct {
  6897. // Day: Day of month. Must be from 1 to 31 and valid for the year and
  6898. // month, or 0
  6899. // if specifying a year/month where the day is not significant.
  6900. Day int64 `json:"day,omitempty"`
  6901. // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date
  6902. // without a
  6903. // month.
  6904. Month int64 `json:"month,omitempty"`
  6905. // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
  6906. // without
  6907. // a year.
  6908. Year int64 `json:"year,omitempty"`
  6909. // ForceSendFields is a list of field names (e.g. "Day") to
  6910. // unconditionally include in API requests. By default, fields with
  6911. // empty values are omitted from API requests. However, any non-pointer,
  6912. // non-interface field appearing in ForceSendFields will be sent to the
  6913. // server regardless of whether the field is empty or not. This may be
  6914. // used to include empty fields in Patch requests.
  6915. ForceSendFields []string `json:"-"`
  6916. // NullFields is a list of field names (e.g. "Day") to include in API
  6917. // requests with the JSON null value. By default, fields with empty
  6918. // values are omitted from API requests. However, any field with an
  6919. // empty value appearing in NullFields will be sent to the server as
  6920. // null. It is an error if a field in this list has a non-empty value.
  6921. // This may be used to include null fields in Patch requests.
  6922. NullFields []string `json:"-"`
  6923. }
  6924. func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  6925. type NoMethod GoogleTypeDate
  6926. raw := NoMethod(*s)
  6927. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6928. }
  6929. // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone
  6930. // are either not significant
  6931. // or are specified elsewhere. An API may choose to allow leap seconds.
  6932. // Related
  6933. // types are google.type.Date and `google.protobuf.Timestamp`.
  6934. type GoogleTypeTimeOfDay struct {
  6935. // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
  6936. // may choose
  6937. // to allow the value "24:00:00" for scenarios like business closing
  6938. // time.
  6939. Hours int64 `json:"hours,omitempty"`
  6940. // Minutes: Minutes of hour of day. Must be from 0 to 59.
  6941. Minutes int64 `json:"minutes,omitempty"`
  6942. // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
  6943. // 999,999,999.
  6944. Nanos int64 `json:"nanos,omitempty"`
  6945. // Seconds: Seconds of minutes of the time. Must normally be from 0 to
  6946. // 59. An API may
  6947. // allow the value 60 if it allows leap-seconds.
  6948. Seconds int64 `json:"seconds,omitempty"`
  6949. // ForceSendFields is a list of field names (e.g. "Hours") to
  6950. // unconditionally include in API requests. By default, fields with
  6951. // empty values are omitted from API requests. However, any non-pointer,
  6952. // non-interface field appearing in ForceSendFields will be sent to the
  6953. // server regardless of whether the field is empty or not. This may be
  6954. // used to include empty fields in Patch requests.
  6955. ForceSendFields []string `json:"-"`
  6956. // NullFields is a list of field names (e.g. "Hours") to include in API
  6957. // requests with the JSON null value. By default, fields with empty
  6958. // values are omitted from API requests. However, any field with an
  6959. // empty value appearing in NullFields will be sent to the server as
  6960. // null. It is an error if a field in this list has a non-empty value.
  6961. // This may be used to include null fields in Patch requests.
  6962. NullFields []string `json:"-"`
  6963. }
  6964. func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) {
  6965. type NoMethod GoogleTypeTimeOfDay
  6966. raw := NoMethod(*s)
  6967. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6968. }
  6969. // method id "dlp.infoTypes.list":
  6970. type InfoTypesListCall struct {
  6971. s *Service
  6972. urlParams_ gensupport.URLParams
  6973. ifNoneMatch_ string
  6974. ctx_ context.Context
  6975. header_ http.Header
  6976. }
  6977. // List: Returns sensitive information types DLP supports.
  6978. func (r *InfoTypesService) List() *InfoTypesListCall {
  6979. c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6980. return c
  6981. }
  6982. // Filter sets the optional parameter "filter": Optional filter to only
  6983. // return infoTypes supported by certain parts of the
  6984. // API. Defaults to supported_by=INSPECT.
  6985. func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall {
  6986. c.urlParams_.Set("filter", filter)
  6987. return c
  6988. }
  6989. // LanguageCode sets the optional parameter "languageCode": Optional
  6990. // BCP-47 language code for localized infoType friendly
  6991. // names. If omitted, or if localized strings are not available,
  6992. // en-US strings will be returned.
  6993. func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall {
  6994. c.urlParams_.Set("languageCode", languageCode)
  6995. return c
  6996. }
  6997. // Fields allows partial responses to be retrieved. See
  6998. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6999. // for more information.
  7000. func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall {
  7001. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7002. return c
  7003. }
  7004. // IfNoneMatch sets the optional parameter which makes the operation
  7005. // fail if the object's ETag matches the given value. This is useful for
  7006. // getting updates only after the object has changed since the last
  7007. // request. Use googleapi.IsNotModified to check whether the response
  7008. // error from Do is the result of In-None-Match.
  7009. func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall {
  7010. c.ifNoneMatch_ = entityTag
  7011. return c
  7012. }
  7013. // Context sets the context to be used in this call's Do method. Any
  7014. // pending HTTP request will be aborted if the provided context is
  7015. // canceled.
  7016. func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall {
  7017. c.ctx_ = ctx
  7018. return c
  7019. }
  7020. // Header returns an http.Header that can be modified by the caller to
  7021. // add HTTP headers to the request.
  7022. func (c *InfoTypesListCall) Header() http.Header {
  7023. if c.header_ == nil {
  7024. c.header_ = make(http.Header)
  7025. }
  7026. return c.header_
  7027. }
  7028. func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) {
  7029. reqHeaders := make(http.Header)
  7030. for k, v := range c.header_ {
  7031. reqHeaders[k] = v
  7032. }
  7033. reqHeaders.Set("User-Agent", c.s.userAgent())
  7034. if c.ifNoneMatch_ != "" {
  7035. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7036. }
  7037. var body io.Reader = nil
  7038. c.urlParams_.Set("alt", alt)
  7039. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/infoTypes")
  7040. urls += "?" + c.urlParams_.Encode()
  7041. req, _ := http.NewRequest("GET", urls, body)
  7042. req.Header = reqHeaders
  7043. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7044. }
  7045. // Do executes the "dlp.infoTypes.list" call.
  7046. // Exactly one of *GooglePrivacyDlpV2beta2ListInfoTypesResponse or error
  7047. // will be non-nil. Any non-2xx status code is an error. Response
  7048. // headers are in either
  7049. // *GooglePrivacyDlpV2beta2ListInfoTypesResponse.ServerResponse.Header
  7050. // or (if a response was returned at all) in
  7051. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7052. // whether the returned error was because http.StatusNotModified was
  7053. // returned.
  7054. func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInfoTypesResponse, error) {
  7055. gensupport.SetOptions(c.urlParams_, opts...)
  7056. res, err := c.doRequest("json")
  7057. if res != nil && res.StatusCode == http.StatusNotModified {
  7058. if res.Body != nil {
  7059. res.Body.Close()
  7060. }
  7061. return nil, &googleapi.Error{
  7062. Code: res.StatusCode,
  7063. Header: res.Header,
  7064. }
  7065. }
  7066. if err != nil {
  7067. return nil, err
  7068. }
  7069. defer googleapi.CloseBody(res)
  7070. if err := googleapi.CheckResponse(res); err != nil {
  7071. return nil, err
  7072. }
  7073. ret := &GooglePrivacyDlpV2beta2ListInfoTypesResponse{
  7074. ServerResponse: googleapi.ServerResponse{
  7075. Header: res.Header,
  7076. HTTPStatusCode: res.StatusCode,
  7077. },
  7078. }
  7079. target := &ret
  7080. if err := gensupport.DecodeResponse(target, res); err != nil {
  7081. return nil, err
  7082. }
  7083. return ret, nil
  7084. // {
  7085. // "description": "Returns sensitive information types DLP supports.",
  7086. // "flatPath": "v2beta2/infoTypes",
  7087. // "httpMethod": "GET",
  7088. // "id": "dlp.infoTypes.list",
  7089. // "parameterOrder": [],
  7090. // "parameters": {
  7091. // "filter": {
  7092. // "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.",
  7093. // "location": "query",
  7094. // "type": "string"
  7095. // },
  7096. // "languageCode": {
  7097. // "description": "Optional BCP-47 language code for localized infoType friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.",
  7098. // "location": "query",
  7099. // "type": "string"
  7100. // }
  7101. // },
  7102. // "path": "v2beta2/infoTypes",
  7103. // "response": {
  7104. // "$ref": "GooglePrivacyDlpV2beta2ListInfoTypesResponse"
  7105. // },
  7106. // "scopes": [
  7107. // "https://www.googleapis.com/auth/cloud-platform"
  7108. // ]
  7109. // }
  7110. }
  7111. // method id "dlp.organizations.deidentifyTemplates.create":
  7112. type OrganizationsDeidentifyTemplatesCreateCall struct {
  7113. s *Service
  7114. parent string
  7115. googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest
  7116. urlParams_ gensupport.URLParams
  7117. ctx_ context.Context
  7118. header_ http.Header
  7119. }
  7120. // Create: Creates an Deidentify template for re-using frequently used
  7121. // configuration
  7122. // for Deidentifying content, images, and storage.
  7123. func (r *OrganizationsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall {
  7124. c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7125. c.parent = parent
  7126. c.googleprivacydlpv2beta2createdeidentifytemplaterequest = googleprivacydlpv2beta2createdeidentifytemplaterequest
  7127. return c
  7128. }
  7129. // Fields allows partial responses to be retrieved. See
  7130. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7131. // for more information.
  7132. func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall {
  7133. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7134. return c
  7135. }
  7136. // Context sets the context to be used in this call's Do method. Any
  7137. // pending HTTP request will be aborted if the provided context is
  7138. // canceled.
  7139. func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall {
  7140. c.ctx_ = ctx
  7141. return c
  7142. }
  7143. // Header returns an http.Header that can be modified by the caller to
  7144. // add HTTP headers to the request.
  7145. func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header {
  7146. if c.header_ == nil {
  7147. c.header_ = make(http.Header)
  7148. }
  7149. return c.header_
  7150. }
  7151. func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  7152. reqHeaders := make(http.Header)
  7153. for k, v := range c.header_ {
  7154. reqHeaders[k] = v
  7155. }
  7156. reqHeaders.Set("User-Agent", c.s.userAgent())
  7157. var body io.Reader = nil
  7158. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2createdeidentifytemplaterequest)
  7159. if err != nil {
  7160. return nil, err
  7161. }
  7162. reqHeaders.Set("Content-Type", "application/json")
  7163. c.urlParams_.Set("alt", alt)
  7164. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates")
  7165. urls += "?" + c.urlParams_.Encode()
  7166. req, _ := http.NewRequest("POST", urls, body)
  7167. req.Header = reqHeaders
  7168. googleapi.Expand(req.URL, map[string]string{
  7169. "parent": c.parent,
  7170. })
  7171. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7172. }
  7173. // Do executes the "dlp.organizations.deidentifyTemplates.create" call.
  7174. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  7175. // will be non-nil. Any non-2xx status code is an error. Response
  7176. // headers are in either
  7177. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  7178. // (if a response was returned at all) in
  7179. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7180. // whether the returned error was because http.StatusNotModified was
  7181. // returned.
  7182. func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  7183. gensupport.SetOptions(c.urlParams_, opts...)
  7184. res, err := c.doRequest("json")
  7185. if res != nil && res.StatusCode == http.StatusNotModified {
  7186. if res.Body != nil {
  7187. res.Body.Close()
  7188. }
  7189. return nil, &googleapi.Error{
  7190. Code: res.StatusCode,
  7191. Header: res.Header,
  7192. }
  7193. }
  7194. if err != nil {
  7195. return nil, err
  7196. }
  7197. defer googleapi.CloseBody(res)
  7198. if err := googleapi.CheckResponse(res); err != nil {
  7199. return nil, err
  7200. }
  7201. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  7202. ServerResponse: googleapi.ServerResponse{
  7203. Header: res.Header,
  7204. HTTPStatusCode: res.StatusCode,
  7205. },
  7206. }
  7207. target := &ret
  7208. if err := gensupport.DecodeResponse(target, res); err != nil {
  7209. return nil, err
  7210. }
  7211. return ret, nil
  7212. // {
  7213. // "description": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.",
  7214. // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates",
  7215. // "httpMethod": "POST",
  7216. // "id": "dlp.organizations.deidentifyTemplates.create",
  7217. // "parameterOrder": [
  7218. // "parent"
  7219. // ],
  7220. // "parameters": {
  7221. // "parent": {
  7222. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  7223. // "location": "path",
  7224. // "pattern": "^organizations/[^/]+$",
  7225. // "required": true,
  7226. // "type": "string"
  7227. // }
  7228. // },
  7229. // "path": "v2beta2/{+parent}/deidentifyTemplates",
  7230. // "request": {
  7231. // "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest"
  7232. // },
  7233. // "response": {
  7234. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  7235. // },
  7236. // "scopes": [
  7237. // "https://www.googleapis.com/auth/cloud-platform"
  7238. // ]
  7239. // }
  7240. }
  7241. // method id "dlp.organizations.deidentifyTemplates.delete":
  7242. type OrganizationsDeidentifyTemplatesDeleteCall struct {
  7243. s *Service
  7244. name string
  7245. urlParams_ gensupport.URLParams
  7246. ctx_ context.Context
  7247. header_ http.Header
  7248. }
  7249. // Delete: Deletes inspect templates.
  7250. func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall {
  7251. c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7252. c.name = name
  7253. return c
  7254. }
  7255. // Fields allows partial responses to be retrieved. See
  7256. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7257. // for more information.
  7258. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall {
  7259. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7260. return c
  7261. }
  7262. // Context sets the context to be used in this call's Do method. Any
  7263. // pending HTTP request will be aborted if the provided context is
  7264. // canceled.
  7265. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall {
  7266. c.ctx_ = ctx
  7267. return c
  7268. }
  7269. // Header returns an http.Header that can be modified by the caller to
  7270. // add HTTP headers to the request.
  7271. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header {
  7272. if c.header_ == nil {
  7273. c.header_ = make(http.Header)
  7274. }
  7275. return c.header_
  7276. }
  7277. func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7278. reqHeaders := make(http.Header)
  7279. for k, v := range c.header_ {
  7280. reqHeaders[k] = v
  7281. }
  7282. reqHeaders.Set("User-Agent", c.s.userAgent())
  7283. var body io.Reader = nil
  7284. c.urlParams_.Set("alt", alt)
  7285. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  7286. urls += "?" + c.urlParams_.Encode()
  7287. req, _ := http.NewRequest("DELETE", urls, body)
  7288. req.Header = reqHeaders
  7289. googleapi.Expand(req.URL, map[string]string{
  7290. "name": c.name,
  7291. })
  7292. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7293. }
  7294. // Do executes the "dlp.organizations.deidentifyTemplates.delete" call.
  7295. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  7296. // non-2xx status code is an error. Response headers are in either
  7297. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  7298. // returned at all) in error.(*googleapi.Error).Header. Use
  7299. // googleapi.IsNotModified to check whether the returned error was
  7300. // because http.StatusNotModified was returned.
  7301. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  7302. gensupport.SetOptions(c.urlParams_, opts...)
  7303. res, err := c.doRequest("json")
  7304. if res != nil && res.StatusCode == http.StatusNotModified {
  7305. if res.Body != nil {
  7306. res.Body.Close()
  7307. }
  7308. return nil, &googleapi.Error{
  7309. Code: res.StatusCode,
  7310. Header: res.Header,
  7311. }
  7312. }
  7313. if err != nil {
  7314. return nil, err
  7315. }
  7316. defer googleapi.CloseBody(res)
  7317. if err := googleapi.CheckResponse(res); err != nil {
  7318. return nil, err
  7319. }
  7320. ret := &GoogleProtobufEmpty{
  7321. ServerResponse: googleapi.ServerResponse{
  7322. Header: res.Header,
  7323. HTTPStatusCode: res.StatusCode,
  7324. },
  7325. }
  7326. target := &ret
  7327. if err := gensupport.DecodeResponse(target, res); err != nil {
  7328. return nil, err
  7329. }
  7330. return ret, nil
  7331. // {
  7332. // "description": "Deletes inspect templates.",
  7333. // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  7334. // "httpMethod": "DELETE",
  7335. // "id": "dlp.organizations.deidentifyTemplates.delete",
  7336. // "parameterOrder": [
  7337. // "name"
  7338. // ],
  7339. // "parameters": {
  7340. // "name": {
  7341. // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  7342. // "location": "path",
  7343. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  7344. // "required": true,
  7345. // "type": "string"
  7346. // }
  7347. // },
  7348. // "path": "v2beta2/{+name}",
  7349. // "response": {
  7350. // "$ref": "GoogleProtobufEmpty"
  7351. // },
  7352. // "scopes": [
  7353. // "https://www.googleapis.com/auth/cloud-platform"
  7354. // ]
  7355. // }
  7356. }
  7357. // method id "dlp.organizations.deidentifyTemplates.get":
  7358. type OrganizationsDeidentifyTemplatesGetCall struct {
  7359. s *Service
  7360. name string
  7361. urlParams_ gensupport.URLParams
  7362. ifNoneMatch_ string
  7363. ctx_ context.Context
  7364. header_ http.Header
  7365. }
  7366. // Get: Gets an inspect template.
  7367. func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall {
  7368. c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7369. c.name = name
  7370. return c
  7371. }
  7372. // Fields allows partial responses to be retrieved. See
  7373. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7374. // for more information.
  7375. func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall {
  7376. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7377. return c
  7378. }
  7379. // IfNoneMatch sets the optional parameter which makes the operation
  7380. // fail if the object's ETag matches the given value. This is useful for
  7381. // getting updates only after the object has changed since the last
  7382. // request. Use googleapi.IsNotModified to check whether the response
  7383. // error from Do is the result of In-None-Match.
  7384. func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall {
  7385. c.ifNoneMatch_ = entityTag
  7386. return c
  7387. }
  7388. // Context sets the context to be used in this call's Do method. Any
  7389. // pending HTTP request will be aborted if the provided context is
  7390. // canceled.
  7391. func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall {
  7392. c.ctx_ = ctx
  7393. return c
  7394. }
  7395. // Header returns an http.Header that can be modified by the caller to
  7396. // add HTTP headers to the request.
  7397. func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header {
  7398. if c.header_ == nil {
  7399. c.header_ = make(http.Header)
  7400. }
  7401. return c.header_
  7402. }
  7403. func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  7404. reqHeaders := make(http.Header)
  7405. for k, v := range c.header_ {
  7406. reqHeaders[k] = v
  7407. }
  7408. reqHeaders.Set("User-Agent", c.s.userAgent())
  7409. if c.ifNoneMatch_ != "" {
  7410. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7411. }
  7412. var body io.Reader = nil
  7413. c.urlParams_.Set("alt", alt)
  7414. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  7415. urls += "?" + c.urlParams_.Encode()
  7416. req, _ := http.NewRequest("GET", urls, body)
  7417. req.Header = reqHeaders
  7418. googleapi.Expand(req.URL, map[string]string{
  7419. "name": c.name,
  7420. })
  7421. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7422. }
  7423. // Do executes the "dlp.organizations.deidentifyTemplates.get" call.
  7424. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  7425. // will be non-nil. Any non-2xx status code is an error. Response
  7426. // headers are in either
  7427. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  7428. // (if a response was returned at all) in
  7429. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7430. // whether the returned error was because http.StatusNotModified was
  7431. // returned.
  7432. func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  7433. gensupport.SetOptions(c.urlParams_, opts...)
  7434. res, err := c.doRequest("json")
  7435. if res != nil && res.StatusCode == http.StatusNotModified {
  7436. if res.Body != nil {
  7437. res.Body.Close()
  7438. }
  7439. return nil, &googleapi.Error{
  7440. Code: res.StatusCode,
  7441. Header: res.Header,
  7442. }
  7443. }
  7444. if err != nil {
  7445. return nil, err
  7446. }
  7447. defer googleapi.CloseBody(res)
  7448. if err := googleapi.CheckResponse(res); err != nil {
  7449. return nil, err
  7450. }
  7451. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  7452. ServerResponse: googleapi.ServerResponse{
  7453. Header: res.Header,
  7454. HTTPStatusCode: res.StatusCode,
  7455. },
  7456. }
  7457. target := &ret
  7458. if err := gensupport.DecodeResponse(target, res); err != nil {
  7459. return nil, err
  7460. }
  7461. return ret, nil
  7462. // {
  7463. // "description": "Gets an inspect template.",
  7464. // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  7465. // "httpMethod": "GET",
  7466. // "id": "dlp.organizations.deidentifyTemplates.get",
  7467. // "parameterOrder": [
  7468. // "name"
  7469. // ],
  7470. // "parameters": {
  7471. // "name": {
  7472. // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  7473. // "location": "path",
  7474. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  7475. // "required": true,
  7476. // "type": "string"
  7477. // }
  7478. // },
  7479. // "path": "v2beta2/{+name}",
  7480. // "response": {
  7481. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  7482. // },
  7483. // "scopes": [
  7484. // "https://www.googleapis.com/auth/cloud-platform"
  7485. // ]
  7486. // }
  7487. }
  7488. // method id "dlp.organizations.deidentifyTemplates.list":
  7489. type OrganizationsDeidentifyTemplatesListCall struct {
  7490. s *Service
  7491. parent string
  7492. urlParams_ gensupport.URLParams
  7493. ifNoneMatch_ string
  7494. ctx_ context.Context
  7495. header_ http.Header
  7496. }
  7497. // List: Lists inspect templates.
  7498. func (r *OrganizationsDeidentifyTemplatesService) List(parent string) *OrganizationsDeidentifyTemplatesListCall {
  7499. c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7500. c.parent = parent
  7501. return c
  7502. }
  7503. // PageSize sets the optional parameter "pageSize": Optional size of the
  7504. // page, can be limited by server. If zero server returns
  7505. // a page of max size 100.
  7506. func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall {
  7507. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7508. return c
  7509. }
  7510. // PageToken sets the optional parameter "pageToken": Optional page
  7511. // token to continue retrieval. Comes from previous call
  7512. // to `ListDeidentifyTemplates`.
  7513. func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall {
  7514. c.urlParams_.Set("pageToken", pageToken)
  7515. return c
  7516. }
  7517. // Fields allows partial responses to be retrieved. See
  7518. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7519. // for more information.
  7520. func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall {
  7521. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7522. return c
  7523. }
  7524. // IfNoneMatch sets the optional parameter which makes the operation
  7525. // fail if the object's ETag matches the given value. This is useful for
  7526. // getting updates only after the object has changed since the last
  7527. // request. Use googleapi.IsNotModified to check whether the response
  7528. // error from Do is the result of In-None-Match.
  7529. func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall {
  7530. c.ifNoneMatch_ = entityTag
  7531. return c
  7532. }
  7533. // Context sets the context to be used in this call's Do method. Any
  7534. // pending HTTP request will be aborted if the provided context is
  7535. // canceled.
  7536. func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall {
  7537. c.ctx_ = ctx
  7538. return c
  7539. }
  7540. // Header returns an http.Header that can be modified by the caller to
  7541. // add HTTP headers to the request.
  7542. func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header {
  7543. if c.header_ == nil {
  7544. c.header_ = make(http.Header)
  7545. }
  7546. return c.header_
  7547. }
  7548. func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  7549. reqHeaders := make(http.Header)
  7550. for k, v := range c.header_ {
  7551. reqHeaders[k] = v
  7552. }
  7553. reqHeaders.Set("User-Agent", c.s.userAgent())
  7554. if c.ifNoneMatch_ != "" {
  7555. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7556. }
  7557. var body io.Reader = nil
  7558. c.urlParams_.Set("alt", alt)
  7559. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates")
  7560. urls += "?" + c.urlParams_.Encode()
  7561. req, _ := http.NewRequest("GET", urls, body)
  7562. req.Header = reqHeaders
  7563. googleapi.Expand(req.URL, map[string]string{
  7564. "parent": c.parent,
  7565. })
  7566. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7567. }
  7568. // Do executes the "dlp.organizations.deidentifyTemplates.list" call.
  7569. // Exactly one of
  7570. // *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse or error will
  7571. // be non-nil. Any non-2xx status code is an error. Response headers are
  7572. // in either
  7573. // *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse.ServerResponse
  7574. // .Header or (if a response was returned at all) in
  7575. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7576. // whether the returned error was because http.StatusNotModified was
  7577. // returned.
  7578. func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse, error) {
  7579. gensupport.SetOptions(c.urlParams_, opts...)
  7580. res, err := c.doRequest("json")
  7581. if res != nil && res.StatusCode == http.StatusNotModified {
  7582. if res.Body != nil {
  7583. res.Body.Close()
  7584. }
  7585. return nil, &googleapi.Error{
  7586. Code: res.StatusCode,
  7587. Header: res.Header,
  7588. }
  7589. }
  7590. if err != nil {
  7591. return nil, err
  7592. }
  7593. defer googleapi.CloseBody(res)
  7594. if err := googleapi.CheckResponse(res); err != nil {
  7595. return nil, err
  7596. }
  7597. ret := &GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse{
  7598. ServerResponse: googleapi.ServerResponse{
  7599. Header: res.Header,
  7600. HTTPStatusCode: res.StatusCode,
  7601. },
  7602. }
  7603. target := &ret
  7604. if err := gensupport.DecodeResponse(target, res); err != nil {
  7605. return nil, err
  7606. }
  7607. return ret, nil
  7608. // {
  7609. // "description": "Lists inspect templates.",
  7610. // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates",
  7611. // "httpMethod": "GET",
  7612. // "id": "dlp.organizations.deidentifyTemplates.list",
  7613. // "parameterOrder": [
  7614. // "parent"
  7615. // ],
  7616. // "parameters": {
  7617. // "pageSize": {
  7618. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  7619. // "format": "int32",
  7620. // "location": "query",
  7621. // "type": "integer"
  7622. // },
  7623. // "pageToken": {
  7624. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.",
  7625. // "location": "query",
  7626. // "type": "string"
  7627. // },
  7628. // "parent": {
  7629. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  7630. // "location": "path",
  7631. // "pattern": "^organizations/[^/]+$",
  7632. // "required": true,
  7633. // "type": "string"
  7634. // }
  7635. // },
  7636. // "path": "v2beta2/{+parent}/deidentifyTemplates",
  7637. // "response": {
  7638. // "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse"
  7639. // },
  7640. // "scopes": [
  7641. // "https://www.googleapis.com/auth/cloud-platform"
  7642. // ]
  7643. // }
  7644. }
  7645. // Pages invokes f for each page of results.
  7646. // A non-nil error returned from f will halt the iteration.
  7647. // The provided context supersedes any context provided to the Context method.
  7648. func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) error) error {
  7649. c.ctx_ = ctx
  7650. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7651. for {
  7652. x, err := c.Do()
  7653. if err != nil {
  7654. return err
  7655. }
  7656. if err := f(x); err != nil {
  7657. return err
  7658. }
  7659. if x.NextPageToken == "" {
  7660. return nil
  7661. }
  7662. c.PageToken(x.NextPageToken)
  7663. }
  7664. }
  7665. // method id "dlp.organizations.deidentifyTemplates.patch":
  7666. type OrganizationsDeidentifyTemplatesPatchCall struct {
  7667. s *Service
  7668. name string
  7669. googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest
  7670. urlParams_ gensupport.URLParams
  7671. ctx_ context.Context
  7672. header_ http.Header
  7673. }
  7674. // Patch: Updates the inspect template.
  7675. func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall {
  7676. c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7677. c.name = name
  7678. c.googleprivacydlpv2beta2updatedeidentifytemplaterequest = googleprivacydlpv2beta2updatedeidentifytemplaterequest
  7679. return c
  7680. }
  7681. // Fields allows partial responses to be retrieved. See
  7682. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7683. // for more information.
  7684. func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall {
  7685. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7686. return c
  7687. }
  7688. // Context sets the context to be used in this call's Do method. Any
  7689. // pending HTTP request will be aborted if the provided context is
  7690. // canceled.
  7691. func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall {
  7692. c.ctx_ = ctx
  7693. return c
  7694. }
  7695. // Header returns an http.Header that can be modified by the caller to
  7696. // add HTTP headers to the request.
  7697. func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header {
  7698. if c.header_ == nil {
  7699. c.header_ = make(http.Header)
  7700. }
  7701. return c.header_
  7702. }
  7703. func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  7704. reqHeaders := make(http.Header)
  7705. for k, v := range c.header_ {
  7706. reqHeaders[k] = v
  7707. }
  7708. reqHeaders.Set("User-Agent", c.s.userAgent())
  7709. var body io.Reader = nil
  7710. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2updatedeidentifytemplaterequest)
  7711. if err != nil {
  7712. return nil, err
  7713. }
  7714. reqHeaders.Set("Content-Type", "application/json")
  7715. c.urlParams_.Set("alt", alt)
  7716. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  7717. urls += "?" + c.urlParams_.Encode()
  7718. req, _ := http.NewRequest("PATCH", urls, body)
  7719. req.Header = reqHeaders
  7720. googleapi.Expand(req.URL, map[string]string{
  7721. "name": c.name,
  7722. })
  7723. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7724. }
  7725. // Do executes the "dlp.organizations.deidentifyTemplates.patch" call.
  7726. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  7727. // will be non-nil. Any non-2xx status code is an error. Response
  7728. // headers are in either
  7729. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  7730. // (if a response was returned at all) in
  7731. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7732. // whether the returned error was because http.StatusNotModified was
  7733. // returned.
  7734. func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  7735. gensupport.SetOptions(c.urlParams_, opts...)
  7736. res, err := c.doRequest("json")
  7737. if res != nil && res.StatusCode == http.StatusNotModified {
  7738. if res.Body != nil {
  7739. res.Body.Close()
  7740. }
  7741. return nil, &googleapi.Error{
  7742. Code: res.StatusCode,
  7743. Header: res.Header,
  7744. }
  7745. }
  7746. if err != nil {
  7747. return nil, err
  7748. }
  7749. defer googleapi.CloseBody(res)
  7750. if err := googleapi.CheckResponse(res); err != nil {
  7751. return nil, err
  7752. }
  7753. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  7754. ServerResponse: googleapi.ServerResponse{
  7755. Header: res.Header,
  7756. HTTPStatusCode: res.StatusCode,
  7757. },
  7758. }
  7759. target := &ret
  7760. if err := gensupport.DecodeResponse(target, res); err != nil {
  7761. return nil, err
  7762. }
  7763. return ret, nil
  7764. // {
  7765. // "description": "Updates the inspect template.",
  7766. // "flatPath": "v2beta2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  7767. // "httpMethod": "PATCH",
  7768. // "id": "dlp.organizations.deidentifyTemplates.patch",
  7769. // "parameterOrder": [
  7770. // "name"
  7771. // ],
  7772. // "parameters": {
  7773. // "name": {
  7774. // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  7775. // "location": "path",
  7776. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  7777. // "required": true,
  7778. // "type": "string"
  7779. // }
  7780. // },
  7781. // "path": "v2beta2/{+name}",
  7782. // "request": {
  7783. // "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest"
  7784. // },
  7785. // "response": {
  7786. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  7787. // },
  7788. // "scopes": [
  7789. // "https://www.googleapis.com/auth/cloud-platform"
  7790. // ]
  7791. // }
  7792. }
  7793. // method id "dlp.organizations.inspectTemplates.create":
  7794. type OrganizationsInspectTemplatesCreateCall struct {
  7795. s *Service
  7796. parent string
  7797. googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest
  7798. urlParams_ gensupport.URLParams
  7799. ctx_ context.Context
  7800. header_ http.Header
  7801. }
  7802. // Create: Creates an inspect template for re-using frequently used
  7803. // configuration
  7804. // for inspecting content, images, and storage.
  7805. func (r *OrganizationsInspectTemplatesService) Create(parent string, googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall {
  7806. c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7807. c.parent = parent
  7808. c.googleprivacydlpv2beta2createinspecttemplaterequest = googleprivacydlpv2beta2createinspecttemplaterequest
  7809. return c
  7810. }
  7811. // Fields allows partial responses to be retrieved. See
  7812. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7813. // for more information.
  7814. func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall {
  7815. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7816. return c
  7817. }
  7818. // Context sets the context to be used in this call's Do method. Any
  7819. // pending HTTP request will be aborted if the provided context is
  7820. // canceled.
  7821. func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall {
  7822. c.ctx_ = ctx
  7823. return c
  7824. }
  7825. // Header returns an http.Header that can be modified by the caller to
  7826. // add HTTP headers to the request.
  7827. func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header {
  7828. if c.header_ == nil {
  7829. c.header_ = make(http.Header)
  7830. }
  7831. return c.header_
  7832. }
  7833. func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  7834. reqHeaders := make(http.Header)
  7835. for k, v := range c.header_ {
  7836. reqHeaders[k] = v
  7837. }
  7838. reqHeaders.Set("User-Agent", c.s.userAgent())
  7839. var body io.Reader = nil
  7840. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2createinspecttemplaterequest)
  7841. if err != nil {
  7842. return nil, err
  7843. }
  7844. reqHeaders.Set("Content-Type", "application/json")
  7845. c.urlParams_.Set("alt", alt)
  7846. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates")
  7847. urls += "?" + c.urlParams_.Encode()
  7848. req, _ := http.NewRequest("POST", urls, body)
  7849. req.Header = reqHeaders
  7850. googleapi.Expand(req.URL, map[string]string{
  7851. "parent": c.parent,
  7852. })
  7853. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7854. }
  7855. // Do executes the "dlp.organizations.inspectTemplates.create" call.
  7856. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  7857. // be non-nil. Any non-2xx status code is an error. Response headers are
  7858. // in either
  7859. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  7860. // a response was returned at all) in error.(*googleapi.Error).Header.
  7861. // Use googleapi.IsNotModified to check whether the returned error was
  7862. // because http.StatusNotModified was returned.
  7863. func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  7864. gensupport.SetOptions(c.urlParams_, opts...)
  7865. res, err := c.doRequest("json")
  7866. if res != nil && res.StatusCode == http.StatusNotModified {
  7867. if res.Body != nil {
  7868. res.Body.Close()
  7869. }
  7870. return nil, &googleapi.Error{
  7871. Code: res.StatusCode,
  7872. Header: res.Header,
  7873. }
  7874. }
  7875. if err != nil {
  7876. return nil, err
  7877. }
  7878. defer googleapi.CloseBody(res)
  7879. if err := googleapi.CheckResponse(res); err != nil {
  7880. return nil, err
  7881. }
  7882. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  7883. ServerResponse: googleapi.ServerResponse{
  7884. Header: res.Header,
  7885. HTTPStatusCode: res.StatusCode,
  7886. },
  7887. }
  7888. target := &ret
  7889. if err := gensupport.DecodeResponse(target, res); err != nil {
  7890. return nil, err
  7891. }
  7892. return ret, nil
  7893. // {
  7894. // "description": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.",
  7895. // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates",
  7896. // "httpMethod": "POST",
  7897. // "id": "dlp.organizations.inspectTemplates.create",
  7898. // "parameterOrder": [
  7899. // "parent"
  7900. // ],
  7901. // "parameters": {
  7902. // "parent": {
  7903. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  7904. // "location": "path",
  7905. // "pattern": "^organizations/[^/]+$",
  7906. // "required": true,
  7907. // "type": "string"
  7908. // }
  7909. // },
  7910. // "path": "v2beta2/{+parent}/inspectTemplates",
  7911. // "request": {
  7912. // "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest"
  7913. // },
  7914. // "response": {
  7915. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  7916. // },
  7917. // "scopes": [
  7918. // "https://www.googleapis.com/auth/cloud-platform"
  7919. // ]
  7920. // }
  7921. }
  7922. // method id "dlp.organizations.inspectTemplates.delete":
  7923. type OrganizationsInspectTemplatesDeleteCall struct {
  7924. s *Service
  7925. name string
  7926. urlParams_ gensupport.URLParams
  7927. ctx_ context.Context
  7928. header_ http.Header
  7929. }
  7930. // Delete: Deletes inspect templates.
  7931. func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall {
  7932. c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7933. c.name = name
  7934. return c
  7935. }
  7936. // Fields allows partial responses to be retrieved. See
  7937. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7938. // for more information.
  7939. func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall {
  7940. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7941. return c
  7942. }
  7943. // Context sets the context to be used in this call's Do method. Any
  7944. // pending HTTP request will be aborted if the provided context is
  7945. // canceled.
  7946. func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall {
  7947. c.ctx_ = ctx
  7948. return c
  7949. }
  7950. // Header returns an http.Header that can be modified by the caller to
  7951. // add HTTP headers to the request.
  7952. func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header {
  7953. if c.header_ == nil {
  7954. c.header_ = make(http.Header)
  7955. }
  7956. return c.header_
  7957. }
  7958. func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7959. reqHeaders := make(http.Header)
  7960. for k, v := range c.header_ {
  7961. reqHeaders[k] = v
  7962. }
  7963. reqHeaders.Set("User-Agent", c.s.userAgent())
  7964. var body io.Reader = nil
  7965. c.urlParams_.Set("alt", alt)
  7966. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  7967. urls += "?" + c.urlParams_.Encode()
  7968. req, _ := http.NewRequest("DELETE", urls, body)
  7969. req.Header = reqHeaders
  7970. googleapi.Expand(req.URL, map[string]string{
  7971. "name": c.name,
  7972. })
  7973. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7974. }
  7975. // Do executes the "dlp.organizations.inspectTemplates.delete" call.
  7976. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  7977. // non-2xx status code is an error. Response headers are in either
  7978. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  7979. // returned at all) in error.(*googleapi.Error).Header. Use
  7980. // googleapi.IsNotModified to check whether the returned error was
  7981. // because http.StatusNotModified was returned.
  7982. func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  7983. gensupport.SetOptions(c.urlParams_, opts...)
  7984. res, err := c.doRequest("json")
  7985. if res != nil && res.StatusCode == http.StatusNotModified {
  7986. if res.Body != nil {
  7987. res.Body.Close()
  7988. }
  7989. return nil, &googleapi.Error{
  7990. Code: res.StatusCode,
  7991. Header: res.Header,
  7992. }
  7993. }
  7994. if err != nil {
  7995. return nil, err
  7996. }
  7997. defer googleapi.CloseBody(res)
  7998. if err := googleapi.CheckResponse(res); err != nil {
  7999. return nil, err
  8000. }
  8001. ret := &GoogleProtobufEmpty{
  8002. ServerResponse: googleapi.ServerResponse{
  8003. Header: res.Header,
  8004. HTTPStatusCode: res.StatusCode,
  8005. },
  8006. }
  8007. target := &ret
  8008. if err := gensupport.DecodeResponse(target, res); err != nil {
  8009. return nil, err
  8010. }
  8011. return ret, nil
  8012. // {
  8013. // "description": "Deletes inspect templates.",
  8014. // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  8015. // "httpMethod": "DELETE",
  8016. // "id": "dlp.organizations.inspectTemplates.delete",
  8017. // "parameterOrder": [
  8018. // "name"
  8019. // ],
  8020. // "parameters": {
  8021. // "name": {
  8022. // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  8023. // "location": "path",
  8024. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  8025. // "required": true,
  8026. // "type": "string"
  8027. // }
  8028. // },
  8029. // "path": "v2beta2/{+name}",
  8030. // "response": {
  8031. // "$ref": "GoogleProtobufEmpty"
  8032. // },
  8033. // "scopes": [
  8034. // "https://www.googleapis.com/auth/cloud-platform"
  8035. // ]
  8036. // }
  8037. }
  8038. // method id "dlp.organizations.inspectTemplates.get":
  8039. type OrganizationsInspectTemplatesGetCall struct {
  8040. s *Service
  8041. name string
  8042. urlParams_ gensupport.URLParams
  8043. ifNoneMatch_ string
  8044. ctx_ context.Context
  8045. header_ http.Header
  8046. }
  8047. // Get: Gets an inspect template.
  8048. func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall {
  8049. c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8050. c.name = name
  8051. return c
  8052. }
  8053. // Fields allows partial responses to be retrieved. See
  8054. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8055. // for more information.
  8056. func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall {
  8057. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8058. return c
  8059. }
  8060. // IfNoneMatch sets the optional parameter which makes the operation
  8061. // fail if the object's ETag matches the given value. This is useful for
  8062. // getting updates only after the object has changed since the last
  8063. // request. Use googleapi.IsNotModified to check whether the response
  8064. // error from Do is the result of In-None-Match.
  8065. func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall {
  8066. c.ifNoneMatch_ = entityTag
  8067. return c
  8068. }
  8069. // Context sets the context to be used in this call's Do method. Any
  8070. // pending HTTP request will be aborted if the provided context is
  8071. // canceled.
  8072. func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall {
  8073. c.ctx_ = ctx
  8074. return c
  8075. }
  8076. // Header returns an http.Header that can be modified by the caller to
  8077. // add HTTP headers to the request.
  8078. func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header {
  8079. if c.header_ == nil {
  8080. c.header_ = make(http.Header)
  8081. }
  8082. return c.header_
  8083. }
  8084. func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  8085. reqHeaders := make(http.Header)
  8086. for k, v := range c.header_ {
  8087. reqHeaders[k] = v
  8088. }
  8089. reqHeaders.Set("User-Agent", c.s.userAgent())
  8090. if c.ifNoneMatch_ != "" {
  8091. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8092. }
  8093. var body io.Reader = nil
  8094. c.urlParams_.Set("alt", alt)
  8095. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  8096. urls += "?" + c.urlParams_.Encode()
  8097. req, _ := http.NewRequest("GET", urls, body)
  8098. req.Header = reqHeaders
  8099. googleapi.Expand(req.URL, map[string]string{
  8100. "name": c.name,
  8101. })
  8102. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8103. }
  8104. // Do executes the "dlp.organizations.inspectTemplates.get" call.
  8105. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  8106. // be non-nil. Any non-2xx status code is an error. Response headers are
  8107. // in either
  8108. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  8109. // a response was returned at all) in error.(*googleapi.Error).Header.
  8110. // Use googleapi.IsNotModified to check whether the returned error was
  8111. // because http.StatusNotModified was returned.
  8112. func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  8113. gensupport.SetOptions(c.urlParams_, opts...)
  8114. res, err := c.doRequest("json")
  8115. if res != nil && res.StatusCode == http.StatusNotModified {
  8116. if res.Body != nil {
  8117. res.Body.Close()
  8118. }
  8119. return nil, &googleapi.Error{
  8120. Code: res.StatusCode,
  8121. Header: res.Header,
  8122. }
  8123. }
  8124. if err != nil {
  8125. return nil, err
  8126. }
  8127. defer googleapi.CloseBody(res)
  8128. if err := googleapi.CheckResponse(res); err != nil {
  8129. return nil, err
  8130. }
  8131. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  8132. ServerResponse: googleapi.ServerResponse{
  8133. Header: res.Header,
  8134. HTTPStatusCode: res.StatusCode,
  8135. },
  8136. }
  8137. target := &ret
  8138. if err := gensupport.DecodeResponse(target, res); err != nil {
  8139. return nil, err
  8140. }
  8141. return ret, nil
  8142. // {
  8143. // "description": "Gets an inspect template.",
  8144. // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  8145. // "httpMethod": "GET",
  8146. // "id": "dlp.organizations.inspectTemplates.get",
  8147. // "parameterOrder": [
  8148. // "name"
  8149. // ],
  8150. // "parameters": {
  8151. // "name": {
  8152. // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  8153. // "location": "path",
  8154. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  8155. // "required": true,
  8156. // "type": "string"
  8157. // }
  8158. // },
  8159. // "path": "v2beta2/{+name}",
  8160. // "response": {
  8161. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  8162. // },
  8163. // "scopes": [
  8164. // "https://www.googleapis.com/auth/cloud-platform"
  8165. // ]
  8166. // }
  8167. }
  8168. // method id "dlp.organizations.inspectTemplates.list":
  8169. type OrganizationsInspectTemplatesListCall struct {
  8170. s *Service
  8171. parent string
  8172. urlParams_ gensupport.URLParams
  8173. ifNoneMatch_ string
  8174. ctx_ context.Context
  8175. header_ http.Header
  8176. }
  8177. // List: Lists inspect templates.
  8178. func (r *OrganizationsInspectTemplatesService) List(parent string) *OrganizationsInspectTemplatesListCall {
  8179. c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8180. c.parent = parent
  8181. return c
  8182. }
  8183. // PageSize sets the optional parameter "pageSize": Optional size of the
  8184. // page, can be limited by server. If zero server returns
  8185. // a page of max size 100.
  8186. func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall {
  8187. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8188. return c
  8189. }
  8190. // PageToken sets the optional parameter "pageToken": Optional page
  8191. // token to continue retrieval. Comes from previous call
  8192. // to `ListInspectTemplates`.
  8193. func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall {
  8194. c.urlParams_.Set("pageToken", pageToken)
  8195. return c
  8196. }
  8197. // Fields allows partial responses to be retrieved. See
  8198. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8199. // for more information.
  8200. func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall {
  8201. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8202. return c
  8203. }
  8204. // IfNoneMatch sets the optional parameter which makes the operation
  8205. // fail if the object's ETag matches the given value. This is useful for
  8206. // getting updates only after the object has changed since the last
  8207. // request. Use googleapi.IsNotModified to check whether the response
  8208. // error from Do is the result of In-None-Match.
  8209. func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall {
  8210. c.ifNoneMatch_ = entityTag
  8211. return c
  8212. }
  8213. // Context sets the context to be used in this call's Do method. Any
  8214. // pending HTTP request will be aborted if the provided context is
  8215. // canceled.
  8216. func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall {
  8217. c.ctx_ = ctx
  8218. return c
  8219. }
  8220. // Header returns an http.Header that can be modified by the caller to
  8221. // add HTTP headers to the request.
  8222. func (c *OrganizationsInspectTemplatesListCall) Header() http.Header {
  8223. if c.header_ == nil {
  8224. c.header_ = make(http.Header)
  8225. }
  8226. return c.header_
  8227. }
  8228. func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  8229. reqHeaders := make(http.Header)
  8230. for k, v := range c.header_ {
  8231. reqHeaders[k] = v
  8232. }
  8233. reqHeaders.Set("User-Agent", c.s.userAgent())
  8234. if c.ifNoneMatch_ != "" {
  8235. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8236. }
  8237. var body io.Reader = nil
  8238. c.urlParams_.Set("alt", alt)
  8239. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates")
  8240. urls += "?" + c.urlParams_.Encode()
  8241. req, _ := http.NewRequest("GET", urls, body)
  8242. req.Header = reqHeaders
  8243. googleapi.Expand(req.URL, map[string]string{
  8244. "parent": c.parent,
  8245. })
  8246. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8247. }
  8248. // Do executes the "dlp.organizations.inspectTemplates.list" call.
  8249. // Exactly one of *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse
  8250. // or error will be non-nil. Any non-2xx status code is an error.
  8251. // Response headers are in either
  8252. // *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse.ServerResponse.He
  8253. // ader or (if a response was returned at all) in
  8254. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8255. // whether the returned error was because http.StatusNotModified was
  8256. // returned.
  8257. func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse, error) {
  8258. gensupport.SetOptions(c.urlParams_, opts...)
  8259. res, err := c.doRequest("json")
  8260. if res != nil && res.StatusCode == http.StatusNotModified {
  8261. if res.Body != nil {
  8262. res.Body.Close()
  8263. }
  8264. return nil, &googleapi.Error{
  8265. Code: res.StatusCode,
  8266. Header: res.Header,
  8267. }
  8268. }
  8269. if err != nil {
  8270. return nil, err
  8271. }
  8272. defer googleapi.CloseBody(res)
  8273. if err := googleapi.CheckResponse(res); err != nil {
  8274. return nil, err
  8275. }
  8276. ret := &GooglePrivacyDlpV2beta2ListInspectTemplatesResponse{
  8277. ServerResponse: googleapi.ServerResponse{
  8278. Header: res.Header,
  8279. HTTPStatusCode: res.StatusCode,
  8280. },
  8281. }
  8282. target := &ret
  8283. if err := gensupport.DecodeResponse(target, res); err != nil {
  8284. return nil, err
  8285. }
  8286. return ret, nil
  8287. // {
  8288. // "description": "Lists inspect templates.",
  8289. // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates",
  8290. // "httpMethod": "GET",
  8291. // "id": "dlp.organizations.inspectTemplates.list",
  8292. // "parameterOrder": [
  8293. // "parent"
  8294. // ],
  8295. // "parameters": {
  8296. // "pageSize": {
  8297. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  8298. // "format": "int32",
  8299. // "location": "query",
  8300. // "type": "integer"
  8301. // },
  8302. // "pageToken": {
  8303. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.",
  8304. // "location": "query",
  8305. // "type": "string"
  8306. // },
  8307. // "parent": {
  8308. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  8309. // "location": "path",
  8310. // "pattern": "^organizations/[^/]+$",
  8311. // "required": true,
  8312. // "type": "string"
  8313. // }
  8314. // },
  8315. // "path": "v2beta2/{+parent}/inspectTemplates",
  8316. // "response": {
  8317. // "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse"
  8318. // },
  8319. // "scopes": [
  8320. // "https://www.googleapis.com/auth/cloud-platform"
  8321. // ]
  8322. // }
  8323. }
  8324. // Pages invokes f for each page of results.
  8325. // A non-nil error returned from f will halt the iteration.
  8326. // The provided context supersedes any context provided to the Context method.
  8327. func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) error) error {
  8328. c.ctx_ = ctx
  8329. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8330. for {
  8331. x, err := c.Do()
  8332. if err != nil {
  8333. return err
  8334. }
  8335. if err := f(x); err != nil {
  8336. return err
  8337. }
  8338. if x.NextPageToken == "" {
  8339. return nil
  8340. }
  8341. c.PageToken(x.NextPageToken)
  8342. }
  8343. }
  8344. // method id "dlp.organizations.inspectTemplates.patch":
  8345. type OrganizationsInspectTemplatesPatchCall struct {
  8346. s *Service
  8347. name string
  8348. googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest
  8349. urlParams_ gensupport.URLParams
  8350. ctx_ context.Context
  8351. header_ http.Header
  8352. }
  8353. // Patch: Updates the inspect template.
  8354. func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall {
  8355. c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8356. c.name = name
  8357. c.googleprivacydlpv2beta2updateinspecttemplaterequest = googleprivacydlpv2beta2updateinspecttemplaterequest
  8358. return c
  8359. }
  8360. // Fields allows partial responses to be retrieved. See
  8361. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8362. // for more information.
  8363. func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall {
  8364. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8365. return c
  8366. }
  8367. // Context sets the context to be used in this call's Do method. Any
  8368. // pending HTTP request will be aborted if the provided context is
  8369. // canceled.
  8370. func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall {
  8371. c.ctx_ = ctx
  8372. return c
  8373. }
  8374. // Header returns an http.Header that can be modified by the caller to
  8375. // add HTTP headers to the request.
  8376. func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header {
  8377. if c.header_ == nil {
  8378. c.header_ = make(http.Header)
  8379. }
  8380. return c.header_
  8381. }
  8382. func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  8383. reqHeaders := make(http.Header)
  8384. for k, v := range c.header_ {
  8385. reqHeaders[k] = v
  8386. }
  8387. reqHeaders.Set("User-Agent", c.s.userAgent())
  8388. var body io.Reader = nil
  8389. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2updateinspecttemplaterequest)
  8390. if err != nil {
  8391. return nil, err
  8392. }
  8393. reqHeaders.Set("Content-Type", "application/json")
  8394. c.urlParams_.Set("alt", alt)
  8395. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  8396. urls += "?" + c.urlParams_.Encode()
  8397. req, _ := http.NewRequest("PATCH", urls, body)
  8398. req.Header = reqHeaders
  8399. googleapi.Expand(req.URL, map[string]string{
  8400. "name": c.name,
  8401. })
  8402. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8403. }
  8404. // Do executes the "dlp.organizations.inspectTemplates.patch" call.
  8405. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  8406. // be non-nil. Any non-2xx status code is an error. Response headers are
  8407. // in either
  8408. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  8409. // a response was returned at all) in error.(*googleapi.Error).Header.
  8410. // Use googleapi.IsNotModified to check whether the returned error was
  8411. // because http.StatusNotModified was returned.
  8412. func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  8413. gensupport.SetOptions(c.urlParams_, opts...)
  8414. res, err := c.doRequest("json")
  8415. if res != nil && res.StatusCode == http.StatusNotModified {
  8416. if res.Body != nil {
  8417. res.Body.Close()
  8418. }
  8419. return nil, &googleapi.Error{
  8420. Code: res.StatusCode,
  8421. Header: res.Header,
  8422. }
  8423. }
  8424. if err != nil {
  8425. return nil, err
  8426. }
  8427. defer googleapi.CloseBody(res)
  8428. if err := googleapi.CheckResponse(res); err != nil {
  8429. return nil, err
  8430. }
  8431. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  8432. ServerResponse: googleapi.ServerResponse{
  8433. Header: res.Header,
  8434. HTTPStatusCode: res.StatusCode,
  8435. },
  8436. }
  8437. target := &ret
  8438. if err := gensupport.DecodeResponse(target, res); err != nil {
  8439. return nil, err
  8440. }
  8441. return ret, nil
  8442. // {
  8443. // "description": "Updates the inspect template.",
  8444. // "flatPath": "v2beta2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  8445. // "httpMethod": "PATCH",
  8446. // "id": "dlp.organizations.inspectTemplates.patch",
  8447. // "parameterOrder": [
  8448. // "name"
  8449. // ],
  8450. // "parameters": {
  8451. // "name": {
  8452. // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  8453. // "location": "path",
  8454. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  8455. // "required": true,
  8456. // "type": "string"
  8457. // }
  8458. // },
  8459. // "path": "v2beta2/{+name}",
  8460. // "request": {
  8461. // "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest"
  8462. // },
  8463. // "response": {
  8464. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  8465. // },
  8466. // "scopes": [
  8467. // "https://www.googleapis.com/auth/cloud-platform"
  8468. // ]
  8469. // }
  8470. }
  8471. // method id "dlp.projects.content.deidentify":
  8472. type ProjectsContentDeidentifyCall struct {
  8473. s *Service
  8474. parent string
  8475. googleprivacydlpv2beta2deidentifycontentrequest *GooglePrivacyDlpV2beta2DeidentifyContentRequest
  8476. urlParams_ gensupport.URLParams
  8477. ctx_ context.Context
  8478. header_ http.Header
  8479. }
  8480. // Deidentify: De-identifies potentially sensitive info from a
  8481. // ContentItem.
  8482. // This method has limits on input size and output size.
  8483. // [How-to guide](/dlp/docs/deidentify-sensitive-data)
  8484. func (r *ProjectsContentService) Deidentify(parent string, googleprivacydlpv2beta2deidentifycontentrequest *GooglePrivacyDlpV2beta2DeidentifyContentRequest) *ProjectsContentDeidentifyCall {
  8485. c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8486. c.parent = parent
  8487. c.googleprivacydlpv2beta2deidentifycontentrequest = googleprivacydlpv2beta2deidentifycontentrequest
  8488. return c
  8489. }
  8490. // Fields allows partial responses to be retrieved. See
  8491. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8492. // for more information.
  8493. func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall {
  8494. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8495. return c
  8496. }
  8497. // Context sets the context to be used in this call's Do method. Any
  8498. // pending HTTP request will be aborted if the provided context is
  8499. // canceled.
  8500. func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall {
  8501. c.ctx_ = ctx
  8502. return c
  8503. }
  8504. // Header returns an http.Header that can be modified by the caller to
  8505. // add HTTP headers to the request.
  8506. func (c *ProjectsContentDeidentifyCall) Header() http.Header {
  8507. if c.header_ == nil {
  8508. c.header_ = make(http.Header)
  8509. }
  8510. return c.header_
  8511. }
  8512. func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) {
  8513. reqHeaders := make(http.Header)
  8514. for k, v := range c.header_ {
  8515. reqHeaders[k] = v
  8516. }
  8517. reqHeaders.Set("User-Agent", c.s.userAgent())
  8518. var body io.Reader = nil
  8519. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2deidentifycontentrequest)
  8520. if err != nil {
  8521. return nil, err
  8522. }
  8523. reqHeaders.Set("Content-Type", "application/json")
  8524. c.urlParams_.Set("alt", alt)
  8525. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:deidentify")
  8526. urls += "?" + c.urlParams_.Encode()
  8527. req, _ := http.NewRequest("POST", urls, body)
  8528. req.Header = reqHeaders
  8529. googleapi.Expand(req.URL, map[string]string{
  8530. "parent": c.parent,
  8531. })
  8532. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8533. }
  8534. // Do executes the "dlp.projects.content.deidentify" call.
  8535. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyContentResponse or
  8536. // error will be non-nil. Any non-2xx status code is an error. Response
  8537. // headers are in either
  8538. // *GooglePrivacyDlpV2beta2DeidentifyContentResponse.ServerResponse.Heade
  8539. // r or (if a response was returned at all) in
  8540. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8541. // whether the returned error was because http.StatusNotModified was
  8542. // returned.
  8543. func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyContentResponse, error) {
  8544. gensupport.SetOptions(c.urlParams_, opts...)
  8545. res, err := c.doRequest("json")
  8546. if res != nil && res.StatusCode == http.StatusNotModified {
  8547. if res.Body != nil {
  8548. res.Body.Close()
  8549. }
  8550. return nil, &googleapi.Error{
  8551. Code: res.StatusCode,
  8552. Header: res.Header,
  8553. }
  8554. }
  8555. if err != nil {
  8556. return nil, err
  8557. }
  8558. defer googleapi.CloseBody(res)
  8559. if err := googleapi.CheckResponse(res); err != nil {
  8560. return nil, err
  8561. }
  8562. ret := &GooglePrivacyDlpV2beta2DeidentifyContentResponse{
  8563. ServerResponse: googleapi.ServerResponse{
  8564. Header: res.Header,
  8565. HTTPStatusCode: res.StatusCode,
  8566. },
  8567. }
  8568. target := &ret
  8569. if err := gensupport.DecodeResponse(target, res); err != nil {
  8570. return nil, err
  8571. }
  8572. return ret, nil
  8573. // {
  8574. // "description": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\n[How-to guide](/dlp/docs/deidentify-sensitive-data)",
  8575. // "flatPath": "v2beta2/projects/{projectsId}/content:deidentify",
  8576. // "httpMethod": "POST",
  8577. // "id": "dlp.projects.content.deidentify",
  8578. // "parameterOrder": [
  8579. // "parent"
  8580. // ],
  8581. // "parameters": {
  8582. // "parent": {
  8583. // "description": "The parent resource name, for example projects/my-project-id.",
  8584. // "location": "path",
  8585. // "pattern": "^projects/[^/]+$",
  8586. // "required": true,
  8587. // "type": "string"
  8588. // }
  8589. // },
  8590. // "path": "v2beta2/{+parent}/content:deidentify",
  8591. // "request": {
  8592. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentRequest"
  8593. // },
  8594. // "response": {
  8595. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyContentResponse"
  8596. // },
  8597. // "scopes": [
  8598. // "https://www.googleapis.com/auth/cloud-platform"
  8599. // ]
  8600. // }
  8601. }
  8602. // method id "dlp.projects.content.inspect":
  8603. type ProjectsContentInspectCall struct {
  8604. s *Service
  8605. parent string
  8606. googleprivacydlpv2beta2inspectcontentrequest *GooglePrivacyDlpV2beta2InspectContentRequest
  8607. urlParams_ gensupport.URLParams
  8608. ctx_ context.Context
  8609. header_ http.Header
  8610. }
  8611. // Inspect: Finds potentially sensitive info in content.
  8612. // This method has limits on input size, processing time, and output
  8613. // size.
  8614. // [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide
  8615. // for
  8616. // images](/dlp/docs/inspecting-images)
  8617. func (r *ProjectsContentService) Inspect(parent string, googleprivacydlpv2beta2inspectcontentrequest *GooglePrivacyDlpV2beta2InspectContentRequest) *ProjectsContentInspectCall {
  8618. c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8619. c.parent = parent
  8620. c.googleprivacydlpv2beta2inspectcontentrequest = googleprivacydlpv2beta2inspectcontentrequest
  8621. return c
  8622. }
  8623. // Fields allows partial responses to be retrieved. See
  8624. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8625. // for more information.
  8626. func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall {
  8627. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8628. return c
  8629. }
  8630. // Context sets the context to be used in this call's Do method. Any
  8631. // pending HTTP request will be aborted if the provided context is
  8632. // canceled.
  8633. func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall {
  8634. c.ctx_ = ctx
  8635. return c
  8636. }
  8637. // Header returns an http.Header that can be modified by the caller to
  8638. // add HTTP headers to the request.
  8639. func (c *ProjectsContentInspectCall) Header() http.Header {
  8640. if c.header_ == nil {
  8641. c.header_ = make(http.Header)
  8642. }
  8643. return c.header_
  8644. }
  8645. func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) {
  8646. reqHeaders := make(http.Header)
  8647. for k, v := range c.header_ {
  8648. reqHeaders[k] = v
  8649. }
  8650. reqHeaders.Set("User-Agent", c.s.userAgent())
  8651. var body io.Reader = nil
  8652. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2inspectcontentrequest)
  8653. if err != nil {
  8654. return nil, err
  8655. }
  8656. reqHeaders.Set("Content-Type", "application/json")
  8657. c.urlParams_.Set("alt", alt)
  8658. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:inspect")
  8659. urls += "?" + c.urlParams_.Encode()
  8660. req, _ := http.NewRequest("POST", urls, body)
  8661. req.Header = reqHeaders
  8662. googleapi.Expand(req.URL, map[string]string{
  8663. "parent": c.parent,
  8664. })
  8665. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8666. }
  8667. // Do executes the "dlp.projects.content.inspect" call.
  8668. // Exactly one of *GooglePrivacyDlpV2beta2InspectContentResponse or
  8669. // error will be non-nil. Any non-2xx status code is an error. Response
  8670. // headers are in either
  8671. // *GooglePrivacyDlpV2beta2InspectContentResponse.ServerResponse.Header
  8672. // or (if a response was returned at all) in
  8673. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8674. // whether the returned error was because http.StatusNotModified was
  8675. // returned.
  8676. func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectContentResponse, error) {
  8677. gensupport.SetOptions(c.urlParams_, opts...)
  8678. res, err := c.doRequest("json")
  8679. if res != nil && res.StatusCode == http.StatusNotModified {
  8680. if res.Body != nil {
  8681. res.Body.Close()
  8682. }
  8683. return nil, &googleapi.Error{
  8684. Code: res.StatusCode,
  8685. Header: res.Header,
  8686. }
  8687. }
  8688. if err != nil {
  8689. return nil, err
  8690. }
  8691. defer googleapi.CloseBody(res)
  8692. if err := googleapi.CheckResponse(res); err != nil {
  8693. return nil, err
  8694. }
  8695. ret := &GooglePrivacyDlpV2beta2InspectContentResponse{
  8696. ServerResponse: googleapi.ServerResponse{
  8697. Header: res.Header,
  8698. HTTPStatusCode: res.StatusCode,
  8699. },
  8700. }
  8701. target := &ret
  8702. if err := gensupport.DecodeResponse(target, res); err != nil {
  8703. return nil, err
  8704. }
  8705. return ret, nil
  8706. // {
  8707. // "description": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n[How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for\nimages](/dlp/docs/inspecting-images)",
  8708. // "flatPath": "v2beta2/projects/{projectsId}/content:inspect",
  8709. // "httpMethod": "POST",
  8710. // "id": "dlp.projects.content.inspect",
  8711. // "parameterOrder": [
  8712. // "parent"
  8713. // ],
  8714. // "parameters": {
  8715. // "parent": {
  8716. // "description": "The parent resource name, for example projects/my-project-id.",
  8717. // "location": "path",
  8718. // "pattern": "^projects/[^/]+$",
  8719. // "required": true,
  8720. // "type": "string"
  8721. // }
  8722. // },
  8723. // "path": "v2beta2/{+parent}/content:inspect",
  8724. // "request": {
  8725. // "$ref": "GooglePrivacyDlpV2beta2InspectContentRequest"
  8726. // },
  8727. // "response": {
  8728. // "$ref": "GooglePrivacyDlpV2beta2InspectContentResponse"
  8729. // },
  8730. // "scopes": [
  8731. // "https://www.googleapis.com/auth/cloud-platform"
  8732. // ]
  8733. // }
  8734. }
  8735. // method id "dlp.projects.content.reidentify":
  8736. type ProjectsContentReidentifyCall struct {
  8737. s *Service
  8738. parent string
  8739. googleprivacydlpv2beta2reidentifycontentrequest *GooglePrivacyDlpV2beta2ReidentifyContentRequest
  8740. urlParams_ gensupport.URLParams
  8741. ctx_ context.Context
  8742. header_ http.Header
  8743. }
  8744. // Reidentify: Re-identify content that has been de-identified.
  8745. func (r *ProjectsContentService) Reidentify(parent string, googleprivacydlpv2beta2reidentifycontentrequest *GooglePrivacyDlpV2beta2ReidentifyContentRequest) *ProjectsContentReidentifyCall {
  8746. c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8747. c.parent = parent
  8748. c.googleprivacydlpv2beta2reidentifycontentrequest = googleprivacydlpv2beta2reidentifycontentrequest
  8749. return c
  8750. }
  8751. // Fields allows partial responses to be retrieved. See
  8752. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8753. // for more information.
  8754. func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall {
  8755. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8756. return c
  8757. }
  8758. // Context sets the context to be used in this call's Do method. Any
  8759. // pending HTTP request will be aborted if the provided context is
  8760. // canceled.
  8761. func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall {
  8762. c.ctx_ = ctx
  8763. return c
  8764. }
  8765. // Header returns an http.Header that can be modified by the caller to
  8766. // add HTTP headers to the request.
  8767. func (c *ProjectsContentReidentifyCall) Header() http.Header {
  8768. if c.header_ == nil {
  8769. c.header_ = make(http.Header)
  8770. }
  8771. return c.header_
  8772. }
  8773. func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) {
  8774. reqHeaders := make(http.Header)
  8775. for k, v := range c.header_ {
  8776. reqHeaders[k] = v
  8777. }
  8778. reqHeaders.Set("User-Agent", c.s.userAgent())
  8779. var body io.Reader = nil
  8780. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2reidentifycontentrequest)
  8781. if err != nil {
  8782. return nil, err
  8783. }
  8784. reqHeaders.Set("Content-Type", "application/json")
  8785. c.urlParams_.Set("alt", alt)
  8786. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/content:reidentify")
  8787. urls += "?" + c.urlParams_.Encode()
  8788. req, _ := http.NewRequest("POST", urls, body)
  8789. req.Header = reqHeaders
  8790. googleapi.Expand(req.URL, map[string]string{
  8791. "parent": c.parent,
  8792. })
  8793. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8794. }
  8795. // Do executes the "dlp.projects.content.reidentify" call.
  8796. // Exactly one of *GooglePrivacyDlpV2beta2ReidentifyContentResponse or
  8797. // error will be non-nil. Any non-2xx status code is an error. Response
  8798. // headers are in either
  8799. // *GooglePrivacyDlpV2beta2ReidentifyContentResponse.ServerResponse.Heade
  8800. // r or (if a response was returned at all) in
  8801. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8802. // whether the returned error was because http.StatusNotModified was
  8803. // returned.
  8804. func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ReidentifyContentResponse, error) {
  8805. gensupport.SetOptions(c.urlParams_, opts...)
  8806. res, err := c.doRequest("json")
  8807. if res != nil && res.StatusCode == http.StatusNotModified {
  8808. if res.Body != nil {
  8809. res.Body.Close()
  8810. }
  8811. return nil, &googleapi.Error{
  8812. Code: res.StatusCode,
  8813. Header: res.Header,
  8814. }
  8815. }
  8816. if err != nil {
  8817. return nil, err
  8818. }
  8819. defer googleapi.CloseBody(res)
  8820. if err := googleapi.CheckResponse(res); err != nil {
  8821. return nil, err
  8822. }
  8823. ret := &GooglePrivacyDlpV2beta2ReidentifyContentResponse{
  8824. ServerResponse: googleapi.ServerResponse{
  8825. Header: res.Header,
  8826. HTTPStatusCode: res.StatusCode,
  8827. },
  8828. }
  8829. target := &ret
  8830. if err := gensupport.DecodeResponse(target, res); err != nil {
  8831. return nil, err
  8832. }
  8833. return ret, nil
  8834. // {
  8835. // "description": "Re-identify content that has been de-identified.",
  8836. // "flatPath": "v2beta2/projects/{projectsId}/content:reidentify",
  8837. // "httpMethod": "POST",
  8838. // "id": "dlp.projects.content.reidentify",
  8839. // "parameterOrder": [
  8840. // "parent"
  8841. // ],
  8842. // "parameters": {
  8843. // "parent": {
  8844. // "description": "The parent resource name.",
  8845. // "location": "path",
  8846. // "pattern": "^projects/[^/]+$",
  8847. // "required": true,
  8848. // "type": "string"
  8849. // }
  8850. // },
  8851. // "path": "v2beta2/{+parent}/content:reidentify",
  8852. // "request": {
  8853. // "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentRequest"
  8854. // },
  8855. // "response": {
  8856. // "$ref": "GooglePrivacyDlpV2beta2ReidentifyContentResponse"
  8857. // },
  8858. // "scopes": [
  8859. // "https://www.googleapis.com/auth/cloud-platform"
  8860. // ]
  8861. // }
  8862. }
  8863. // method id "dlp.projects.dataSource.analyze":
  8864. type ProjectsDataSourceAnalyzeCall struct {
  8865. s *Service
  8866. parent string
  8867. googleprivacydlpv2beta2analyzedatasourceriskrequest *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest
  8868. urlParams_ gensupport.URLParams
  8869. ctx_ context.Context
  8870. header_ http.Header
  8871. }
  8872. // Analyze: Schedules a job to compute risk analysis metrics over
  8873. // content in a Google
  8874. // Cloud Platform repository. [How-to
  8875. // guide](/dlp/docs/compute-risk-analysis)
  8876. func (r *ProjectsDataSourceService) Analyze(parent string, googleprivacydlpv2beta2analyzedatasourceriskrequest *GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest) *ProjectsDataSourceAnalyzeCall {
  8877. c := &ProjectsDataSourceAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8878. c.parent = parent
  8879. c.googleprivacydlpv2beta2analyzedatasourceriskrequest = googleprivacydlpv2beta2analyzedatasourceriskrequest
  8880. return c
  8881. }
  8882. // Fields allows partial responses to be retrieved. See
  8883. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8884. // for more information.
  8885. func (c *ProjectsDataSourceAnalyzeCall) Fields(s ...googleapi.Field) *ProjectsDataSourceAnalyzeCall {
  8886. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8887. return c
  8888. }
  8889. // Context sets the context to be used in this call's Do method. Any
  8890. // pending HTTP request will be aborted if the provided context is
  8891. // canceled.
  8892. func (c *ProjectsDataSourceAnalyzeCall) Context(ctx context.Context) *ProjectsDataSourceAnalyzeCall {
  8893. c.ctx_ = ctx
  8894. return c
  8895. }
  8896. // Header returns an http.Header that can be modified by the caller to
  8897. // add HTTP headers to the request.
  8898. func (c *ProjectsDataSourceAnalyzeCall) Header() http.Header {
  8899. if c.header_ == nil {
  8900. c.header_ = make(http.Header)
  8901. }
  8902. return c.header_
  8903. }
  8904. func (c *ProjectsDataSourceAnalyzeCall) doRequest(alt string) (*http.Response, error) {
  8905. reqHeaders := make(http.Header)
  8906. for k, v := range c.header_ {
  8907. reqHeaders[k] = v
  8908. }
  8909. reqHeaders.Set("User-Agent", c.s.userAgent())
  8910. var body io.Reader = nil
  8911. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2analyzedatasourceriskrequest)
  8912. if err != nil {
  8913. return nil, err
  8914. }
  8915. reqHeaders.Set("Content-Type", "application/json")
  8916. c.urlParams_.Set("alt", alt)
  8917. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/dataSource:analyze")
  8918. urls += "?" + c.urlParams_.Encode()
  8919. req, _ := http.NewRequest("POST", urls, body)
  8920. req.Header = reqHeaders
  8921. googleapi.Expand(req.URL, map[string]string{
  8922. "parent": c.parent,
  8923. })
  8924. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8925. }
  8926. // Do executes the "dlp.projects.dataSource.analyze" call.
  8927. // Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be
  8928. // non-nil. Any non-2xx status code is an error. Response headers are in
  8929. // either *GooglePrivacyDlpV2beta2DlpJob.ServerResponse.Header or (if a
  8930. // response was returned at all) in error.(*googleapi.Error).Header. Use
  8931. // googleapi.IsNotModified to check whether the returned error was
  8932. // because http.StatusNotModified was returned.
  8933. func (c *ProjectsDataSourceAnalyzeCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, error) {
  8934. gensupport.SetOptions(c.urlParams_, opts...)
  8935. res, err := c.doRequest("json")
  8936. if res != nil && res.StatusCode == http.StatusNotModified {
  8937. if res.Body != nil {
  8938. res.Body.Close()
  8939. }
  8940. return nil, &googleapi.Error{
  8941. Code: res.StatusCode,
  8942. Header: res.Header,
  8943. }
  8944. }
  8945. if err != nil {
  8946. return nil, err
  8947. }
  8948. defer googleapi.CloseBody(res)
  8949. if err := googleapi.CheckResponse(res); err != nil {
  8950. return nil, err
  8951. }
  8952. ret := &GooglePrivacyDlpV2beta2DlpJob{
  8953. ServerResponse: googleapi.ServerResponse{
  8954. Header: res.Header,
  8955. HTTPStatusCode: res.StatusCode,
  8956. },
  8957. }
  8958. target := &ret
  8959. if err := gensupport.DecodeResponse(target, res); err != nil {
  8960. return nil, err
  8961. }
  8962. return ret, nil
  8963. // {
  8964. // "description": "Schedules a job to compute risk analysis metrics over content in a Google\nCloud Platform repository. [How-to guide](/dlp/docs/compute-risk-analysis)",
  8965. // "flatPath": "v2beta2/projects/{projectsId}/dataSource:analyze",
  8966. // "httpMethod": "POST",
  8967. // "id": "dlp.projects.dataSource.analyze",
  8968. // "parameterOrder": [
  8969. // "parent"
  8970. // ],
  8971. // "parameters": {
  8972. // "parent": {
  8973. // "description": "The parent resource name, for example projects/my-project-id.",
  8974. // "location": "path",
  8975. // "pattern": "^projects/[^/]+$",
  8976. // "required": true,
  8977. // "type": "string"
  8978. // }
  8979. // },
  8980. // "path": "v2beta2/{+parent}/dataSource:analyze",
  8981. // "request": {
  8982. // "$ref": "GooglePrivacyDlpV2beta2AnalyzeDataSourceRiskRequest"
  8983. // },
  8984. // "response": {
  8985. // "$ref": "GooglePrivacyDlpV2beta2DlpJob"
  8986. // },
  8987. // "scopes": [
  8988. // "https://www.googleapis.com/auth/cloud-platform"
  8989. // ]
  8990. // }
  8991. }
  8992. // method id "dlp.projects.dataSource.inspect":
  8993. type ProjectsDataSourceInspectCall struct {
  8994. s *Service
  8995. parent string
  8996. googleprivacydlpv2beta2inspectdatasourcerequest *GooglePrivacyDlpV2beta2InspectDataSourceRequest
  8997. urlParams_ gensupport.URLParams
  8998. ctx_ context.Context
  8999. header_ http.Header
  9000. }
  9001. // Inspect: Schedules a job scanning content in a Google Cloud Platform
  9002. // data
  9003. // repository. [How-to guide](/dlp/docs/inspecting-storage)
  9004. func (r *ProjectsDataSourceService) Inspect(parent string, googleprivacydlpv2beta2inspectdatasourcerequest *GooglePrivacyDlpV2beta2InspectDataSourceRequest) *ProjectsDataSourceInspectCall {
  9005. c := &ProjectsDataSourceInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9006. c.parent = parent
  9007. c.googleprivacydlpv2beta2inspectdatasourcerequest = googleprivacydlpv2beta2inspectdatasourcerequest
  9008. return c
  9009. }
  9010. // Fields allows partial responses to be retrieved. See
  9011. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9012. // for more information.
  9013. func (c *ProjectsDataSourceInspectCall) Fields(s ...googleapi.Field) *ProjectsDataSourceInspectCall {
  9014. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9015. return c
  9016. }
  9017. // Context sets the context to be used in this call's Do method. Any
  9018. // pending HTTP request will be aborted if the provided context is
  9019. // canceled.
  9020. func (c *ProjectsDataSourceInspectCall) Context(ctx context.Context) *ProjectsDataSourceInspectCall {
  9021. c.ctx_ = ctx
  9022. return c
  9023. }
  9024. // Header returns an http.Header that can be modified by the caller to
  9025. // add HTTP headers to the request.
  9026. func (c *ProjectsDataSourceInspectCall) Header() http.Header {
  9027. if c.header_ == nil {
  9028. c.header_ = make(http.Header)
  9029. }
  9030. return c.header_
  9031. }
  9032. func (c *ProjectsDataSourceInspectCall) doRequest(alt string) (*http.Response, error) {
  9033. reqHeaders := make(http.Header)
  9034. for k, v := range c.header_ {
  9035. reqHeaders[k] = v
  9036. }
  9037. reqHeaders.Set("User-Agent", c.s.userAgent())
  9038. var body io.Reader = nil
  9039. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2inspectdatasourcerequest)
  9040. if err != nil {
  9041. return nil, err
  9042. }
  9043. reqHeaders.Set("Content-Type", "application/json")
  9044. c.urlParams_.Set("alt", alt)
  9045. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/dataSource:inspect")
  9046. urls += "?" + c.urlParams_.Encode()
  9047. req, _ := http.NewRequest("POST", urls, body)
  9048. req.Header = reqHeaders
  9049. googleapi.Expand(req.URL, map[string]string{
  9050. "parent": c.parent,
  9051. })
  9052. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9053. }
  9054. // Do executes the "dlp.projects.dataSource.inspect" call.
  9055. // Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be
  9056. // non-nil. Any non-2xx status code is an error. Response headers are in
  9057. // either *GooglePrivacyDlpV2beta2DlpJob.ServerResponse.Header or (if a
  9058. // response was returned at all) in error.(*googleapi.Error).Header. Use
  9059. // googleapi.IsNotModified to check whether the returned error was
  9060. // because http.StatusNotModified was returned.
  9061. func (c *ProjectsDataSourceInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, error) {
  9062. gensupport.SetOptions(c.urlParams_, opts...)
  9063. res, err := c.doRequest("json")
  9064. if res != nil && res.StatusCode == http.StatusNotModified {
  9065. if res.Body != nil {
  9066. res.Body.Close()
  9067. }
  9068. return nil, &googleapi.Error{
  9069. Code: res.StatusCode,
  9070. Header: res.Header,
  9071. }
  9072. }
  9073. if err != nil {
  9074. return nil, err
  9075. }
  9076. defer googleapi.CloseBody(res)
  9077. if err := googleapi.CheckResponse(res); err != nil {
  9078. return nil, err
  9079. }
  9080. ret := &GooglePrivacyDlpV2beta2DlpJob{
  9081. ServerResponse: googleapi.ServerResponse{
  9082. Header: res.Header,
  9083. HTTPStatusCode: res.StatusCode,
  9084. },
  9085. }
  9086. target := &ret
  9087. if err := gensupport.DecodeResponse(target, res); err != nil {
  9088. return nil, err
  9089. }
  9090. return ret, nil
  9091. // {
  9092. // "description": "Schedules a job scanning content in a Google Cloud Platform data\nrepository. [How-to guide](/dlp/docs/inspecting-storage)",
  9093. // "flatPath": "v2beta2/projects/{projectsId}/dataSource:inspect",
  9094. // "httpMethod": "POST",
  9095. // "id": "dlp.projects.dataSource.inspect",
  9096. // "parameterOrder": [
  9097. // "parent"
  9098. // ],
  9099. // "parameters": {
  9100. // "parent": {
  9101. // "description": "The parent resource name, for example projects/my-project-id.",
  9102. // "location": "path",
  9103. // "pattern": "^projects/[^/]+$",
  9104. // "required": true,
  9105. // "type": "string"
  9106. // }
  9107. // },
  9108. // "path": "v2beta2/{+parent}/dataSource:inspect",
  9109. // "request": {
  9110. // "$ref": "GooglePrivacyDlpV2beta2InspectDataSourceRequest"
  9111. // },
  9112. // "response": {
  9113. // "$ref": "GooglePrivacyDlpV2beta2DlpJob"
  9114. // },
  9115. // "scopes": [
  9116. // "https://www.googleapis.com/auth/cloud-platform"
  9117. // ]
  9118. // }
  9119. }
  9120. // method id "dlp.projects.deidentifyTemplates.create":
  9121. type ProjectsDeidentifyTemplatesCreateCall struct {
  9122. s *Service
  9123. parent string
  9124. googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest
  9125. urlParams_ gensupport.URLParams
  9126. ctx_ context.Context
  9127. header_ http.Header
  9128. }
  9129. // Create: Creates an Deidentify template for re-using frequently used
  9130. // configuration
  9131. // for Deidentifying content, images, and storage.
  9132. func (r *ProjectsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2beta2createdeidentifytemplaterequest *GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall {
  9133. c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9134. c.parent = parent
  9135. c.googleprivacydlpv2beta2createdeidentifytemplaterequest = googleprivacydlpv2beta2createdeidentifytemplaterequest
  9136. return c
  9137. }
  9138. // Fields allows partial responses to be retrieved. See
  9139. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9140. // for more information.
  9141. func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall {
  9142. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9143. return c
  9144. }
  9145. // Context sets the context to be used in this call's Do method. Any
  9146. // pending HTTP request will be aborted if the provided context is
  9147. // canceled.
  9148. func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall {
  9149. c.ctx_ = ctx
  9150. return c
  9151. }
  9152. // Header returns an http.Header that can be modified by the caller to
  9153. // add HTTP headers to the request.
  9154. func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header {
  9155. if c.header_ == nil {
  9156. c.header_ = make(http.Header)
  9157. }
  9158. return c.header_
  9159. }
  9160. func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  9161. reqHeaders := make(http.Header)
  9162. for k, v := range c.header_ {
  9163. reqHeaders[k] = v
  9164. }
  9165. reqHeaders.Set("User-Agent", c.s.userAgent())
  9166. var body io.Reader = nil
  9167. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2createdeidentifytemplaterequest)
  9168. if err != nil {
  9169. return nil, err
  9170. }
  9171. reqHeaders.Set("Content-Type", "application/json")
  9172. c.urlParams_.Set("alt", alt)
  9173. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates")
  9174. urls += "?" + c.urlParams_.Encode()
  9175. req, _ := http.NewRequest("POST", urls, body)
  9176. req.Header = reqHeaders
  9177. googleapi.Expand(req.URL, map[string]string{
  9178. "parent": c.parent,
  9179. })
  9180. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9181. }
  9182. // Do executes the "dlp.projects.deidentifyTemplates.create" call.
  9183. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  9184. // will be non-nil. Any non-2xx status code is an error. Response
  9185. // headers are in either
  9186. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  9187. // (if a response was returned at all) in
  9188. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9189. // whether the returned error was because http.StatusNotModified was
  9190. // returned.
  9191. func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  9192. gensupport.SetOptions(c.urlParams_, opts...)
  9193. res, err := c.doRequest("json")
  9194. if res != nil && res.StatusCode == http.StatusNotModified {
  9195. if res.Body != nil {
  9196. res.Body.Close()
  9197. }
  9198. return nil, &googleapi.Error{
  9199. Code: res.StatusCode,
  9200. Header: res.Header,
  9201. }
  9202. }
  9203. if err != nil {
  9204. return nil, err
  9205. }
  9206. defer googleapi.CloseBody(res)
  9207. if err := googleapi.CheckResponse(res); err != nil {
  9208. return nil, err
  9209. }
  9210. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  9211. ServerResponse: googleapi.ServerResponse{
  9212. Header: res.Header,
  9213. HTTPStatusCode: res.StatusCode,
  9214. },
  9215. }
  9216. target := &ret
  9217. if err := gensupport.DecodeResponse(target, res); err != nil {
  9218. return nil, err
  9219. }
  9220. return ret, nil
  9221. // {
  9222. // "description": "Creates an Deidentify template for re-using frequently used configuration\nfor Deidentifying content, images, and storage.",
  9223. // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates",
  9224. // "httpMethod": "POST",
  9225. // "id": "dlp.projects.deidentifyTemplates.create",
  9226. // "parameterOrder": [
  9227. // "parent"
  9228. // ],
  9229. // "parameters": {
  9230. // "parent": {
  9231. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  9232. // "location": "path",
  9233. // "pattern": "^projects/[^/]+$",
  9234. // "required": true,
  9235. // "type": "string"
  9236. // }
  9237. // },
  9238. // "path": "v2beta2/{+parent}/deidentifyTemplates",
  9239. // "request": {
  9240. // "$ref": "GooglePrivacyDlpV2beta2CreateDeidentifyTemplateRequest"
  9241. // },
  9242. // "response": {
  9243. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  9244. // },
  9245. // "scopes": [
  9246. // "https://www.googleapis.com/auth/cloud-platform"
  9247. // ]
  9248. // }
  9249. }
  9250. // method id "dlp.projects.deidentifyTemplates.delete":
  9251. type ProjectsDeidentifyTemplatesDeleteCall struct {
  9252. s *Service
  9253. name string
  9254. urlParams_ gensupport.URLParams
  9255. ctx_ context.Context
  9256. header_ http.Header
  9257. }
  9258. // Delete: Deletes inspect templates.
  9259. func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall {
  9260. c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9261. c.name = name
  9262. return c
  9263. }
  9264. // Fields allows partial responses to be retrieved. See
  9265. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9266. // for more information.
  9267. func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall {
  9268. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9269. return c
  9270. }
  9271. // Context sets the context to be used in this call's Do method. Any
  9272. // pending HTTP request will be aborted if the provided context is
  9273. // canceled.
  9274. func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall {
  9275. c.ctx_ = ctx
  9276. return c
  9277. }
  9278. // Header returns an http.Header that can be modified by the caller to
  9279. // add HTTP headers to the request.
  9280. func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header {
  9281. if c.header_ == nil {
  9282. c.header_ = make(http.Header)
  9283. }
  9284. return c.header_
  9285. }
  9286. func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9287. reqHeaders := make(http.Header)
  9288. for k, v := range c.header_ {
  9289. reqHeaders[k] = v
  9290. }
  9291. reqHeaders.Set("User-Agent", c.s.userAgent())
  9292. var body io.Reader = nil
  9293. c.urlParams_.Set("alt", alt)
  9294. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  9295. urls += "?" + c.urlParams_.Encode()
  9296. req, _ := http.NewRequest("DELETE", urls, body)
  9297. req.Header = reqHeaders
  9298. googleapi.Expand(req.URL, map[string]string{
  9299. "name": c.name,
  9300. })
  9301. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9302. }
  9303. // Do executes the "dlp.projects.deidentifyTemplates.delete" call.
  9304. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  9305. // non-2xx status code is an error. Response headers are in either
  9306. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  9307. // returned at all) in error.(*googleapi.Error).Header. Use
  9308. // googleapi.IsNotModified to check whether the returned error was
  9309. // because http.StatusNotModified was returned.
  9310. func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  9311. gensupport.SetOptions(c.urlParams_, opts...)
  9312. res, err := c.doRequest("json")
  9313. if res != nil && res.StatusCode == http.StatusNotModified {
  9314. if res.Body != nil {
  9315. res.Body.Close()
  9316. }
  9317. return nil, &googleapi.Error{
  9318. Code: res.StatusCode,
  9319. Header: res.Header,
  9320. }
  9321. }
  9322. if err != nil {
  9323. return nil, err
  9324. }
  9325. defer googleapi.CloseBody(res)
  9326. if err := googleapi.CheckResponse(res); err != nil {
  9327. return nil, err
  9328. }
  9329. ret := &GoogleProtobufEmpty{
  9330. ServerResponse: googleapi.ServerResponse{
  9331. Header: res.Header,
  9332. HTTPStatusCode: res.StatusCode,
  9333. },
  9334. }
  9335. target := &ret
  9336. if err := gensupport.DecodeResponse(target, res); err != nil {
  9337. return nil, err
  9338. }
  9339. return ret, nil
  9340. // {
  9341. // "description": "Deletes inspect templates.",
  9342. // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  9343. // "httpMethod": "DELETE",
  9344. // "id": "dlp.projects.deidentifyTemplates.delete",
  9345. // "parameterOrder": [
  9346. // "name"
  9347. // ],
  9348. // "parameters": {
  9349. // "name": {
  9350. // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  9351. // "location": "path",
  9352. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  9353. // "required": true,
  9354. // "type": "string"
  9355. // }
  9356. // },
  9357. // "path": "v2beta2/{+name}",
  9358. // "response": {
  9359. // "$ref": "GoogleProtobufEmpty"
  9360. // },
  9361. // "scopes": [
  9362. // "https://www.googleapis.com/auth/cloud-platform"
  9363. // ]
  9364. // }
  9365. }
  9366. // method id "dlp.projects.deidentifyTemplates.get":
  9367. type ProjectsDeidentifyTemplatesGetCall struct {
  9368. s *Service
  9369. name string
  9370. urlParams_ gensupport.URLParams
  9371. ifNoneMatch_ string
  9372. ctx_ context.Context
  9373. header_ http.Header
  9374. }
  9375. // Get: Gets an inspect template.
  9376. func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall {
  9377. c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9378. c.name = name
  9379. return c
  9380. }
  9381. // Fields allows partial responses to be retrieved. See
  9382. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9383. // for more information.
  9384. func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall {
  9385. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9386. return c
  9387. }
  9388. // IfNoneMatch sets the optional parameter which makes the operation
  9389. // fail if the object's ETag matches the given value. This is useful for
  9390. // getting updates only after the object has changed since the last
  9391. // request. Use googleapi.IsNotModified to check whether the response
  9392. // error from Do is the result of In-None-Match.
  9393. func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall {
  9394. c.ifNoneMatch_ = entityTag
  9395. return c
  9396. }
  9397. // Context sets the context to be used in this call's Do method. Any
  9398. // pending HTTP request will be aborted if the provided context is
  9399. // canceled.
  9400. func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall {
  9401. c.ctx_ = ctx
  9402. return c
  9403. }
  9404. // Header returns an http.Header that can be modified by the caller to
  9405. // add HTTP headers to the request.
  9406. func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header {
  9407. if c.header_ == nil {
  9408. c.header_ = make(http.Header)
  9409. }
  9410. return c.header_
  9411. }
  9412. func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  9413. reqHeaders := make(http.Header)
  9414. for k, v := range c.header_ {
  9415. reqHeaders[k] = v
  9416. }
  9417. reqHeaders.Set("User-Agent", c.s.userAgent())
  9418. if c.ifNoneMatch_ != "" {
  9419. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9420. }
  9421. var body io.Reader = nil
  9422. c.urlParams_.Set("alt", alt)
  9423. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  9424. urls += "?" + c.urlParams_.Encode()
  9425. req, _ := http.NewRequest("GET", urls, body)
  9426. req.Header = reqHeaders
  9427. googleapi.Expand(req.URL, map[string]string{
  9428. "name": c.name,
  9429. })
  9430. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9431. }
  9432. // Do executes the "dlp.projects.deidentifyTemplates.get" call.
  9433. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  9434. // will be non-nil. Any non-2xx status code is an error. Response
  9435. // headers are in either
  9436. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  9437. // (if a response was returned at all) in
  9438. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9439. // whether the returned error was because http.StatusNotModified was
  9440. // returned.
  9441. func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  9442. gensupport.SetOptions(c.urlParams_, opts...)
  9443. res, err := c.doRequest("json")
  9444. if res != nil && res.StatusCode == http.StatusNotModified {
  9445. if res.Body != nil {
  9446. res.Body.Close()
  9447. }
  9448. return nil, &googleapi.Error{
  9449. Code: res.StatusCode,
  9450. Header: res.Header,
  9451. }
  9452. }
  9453. if err != nil {
  9454. return nil, err
  9455. }
  9456. defer googleapi.CloseBody(res)
  9457. if err := googleapi.CheckResponse(res); err != nil {
  9458. return nil, err
  9459. }
  9460. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  9461. ServerResponse: googleapi.ServerResponse{
  9462. Header: res.Header,
  9463. HTTPStatusCode: res.StatusCode,
  9464. },
  9465. }
  9466. target := &ret
  9467. if err := gensupport.DecodeResponse(target, res); err != nil {
  9468. return nil, err
  9469. }
  9470. return ret, nil
  9471. // {
  9472. // "description": "Gets an inspect template.",
  9473. // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  9474. // "httpMethod": "GET",
  9475. // "id": "dlp.projects.deidentifyTemplates.get",
  9476. // "parameterOrder": [
  9477. // "name"
  9478. // ],
  9479. // "parameters": {
  9480. // "name": {
  9481. // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  9482. // "location": "path",
  9483. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  9484. // "required": true,
  9485. // "type": "string"
  9486. // }
  9487. // },
  9488. // "path": "v2beta2/{+name}",
  9489. // "response": {
  9490. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  9491. // },
  9492. // "scopes": [
  9493. // "https://www.googleapis.com/auth/cloud-platform"
  9494. // ]
  9495. // }
  9496. }
  9497. // method id "dlp.projects.deidentifyTemplates.list":
  9498. type ProjectsDeidentifyTemplatesListCall struct {
  9499. s *Service
  9500. parent string
  9501. urlParams_ gensupport.URLParams
  9502. ifNoneMatch_ string
  9503. ctx_ context.Context
  9504. header_ http.Header
  9505. }
  9506. // List: Lists inspect templates.
  9507. func (r *ProjectsDeidentifyTemplatesService) List(parent string) *ProjectsDeidentifyTemplatesListCall {
  9508. c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9509. c.parent = parent
  9510. return c
  9511. }
  9512. // PageSize sets the optional parameter "pageSize": Optional size of the
  9513. // page, can be limited by server. If zero server returns
  9514. // a page of max size 100.
  9515. func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall {
  9516. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9517. return c
  9518. }
  9519. // PageToken sets the optional parameter "pageToken": Optional page
  9520. // token to continue retrieval. Comes from previous call
  9521. // to `ListDeidentifyTemplates`.
  9522. func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall {
  9523. c.urlParams_.Set("pageToken", pageToken)
  9524. return c
  9525. }
  9526. // Fields allows partial responses to be retrieved. See
  9527. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9528. // for more information.
  9529. func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall {
  9530. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9531. return c
  9532. }
  9533. // IfNoneMatch sets the optional parameter which makes the operation
  9534. // fail if the object's ETag matches the given value. This is useful for
  9535. // getting updates only after the object has changed since the last
  9536. // request. Use googleapi.IsNotModified to check whether the response
  9537. // error from Do is the result of In-None-Match.
  9538. func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall {
  9539. c.ifNoneMatch_ = entityTag
  9540. return c
  9541. }
  9542. // Context sets the context to be used in this call's Do method. Any
  9543. // pending HTTP request will be aborted if the provided context is
  9544. // canceled.
  9545. func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall {
  9546. c.ctx_ = ctx
  9547. return c
  9548. }
  9549. // Header returns an http.Header that can be modified by the caller to
  9550. // add HTTP headers to the request.
  9551. func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header {
  9552. if c.header_ == nil {
  9553. c.header_ = make(http.Header)
  9554. }
  9555. return c.header_
  9556. }
  9557. func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  9558. reqHeaders := make(http.Header)
  9559. for k, v := range c.header_ {
  9560. reqHeaders[k] = v
  9561. }
  9562. reqHeaders.Set("User-Agent", c.s.userAgent())
  9563. if c.ifNoneMatch_ != "" {
  9564. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9565. }
  9566. var body io.Reader = nil
  9567. c.urlParams_.Set("alt", alt)
  9568. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/deidentifyTemplates")
  9569. urls += "?" + c.urlParams_.Encode()
  9570. req, _ := http.NewRequest("GET", urls, body)
  9571. req.Header = reqHeaders
  9572. googleapi.Expand(req.URL, map[string]string{
  9573. "parent": c.parent,
  9574. })
  9575. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9576. }
  9577. // Do executes the "dlp.projects.deidentifyTemplates.list" call.
  9578. // Exactly one of
  9579. // *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse or error will
  9580. // be non-nil. Any non-2xx status code is an error. Response headers are
  9581. // in either
  9582. // *GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse.ServerResponse
  9583. // .Header or (if a response was returned at all) in
  9584. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9585. // whether the returned error was because http.StatusNotModified was
  9586. // returned.
  9587. func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse, error) {
  9588. gensupport.SetOptions(c.urlParams_, opts...)
  9589. res, err := c.doRequest("json")
  9590. if res != nil && res.StatusCode == http.StatusNotModified {
  9591. if res.Body != nil {
  9592. res.Body.Close()
  9593. }
  9594. return nil, &googleapi.Error{
  9595. Code: res.StatusCode,
  9596. Header: res.Header,
  9597. }
  9598. }
  9599. if err != nil {
  9600. return nil, err
  9601. }
  9602. defer googleapi.CloseBody(res)
  9603. if err := googleapi.CheckResponse(res); err != nil {
  9604. return nil, err
  9605. }
  9606. ret := &GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse{
  9607. ServerResponse: googleapi.ServerResponse{
  9608. Header: res.Header,
  9609. HTTPStatusCode: res.StatusCode,
  9610. },
  9611. }
  9612. target := &ret
  9613. if err := gensupport.DecodeResponse(target, res); err != nil {
  9614. return nil, err
  9615. }
  9616. return ret, nil
  9617. // {
  9618. // "description": "Lists inspect templates.",
  9619. // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates",
  9620. // "httpMethod": "GET",
  9621. // "id": "dlp.projects.deidentifyTemplates.list",
  9622. // "parameterOrder": [
  9623. // "parent"
  9624. // ],
  9625. // "parameters": {
  9626. // "pageSize": {
  9627. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  9628. // "format": "int32",
  9629. // "location": "query",
  9630. // "type": "integer"
  9631. // },
  9632. // "pageToken": {
  9633. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.",
  9634. // "location": "query",
  9635. // "type": "string"
  9636. // },
  9637. // "parent": {
  9638. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  9639. // "location": "path",
  9640. // "pattern": "^projects/[^/]+$",
  9641. // "required": true,
  9642. // "type": "string"
  9643. // }
  9644. // },
  9645. // "path": "v2beta2/{+parent}/deidentifyTemplates",
  9646. // "response": {
  9647. // "$ref": "GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse"
  9648. // },
  9649. // "scopes": [
  9650. // "https://www.googleapis.com/auth/cloud-platform"
  9651. // ]
  9652. // }
  9653. }
  9654. // Pages invokes f for each page of results.
  9655. // A non-nil error returned from f will halt the iteration.
  9656. // The provided context supersedes any context provided to the Context method.
  9657. func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDeidentifyTemplatesResponse) error) error {
  9658. c.ctx_ = ctx
  9659. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9660. for {
  9661. x, err := c.Do()
  9662. if err != nil {
  9663. return err
  9664. }
  9665. if err := f(x); err != nil {
  9666. return err
  9667. }
  9668. if x.NextPageToken == "" {
  9669. return nil
  9670. }
  9671. c.PageToken(x.NextPageToken)
  9672. }
  9673. }
  9674. // method id "dlp.projects.deidentifyTemplates.patch":
  9675. type ProjectsDeidentifyTemplatesPatchCall struct {
  9676. s *Service
  9677. name string
  9678. googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest
  9679. urlParams_ gensupport.URLParams
  9680. ctx_ context.Context
  9681. header_ http.Header
  9682. }
  9683. // Patch: Updates the inspect template.
  9684. func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2beta2updatedeidentifytemplaterequest *GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall {
  9685. c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9686. c.name = name
  9687. c.googleprivacydlpv2beta2updatedeidentifytemplaterequest = googleprivacydlpv2beta2updatedeidentifytemplaterequest
  9688. return c
  9689. }
  9690. // Fields allows partial responses to be retrieved. See
  9691. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9692. // for more information.
  9693. func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall {
  9694. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9695. return c
  9696. }
  9697. // Context sets the context to be used in this call's Do method. Any
  9698. // pending HTTP request will be aborted if the provided context is
  9699. // canceled.
  9700. func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall {
  9701. c.ctx_ = ctx
  9702. return c
  9703. }
  9704. // Header returns an http.Header that can be modified by the caller to
  9705. // add HTTP headers to the request.
  9706. func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header {
  9707. if c.header_ == nil {
  9708. c.header_ = make(http.Header)
  9709. }
  9710. return c.header_
  9711. }
  9712. func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  9713. reqHeaders := make(http.Header)
  9714. for k, v := range c.header_ {
  9715. reqHeaders[k] = v
  9716. }
  9717. reqHeaders.Set("User-Agent", c.s.userAgent())
  9718. var body io.Reader = nil
  9719. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2updatedeidentifytemplaterequest)
  9720. if err != nil {
  9721. return nil, err
  9722. }
  9723. reqHeaders.Set("Content-Type", "application/json")
  9724. c.urlParams_.Set("alt", alt)
  9725. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  9726. urls += "?" + c.urlParams_.Encode()
  9727. req, _ := http.NewRequest("PATCH", urls, body)
  9728. req.Header = reqHeaders
  9729. googleapi.Expand(req.URL, map[string]string{
  9730. "name": c.name,
  9731. })
  9732. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9733. }
  9734. // Do executes the "dlp.projects.deidentifyTemplates.patch" call.
  9735. // Exactly one of *GooglePrivacyDlpV2beta2DeidentifyTemplate or error
  9736. // will be non-nil. Any non-2xx status code is an error. Response
  9737. // headers are in either
  9738. // *GooglePrivacyDlpV2beta2DeidentifyTemplate.ServerResponse.Header or
  9739. // (if a response was returned at all) in
  9740. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9741. // whether the returned error was because http.StatusNotModified was
  9742. // returned.
  9743. func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DeidentifyTemplate, error) {
  9744. gensupport.SetOptions(c.urlParams_, opts...)
  9745. res, err := c.doRequest("json")
  9746. if res != nil && res.StatusCode == http.StatusNotModified {
  9747. if res.Body != nil {
  9748. res.Body.Close()
  9749. }
  9750. return nil, &googleapi.Error{
  9751. Code: res.StatusCode,
  9752. Header: res.Header,
  9753. }
  9754. }
  9755. if err != nil {
  9756. return nil, err
  9757. }
  9758. defer googleapi.CloseBody(res)
  9759. if err := googleapi.CheckResponse(res); err != nil {
  9760. return nil, err
  9761. }
  9762. ret := &GooglePrivacyDlpV2beta2DeidentifyTemplate{
  9763. ServerResponse: googleapi.ServerResponse{
  9764. Header: res.Header,
  9765. HTTPStatusCode: res.StatusCode,
  9766. },
  9767. }
  9768. target := &ret
  9769. if err := gensupport.DecodeResponse(target, res); err != nil {
  9770. return nil, err
  9771. }
  9772. return ret, nil
  9773. // {
  9774. // "description": "Updates the inspect template.",
  9775. // "flatPath": "v2beta2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  9776. // "httpMethod": "PATCH",
  9777. // "id": "dlp.projects.deidentifyTemplates.patch",
  9778. // "parameterOrder": [
  9779. // "name"
  9780. // ],
  9781. // "parameters": {
  9782. // "name": {
  9783. // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  9784. // "location": "path",
  9785. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  9786. // "required": true,
  9787. // "type": "string"
  9788. // }
  9789. // },
  9790. // "path": "v2beta2/{+name}",
  9791. // "request": {
  9792. // "$ref": "GooglePrivacyDlpV2beta2UpdateDeidentifyTemplateRequest"
  9793. // },
  9794. // "response": {
  9795. // "$ref": "GooglePrivacyDlpV2beta2DeidentifyTemplate"
  9796. // },
  9797. // "scopes": [
  9798. // "https://www.googleapis.com/auth/cloud-platform"
  9799. // ]
  9800. // }
  9801. }
  9802. // method id "dlp.projects.dlpJobs.cancel":
  9803. type ProjectsDlpJobsCancelCall struct {
  9804. s *Service
  9805. name string
  9806. googleprivacydlpv2beta2canceldlpjobrequest *GooglePrivacyDlpV2beta2CancelDlpJobRequest
  9807. urlParams_ gensupport.URLParams
  9808. ctx_ context.Context
  9809. header_ http.Header
  9810. }
  9811. // Cancel: Starts asynchronous cancellation on a long-running DlpJob.
  9812. // The server
  9813. // makes a best effort to cancel the DlpJob, but success is
  9814. // not
  9815. // guaranteed.
  9816. func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2beta2canceldlpjobrequest *GooglePrivacyDlpV2beta2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall {
  9817. c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9818. c.name = name
  9819. c.googleprivacydlpv2beta2canceldlpjobrequest = googleprivacydlpv2beta2canceldlpjobrequest
  9820. return c
  9821. }
  9822. // Fields allows partial responses to be retrieved. See
  9823. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9824. // for more information.
  9825. func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall {
  9826. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9827. return c
  9828. }
  9829. // Context sets the context to be used in this call's Do method. Any
  9830. // pending HTTP request will be aborted if the provided context is
  9831. // canceled.
  9832. func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall {
  9833. c.ctx_ = ctx
  9834. return c
  9835. }
  9836. // Header returns an http.Header that can be modified by the caller to
  9837. // add HTTP headers to the request.
  9838. func (c *ProjectsDlpJobsCancelCall) Header() http.Header {
  9839. if c.header_ == nil {
  9840. c.header_ = make(http.Header)
  9841. }
  9842. return c.header_
  9843. }
  9844. func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  9845. reqHeaders := make(http.Header)
  9846. for k, v := range c.header_ {
  9847. reqHeaders[k] = v
  9848. }
  9849. reqHeaders.Set("User-Agent", c.s.userAgent())
  9850. var body io.Reader = nil
  9851. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2canceldlpjobrequest)
  9852. if err != nil {
  9853. return nil, err
  9854. }
  9855. reqHeaders.Set("Content-Type", "application/json")
  9856. c.urlParams_.Set("alt", alt)
  9857. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:cancel")
  9858. urls += "?" + c.urlParams_.Encode()
  9859. req, _ := http.NewRequest("POST", urls, body)
  9860. req.Header = reqHeaders
  9861. googleapi.Expand(req.URL, map[string]string{
  9862. "name": c.name,
  9863. })
  9864. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9865. }
  9866. // Do executes the "dlp.projects.dlpJobs.cancel" call.
  9867. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  9868. // non-2xx status code is an error. Response headers are in either
  9869. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  9870. // returned at all) in error.(*googleapi.Error).Header. Use
  9871. // googleapi.IsNotModified to check whether the returned error was
  9872. // because http.StatusNotModified was returned.
  9873. func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  9874. gensupport.SetOptions(c.urlParams_, opts...)
  9875. res, err := c.doRequest("json")
  9876. if res != nil && res.StatusCode == http.StatusNotModified {
  9877. if res.Body != nil {
  9878. res.Body.Close()
  9879. }
  9880. return nil, &googleapi.Error{
  9881. Code: res.StatusCode,
  9882. Header: res.Header,
  9883. }
  9884. }
  9885. if err != nil {
  9886. return nil, err
  9887. }
  9888. defer googleapi.CloseBody(res)
  9889. if err := googleapi.CheckResponse(res); err != nil {
  9890. return nil, err
  9891. }
  9892. ret := &GoogleProtobufEmpty{
  9893. ServerResponse: googleapi.ServerResponse{
  9894. Header: res.Header,
  9895. HTTPStatusCode: res.StatusCode,
  9896. },
  9897. }
  9898. target := &ret
  9899. if err := gensupport.DecodeResponse(target, res); err != nil {
  9900. return nil, err
  9901. }
  9902. return ret, nil
  9903. // {
  9904. // "description": "Starts asynchronous cancellation on a long-running DlpJob. The server\nmakes a best effort to cancel the DlpJob, but success is not\nguaranteed.",
  9905. // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel",
  9906. // "httpMethod": "POST",
  9907. // "id": "dlp.projects.dlpJobs.cancel",
  9908. // "parameterOrder": [
  9909. // "name"
  9910. // ],
  9911. // "parameters": {
  9912. // "name": {
  9913. // "description": "The name of the DlpJob resource to be cancelled.",
  9914. // "location": "path",
  9915. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  9916. // "required": true,
  9917. // "type": "string"
  9918. // }
  9919. // },
  9920. // "path": "v2beta2/{+name}:cancel",
  9921. // "request": {
  9922. // "$ref": "GooglePrivacyDlpV2beta2CancelDlpJobRequest"
  9923. // },
  9924. // "response": {
  9925. // "$ref": "GoogleProtobufEmpty"
  9926. // },
  9927. // "scopes": [
  9928. // "https://www.googleapis.com/auth/cloud-platform"
  9929. // ]
  9930. // }
  9931. }
  9932. // method id "dlp.projects.dlpJobs.delete":
  9933. type ProjectsDlpJobsDeleteCall struct {
  9934. s *Service
  9935. name string
  9936. urlParams_ gensupport.URLParams
  9937. ctx_ context.Context
  9938. header_ http.Header
  9939. }
  9940. // Delete: Deletes a long-running DlpJob. This method indicates that the
  9941. // client is
  9942. // no longer interested in the DlpJob result. The job will be cancelled
  9943. // if
  9944. // possible.
  9945. func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall {
  9946. c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9947. c.name = name
  9948. return c
  9949. }
  9950. // Fields allows partial responses to be retrieved. See
  9951. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9952. // for more information.
  9953. func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall {
  9954. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9955. return c
  9956. }
  9957. // Context sets the context to be used in this call's Do method. Any
  9958. // pending HTTP request will be aborted if the provided context is
  9959. // canceled.
  9960. func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall {
  9961. c.ctx_ = ctx
  9962. return c
  9963. }
  9964. // Header returns an http.Header that can be modified by the caller to
  9965. // add HTTP headers to the request.
  9966. func (c *ProjectsDlpJobsDeleteCall) Header() http.Header {
  9967. if c.header_ == nil {
  9968. c.header_ = make(http.Header)
  9969. }
  9970. return c.header_
  9971. }
  9972. func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9973. reqHeaders := make(http.Header)
  9974. for k, v := range c.header_ {
  9975. reqHeaders[k] = v
  9976. }
  9977. reqHeaders.Set("User-Agent", c.s.userAgent())
  9978. var body io.Reader = nil
  9979. c.urlParams_.Set("alt", alt)
  9980. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  9981. urls += "?" + c.urlParams_.Encode()
  9982. req, _ := http.NewRequest("DELETE", urls, body)
  9983. req.Header = reqHeaders
  9984. googleapi.Expand(req.URL, map[string]string{
  9985. "name": c.name,
  9986. })
  9987. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9988. }
  9989. // Do executes the "dlp.projects.dlpJobs.delete" call.
  9990. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  9991. // non-2xx status code is an error. Response headers are in either
  9992. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  9993. // returned at all) in error.(*googleapi.Error).Header. Use
  9994. // googleapi.IsNotModified to check whether the returned error was
  9995. // because http.StatusNotModified was returned.
  9996. func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  9997. gensupport.SetOptions(c.urlParams_, opts...)
  9998. res, err := c.doRequest("json")
  9999. if res != nil && res.StatusCode == http.StatusNotModified {
  10000. if res.Body != nil {
  10001. res.Body.Close()
  10002. }
  10003. return nil, &googleapi.Error{
  10004. Code: res.StatusCode,
  10005. Header: res.Header,
  10006. }
  10007. }
  10008. if err != nil {
  10009. return nil, err
  10010. }
  10011. defer googleapi.CloseBody(res)
  10012. if err := googleapi.CheckResponse(res); err != nil {
  10013. return nil, err
  10014. }
  10015. ret := &GoogleProtobufEmpty{
  10016. ServerResponse: googleapi.ServerResponse{
  10017. Header: res.Header,
  10018. HTTPStatusCode: res.StatusCode,
  10019. },
  10020. }
  10021. target := &ret
  10022. if err := gensupport.DecodeResponse(target, res); err != nil {
  10023. return nil, err
  10024. }
  10025. return ret, nil
  10026. // {
  10027. // "description": "Deletes a long-running DlpJob. This method indicates that the client is\nno longer interested in the DlpJob result. The job will be cancelled if\npossible.",
  10028. // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}",
  10029. // "httpMethod": "DELETE",
  10030. // "id": "dlp.projects.dlpJobs.delete",
  10031. // "parameterOrder": [
  10032. // "name"
  10033. // ],
  10034. // "parameters": {
  10035. // "name": {
  10036. // "description": "The name of the DlpJob resource to be deleted.",
  10037. // "location": "path",
  10038. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  10039. // "required": true,
  10040. // "type": "string"
  10041. // }
  10042. // },
  10043. // "path": "v2beta2/{+name}",
  10044. // "response": {
  10045. // "$ref": "GoogleProtobufEmpty"
  10046. // },
  10047. // "scopes": [
  10048. // "https://www.googleapis.com/auth/cloud-platform"
  10049. // ]
  10050. // }
  10051. }
  10052. // method id "dlp.projects.dlpJobs.get":
  10053. type ProjectsDlpJobsGetCall struct {
  10054. s *Service
  10055. name string
  10056. urlParams_ gensupport.URLParams
  10057. ifNoneMatch_ string
  10058. ctx_ context.Context
  10059. header_ http.Header
  10060. }
  10061. // Get: Gets the latest state of a long-running DlpJob.
  10062. func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall {
  10063. c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10064. c.name = name
  10065. return c
  10066. }
  10067. // Fields allows partial responses to be retrieved. See
  10068. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10069. // for more information.
  10070. func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall {
  10071. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10072. return c
  10073. }
  10074. // IfNoneMatch sets the optional parameter which makes the operation
  10075. // fail if the object's ETag matches the given value. This is useful for
  10076. // getting updates only after the object has changed since the last
  10077. // request. Use googleapi.IsNotModified to check whether the response
  10078. // error from Do is the result of In-None-Match.
  10079. func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall {
  10080. c.ifNoneMatch_ = entityTag
  10081. return c
  10082. }
  10083. // Context sets the context to be used in this call's Do method. Any
  10084. // pending HTTP request will be aborted if the provided context is
  10085. // canceled.
  10086. func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall {
  10087. c.ctx_ = ctx
  10088. return c
  10089. }
  10090. // Header returns an http.Header that can be modified by the caller to
  10091. // add HTTP headers to the request.
  10092. func (c *ProjectsDlpJobsGetCall) Header() http.Header {
  10093. if c.header_ == nil {
  10094. c.header_ = make(http.Header)
  10095. }
  10096. return c.header_
  10097. }
  10098. func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) {
  10099. reqHeaders := make(http.Header)
  10100. for k, v := range c.header_ {
  10101. reqHeaders[k] = v
  10102. }
  10103. reqHeaders.Set("User-Agent", c.s.userAgent())
  10104. if c.ifNoneMatch_ != "" {
  10105. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10106. }
  10107. var body io.Reader = nil
  10108. c.urlParams_.Set("alt", alt)
  10109. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  10110. urls += "?" + c.urlParams_.Encode()
  10111. req, _ := http.NewRequest("GET", urls, body)
  10112. req.Header = reqHeaders
  10113. googleapi.Expand(req.URL, map[string]string{
  10114. "name": c.name,
  10115. })
  10116. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10117. }
  10118. // Do executes the "dlp.projects.dlpJobs.get" call.
  10119. // Exactly one of *GooglePrivacyDlpV2beta2DlpJob or error will be
  10120. // non-nil. Any non-2xx status code is an error. Response headers are in
  10121. // either *GooglePrivacyDlpV2beta2DlpJob.ServerResponse.Header or (if a
  10122. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10123. // googleapi.IsNotModified to check whether the returned error was
  10124. // because http.StatusNotModified was returned.
  10125. func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2DlpJob, error) {
  10126. gensupport.SetOptions(c.urlParams_, opts...)
  10127. res, err := c.doRequest("json")
  10128. if res != nil && res.StatusCode == http.StatusNotModified {
  10129. if res.Body != nil {
  10130. res.Body.Close()
  10131. }
  10132. return nil, &googleapi.Error{
  10133. Code: res.StatusCode,
  10134. Header: res.Header,
  10135. }
  10136. }
  10137. if err != nil {
  10138. return nil, err
  10139. }
  10140. defer googleapi.CloseBody(res)
  10141. if err := googleapi.CheckResponse(res); err != nil {
  10142. return nil, err
  10143. }
  10144. ret := &GooglePrivacyDlpV2beta2DlpJob{
  10145. ServerResponse: googleapi.ServerResponse{
  10146. Header: res.Header,
  10147. HTTPStatusCode: res.StatusCode,
  10148. },
  10149. }
  10150. target := &ret
  10151. if err := gensupport.DecodeResponse(target, res); err != nil {
  10152. return nil, err
  10153. }
  10154. return ret, nil
  10155. // {
  10156. // "description": "Gets the latest state of a long-running DlpJob.",
  10157. // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs/{dlpJobsId}",
  10158. // "httpMethod": "GET",
  10159. // "id": "dlp.projects.dlpJobs.get",
  10160. // "parameterOrder": [
  10161. // "name"
  10162. // ],
  10163. // "parameters": {
  10164. // "name": {
  10165. // "description": "The name of the DlpJob resource.",
  10166. // "location": "path",
  10167. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  10168. // "required": true,
  10169. // "type": "string"
  10170. // }
  10171. // },
  10172. // "path": "v2beta2/{+name}",
  10173. // "response": {
  10174. // "$ref": "GooglePrivacyDlpV2beta2DlpJob"
  10175. // },
  10176. // "scopes": [
  10177. // "https://www.googleapis.com/auth/cloud-platform"
  10178. // ]
  10179. // }
  10180. }
  10181. // method id "dlp.projects.dlpJobs.list":
  10182. type ProjectsDlpJobsListCall struct {
  10183. s *Service
  10184. parent string
  10185. urlParams_ gensupport.URLParams
  10186. ifNoneMatch_ string
  10187. ctx_ context.Context
  10188. header_ http.Header
  10189. }
  10190. // List: Lists DlpJobs that match the specified filter in the request.
  10191. func (r *ProjectsDlpJobsService) List(parent string) *ProjectsDlpJobsListCall {
  10192. c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10193. c.parent = parent
  10194. return c
  10195. }
  10196. // Filter sets the optional parameter "filter": Allows
  10197. // filtering.
  10198. //
  10199. // Supported syntax:
  10200. //
  10201. // * Filter expressions are made up of one or more restrictions.
  10202. // * Restrictions can be combined by `AND` or `OR` logical operators.
  10203. // A
  10204. // sequence of restrictions implicitly uses `AND`.
  10205. // * A restriction has the form of `<field> <operator> <value>`.
  10206. // * Supported fields/values for inspect jobs:
  10207. // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
  10208. // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
  10209. // - `trigger_name` - The resource name of the trigger that created
  10210. // job.
  10211. // * Supported fields for risk analysis jobs:
  10212. // - `state` - RUNNING|CANCELED|FINISHED|FAILED
  10213. // * The operator must be `=` or `!=`.
  10214. //
  10215. // Examples:
  10216. //
  10217. // * inspected_storage = cloud_storage AND state = done
  10218. // * inspected_storage = cloud_storage OR inspected_storage = bigquery
  10219. // * inspected_storage = cloud_storage AND (state = done OR state =
  10220. // canceled)
  10221. //
  10222. // The length of this field should be no more than 500 characters.
  10223. func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall {
  10224. c.urlParams_.Set("filter", filter)
  10225. return c
  10226. }
  10227. // PageSize sets the optional parameter "pageSize": The standard list
  10228. // page size.
  10229. func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall {
  10230. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  10231. return c
  10232. }
  10233. // PageToken sets the optional parameter "pageToken": The standard list
  10234. // page token.
  10235. func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall {
  10236. c.urlParams_.Set("pageToken", pageToken)
  10237. return c
  10238. }
  10239. // Type sets the optional parameter "type": The type of job. Defaults to
  10240. // `DlpJobType.INSPECT`
  10241. //
  10242. // Possible values:
  10243. // "DLP_JOB_TYPE_UNSPECIFIED"
  10244. // "INSPECT_JOB"
  10245. // "RISK_ANALYSIS_JOB"
  10246. func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall {
  10247. c.urlParams_.Set("type", type_)
  10248. return c
  10249. }
  10250. // Fields allows partial responses to be retrieved. See
  10251. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10252. // for more information.
  10253. func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall {
  10254. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10255. return c
  10256. }
  10257. // IfNoneMatch sets the optional parameter which makes the operation
  10258. // fail if the object's ETag matches the given value. This is useful for
  10259. // getting updates only after the object has changed since the last
  10260. // request. Use googleapi.IsNotModified to check whether the response
  10261. // error from Do is the result of In-None-Match.
  10262. func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall {
  10263. c.ifNoneMatch_ = entityTag
  10264. return c
  10265. }
  10266. // Context sets the context to be used in this call's Do method. Any
  10267. // pending HTTP request will be aborted if the provided context is
  10268. // canceled.
  10269. func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall {
  10270. c.ctx_ = ctx
  10271. return c
  10272. }
  10273. // Header returns an http.Header that can be modified by the caller to
  10274. // add HTTP headers to the request.
  10275. func (c *ProjectsDlpJobsListCall) Header() http.Header {
  10276. if c.header_ == nil {
  10277. c.header_ = make(http.Header)
  10278. }
  10279. return c.header_
  10280. }
  10281. func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) {
  10282. reqHeaders := make(http.Header)
  10283. for k, v := range c.header_ {
  10284. reqHeaders[k] = v
  10285. }
  10286. reqHeaders.Set("User-Agent", c.s.userAgent())
  10287. if c.ifNoneMatch_ != "" {
  10288. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10289. }
  10290. var body io.Reader = nil
  10291. c.urlParams_.Set("alt", alt)
  10292. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/dlpJobs")
  10293. urls += "?" + c.urlParams_.Encode()
  10294. req, _ := http.NewRequest("GET", urls, body)
  10295. req.Header = reqHeaders
  10296. googleapi.Expand(req.URL, map[string]string{
  10297. "parent": c.parent,
  10298. })
  10299. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10300. }
  10301. // Do executes the "dlp.projects.dlpJobs.list" call.
  10302. // Exactly one of *GooglePrivacyDlpV2beta2ListDlpJobsResponse or error
  10303. // will be non-nil. Any non-2xx status code is an error. Response
  10304. // headers are in either
  10305. // *GooglePrivacyDlpV2beta2ListDlpJobsResponse.ServerResponse.Header or
  10306. // (if a response was returned at all) in
  10307. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10308. // whether the returned error was because http.StatusNotModified was
  10309. // returned.
  10310. func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListDlpJobsResponse, error) {
  10311. gensupport.SetOptions(c.urlParams_, opts...)
  10312. res, err := c.doRequest("json")
  10313. if res != nil && res.StatusCode == http.StatusNotModified {
  10314. if res.Body != nil {
  10315. res.Body.Close()
  10316. }
  10317. return nil, &googleapi.Error{
  10318. Code: res.StatusCode,
  10319. Header: res.Header,
  10320. }
  10321. }
  10322. if err != nil {
  10323. return nil, err
  10324. }
  10325. defer googleapi.CloseBody(res)
  10326. if err := googleapi.CheckResponse(res); err != nil {
  10327. return nil, err
  10328. }
  10329. ret := &GooglePrivacyDlpV2beta2ListDlpJobsResponse{
  10330. ServerResponse: googleapi.ServerResponse{
  10331. Header: res.Header,
  10332. HTTPStatusCode: res.StatusCode,
  10333. },
  10334. }
  10335. target := &ret
  10336. if err := gensupport.DecodeResponse(target, res); err != nil {
  10337. return nil, err
  10338. }
  10339. return ret, nil
  10340. // {
  10341. // "description": "Lists DlpJobs that match the specified filter in the request.",
  10342. // "flatPath": "v2beta2/projects/{projectsId}/dlpJobs",
  10343. // "httpMethod": "GET",
  10344. // "id": "dlp.projects.dlpJobs.list",
  10345. // "parameterOrder": [
  10346. // "parent"
  10347. // ],
  10348. // "parameters": {
  10349. // "filter": {
  10350. // "description": "Optional. Allows filtering.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `\u003cfield\u003e \u003coperator\u003e \u003cvalue\u003e`.\n* Supported fields/values for inspect jobs:\n - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED\n - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY\n - `trigger_name` - The resource name of the trigger that created job.\n* Supported fields for risk analysis jobs:\n - `state` - RUNNING|CANCELED|FINISHED|FAILED\n* The operator must be `=` or `!=`.\n\nExamples:\n\n* inspected_storage = cloud_storage AND state = done\n* inspected_storage = cloud_storage OR inspected_storage = bigquery\n* inspected_storage = cloud_storage AND (state = done OR state = canceled)\n\nThe length of this field should be no more than 500 characters.",
  10351. // "location": "query",
  10352. // "type": "string"
  10353. // },
  10354. // "pageSize": {
  10355. // "description": "The standard list page size.",
  10356. // "format": "int32",
  10357. // "location": "query",
  10358. // "type": "integer"
  10359. // },
  10360. // "pageToken": {
  10361. // "description": "The standard list page token.",
  10362. // "location": "query",
  10363. // "type": "string"
  10364. // },
  10365. // "parent": {
  10366. // "description": "The parent resource name, for example projects/my-project-id.",
  10367. // "location": "path",
  10368. // "pattern": "^projects/[^/]+$",
  10369. // "required": true,
  10370. // "type": "string"
  10371. // },
  10372. // "type": {
  10373. // "description": "The type of job. Defaults to `DlpJobType.INSPECT`",
  10374. // "enum": [
  10375. // "DLP_JOB_TYPE_UNSPECIFIED",
  10376. // "INSPECT_JOB",
  10377. // "RISK_ANALYSIS_JOB"
  10378. // ],
  10379. // "location": "query",
  10380. // "type": "string"
  10381. // }
  10382. // },
  10383. // "path": "v2beta2/{+parent}/dlpJobs",
  10384. // "response": {
  10385. // "$ref": "GooglePrivacyDlpV2beta2ListDlpJobsResponse"
  10386. // },
  10387. // "scopes": [
  10388. // "https://www.googleapis.com/auth/cloud-platform"
  10389. // ]
  10390. // }
  10391. }
  10392. // Pages invokes f for each page of results.
  10393. // A non-nil error returned from f will halt the iteration.
  10394. // The provided context supersedes any context provided to the Context method.
  10395. func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListDlpJobsResponse) error) error {
  10396. c.ctx_ = ctx
  10397. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  10398. for {
  10399. x, err := c.Do()
  10400. if err != nil {
  10401. return err
  10402. }
  10403. if err := f(x); err != nil {
  10404. return err
  10405. }
  10406. if x.NextPageToken == "" {
  10407. return nil
  10408. }
  10409. c.PageToken(x.NextPageToken)
  10410. }
  10411. }
  10412. // method id "dlp.projects.image.redact":
  10413. type ProjectsImageRedactCall struct {
  10414. s *Service
  10415. parent string
  10416. googleprivacydlpv2beta2redactimagerequest *GooglePrivacyDlpV2beta2RedactImageRequest
  10417. urlParams_ gensupport.URLParams
  10418. ctx_ context.Context
  10419. header_ http.Header
  10420. }
  10421. // Redact: Redacts potentially sensitive info from an image.
  10422. // This method has limits on input size, processing time, and output
  10423. // size.
  10424. // [How-to guide](/dlp/docs/redacting-sensitive-data-images)
  10425. func (r *ProjectsImageService) Redact(parent string, googleprivacydlpv2beta2redactimagerequest *GooglePrivacyDlpV2beta2RedactImageRequest) *ProjectsImageRedactCall {
  10426. c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10427. c.parent = parent
  10428. c.googleprivacydlpv2beta2redactimagerequest = googleprivacydlpv2beta2redactimagerequest
  10429. return c
  10430. }
  10431. // Fields allows partial responses to be retrieved. See
  10432. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10433. // for more information.
  10434. func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall {
  10435. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10436. return c
  10437. }
  10438. // Context sets the context to be used in this call's Do method. Any
  10439. // pending HTTP request will be aborted if the provided context is
  10440. // canceled.
  10441. func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall {
  10442. c.ctx_ = ctx
  10443. return c
  10444. }
  10445. // Header returns an http.Header that can be modified by the caller to
  10446. // add HTTP headers to the request.
  10447. func (c *ProjectsImageRedactCall) Header() http.Header {
  10448. if c.header_ == nil {
  10449. c.header_ = make(http.Header)
  10450. }
  10451. return c.header_
  10452. }
  10453. func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) {
  10454. reqHeaders := make(http.Header)
  10455. for k, v := range c.header_ {
  10456. reqHeaders[k] = v
  10457. }
  10458. reqHeaders.Set("User-Agent", c.s.userAgent())
  10459. var body io.Reader = nil
  10460. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2redactimagerequest)
  10461. if err != nil {
  10462. return nil, err
  10463. }
  10464. reqHeaders.Set("Content-Type", "application/json")
  10465. c.urlParams_.Set("alt", alt)
  10466. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/image:redact")
  10467. urls += "?" + c.urlParams_.Encode()
  10468. req, _ := http.NewRequest("POST", urls, body)
  10469. req.Header = reqHeaders
  10470. googleapi.Expand(req.URL, map[string]string{
  10471. "parent": c.parent,
  10472. })
  10473. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10474. }
  10475. // Do executes the "dlp.projects.image.redact" call.
  10476. // Exactly one of *GooglePrivacyDlpV2beta2RedactImageResponse or error
  10477. // will be non-nil. Any non-2xx status code is an error. Response
  10478. // headers are in either
  10479. // *GooglePrivacyDlpV2beta2RedactImageResponse.ServerResponse.Header or
  10480. // (if a response was returned at all) in
  10481. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10482. // whether the returned error was because http.StatusNotModified was
  10483. // returned.
  10484. func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2RedactImageResponse, error) {
  10485. gensupport.SetOptions(c.urlParams_, opts...)
  10486. res, err := c.doRequest("json")
  10487. if res != nil && res.StatusCode == http.StatusNotModified {
  10488. if res.Body != nil {
  10489. res.Body.Close()
  10490. }
  10491. return nil, &googleapi.Error{
  10492. Code: res.StatusCode,
  10493. Header: res.Header,
  10494. }
  10495. }
  10496. if err != nil {
  10497. return nil, err
  10498. }
  10499. defer googleapi.CloseBody(res)
  10500. if err := googleapi.CheckResponse(res); err != nil {
  10501. return nil, err
  10502. }
  10503. ret := &GooglePrivacyDlpV2beta2RedactImageResponse{
  10504. ServerResponse: googleapi.ServerResponse{
  10505. Header: res.Header,
  10506. HTTPStatusCode: res.StatusCode,
  10507. },
  10508. }
  10509. target := &ret
  10510. if err := gensupport.DecodeResponse(target, res); err != nil {
  10511. return nil, err
  10512. }
  10513. return ret, nil
  10514. // {
  10515. // "description": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\n[How-to guide](/dlp/docs/redacting-sensitive-data-images)",
  10516. // "flatPath": "v2beta2/projects/{projectsId}/image:redact",
  10517. // "httpMethod": "POST",
  10518. // "id": "dlp.projects.image.redact",
  10519. // "parameterOrder": [
  10520. // "parent"
  10521. // ],
  10522. // "parameters": {
  10523. // "parent": {
  10524. // "description": "The parent resource name, for example projects/my-project-id.",
  10525. // "location": "path",
  10526. // "pattern": "^projects/[^/]+$",
  10527. // "required": true,
  10528. // "type": "string"
  10529. // }
  10530. // },
  10531. // "path": "v2beta2/{+parent}/image:redact",
  10532. // "request": {
  10533. // "$ref": "GooglePrivacyDlpV2beta2RedactImageRequest"
  10534. // },
  10535. // "response": {
  10536. // "$ref": "GooglePrivacyDlpV2beta2RedactImageResponse"
  10537. // },
  10538. // "scopes": [
  10539. // "https://www.googleapis.com/auth/cloud-platform"
  10540. // ]
  10541. // }
  10542. }
  10543. // method id "dlp.projects.inspectTemplates.create":
  10544. type ProjectsInspectTemplatesCreateCall struct {
  10545. s *Service
  10546. parent string
  10547. googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest
  10548. urlParams_ gensupport.URLParams
  10549. ctx_ context.Context
  10550. header_ http.Header
  10551. }
  10552. // Create: Creates an inspect template for re-using frequently used
  10553. // configuration
  10554. // for inspecting content, images, and storage.
  10555. func (r *ProjectsInspectTemplatesService) Create(parent string, googleprivacydlpv2beta2createinspecttemplaterequest *GooglePrivacyDlpV2beta2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall {
  10556. c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10557. c.parent = parent
  10558. c.googleprivacydlpv2beta2createinspecttemplaterequest = googleprivacydlpv2beta2createinspecttemplaterequest
  10559. return c
  10560. }
  10561. // Fields allows partial responses to be retrieved. See
  10562. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10563. // for more information.
  10564. func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall {
  10565. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10566. return c
  10567. }
  10568. // Context sets the context to be used in this call's Do method. Any
  10569. // pending HTTP request will be aborted if the provided context is
  10570. // canceled.
  10571. func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall {
  10572. c.ctx_ = ctx
  10573. return c
  10574. }
  10575. // Header returns an http.Header that can be modified by the caller to
  10576. // add HTTP headers to the request.
  10577. func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header {
  10578. if c.header_ == nil {
  10579. c.header_ = make(http.Header)
  10580. }
  10581. return c.header_
  10582. }
  10583. func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  10584. reqHeaders := make(http.Header)
  10585. for k, v := range c.header_ {
  10586. reqHeaders[k] = v
  10587. }
  10588. reqHeaders.Set("User-Agent", c.s.userAgent())
  10589. var body io.Reader = nil
  10590. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2createinspecttemplaterequest)
  10591. if err != nil {
  10592. return nil, err
  10593. }
  10594. reqHeaders.Set("Content-Type", "application/json")
  10595. c.urlParams_.Set("alt", alt)
  10596. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates")
  10597. urls += "?" + c.urlParams_.Encode()
  10598. req, _ := http.NewRequest("POST", urls, body)
  10599. req.Header = reqHeaders
  10600. googleapi.Expand(req.URL, map[string]string{
  10601. "parent": c.parent,
  10602. })
  10603. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10604. }
  10605. // Do executes the "dlp.projects.inspectTemplates.create" call.
  10606. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  10607. // be non-nil. Any non-2xx status code is an error. Response headers are
  10608. // in either
  10609. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  10610. // a response was returned at all) in error.(*googleapi.Error).Header.
  10611. // Use googleapi.IsNotModified to check whether the returned error was
  10612. // because http.StatusNotModified was returned.
  10613. func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  10614. gensupport.SetOptions(c.urlParams_, opts...)
  10615. res, err := c.doRequest("json")
  10616. if res != nil && res.StatusCode == http.StatusNotModified {
  10617. if res.Body != nil {
  10618. res.Body.Close()
  10619. }
  10620. return nil, &googleapi.Error{
  10621. Code: res.StatusCode,
  10622. Header: res.Header,
  10623. }
  10624. }
  10625. if err != nil {
  10626. return nil, err
  10627. }
  10628. defer googleapi.CloseBody(res)
  10629. if err := googleapi.CheckResponse(res); err != nil {
  10630. return nil, err
  10631. }
  10632. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  10633. ServerResponse: googleapi.ServerResponse{
  10634. Header: res.Header,
  10635. HTTPStatusCode: res.StatusCode,
  10636. },
  10637. }
  10638. target := &ret
  10639. if err := gensupport.DecodeResponse(target, res); err != nil {
  10640. return nil, err
  10641. }
  10642. return ret, nil
  10643. // {
  10644. // "description": "Creates an inspect template for re-using frequently used configuration\nfor inspecting content, images, and storage.",
  10645. // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates",
  10646. // "httpMethod": "POST",
  10647. // "id": "dlp.projects.inspectTemplates.create",
  10648. // "parameterOrder": [
  10649. // "parent"
  10650. // ],
  10651. // "parameters": {
  10652. // "parent": {
  10653. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  10654. // "location": "path",
  10655. // "pattern": "^projects/[^/]+$",
  10656. // "required": true,
  10657. // "type": "string"
  10658. // }
  10659. // },
  10660. // "path": "v2beta2/{+parent}/inspectTemplates",
  10661. // "request": {
  10662. // "$ref": "GooglePrivacyDlpV2beta2CreateInspectTemplateRequest"
  10663. // },
  10664. // "response": {
  10665. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  10666. // },
  10667. // "scopes": [
  10668. // "https://www.googleapis.com/auth/cloud-platform"
  10669. // ]
  10670. // }
  10671. }
  10672. // method id "dlp.projects.inspectTemplates.delete":
  10673. type ProjectsInspectTemplatesDeleteCall struct {
  10674. s *Service
  10675. name string
  10676. urlParams_ gensupport.URLParams
  10677. ctx_ context.Context
  10678. header_ http.Header
  10679. }
  10680. // Delete: Deletes inspect templates.
  10681. func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall {
  10682. c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10683. c.name = name
  10684. return c
  10685. }
  10686. // Fields allows partial responses to be retrieved. See
  10687. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10688. // for more information.
  10689. func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall {
  10690. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10691. return c
  10692. }
  10693. // Context sets the context to be used in this call's Do method. Any
  10694. // pending HTTP request will be aborted if the provided context is
  10695. // canceled.
  10696. func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall {
  10697. c.ctx_ = ctx
  10698. return c
  10699. }
  10700. // Header returns an http.Header that can be modified by the caller to
  10701. // add HTTP headers to the request.
  10702. func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header {
  10703. if c.header_ == nil {
  10704. c.header_ = make(http.Header)
  10705. }
  10706. return c.header_
  10707. }
  10708. func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  10709. reqHeaders := make(http.Header)
  10710. for k, v := range c.header_ {
  10711. reqHeaders[k] = v
  10712. }
  10713. reqHeaders.Set("User-Agent", c.s.userAgent())
  10714. var body io.Reader = nil
  10715. c.urlParams_.Set("alt", alt)
  10716. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  10717. urls += "?" + c.urlParams_.Encode()
  10718. req, _ := http.NewRequest("DELETE", urls, body)
  10719. req.Header = reqHeaders
  10720. googleapi.Expand(req.URL, map[string]string{
  10721. "name": c.name,
  10722. })
  10723. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10724. }
  10725. // Do executes the "dlp.projects.inspectTemplates.delete" call.
  10726. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  10727. // non-2xx status code is an error. Response headers are in either
  10728. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  10729. // returned at all) in error.(*googleapi.Error).Header. Use
  10730. // googleapi.IsNotModified to check whether the returned error was
  10731. // because http.StatusNotModified was returned.
  10732. func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  10733. gensupport.SetOptions(c.urlParams_, opts...)
  10734. res, err := c.doRequest("json")
  10735. if res != nil && res.StatusCode == http.StatusNotModified {
  10736. if res.Body != nil {
  10737. res.Body.Close()
  10738. }
  10739. return nil, &googleapi.Error{
  10740. Code: res.StatusCode,
  10741. Header: res.Header,
  10742. }
  10743. }
  10744. if err != nil {
  10745. return nil, err
  10746. }
  10747. defer googleapi.CloseBody(res)
  10748. if err := googleapi.CheckResponse(res); err != nil {
  10749. return nil, err
  10750. }
  10751. ret := &GoogleProtobufEmpty{
  10752. ServerResponse: googleapi.ServerResponse{
  10753. Header: res.Header,
  10754. HTTPStatusCode: res.StatusCode,
  10755. },
  10756. }
  10757. target := &ret
  10758. if err := gensupport.DecodeResponse(target, res); err != nil {
  10759. return nil, err
  10760. }
  10761. return ret, nil
  10762. // {
  10763. // "description": "Deletes inspect templates.",
  10764. // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  10765. // "httpMethod": "DELETE",
  10766. // "id": "dlp.projects.inspectTemplates.delete",
  10767. // "parameterOrder": [
  10768. // "name"
  10769. // ],
  10770. // "parameters": {
  10771. // "name": {
  10772. // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  10773. // "location": "path",
  10774. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  10775. // "required": true,
  10776. // "type": "string"
  10777. // }
  10778. // },
  10779. // "path": "v2beta2/{+name}",
  10780. // "response": {
  10781. // "$ref": "GoogleProtobufEmpty"
  10782. // },
  10783. // "scopes": [
  10784. // "https://www.googleapis.com/auth/cloud-platform"
  10785. // ]
  10786. // }
  10787. }
  10788. // method id "dlp.projects.inspectTemplates.get":
  10789. type ProjectsInspectTemplatesGetCall struct {
  10790. s *Service
  10791. name string
  10792. urlParams_ gensupport.URLParams
  10793. ifNoneMatch_ string
  10794. ctx_ context.Context
  10795. header_ http.Header
  10796. }
  10797. // Get: Gets an inspect template.
  10798. func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall {
  10799. c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10800. c.name = name
  10801. return c
  10802. }
  10803. // Fields allows partial responses to be retrieved. See
  10804. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10805. // for more information.
  10806. func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall {
  10807. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10808. return c
  10809. }
  10810. // IfNoneMatch sets the optional parameter which makes the operation
  10811. // fail if the object's ETag matches the given value. This is useful for
  10812. // getting updates only after the object has changed since the last
  10813. // request. Use googleapi.IsNotModified to check whether the response
  10814. // error from Do is the result of In-None-Match.
  10815. func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall {
  10816. c.ifNoneMatch_ = entityTag
  10817. return c
  10818. }
  10819. // Context sets the context to be used in this call's Do method. Any
  10820. // pending HTTP request will be aborted if the provided context is
  10821. // canceled.
  10822. func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall {
  10823. c.ctx_ = ctx
  10824. return c
  10825. }
  10826. // Header returns an http.Header that can be modified by the caller to
  10827. // add HTTP headers to the request.
  10828. func (c *ProjectsInspectTemplatesGetCall) Header() http.Header {
  10829. if c.header_ == nil {
  10830. c.header_ = make(http.Header)
  10831. }
  10832. return c.header_
  10833. }
  10834. func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  10835. reqHeaders := make(http.Header)
  10836. for k, v := range c.header_ {
  10837. reqHeaders[k] = v
  10838. }
  10839. reqHeaders.Set("User-Agent", c.s.userAgent())
  10840. if c.ifNoneMatch_ != "" {
  10841. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10842. }
  10843. var body io.Reader = nil
  10844. c.urlParams_.Set("alt", alt)
  10845. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  10846. urls += "?" + c.urlParams_.Encode()
  10847. req, _ := http.NewRequest("GET", urls, body)
  10848. req.Header = reqHeaders
  10849. googleapi.Expand(req.URL, map[string]string{
  10850. "name": c.name,
  10851. })
  10852. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10853. }
  10854. // Do executes the "dlp.projects.inspectTemplates.get" call.
  10855. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  10856. // be non-nil. Any non-2xx status code is an error. Response headers are
  10857. // in either
  10858. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  10859. // a response was returned at all) in error.(*googleapi.Error).Header.
  10860. // Use googleapi.IsNotModified to check whether the returned error was
  10861. // because http.StatusNotModified was returned.
  10862. func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  10863. gensupport.SetOptions(c.urlParams_, opts...)
  10864. res, err := c.doRequest("json")
  10865. if res != nil && res.StatusCode == http.StatusNotModified {
  10866. if res.Body != nil {
  10867. res.Body.Close()
  10868. }
  10869. return nil, &googleapi.Error{
  10870. Code: res.StatusCode,
  10871. Header: res.Header,
  10872. }
  10873. }
  10874. if err != nil {
  10875. return nil, err
  10876. }
  10877. defer googleapi.CloseBody(res)
  10878. if err := googleapi.CheckResponse(res); err != nil {
  10879. return nil, err
  10880. }
  10881. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  10882. ServerResponse: googleapi.ServerResponse{
  10883. Header: res.Header,
  10884. HTTPStatusCode: res.StatusCode,
  10885. },
  10886. }
  10887. target := &ret
  10888. if err := gensupport.DecodeResponse(target, res); err != nil {
  10889. return nil, err
  10890. }
  10891. return ret, nil
  10892. // {
  10893. // "description": "Gets an inspect template.",
  10894. // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  10895. // "httpMethod": "GET",
  10896. // "id": "dlp.projects.inspectTemplates.get",
  10897. // "parameterOrder": [
  10898. // "name"
  10899. // ],
  10900. // "parameters": {
  10901. // "name": {
  10902. // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  10903. // "location": "path",
  10904. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  10905. // "required": true,
  10906. // "type": "string"
  10907. // }
  10908. // },
  10909. // "path": "v2beta2/{+name}",
  10910. // "response": {
  10911. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  10912. // },
  10913. // "scopes": [
  10914. // "https://www.googleapis.com/auth/cloud-platform"
  10915. // ]
  10916. // }
  10917. }
  10918. // method id "dlp.projects.inspectTemplates.list":
  10919. type ProjectsInspectTemplatesListCall struct {
  10920. s *Service
  10921. parent string
  10922. urlParams_ gensupport.URLParams
  10923. ifNoneMatch_ string
  10924. ctx_ context.Context
  10925. header_ http.Header
  10926. }
  10927. // List: Lists inspect templates.
  10928. func (r *ProjectsInspectTemplatesService) List(parent string) *ProjectsInspectTemplatesListCall {
  10929. c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10930. c.parent = parent
  10931. return c
  10932. }
  10933. // PageSize sets the optional parameter "pageSize": Optional size of the
  10934. // page, can be limited by server. If zero server returns
  10935. // a page of max size 100.
  10936. func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall {
  10937. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  10938. return c
  10939. }
  10940. // PageToken sets the optional parameter "pageToken": Optional page
  10941. // token to continue retrieval. Comes from previous call
  10942. // to `ListInspectTemplates`.
  10943. func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall {
  10944. c.urlParams_.Set("pageToken", pageToken)
  10945. return c
  10946. }
  10947. // Fields allows partial responses to be retrieved. See
  10948. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10949. // for more information.
  10950. func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall {
  10951. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10952. return c
  10953. }
  10954. // IfNoneMatch sets the optional parameter which makes the operation
  10955. // fail if the object's ETag matches the given value. This is useful for
  10956. // getting updates only after the object has changed since the last
  10957. // request. Use googleapi.IsNotModified to check whether the response
  10958. // error from Do is the result of In-None-Match.
  10959. func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall {
  10960. c.ifNoneMatch_ = entityTag
  10961. return c
  10962. }
  10963. // Context sets the context to be used in this call's Do method. Any
  10964. // pending HTTP request will be aborted if the provided context is
  10965. // canceled.
  10966. func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall {
  10967. c.ctx_ = ctx
  10968. return c
  10969. }
  10970. // Header returns an http.Header that can be modified by the caller to
  10971. // add HTTP headers to the request.
  10972. func (c *ProjectsInspectTemplatesListCall) Header() http.Header {
  10973. if c.header_ == nil {
  10974. c.header_ = make(http.Header)
  10975. }
  10976. return c.header_
  10977. }
  10978. func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  10979. reqHeaders := make(http.Header)
  10980. for k, v := range c.header_ {
  10981. reqHeaders[k] = v
  10982. }
  10983. reqHeaders.Set("User-Agent", c.s.userAgent())
  10984. if c.ifNoneMatch_ != "" {
  10985. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10986. }
  10987. var body io.Reader = nil
  10988. c.urlParams_.Set("alt", alt)
  10989. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/inspectTemplates")
  10990. urls += "?" + c.urlParams_.Encode()
  10991. req, _ := http.NewRequest("GET", urls, body)
  10992. req.Header = reqHeaders
  10993. googleapi.Expand(req.URL, map[string]string{
  10994. "parent": c.parent,
  10995. })
  10996. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10997. }
  10998. // Do executes the "dlp.projects.inspectTemplates.list" call.
  10999. // Exactly one of *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse
  11000. // or error will be non-nil. Any non-2xx status code is an error.
  11001. // Response headers are in either
  11002. // *GooglePrivacyDlpV2beta2ListInspectTemplatesResponse.ServerResponse.He
  11003. // ader or (if a response was returned at all) in
  11004. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11005. // whether the returned error was because http.StatusNotModified was
  11006. // returned.
  11007. func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse, error) {
  11008. gensupport.SetOptions(c.urlParams_, opts...)
  11009. res, err := c.doRequest("json")
  11010. if res != nil && res.StatusCode == http.StatusNotModified {
  11011. if res.Body != nil {
  11012. res.Body.Close()
  11013. }
  11014. return nil, &googleapi.Error{
  11015. Code: res.StatusCode,
  11016. Header: res.Header,
  11017. }
  11018. }
  11019. if err != nil {
  11020. return nil, err
  11021. }
  11022. defer googleapi.CloseBody(res)
  11023. if err := googleapi.CheckResponse(res); err != nil {
  11024. return nil, err
  11025. }
  11026. ret := &GooglePrivacyDlpV2beta2ListInspectTemplatesResponse{
  11027. ServerResponse: googleapi.ServerResponse{
  11028. Header: res.Header,
  11029. HTTPStatusCode: res.StatusCode,
  11030. },
  11031. }
  11032. target := &ret
  11033. if err := gensupport.DecodeResponse(target, res); err != nil {
  11034. return nil, err
  11035. }
  11036. return ret, nil
  11037. // {
  11038. // "description": "Lists inspect templates.",
  11039. // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates",
  11040. // "httpMethod": "GET",
  11041. // "id": "dlp.projects.inspectTemplates.list",
  11042. // "parameterOrder": [
  11043. // "parent"
  11044. // ],
  11045. // "parameters": {
  11046. // "pageSize": {
  11047. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  11048. // "format": "int32",
  11049. // "location": "query",
  11050. // "type": "integer"
  11051. // },
  11052. // "pageToken": {
  11053. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.",
  11054. // "location": "query",
  11055. // "type": "string"
  11056. // },
  11057. // "parent": {
  11058. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  11059. // "location": "path",
  11060. // "pattern": "^projects/[^/]+$",
  11061. // "required": true,
  11062. // "type": "string"
  11063. // }
  11064. // },
  11065. // "path": "v2beta2/{+parent}/inspectTemplates",
  11066. // "response": {
  11067. // "$ref": "GooglePrivacyDlpV2beta2ListInspectTemplatesResponse"
  11068. // },
  11069. // "scopes": [
  11070. // "https://www.googleapis.com/auth/cloud-platform"
  11071. // ]
  11072. // }
  11073. }
  11074. // Pages invokes f for each page of results.
  11075. // A non-nil error returned from f will halt the iteration.
  11076. // The provided context supersedes any context provided to the Context method.
  11077. func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListInspectTemplatesResponse) error) error {
  11078. c.ctx_ = ctx
  11079. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  11080. for {
  11081. x, err := c.Do()
  11082. if err != nil {
  11083. return err
  11084. }
  11085. if err := f(x); err != nil {
  11086. return err
  11087. }
  11088. if x.NextPageToken == "" {
  11089. return nil
  11090. }
  11091. c.PageToken(x.NextPageToken)
  11092. }
  11093. }
  11094. // method id "dlp.projects.inspectTemplates.patch":
  11095. type ProjectsInspectTemplatesPatchCall struct {
  11096. s *Service
  11097. name string
  11098. googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest
  11099. urlParams_ gensupport.URLParams
  11100. ctx_ context.Context
  11101. header_ http.Header
  11102. }
  11103. // Patch: Updates the inspect template.
  11104. func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2beta2updateinspecttemplaterequest *GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall {
  11105. c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11106. c.name = name
  11107. c.googleprivacydlpv2beta2updateinspecttemplaterequest = googleprivacydlpv2beta2updateinspecttemplaterequest
  11108. return c
  11109. }
  11110. // Fields allows partial responses to be retrieved. See
  11111. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11112. // for more information.
  11113. func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall {
  11114. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11115. return c
  11116. }
  11117. // Context sets the context to be used in this call's Do method. Any
  11118. // pending HTTP request will be aborted if the provided context is
  11119. // canceled.
  11120. func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall {
  11121. c.ctx_ = ctx
  11122. return c
  11123. }
  11124. // Header returns an http.Header that can be modified by the caller to
  11125. // add HTTP headers to the request.
  11126. func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header {
  11127. if c.header_ == nil {
  11128. c.header_ = make(http.Header)
  11129. }
  11130. return c.header_
  11131. }
  11132. func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  11133. reqHeaders := make(http.Header)
  11134. for k, v := range c.header_ {
  11135. reqHeaders[k] = v
  11136. }
  11137. reqHeaders.Set("User-Agent", c.s.userAgent())
  11138. var body io.Reader = nil
  11139. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2updateinspecttemplaterequest)
  11140. if err != nil {
  11141. return nil, err
  11142. }
  11143. reqHeaders.Set("Content-Type", "application/json")
  11144. c.urlParams_.Set("alt", alt)
  11145. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  11146. urls += "?" + c.urlParams_.Encode()
  11147. req, _ := http.NewRequest("PATCH", urls, body)
  11148. req.Header = reqHeaders
  11149. googleapi.Expand(req.URL, map[string]string{
  11150. "name": c.name,
  11151. })
  11152. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11153. }
  11154. // Do executes the "dlp.projects.inspectTemplates.patch" call.
  11155. // Exactly one of *GooglePrivacyDlpV2beta2InspectTemplate or error will
  11156. // be non-nil. Any non-2xx status code is an error. Response headers are
  11157. // in either
  11158. // *GooglePrivacyDlpV2beta2InspectTemplate.ServerResponse.Header or (if
  11159. // a response was returned at all) in error.(*googleapi.Error).Header.
  11160. // Use googleapi.IsNotModified to check whether the returned error was
  11161. // because http.StatusNotModified was returned.
  11162. func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2InspectTemplate, error) {
  11163. gensupport.SetOptions(c.urlParams_, opts...)
  11164. res, err := c.doRequest("json")
  11165. if res != nil && res.StatusCode == http.StatusNotModified {
  11166. if res.Body != nil {
  11167. res.Body.Close()
  11168. }
  11169. return nil, &googleapi.Error{
  11170. Code: res.StatusCode,
  11171. Header: res.Header,
  11172. }
  11173. }
  11174. if err != nil {
  11175. return nil, err
  11176. }
  11177. defer googleapi.CloseBody(res)
  11178. if err := googleapi.CheckResponse(res); err != nil {
  11179. return nil, err
  11180. }
  11181. ret := &GooglePrivacyDlpV2beta2InspectTemplate{
  11182. ServerResponse: googleapi.ServerResponse{
  11183. Header: res.Header,
  11184. HTTPStatusCode: res.StatusCode,
  11185. },
  11186. }
  11187. target := &ret
  11188. if err := gensupport.DecodeResponse(target, res); err != nil {
  11189. return nil, err
  11190. }
  11191. return ret, nil
  11192. // {
  11193. // "description": "Updates the inspect template.",
  11194. // "flatPath": "v2beta2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  11195. // "httpMethod": "PATCH",
  11196. // "id": "dlp.projects.inspectTemplates.patch",
  11197. // "parameterOrder": [
  11198. // "name"
  11199. // ],
  11200. // "parameters": {
  11201. // "name": {
  11202. // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  11203. // "location": "path",
  11204. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  11205. // "required": true,
  11206. // "type": "string"
  11207. // }
  11208. // },
  11209. // "path": "v2beta2/{+name}",
  11210. // "request": {
  11211. // "$ref": "GooglePrivacyDlpV2beta2UpdateInspectTemplateRequest"
  11212. // },
  11213. // "response": {
  11214. // "$ref": "GooglePrivacyDlpV2beta2InspectTemplate"
  11215. // },
  11216. // "scopes": [
  11217. // "https://www.googleapis.com/auth/cloud-platform"
  11218. // ]
  11219. // }
  11220. }
  11221. // method id "dlp.projects.jobTriggers.create":
  11222. type ProjectsJobTriggersCreateCall struct {
  11223. s *Service
  11224. parent string
  11225. googleprivacydlpv2beta2createjobtriggerrequest *GooglePrivacyDlpV2beta2CreateJobTriggerRequest
  11226. urlParams_ gensupport.URLParams
  11227. ctx_ context.Context
  11228. header_ http.Header
  11229. }
  11230. // Create: Creates a job to run DLP actions such as scanning storage for
  11231. // sensitive
  11232. // information on a set schedule.
  11233. func (r *ProjectsJobTriggersService) Create(parent string, googleprivacydlpv2beta2createjobtriggerrequest *GooglePrivacyDlpV2beta2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall {
  11234. c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11235. c.parent = parent
  11236. c.googleprivacydlpv2beta2createjobtriggerrequest = googleprivacydlpv2beta2createjobtriggerrequest
  11237. return c
  11238. }
  11239. // Fields allows partial responses to be retrieved. See
  11240. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11241. // for more information.
  11242. func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall {
  11243. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11244. return c
  11245. }
  11246. // Context sets the context to be used in this call's Do method. Any
  11247. // pending HTTP request will be aborted if the provided context is
  11248. // canceled.
  11249. func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall {
  11250. c.ctx_ = ctx
  11251. return c
  11252. }
  11253. // Header returns an http.Header that can be modified by the caller to
  11254. // add HTTP headers to the request.
  11255. func (c *ProjectsJobTriggersCreateCall) Header() http.Header {
  11256. if c.header_ == nil {
  11257. c.header_ = make(http.Header)
  11258. }
  11259. return c.header_
  11260. }
  11261. func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
  11262. reqHeaders := make(http.Header)
  11263. for k, v := range c.header_ {
  11264. reqHeaders[k] = v
  11265. }
  11266. reqHeaders.Set("User-Agent", c.s.userAgent())
  11267. var body io.Reader = nil
  11268. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2createjobtriggerrequest)
  11269. if err != nil {
  11270. return nil, err
  11271. }
  11272. reqHeaders.Set("Content-Type", "application/json")
  11273. c.urlParams_.Set("alt", alt)
  11274. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/jobTriggers")
  11275. urls += "?" + c.urlParams_.Encode()
  11276. req, _ := http.NewRequest("POST", urls, body)
  11277. req.Header = reqHeaders
  11278. googleapi.Expand(req.URL, map[string]string{
  11279. "parent": c.parent,
  11280. })
  11281. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11282. }
  11283. // Do executes the "dlp.projects.jobTriggers.create" call.
  11284. // Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be
  11285. // non-nil. Any non-2xx status code is an error. Response headers are in
  11286. // either *GooglePrivacyDlpV2beta2JobTrigger.ServerResponse.Header or
  11287. // (if a response was returned at all) in
  11288. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11289. // whether the returned error was because http.StatusNotModified was
  11290. // returned.
  11291. func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, error) {
  11292. gensupport.SetOptions(c.urlParams_, opts...)
  11293. res, err := c.doRequest("json")
  11294. if res != nil && res.StatusCode == http.StatusNotModified {
  11295. if res.Body != nil {
  11296. res.Body.Close()
  11297. }
  11298. return nil, &googleapi.Error{
  11299. Code: res.StatusCode,
  11300. Header: res.Header,
  11301. }
  11302. }
  11303. if err != nil {
  11304. return nil, err
  11305. }
  11306. defer googleapi.CloseBody(res)
  11307. if err := googleapi.CheckResponse(res); err != nil {
  11308. return nil, err
  11309. }
  11310. ret := &GooglePrivacyDlpV2beta2JobTrigger{
  11311. ServerResponse: googleapi.ServerResponse{
  11312. Header: res.Header,
  11313. HTTPStatusCode: res.StatusCode,
  11314. },
  11315. }
  11316. target := &ret
  11317. if err := gensupport.DecodeResponse(target, res); err != nil {
  11318. return nil, err
  11319. }
  11320. return ret, nil
  11321. // {
  11322. // "description": "Creates a job to run DLP actions such as scanning storage for sensitive\ninformation on a set schedule.",
  11323. // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers",
  11324. // "httpMethod": "POST",
  11325. // "id": "dlp.projects.jobTriggers.create",
  11326. // "parameterOrder": [
  11327. // "parent"
  11328. // ],
  11329. // "parameters": {
  11330. // "parent": {
  11331. // "description": "The parent resource name, for example projects/my-project-id.",
  11332. // "location": "path",
  11333. // "pattern": "^projects/[^/]+$",
  11334. // "required": true,
  11335. // "type": "string"
  11336. // }
  11337. // },
  11338. // "path": "v2beta2/{+parent}/jobTriggers",
  11339. // "request": {
  11340. // "$ref": "GooglePrivacyDlpV2beta2CreateJobTriggerRequest"
  11341. // },
  11342. // "response": {
  11343. // "$ref": "GooglePrivacyDlpV2beta2JobTrigger"
  11344. // },
  11345. // "scopes": [
  11346. // "https://www.googleapis.com/auth/cloud-platform"
  11347. // ]
  11348. // }
  11349. }
  11350. // method id "dlp.projects.jobTriggers.delete":
  11351. type ProjectsJobTriggersDeleteCall struct {
  11352. s *Service
  11353. name string
  11354. urlParams_ gensupport.URLParams
  11355. ctx_ context.Context
  11356. header_ http.Header
  11357. }
  11358. // Delete: Deletes a job trigger.
  11359. func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall {
  11360. c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11361. c.name = name
  11362. return c
  11363. }
  11364. // Fields allows partial responses to be retrieved. See
  11365. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11366. // for more information.
  11367. func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall {
  11368. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11369. return c
  11370. }
  11371. // Context sets the context to be used in this call's Do method. Any
  11372. // pending HTTP request will be aborted if the provided context is
  11373. // canceled.
  11374. func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall {
  11375. c.ctx_ = ctx
  11376. return c
  11377. }
  11378. // Header returns an http.Header that can be modified by the caller to
  11379. // add HTTP headers to the request.
  11380. func (c *ProjectsJobTriggersDeleteCall) Header() http.Header {
  11381. if c.header_ == nil {
  11382. c.header_ = make(http.Header)
  11383. }
  11384. return c.header_
  11385. }
  11386. func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
  11387. reqHeaders := make(http.Header)
  11388. for k, v := range c.header_ {
  11389. reqHeaders[k] = v
  11390. }
  11391. reqHeaders.Set("User-Agent", c.s.userAgent())
  11392. var body io.Reader = nil
  11393. c.urlParams_.Set("alt", alt)
  11394. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  11395. urls += "?" + c.urlParams_.Encode()
  11396. req, _ := http.NewRequest("DELETE", urls, body)
  11397. req.Header = reqHeaders
  11398. googleapi.Expand(req.URL, map[string]string{
  11399. "name": c.name,
  11400. })
  11401. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11402. }
  11403. // Do executes the "dlp.projects.jobTriggers.delete" call.
  11404. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  11405. // non-2xx status code is an error. Response headers are in either
  11406. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  11407. // returned at all) in error.(*googleapi.Error).Header. Use
  11408. // googleapi.IsNotModified to check whether the returned error was
  11409. // because http.StatusNotModified was returned.
  11410. func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  11411. gensupport.SetOptions(c.urlParams_, opts...)
  11412. res, err := c.doRequest("json")
  11413. if res != nil && res.StatusCode == http.StatusNotModified {
  11414. if res.Body != nil {
  11415. res.Body.Close()
  11416. }
  11417. return nil, &googleapi.Error{
  11418. Code: res.StatusCode,
  11419. Header: res.Header,
  11420. }
  11421. }
  11422. if err != nil {
  11423. return nil, err
  11424. }
  11425. defer googleapi.CloseBody(res)
  11426. if err := googleapi.CheckResponse(res); err != nil {
  11427. return nil, err
  11428. }
  11429. ret := &GoogleProtobufEmpty{
  11430. ServerResponse: googleapi.ServerResponse{
  11431. Header: res.Header,
  11432. HTTPStatusCode: res.StatusCode,
  11433. },
  11434. }
  11435. target := &ret
  11436. if err := gensupport.DecodeResponse(target, res); err != nil {
  11437. return nil, err
  11438. }
  11439. return ret, nil
  11440. // {
  11441. // "description": "Deletes a job trigger.",
  11442. // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  11443. // "httpMethod": "DELETE",
  11444. // "id": "dlp.projects.jobTriggers.delete",
  11445. // "parameterOrder": [
  11446. // "name"
  11447. // ],
  11448. // "parameters": {
  11449. // "name": {
  11450. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  11451. // "location": "path",
  11452. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  11453. // "required": true,
  11454. // "type": "string"
  11455. // }
  11456. // },
  11457. // "path": "v2beta2/{+name}",
  11458. // "response": {
  11459. // "$ref": "GoogleProtobufEmpty"
  11460. // },
  11461. // "scopes": [
  11462. // "https://www.googleapis.com/auth/cloud-platform"
  11463. // ]
  11464. // }
  11465. }
  11466. // method id "dlp.projects.jobTriggers.get":
  11467. type ProjectsJobTriggersGetCall struct {
  11468. s *Service
  11469. name string
  11470. urlParams_ gensupport.URLParams
  11471. ifNoneMatch_ string
  11472. ctx_ context.Context
  11473. header_ http.Header
  11474. }
  11475. // Get: Gets a job trigger.
  11476. func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall {
  11477. c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11478. c.name = name
  11479. return c
  11480. }
  11481. // Fields allows partial responses to be retrieved. See
  11482. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11483. // for more information.
  11484. func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall {
  11485. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11486. return c
  11487. }
  11488. // IfNoneMatch sets the optional parameter which makes the operation
  11489. // fail if the object's ETag matches the given value. This is useful for
  11490. // getting updates only after the object has changed since the last
  11491. // request. Use googleapi.IsNotModified to check whether the response
  11492. // error from Do is the result of In-None-Match.
  11493. func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall {
  11494. c.ifNoneMatch_ = entityTag
  11495. return c
  11496. }
  11497. // Context sets the context to be used in this call's Do method. Any
  11498. // pending HTTP request will be aborted if the provided context is
  11499. // canceled.
  11500. func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall {
  11501. c.ctx_ = ctx
  11502. return c
  11503. }
  11504. // Header returns an http.Header that can be modified by the caller to
  11505. // add HTTP headers to the request.
  11506. func (c *ProjectsJobTriggersGetCall) Header() http.Header {
  11507. if c.header_ == nil {
  11508. c.header_ = make(http.Header)
  11509. }
  11510. return c.header_
  11511. }
  11512. func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) {
  11513. reqHeaders := make(http.Header)
  11514. for k, v := range c.header_ {
  11515. reqHeaders[k] = v
  11516. }
  11517. reqHeaders.Set("User-Agent", c.s.userAgent())
  11518. if c.ifNoneMatch_ != "" {
  11519. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11520. }
  11521. var body io.Reader = nil
  11522. c.urlParams_.Set("alt", alt)
  11523. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  11524. urls += "?" + c.urlParams_.Encode()
  11525. req, _ := http.NewRequest("GET", urls, body)
  11526. req.Header = reqHeaders
  11527. googleapi.Expand(req.URL, map[string]string{
  11528. "name": c.name,
  11529. })
  11530. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11531. }
  11532. // Do executes the "dlp.projects.jobTriggers.get" call.
  11533. // Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be
  11534. // non-nil. Any non-2xx status code is an error. Response headers are in
  11535. // either *GooglePrivacyDlpV2beta2JobTrigger.ServerResponse.Header or
  11536. // (if a response was returned at all) in
  11537. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11538. // whether the returned error was because http.StatusNotModified was
  11539. // returned.
  11540. func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, error) {
  11541. gensupport.SetOptions(c.urlParams_, opts...)
  11542. res, err := c.doRequest("json")
  11543. if res != nil && res.StatusCode == http.StatusNotModified {
  11544. if res.Body != nil {
  11545. res.Body.Close()
  11546. }
  11547. return nil, &googleapi.Error{
  11548. Code: res.StatusCode,
  11549. Header: res.Header,
  11550. }
  11551. }
  11552. if err != nil {
  11553. return nil, err
  11554. }
  11555. defer googleapi.CloseBody(res)
  11556. if err := googleapi.CheckResponse(res); err != nil {
  11557. return nil, err
  11558. }
  11559. ret := &GooglePrivacyDlpV2beta2JobTrigger{
  11560. ServerResponse: googleapi.ServerResponse{
  11561. Header: res.Header,
  11562. HTTPStatusCode: res.StatusCode,
  11563. },
  11564. }
  11565. target := &ret
  11566. if err := gensupport.DecodeResponse(target, res); err != nil {
  11567. return nil, err
  11568. }
  11569. return ret, nil
  11570. // {
  11571. // "description": "Gets a job trigger.",
  11572. // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  11573. // "httpMethod": "GET",
  11574. // "id": "dlp.projects.jobTriggers.get",
  11575. // "parameterOrder": [
  11576. // "name"
  11577. // ],
  11578. // "parameters": {
  11579. // "name": {
  11580. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  11581. // "location": "path",
  11582. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  11583. // "required": true,
  11584. // "type": "string"
  11585. // }
  11586. // },
  11587. // "path": "v2beta2/{+name}",
  11588. // "response": {
  11589. // "$ref": "GooglePrivacyDlpV2beta2JobTrigger"
  11590. // },
  11591. // "scopes": [
  11592. // "https://www.googleapis.com/auth/cloud-platform"
  11593. // ]
  11594. // }
  11595. }
  11596. // method id "dlp.projects.jobTriggers.list":
  11597. type ProjectsJobTriggersListCall struct {
  11598. s *Service
  11599. parent string
  11600. urlParams_ gensupport.URLParams
  11601. ifNoneMatch_ string
  11602. ctx_ context.Context
  11603. header_ http.Header
  11604. }
  11605. // List: Lists job triggers.
  11606. func (r *ProjectsJobTriggersService) List(parent string) *ProjectsJobTriggersListCall {
  11607. c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11608. c.parent = parent
  11609. return c
  11610. }
  11611. // OrderBy sets the optional parameter "orderBy": Optional comma
  11612. // separated list of triggeredJob fields to order by,
  11613. // followed by 'asc/desc' postfix, i.e.
  11614. // "create_time asc,name desc,schedule_mode asc". This list
  11615. // is
  11616. // case-insensitive.
  11617. //
  11618. // Example: "name asc,schedule_mode desc, status desc"
  11619. //
  11620. // Supported filters keys and values are:
  11621. //
  11622. // - `create_time`: corresponds to time the triggeredJob was created.
  11623. // - `update_time`: corresponds to time the triggeredJob was last
  11624. // updated.
  11625. // - `name`: corresponds to JobTrigger's display name.
  11626. // - `status`: corresponds to the triggeredJob status.
  11627. func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall {
  11628. c.urlParams_.Set("orderBy", orderBy)
  11629. return c
  11630. }
  11631. // PageSize sets the optional parameter "pageSize": Optional size of the
  11632. // page, can be limited by a server.
  11633. func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall {
  11634. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  11635. return c
  11636. }
  11637. // PageToken sets the optional parameter "pageToken": Optional page
  11638. // token to continue retrieval. Comes from previous call
  11639. // to ListJobTriggers. `order_by` and `filter` should not change
  11640. // for
  11641. // subsequent calls, but can be omitted if token is specified.
  11642. func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall {
  11643. c.urlParams_.Set("pageToken", pageToken)
  11644. return c
  11645. }
  11646. // Fields allows partial responses to be retrieved. See
  11647. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11648. // for more information.
  11649. func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall {
  11650. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11651. return c
  11652. }
  11653. // IfNoneMatch sets the optional parameter which makes the operation
  11654. // fail if the object's ETag matches the given value. This is useful for
  11655. // getting updates only after the object has changed since the last
  11656. // request. Use googleapi.IsNotModified to check whether the response
  11657. // error from Do is the result of In-None-Match.
  11658. func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall {
  11659. c.ifNoneMatch_ = entityTag
  11660. return c
  11661. }
  11662. // Context sets the context to be used in this call's Do method. Any
  11663. // pending HTTP request will be aborted if the provided context is
  11664. // canceled.
  11665. func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall {
  11666. c.ctx_ = ctx
  11667. return c
  11668. }
  11669. // Header returns an http.Header that can be modified by the caller to
  11670. // add HTTP headers to the request.
  11671. func (c *ProjectsJobTriggersListCall) Header() http.Header {
  11672. if c.header_ == nil {
  11673. c.header_ = make(http.Header)
  11674. }
  11675. return c.header_
  11676. }
  11677. func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) {
  11678. reqHeaders := make(http.Header)
  11679. for k, v := range c.header_ {
  11680. reqHeaders[k] = v
  11681. }
  11682. reqHeaders.Set("User-Agent", c.s.userAgent())
  11683. if c.ifNoneMatch_ != "" {
  11684. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11685. }
  11686. var body io.Reader = nil
  11687. c.urlParams_.Set("alt", alt)
  11688. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+parent}/jobTriggers")
  11689. urls += "?" + c.urlParams_.Encode()
  11690. req, _ := http.NewRequest("GET", urls, body)
  11691. req.Header = reqHeaders
  11692. googleapi.Expand(req.URL, map[string]string{
  11693. "parent": c.parent,
  11694. })
  11695. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11696. }
  11697. // Do executes the "dlp.projects.jobTriggers.list" call.
  11698. // Exactly one of *GooglePrivacyDlpV2beta2ListJobTriggersResponse or
  11699. // error will be non-nil. Any non-2xx status code is an error. Response
  11700. // headers are in either
  11701. // *GooglePrivacyDlpV2beta2ListJobTriggersResponse.ServerResponse.Header
  11702. // or (if a response was returned at all) in
  11703. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11704. // whether the returned error was because http.StatusNotModified was
  11705. // returned.
  11706. func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2ListJobTriggersResponse, error) {
  11707. gensupport.SetOptions(c.urlParams_, opts...)
  11708. res, err := c.doRequest("json")
  11709. if res != nil && res.StatusCode == http.StatusNotModified {
  11710. if res.Body != nil {
  11711. res.Body.Close()
  11712. }
  11713. return nil, &googleapi.Error{
  11714. Code: res.StatusCode,
  11715. Header: res.Header,
  11716. }
  11717. }
  11718. if err != nil {
  11719. return nil, err
  11720. }
  11721. defer googleapi.CloseBody(res)
  11722. if err := googleapi.CheckResponse(res); err != nil {
  11723. return nil, err
  11724. }
  11725. ret := &GooglePrivacyDlpV2beta2ListJobTriggersResponse{
  11726. ServerResponse: googleapi.ServerResponse{
  11727. Header: res.Header,
  11728. HTTPStatusCode: res.StatusCode,
  11729. },
  11730. }
  11731. target := &ret
  11732. if err := gensupport.DecodeResponse(target, res); err != nil {
  11733. return nil, err
  11734. }
  11735. return ret, nil
  11736. // {
  11737. // "description": "Lists job triggers.",
  11738. // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers",
  11739. // "httpMethod": "GET",
  11740. // "id": "dlp.projects.jobTriggers.list",
  11741. // "parameterOrder": [
  11742. // "parent"
  11743. // ],
  11744. // "parameters": {
  11745. // "orderBy": {
  11746. // "description": "Optional comma separated list of triggeredJob fields to order by,\nfollowed by 'asc/desc' postfix, i.e.\n`\"create_time asc,name desc,schedule_mode asc\"`. This list is\ncase-insensitive.\n\nExample: `\"name asc,schedule_mode desc, status desc\"`\n\nSupported filters keys and values are:\n\n- `create_time`: corresponds to time the triggeredJob was created.\n- `update_time`: corresponds to time the triggeredJob was last updated.\n- `name`: corresponds to JobTrigger's display name.\n- `status`: corresponds to the triggeredJob status.",
  11747. // "location": "query",
  11748. // "type": "string"
  11749. // },
  11750. // "pageSize": {
  11751. // "description": "Optional size of the page, can be limited by a server.",
  11752. // "format": "int32",
  11753. // "location": "query",
  11754. // "type": "integer"
  11755. // },
  11756. // "pageToken": {
  11757. // "description": "Optional page token to continue retrieval. Comes from previous call\nto ListJobTriggers. `order_by` and `filter` should not change for\nsubsequent calls, but can be omitted if token is specified.",
  11758. // "location": "query",
  11759. // "type": "string"
  11760. // },
  11761. // "parent": {
  11762. // "description": "The parent resource name, for example projects/my-project-id.",
  11763. // "location": "path",
  11764. // "pattern": "^projects/[^/]+$",
  11765. // "required": true,
  11766. // "type": "string"
  11767. // }
  11768. // },
  11769. // "path": "v2beta2/{+parent}/jobTriggers",
  11770. // "response": {
  11771. // "$ref": "GooglePrivacyDlpV2beta2ListJobTriggersResponse"
  11772. // },
  11773. // "scopes": [
  11774. // "https://www.googleapis.com/auth/cloud-platform"
  11775. // ]
  11776. // }
  11777. }
  11778. // Pages invokes f for each page of results.
  11779. // A non-nil error returned from f will halt the iteration.
  11780. // The provided context supersedes any context provided to the Context method.
  11781. func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta2ListJobTriggersResponse) error) error {
  11782. c.ctx_ = ctx
  11783. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  11784. for {
  11785. x, err := c.Do()
  11786. if err != nil {
  11787. return err
  11788. }
  11789. if err := f(x); err != nil {
  11790. return err
  11791. }
  11792. if x.NextPageToken == "" {
  11793. return nil
  11794. }
  11795. c.PageToken(x.NextPageToken)
  11796. }
  11797. }
  11798. // method id "dlp.projects.jobTriggers.patch":
  11799. type ProjectsJobTriggersPatchCall struct {
  11800. s *Service
  11801. name string
  11802. googleprivacydlpv2beta2updatejobtriggerrequest *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest
  11803. urlParams_ gensupport.URLParams
  11804. ctx_ context.Context
  11805. header_ http.Header
  11806. }
  11807. // Patch: Updates a job trigger.
  11808. func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2beta2updatejobtriggerrequest *GooglePrivacyDlpV2beta2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall {
  11809. c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11810. c.name = name
  11811. c.googleprivacydlpv2beta2updatejobtriggerrequest = googleprivacydlpv2beta2updatejobtriggerrequest
  11812. return c
  11813. }
  11814. // Fields allows partial responses to be retrieved. See
  11815. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11816. // for more information.
  11817. func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall {
  11818. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11819. return c
  11820. }
  11821. // Context sets the context to be used in this call's Do method. Any
  11822. // pending HTTP request will be aborted if the provided context is
  11823. // canceled.
  11824. func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall {
  11825. c.ctx_ = ctx
  11826. return c
  11827. }
  11828. // Header returns an http.Header that can be modified by the caller to
  11829. // add HTTP headers to the request.
  11830. func (c *ProjectsJobTriggersPatchCall) Header() http.Header {
  11831. if c.header_ == nil {
  11832. c.header_ = make(http.Header)
  11833. }
  11834. return c.header_
  11835. }
  11836. func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
  11837. reqHeaders := make(http.Header)
  11838. for k, v := range c.header_ {
  11839. reqHeaders[k] = v
  11840. }
  11841. reqHeaders.Set("User-Agent", c.s.userAgent())
  11842. var body io.Reader = nil
  11843. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta2updatejobtriggerrequest)
  11844. if err != nil {
  11845. return nil, err
  11846. }
  11847. reqHeaders.Set("Content-Type", "application/json")
  11848. c.urlParams_.Set("alt", alt)
  11849. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}")
  11850. urls += "?" + c.urlParams_.Encode()
  11851. req, _ := http.NewRequest("PATCH", urls, body)
  11852. req.Header = reqHeaders
  11853. googleapi.Expand(req.URL, map[string]string{
  11854. "name": c.name,
  11855. })
  11856. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11857. }
  11858. // Do executes the "dlp.projects.jobTriggers.patch" call.
  11859. // Exactly one of *GooglePrivacyDlpV2beta2JobTrigger or error will be
  11860. // non-nil. Any non-2xx status code is an error. Response headers are in
  11861. // either *GooglePrivacyDlpV2beta2JobTrigger.ServerResponse.Header or
  11862. // (if a response was returned at all) in
  11863. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11864. // whether the returned error was because http.StatusNotModified was
  11865. // returned.
  11866. func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta2JobTrigger, error) {
  11867. gensupport.SetOptions(c.urlParams_, opts...)
  11868. res, err := c.doRequest("json")
  11869. if res != nil && res.StatusCode == http.StatusNotModified {
  11870. if res.Body != nil {
  11871. res.Body.Close()
  11872. }
  11873. return nil, &googleapi.Error{
  11874. Code: res.StatusCode,
  11875. Header: res.Header,
  11876. }
  11877. }
  11878. if err != nil {
  11879. return nil, err
  11880. }
  11881. defer googleapi.CloseBody(res)
  11882. if err := googleapi.CheckResponse(res); err != nil {
  11883. return nil, err
  11884. }
  11885. ret := &GooglePrivacyDlpV2beta2JobTrigger{
  11886. ServerResponse: googleapi.ServerResponse{
  11887. Header: res.Header,
  11888. HTTPStatusCode: res.StatusCode,
  11889. },
  11890. }
  11891. target := &ret
  11892. if err := gensupport.DecodeResponse(target, res); err != nil {
  11893. return nil, err
  11894. }
  11895. return ret, nil
  11896. // {
  11897. // "description": "Updates a job trigger.",
  11898. // "flatPath": "v2beta2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  11899. // "httpMethod": "PATCH",
  11900. // "id": "dlp.projects.jobTriggers.patch",
  11901. // "parameterOrder": [
  11902. // "name"
  11903. // ],
  11904. // "parameters": {
  11905. // "name": {
  11906. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  11907. // "location": "path",
  11908. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  11909. // "required": true,
  11910. // "type": "string"
  11911. // }
  11912. // },
  11913. // "path": "v2beta2/{+name}",
  11914. // "request": {
  11915. // "$ref": "GooglePrivacyDlpV2beta2UpdateJobTriggerRequest"
  11916. // },
  11917. // "response": {
  11918. // "$ref": "GooglePrivacyDlpV2beta2JobTrigger"
  11919. // },
  11920. // "scopes": [
  11921. // "https://www.googleapis.com/auth/cloud-platform"
  11922. // ]
  11923. // }
  11924. }