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.
 
 
 

12012 lines
468 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/v2"
  8. // ...
  9. // dlpService, err := dlp.New(oauthHttpClient)
  10. package dlp // import "google.golang.org/api/dlp/v2"
  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:v2"
  41. const apiName = "dlp"
  42. const apiVersion = "v2"
  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.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s)
  109. rs.DlpJobs = NewProjectsDlpJobsService(s)
  110. rs.Image = NewProjectsImageService(s)
  111. rs.InspectTemplates = NewProjectsInspectTemplatesService(s)
  112. rs.JobTriggers = NewProjectsJobTriggersService(s)
  113. return rs
  114. }
  115. type ProjectsService struct {
  116. s *Service
  117. Content *ProjectsContentService
  118. DeidentifyTemplates *ProjectsDeidentifyTemplatesService
  119. DlpJobs *ProjectsDlpJobsService
  120. Image *ProjectsImageService
  121. InspectTemplates *ProjectsInspectTemplatesService
  122. JobTriggers *ProjectsJobTriggersService
  123. }
  124. func NewProjectsContentService(s *Service) *ProjectsContentService {
  125. rs := &ProjectsContentService{s: s}
  126. return rs
  127. }
  128. type ProjectsContentService struct {
  129. s *Service
  130. }
  131. func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService {
  132. rs := &ProjectsDeidentifyTemplatesService{s: s}
  133. return rs
  134. }
  135. type ProjectsDeidentifyTemplatesService struct {
  136. s *Service
  137. }
  138. func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService {
  139. rs := &ProjectsDlpJobsService{s: s}
  140. return rs
  141. }
  142. type ProjectsDlpJobsService struct {
  143. s *Service
  144. }
  145. func NewProjectsImageService(s *Service) *ProjectsImageService {
  146. rs := &ProjectsImageService{s: s}
  147. return rs
  148. }
  149. type ProjectsImageService struct {
  150. s *Service
  151. }
  152. func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService {
  153. rs := &ProjectsInspectTemplatesService{s: s}
  154. return rs
  155. }
  156. type ProjectsInspectTemplatesService struct {
  157. s *Service
  158. }
  159. func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService {
  160. rs := &ProjectsJobTriggersService{s: s}
  161. return rs
  162. }
  163. type ProjectsJobTriggersService struct {
  164. s *Service
  165. }
  166. // GooglePrivacyDlpV2Action: A task to execute on the completion of a
  167. // job.
  168. // See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
  169. type GooglePrivacyDlpV2Action struct {
  170. // PubSub: Publish a notification to a pubsub topic.
  171. PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"`
  172. // PublishSummaryToCscc: Publish summary to Cloud Security Command
  173. // Center (Alpha).
  174. PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"`
  175. // SaveFindings: Save resulting findings in a provided location.
  176. SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"`
  177. // ForceSendFields is a list of field names (e.g. "PubSub") to
  178. // unconditionally include in API requests. By default, fields with
  179. // empty values are omitted from API requests. However, any non-pointer,
  180. // non-interface field appearing in ForceSendFields will be sent to the
  181. // server regardless of whether the field is empty or not. This may be
  182. // used to include empty fields in Patch requests.
  183. ForceSendFields []string `json:"-"`
  184. // NullFields is a list of field names (e.g. "PubSub") to include in API
  185. // requests with the JSON null value. By default, fields with empty
  186. // values are omitted from API requests. However, any field with an
  187. // empty value appearing in NullFields will be sent to the server as
  188. // null. It is an error if a field in this list has a non-empty value.
  189. // This may be used to include null fields in Patch requests.
  190. NullFields []string `json:"-"`
  191. }
  192. func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) {
  193. type NoMethod GooglePrivacyDlpV2Action
  194. raw := NoMethod(*s)
  195. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  196. }
  197. // GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk
  198. // analysis operation request.
  199. type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct {
  200. CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
  201. DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"`
  202. KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"`
  203. KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
  204. LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"`
  205. NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"`
  206. // RequestedPrivacyMetric: Privacy metric to compute.
  207. RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"`
  208. // RequestedSourceTable: Input dataset to compute metrics over.
  209. RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"`
  210. // ForceSendFields is a list of field names (e.g.
  211. // "CategoricalStatsResult") to unconditionally include in API requests.
  212. // By default, fields with empty values are omitted from API requests.
  213. // However, any non-pointer, non-interface field appearing in
  214. // ForceSendFields will be sent to the server regardless of whether the
  215. // field is empty or not. This may be used to include empty fields in
  216. // Patch requests.
  217. ForceSendFields []string `json:"-"`
  218. // NullFields is a list of field names (e.g. "CategoricalStatsResult")
  219. // to include in API requests with the JSON null value. By default,
  220. // fields with empty values are omitted from API requests. However, any
  221. // field with an empty value appearing in NullFields will be sent to the
  222. // server as null. It is an error if a field in this list has a
  223. // non-empty value. This may be used to include null fields in Patch
  224. // requests.
  225. NullFields []string `json:"-"`
  226. }
  227. func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) {
  228. type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails
  229. raw := NoMethod(*s)
  230. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  231. }
  232. // GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains
  233. // statistical information on the relative
  234. // frequency of different quasi-identifiers values. It has one or
  235. // several
  236. // quasi-identifiers columns, and one column that indicates the
  237. // relative
  238. // frequency of each quasi-identifier tuple.
  239. // If a tuple is present in the data but not in the auxiliary table,
  240. // the
  241. // corresponding relative frequency is assumed to be zero (and thus,
  242. // the
  243. // tuple is highly reidentifiable).
  244. type GooglePrivacyDlpV2AuxiliaryTable struct {
  245. // QuasiIds: Quasi-identifier columns. [required]
  246. QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"`
  247. // RelativeFrequency: The relative frequency column must contain a
  248. // floating-point number
  249. // between 0 and 1 (inclusive). Null values are assumed to be
  250. // zero.
  251. // [required]
  252. RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"`
  253. // Table: Auxiliary table location. [required]
  254. Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"`
  255. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  256. // unconditionally include in API requests. By default, fields with
  257. // empty values are omitted from API requests. However, any non-pointer,
  258. // non-interface field appearing in ForceSendFields will be sent to the
  259. // server regardless of whether the field is empty or not. This may be
  260. // used to include empty fields in Patch requests.
  261. ForceSendFields []string `json:"-"`
  262. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  263. // API requests with the JSON null value. By default, fields with empty
  264. // values are omitted from API requests. However, any field with an
  265. // empty value appearing in NullFields will be sent to the server as
  266. // null. It is an error if a field in this list has a non-empty value.
  267. // This may be used to include null fields in Patch requests.
  268. NullFields []string `json:"-"`
  269. }
  270. func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) {
  271. type NoMethod GooglePrivacyDlpV2AuxiliaryTable
  272. raw := NoMethod(*s)
  273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  274. }
  275. // GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in
  276. // BigQuery table.
  277. type GooglePrivacyDlpV2BigQueryKey struct {
  278. // RowNumber: Absolute number of the row from the beginning of the table
  279. // at the time
  280. // of scanning.
  281. RowNumber int64 `json:"rowNumber,omitempty,string"`
  282. // TableReference: Complete BigQuery table reference.
  283. TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"`
  284. // ForceSendFields is a list of field names (e.g. "RowNumber") to
  285. // unconditionally include in API requests. By default, fields with
  286. // empty values are omitted from API requests. However, any non-pointer,
  287. // non-interface field appearing in ForceSendFields will be sent to the
  288. // server regardless of whether the field is empty or not. This may be
  289. // used to include empty fields in Patch requests.
  290. ForceSendFields []string `json:"-"`
  291. // NullFields is a list of field names (e.g. "RowNumber") to include in
  292. // API requests with the JSON null value. By default, fields with empty
  293. // values are omitted from API requests. However, any field with an
  294. // empty value appearing in NullFields will be sent to the server as
  295. // null. It is an error if a field in this list has a non-empty value.
  296. // This may be used to include null fields in Patch requests.
  297. NullFields []string `json:"-"`
  298. }
  299. func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) {
  300. type NoMethod GooglePrivacyDlpV2BigQueryKey
  301. raw := NoMethod(*s)
  302. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  303. }
  304. // GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table
  305. // and row identifiers.
  306. type GooglePrivacyDlpV2BigQueryOptions struct {
  307. // IdentifyingFields: References to fields uniquely identifying rows
  308. // within the table.
  309. // Nested fields in the format, like `person.birthdate.year`, are
  310. // allowed.
  311. IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"`
  312. // RowsLimit: Max number of rows to scan. If the table has more rows
  313. // than this value, the
  314. // rest of the rows are omitted. If not set, or if set to 0, all rows
  315. // will be
  316. // scanned. Cannot be used in conjunction with TimespanConfig.
  317. RowsLimit int64 `json:"rowsLimit,omitempty,string"`
  318. // Possible values:
  319. // "SAMPLE_METHOD_UNSPECIFIED"
  320. // "TOP" - Scan from the top (default).
  321. // "RANDOM_START" - Randomly pick the row to start scanning. The
  322. // scanned rows are contiguous.
  323. SampleMethod string `json:"sampleMethod,omitempty"`
  324. // TableReference: Complete BigQuery table reference.
  325. TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"`
  326. // ForceSendFields is a list of field names (e.g. "IdentifyingFields")
  327. // to unconditionally include in API requests. By default, fields with
  328. // empty values are omitted from API requests. However, any non-pointer,
  329. // non-interface field appearing in ForceSendFields will be sent to the
  330. // server regardless of whether the field is empty or not. This may be
  331. // used to include empty fields in Patch requests.
  332. ForceSendFields []string `json:"-"`
  333. // NullFields is a list of field names (e.g. "IdentifyingFields") to
  334. // include in API requests with the JSON null value. By default, fields
  335. // with empty values are omitted from API requests. However, any field
  336. // with an empty value appearing in NullFields will be sent to the
  337. // server as null. It is an error if a field in this list has a
  338. // non-empty value. This may be used to include null fields in Patch
  339. // requests.
  340. NullFields []string `json:"-"`
  341. }
  342. func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) {
  343. type NoMethod GooglePrivacyDlpV2BigQueryOptions
  344. raw := NoMethod(*s)
  345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  346. }
  347. // GooglePrivacyDlpV2BigQueryTable: Message defining the location of a
  348. // BigQuery table. A table is uniquely
  349. // identified by its project_id, dataset_id, and table_name. Within a
  350. // query
  351. // a table is often referenced with a string in the format
  352. // of:
  353. // `<project_id>:<dataset_id>.<table_id>`
  354. // or
  355. // `<project_id>.<dataset_id>.<table_id>`.
  356. type GooglePrivacyDlpV2BigQueryTable struct {
  357. // DatasetId: Dataset ID of the table.
  358. DatasetId string `json:"datasetId,omitempty"`
  359. // ProjectId: The Google Cloud Platform project ID of the project
  360. // containing the table.
  361. // If omitted, project ID is inferred from the API call.
  362. ProjectId string `json:"projectId,omitempty"`
  363. // TableId: Name of the table.
  364. TableId string `json:"tableId,omitempty"`
  365. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  366. // unconditionally include in API requests. By default, fields with
  367. // empty values are omitted from API requests. However, any non-pointer,
  368. // non-interface field appearing in ForceSendFields will be sent to the
  369. // server regardless of whether the field is empty or not. This may be
  370. // used to include empty fields in Patch requests.
  371. ForceSendFields []string `json:"-"`
  372. // NullFields is a list of field names (e.g. "DatasetId") to include in
  373. // API requests with the JSON null value. By default, fields with empty
  374. // values are omitted from API requests. However, any field with an
  375. // empty value appearing in NullFields will be sent to the server as
  376. // null. It is an error if a field in this list has a non-empty value.
  377. // This may be used to include null fields in Patch requests.
  378. NullFields []string `json:"-"`
  379. }
  380. func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) {
  381. type NoMethod GooglePrivacyDlpV2BigQueryTable
  382. raw := NoMethod(*s)
  383. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  384. }
  385. // GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected
  386. // text within an image.
  387. type GooglePrivacyDlpV2BoundingBox struct {
  388. // Height: Height of the bounding box in pixels.
  389. Height int64 `json:"height,omitempty"`
  390. // Left: Left coordinate of the bounding box. (0,0) is upper left.
  391. Left int64 `json:"left,omitempty"`
  392. // Top: Top coordinate of the bounding box. (0,0) is upper left.
  393. Top int64 `json:"top,omitempty"`
  394. // Width: Width of the bounding box in pixels.
  395. Width int64 `json:"width,omitempty"`
  396. // ForceSendFields is a list of field names (e.g. "Height") to
  397. // unconditionally include in API requests. By default, fields with
  398. // empty values are omitted from API requests. However, any non-pointer,
  399. // non-interface field appearing in ForceSendFields will be sent to the
  400. // server regardless of whether the field is empty or not. This may be
  401. // used to include empty fields in Patch requests.
  402. ForceSendFields []string `json:"-"`
  403. // NullFields is a list of field names (e.g. "Height") to include in API
  404. // requests with the JSON null value. By default, fields with empty
  405. // values are omitted from API requests. However, any field with an
  406. // empty value appearing in NullFields will be sent to the server as
  407. // null. It is an error if a field in this list has a non-empty value.
  408. // This may be used to include null fields in Patch requests.
  409. NullFields []string `json:"-"`
  410. }
  411. func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) {
  412. type NoMethod GooglePrivacyDlpV2BoundingBox
  413. raw := NoMethod(*s)
  414. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  415. }
  416. // GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along
  417. // with replacement values.
  418. type GooglePrivacyDlpV2Bucket struct {
  419. // Max: Upper bound of the range, exclusive; type must match min.
  420. Max *GooglePrivacyDlpV2Value `json:"max,omitempty"`
  421. // Min: Lower bound of the range, inclusive. Type should be the same as
  422. // max if
  423. // used.
  424. Min *GooglePrivacyDlpV2Value `json:"min,omitempty"`
  425. // ReplacementValue: Replacement value for this bucket. If not
  426. // provided
  427. // the default behavior will be to hyphenate the min-max range.
  428. ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"`
  429. // ForceSendFields is a list of field names (e.g. "Max") to
  430. // unconditionally include in API requests. By default, fields with
  431. // empty values are omitted from API requests. However, any non-pointer,
  432. // non-interface field appearing in ForceSendFields will be sent to the
  433. // server regardless of whether the field is empty or not. This may be
  434. // used to include empty fields in Patch requests.
  435. ForceSendFields []string `json:"-"`
  436. // NullFields is a list of field names (e.g. "Max") to include in API
  437. // requests with the JSON null value. By default, fields with empty
  438. // values are omitted from API requests. However, any field with an
  439. // empty value appearing in NullFields will be sent to the server as
  440. // null. It is an error if a field in this list has a non-empty value.
  441. // This may be used to include null fields in Patch requests.
  442. NullFields []string `json:"-"`
  443. }
  444. func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) {
  445. type NoMethod GooglePrivacyDlpV2Bucket
  446. raw := NoMethod(*s)
  447. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  448. }
  449. // GooglePrivacyDlpV2BucketingConfig: Generalization function that
  450. // buckets values based on ranges. The ranges and
  451. // replacement values are dynamically provided by the user for custom
  452. // behavior,
  453. // such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
  454. // This can be used on
  455. // data of type: number, long, string, timestamp.
  456. // If the bound `Value` type differs from the type of data being
  457. // transformed, we
  458. // will first attempt converting the type of the data to be transformed
  459. // to match
  460. // the type of the bound before comparing.
  461. // See https://cloud.google.com/dlp/docs/concepts-bucketing to learn
  462. // more.
  463. type GooglePrivacyDlpV2BucketingConfig struct {
  464. // Buckets: Set of buckets. Ranges must be non-overlapping.
  465. Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"`
  466. // ForceSendFields is a list of field names (e.g. "Buckets") to
  467. // unconditionally include in API requests. By default, fields with
  468. // empty values are omitted from API requests. However, any non-pointer,
  469. // non-interface field appearing in ForceSendFields will be sent to the
  470. // server regardless of whether the field is empty or not. This may be
  471. // used to include empty fields in Patch requests.
  472. ForceSendFields []string `json:"-"`
  473. // NullFields is a list of field names (e.g. "Buckets") to include in
  474. // API requests with the JSON null value. By default, fields with empty
  475. // values are omitted from API requests. However, any field with an
  476. // empty value appearing in NullFields will be sent to the server as
  477. // null. It is an error if a field in this list has a non-empty value.
  478. // This may be used to include null fields in Patch requests.
  479. NullFields []string `json:"-"`
  480. }
  481. func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) {
  482. type NoMethod GooglePrivacyDlpV2BucketingConfig
  483. raw := NoMethod(*s)
  484. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  485. }
  486. // GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or
  487. // redact.
  488. type GooglePrivacyDlpV2ByteContentItem struct {
  489. // Data: Content data to inspect or redact.
  490. Data string `json:"data,omitempty"`
  491. // Type: The type of data stored in the bytes string. Default will be
  492. // TEXT_UTF8.
  493. //
  494. // Possible values:
  495. // "BYTES_TYPE_UNSPECIFIED"
  496. // "IMAGE"
  497. // "IMAGE_JPEG"
  498. // "IMAGE_BMP"
  499. // "IMAGE_PNG"
  500. // "IMAGE_SVG"
  501. // "TEXT_UTF8"
  502. Type string `json:"type,omitempty"`
  503. // ForceSendFields is a list of field names (e.g. "Data") to
  504. // unconditionally include in API requests. By default, fields with
  505. // empty values are omitted from API requests. However, any non-pointer,
  506. // non-interface field appearing in ForceSendFields will be sent to the
  507. // server regardless of whether the field is empty or not. This may be
  508. // used to include empty fields in Patch requests.
  509. ForceSendFields []string `json:"-"`
  510. // NullFields is a list of field names (e.g. "Data") to include in API
  511. // requests with the JSON null value. By default, fields with empty
  512. // values are omitted from API requests. However, any field with an
  513. // empty value appearing in NullFields will be sent to the server as
  514. // null. It is an error if a field in this list has a non-empty value.
  515. // This may be used to include null fields in Patch requests.
  516. NullFields []string `json:"-"`
  517. }
  518. func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) {
  519. type NoMethod GooglePrivacyDlpV2ByteContentItem
  520. raw := NoMethod(*s)
  521. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  522. }
  523. // GooglePrivacyDlpV2CancelDlpJobRequest: The request message for
  524. // canceling a DLP job.
  525. type GooglePrivacyDlpV2CancelDlpJobRequest struct {
  526. }
  527. // GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats
  528. // over an individual column, including
  529. // number of distinct values and value count distribution.
  530. type GooglePrivacyDlpV2CategoricalStatsConfig struct {
  531. // Field: Field to compute categorical stats on. All column types
  532. // are
  533. // supported except for arrays and structs. However, it may be
  534. // more
  535. // informative to use NumericalStats when the field type is
  536. // supported,
  537. // depending on the data.
  538. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  539. // ForceSendFields is a list of field names (e.g. "Field") to
  540. // unconditionally include in API requests. By default, fields with
  541. // empty values are omitted from API requests. However, any non-pointer,
  542. // non-interface field appearing in ForceSendFields will be sent to the
  543. // server regardless of whether the field is empty or not. This may be
  544. // used to include empty fields in Patch requests.
  545. ForceSendFields []string `json:"-"`
  546. // NullFields is a list of field names (e.g. "Field") to include in API
  547. // requests with the JSON null value. By default, fields with empty
  548. // values are omitted from API requests. However, any field with an
  549. // empty value appearing in NullFields will be sent to the server as
  550. // null. It is an error if a field in this list has a non-empty value.
  551. // This may be used to include null fields in Patch requests.
  552. NullFields []string `json:"-"`
  553. }
  554. func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) {
  555. type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig
  556. raw := NoMethod(*s)
  557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  558. }
  559. type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct {
  560. // BucketSize: Total number of values in this bucket.
  561. BucketSize int64 `json:"bucketSize,omitempty,string"`
  562. // BucketValueCount: Total number of distinct values in this bucket.
  563. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  564. // BucketValues: Sample of value frequencies in this bucket. The total
  565. // number of
  566. // values returned per bucket is capped at 20.
  567. BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"`
  568. // ValueFrequencyLowerBound: Lower bound on the value frequency of the
  569. // values in this bucket.
  570. ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"`
  571. // ValueFrequencyUpperBound: Upper bound on the value frequency of the
  572. // values in this bucket.
  573. ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"`
  574. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  575. // unconditionally include in API requests. By default, fields with
  576. // empty values are omitted from API requests. However, any non-pointer,
  577. // non-interface field appearing in ForceSendFields will be sent to the
  578. // server regardless of whether the field is empty or not. This may be
  579. // used to include empty fields in Patch requests.
  580. ForceSendFields []string `json:"-"`
  581. // NullFields is a list of field names (e.g. "BucketSize") to include in
  582. // API requests with the JSON null value. By default, fields with empty
  583. // values are omitted from API requests. However, any field with an
  584. // empty value appearing in NullFields will be sent to the server as
  585. // null. It is an error if a field in this list has a non-empty value.
  586. // This may be used to include null fields in Patch requests.
  587. NullFields []string `json:"-"`
  588. }
  589. func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) {
  590. type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket
  591. raw := NoMethod(*s)
  592. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  593. }
  594. // GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical
  595. // stats computation.
  596. type GooglePrivacyDlpV2CategoricalStatsResult struct {
  597. // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the
  598. // column.
  599. ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"`
  600. // ForceSendFields is a list of field names (e.g.
  601. // "ValueFrequencyHistogramBuckets") to unconditionally include in API
  602. // requests. By default, fields with empty values are omitted from API
  603. // requests. However, any non-pointer, non-interface field appearing in
  604. // ForceSendFields will be sent to the server regardless of whether the
  605. // field is empty or not. This may be used to include empty fields in
  606. // Patch requests.
  607. ForceSendFields []string `json:"-"`
  608. // NullFields is a list of field names (e.g.
  609. // "ValueFrequencyHistogramBuckets") to include in API requests with the
  610. // JSON null value. By default, fields with empty values are omitted
  611. // from API requests. However, any field with an empty value appearing
  612. // in NullFields will be sent to the server as null. It is an error if a
  613. // field in this list has a non-empty value. This may be used to include
  614. // null fields in Patch requests.
  615. NullFields []string `json:"-"`
  616. }
  617. func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) {
  618. type NoMethod GooglePrivacyDlpV2CategoricalStatsResult
  619. raw := NoMethod(*s)
  620. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  621. }
  622. // GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by
  623. // replacing a given number of characters with a
  624. // fixed character. Masking can start from the beginning or end of the
  625. // string.
  626. // This can be used on data of any type (numbers, longs, and so on) and
  627. // when
  628. // de-identifying structured data we'll attempt to preserve the original
  629. // data's
  630. // type. (This allows you to take a long like 123 and modify it to a
  631. // string like
  632. // **3.
  633. type GooglePrivacyDlpV2CharacterMaskConfig struct {
  634. // CharactersToIgnore: When masking a string, items in this list will be
  635. // skipped when replacing.
  636. // For example, if your string is 555-555-5555 and you ask us to skip
  637. // `-` and
  638. // mask 5 chars with * we would produce ***-*55-5555.
  639. CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"`
  640. // MaskingCharacter: Character to mask the sensitive values&mdash;for
  641. // example, "*" for an
  642. // alphabetic string such as name, or "0" for a numeric string such as
  643. // ZIP
  644. // code or credit card number. String must have length 1. If not
  645. // supplied, we
  646. // will default to "*" for strings, 0 for digits.
  647. MaskingCharacter string `json:"maskingCharacter,omitempty"`
  648. // NumberToMask: Number of characters to mask. If not set, all matching
  649. // chars will be
  650. // masked. Skipped characters do not count towards this tally.
  651. NumberToMask int64 `json:"numberToMask,omitempty"`
  652. // ReverseOrder: Mask characters in reverse order. For example, if
  653. // `masking_character` is
  654. // '0', number_to_mask is 14, and `reverse_order` is false,
  655. // then
  656. // 1234-5678-9012-3456 -> 00000000000000-3456
  657. // If `masking_character` is '*', `number_to_mask` is 3, and
  658. // `reverse_order`
  659. // is true, then 12345 -> 12***
  660. ReverseOrder bool `json:"reverseOrder,omitempty"`
  661. // ForceSendFields is a list of field names (e.g. "CharactersToIgnore")
  662. // to unconditionally include in API requests. By default, fields with
  663. // empty values are omitted from API requests. However, any non-pointer,
  664. // non-interface field appearing in ForceSendFields will be sent to the
  665. // server regardless of whether the field is empty or not. This may be
  666. // used to include empty fields in Patch requests.
  667. ForceSendFields []string `json:"-"`
  668. // NullFields is a list of field names (e.g. "CharactersToIgnore") to
  669. // include in API requests with the JSON null value. By default, fields
  670. // with empty values are omitted from API requests. However, any field
  671. // with an empty value appearing in NullFields will be sent to the
  672. // server as null. It is an error if a field in this list has a
  673. // non-empty value. This may be used to include null fields in Patch
  674. // requests.
  675. NullFields []string `json:"-"`
  676. }
  677. func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) {
  678. type NoMethod GooglePrivacyDlpV2CharacterMaskConfig
  679. raw := NoMethod(*s)
  680. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  681. }
  682. // GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing
  683. // deidentification of a value. These will be left
  684. // alone and skipped.
  685. type GooglePrivacyDlpV2CharsToIgnore struct {
  686. CharactersToSkip string `json:"charactersToSkip,omitempty"`
  687. // Possible values:
  688. // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED"
  689. // "NUMERIC" - 0-9
  690. // "ALPHA_UPPER_CASE" - A-Z
  691. // "ALPHA_LOWER_CASE" - a-z
  692. // "PUNCTUATION" - US Punctuation, one of
  693. // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  694. // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r]
  695. CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"`
  696. // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to
  697. // unconditionally include in API requests. By default, fields with
  698. // empty values are omitted from API requests. However, any non-pointer,
  699. // non-interface field appearing in ForceSendFields will be sent to the
  700. // server regardless of whether the field is empty or not. This may be
  701. // used to include empty fields in Patch requests.
  702. ForceSendFields []string `json:"-"`
  703. // NullFields is a list of field names (e.g. "CharactersToSkip") to
  704. // include in API requests with the JSON null value. By default, fields
  705. // with empty values are omitted from API requests. However, any field
  706. // with an empty value appearing in NullFields will be sent to the
  707. // server as null. It is an error if a field in this list has a
  708. // non-empty value. This may be used to include null fields in Patch
  709. // requests.
  710. NullFields []string `json:"-"`
  711. }
  712. func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) {
  713. type NoMethod GooglePrivacyDlpV2CharsToIgnore
  714. raw := NoMethod(*s)
  715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  716. }
  717. // GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a
  718. // set of files (path ending with *) within
  719. // a Google Cloud Storage bucket.
  720. type GooglePrivacyDlpV2CloudStorageOptions struct {
  721. // BytesLimitPerFile: Max number of bytes to scan from a file. If a
  722. // scanned file's size is bigger
  723. // than this value then the rest of the bytes are omitted.
  724. BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"`
  725. FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"`
  726. // FileTypes: List of file type groups to include in the scan.
  727. // If empty, all files are scanned and available data format
  728. // processors
  729. // are applied.
  730. //
  731. // Possible values:
  732. // "FILE_TYPE_UNSPECIFIED" - Includes all files.
  733. // "BINARY_FILE" - Includes all file extensions not covered by text
  734. // file types.
  735. // "TEXT_FILE" - Included file extensions:
  736. // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh,
  737. // hpp,
  738. // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js,
  739. // json,
  740. // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py,
  741. // pyw,
  742. // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs,
  743. // wml,
  744. // xml, xsl, xsd, yml, yaml.
  745. FileTypes []string `json:"fileTypes,omitempty"`
  746. // FilesLimitPercent: Limits the number of files to scan to this
  747. // percentage of the input FileSet.
  748. // Number of files scanned is rounded down. Must be between 0 and
  749. // 100,
  750. // inclusively. Both 0 and 100 means no limit. Defaults to 0.
  751. FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"`
  752. // Possible values:
  753. // "SAMPLE_METHOD_UNSPECIFIED"
  754. // "TOP" - Scan from the top (default).
  755. // "RANDOM_START" - For each file larger than bytes_limit_per_file,
  756. // randomly pick the offset
  757. // to start scanning. The scanned bytes are contiguous.
  758. SampleMethod string `json:"sampleMethod,omitempty"`
  759. // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile")
  760. // to unconditionally include in API requests. By default, fields with
  761. // empty values are omitted from API requests. However, any non-pointer,
  762. // non-interface field appearing in ForceSendFields will be sent to the
  763. // server regardless of whether the field is empty or not. This may be
  764. // used to include empty fields in Patch requests.
  765. ForceSendFields []string `json:"-"`
  766. // NullFields is a list of field names (e.g. "BytesLimitPerFile") to
  767. // include in API requests with the JSON null value. By default, fields
  768. // with empty values are omitted from API requests. However, any field
  769. // with an empty value appearing in NullFields will be sent to the
  770. // server as null. It is an error if a field in this list has a
  771. // non-empty value. This may be used to include null fields in Patch
  772. // requests.
  773. NullFields []string `json:"-"`
  774. }
  775. func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) {
  776. type NoMethod GooglePrivacyDlpV2CloudStorageOptions
  777. raw := NoMethod(*s)
  778. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  779. }
  780. // GooglePrivacyDlpV2CloudStoragePath: Message representing a single
  781. // file or path in Cloud Storage.
  782. type GooglePrivacyDlpV2CloudStoragePath struct {
  783. // Path: A url representing a file or path (no wildcards) in Cloud
  784. // Storage.
  785. // Example: gs://[BUCKET_NAME]/dictionary.txt
  786. Path string `json:"path,omitempty"`
  787. // ForceSendFields is a list of field names (e.g. "Path") to
  788. // unconditionally include in API requests. By default, fields with
  789. // empty values are omitted from API requests. However, any non-pointer,
  790. // non-interface field appearing in ForceSendFields will be sent to the
  791. // server regardless of whether the field is empty or not. This may be
  792. // used to include empty fields in Patch requests.
  793. ForceSendFields []string `json:"-"`
  794. // NullFields is a list of field names (e.g. "Path") to include in API
  795. // requests with the JSON null value. By default, fields with empty
  796. // values are omitted from API requests. However, any field with an
  797. // empty value appearing in NullFields will be sent to the server as
  798. // null. It is an error if a field in this list has a non-empty value.
  799. // This may be used to include null fields in Patch requests.
  800. NullFields []string `json:"-"`
  801. }
  802. func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) {
  803. type NoMethod GooglePrivacyDlpV2CloudStoragePath
  804. raw := NoMethod(*s)
  805. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  806. }
  807. // GooglePrivacyDlpV2Color: Represents a color in the RGB color space.
  808. type GooglePrivacyDlpV2Color struct {
  809. // Blue: The amount of blue in the color as a value in the interval [0,
  810. // 1].
  811. Blue float64 `json:"blue,omitempty"`
  812. // Green: The amount of green in the color as a value in the interval
  813. // [0, 1].
  814. Green float64 `json:"green,omitempty"`
  815. // Red: The amount of red in the color as a value in the interval [0,
  816. // 1].
  817. Red float64 `json:"red,omitempty"`
  818. // ForceSendFields is a list of field names (e.g. "Blue") to
  819. // unconditionally include in API requests. By default, fields with
  820. // empty values are omitted from API requests. However, any non-pointer,
  821. // non-interface field appearing in ForceSendFields will be sent to the
  822. // server regardless of whether the field is empty or not. This may be
  823. // used to include empty fields in Patch requests.
  824. ForceSendFields []string `json:"-"`
  825. // NullFields is a list of field names (e.g. "Blue") to include in API
  826. // requests with the JSON null value. By default, fields with empty
  827. // values are omitted from API requests. However, any field with an
  828. // empty value appearing in NullFields will be sent to the server as
  829. // null. It is an error if a field in this list has a non-empty value.
  830. // This may be used to include null fields in Patch requests.
  831. NullFields []string `json:"-"`
  832. }
  833. func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) {
  834. type NoMethod GooglePrivacyDlpV2Color
  835. raw := NoMethod(*s)
  836. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  837. }
  838. func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error {
  839. type NoMethod GooglePrivacyDlpV2Color
  840. var s1 struct {
  841. Blue gensupport.JSONFloat64 `json:"blue"`
  842. Green gensupport.JSONFloat64 `json:"green"`
  843. Red gensupport.JSONFloat64 `json:"red"`
  844. *NoMethod
  845. }
  846. s1.NoMethod = (*NoMethod)(s)
  847. if err := json.Unmarshal(data, &s1); err != nil {
  848. return err
  849. }
  850. s.Blue = float64(s1.Blue)
  851. s.Green = float64(s1.Green)
  852. s.Red = float64(s1.Red)
  853. return nil
  854. }
  855. // GooglePrivacyDlpV2Condition: The field type of `value` and `field` do
  856. // not need to match to be
  857. // considered equal, but not all comparisons are possible.
  858. //
  859. // A `value` of type:
  860. //
  861. // - `string` can be compared against all other types
  862. // - `boolean` can only be compared against other booleans
  863. // - `integer` can be compared against doubles or a string if the string
  864. // value
  865. // can be parsed as an integer.
  866. // - `double` can be compared against integers or a string if the string
  867. // can
  868. // be parsed as a double.
  869. // - `Timestamp` can be compared against strings in RFC 3339 date
  870. // string
  871. // format.
  872. // - `TimeOfDay` can be compared against timestamps and strings in the
  873. // format
  874. // of 'HH:mm:ss'.
  875. //
  876. // If we fail to compare do to type mismatch, a warning will be given
  877. // and
  878. // the condition will evaluate to false.
  879. type GooglePrivacyDlpV2Condition struct {
  880. // Field: Field within the record this condition is evaluated against.
  881. // [required]
  882. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  883. // Operator: Operator used to compare the field or infoType to the
  884. // value. [required]
  885. //
  886. // Possible values:
  887. // "RELATIONAL_OPERATOR_UNSPECIFIED"
  888. // "EQUAL_TO" - Equal.
  889. // "NOT_EQUAL_TO" - Not equal to.
  890. // "GREATER_THAN" - Greater than.
  891. // "LESS_THAN" - Less than.
  892. // "GREATER_THAN_OR_EQUALS" - Greater than or equals.
  893. // "LESS_THAN_OR_EQUALS" - Less than or equals.
  894. // "EXISTS" - Exists
  895. Operator string `json:"operator,omitempty"`
  896. // Value: Value to compare against. [Required, except for `EXISTS`
  897. // tests.]
  898. Value *GooglePrivacyDlpV2Value `json:"value,omitempty"`
  899. // ForceSendFields is a list of field names (e.g. "Field") to
  900. // unconditionally include in API requests. By default, fields with
  901. // empty values are omitted from API requests. However, any non-pointer,
  902. // non-interface field appearing in ForceSendFields will be sent to the
  903. // server regardless of whether the field is empty or not. This may be
  904. // used to include empty fields in Patch requests.
  905. ForceSendFields []string `json:"-"`
  906. // NullFields is a list of field names (e.g. "Field") to include in API
  907. // requests with the JSON null value. By default, fields with empty
  908. // values are omitted from API requests. However, any field with an
  909. // empty value appearing in NullFields will be sent to the server as
  910. // null. It is an error if a field in this list has a non-empty value.
  911. // This may be used to include null fields in Patch requests.
  912. NullFields []string `json:"-"`
  913. }
  914. func (s *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) {
  915. type NoMethod GooglePrivacyDlpV2Condition
  916. raw := NoMethod(*s)
  917. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  918. }
  919. // GooglePrivacyDlpV2Conditions: A collection of conditions.
  920. type GooglePrivacyDlpV2Conditions struct {
  921. Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"`
  922. // ForceSendFields is a list of field names (e.g. "Conditions") to
  923. // unconditionally include in API requests. By default, fields with
  924. // empty values are omitted from API requests. However, any non-pointer,
  925. // non-interface field appearing in ForceSendFields will be sent to the
  926. // server regardless of whether the field is empty or not. This may be
  927. // used to include empty fields in Patch requests.
  928. ForceSendFields []string `json:"-"`
  929. // NullFields is a list of field names (e.g. "Conditions") to include in
  930. // API requests with the JSON null value. By default, fields with empty
  931. // values are omitted from API requests. However, any field with an
  932. // empty value appearing in NullFields will be sent to the server as
  933. // null. It is an error if a field in this list has a non-empty value.
  934. // This may be used to include null fields in Patch requests.
  935. NullFields []string `json:"-"`
  936. }
  937. func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) {
  938. type NoMethod GooglePrivacyDlpV2Conditions
  939. raw := NoMethod(*s)
  940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  941. }
  942. // GooglePrivacyDlpV2ContentItem: Container structure for the content to
  943. // inspect.
  944. type GooglePrivacyDlpV2ContentItem struct {
  945. // ByteItem: Content data to inspect or redact. Replaces `type` and
  946. // `data`.
  947. ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"`
  948. // Table: Structured content for inspection.
  949. // See
  950. // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_tab
  951. // le to
  952. // learn more.
  953. Table *GooglePrivacyDlpV2Table `json:"table,omitempty"`
  954. // Value: String data to inspect or redact.
  955. Value string `json:"value,omitempty"`
  956. // ForceSendFields is a list of field names (e.g. "ByteItem") to
  957. // unconditionally include in API requests. By default, fields with
  958. // empty values are omitted from API requests. However, any non-pointer,
  959. // non-interface field appearing in ForceSendFields will be sent to the
  960. // server regardless of whether the field is empty or not. This may be
  961. // used to include empty fields in Patch requests.
  962. ForceSendFields []string `json:"-"`
  963. // NullFields is a list of field names (e.g. "ByteItem") to include in
  964. // API requests with the JSON null value. By default, fields with empty
  965. // values are omitted from API requests. However, any field with an
  966. // empty value appearing in NullFields will be sent to the server as
  967. // null. It is an error if a field in this list has a non-empty value.
  968. // This may be used to include null fields in Patch requests.
  969. NullFields []string `json:"-"`
  970. }
  971. func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) {
  972. type NoMethod GooglePrivacyDlpV2ContentItem
  973. raw := NoMethod(*s)
  974. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  975. }
  976. // GooglePrivacyDlpV2ContentLocation: Findings container location data.
  977. type GooglePrivacyDlpV2ContentLocation struct {
  978. // ContainerName: Name of the container where the finding is
  979. // located.
  980. // The top level name is the source file name or table name. Nested
  981. // names
  982. // could be absent if the embedded object has no string identifier
  983. // (for an example an image contained within a document).
  984. ContainerName string `json:"containerName,omitempty"`
  985. // ContainerTimestamp: Findings container modification timestamp, if
  986. // applicable.
  987. // For Google Cloud Storage contains last file modification
  988. // timestamp.
  989. // For BigQuery table contains last_modified_time property.
  990. // For Datastore - not populated.
  991. ContainerTimestamp string `json:"containerTimestamp,omitempty"`
  992. // ContainerVersion: Findings container version, if
  993. // available
  994. // ("generation" for Google Cloud Storage).
  995. ContainerVersion string `json:"containerVersion,omitempty"`
  996. // DocumentLocation: Location data for document files.
  997. DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"`
  998. // ImageLocation: Location within an image's pixels.
  999. ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"`
  1000. // RecordLocation: Location within a row or record of a database table.
  1001. RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"`
  1002. // ForceSendFields is a list of field names (e.g. "ContainerName") to
  1003. // unconditionally include in API requests. By default, fields with
  1004. // empty values are omitted from API requests. However, any non-pointer,
  1005. // non-interface field appearing in ForceSendFields will be sent to the
  1006. // server regardless of whether the field is empty or not. This may be
  1007. // used to include empty fields in Patch requests.
  1008. ForceSendFields []string `json:"-"`
  1009. // NullFields is a list of field names (e.g. "ContainerName") to include
  1010. // in API requests with the JSON null value. By default, fields with
  1011. // empty values are omitted from API requests. However, any field with
  1012. // an empty value appearing in NullFields will be sent to the server as
  1013. // null. It is an error if a field in this list has a non-empty value.
  1014. // This may be used to include null fields in Patch requests.
  1015. NullFields []string `json:"-"`
  1016. }
  1017. func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) {
  1018. type NoMethod GooglePrivacyDlpV2ContentLocation
  1019. raw := NoMethod(*s)
  1020. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1021. }
  1022. // GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message
  1023. // for CreateDeidentifyTemplate.
  1024. type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct {
  1025. // DeidentifyTemplate: The DeidentifyTemplate to create.
  1026. DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
  1027. // TemplateId: The template id can contain uppercase and lowercase
  1028. // letters,
  1029. // numbers, and hyphens; that is, it must match the regular
  1030. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  1031. // characters. Can be empty to allow the system to generate one.
  1032. TemplateId string `json:"templateId,omitempty"`
  1033. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate")
  1034. // to unconditionally include in API requests. By default, fields with
  1035. // empty values are omitted from API requests. However, any non-pointer,
  1036. // non-interface field appearing in ForceSendFields will be sent to the
  1037. // server regardless of whether the field is empty or not. This may be
  1038. // used to include empty fields in Patch requests.
  1039. ForceSendFields []string `json:"-"`
  1040. // NullFields is a list of field names (e.g. "DeidentifyTemplate") to
  1041. // include in API requests with the JSON null value. By default, fields
  1042. // with empty values are omitted from API requests. However, any field
  1043. // with an empty value appearing in NullFields will be sent to the
  1044. // server as null. It is an error if a field in this list has a
  1045. // non-empty value. This may be used to include null fields in Patch
  1046. // requests.
  1047. NullFields []string `json:"-"`
  1048. }
  1049. func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) {
  1050. type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
  1051. raw := NoMethod(*s)
  1052. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1053. }
  1054. // GooglePrivacyDlpV2CreateDlpJobRequest: Request message for
  1055. // CreateDlpJobRequest. Used to initiate long running
  1056. // jobs such as calculating risk metrics or inspecting Google
  1057. // Cloud
  1058. // Storage.
  1059. type GooglePrivacyDlpV2CreateDlpJobRequest struct {
  1060. InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"`
  1061. // JobId: The job id can contain uppercase and lowercase
  1062. // letters,
  1063. // numbers, and hyphens; that is, it must match the regular
  1064. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  1065. // characters. Can be empty to allow the system to generate one.
  1066. JobId string `json:"jobId,omitempty"`
  1067. RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"`
  1068. // ForceSendFields is a list of field names (e.g. "InspectJob") to
  1069. // unconditionally include in API requests. By default, fields with
  1070. // empty values are omitted from API requests. However, any non-pointer,
  1071. // non-interface field appearing in ForceSendFields will be sent to the
  1072. // server regardless of whether the field is empty or not. This may be
  1073. // used to include empty fields in Patch requests.
  1074. ForceSendFields []string `json:"-"`
  1075. // NullFields is a list of field names (e.g. "InspectJob") to include in
  1076. // API requests with the JSON null value. By default, fields with empty
  1077. // values are omitted from API requests. However, any field with an
  1078. // empty value appearing in NullFields will be sent to the server as
  1079. // null. It is an error if a field in this list has a non-empty value.
  1080. // This may be used to include null fields in Patch requests.
  1081. NullFields []string `json:"-"`
  1082. }
  1083. func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) {
  1084. type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest
  1085. raw := NoMethod(*s)
  1086. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1087. }
  1088. // GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for
  1089. // CreateInspectTemplate.
  1090. type GooglePrivacyDlpV2CreateInspectTemplateRequest struct {
  1091. // InspectTemplate: The InspectTemplate to create.
  1092. InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"`
  1093. // TemplateId: The template id can contain uppercase and lowercase
  1094. // letters,
  1095. // numbers, and hyphens; that is, it must match the regular
  1096. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  1097. // characters. Can be empty to allow the system to generate one.
  1098. TemplateId string `json:"templateId,omitempty"`
  1099. // ForceSendFields is a list of field names (e.g. "InspectTemplate") to
  1100. // unconditionally include in API requests. By default, fields with
  1101. // empty values are omitted from API requests. However, any non-pointer,
  1102. // non-interface field appearing in ForceSendFields will be sent to the
  1103. // server regardless of whether the field is empty or not. This may be
  1104. // used to include empty fields in Patch requests.
  1105. ForceSendFields []string `json:"-"`
  1106. // NullFields is a list of field names (e.g. "InspectTemplate") to
  1107. // include in API requests with the JSON null value. By default, fields
  1108. // with empty values are omitted from API requests. However, any field
  1109. // with an empty value appearing in NullFields will be sent to the
  1110. // server as null. It is an error if a field in this list has a
  1111. // non-empty value. This may be used to include null fields in Patch
  1112. // requests.
  1113. NullFields []string `json:"-"`
  1114. }
  1115. func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) {
  1116. type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest
  1117. raw := NoMethod(*s)
  1118. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1119. }
  1120. // GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for
  1121. // CreateJobTrigger.
  1122. type GooglePrivacyDlpV2CreateJobTriggerRequest struct {
  1123. // JobTrigger: The JobTrigger to create.
  1124. JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"`
  1125. // TriggerId: The trigger id can contain uppercase and lowercase
  1126. // letters,
  1127. // numbers, and hyphens; that is, it must match the regular
  1128. // expression: `[a-zA-Z\\d-]+`. The maximum length is 100
  1129. // characters. Can be empty to allow the system to generate one.
  1130. TriggerId string `json:"triggerId,omitempty"`
  1131. // ForceSendFields is a list of field names (e.g. "JobTrigger") to
  1132. // unconditionally include in API requests. By default, fields with
  1133. // empty values are omitted from API requests. However, any non-pointer,
  1134. // non-interface field appearing in ForceSendFields will be sent to the
  1135. // server regardless of whether the field is empty or not. This may be
  1136. // used to include empty fields in Patch requests.
  1137. ForceSendFields []string `json:"-"`
  1138. // NullFields is a list of field names (e.g. "JobTrigger") to include in
  1139. // API requests with the JSON null value. By default, fields with empty
  1140. // values are omitted from API requests. However, any field with an
  1141. // empty value appearing in NullFields will be sent to the server as
  1142. // null. It is an error if a field in this list has a non-empty value.
  1143. // This may be used to include null fields in Patch requests.
  1144. NullFields []string `json:"-"`
  1145. }
  1146. func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) {
  1147. type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest
  1148. raw := NoMethod(*s)
  1149. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1150. }
  1151. // GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that
  1152. // generates surrogates via cryptographic hashing.
  1153. // Uses SHA-256.
  1154. // The key size must be either 32 or 64 bytes.
  1155. // Outputs a 32 byte digest as an uppercase hex string
  1156. // (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
  1157. // Currently, only string and integer values can be hashed.
  1158. type GooglePrivacyDlpV2CryptoHashConfig struct {
  1159. // CryptoKey: The key used by the hash function.
  1160. CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
  1161. // ForceSendFields is a list of field names (e.g. "CryptoKey") to
  1162. // unconditionally include in API requests. By default, fields with
  1163. // empty values are omitted from API requests. However, any non-pointer,
  1164. // non-interface field appearing in ForceSendFields will be sent to the
  1165. // server regardless of whether the field is empty or not. This may be
  1166. // used to include empty fields in Patch requests.
  1167. ForceSendFields []string `json:"-"`
  1168. // NullFields is a list of field names (e.g. "CryptoKey") to include in
  1169. // API requests with the JSON null value. By default, fields with empty
  1170. // values are omitted from API requests. However, any field with an
  1171. // empty value appearing in NullFields will be sent to the server as
  1172. // null. It is an error if a field in this list has a non-empty value.
  1173. // This may be used to include null fields in Patch requests.
  1174. NullFields []string `json:"-"`
  1175. }
  1176. func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) {
  1177. type NoMethod GooglePrivacyDlpV2CryptoHashConfig
  1178. raw := NoMethod(*s)
  1179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1180. }
  1181. // GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as
  1182. // opposed to
  1183. // a key encryption key (KEK) stored by KMS).
  1184. // When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
  1185. // IAM policy on the KMS CryptoKey (KEK) to ensure an attacker
  1186. // cannot
  1187. // unwrap the data crypto key.
  1188. type GooglePrivacyDlpV2CryptoKey struct {
  1189. KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
  1190. Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"`
  1191. Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"`
  1192. // ForceSendFields is a list of field names (e.g. "KmsWrapped") to
  1193. // unconditionally include in API requests. By default, fields with
  1194. // empty values are omitted from API requests. However, any non-pointer,
  1195. // non-interface field appearing in ForceSendFields will be sent to the
  1196. // server regardless of whether the field is empty or not. This may be
  1197. // used to include empty fields in Patch requests.
  1198. ForceSendFields []string `json:"-"`
  1199. // NullFields is a list of field names (e.g. "KmsWrapped") to include in
  1200. // API requests with the JSON null value. By default, fields with empty
  1201. // values are omitted from API requests. However, any field with an
  1202. // empty value appearing in NullFields will be sent to the server as
  1203. // null. It is an error if a field in this list has a non-empty value.
  1204. // This may be used to include null fields in Patch requests.
  1205. NullFields []string `json:"-"`
  1206. }
  1207. func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) {
  1208. type NoMethod GooglePrivacyDlpV2CryptoKey
  1209. raw := NoMethod(*s)
  1210. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1211. }
  1212. // GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier
  1213. // with a surrogate using FPE with the FFX
  1214. // mode of operation; however when used in the `ReidentifyContent` API
  1215. // method,
  1216. // it serves the opposite function by reversing the surrogate back
  1217. // into
  1218. // the original identifier.
  1219. // The identifier must be encoded as ASCII.
  1220. // For a given crypto key and context, the same identifier will
  1221. // be
  1222. // replaced with the same surrogate.
  1223. // Identifiers must be at least two characters long.
  1224. // In the case that the identifier is the empty string, it will be
  1225. // skipped.
  1226. // See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
  1227. type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct {
  1228. // Possible values:
  1229. // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED"
  1230. // "NUMERIC" - [0-9] (radix of 10)
  1231. // "HEXADECIMAL" - [0-9A-F] (radix of 16)
  1232. // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36)
  1233. // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62)
  1234. CommonAlphabet string `json:"commonAlphabet,omitempty"`
  1235. // Context: The 'tweak', a context may be used for higher security since
  1236. // the same
  1237. // identifier in two different contexts won't be given the same
  1238. // surrogate. If
  1239. // the context is not set, a default tweak will be used.
  1240. //
  1241. // If the context is set but:
  1242. //
  1243. // 1. there is no record present when transforming a given value or
  1244. // 1. the field is not present when transforming a given value,
  1245. //
  1246. // a default tweak will be used.
  1247. //
  1248. // Note that case (1) is expected when an `InfoTypeTransformation`
  1249. // is
  1250. // applied to both structured and non-structured
  1251. // `ContentItem`s.
  1252. // Currently, the referenced field may be of value type integer or
  1253. // string.
  1254. //
  1255. // The tweak is constructed as a sequence of bytes in big endian byte
  1256. // order
  1257. // such that:
  1258. //
  1259. // - a 64 bit integer is encoded followed by a single byte of value 1
  1260. // - a string is encoded in UTF-8 format followed by a single byte of
  1261. // value 2
  1262. Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"`
  1263. // CryptoKey: The key used by the encryption algorithm. [required]
  1264. CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
  1265. // CustomAlphabet: This is supported by mapping these to the
  1266. // alphanumeric characters
  1267. // that the FFX mode natively supports. This happens
  1268. // before/after
  1269. // encryption/decryption.
  1270. // Each character listed must appear only once.
  1271. // Number of characters must be in the range [2, 62].
  1272. // This must be encoded as ASCII.
  1273. // The order of characters does not matter.
  1274. CustomAlphabet string `json:"customAlphabet,omitempty"`
  1275. // Radix: The native way to select the alphabet. Must be in the range
  1276. // [2, 62].
  1277. Radix int64 `json:"radix,omitempty"`
  1278. // SurrogateInfoType: The custom infoType to annotate the surrogate
  1279. // with.
  1280. // This annotation will be applied to the surrogate by prefixing it
  1281. // with
  1282. // the name of the custom infoType followed by the number of
  1283. // characters comprising the surrogate. The following scheme defines
  1284. // the
  1285. // format: info_type_name(surrogate_character_count):surrogate
  1286. //
  1287. // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE'
  1288. // and
  1289. // the surrogate is 'abc', the full replacement value
  1290. // will be: 'MY_TOKEN_INFO_TYPE(3):abc'
  1291. //
  1292. // This annotation identifies the surrogate when inspecting content
  1293. // using the
  1294. // custom
  1295. // infoType
  1296. // [`SurrogateType`](/dlp/docs/reference/rest/v2/InspectConfig#s
  1297. // urrogatetype).
  1298. // This facilitates reversal of the surrogate when it occurs in free
  1299. // text.
  1300. //
  1301. // In order for inspection to work properly, the name of this infoType
  1302. // must
  1303. // not occur naturally anywhere in your data; otherwise, inspection
  1304. // may
  1305. // find a surrogate that does not correspond to an actual
  1306. // identifier.
  1307. // Therefore, choose your custom infoType name carefully after
  1308. // considering
  1309. // what your data looks like. One way to select a name that has a high
  1310. // chance
  1311. // of yielding reliable detection is to include one or more unicode
  1312. // characters
  1313. // that are highly improbable to exist in your data.
  1314. // For example, assuming your data is entered from a regular ASCII
  1315. // keyboard,
  1316. // the symbol with the hex code point 29DD might be used like
  1317. // so:
  1318. // ⧝MY_TOKEN_TYPE
  1319. SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"`
  1320. // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to
  1321. // unconditionally include in API requests. By default, fields with
  1322. // empty values are omitted from API requests. However, any non-pointer,
  1323. // non-interface field appearing in ForceSendFields will be sent to the
  1324. // server regardless of whether the field is empty or not. This may be
  1325. // used to include empty fields in Patch requests.
  1326. ForceSendFields []string `json:"-"`
  1327. // NullFields is a list of field names (e.g. "CommonAlphabet") to
  1328. // include in API requests with the JSON null value. By default, fields
  1329. // with empty values are omitted from API requests. However, any field
  1330. // with an empty value appearing in NullFields will be sent to the
  1331. // server as null. It is an error if a field in this list has a
  1332. // non-empty value. This may be used to include null fields in Patch
  1333. // requests.
  1334. NullFields []string `json:"-"`
  1335. }
  1336. func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) {
  1337. type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig
  1338. raw := NoMethod(*s)
  1339. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1340. }
  1341. // GooglePrivacyDlpV2CustomInfoType: Custom information type provided by
  1342. // the user. Used to find domain-specific
  1343. // sensitive information configurable to the data in question.
  1344. type GooglePrivacyDlpV2CustomInfoType struct {
  1345. // DetectionRules: Set of detection rules to apply to all findings of
  1346. // this CustomInfoType.
  1347. // Rules are applied in order that they are specified. Not supported for
  1348. // the
  1349. // `surrogate_type` CustomInfoType.
  1350. DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"`
  1351. // Dictionary: A list of phrases to detect as a CustomInfoType.
  1352. Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"`
  1353. // InfoType: All CustomInfoTypes must have a name
  1354. // that does not conflict with built-in InfoTypes or other
  1355. // CustomInfoTypes.
  1356. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  1357. // Likelihood: Likelihood to return for this CustomInfoType. This base
  1358. // value can be
  1359. // altered by a detection rule if the finding meets the criteria
  1360. // specified by
  1361. // the rule. Defaults to `VERY_LIKELY` if not specified.
  1362. //
  1363. // Possible values:
  1364. // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
  1365. // "VERY_UNLIKELY" - Few matching elements.
  1366. // "UNLIKELY"
  1367. // "POSSIBLE" - Some matching elements.
  1368. // "LIKELY"
  1369. // "VERY_LIKELY" - Many matching elements.
  1370. Likelihood string `json:"likelihood,omitempty"`
  1371. // Regex: Regular expression based CustomInfoType.
  1372. Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"`
  1373. // SurrogateType: Message for detecting output from deidentification
  1374. // transformations that
  1375. // support reversing.
  1376. SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"`
  1377. // ForceSendFields is a list of field names (e.g. "DetectionRules") to
  1378. // unconditionally include in API requests. By default, fields with
  1379. // empty values are omitted from API requests. However, any non-pointer,
  1380. // non-interface field appearing in ForceSendFields will be sent to the
  1381. // server regardless of whether the field is empty or not. This may be
  1382. // used to include empty fields in Patch requests.
  1383. ForceSendFields []string `json:"-"`
  1384. // NullFields is a list of field names (e.g. "DetectionRules") to
  1385. // include in API requests with the JSON null value. By default, fields
  1386. // with empty values are omitted from API requests. However, any field
  1387. // with an empty value appearing in NullFields will be sent to the
  1388. // server as null. It is an error if a field in this list has a
  1389. // non-empty value. This may be used to include null fields in Patch
  1390. // requests.
  1391. NullFields []string `json:"-"`
  1392. }
  1393. func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) {
  1394. type NoMethod GooglePrivacyDlpV2CustomInfoType
  1395. raw := NoMethod(*s)
  1396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1397. }
  1398. // GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud
  1399. // Datastore.
  1400. type GooglePrivacyDlpV2DatastoreKey struct {
  1401. // EntityKey: Datastore entity key.
  1402. EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"`
  1403. // ForceSendFields is a list of field names (e.g. "EntityKey") to
  1404. // unconditionally include in API requests. By default, fields with
  1405. // empty values are omitted from API requests. However, any non-pointer,
  1406. // non-interface field appearing in ForceSendFields will be sent to the
  1407. // server regardless of whether the field is empty or not. This may be
  1408. // used to include empty fields in Patch requests.
  1409. ForceSendFields []string `json:"-"`
  1410. // NullFields is a list of field names (e.g. "EntityKey") to include in
  1411. // API requests with the JSON null value. By default, fields with empty
  1412. // values are omitted from API requests. However, any field with an
  1413. // empty value appearing in NullFields will be sent to the server as
  1414. // null. It is an error if a field in this list has a non-empty value.
  1415. // This may be used to include null fields in Patch requests.
  1416. NullFields []string `json:"-"`
  1417. }
  1418. func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) {
  1419. type NoMethod GooglePrivacyDlpV2DatastoreKey
  1420. raw := NoMethod(*s)
  1421. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1422. }
  1423. // GooglePrivacyDlpV2DatastoreOptions: Options defining a data set
  1424. // within Google Cloud Datastore.
  1425. type GooglePrivacyDlpV2DatastoreOptions struct {
  1426. // Kind: The kind to process.
  1427. Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"`
  1428. // PartitionId: A partition ID identifies a grouping of entities. The
  1429. // grouping is always
  1430. // by project and namespace, however the namespace ID may be empty.
  1431. PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"`
  1432. // ForceSendFields is a list of field names (e.g. "Kind") to
  1433. // unconditionally include in API requests. By default, fields with
  1434. // empty values are omitted from API requests. However, any non-pointer,
  1435. // non-interface field appearing in ForceSendFields will be sent to the
  1436. // server regardless of whether the field is empty or not. This may be
  1437. // used to include empty fields in Patch requests.
  1438. ForceSendFields []string `json:"-"`
  1439. // NullFields is a list of field names (e.g. "Kind") to include in API
  1440. // requests with the JSON null value. By default, fields with empty
  1441. // values are omitted from API requests. However, any field with an
  1442. // empty value appearing in NullFields will be sent to the server as
  1443. // null. It is an error if a field in this list has a non-empty value.
  1444. // This may be used to include null fields in Patch requests.
  1445. NullFields []string `json:"-"`
  1446. }
  1447. func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) {
  1448. type NoMethod GooglePrivacyDlpV2DatastoreOptions
  1449. raw := NoMethod(*s)
  1450. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1451. }
  1452. // GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of
  1453. // days, with option to be consistent for the
  1454. // same context. See
  1455. // https://cloud.google.com/dlp/docs/concepts-date-shifting
  1456. // to learn more.
  1457. type GooglePrivacyDlpV2DateShiftConfig struct {
  1458. // Context: Points to the field that contains the context, for example,
  1459. // an entity id.
  1460. // If set, must also set method. If set, shift will be consistent for
  1461. // the
  1462. // given context.
  1463. Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"`
  1464. // CryptoKey: Causes the shift to be computed based on this key and the
  1465. // context. This
  1466. // results in the same shift for the same context and crypto_key.
  1467. CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
  1468. // LowerBoundDays: For example, -5 means shift date to at most 5 days
  1469. // back in the past.
  1470. // [Required]
  1471. LowerBoundDays int64 `json:"lowerBoundDays,omitempty"`
  1472. // UpperBoundDays: Range of shift in days. Actual shift will be selected
  1473. // at random within this
  1474. // range (inclusive ends). Negative means shift to earlier in time. Must
  1475. // not
  1476. // be more than 365250 days (1000 years) each direction.
  1477. //
  1478. // For example, 3 means shift date to at most 3 days into the
  1479. // future.
  1480. // [Required]
  1481. UpperBoundDays int64 `json:"upperBoundDays,omitempty"`
  1482. // ForceSendFields is a list of field names (e.g. "Context") to
  1483. // unconditionally include in API requests. By default, fields with
  1484. // empty values are omitted from API requests. However, any non-pointer,
  1485. // non-interface field appearing in ForceSendFields will be sent to the
  1486. // server regardless of whether the field is empty or not. This may be
  1487. // used to include empty fields in Patch requests.
  1488. ForceSendFields []string `json:"-"`
  1489. // NullFields is a list of field names (e.g. "Context") to include in
  1490. // API requests with the JSON null value. By default, fields with empty
  1491. // values are omitted from API requests. However, any field with an
  1492. // empty value appearing in NullFields will be sent to the server as
  1493. // null. It is an error if a field in this list has a non-empty value.
  1494. // This may be used to include null fields in Patch requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) {
  1498. type NoMethod GooglePrivacyDlpV2DateShiftConfig
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. // GooglePrivacyDlpV2DateTime: Message for a date time object.
  1503. type GooglePrivacyDlpV2DateTime struct {
  1504. // Date: One or more of the following must be set. All fields are
  1505. // optional, but
  1506. // when set must be valid date or time values.
  1507. Date *GoogleTypeDate `json:"date,omitempty"`
  1508. // Possible values:
  1509. // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week.
  1510. // "MONDAY" - The day-of-week of Monday.
  1511. // "TUESDAY" - The day-of-week of Tuesday.
  1512. // "WEDNESDAY" - The day-of-week of Wednesday.
  1513. // "THURSDAY" - The day-of-week of Thursday.
  1514. // "FRIDAY" - The day-of-week of Friday.
  1515. // "SATURDAY" - The day-of-week of Saturday.
  1516. // "SUNDAY" - The day-of-week of Sunday.
  1517. DayOfWeek string `json:"dayOfWeek,omitempty"`
  1518. Time *GoogleTypeTimeOfDay `json:"time,omitempty"`
  1519. TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"`
  1520. // ForceSendFields is a list of field names (e.g. "Date") to
  1521. // unconditionally include in API requests. By default, fields with
  1522. // empty values are omitted from API requests. However, any non-pointer,
  1523. // non-interface field appearing in ForceSendFields will be sent to the
  1524. // server regardless of whether the field is empty or not. This may be
  1525. // used to include empty fields in Patch requests.
  1526. ForceSendFields []string `json:"-"`
  1527. // NullFields is a list of field names (e.g. "Date") to include in API
  1528. // requests with the JSON null value. By default, fields with empty
  1529. // values are omitted from API requests. However, any field with an
  1530. // empty value appearing in NullFields will be sent to the server as
  1531. // null. It is an error if a field in this list has a non-empty value.
  1532. // This may be used to include null fields in Patch requests.
  1533. NullFields []string `json:"-"`
  1534. }
  1535. func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) {
  1536. type NoMethod GooglePrivacyDlpV2DateTime
  1537. raw := NoMethod(*s)
  1538. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1539. }
  1540. // GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls
  1541. // how the data will change.
  1542. type GooglePrivacyDlpV2DeidentifyConfig struct {
  1543. // InfoTypeTransformations: Treat the dataset as free-form text and
  1544. // apply the same free text
  1545. // transformation everywhere.
  1546. InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  1547. // RecordTransformations: Treat the dataset as structured.
  1548. // Transformations can be applied to
  1549. // specific locations within structured datasets, such as transforming
  1550. // a column within a table.
  1551. RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"`
  1552. // ForceSendFields is a list of field names (e.g.
  1553. // "InfoTypeTransformations") to unconditionally include in API
  1554. // requests. By default, fields with empty values are omitted from API
  1555. // requests. However, any non-pointer, non-interface field appearing in
  1556. // ForceSendFields will be sent to the server regardless of whether the
  1557. // field is empty or not. This may be used to include empty fields in
  1558. // Patch requests.
  1559. ForceSendFields []string `json:"-"`
  1560. // NullFields is a list of field names (e.g. "InfoTypeTransformations")
  1561. // to include in API requests with the JSON null value. By default,
  1562. // fields with empty values are omitted from API requests. However, any
  1563. // field with an empty value appearing in NullFields will be sent to the
  1564. // server as null. It is an error if a field in this list has a
  1565. // non-empty value. This may be used to include null fields in Patch
  1566. // requests.
  1567. NullFields []string `json:"-"`
  1568. }
  1569. func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) {
  1570. type NoMethod GooglePrivacyDlpV2DeidentifyConfig
  1571. raw := NoMethod(*s)
  1572. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1573. }
  1574. // GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a
  1575. // list of items.
  1576. type GooglePrivacyDlpV2DeidentifyContentRequest struct {
  1577. // DeidentifyConfig: Configuration for the de-identification of the
  1578. // content item.
  1579. // Items specified here will override the template referenced by
  1580. // the
  1581. // deidentify_template_name argument.
  1582. DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
  1583. // DeidentifyTemplateName: Optional template to use. Any configuration
  1584. // directly specified in
  1585. // deidentify_config will override those set in the template. Singular
  1586. // fields
  1587. // that are set in this request will replace their corresponding fields
  1588. // in the
  1589. // template. Repeated fields are appended. Singular sub-messages and
  1590. // groups
  1591. // are recursively merged.
  1592. DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"`
  1593. // InspectConfig: Configuration for the inspector.
  1594. // Items specified here will override the template referenced by
  1595. // the
  1596. // inspect_template_name argument.
  1597. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  1598. // InspectTemplateName: Optional template to use. Any configuration
  1599. // directly specified in
  1600. // inspect_config will override those set in the template. Singular
  1601. // fields
  1602. // that are set in this request will replace their corresponding fields
  1603. // in the
  1604. // template. Repeated fields are appended. Singular sub-messages and
  1605. // groups
  1606. // are recursively merged.
  1607. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  1608. // Item: The item to de-identify. Will be treated as text.
  1609. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
  1610. // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to
  1611. // unconditionally include in API requests. By default, fields with
  1612. // empty values are omitted from API requests. However, any non-pointer,
  1613. // non-interface field appearing in ForceSendFields will be sent to the
  1614. // server regardless of whether the field is empty or not. This may be
  1615. // used to include empty fields in Patch requests.
  1616. ForceSendFields []string `json:"-"`
  1617. // NullFields is a list of field names (e.g. "DeidentifyConfig") to
  1618. // include in API requests with the JSON null value. By default, fields
  1619. // with empty values are omitted from API requests. However, any field
  1620. // with an empty value appearing in NullFields will be sent to the
  1621. // server as null. It is an error if a field in this list has a
  1622. // non-empty value. This may be used to include null fields in Patch
  1623. // requests.
  1624. NullFields []string `json:"-"`
  1625. }
  1626. func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) {
  1627. type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest
  1628. raw := NoMethod(*s)
  1629. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1630. }
  1631. // GooglePrivacyDlpV2DeidentifyContentResponse: Results of
  1632. // de-identifying a ContentItem.
  1633. type GooglePrivacyDlpV2DeidentifyContentResponse struct {
  1634. // Item: The de-identified item.
  1635. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
  1636. // Overview: An overview of the changes that were made on the `item`.
  1637. Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"`
  1638. // ServerResponse contains the HTTP response code and headers from the
  1639. // server.
  1640. googleapi.ServerResponse `json:"-"`
  1641. // ForceSendFields is a list of field names (e.g. "Item") to
  1642. // unconditionally include in API requests. By default, fields with
  1643. // empty values are omitted from API requests. However, any non-pointer,
  1644. // non-interface field appearing in ForceSendFields will be sent to the
  1645. // server regardless of whether the field is empty or not. This may be
  1646. // used to include empty fields in Patch requests.
  1647. ForceSendFields []string `json:"-"`
  1648. // NullFields is a list of field names (e.g. "Item") to include in API
  1649. // requests with the JSON null value. By default, fields with empty
  1650. // values are omitted from API requests. However, any field with an
  1651. // empty value appearing in NullFields will be sent to the server as
  1652. // null. It is an error if a field in this list has a non-empty value.
  1653. // This may be used to include null fields in Patch requests.
  1654. NullFields []string `json:"-"`
  1655. }
  1656. func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) {
  1657. type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse
  1658. raw := NoMethod(*s)
  1659. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1660. }
  1661. // GooglePrivacyDlpV2DeidentifyTemplate: The DeidentifyTemplates
  1662. // contains instructions on how to deidentify content.
  1663. // See https://cloud.google.com/dlp/docs/concepts-templates to learn
  1664. // more.
  1665. type GooglePrivacyDlpV2DeidentifyTemplate struct {
  1666. // CreateTime: The creation timestamp of a inspectTemplate, output only
  1667. // field.
  1668. CreateTime string `json:"createTime,omitempty"`
  1669. // DeidentifyConfig: ///////////// // The core content of the template
  1670. // // ///////////////
  1671. DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
  1672. // Description: Short description (max 256 chars).
  1673. Description string `json:"description,omitempty"`
  1674. // DisplayName: Display name (max 256 chars).
  1675. DisplayName string `json:"displayName,omitempty"`
  1676. // Name: The template name. Output only.
  1677. //
  1678. // The template will have one of the following
  1679. // formats:
  1680. // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID`
  1681. // OR
  1682. // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
  1683. Name string `json:"name,omitempty"`
  1684. // UpdateTime: The last update timestamp of a inspectTemplate, output
  1685. // only field.
  1686. UpdateTime string `json:"updateTime,omitempty"`
  1687. // ServerResponse contains the HTTP response code and headers from the
  1688. // server.
  1689. googleapi.ServerResponse `json:"-"`
  1690. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  1691. // unconditionally include in API requests. By default, fields with
  1692. // empty values are omitted from API requests. However, any non-pointer,
  1693. // non-interface field appearing in ForceSendFields will be sent to the
  1694. // server regardless of whether the field is empty or not. This may be
  1695. // used to include empty fields in Patch requests.
  1696. ForceSendFields []string `json:"-"`
  1697. // NullFields is a list of field names (e.g. "CreateTime") to include in
  1698. // API requests with the JSON null value. By default, fields with empty
  1699. // values are omitted from API requests. However, any field with an
  1700. // empty value appearing in NullFields will be sent to the server as
  1701. // null. It is an error if a field in this list has a non-empty value.
  1702. // This may be used to include null fields in Patch requests.
  1703. NullFields []string `json:"-"`
  1704. }
  1705. func (s *GooglePrivacyDlpV2DeidentifyTemplate) MarshalJSON() ([]byte, error) {
  1706. type NoMethod GooglePrivacyDlpV2DeidentifyTemplate
  1707. raw := NoMethod(*s)
  1708. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1709. }
  1710. // GooglePrivacyDlpV2DeltaPresenceEstimationConfig: δ-presence metric,
  1711. // used to estimate how likely it is for an attacker to
  1712. // figure out that one given individual appears in a de-identified
  1713. // dataset.
  1714. // Similarly to the k-map metric, we cannot compute δ-presence exactly
  1715. // without
  1716. // knowing the attack dataset, so we use a statistical model instead.
  1717. type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct {
  1718. // AuxiliaryTables: Several auxiliary tables can be used in the
  1719. // analysis. Each custom_tag
  1720. // used to tag a quasi-identifiers field must appear in exactly
  1721. // one
  1722. // field of one auxiliary table.
  1723. AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"`
  1724. // QuasiIds: Fields considered to be quasi-identifiers. No two fields
  1725. // can have the
  1726. // same tag. [required]
  1727. QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"`
  1728. // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
  1729. // modeling.
  1730. // Required if no column is tagged with a region-specific InfoType
  1731. // (like
  1732. // US_ZIP_5) or a region code.
  1733. RegionCode string `json:"regionCode,omitempty"`
  1734. // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
  1735. // unconditionally include in API requests. By default, fields with
  1736. // empty values are omitted from API requests. However, any non-pointer,
  1737. // non-interface field appearing in ForceSendFields will be sent to the
  1738. // server regardless of whether the field is empty or not. This may be
  1739. // used to include empty fields in Patch requests.
  1740. ForceSendFields []string `json:"-"`
  1741. // NullFields is a list of field names (e.g. "AuxiliaryTables") to
  1742. // include in API requests with the JSON null value. By default, fields
  1743. // with empty values are omitted from API requests. However, any field
  1744. // with an empty value appearing in NullFields will be sent to the
  1745. // server as null. It is an error if a field in this list has a
  1746. // non-empty value. This may be used to include null fields in Patch
  1747. // requests.
  1748. NullFields []string `json:"-"`
  1749. }
  1750. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) {
  1751. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig
  1752. raw := NoMethod(*s)
  1753. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1754. }
  1755. // GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A
  1756. // DeltaPresenceEstimationHistogramBucket message with the
  1757. // following
  1758. // values:
  1759. // min_probability: 0.1
  1760. // max_probability: 0.2
  1761. // frequency: 42
  1762. // means that there are 42 records for which δ is in [0.1, 0.2).
  1763. // An
  1764. // important particular case is when min_probability = max_probability =
  1765. // 1:
  1766. // then, every individual who shares this quasi-identifier combination
  1767. // is in
  1768. // the dataset.
  1769. type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct {
  1770. // BucketSize: Number of records within these probability bounds.
  1771. BucketSize int64 `json:"bucketSize,omitempty,string"`
  1772. // BucketValueCount: Total number of distinct quasi-identifier tuple
  1773. // values in this bucket.
  1774. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  1775. // BucketValues: Sample of quasi-identifier tuple values in this bucket.
  1776. // The total
  1777. // number of classes returned per bucket is capped at 20.
  1778. BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"`
  1779. // MaxProbability: Always greater than or equal to min_probability.
  1780. MaxProbability float64 `json:"maxProbability,omitempty"`
  1781. // MinProbability: Between 0 and 1.
  1782. MinProbability float64 `json:"minProbability,omitempty"`
  1783. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  1784. // unconditionally include in API requests. By default, fields with
  1785. // empty values are omitted from API requests. However, any non-pointer,
  1786. // non-interface field appearing in ForceSendFields will be sent to the
  1787. // server regardless of whether the field is empty or not. This may be
  1788. // used to include empty fields in Patch requests.
  1789. ForceSendFields []string `json:"-"`
  1790. // NullFields is a list of field names (e.g. "BucketSize") to include in
  1791. // API requests with the JSON null value. By default, fields with empty
  1792. // values are omitted from API requests. However, any field with an
  1793. // empty value appearing in NullFields will be sent to the server as
  1794. // null. It is an error if a field in this list has a non-empty value.
  1795. // This may be used to include null fields in Patch requests.
  1796. NullFields []string `json:"-"`
  1797. }
  1798. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
  1799. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket
  1800. raw := NoMethod(*s)
  1801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1802. }
  1803. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error {
  1804. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket
  1805. var s1 struct {
  1806. MaxProbability gensupport.JSONFloat64 `json:"maxProbability"`
  1807. MinProbability gensupport.JSONFloat64 `json:"minProbability"`
  1808. *NoMethod
  1809. }
  1810. s1.NoMethod = (*NoMethod)(s)
  1811. if err := json.Unmarshal(data, &s1); err != nil {
  1812. return err
  1813. }
  1814. s.MaxProbability = float64(s1.MaxProbability)
  1815. s.MinProbability = float64(s1.MinProbability)
  1816. return nil
  1817. }
  1818. // GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of
  1819. // values for the quasi-identifier columns.
  1820. type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct {
  1821. // EstimatedProbability: The estimated probability that a given
  1822. // individual sharing these
  1823. // quasi-identifier values is in the dataset. This value, typically
  1824. // called
  1825. // δ, is the ratio between the number of records in the dataset with
  1826. // these
  1827. // quasi-identifier values, and the total number of individuals
  1828. // (inside
  1829. // *and* outside the dataset) with these quasi-identifier values.
  1830. // For example, if there are 15 individuals in the dataset who share
  1831. // the
  1832. // same quasi-identifier values, and an estimated 100 people in the
  1833. // entire
  1834. // population with these values, then δ is 0.15.
  1835. EstimatedProbability float64 `json:"estimatedProbability,omitempty"`
  1836. // QuasiIdsValues: The quasi-identifier values.
  1837. QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"`
  1838. // ForceSendFields is a list of field names (e.g.
  1839. // "EstimatedProbability") to unconditionally include in API requests.
  1840. // By default, fields with empty values are omitted from API requests.
  1841. // However, any non-pointer, non-interface field appearing in
  1842. // ForceSendFields will be sent to the server regardless of whether the
  1843. // field is empty or not. This may be used to include empty fields in
  1844. // Patch requests.
  1845. ForceSendFields []string `json:"-"`
  1846. // NullFields is a list of field names (e.g. "EstimatedProbability") to
  1847. // include in API requests with the JSON null value. By default, fields
  1848. // with empty values are omitted from API requests. However, any field
  1849. // with an empty value appearing in NullFields will be sent to the
  1850. // server as null. It is an error if a field in this list has a
  1851. // non-empty value. This may be used to include null fields in Patch
  1852. // requests.
  1853. NullFields []string `json:"-"`
  1854. }
  1855. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
  1856. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues
  1857. raw := NoMethod(*s)
  1858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1859. }
  1860. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error {
  1861. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues
  1862. var s1 struct {
  1863. EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"`
  1864. *NoMethod
  1865. }
  1866. s1.NoMethod = (*NoMethod)(s)
  1867. if err := json.Unmarshal(data, &s1); err != nil {
  1868. return err
  1869. }
  1870. s.EstimatedProbability = float64(s1.EstimatedProbability)
  1871. return nil
  1872. }
  1873. // GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the
  1874. // δ-presence computation. Note that these results are an
  1875. // estimation, not exact values.
  1876. type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct {
  1877. // DeltaPresenceEstimationHistogram: The intervals [min_probability,
  1878. // max_probability) do not overlap. If a
  1879. // value doesn't correspond to any such interval, the associated
  1880. // frequency
  1881. // is zero. For example, the following records:
  1882. // {min_probability: 0, max_probability: 0.1, frequency: 17}
  1883. // {min_probability: 0.2, max_probability: 0.3, frequency: 42}
  1884. // {min_probability: 0.3, max_probability: 0.4, frequency: 99}
  1885. // mean that there are no record with an estimated probability in [0.1,
  1886. // 0.2)
  1887. // nor larger or equal to 0.4.
  1888. DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"`
  1889. // ForceSendFields is a list of field names (e.g.
  1890. // "DeltaPresenceEstimationHistogram") to unconditionally include in API
  1891. // requests. By default, fields with empty values are omitted from API
  1892. // requests. However, any non-pointer, non-interface field appearing in
  1893. // ForceSendFields will be sent to the server regardless of whether the
  1894. // field is empty or not. This may be used to include empty fields in
  1895. // Patch requests.
  1896. ForceSendFields []string `json:"-"`
  1897. // NullFields is a list of field names (e.g.
  1898. // "DeltaPresenceEstimationHistogram") to include in API requests with
  1899. // the JSON null value. By default, fields with empty values are omitted
  1900. // from API requests. However, any field with an empty value appearing
  1901. // in NullFields will be sent to the server as null. It is an error if a
  1902. // field in this list has a non-empty value. This may be used to include
  1903. // null fields in Patch requests.
  1904. NullFields []string `json:"-"`
  1905. }
  1906. func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) {
  1907. type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult
  1908. raw := NoMethod(*s)
  1909. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1910. }
  1911. // GooglePrivacyDlpV2DetectionRule: Rule for modifying a CustomInfoType
  1912. // to alter behavior under certain
  1913. // circumstances, depending on the specific details of the rule. Not
  1914. // supported
  1915. // for the `surrogate_type` custom info type.
  1916. type GooglePrivacyDlpV2DetectionRule struct {
  1917. // HotwordRule: Hotword-based detection rule.
  1918. HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"`
  1919. // ForceSendFields is a list of field names (e.g. "HotwordRule") to
  1920. // unconditionally include in API requests. By default, fields with
  1921. // empty values are omitted from API requests. However, any non-pointer,
  1922. // non-interface field appearing in ForceSendFields will be sent to the
  1923. // server regardless of whether the field is empty or not. This may be
  1924. // used to include empty fields in Patch requests.
  1925. ForceSendFields []string `json:"-"`
  1926. // NullFields is a list of field names (e.g. "HotwordRule") to include
  1927. // in API requests with the JSON null value. By default, fields with
  1928. // empty values are omitted from API requests. However, any field with
  1929. // an empty value appearing in NullFields will be sent to the server as
  1930. // null. It is an error if a field in this list has a non-empty value.
  1931. // This may be used to include null fields in Patch requests.
  1932. NullFields []string `json:"-"`
  1933. }
  1934. func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) {
  1935. type NoMethod GooglePrivacyDlpV2DetectionRule
  1936. raw := NoMethod(*s)
  1937. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1938. }
  1939. // GooglePrivacyDlpV2Dictionary: Custom information type based on a
  1940. // dictionary of words or phrases. This can
  1941. // be used to match sensitive information specific to the data, such as
  1942. // a list
  1943. // of employee IDs or job titles.
  1944. //
  1945. // Dictionary words are case-insensitive and all characters other than
  1946. // letters
  1947. // and digits in the unicode [Basic
  1948. // Multilingual
  1949. // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#
  1950. // Basic_Multilingual_Plane)
  1951. // will be replaced with whitespace when scanning for matches, so
  1952. // the
  1953. // dictionary phrase "Sam Johnson" will match all three phrases "sam
  1954. // johnson",
  1955. // "Sam, Johnson", and "Sam (Johnson)". Additionally, the
  1956. // characters
  1957. // surrounding any match must be of a different type than the
  1958. // adjacent
  1959. // characters within the word, so letters must be next to non-letters
  1960. // and
  1961. // digits next to non-digits. For example, the dictionary word "jen"
  1962. // will
  1963. // match the first three letters of the text "jen123" but will return
  1964. // no
  1965. // matches for "jennifer".
  1966. //
  1967. // Dictionary words containing a large number of characters that are
  1968. // not
  1969. // letters or digits may result in unexpected findings because such
  1970. // characters
  1971. // are treated as whitespace.
  1972. type GooglePrivacyDlpV2Dictionary struct {
  1973. // CloudStoragePath: Newline-delimited file of words in Cloud Storage.
  1974. // Only a single file
  1975. // is accepted.
  1976. CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"`
  1977. // WordList: List of words or phrases to search for.
  1978. WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"`
  1979. // ForceSendFields is a list of field names (e.g. "CloudStoragePath") to
  1980. // unconditionally include in API requests. By default, fields with
  1981. // empty values are omitted from API requests. However, any non-pointer,
  1982. // non-interface field appearing in ForceSendFields will be sent to the
  1983. // server regardless of whether the field is empty or not. This may be
  1984. // used to include empty fields in Patch requests.
  1985. ForceSendFields []string `json:"-"`
  1986. // NullFields is a list of field names (e.g. "CloudStoragePath") to
  1987. // include in API requests with the JSON null value. By default, fields
  1988. // with empty values are omitted from API requests. However, any field
  1989. // with an empty value appearing in NullFields will be sent to the
  1990. // server as null. It is an error if a field in this list has a
  1991. // non-empty value. This may be used to include null fields in Patch
  1992. // requests.
  1993. NullFields []string `json:"-"`
  1994. }
  1995. func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) {
  1996. type NoMethod GooglePrivacyDlpV2Dictionary
  1997. raw := NoMethod(*s)
  1998. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1999. }
  2000. // GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP
  2001. // job.
  2002. type GooglePrivacyDlpV2DlpJob struct {
  2003. // CreateTime: Time when the job was created.
  2004. CreateTime string `json:"createTime,omitempty"`
  2005. // EndTime: Time when the job finished.
  2006. EndTime string `json:"endTime,omitempty"`
  2007. // Errors: A stream of errors encountered running the job.
  2008. Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"`
  2009. // InspectDetails: Results from inspecting a data source.
  2010. InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"`
  2011. // JobTriggerName: If created by a job trigger, the resource name of the
  2012. // trigger that
  2013. // instantiated the job.
  2014. JobTriggerName string `json:"jobTriggerName,omitempty"`
  2015. // Name: The server-assigned name.
  2016. Name string `json:"name,omitempty"`
  2017. // RiskDetails: Results from analyzing risk of a data source.
  2018. RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"`
  2019. // StartTime: Time when the job started.
  2020. StartTime string `json:"startTime,omitempty"`
  2021. // State: State of a job.
  2022. //
  2023. // Possible values:
  2024. // "JOB_STATE_UNSPECIFIED"
  2025. // "PENDING" - The job has not yet started.
  2026. // "RUNNING" - The job is currently running.
  2027. // "DONE" - The job is no longer running.
  2028. // "CANCELED" - The job was canceled before it could complete.
  2029. // "FAILED" - The job had an error and did not complete.
  2030. State string `json:"state,omitempty"`
  2031. // Type: The type of job.
  2032. //
  2033. // Possible values:
  2034. // "DLP_JOB_TYPE_UNSPECIFIED"
  2035. // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data.
  2036. // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation.
  2037. Type string `json:"type,omitempty"`
  2038. // ServerResponse contains the HTTP response code and headers from the
  2039. // server.
  2040. googleapi.ServerResponse `json:"-"`
  2041. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  2042. // unconditionally include in API requests. By default, fields with
  2043. // empty values are omitted from API requests. However, any non-pointer,
  2044. // non-interface field appearing in ForceSendFields will be sent to the
  2045. // server regardless of whether the field is empty or not. This may be
  2046. // used to include empty fields in Patch requests.
  2047. ForceSendFields []string `json:"-"`
  2048. // NullFields is a list of field names (e.g. "CreateTime") to include in
  2049. // API requests with the JSON null value. By default, fields with empty
  2050. // values are omitted from API requests. However, any field with an
  2051. // empty value appearing in NullFields will be sent to the server as
  2052. // null. It is an error if a field in this list has a non-empty value.
  2053. // This may be used to include null fields in Patch requests.
  2054. NullFields []string `json:"-"`
  2055. }
  2056. func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) {
  2057. type NoMethod GooglePrivacyDlpV2DlpJob
  2058. raw := NoMethod(*s)
  2059. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2060. }
  2061. // GooglePrivacyDlpV2DocumentLocation: Location of a finding within a
  2062. // document.
  2063. type GooglePrivacyDlpV2DocumentLocation struct {
  2064. // FileOffset: Offset of the line, from the beginning of the file, where
  2065. // the finding
  2066. // is located.
  2067. FileOffset int64 `json:"fileOffset,omitempty,string"`
  2068. // ForceSendFields is a list of field names (e.g. "FileOffset") to
  2069. // unconditionally include in API requests. By default, fields with
  2070. // empty values are omitted from API requests. However, any non-pointer,
  2071. // non-interface field appearing in ForceSendFields will be sent to the
  2072. // server regardless of whether the field is empty or not. This may be
  2073. // used to include empty fields in Patch requests.
  2074. ForceSendFields []string `json:"-"`
  2075. // NullFields is a list of field names (e.g. "FileOffset") to include in
  2076. // API requests with the JSON null value. By default, fields with empty
  2077. // values are omitted from API requests. However, any field with an
  2078. // empty value appearing in NullFields will be sent to the server as
  2079. // null. It is an error if a field in this list has a non-empty value.
  2080. // This may be used to include null fields in Patch requests.
  2081. NullFields []string `json:"-"`
  2082. }
  2083. func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) {
  2084. type NoMethod GooglePrivacyDlpV2DocumentLocation
  2085. raw := NoMethod(*s)
  2086. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2087. }
  2088. // GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set
  2089. // of fields that correspond to a
  2090. // single person. For example, in medical records the `EntityId` might
  2091. // be a
  2092. // patient identifier, or for financial records it might be an
  2093. // account
  2094. // identifier. This message is used when generalizations or analysis
  2095. // must take
  2096. // into account that multiple rows correspond to the same entity.
  2097. type GooglePrivacyDlpV2EntityId struct {
  2098. // Field: Composite key indicating which field contains the entity
  2099. // identifier.
  2100. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  2101. // ForceSendFields is a list of field names (e.g. "Field") to
  2102. // unconditionally include in API requests. By default, fields with
  2103. // empty values are omitted from API requests. However, any non-pointer,
  2104. // non-interface field appearing in ForceSendFields will be sent to the
  2105. // server regardless of whether the field is empty or not. This may be
  2106. // used to include empty fields in Patch requests.
  2107. ForceSendFields []string `json:"-"`
  2108. // NullFields is a list of field names (e.g. "Field") to include in API
  2109. // requests with the JSON null value. By default, fields with empty
  2110. // values are omitted from API requests. However, any field with an
  2111. // empty value appearing in NullFields will be sent to the server as
  2112. // null. It is an error if a field in this list has a non-empty value.
  2113. // This may be used to include null fields in Patch requests.
  2114. NullFields []string `json:"-"`
  2115. }
  2116. func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) {
  2117. type NoMethod GooglePrivacyDlpV2EntityId
  2118. raw := NoMethod(*s)
  2119. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2120. }
  2121. // GooglePrivacyDlpV2Error: Details information about an error
  2122. // encountered during job execution or
  2123. // the results of an unsuccessful activation of the JobTrigger.
  2124. // Output only field.
  2125. type GooglePrivacyDlpV2Error struct {
  2126. Details *GoogleRpcStatus `json:"details,omitempty"`
  2127. // Timestamps: The times the error occurred.
  2128. Timestamps []string `json:"timestamps,omitempty"`
  2129. // ForceSendFields is a list of field names (e.g. "Details") to
  2130. // unconditionally include in API requests. By default, fields with
  2131. // empty values are omitted from API requests. However, any non-pointer,
  2132. // non-interface field appearing in ForceSendFields will be sent to the
  2133. // server regardless of whether the field is empty or not. This may be
  2134. // used to include empty fields in Patch requests.
  2135. ForceSendFields []string `json:"-"`
  2136. // NullFields is a list of field names (e.g. "Details") to include in
  2137. // API requests with the JSON null value. By default, fields with empty
  2138. // values are omitted from API requests. However, any field with an
  2139. // empty value appearing in NullFields will be sent to the server as
  2140. // null. It is an error if a field in this list has a non-empty value.
  2141. // This may be used to include null fields in Patch requests.
  2142. NullFields []string `json:"-"`
  2143. }
  2144. func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) {
  2145. type NoMethod GooglePrivacyDlpV2Error
  2146. raw := NoMethod(*s)
  2147. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2148. }
  2149. // GooglePrivacyDlpV2Expressions: An expression, consisting or an
  2150. // operator and conditions.
  2151. type GooglePrivacyDlpV2Expressions struct {
  2152. Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"`
  2153. // LogicalOperator: The operator to apply to the result of conditions.
  2154. // Default and currently
  2155. // only supported value is `AND`.
  2156. //
  2157. // Possible values:
  2158. // "LOGICAL_OPERATOR_UNSPECIFIED"
  2159. // "AND"
  2160. LogicalOperator string `json:"logicalOperator,omitempty"`
  2161. // ForceSendFields is a list of field names (e.g. "Conditions") to
  2162. // unconditionally include in API requests. By default, fields with
  2163. // empty values are omitted from API requests. However, any non-pointer,
  2164. // non-interface field appearing in ForceSendFields will be sent to the
  2165. // server regardless of whether the field is empty or not. This may be
  2166. // used to include empty fields in Patch requests.
  2167. ForceSendFields []string `json:"-"`
  2168. // NullFields is a list of field names (e.g. "Conditions") to include in
  2169. // API requests with the JSON null value. By default, fields with empty
  2170. // values are omitted from API requests. However, any field with an
  2171. // empty value appearing in NullFields will be sent to the server as
  2172. // null. It is an error if a field in this list has a non-empty value.
  2173. // This may be used to include null fields in Patch requests.
  2174. NullFields []string `json:"-"`
  2175. }
  2176. func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) {
  2177. type NoMethod GooglePrivacyDlpV2Expressions
  2178. raw := NoMethod(*s)
  2179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2180. }
  2181. // GooglePrivacyDlpV2FieldId: General identifier of a data field in a
  2182. // storage service.
  2183. type GooglePrivacyDlpV2FieldId struct {
  2184. // Name: Name describing the field.
  2185. Name string `json:"name,omitempty"`
  2186. // ForceSendFields is a list of field names (e.g. "Name") to
  2187. // unconditionally include in API requests. By default, fields with
  2188. // empty values are omitted from API requests. However, any non-pointer,
  2189. // non-interface field appearing in ForceSendFields will be sent to the
  2190. // server regardless of whether the field is empty or not. This may be
  2191. // used to include empty fields in Patch requests.
  2192. ForceSendFields []string `json:"-"`
  2193. // NullFields is a list of field names (e.g. "Name") to include in API
  2194. // requests with the JSON null value. By default, fields with empty
  2195. // values are omitted from API requests. However, any field with an
  2196. // empty value appearing in NullFields will be sent to the server as
  2197. // null. It is an error if a field in this list has a non-empty value.
  2198. // This may be used to include null fields in Patch requests.
  2199. NullFields []string `json:"-"`
  2200. }
  2201. func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) {
  2202. type NoMethod GooglePrivacyDlpV2FieldId
  2203. raw := NoMethod(*s)
  2204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2205. }
  2206. // GooglePrivacyDlpV2FieldTransformation: The transformation to apply to
  2207. // the field.
  2208. type GooglePrivacyDlpV2FieldTransformation struct {
  2209. // Condition: Only apply the transformation if the condition evaluates
  2210. // to true for the
  2211. // given `RecordCondition`. The conditions are allowed to reference
  2212. // fields
  2213. // that are not used in the actual transformation. [optional]
  2214. //
  2215. // Example Use Cases:
  2216. //
  2217. // - Apply a different bucket transformation to an age column if the zip
  2218. // code
  2219. // column for the same record is within a specific range.
  2220. // - Redact a field if the date of birth field is greater than 85.
  2221. Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"`
  2222. // Fields: Input field(s) to apply the transformation to. [required]
  2223. Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"`
  2224. // InfoTypeTransformations: Treat the contents of the field as free
  2225. // text, and selectively
  2226. // transform content that matches an `InfoType`.
  2227. InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  2228. // PrimitiveTransformation: Apply the transformation to the entire
  2229. // field.
  2230. PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  2231. // ForceSendFields is a list of field names (e.g. "Condition") to
  2232. // unconditionally include in API requests. By default, fields with
  2233. // empty values are omitted from API requests. However, any non-pointer,
  2234. // non-interface field appearing in ForceSendFields will be sent to the
  2235. // server regardless of whether the field is empty or not. This may be
  2236. // used to include empty fields in Patch requests.
  2237. ForceSendFields []string `json:"-"`
  2238. // NullFields is a list of field names (e.g. "Condition") to include in
  2239. // API requests with the JSON null value. By default, fields with empty
  2240. // values are omitted from API requests. However, any field with an
  2241. // empty value appearing in NullFields will be sent to the server as
  2242. // null. It is an error if a field in this list has a non-empty value.
  2243. // This may be used to include null fields in Patch requests.
  2244. NullFields []string `json:"-"`
  2245. }
  2246. func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) {
  2247. type NoMethod GooglePrivacyDlpV2FieldTransformation
  2248. raw := NoMethod(*s)
  2249. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2250. }
  2251. // GooglePrivacyDlpV2FileSet: Set of files to scan.
  2252. type GooglePrivacyDlpV2FileSet struct {
  2253. // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard
  2254. // in the
  2255. // path is allowed.
  2256. Url string `json:"url,omitempty"`
  2257. // ForceSendFields is a list of field names (e.g. "Url") to
  2258. // unconditionally include in API requests. By default, fields with
  2259. // empty values are omitted from API requests. However, any non-pointer,
  2260. // non-interface field appearing in ForceSendFields will be sent to the
  2261. // server regardless of whether the field is empty or not. This may be
  2262. // used to include empty fields in Patch requests.
  2263. ForceSendFields []string `json:"-"`
  2264. // NullFields is a list of field names (e.g. "Url") to include in API
  2265. // requests with the JSON null value. By default, fields with empty
  2266. // values are omitted from API requests. However, any field with an
  2267. // empty value appearing in NullFields will be sent to the server as
  2268. // null. It is an error if a field in this list has a non-empty value.
  2269. // This may be used to include null fields in Patch requests.
  2270. NullFields []string `json:"-"`
  2271. }
  2272. func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) {
  2273. type NoMethod GooglePrivacyDlpV2FileSet
  2274. raw := NoMethod(*s)
  2275. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2276. }
  2277. // GooglePrivacyDlpV2Finding: Represents a piece of potentially
  2278. // sensitive content.
  2279. type GooglePrivacyDlpV2Finding struct {
  2280. // CreateTime: Timestamp when finding was detected.
  2281. CreateTime string `json:"createTime,omitempty"`
  2282. // InfoType: The type of content that might have been found.
  2283. // Provided if requested by the `InspectConfig`.
  2284. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  2285. // Likelihood: Estimate of how likely it is that the `info_type` is
  2286. // correct.
  2287. //
  2288. // Possible values:
  2289. // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
  2290. // "VERY_UNLIKELY" - Few matching elements.
  2291. // "UNLIKELY"
  2292. // "POSSIBLE" - Some matching elements.
  2293. // "LIKELY"
  2294. // "VERY_LIKELY" - Many matching elements.
  2295. Likelihood string `json:"likelihood,omitempty"`
  2296. // Location: Where the content was found.
  2297. Location *GooglePrivacyDlpV2Location `json:"location,omitempty"`
  2298. // Quote: The content that was found. Even if the content is not
  2299. // textual, it
  2300. // may be converted to a textual representation here.
  2301. // Provided if requested by the `InspectConfig` and the finding is
  2302. // less than or equal to 4096 bytes long. If the finding exceeds 4096
  2303. // bytes
  2304. // in length, the quote may be omitted.
  2305. Quote string `json:"quote,omitempty"`
  2306. // QuoteInfo: Contains data parsed from quotes. Only populated if
  2307. // include_quote was set
  2308. // to true and a supported infoType was requested. Currently
  2309. // supported
  2310. // infoTypes: DATE, DATE_OF_BIRTH and TIME.
  2311. QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"`
  2312. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  2313. // unconditionally include in API requests. By default, fields with
  2314. // empty values are omitted from API requests. However, any non-pointer,
  2315. // non-interface field appearing in ForceSendFields will be sent to the
  2316. // server regardless of whether the field is empty or not. This may be
  2317. // used to include empty fields in Patch requests.
  2318. ForceSendFields []string `json:"-"`
  2319. // NullFields is a list of field names (e.g. "CreateTime") to include in
  2320. // API requests with the JSON null value. By default, fields with empty
  2321. // values are omitted from API requests. However, any field with an
  2322. // empty value appearing in NullFields will be sent to the server as
  2323. // null. It is an error if a field in this list has a non-empty value.
  2324. // This may be used to include null fields in Patch requests.
  2325. NullFields []string `json:"-"`
  2326. }
  2327. func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) {
  2328. type NoMethod GooglePrivacyDlpV2Finding
  2329. raw := NoMethod(*s)
  2330. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2331. }
  2332. type GooglePrivacyDlpV2FindingLimits struct {
  2333. // MaxFindingsPerInfoType: Configuration of findings limit given for
  2334. // specified infoTypes.
  2335. MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"`
  2336. // MaxFindingsPerItem: Max number of findings that will be returned for
  2337. // each item scanned.
  2338. // When set within `InspectDataSourceRequest`,
  2339. // the maximum returned is 1000 regardless if this is set higher.
  2340. // When set within `InspectContentRequest`, this field is ignored.
  2341. MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"`
  2342. // MaxFindingsPerRequest: Max number of findings that will be returned
  2343. // per request/job.
  2344. // When set within `InspectContentRequest`, the maximum returned is
  2345. // 1000
  2346. // regardless if this is set higher.
  2347. MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"`
  2348. // ForceSendFields is a list of field names (e.g.
  2349. // "MaxFindingsPerInfoType") to unconditionally include in API requests.
  2350. // By default, fields with empty values are omitted from API requests.
  2351. // However, any non-pointer, non-interface field appearing in
  2352. // ForceSendFields will be sent to the server regardless of whether the
  2353. // field is empty or not. This may be used to include empty fields in
  2354. // Patch requests.
  2355. ForceSendFields []string `json:"-"`
  2356. // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType")
  2357. // to include in API requests with the JSON null value. By default,
  2358. // fields with empty values are omitted from API requests. However, any
  2359. // field with an empty value appearing in NullFields will be sent to the
  2360. // server as null. It is an error if a field in this list has a
  2361. // non-empty value. This may be used to include null fields in Patch
  2362. // requests.
  2363. NullFields []string `json:"-"`
  2364. }
  2365. func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) {
  2366. type NoMethod GooglePrivacyDlpV2FindingLimits
  2367. raw := NoMethod(*s)
  2368. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2369. }
  2370. // GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on
  2371. // fixed size ranges. The
  2372. // Bucketing transformation can provide all of this functionality,
  2373. // but requires more configuration. This message is provided as a
  2374. // convenience to
  2375. // the user for simple bucketing strategies.
  2376. //
  2377. // The transformed value will be a hyphenated string
  2378. // of
  2379. // <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound
  2380. // = 20
  2381. // all values that are within this bucket will be replaced with
  2382. // "10-20".
  2383. //
  2384. // This can be used on data of type: double, long.
  2385. //
  2386. // If the bound Value type differs from the type of data
  2387. // being transformed, we will first attempt converting the type of the
  2388. // data to
  2389. // be transformed to match the type of the bound before comparing.
  2390. //
  2391. // See https://cloud.google.com/dlp/docs/concepts-bucketing to learn
  2392. // more.
  2393. type GooglePrivacyDlpV2FixedSizeBucketingConfig struct {
  2394. // BucketSize: Size of each bucket (except for minimum and maximum
  2395. // buckets). So if
  2396. // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then
  2397. // the
  2398. // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50,
  2399. // 50-60,
  2400. // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
  2401. // [Required].
  2402. BucketSize float64 `json:"bucketSize,omitempty"`
  2403. // LowerBound: Lower bound value of buckets. All values less than
  2404. // `lower_bound` are
  2405. // grouped together into a single bucket; for example if `lower_bound` =
  2406. // 10,
  2407. // then all values less than 10 are replaced with the value “-10”.
  2408. // [Required].
  2409. LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"`
  2410. // UpperBound: Upper bound value of buckets. All values greater than
  2411. // upper_bound are
  2412. // grouped together into a single bucket; for example if `upper_bound` =
  2413. // 89,
  2414. // then all values greater than 89 are replaced with the value
  2415. // “89+”.
  2416. // [Required].
  2417. UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"`
  2418. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  2419. // unconditionally include in API requests. By default, fields with
  2420. // empty values are omitted from API requests. However, any non-pointer,
  2421. // non-interface field appearing in ForceSendFields will be sent to the
  2422. // server regardless of whether the field is empty or not. This may be
  2423. // used to include empty fields in Patch requests.
  2424. ForceSendFields []string `json:"-"`
  2425. // NullFields is a list of field names (e.g. "BucketSize") to include in
  2426. // API requests with the JSON null value. By default, fields with empty
  2427. // values are omitted from API requests. However, any field with an
  2428. // empty value appearing in NullFields will be sent to the server as
  2429. // null. It is an error if a field in this list has a non-empty value.
  2430. // This may be used to include null fields in Patch requests.
  2431. NullFields []string `json:"-"`
  2432. }
  2433. func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) {
  2434. type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig
  2435. raw := NoMethod(*s)
  2436. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2437. }
  2438. func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error {
  2439. type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig
  2440. var s1 struct {
  2441. BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
  2442. *NoMethod
  2443. }
  2444. s1.NoMethod = (*NoMethod)(s)
  2445. if err := json.Unmarshal(data, &s1); err != nil {
  2446. return err
  2447. }
  2448. s.BucketSize = float64(s1.BucketSize)
  2449. return nil
  2450. }
  2451. // GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood
  2452. // of findings within a certain
  2453. // proximity of hotwords.
  2454. type GooglePrivacyDlpV2HotwordRule struct {
  2455. // HotwordRegex: Regular expression pattern defining what qualifies as a
  2456. // hotword.
  2457. HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"`
  2458. // LikelihoodAdjustment: Likelihood adjustment to apply to all matching
  2459. // findings.
  2460. LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"`
  2461. // Proximity: Proximity of the finding within which the entire hotword
  2462. // must reside.
  2463. // The total length of the window cannot exceed 1000 characters. Note
  2464. // that
  2465. // the finding itself will be included in the window, so that hotwords
  2466. // may
  2467. // be used to match substrings of the finding itself. For example,
  2468. // the
  2469. // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could
  2470. // be
  2471. // adjusted upwards if the area code is known to be the local area code
  2472. // of
  2473. // a company office using the hotword regex "\(xxx\)", where "xxx"
  2474. // is the area code in question.
  2475. Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"`
  2476. // ForceSendFields is a list of field names (e.g. "HotwordRegex") to
  2477. // unconditionally include in API requests. By default, fields with
  2478. // empty values are omitted from API requests. However, any non-pointer,
  2479. // non-interface field appearing in ForceSendFields will be sent to the
  2480. // server regardless of whether the field is empty or not. This may be
  2481. // used to include empty fields in Patch requests.
  2482. ForceSendFields []string `json:"-"`
  2483. // NullFields is a list of field names (e.g. "HotwordRegex") to include
  2484. // in API requests with the JSON null value. By default, fields with
  2485. // empty values are omitted from API requests. However, any field with
  2486. // an empty value appearing in NullFields will be sent to the server as
  2487. // null. It is an error if a field in this list has a non-empty value.
  2488. // This may be used to include null fields in Patch requests.
  2489. NullFields []string `json:"-"`
  2490. }
  2491. func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) {
  2492. type NoMethod GooglePrivacyDlpV2HotwordRule
  2493. raw := NoMethod(*s)
  2494. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2495. }
  2496. // GooglePrivacyDlpV2ImageLocation: Location of the finding within an
  2497. // image.
  2498. type GooglePrivacyDlpV2ImageLocation struct {
  2499. // BoundingBoxes: Bounding boxes locating the pixels within the image
  2500. // containing the finding.
  2501. BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"`
  2502. // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to
  2503. // unconditionally include in API requests. By default, fields with
  2504. // empty values are omitted from API requests. However, any non-pointer,
  2505. // non-interface field appearing in ForceSendFields will be sent to the
  2506. // server regardless of whether the field is empty or not. This may be
  2507. // used to include empty fields in Patch requests.
  2508. ForceSendFields []string `json:"-"`
  2509. // NullFields is a list of field names (e.g. "BoundingBoxes") to include
  2510. // in API requests with the JSON null value. By default, fields with
  2511. // empty values are omitted from API requests. However, any field with
  2512. // an empty value appearing in NullFields will be sent to the server as
  2513. // null. It is an error if a field in this list has a non-empty value.
  2514. // This may be used to include null fields in Patch requests.
  2515. NullFields []string `json:"-"`
  2516. }
  2517. func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) {
  2518. type NoMethod GooglePrivacyDlpV2ImageLocation
  2519. raw := NoMethod(*s)
  2520. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2521. }
  2522. // GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining
  2523. // how redaction of images should occur.
  2524. type GooglePrivacyDlpV2ImageRedactionConfig struct {
  2525. // InfoType: Only one per info_type should be provided per request. If
  2526. // not
  2527. // specified, and redact_all_text is false, the DLP API will redact
  2528. // all
  2529. // text that it matches against all info_types that are found, but
  2530. // not
  2531. // specified in another ImageRedactionConfig.
  2532. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  2533. // RedactAllText: If true, all text found in the image, regardless
  2534. // whether it matches an
  2535. // info_type, is redacted. Only one should be provided.
  2536. RedactAllText bool `json:"redactAllText,omitempty"`
  2537. // RedactionColor: The color to use when redacting content from an
  2538. // image. If not specified,
  2539. // the default is black.
  2540. RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"`
  2541. // ForceSendFields is a list of field names (e.g. "InfoType") to
  2542. // unconditionally include in API requests. By default, fields with
  2543. // empty values are omitted from API requests. However, any non-pointer,
  2544. // non-interface field appearing in ForceSendFields will be sent to the
  2545. // server regardless of whether the field is empty or not. This may be
  2546. // used to include empty fields in Patch requests.
  2547. ForceSendFields []string `json:"-"`
  2548. // NullFields is a list of field names (e.g. "InfoType") to include in
  2549. // API requests with the JSON null value. By default, fields with empty
  2550. // values are omitted from API requests. However, any field with an
  2551. // empty value appearing in NullFields will be sent to the server as
  2552. // null. It is an error if a field in this list has a non-empty value.
  2553. // This may be used to include null fields in Patch requests.
  2554. NullFields []string `json:"-"`
  2555. }
  2556. func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) {
  2557. type NoMethod GooglePrivacyDlpV2ImageRedactionConfig
  2558. raw := NoMethod(*s)
  2559. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2560. }
  2561. // GooglePrivacyDlpV2InfoType: Type of information detected by the API.
  2562. type GooglePrivacyDlpV2InfoType struct {
  2563. // Name: Name of the information type. Either a name of your choosing
  2564. // when
  2565. // creating a CustomInfoType, or one of the names listed
  2566. // at https://cloud.google.com/dlp/docs/infotypes-reference when
  2567. // specifying
  2568. // a built-in type.
  2569. Name string `json:"name,omitempty"`
  2570. // ForceSendFields is a list of field names (e.g. "Name") to
  2571. // unconditionally include in API requests. By default, fields with
  2572. // empty values are omitted from API requests. However, any non-pointer,
  2573. // non-interface field appearing in ForceSendFields will be sent to the
  2574. // server regardless of whether the field is empty or not. This may be
  2575. // used to include empty fields in Patch requests.
  2576. ForceSendFields []string `json:"-"`
  2577. // NullFields is a list of field names (e.g. "Name") to include in API
  2578. // requests with the JSON null value. By default, fields with empty
  2579. // values are omitted from API requests. However, any field with an
  2580. // empty value appearing in NullFields will be sent to the server as
  2581. // null. It is an error if a field in this list has a non-empty value.
  2582. // This may be used to include null fields in Patch requests.
  2583. NullFields []string `json:"-"`
  2584. }
  2585. func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) {
  2586. type NoMethod GooglePrivacyDlpV2InfoType
  2587. raw := NoMethod(*s)
  2588. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2589. }
  2590. // GooglePrivacyDlpV2InfoTypeDescription: InfoType description.
  2591. type GooglePrivacyDlpV2InfoTypeDescription struct {
  2592. // DisplayName: Human readable form of the infoType name.
  2593. DisplayName string `json:"displayName,omitempty"`
  2594. // Name: Internal name of the infoType.
  2595. Name string `json:"name,omitempty"`
  2596. // SupportedBy: Which parts of the API supports this InfoType.
  2597. //
  2598. // Possible values:
  2599. // "ENUM_TYPE_UNSPECIFIED"
  2600. // "INSPECT" - Supported by the inspect operations.
  2601. // "RISK_ANALYSIS" - Supported by the risk analysis operations.
  2602. SupportedBy []string `json:"supportedBy,omitempty"`
  2603. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2604. // unconditionally include in API requests. By default, fields with
  2605. // empty values are omitted from API requests. However, any non-pointer,
  2606. // non-interface field appearing in ForceSendFields will be sent to the
  2607. // server regardless of whether the field is empty or not. This may be
  2608. // used to include empty fields in Patch requests.
  2609. ForceSendFields []string `json:"-"`
  2610. // NullFields is a list of field names (e.g. "DisplayName") to include
  2611. // in API requests with the JSON null value. By default, fields with
  2612. // empty values are omitted from API requests. However, any field with
  2613. // an empty value appearing in NullFields will be sent to the server as
  2614. // null. It is an error if a field in this list has a non-empty value.
  2615. // This may be used to include null fields in Patch requests.
  2616. NullFields []string `json:"-"`
  2617. }
  2618. func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) {
  2619. type NoMethod GooglePrivacyDlpV2InfoTypeDescription
  2620. raw := NoMethod(*s)
  2621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2622. }
  2623. // GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per
  2624. // infoType, per content item or long
  2625. // running DlpJob.
  2626. type GooglePrivacyDlpV2InfoTypeLimit struct {
  2627. // InfoType: Type of information the findings limit applies to. Only one
  2628. // limit per
  2629. // info_type should be provided. If InfoTypeLimit does not have
  2630. // an
  2631. // info_type, the DLP API applies the limit against all info_types
  2632. // that
  2633. // are found but not specified in another InfoTypeLimit.
  2634. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  2635. // MaxFindings: Max findings limit for the given infoType.
  2636. MaxFindings int64 `json:"maxFindings,omitempty"`
  2637. // ForceSendFields is a list of field names (e.g. "InfoType") to
  2638. // unconditionally include in API requests. By default, fields with
  2639. // empty values are omitted from API requests. However, any non-pointer,
  2640. // non-interface field appearing in ForceSendFields will be sent to the
  2641. // server regardless of whether the field is empty or not. This may be
  2642. // used to include empty fields in Patch requests.
  2643. ForceSendFields []string `json:"-"`
  2644. // NullFields is a list of field names (e.g. "InfoType") to include in
  2645. // API requests with the JSON null value. By default, fields with empty
  2646. // values are omitted from API requests. However, any field with an
  2647. // empty value appearing in NullFields will be sent to the server as
  2648. // null. It is an error if a field in this list has a non-empty value.
  2649. // This may be used to include null fields in Patch requests.
  2650. NullFields []string `json:"-"`
  2651. }
  2652. func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) {
  2653. type NoMethod GooglePrivacyDlpV2InfoTypeLimit
  2654. raw := NoMethod(*s)
  2655. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2656. }
  2657. // GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific
  2658. // InfoType.
  2659. type GooglePrivacyDlpV2InfoTypeStats struct {
  2660. // Count: Number of findings for this infoType.
  2661. Count int64 `json:"count,omitempty,string"`
  2662. // InfoType: The type of finding this stat is for.
  2663. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  2664. // ForceSendFields is a list of field names (e.g. "Count") to
  2665. // unconditionally include in API requests. By default, fields with
  2666. // empty values are omitted from API requests. However, any non-pointer,
  2667. // non-interface field appearing in ForceSendFields will be sent to the
  2668. // server regardless of whether the field is empty or not. This may be
  2669. // used to include empty fields in Patch requests.
  2670. ForceSendFields []string `json:"-"`
  2671. // NullFields is a list of field names (e.g. "Count") to include in API
  2672. // requests with the JSON null value. By default, fields with empty
  2673. // values are omitted from API requests. However, any field with an
  2674. // empty value appearing in NullFields will be sent to the server as
  2675. // null. It is an error if a field in this list has a non-empty value.
  2676. // This may be used to include null fields in Patch requests.
  2677. NullFields []string `json:"-"`
  2678. }
  2679. func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) {
  2680. type NoMethod GooglePrivacyDlpV2InfoTypeStats
  2681. raw := NoMethod(*s)
  2682. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2683. }
  2684. // GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply
  2685. // to text that is identified as a specific
  2686. // info_type.
  2687. type GooglePrivacyDlpV2InfoTypeTransformation struct {
  2688. // InfoTypes: InfoTypes to apply the transformation to. An empty list
  2689. // will cause
  2690. // this transformation to apply to all findings that correspond
  2691. // to
  2692. // infoTypes that were requested in `InspectConfig`.
  2693. InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"`
  2694. // PrimitiveTransformation: Primitive transformation to apply to the
  2695. // infoType. [required]
  2696. PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  2697. // ForceSendFields is a list of field names (e.g. "InfoTypes") to
  2698. // unconditionally include in API requests. By default, fields with
  2699. // empty values are omitted from API requests. However, any non-pointer,
  2700. // non-interface field appearing in ForceSendFields will be sent to the
  2701. // server regardless of whether the field is empty or not. This may be
  2702. // used to include empty fields in Patch requests.
  2703. ForceSendFields []string `json:"-"`
  2704. // NullFields is a list of field names (e.g. "InfoTypes") to include in
  2705. // API requests with the JSON null value. By default, fields with empty
  2706. // values are omitted from API requests. However, any field with an
  2707. // empty value appearing in NullFields will be sent to the server as
  2708. // null. It is an error if a field in this list has a non-empty value.
  2709. // This may be used to include null fields in Patch requests.
  2710. NullFields []string `json:"-"`
  2711. }
  2712. func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) {
  2713. type NoMethod GooglePrivacyDlpV2InfoTypeTransformation
  2714. raw := NoMethod(*s)
  2715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2716. }
  2717. // GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation
  2718. // that will scan unstructured text and
  2719. // apply various `PrimitiveTransformation`s to each finding, where
  2720. // the
  2721. // transformation is applied to only values that were identified as a
  2722. // specific
  2723. // info_type.
  2724. type GooglePrivacyDlpV2InfoTypeTransformations struct {
  2725. // Transformations: Transformation for each infoType. Cannot specify
  2726. // more than one
  2727. // for a given infoType. [required]
  2728. Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"`
  2729. // ForceSendFields is a list of field names (e.g. "Transformations") to
  2730. // unconditionally include in API requests. By default, fields with
  2731. // empty values are omitted from API requests. However, any non-pointer,
  2732. // non-interface field appearing in ForceSendFields will be sent to the
  2733. // server regardless of whether the field is empty or not. This may be
  2734. // used to include empty fields in Patch requests.
  2735. ForceSendFields []string `json:"-"`
  2736. // NullFields is a list of field names (e.g. "Transformations") to
  2737. // include in API requests with the JSON null value. By default, fields
  2738. // with empty values are omitted from API requests. However, any field
  2739. // with an empty value appearing in NullFields will be sent to the
  2740. // server as null. It is an error if a field in this list has a
  2741. // non-empty value. This may be used to include null fields in Patch
  2742. // requests.
  2743. NullFields []string `json:"-"`
  2744. }
  2745. func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) {
  2746. type NoMethod GooglePrivacyDlpV2InfoTypeTransformations
  2747. raw := NoMethod(*s)
  2748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2749. }
  2750. // GooglePrivacyDlpV2InspectConfig: Configuration description of the
  2751. // scanning process.
  2752. // When used with redactContent only info_types and min_likelihood are
  2753. // currently
  2754. // used.
  2755. type GooglePrivacyDlpV2InspectConfig struct {
  2756. // ContentOptions: List of options defining data content to scan.
  2757. // If empty, text, images, and other content will be included.
  2758. //
  2759. // Possible values:
  2760. // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data
  2761. // stream.
  2762. // "CONTENT_TEXT" - Text content within the data, excluding any
  2763. // metadata.
  2764. // "CONTENT_IMAGE" - Images found in the data.
  2765. ContentOptions []string `json:"contentOptions,omitempty"`
  2766. // CustomInfoTypes: CustomInfoTypes provided by the user.
  2767. // See
  2768. // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn
  2769. // more.
  2770. CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"`
  2771. // ExcludeInfoTypes: When true, excludes type information of the
  2772. // findings.
  2773. ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"`
  2774. // IncludeQuote: When true, a contextual quote from the data that
  2775. // triggered a finding is
  2776. // included in the response; see Finding.quote.
  2777. IncludeQuote bool `json:"includeQuote,omitempty"`
  2778. // InfoTypes: Restricts what info_types to look for. The values must
  2779. // correspond to
  2780. // InfoType values returned by ListInfoTypes or listed
  2781. // at
  2782. // https://cloud.google.com/dlp/docs/infotypes-reference.
  2783. InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"`
  2784. Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"`
  2785. // MinLikelihood: Only returns findings equal or above this threshold.
  2786. // The default is
  2787. // POSSIBLE.
  2788. // See https://cloud.google.com/dlp/docs/likelihood to learn more.
  2789. //
  2790. // Possible values:
  2791. // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
  2792. // "VERY_UNLIKELY" - Few matching elements.
  2793. // "UNLIKELY"
  2794. // "POSSIBLE" - Some matching elements.
  2795. // "LIKELY"
  2796. // "VERY_LIKELY" - Many matching elements.
  2797. MinLikelihood string `json:"minLikelihood,omitempty"`
  2798. // ForceSendFields is a list of field names (e.g. "ContentOptions") to
  2799. // unconditionally include in API requests. By default, fields with
  2800. // empty values are omitted from API requests. However, any non-pointer,
  2801. // non-interface field appearing in ForceSendFields will be sent to the
  2802. // server regardless of whether the field is empty or not. This may be
  2803. // used to include empty fields in Patch requests.
  2804. ForceSendFields []string `json:"-"`
  2805. // NullFields is a list of field names (e.g. "ContentOptions") to
  2806. // include in API requests with the JSON null value. By default, fields
  2807. // with empty values are omitted from API requests. However, any field
  2808. // with an empty value appearing in NullFields will be sent to the
  2809. // server as null. It is an error if a field in this list has a
  2810. // non-empty value. This may be used to include null fields in Patch
  2811. // requests.
  2812. NullFields []string `json:"-"`
  2813. }
  2814. func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) {
  2815. type NoMethod GooglePrivacyDlpV2InspectConfig
  2816. raw := NoMethod(*s)
  2817. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2818. }
  2819. // GooglePrivacyDlpV2InspectContentRequest: Request to search for
  2820. // potentially sensitive info in a ContentItem.
  2821. type GooglePrivacyDlpV2InspectContentRequest struct {
  2822. // InspectConfig: Configuration for the inspector. What specified here
  2823. // will override
  2824. // the template referenced by the inspect_template_name argument.
  2825. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  2826. // InspectTemplateName: Optional template to use. Any configuration
  2827. // directly specified in
  2828. // inspect_config will override those set in the template. Singular
  2829. // fields
  2830. // that are set in this request will replace their corresponding fields
  2831. // in the
  2832. // template. Repeated fields are appended. Singular sub-messages and
  2833. // groups
  2834. // are recursively merged.
  2835. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  2836. // Item: The item to inspect.
  2837. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
  2838. // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") to include
  2846. // in API requests with the JSON null value. By default, fields with
  2847. // empty values are omitted from API requests. However, any field with
  2848. // an empty value appearing in NullFields will be sent to the server as
  2849. // null. It is an error if a field in this list has a non-empty value.
  2850. // This may be used to include null fields in Patch requests.
  2851. NullFields []string `json:"-"`
  2852. }
  2853. func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) {
  2854. type NoMethod GooglePrivacyDlpV2InspectContentRequest
  2855. raw := NoMethod(*s)
  2856. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2857. }
  2858. // GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an
  2859. // item.
  2860. type GooglePrivacyDlpV2InspectContentResponse struct {
  2861. // Result: The findings.
  2862. Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"`
  2863. // ServerResponse contains the HTTP response code and headers from the
  2864. // server.
  2865. googleapi.ServerResponse `json:"-"`
  2866. // ForceSendFields is a list of field names (e.g. "Result") to
  2867. // unconditionally include in API requests. By default, fields with
  2868. // empty values are omitted from API requests. However, any non-pointer,
  2869. // non-interface field appearing in ForceSendFields will be sent to the
  2870. // server regardless of whether the field is empty or not. This may be
  2871. // used to include empty fields in Patch requests.
  2872. ForceSendFields []string `json:"-"`
  2873. // NullFields is a list of field names (e.g. "Result") to include in API
  2874. // requests with the JSON null value. By default, fields with empty
  2875. // values are omitted from API requests. However, any field with an
  2876. // empty value appearing in NullFields will be sent to the server as
  2877. // null. It is an error if a field in this list has a non-empty value.
  2878. // This may be used to include null fields in Patch requests.
  2879. NullFields []string `json:"-"`
  2880. }
  2881. func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) {
  2882. type NoMethod GooglePrivacyDlpV2InspectContentResponse
  2883. raw := NoMethod(*s)
  2884. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2885. }
  2886. // GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect
  2887. // DataSource job.
  2888. type GooglePrivacyDlpV2InspectDataSourceDetails struct {
  2889. // RequestedOptions: The configuration used for this job.
  2890. RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"`
  2891. // Result: A summary of the outcome of this inspect job.
  2892. Result *GooglePrivacyDlpV2Result `json:"result,omitempty"`
  2893. // ForceSendFields is a list of field names (e.g. "RequestedOptions") to
  2894. // unconditionally include in API requests. By default, fields with
  2895. // empty values are omitted from API requests. However, any non-pointer,
  2896. // non-interface field appearing in ForceSendFields will be sent to the
  2897. // server regardless of whether the field is empty or not. This may be
  2898. // used to include empty fields in Patch requests.
  2899. ForceSendFields []string `json:"-"`
  2900. // NullFields is a list of field names (e.g. "RequestedOptions") to
  2901. // include in API requests with the JSON null value. By default, fields
  2902. // with empty values are omitted from API requests. However, any field
  2903. // with an empty value appearing in NullFields will be sent to the
  2904. // server as null. It is an error if a field in this list has a
  2905. // non-empty value. This may be used to include null fields in Patch
  2906. // requests.
  2907. NullFields []string `json:"-"`
  2908. }
  2909. func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) {
  2910. type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails
  2911. raw := NoMethod(*s)
  2912. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2913. }
  2914. type GooglePrivacyDlpV2InspectJobConfig struct {
  2915. // Actions: Actions to execute at the completion of the job. Are
  2916. // executed in the order
  2917. // provided.
  2918. Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"`
  2919. // InspectConfig: How and what to scan for.
  2920. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  2921. // InspectTemplateName: If provided, will be used as the default for all
  2922. // values in InspectConfig.
  2923. // `inspect_config` will be merged into the values persisted as part of
  2924. // the
  2925. // template.
  2926. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  2927. // StorageConfig: The data to scan.
  2928. StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"`
  2929. // ForceSendFields is a list of field names (e.g. "Actions") to
  2930. // unconditionally include in API requests. By default, fields with
  2931. // empty values are omitted from API requests. However, any non-pointer,
  2932. // non-interface field appearing in ForceSendFields will be sent to the
  2933. // server regardless of whether the field is empty or not. This may be
  2934. // used to include empty fields in Patch requests.
  2935. ForceSendFields []string `json:"-"`
  2936. // NullFields is a list of field names (e.g. "Actions") to include in
  2937. // API requests with the JSON null value. By default, fields with empty
  2938. // values are omitted from API requests. However, any field with an
  2939. // empty value appearing in NullFields will be sent to the server as
  2940. // null. It is an error if a field in this list has a non-empty value.
  2941. // This may be used to include null fields in Patch requests.
  2942. NullFields []string `json:"-"`
  2943. }
  2944. func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) {
  2945. type NoMethod GooglePrivacyDlpV2InspectJobConfig
  2946. raw := NoMethod(*s)
  2947. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2948. }
  2949. // GooglePrivacyDlpV2InspectResult: All the findings for a single
  2950. // scanned item.
  2951. type GooglePrivacyDlpV2InspectResult struct {
  2952. // Findings: List of findings for an item.
  2953. Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"`
  2954. // FindingsTruncated: If true, then this item might have more findings
  2955. // than were returned,
  2956. // and the findings returned are an arbitrary subset of all
  2957. // findings.
  2958. // The findings list might be truncated because the input items were
  2959. // too
  2960. // large, or because the server reached the maximum amount of
  2961. // resources
  2962. // allowed for a single API call. For best results, divide the input
  2963. // into
  2964. // smaller batches.
  2965. FindingsTruncated bool `json:"findingsTruncated,omitempty"`
  2966. // ForceSendFields is a list of field names (e.g. "Findings") to
  2967. // unconditionally include in API requests. By default, fields with
  2968. // empty values are omitted from API requests. However, any non-pointer,
  2969. // non-interface field appearing in ForceSendFields will be sent to the
  2970. // server regardless of whether the field is empty or not. This may be
  2971. // used to include empty fields in Patch requests.
  2972. ForceSendFields []string `json:"-"`
  2973. // NullFields is a list of field names (e.g. "Findings") to include in
  2974. // API requests with the JSON null value. By default, fields with empty
  2975. // values are omitted from API requests. However, any field with an
  2976. // empty value appearing in NullFields will be sent to the server as
  2977. // null. It is an error if a field in this list has a non-empty value.
  2978. // This may be used to include null fields in Patch requests.
  2979. NullFields []string `json:"-"`
  2980. }
  2981. func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) {
  2982. type NoMethod GooglePrivacyDlpV2InspectResult
  2983. raw := NoMethod(*s)
  2984. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2985. }
  2986. // GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a
  2987. // configuration (set of types of sensitive data
  2988. // to be detected) to be used anywhere you otherwise would normally
  2989. // specify
  2990. // InspectConfig. See
  2991. // https://cloud.google.com/dlp/docs/concepts-templates
  2992. // to learn more.
  2993. type GooglePrivacyDlpV2InspectTemplate struct {
  2994. // CreateTime: The creation timestamp of a inspectTemplate, output only
  2995. // field.
  2996. CreateTime string `json:"createTime,omitempty"`
  2997. // Description: Short description (max 256 chars).
  2998. Description string `json:"description,omitempty"`
  2999. // DisplayName: Display name (max 256 chars).
  3000. DisplayName string `json:"displayName,omitempty"`
  3001. // InspectConfig: The core content of the template. Configuration of the
  3002. // scanning process.
  3003. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  3004. // Name: The template name. Output only.
  3005. //
  3006. // The template will have one of the following
  3007. // formats:
  3008. // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID`
  3009. // OR
  3010. // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
  3011. Name string `json:"name,omitempty"`
  3012. // UpdateTime: The last update timestamp of a inspectTemplate, output
  3013. // only field.
  3014. UpdateTime string `json:"updateTime,omitempty"`
  3015. // ServerResponse contains the HTTP response code and headers from the
  3016. // server.
  3017. googleapi.ServerResponse `json:"-"`
  3018. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3019. // unconditionally include in API requests. By default, fields with
  3020. // empty values are omitted from API requests. However, any non-pointer,
  3021. // non-interface field appearing in ForceSendFields will be sent to the
  3022. // server regardless of whether the field is empty or not. This may be
  3023. // used to include empty fields in Patch requests.
  3024. ForceSendFields []string `json:"-"`
  3025. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3026. // API requests with the JSON null value. By default, fields with empty
  3027. // values are omitted from API requests. However, any field with an
  3028. // empty value appearing in NullFields will be sent to the server as
  3029. // null. It is an error if a field in this list has a non-empty value.
  3030. // This may be used to include null fields in Patch requests.
  3031. NullFields []string `json:"-"`
  3032. }
  3033. func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) {
  3034. type NoMethod GooglePrivacyDlpV2InspectTemplate
  3035. raw := NoMethod(*s)
  3036. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3037. }
  3038. // GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp
  3039. // api calls on a repeating basis.
  3040. // See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn
  3041. // more.
  3042. type GooglePrivacyDlpV2JobTrigger struct {
  3043. // CreateTime: The creation timestamp of a triggeredJob, output only
  3044. // field.
  3045. CreateTime string `json:"createTime,omitempty"`
  3046. // Description: User provided description (max 256 chars)
  3047. Description string `json:"description,omitempty"`
  3048. // DisplayName: Display name (max 100 chars)
  3049. DisplayName string `json:"displayName,omitempty"`
  3050. // Errors: A stream of errors encountered when the trigger was
  3051. // activated. Repeated
  3052. // errors may result in the JobTrigger automaticaly being paused.
  3053. // Will return the last 100 errors. Whenever the JobTrigger is
  3054. // modified
  3055. // this list will be cleared. Output only field.
  3056. Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"`
  3057. InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"`
  3058. // LastRunTime: The timestamp of the last time this trigger executed,
  3059. // output only field.
  3060. LastRunTime string `json:"lastRunTime,omitempty"`
  3061. // Name: Unique resource name for the triggeredJob, assigned by the
  3062. // service when the
  3063. // triggeredJob is created, for
  3064. // example
  3065. // `projects/dlp-test-project/triggeredJobs/53234423`.
  3066. Name string `json:"name,omitempty"`
  3067. // Status: A status for this trigger. [required]
  3068. //
  3069. // Possible values:
  3070. // "STATUS_UNSPECIFIED"
  3071. // "HEALTHY" - Trigger is healthy.
  3072. // "PAUSED" - Trigger is temporarily paused.
  3073. // "CANCELLED" - Trigger is cancelled and can not be resumed.
  3074. Status string `json:"status,omitempty"`
  3075. // Triggers: A list of triggers which will be OR'ed together. Only one
  3076. // in the list
  3077. // needs to trigger for a job to be started. The list may contain only
  3078. // a single Schedule trigger and must have at least one object.
  3079. Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"`
  3080. // UpdateTime: The last update timestamp of a triggeredJob, output only
  3081. // field.
  3082. UpdateTime string `json:"updateTime,omitempty"`
  3083. // ServerResponse contains the HTTP response code and headers from the
  3084. // server.
  3085. googleapi.ServerResponse `json:"-"`
  3086. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3087. // unconditionally include in API requests. By default, fields with
  3088. // empty values are omitted from API requests. However, any non-pointer,
  3089. // non-interface field appearing in ForceSendFields will be sent to the
  3090. // server regardless of whether the field is empty or not. This may be
  3091. // used to include empty fields in Patch requests.
  3092. ForceSendFields []string `json:"-"`
  3093. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3094. // API requests with the JSON null value. By default, fields with empty
  3095. // values are omitted from API requests. However, any field with an
  3096. // empty value appearing in NullFields will be sent to the server as
  3097. // null. It is an error if a field in this list has a non-empty value.
  3098. // This may be used to include null fields in Patch requests.
  3099. NullFields []string `json:"-"`
  3100. }
  3101. func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) {
  3102. type NoMethod GooglePrivacyDlpV2JobTrigger
  3103. raw := NoMethod(*s)
  3104. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3105. }
  3106. // GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for
  3107. // analysis of reidentification risk.
  3108. type GooglePrivacyDlpV2KAnonymityConfig struct {
  3109. // EntityId: Optional message indicating that multiple rows might be
  3110. // associated to a
  3111. // single individual. If the same entity_id is associated to
  3112. // multiple
  3113. // quasi-identifier tuples over distict rows, we consider the
  3114. // entire
  3115. // collection of tuples as the composite quasi-identifier. This
  3116. // collection
  3117. // is a multiset: the order in which the different tuples appear in
  3118. // the
  3119. // dataset is ignored, but their frequency is taken into
  3120. // account.
  3121. //
  3122. // Important note: a maximum of 1000 rows can be associated to a
  3123. // single
  3124. // entity ID. If more rows are associated with the same entity ID,
  3125. // some
  3126. // might be ignored.
  3127. EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"`
  3128. // QuasiIds: Set of fields to compute k-anonymity over. When multiple
  3129. // fields are
  3130. // specified, they are considered a single composite key. Structs
  3131. // and
  3132. // repeated data types are not supported; however, nested fields
  3133. // are
  3134. // supported so long as they are not structs themselves or nested
  3135. // within
  3136. // a repeated field.
  3137. QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"`
  3138. // ForceSendFields is a list of field names (e.g. "EntityId") to
  3139. // unconditionally include in API requests. By default, fields with
  3140. // empty values are omitted from API requests. However, any non-pointer,
  3141. // non-interface field appearing in ForceSendFields will be sent to the
  3142. // server regardless of whether the field is empty or not. This may be
  3143. // used to include empty fields in Patch requests.
  3144. ForceSendFields []string `json:"-"`
  3145. // NullFields is a list of field names (e.g. "EntityId") to include in
  3146. // API requests with the JSON null value. By default, fields with empty
  3147. // values are omitted from API requests. However, any field with an
  3148. // empty value appearing in NullFields will be sent to the server as
  3149. // null. It is an error if a field in this list has a non-empty value.
  3150. // This may be used to include null fields in Patch requests.
  3151. NullFields []string `json:"-"`
  3152. }
  3153. func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) {
  3154. type NoMethod GooglePrivacyDlpV2KAnonymityConfig
  3155. raw := NoMethod(*s)
  3156. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3157. }
  3158. // GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns'
  3159. // values that share the same ldiversity value
  3160. type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct {
  3161. // EquivalenceClassSize: Size of the equivalence class, for example
  3162. // number of rows with the
  3163. // above set of values.
  3164. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  3165. // QuasiIdsValues: Set of values defining the equivalence class. One
  3166. // value per
  3167. // quasi-identifier column in the original KAnonymity metric
  3168. // message.
  3169. // The order is always the same as the original request.
  3170. QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"`
  3171. // ForceSendFields is a list of field names (e.g.
  3172. // "EquivalenceClassSize") to unconditionally include in API requests.
  3173. // By default, fields with empty values are omitted from API requests.
  3174. // However, any non-pointer, non-interface field appearing in
  3175. // ForceSendFields will be sent to the server regardless of whether the
  3176. // field is empty or not. This may be used to include empty fields in
  3177. // Patch requests.
  3178. ForceSendFields []string `json:"-"`
  3179. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  3180. // include in API requests with the JSON null value. By default, fields
  3181. // with empty values are omitted from API requests. However, any field
  3182. // with an empty value appearing in NullFields will be sent to the
  3183. // server as null. It is an error if a field in this list has a
  3184. // non-empty value. This may be used to include null fields in Patch
  3185. // requests.
  3186. NullFields []string `json:"-"`
  3187. }
  3188. func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) {
  3189. type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass
  3190. raw := NoMethod(*s)
  3191. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3192. }
  3193. type GooglePrivacyDlpV2KAnonymityHistogramBucket struct {
  3194. // BucketSize: Total number of equivalence classes in this bucket.
  3195. BucketSize int64 `json:"bucketSize,omitempty,string"`
  3196. // BucketValueCount: Total number of distinct equivalence classes in
  3197. // this bucket.
  3198. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  3199. // BucketValues: Sample of equivalence classes in this bucket. The total
  3200. // number of
  3201. // classes returned per bucket is capped at 20.
  3202. BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"`
  3203. // EquivalenceClassSizeLowerBound: Lower bound on the size of the
  3204. // equivalence classes in this bucket.
  3205. EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"`
  3206. // EquivalenceClassSizeUpperBound: Upper bound on the size of the
  3207. // equivalence classes in this bucket.
  3208. EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"`
  3209. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  3210. // unconditionally include in API requests. By default, fields with
  3211. // empty values are omitted from API requests. However, any non-pointer,
  3212. // non-interface field appearing in ForceSendFields will be sent to the
  3213. // server regardless of whether the field is empty or not. This may be
  3214. // used to include empty fields in Patch requests.
  3215. ForceSendFields []string `json:"-"`
  3216. // NullFields is a list of field names (e.g. "BucketSize") to include in
  3217. // API requests with the JSON null value. By default, fields with empty
  3218. // values are omitted from API requests. However, any field with an
  3219. // empty value appearing in NullFields will be sent to the server as
  3220. // null. It is an error if a field in this list has a non-empty value.
  3221. // This may be used to include null fields in Patch requests.
  3222. NullFields []string `json:"-"`
  3223. }
  3224. func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) {
  3225. type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket
  3226. raw := NoMethod(*s)
  3227. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3228. }
  3229. // GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity
  3230. // computation.
  3231. type GooglePrivacyDlpV2KAnonymityResult struct {
  3232. // EquivalenceClassHistogramBuckets: Histogram of k-anonymity
  3233. // equivalence classes.
  3234. EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"`
  3235. // ForceSendFields is a list of field names (e.g.
  3236. // "EquivalenceClassHistogramBuckets") to unconditionally include in API
  3237. // requests. By default, fields with empty values are omitted from API
  3238. // requests. However, any non-pointer, non-interface field appearing in
  3239. // ForceSendFields will be sent to the server regardless of whether the
  3240. // field is empty or not. This may be used to include empty fields in
  3241. // Patch requests.
  3242. ForceSendFields []string `json:"-"`
  3243. // NullFields is a list of field names (e.g.
  3244. // "EquivalenceClassHistogramBuckets") to include in API requests with
  3245. // the JSON null value. By default, fields with empty values are omitted
  3246. // from API requests. However, any field with an empty value appearing
  3247. // in NullFields will be sent to the server as null. It is an error if a
  3248. // field in this list has a non-empty value. This may be used to include
  3249. // null fields in Patch requests.
  3250. NullFields []string `json:"-"`
  3251. }
  3252. func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) {
  3253. type NoMethod GooglePrivacyDlpV2KAnonymityResult
  3254. raw := NoMethod(*s)
  3255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3256. }
  3257. // GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric.
  3258. // This corresponds to a risk model similar to what
  3259. // is called "journalist risk" in the literature, except the attack
  3260. // dataset is
  3261. // statistically modeled instead of being perfectly known. This can be
  3262. // done
  3263. // using publicly available data (like the US Census), or using a
  3264. // custom
  3265. // statistical model (indicated as one or several BigQuery tables), or
  3266. // by
  3267. // extrapolating from the distribution of values in the input dataset.
  3268. // A column with a semantic tag attached.
  3269. type GooglePrivacyDlpV2KMapEstimationConfig struct {
  3270. // AuxiliaryTables: Several auxiliary tables can be used in the
  3271. // analysis. Each custom_tag
  3272. // used to tag a quasi-identifiers column must appear in exactly one
  3273. // column
  3274. // of one auxiliary table.
  3275. AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"`
  3276. // QuasiIds: Fields considered to be quasi-identifiers. No two columns
  3277. // can have the
  3278. // same tag. [required]
  3279. QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"`
  3280. // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
  3281. // modeling.
  3282. // Required if no column is tagged with a region-specific InfoType
  3283. // (like
  3284. // US_ZIP_5) or a region code.
  3285. RegionCode string `json:"regionCode,omitempty"`
  3286. // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
  3287. // unconditionally include in API requests. By default, fields with
  3288. // empty values are omitted from API requests. However, any non-pointer,
  3289. // non-interface field appearing in ForceSendFields will be sent to the
  3290. // server regardless of whether the field is empty or not. This may be
  3291. // used to include empty fields in Patch requests.
  3292. ForceSendFields []string `json:"-"`
  3293. // NullFields is a list of field names (e.g. "AuxiliaryTables") to
  3294. // include in API requests with the JSON null value. By default, fields
  3295. // with empty values are omitted from API requests. However, any field
  3296. // with an empty value appearing in NullFields will be sent to the
  3297. // server as null. It is an error if a field in this list has a
  3298. // non-empty value. This may be used to include null fields in Patch
  3299. // requests.
  3300. NullFields []string `json:"-"`
  3301. }
  3302. func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) {
  3303. type NoMethod GooglePrivacyDlpV2KMapEstimationConfig
  3304. raw := NoMethod(*s)
  3305. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3306. }
  3307. // GooglePrivacyDlpV2KMapEstimationHistogramBucket: A
  3308. // KMapEstimationHistogramBucket message with the following values:
  3309. // min_anonymity: 3
  3310. // max_anonymity: 5
  3311. // frequency: 42
  3312. // means that there are 42 records whose quasi-identifier values
  3313. // correspond
  3314. // to 3, 4 or 5 people in the overlying population. An important
  3315. // particular
  3316. // case is when min_anonymity = max_anonymity = 1: the frequency field
  3317. // then
  3318. // corresponds to the number of uniquely identifiable records.
  3319. type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct {
  3320. // BucketSize: Number of records within these anonymity bounds.
  3321. BucketSize int64 `json:"bucketSize,omitempty,string"`
  3322. // BucketValueCount: Total number of distinct quasi-identifier tuple
  3323. // values in this bucket.
  3324. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  3325. // BucketValues: Sample of quasi-identifier tuple values in this bucket.
  3326. // The total
  3327. // number of classes returned per bucket is capped at 20.
  3328. BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"`
  3329. // MaxAnonymity: Always greater than or equal to min_anonymity.
  3330. MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"`
  3331. // MinAnonymity: Always positive.
  3332. MinAnonymity int64 `json:"minAnonymity,omitempty,string"`
  3333. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  3334. // unconditionally include in API requests. By default, fields with
  3335. // empty values are omitted from API requests. However, any non-pointer,
  3336. // non-interface field appearing in ForceSendFields will be sent to the
  3337. // server regardless of whether the field is empty or not. This may be
  3338. // used to include empty fields in Patch requests.
  3339. ForceSendFields []string `json:"-"`
  3340. // NullFields is a list of field names (e.g. "BucketSize") to include in
  3341. // API requests with the JSON null value. By default, fields with empty
  3342. // values are omitted from API requests. However, any field with an
  3343. // empty value appearing in NullFields will be sent to the server as
  3344. // null. It is an error if a field in this list has a non-empty value.
  3345. // This may be used to include null fields in Patch requests.
  3346. NullFields []string `json:"-"`
  3347. }
  3348. func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
  3349. type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket
  3350. raw := NoMethod(*s)
  3351. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3352. }
  3353. // GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for
  3354. // the quasi-identifier columns.
  3355. type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct {
  3356. // EstimatedAnonymity: The estimated anonymity for these
  3357. // quasi-identifier values.
  3358. EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"`
  3359. // QuasiIdsValues: The quasi-identifier values.
  3360. QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"`
  3361. // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity")
  3362. // to unconditionally include in API requests. By default, fields with
  3363. // empty values are omitted from API requests. However, any non-pointer,
  3364. // non-interface field appearing in ForceSendFields will be sent to the
  3365. // server regardless of whether the field is empty or not. This may be
  3366. // used to include empty fields in Patch requests.
  3367. ForceSendFields []string `json:"-"`
  3368. // NullFields is a list of field names (e.g. "EstimatedAnonymity") to
  3369. // include in API requests with the JSON null value. By default, fields
  3370. // with empty values are omitted from API requests. However, any field
  3371. // with an empty value appearing in NullFields will be sent to the
  3372. // server as null. It is an error if a field in this list has a
  3373. // non-empty value. This may be used to include null fields in Patch
  3374. // requests.
  3375. NullFields []string `json:"-"`
  3376. }
  3377. func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
  3378. type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues
  3379. raw := NoMethod(*s)
  3380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3381. }
  3382. // GooglePrivacyDlpV2KMapEstimationResult: Result of the
  3383. // reidentifiability analysis. Note that these results are
  3384. // an
  3385. // estimation, not exact values.
  3386. type GooglePrivacyDlpV2KMapEstimationResult struct {
  3387. // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity]
  3388. // do not overlap. If a value
  3389. // doesn't correspond to any such interval, the associated frequency
  3390. // is
  3391. // zero. For example, the following records:
  3392. // {min_anonymity: 1, max_anonymity: 1, frequency: 17}
  3393. // {min_anonymity: 2, max_anonymity: 3, frequency: 42}
  3394. // {min_anonymity: 5, max_anonymity: 10, frequency: 99}
  3395. // mean that there are no record with an estimated anonymity of 4, 5,
  3396. // or
  3397. // larger than 10.
  3398. KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"`
  3399. // ForceSendFields is a list of field names (e.g.
  3400. // "KMapEstimationHistogram") to unconditionally include in API
  3401. // requests. By default, fields with empty values are omitted from API
  3402. // requests. However, any non-pointer, non-interface field appearing in
  3403. // ForceSendFields will be sent to the server regardless of whether the
  3404. // field is empty or not. This may be used to include empty fields in
  3405. // Patch requests.
  3406. ForceSendFields []string `json:"-"`
  3407. // NullFields is a list of field names (e.g. "KMapEstimationHistogram")
  3408. // to include in API requests with the JSON null value. By default,
  3409. // fields with empty values are omitted from API requests. However, any
  3410. // field with an empty value appearing in NullFields will be sent to the
  3411. // server as null. It is an error if a field in this list has a
  3412. // non-empty value. This may be used to include null fields in Patch
  3413. // requests.
  3414. NullFields []string `json:"-"`
  3415. }
  3416. func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) {
  3417. type NoMethod GooglePrivacyDlpV2KMapEstimationResult
  3418. raw := NoMethod(*s)
  3419. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3420. }
  3421. // GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity.
  3422. // If a key's partition ID or any of its path kinds or names
  3423. // are
  3424. // reserved/read-only, the key is reserved/read-only.
  3425. // A reserved/read-only key is forbidden in certain documented contexts.
  3426. type GooglePrivacyDlpV2Key struct {
  3427. // PartitionId: Entities are partitioned into subsets, currently
  3428. // identified by a project
  3429. // ID and namespace ID.
  3430. // Queries are scoped to a single partition.
  3431. PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"`
  3432. // Path: The entity path.
  3433. // An entity path consists of one or more elements composed of a kind
  3434. // and a
  3435. // string or numerical identifier, which identify entities. The
  3436. // first
  3437. // element identifies a _root entity_, the second element identifies
  3438. // a _child_ of the root entity, the third element identifies a child of
  3439. // the
  3440. // second entity, and so forth. The entities identified by all prefixes
  3441. // of
  3442. // the path are called the element's _ancestors_.
  3443. //
  3444. // A path can never be empty, and a path can have at most 100 elements.
  3445. Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"`
  3446. // ForceSendFields is a list of field names (e.g. "PartitionId") to
  3447. // unconditionally include in API requests. By default, fields with
  3448. // empty values are omitted from API requests. However, any non-pointer,
  3449. // non-interface field appearing in ForceSendFields will be sent to the
  3450. // server regardless of whether the field is empty or not. This may be
  3451. // used to include empty fields in Patch requests.
  3452. ForceSendFields []string `json:"-"`
  3453. // NullFields is a list of field names (e.g. "PartitionId") to include
  3454. // in API requests with the JSON null value. By default, fields with
  3455. // empty values are omitted from API requests. However, any field with
  3456. // an empty value appearing in NullFields will be sent to the server as
  3457. // null. It is an error if a field in this list has a non-empty value.
  3458. // This may be used to include null fields in Patch requests.
  3459. NullFields []string `json:"-"`
  3460. }
  3461. func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) {
  3462. type NoMethod GooglePrivacyDlpV2Key
  3463. raw := NoMethod(*s)
  3464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3465. }
  3466. // GooglePrivacyDlpV2KindExpression: A representation of a Datastore
  3467. // kind.
  3468. type GooglePrivacyDlpV2KindExpression struct {
  3469. // Name: The name of the kind.
  3470. Name string `json:"name,omitempty"`
  3471. // ForceSendFields is a list of field names (e.g. "Name") to
  3472. // unconditionally include in API requests. By default, fields with
  3473. // empty values are omitted from API requests. However, any non-pointer,
  3474. // non-interface field appearing in ForceSendFields will be sent to the
  3475. // server regardless of whether the field is empty or not. This may be
  3476. // used to include empty fields in Patch requests.
  3477. ForceSendFields []string `json:"-"`
  3478. // NullFields is a list of field names (e.g. "Name") to include in API
  3479. // requests with the JSON null value. By default, fields with empty
  3480. // values are omitted from API requests. However, any field with an
  3481. // empty value appearing in NullFields will be sent to the server as
  3482. // null. It is an error if a field in this list has a non-empty value.
  3483. // This may be used to include null fields in Patch requests.
  3484. NullFields []string `json:"-"`
  3485. }
  3486. func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) {
  3487. type NoMethod GooglePrivacyDlpV2KindExpression
  3488. raw := NoMethod(*s)
  3489. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3490. }
  3491. // GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing
  3492. // data crypto key wrapped by KMS.
  3493. // Authorization requires the following IAM permissions when sending a
  3494. // request
  3495. // to perform a crypto transformation using a kms-wrapped crypto
  3496. // key:
  3497. // dlp.kms.encrypt
  3498. type GooglePrivacyDlpV2KmsWrappedCryptoKey struct {
  3499. // CryptoKeyName: The resource name of the KMS CryptoKey to use for
  3500. // unwrapping. [required]
  3501. CryptoKeyName string `json:"cryptoKeyName,omitempty"`
  3502. // WrappedKey: The wrapped data crypto key. [required]
  3503. WrappedKey string `json:"wrappedKey,omitempty"`
  3504. // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to
  3505. // unconditionally include in API requests. By default, fields with
  3506. // empty values are omitted from API requests. However, any non-pointer,
  3507. // non-interface field appearing in ForceSendFields will be sent to the
  3508. // server regardless of whether the field is empty or not. This may be
  3509. // used to include empty fields in Patch requests.
  3510. ForceSendFields []string `json:"-"`
  3511. // NullFields is a list of field names (e.g. "CryptoKeyName") to include
  3512. // in API requests with the JSON null value. By default, fields with
  3513. // empty values are omitted from API requests. However, any field with
  3514. // an empty value appearing in NullFields will be sent to the server as
  3515. // null. It is an error if a field in this list has a non-empty value.
  3516. // This may be used to include null fields in Patch requests.
  3517. NullFields []string `json:"-"`
  3518. }
  3519. func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) {
  3520. type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey
  3521. raw := NoMethod(*s)
  3522. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3523. }
  3524. // GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for
  3525. // analysis of reidentification risk.
  3526. type GooglePrivacyDlpV2LDiversityConfig struct {
  3527. // QuasiIds: Set of quasi-identifiers indicating how equivalence classes
  3528. // are
  3529. // defined for the l-diversity computation. When multiple fields
  3530. // are
  3531. // specified, they are considered a single composite key.
  3532. QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"`
  3533. // SensitiveAttribute: Sensitive field for computing the l-value.
  3534. SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"`
  3535. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  3536. // unconditionally include in API requests. By default, fields with
  3537. // empty values are omitted from API requests. However, any non-pointer,
  3538. // non-interface field appearing in ForceSendFields will be sent to the
  3539. // server regardless of whether the field is empty or not. This may be
  3540. // used to include empty fields in Patch requests.
  3541. ForceSendFields []string `json:"-"`
  3542. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  3543. // API requests with the JSON null value. By default, fields with empty
  3544. // values are omitted from API requests. However, any field with an
  3545. // empty value appearing in NullFields will be sent to the server as
  3546. // null. It is an error if a field in this list has a non-empty value.
  3547. // This may be used to include null fields in Patch requests.
  3548. NullFields []string `json:"-"`
  3549. }
  3550. func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) {
  3551. type NoMethod GooglePrivacyDlpV2LDiversityConfig
  3552. raw := NoMethod(*s)
  3553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3554. }
  3555. // GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns'
  3556. // values that share the same ldiversity value.
  3557. type GooglePrivacyDlpV2LDiversityEquivalenceClass struct {
  3558. // EquivalenceClassSize: Size of the k-anonymity equivalence class.
  3559. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  3560. // NumDistinctSensitiveValues: Number of distinct sensitive values in
  3561. // this equivalence class.
  3562. NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"`
  3563. // QuasiIdsValues: Quasi-identifier values defining the k-anonymity
  3564. // equivalence
  3565. // class. The order is always the same as the original request.
  3566. QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"`
  3567. // TopSensitiveValues: Estimated frequencies of top sensitive values.
  3568. TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"`
  3569. // ForceSendFields is a list of field names (e.g.
  3570. // "EquivalenceClassSize") to unconditionally include in API requests.
  3571. // By default, fields with empty values are omitted from API requests.
  3572. // However, any non-pointer, non-interface field appearing in
  3573. // ForceSendFields will be sent to the server regardless of whether the
  3574. // field is empty or not. This may be used to include empty fields in
  3575. // Patch requests.
  3576. ForceSendFields []string `json:"-"`
  3577. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  3578. // include in API requests with the JSON null value. By default, fields
  3579. // with empty values are omitted from API requests. However, any field
  3580. // with an empty value appearing in NullFields will be sent to the
  3581. // server as null. It is an error if a field in this list has a
  3582. // non-empty value. This may be used to include null fields in Patch
  3583. // requests.
  3584. NullFields []string `json:"-"`
  3585. }
  3586. func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) {
  3587. type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass
  3588. raw := NoMethod(*s)
  3589. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3590. }
  3591. type GooglePrivacyDlpV2LDiversityHistogramBucket struct {
  3592. // BucketSize: Total number of equivalence classes in this bucket.
  3593. BucketSize int64 `json:"bucketSize,omitempty,string"`
  3594. // BucketValueCount: Total number of distinct equivalence classes in
  3595. // this bucket.
  3596. BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
  3597. // BucketValues: Sample of equivalence classes in this bucket. The total
  3598. // number of
  3599. // classes returned per bucket is capped at 20.
  3600. BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"`
  3601. // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value
  3602. // frequencies of the equivalence
  3603. // classes in this bucket.
  3604. SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"`
  3605. // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value
  3606. // frequencies of the equivalence
  3607. // classes in this bucket.
  3608. SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"`
  3609. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  3610. // unconditionally include in API requests. By default, fields with
  3611. // empty values are omitted from API requests. However, any non-pointer,
  3612. // non-interface field appearing in ForceSendFields will be sent to the
  3613. // server regardless of whether the field is empty or not. This may be
  3614. // used to include empty fields in Patch requests.
  3615. ForceSendFields []string `json:"-"`
  3616. // NullFields is a list of field names (e.g. "BucketSize") to include in
  3617. // API requests with the JSON null value. By default, fields with empty
  3618. // values are omitted from API requests. However, any field with an
  3619. // empty value appearing in NullFields will be sent to the server as
  3620. // null. It is an error if a field in this list has a non-empty value.
  3621. // This may be used to include null fields in Patch requests.
  3622. NullFields []string `json:"-"`
  3623. }
  3624. func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) {
  3625. type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket
  3626. raw := NoMethod(*s)
  3627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3628. }
  3629. // GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity
  3630. // computation.
  3631. type GooglePrivacyDlpV2LDiversityResult struct {
  3632. // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity
  3633. // equivalence class sensitive value frequencies.
  3634. SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"`
  3635. // ForceSendFields is a list of field names (e.g.
  3636. // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include
  3637. // in API requests. By default, fields with empty values are omitted
  3638. // from API requests. However, any non-pointer, non-interface field
  3639. // appearing in ForceSendFields will be sent to the server regardless of
  3640. // whether the field is empty or not. This may be used to include empty
  3641. // fields in Patch requests.
  3642. ForceSendFields []string `json:"-"`
  3643. // NullFields is a list of field names (e.g.
  3644. // "SensitiveValueFrequencyHistogramBuckets") to include in API requests
  3645. // with the JSON null value. By default, fields with empty values are
  3646. // omitted from API requests. However, any field with an empty value
  3647. // appearing in NullFields will be sent to the server as null. It is an
  3648. // error if a field in this list has a non-empty value. This may be used
  3649. // to include null fields in Patch requests.
  3650. NullFields []string `json:"-"`
  3651. }
  3652. func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) {
  3653. type NoMethod GooglePrivacyDlpV2LDiversityResult
  3654. raw := NoMethod(*s)
  3655. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3656. }
  3657. // GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an
  3658. // adjustment to the likelihood of a finding as
  3659. // part of a detection rule.
  3660. type GooglePrivacyDlpV2LikelihoodAdjustment struct {
  3661. // FixedLikelihood: Set the likelihood of a finding to a fixed value.
  3662. //
  3663. // Possible values:
  3664. // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
  3665. // "VERY_UNLIKELY" - Few matching elements.
  3666. // "UNLIKELY"
  3667. // "POSSIBLE" - Some matching elements.
  3668. // "LIKELY"
  3669. // "VERY_LIKELY" - Many matching elements.
  3670. FixedLikelihood string `json:"fixedLikelihood,omitempty"`
  3671. // RelativeLikelihood: Increase or decrease the likelihood by the
  3672. // specified number of
  3673. // levels. For example, if a finding would be `POSSIBLE` without
  3674. // the
  3675. // detection rule and `relative_likelihood` is 1, then it is upgraded
  3676. // to
  3677. // `LIKELY`, while a value of -1 would downgrade it to
  3678. // `UNLIKELY`.
  3679. // Likelihood may never drop below `VERY_UNLIKELY` or
  3680. // exceed
  3681. // `VERY_LIKELY`, so applying an adjustment of 1 followed by
  3682. // an
  3683. // adjustment of -1 when base likelihood is `VERY_LIKELY` will result
  3684. // in
  3685. // a final likelihood of `LIKELY`.
  3686. RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"`
  3687. // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to
  3688. // unconditionally include in API requests. By default, fields with
  3689. // empty values are omitted from API requests. However, any non-pointer,
  3690. // non-interface field appearing in ForceSendFields will be sent to the
  3691. // server regardless of whether the field is empty or not. This may be
  3692. // used to include empty fields in Patch requests.
  3693. ForceSendFields []string `json:"-"`
  3694. // NullFields is a list of field names (e.g. "FixedLikelihood") to
  3695. // include in API requests with the JSON null value. By default, fields
  3696. // with empty values are omitted from API requests. However, any field
  3697. // with an empty value appearing in NullFields will be sent to the
  3698. // server as null. It is an error if a field in this list has a
  3699. // non-empty value. This may be used to include null fields in Patch
  3700. // requests.
  3701. NullFields []string `json:"-"`
  3702. }
  3703. func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) {
  3704. type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment
  3705. raw := NoMethod(*s)
  3706. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3707. }
  3708. // GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message
  3709. // for ListDeidentifyTemplates.
  3710. type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct {
  3711. // DeidentifyTemplates: List of deidentify templates, up to page_size
  3712. // in
  3713. // ListDeidentifyTemplatesRequest.
  3714. DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"`
  3715. // NextPageToken: If the next page is available then the next page token
  3716. // to be used
  3717. // in following ListDeidentifyTemplates request.
  3718. NextPageToken string `json:"nextPageToken,omitempty"`
  3719. // ServerResponse contains the HTTP response code and headers from the
  3720. // server.
  3721. googleapi.ServerResponse `json:"-"`
  3722. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates")
  3723. // to unconditionally include in API requests. By default, fields with
  3724. // empty values are omitted from API requests. However, any non-pointer,
  3725. // non-interface field appearing in ForceSendFields will be sent to the
  3726. // server regardless of whether the field is empty or not. This may be
  3727. // used to include empty fields in Patch requests.
  3728. ForceSendFields []string `json:"-"`
  3729. // NullFields is a list of field names (e.g. "DeidentifyTemplates") to
  3730. // include in API requests with the JSON null value. By default, fields
  3731. // with empty values are omitted from API requests. However, any field
  3732. // with an empty value appearing in NullFields will be sent to the
  3733. // server as null. It is an error if a field in this list has a
  3734. // non-empty value. This may be used to include null fields in Patch
  3735. // requests.
  3736. NullFields []string `json:"-"`
  3737. }
  3738. func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) {
  3739. type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse
  3740. raw := NoMethod(*s)
  3741. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3742. }
  3743. // GooglePrivacyDlpV2ListDlpJobsResponse: The response message for
  3744. // listing DLP jobs.
  3745. type GooglePrivacyDlpV2ListDlpJobsResponse struct {
  3746. // Jobs: A list of DlpJobs that matches the specified filter in the
  3747. // request.
  3748. Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"`
  3749. // NextPageToken: The standard List next-page token.
  3750. NextPageToken string `json:"nextPageToken,omitempty"`
  3751. // ServerResponse contains the HTTP response code and headers from the
  3752. // server.
  3753. googleapi.ServerResponse `json:"-"`
  3754. // ForceSendFields is a list of field names (e.g. "Jobs") to
  3755. // unconditionally include in API requests. By default, fields with
  3756. // empty values are omitted from API requests. However, any non-pointer,
  3757. // non-interface field appearing in ForceSendFields will be sent to the
  3758. // server regardless of whether the field is empty or not. This may be
  3759. // used to include empty fields in Patch requests.
  3760. ForceSendFields []string `json:"-"`
  3761. // NullFields is a list of field names (e.g. "Jobs") to include in API
  3762. // requests with the JSON null value. By default, fields with empty
  3763. // values are omitted from API requests. However, any field with an
  3764. // empty value appearing in NullFields will be sent to the server as
  3765. // null. It is an error if a field in this list has a non-empty value.
  3766. // This may be used to include null fields in Patch requests.
  3767. NullFields []string `json:"-"`
  3768. }
  3769. func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) {
  3770. type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse
  3771. raw := NoMethod(*s)
  3772. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3773. }
  3774. // GooglePrivacyDlpV2ListInfoTypesResponse: Response to the
  3775. // ListInfoTypes request.
  3776. type GooglePrivacyDlpV2ListInfoTypesResponse struct {
  3777. // InfoTypes: Set of sensitive infoTypes.
  3778. InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"`
  3779. // ServerResponse contains the HTTP response code and headers from the
  3780. // server.
  3781. googleapi.ServerResponse `json:"-"`
  3782. // ForceSendFields is a list of field names (e.g. "InfoTypes") to
  3783. // unconditionally include in API requests. By default, fields with
  3784. // empty values are omitted from API requests. However, any non-pointer,
  3785. // non-interface field appearing in ForceSendFields will be sent to the
  3786. // server regardless of whether the field is empty or not. This may be
  3787. // used to include empty fields in Patch requests.
  3788. ForceSendFields []string `json:"-"`
  3789. // NullFields is a list of field names (e.g. "InfoTypes") to include in
  3790. // API requests with the JSON null value. By default, fields with empty
  3791. // values are omitted from API requests. However, any field with an
  3792. // empty value appearing in NullFields will be sent to the server as
  3793. // null. It is an error if a field in this list has a non-empty value.
  3794. // This may be used to include null fields in Patch requests.
  3795. NullFields []string `json:"-"`
  3796. }
  3797. func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) {
  3798. type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse
  3799. raw := NoMethod(*s)
  3800. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3801. }
  3802. // GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for
  3803. // ListInspectTemplates.
  3804. type GooglePrivacyDlpV2ListInspectTemplatesResponse struct {
  3805. // InspectTemplates: List of inspectTemplates, up to page_size in
  3806. // ListInspectTemplatesRequest.
  3807. InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"`
  3808. // NextPageToken: If the next page is available then the next page token
  3809. // to be used
  3810. // in following ListInspectTemplates request.
  3811. NextPageToken string `json:"nextPageToken,omitempty"`
  3812. // ServerResponse contains the HTTP response code and headers from the
  3813. // server.
  3814. googleapi.ServerResponse `json:"-"`
  3815. // ForceSendFields is a list of field names (e.g. "InspectTemplates") to
  3816. // unconditionally include in API requests. By default, fields with
  3817. // empty values are omitted from API requests. However, any non-pointer,
  3818. // non-interface field appearing in ForceSendFields will be sent to the
  3819. // server regardless of whether the field is empty or not. This may be
  3820. // used to include empty fields in Patch requests.
  3821. ForceSendFields []string `json:"-"`
  3822. // NullFields is a list of field names (e.g. "InspectTemplates") to
  3823. // include in API requests with the JSON null value. By default, fields
  3824. // with empty values are omitted from API requests. However, any field
  3825. // with an empty value appearing in NullFields will be sent to the
  3826. // server as null. It is an error if a field in this list has a
  3827. // non-empty value. This may be used to include null fields in Patch
  3828. // requests.
  3829. NullFields []string `json:"-"`
  3830. }
  3831. func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) {
  3832. type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse
  3833. raw := NoMethod(*s)
  3834. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3835. }
  3836. // GooglePrivacyDlpV2ListJobTriggersResponse: Response message for
  3837. // ListJobTriggers.
  3838. type GooglePrivacyDlpV2ListJobTriggersResponse struct {
  3839. // JobTriggers: List of triggeredJobs, up to page_size in
  3840. // ListJobTriggersRequest.
  3841. JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"`
  3842. // NextPageToken: If the next page is available then the next page token
  3843. // to be used
  3844. // in following ListJobTriggers request.
  3845. NextPageToken string `json:"nextPageToken,omitempty"`
  3846. // ServerResponse contains the HTTP response code and headers from the
  3847. // server.
  3848. googleapi.ServerResponse `json:"-"`
  3849. // ForceSendFields is a list of field names (e.g. "JobTriggers") to
  3850. // unconditionally include in API requests. By default, fields with
  3851. // empty values are omitted from API requests. However, any non-pointer,
  3852. // non-interface field appearing in ForceSendFields will be sent to the
  3853. // server regardless of whether the field is empty or not. This may be
  3854. // used to include empty fields in Patch requests.
  3855. ForceSendFields []string `json:"-"`
  3856. // NullFields is a list of field names (e.g. "JobTriggers") to include
  3857. // in API requests with the JSON null value. By default, fields with
  3858. // empty values are omitted from API requests. However, any field with
  3859. // an empty value appearing in NullFields will be sent to the server as
  3860. // null. It is an error if a field in this list has a non-empty value.
  3861. // This may be used to include null fields in Patch requests.
  3862. NullFields []string `json:"-"`
  3863. }
  3864. func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) {
  3865. type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse
  3866. raw := NoMethod(*s)
  3867. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3868. }
  3869. // GooglePrivacyDlpV2Location: Specifies the location of the finding.
  3870. type GooglePrivacyDlpV2Location struct {
  3871. // ByteRange: Zero-based byte offsets delimiting the finding.
  3872. // These are relative to the finding's containing element.
  3873. // Note that when the content is not textual, this references
  3874. // the UTF-8 encoded textual representation of the content.
  3875. // Omitted if content is an image.
  3876. ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"`
  3877. // CodepointRange: Unicode character offsets delimiting the
  3878. // finding.
  3879. // These are relative to the finding's containing element.
  3880. // Provided when the content is text.
  3881. CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"`
  3882. // ContentLocations: List of nested objects pointing to the precise
  3883. // location of the finding
  3884. // within the file or record.
  3885. ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"`
  3886. // ForceSendFields is a list of field names (e.g. "ByteRange") to
  3887. // unconditionally include in API requests. By default, fields with
  3888. // empty values are omitted from API requests. However, any non-pointer,
  3889. // non-interface field appearing in ForceSendFields will be sent to the
  3890. // server regardless of whether the field is empty or not. This may be
  3891. // used to include empty fields in Patch requests.
  3892. ForceSendFields []string `json:"-"`
  3893. // NullFields is a list of field names (e.g. "ByteRange") to include in
  3894. // API requests with the JSON null value. By default, fields with empty
  3895. // values are omitted from API requests. However, any field with an
  3896. // empty value appearing in NullFields will be sent to the server as
  3897. // null. It is an error if a field in this list has a non-empty value.
  3898. // This may be used to include null fields in Patch requests.
  3899. NullFields []string `json:"-"`
  3900. }
  3901. func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) {
  3902. type NoMethod GooglePrivacyDlpV2Location
  3903. raw := NoMethod(*s)
  3904. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3905. }
  3906. // GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over
  3907. // an individual column, including
  3908. // min, max, and quantiles.
  3909. type GooglePrivacyDlpV2NumericalStatsConfig struct {
  3910. // Field: Field to compute numerical stats on. Supported types
  3911. // are
  3912. // integer, float, date, datetime, timestamp, time.
  3913. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  3914. // ForceSendFields is a list of field names (e.g. "Field") 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. "Field") to include in API
  3922. // 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 *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) {
  3930. type NoMethod GooglePrivacyDlpV2NumericalStatsConfig
  3931. raw := NoMethod(*s)
  3932. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3933. }
  3934. // GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats
  3935. // computation.
  3936. type GooglePrivacyDlpV2NumericalStatsResult struct {
  3937. // MaxValue: Maximum value appearing in the column.
  3938. MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"`
  3939. // MinValue: Minimum value appearing in the column.
  3940. MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"`
  3941. // QuantileValues: List of 99 values that partition the set of field
  3942. // values into 100 equal
  3943. // sized buckets.
  3944. QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"`
  3945. // ForceSendFields is a list of field names (e.g. "MaxValue") to
  3946. // unconditionally include in API requests. By default, fields with
  3947. // empty values are omitted from API requests. However, any non-pointer,
  3948. // non-interface field appearing in ForceSendFields will be sent to the
  3949. // server regardless of whether the field is empty or not. This may be
  3950. // used to include empty fields in Patch requests.
  3951. ForceSendFields []string `json:"-"`
  3952. // NullFields is a list of field names (e.g. "MaxValue") to include in
  3953. // API requests with the JSON null value. By default, fields with empty
  3954. // values are omitted from API requests. However, any field with an
  3955. // empty value appearing in NullFields will be sent to the server as
  3956. // null. It is an error if a field in this list has a non-empty value.
  3957. // This may be used to include null fields in Patch requests.
  3958. NullFields []string `json:"-"`
  3959. }
  3960. func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) {
  3961. type NoMethod GooglePrivacyDlpV2NumericalStatsResult
  3962. raw := NoMethod(*s)
  3963. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3964. }
  3965. // GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing
  3966. // output.
  3967. type GooglePrivacyDlpV2OutputStorageConfig struct {
  3968. // OutputSchema: Schema used for writing the findings for Inspect jobs.
  3969. // This field is only
  3970. // used for Inspect and must be unspecified for Risk jobs. Columns are
  3971. // derived
  3972. // from the `Finding` object. If appending to an existing table, any
  3973. // columns
  3974. // from the predefined schema that are missing will be added. No columns
  3975. // in
  3976. // the existing table will be deleted.
  3977. //
  3978. // If unspecified, then all available columns will be used for a new
  3979. // table,
  3980. // and no changes will be made to an existing table.
  3981. //
  3982. // Possible values:
  3983. // "OUTPUT_SCHEMA_UNSPECIFIED"
  3984. // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`,
  3985. // `certainty`, and
  3986. // `timestamp`.
  3987. // "GCS_COLUMNS" - Schema tailored to findings from scanning Google
  3988. // Cloud Storage.
  3989. // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning
  3990. // Google Datastore.
  3991. // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning
  3992. // Google BigQuery.
  3993. // "ALL_COLUMNS" - Schema containing all columns.
  3994. OutputSchema string `json:"outputSchema,omitempty"`
  3995. // Table: Store findings in an existing table or a new table in an
  3996. // existing
  3997. // dataset. If table_id is not set a new one will be generated
  3998. // for you with the following
  3999. // format:
  4000. // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used
  4001. // for
  4002. // generating the date details.
  4003. //
  4004. // For Inspect, each column in an existing output table must have the
  4005. // same
  4006. // name, type, and mode of a field in the `Finding` object.
  4007. //
  4008. // For Risk, an existing output table should be the output of a
  4009. // previous
  4010. // Risk analysis job run on the same source table, with the same
  4011. // privacy
  4012. // metric and quasi-identifiers. Risk jobs that analyze the same table
  4013. // but
  4014. // compute a different privacy metric, or use different sets
  4015. // of
  4016. // quasi-identifiers, cannot store their results in the same table.
  4017. Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"`
  4018. // ForceSendFields is a list of field names (e.g. "OutputSchema") to
  4019. // unconditionally include in API requests. By default, fields with
  4020. // empty values are omitted from API requests. However, any non-pointer,
  4021. // non-interface field appearing in ForceSendFields will be sent to the
  4022. // server regardless of whether the field is empty or not. This may be
  4023. // used to include empty fields in Patch requests.
  4024. ForceSendFields []string `json:"-"`
  4025. // NullFields is a list of field names (e.g. "OutputSchema") to include
  4026. // in API requests with the JSON null value. By default, fields with
  4027. // empty values are omitted from API requests. However, any field with
  4028. // an empty value appearing in NullFields will be sent to the server as
  4029. // null. It is an error if a field in this list has a non-empty value.
  4030. // This may be used to include null fields in Patch requests.
  4031. NullFields []string `json:"-"`
  4032. }
  4033. func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) {
  4034. type NoMethod GooglePrivacyDlpV2OutputStorageConfig
  4035. raw := NoMethod(*s)
  4036. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4037. }
  4038. // GooglePrivacyDlpV2PartitionId: Datastore partition ID.
  4039. // A partition ID identifies a grouping of entities. The grouping is
  4040. // always
  4041. // by project and namespace, however the namespace ID may be empty.
  4042. //
  4043. // A partition ID contains several dimensions:
  4044. // project ID and namespace ID.
  4045. type GooglePrivacyDlpV2PartitionId struct {
  4046. // NamespaceId: If not empty, the ID of the namespace to which the
  4047. // entities belong.
  4048. NamespaceId string `json:"namespaceId,omitempty"`
  4049. // ProjectId: The ID of the project to which the entities belong.
  4050. ProjectId string `json:"projectId,omitempty"`
  4051. // ForceSendFields is a list of field names (e.g. "NamespaceId") to
  4052. // unconditionally include in API requests. By default, fields with
  4053. // empty values are omitted from API requests. However, any non-pointer,
  4054. // non-interface field appearing in ForceSendFields will be sent to the
  4055. // server regardless of whether the field is empty or not. This may be
  4056. // used to include empty fields in Patch requests.
  4057. ForceSendFields []string `json:"-"`
  4058. // NullFields is a list of field names (e.g. "NamespaceId") to include
  4059. // in API requests with the JSON null value. By default, fields with
  4060. // empty values are omitted from API requests. However, any field with
  4061. // an empty value appearing in NullFields will be sent to the server as
  4062. // null. It is an error if a field in this list has a non-empty value.
  4063. // This may be used to include null fields in Patch requests.
  4064. NullFields []string `json:"-"`
  4065. }
  4066. func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) {
  4067. type NoMethod GooglePrivacyDlpV2PartitionId
  4068. raw := NoMethod(*s)
  4069. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4070. }
  4071. // GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to
  4072. // construct a key path.
  4073. //
  4074. // If either name or ID is set, the element is complete.
  4075. // If neither is set, the element is incomplete.
  4076. type GooglePrivacyDlpV2PathElement struct {
  4077. // Id: The auto-allocated ID of the entity.
  4078. // Never equal to zero. Values less than zero are discouraged and may
  4079. // not
  4080. // be supported in the future.
  4081. Id int64 `json:"id,omitempty,string"`
  4082. // Kind: The kind of the entity.
  4083. // A kind matching regex `__.*__` is reserved/read-only.
  4084. // A kind must not contain more than 1500 bytes when UTF-8
  4085. // encoded.
  4086. // Cannot be "".
  4087. Kind string `json:"kind,omitempty"`
  4088. // Name: The name of the entity.
  4089. // A name matching regex `__.*__` is reserved/read-only.
  4090. // A name must not be more than 1500 bytes when UTF-8 encoded.
  4091. // Cannot be "".
  4092. Name string `json:"name,omitempty"`
  4093. // ForceSendFields is a list of field names (e.g. "Id") to
  4094. // unconditionally include in API requests. By default, fields with
  4095. // empty values are omitted from API requests. However, any non-pointer,
  4096. // non-interface field appearing in ForceSendFields will be sent to the
  4097. // server regardless of whether the field is empty or not. This may be
  4098. // used to include empty fields in Patch requests.
  4099. ForceSendFields []string `json:"-"`
  4100. // NullFields is a list of field names (e.g. "Id") to include in API
  4101. // requests with the JSON null value. By default, fields with empty
  4102. // values are omitted from API requests. However, any field with an
  4103. // empty value appearing in NullFields will be sent to the server as
  4104. // null. It is an error if a field in this list has a non-empty value.
  4105. // This may be used to include null fields in Patch requests.
  4106. NullFields []string `json:"-"`
  4107. }
  4108. func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) {
  4109. type NoMethod GooglePrivacyDlpV2PathElement
  4110. raw := NoMethod(*s)
  4111. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4112. }
  4113. // GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a
  4114. // value.
  4115. type GooglePrivacyDlpV2PrimitiveTransformation struct {
  4116. BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"`
  4117. CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
  4118. CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
  4119. CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"`
  4120. DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"`
  4121. FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"`
  4122. RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"`
  4123. ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"`
  4124. ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"`
  4125. TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"`
  4126. // ForceSendFields is a list of field names (e.g. "BucketingConfig") to
  4127. // unconditionally include in API requests. By default, fields with
  4128. // empty values are omitted from API requests. However, any non-pointer,
  4129. // non-interface field appearing in ForceSendFields will be sent to the
  4130. // server regardless of whether the field is empty or not. This may be
  4131. // used to include empty fields in Patch requests.
  4132. ForceSendFields []string `json:"-"`
  4133. // NullFields is a list of field names (e.g. "BucketingConfig") to
  4134. // include in API requests with the JSON null value. By default, fields
  4135. // with empty values are omitted from API requests. However, any field
  4136. // with an empty value appearing in NullFields will be sent to the
  4137. // server as null. It is an error if a field in this list has a
  4138. // non-empty value. This may be used to include null fields in Patch
  4139. // requests.
  4140. NullFields []string `json:"-"`
  4141. }
  4142. func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) {
  4143. type NoMethod GooglePrivacyDlpV2PrimitiveTransformation
  4144. raw := NoMethod(*s)
  4145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4146. }
  4147. // GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for
  4148. // reidentification risk analysis.
  4149. type GooglePrivacyDlpV2PrivacyMetric struct {
  4150. CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"`
  4151. DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"`
  4152. KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"`
  4153. KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"`
  4154. LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"`
  4155. NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"`
  4156. // ForceSendFields is a list of field names (e.g.
  4157. // "CategoricalStatsConfig") to unconditionally include in API requests.
  4158. // By default, fields with empty values are omitted from API requests.
  4159. // However, any non-pointer, non-interface field appearing in
  4160. // ForceSendFields will be sent to the server regardless of whether the
  4161. // field is empty or not. This may be used to include empty fields in
  4162. // Patch requests.
  4163. ForceSendFields []string `json:"-"`
  4164. // NullFields is a list of field names (e.g. "CategoricalStatsConfig")
  4165. // to include in API requests with the JSON null value. By default,
  4166. // fields with empty values are omitted from API requests. However, any
  4167. // field with an empty value appearing in NullFields will be sent to the
  4168. // server as null. It is an error if a field in this list has a
  4169. // non-empty value. This may be used to include null fields in Patch
  4170. // requests.
  4171. NullFields []string `json:"-"`
  4172. }
  4173. func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) {
  4174. type NoMethod GooglePrivacyDlpV2PrivacyMetric
  4175. raw := NoMethod(*s)
  4176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4177. }
  4178. // GooglePrivacyDlpV2Proximity: Message for specifying a window around a
  4179. // finding to apply a detection
  4180. // rule.
  4181. type GooglePrivacyDlpV2Proximity struct {
  4182. // WindowAfter: Number of characters after the finding to consider.
  4183. WindowAfter int64 `json:"windowAfter,omitempty"`
  4184. // WindowBefore: Number of characters before the finding to consider.
  4185. WindowBefore int64 `json:"windowBefore,omitempty"`
  4186. // ForceSendFields is a list of field names (e.g. "WindowAfter") to
  4187. // unconditionally include in API requests. By default, fields with
  4188. // empty values are omitted from API requests. However, any non-pointer,
  4189. // non-interface field appearing in ForceSendFields will be sent to the
  4190. // server regardless of whether the field is empty or not. This may be
  4191. // used to include empty fields in Patch requests.
  4192. ForceSendFields []string `json:"-"`
  4193. // NullFields is a list of field names (e.g. "WindowAfter") to include
  4194. // in API requests with the JSON null value. By default, fields with
  4195. // empty values are omitted from API requests. However, any field with
  4196. // an empty value appearing in NullFields will be sent to the server as
  4197. // null. It is an error if a field in this list has a non-empty value.
  4198. // This may be used to include null fields in Patch requests.
  4199. NullFields []string `json:"-"`
  4200. }
  4201. func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) {
  4202. type NoMethod GooglePrivacyDlpV2Proximity
  4203. raw := NoMethod(*s)
  4204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4205. }
  4206. // GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of
  4207. // a DlpJob to the Cloud Security
  4208. // Command Center (CSCC Alpha).
  4209. // This action is only available for projects which are parts of
  4210. // an organization and whitelisted for the alpha Cloud Security
  4211. // Command
  4212. // Center.
  4213. // The action will publish count of finding instances and their info
  4214. // types.
  4215. // The summary of findings will be persisted in CSCC and are governed by
  4216. // CSCC
  4217. // service-specific policy, see
  4218. // https://cloud.google.com/terms/service-terms
  4219. // Only a single instance of this action can be specified.
  4220. // Compatible with: Inspect
  4221. type GooglePrivacyDlpV2PublishSummaryToCscc struct {
  4222. }
  4223. // GooglePrivacyDlpV2PublishToPubSub: Publish the results of a DlpJob to
  4224. // a pub sub channel.
  4225. // Compatible with: Inspect, Risk
  4226. type GooglePrivacyDlpV2PublishToPubSub struct {
  4227. // Topic: Cloud Pub/Sub topic to send notifications to. The topic must
  4228. // have given
  4229. // publishing access rights to the DLP API service account executing
  4230. // the long running DlpJob sending the notifications.
  4231. // Format is projects/{project}/topics/{topic}.
  4232. Topic string `json:"topic,omitempty"`
  4233. // ForceSendFields is a list of field names (e.g. "Topic") to
  4234. // unconditionally include in API requests. By default, fields with
  4235. // empty values are omitted from API requests. However, any non-pointer,
  4236. // non-interface field appearing in ForceSendFields will be sent to the
  4237. // server regardless of whether the field is empty or not. This may be
  4238. // used to include empty fields in Patch requests.
  4239. ForceSendFields []string `json:"-"`
  4240. // NullFields is a list of field names (e.g. "Topic") to include in API
  4241. // requests with the JSON null value. By default, fields with empty
  4242. // values are omitted from API requests. However, any field with an
  4243. // empty value appearing in NullFields will be sent to the server as
  4244. // null. It is an error if a field in this list has a non-empty value.
  4245. // This may be used to include null fields in Patch requests.
  4246. NullFields []string `json:"-"`
  4247. }
  4248. func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) {
  4249. type NoMethod GooglePrivacyDlpV2PublishToPubSub
  4250. raw := NoMethod(*s)
  4251. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4252. }
  4253. // GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached.
  4254. type GooglePrivacyDlpV2QuasiId struct {
  4255. // CustomTag: A column can be tagged with a custom tag. In this case,
  4256. // the user must
  4257. // indicate an auxiliary table that contains statistical information
  4258. // on
  4259. // the possible values of this column (below).
  4260. CustomTag string `json:"customTag,omitempty"`
  4261. // Field: Identifies the column. [required]
  4262. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  4263. // Inferred: If no semantic tag is indicated, we infer the statistical
  4264. // model from
  4265. // the distribution of values in the input data
  4266. Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"`
  4267. // InfoType: A column can be tagged with a InfoType to use the relevant
  4268. // public
  4269. // dataset as a statistical model of population, if available.
  4270. // We
  4271. // currently support US ZIP codes, region codes, ages and genders.
  4272. // To programmatically obtain the list of supported InfoTypes,
  4273. // use
  4274. // ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
  4275. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  4276. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  4277. // unconditionally include in API requests. By default, fields with
  4278. // empty values are omitted from API requests. However, any non-pointer,
  4279. // non-interface field appearing in ForceSendFields will be sent to the
  4280. // server regardless of whether the field is empty or not. This may be
  4281. // used to include empty fields in Patch requests.
  4282. ForceSendFields []string `json:"-"`
  4283. // NullFields is a list of field names (e.g. "CustomTag") to include in
  4284. // API requests with the JSON null value. By default, fields with empty
  4285. // values are omitted from API requests. However, any field with an
  4286. // empty value appearing in NullFields will be sent to the server as
  4287. // null. It is an error if a field in this list has a non-empty value.
  4288. // This may be used to include null fields in Patch requests.
  4289. NullFields []string `json:"-"`
  4290. }
  4291. func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) {
  4292. type NoMethod GooglePrivacyDlpV2QuasiId
  4293. raw := NoMethod(*s)
  4294. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4295. }
  4296. // GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a
  4297. // custom_tag, used to know which column
  4298. // in the data corresponds to which column in the statistical model.
  4299. type GooglePrivacyDlpV2QuasiIdField struct {
  4300. CustomTag string `json:"customTag,omitempty"`
  4301. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  4302. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  4303. // unconditionally include in API requests. By default, fields with
  4304. // empty values are omitted from API requests. However, any non-pointer,
  4305. // non-interface field appearing in ForceSendFields will be sent to the
  4306. // server regardless of whether the field is empty or not. This may be
  4307. // used to include empty fields in Patch requests.
  4308. ForceSendFields []string `json:"-"`
  4309. // NullFields is a list of field names (e.g. "CustomTag") to include in
  4310. // API requests with the JSON null value. By default, fields with empty
  4311. // values are omitted from API requests. However, any field with an
  4312. // empty value appearing in NullFields will be sent to the server as
  4313. // null. It is an error if a field in this list has a non-empty value.
  4314. // This may be used to include null fields in Patch requests.
  4315. NullFields []string `json:"-"`
  4316. }
  4317. func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) {
  4318. type NoMethod GooglePrivacyDlpV2QuasiIdField
  4319. raw := NoMethod(*s)
  4320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4321. }
  4322. // GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has
  4323. // a custom_tag, used to know which column
  4324. // in the data corresponds to which column in the statistical model.
  4325. type GooglePrivacyDlpV2QuasiIdentifierField struct {
  4326. CustomTag string `json:"customTag,omitempty"`
  4327. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  4328. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  4329. // unconditionally include in API requests. By default, fields with
  4330. // empty values are omitted from API requests. However, any non-pointer,
  4331. // non-interface field appearing in ForceSendFields will be sent to the
  4332. // server regardless of whether the field is empty or not. This may be
  4333. // used to include empty fields in Patch requests.
  4334. ForceSendFields []string `json:"-"`
  4335. // NullFields is a list of field names (e.g. "CustomTag") to include in
  4336. // API requests with the JSON null value. By default, fields with empty
  4337. // values are omitted from API requests. However, any field with an
  4338. // empty value appearing in NullFields will be sent to the server as
  4339. // null. It is an error if a field in this list has a non-empty value.
  4340. // This may be used to include null fields in Patch requests.
  4341. NullFields []string `json:"-"`
  4342. }
  4343. func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) {
  4344. type NoMethod GooglePrivacyDlpV2QuasiIdentifierField
  4345. raw := NoMethod(*s)
  4346. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4347. }
  4348. // GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details
  4349. // parsed from quote.
  4350. type GooglePrivacyDlpV2QuoteInfo struct {
  4351. DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"`
  4352. // ForceSendFields is a list of field names (e.g. "DateTime") to
  4353. // unconditionally include in API requests. By default, fields with
  4354. // empty values are omitted from API requests. However, any non-pointer,
  4355. // non-interface field appearing in ForceSendFields will be sent to the
  4356. // server regardless of whether the field is empty or not. This may be
  4357. // used to include empty fields in Patch requests.
  4358. ForceSendFields []string `json:"-"`
  4359. // NullFields is a list of field names (e.g. "DateTime") to include in
  4360. // API requests with the JSON null value. By default, fields with empty
  4361. // values are omitted from API requests. However, any field with an
  4362. // empty value appearing in NullFields will be sent to the server as
  4363. // null. It is an error if a field in this list has a non-empty value.
  4364. // This may be used to include null fields in Patch requests.
  4365. NullFields []string `json:"-"`
  4366. }
  4367. func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) {
  4368. type NoMethod GooglePrivacyDlpV2QuoteInfo
  4369. raw := NoMethod(*s)
  4370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4371. }
  4372. // GooglePrivacyDlpV2Range: Generic half-open interval [start, end)
  4373. type GooglePrivacyDlpV2Range struct {
  4374. // End: Index of the last character of the range (exclusive).
  4375. End int64 `json:"end,omitempty,string"`
  4376. // Start: Index of the first character of the range (inclusive).
  4377. Start int64 `json:"start,omitempty,string"`
  4378. // ForceSendFields is a list of field names (e.g. "End") to
  4379. // unconditionally include in API requests. By default, fields with
  4380. // empty values are omitted from API requests. However, any non-pointer,
  4381. // non-interface field appearing in ForceSendFields will be sent to the
  4382. // server regardless of whether the field is empty or not. This may be
  4383. // used to include empty fields in Patch requests.
  4384. ForceSendFields []string `json:"-"`
  4385. // NullFields is a list of field names (e.g. "End") to include in API
  4386. // requests with the JSON null value. By default, fields with empty
  4387. // values are omitted from API requests. However, any field with an
  4388. // empty value appearing in NullFields will be sent to the server as
  4389. // null. It is an error if a field in this list has a non-empty value.
  4390. // This may be used to include null fields in Patch requests.
  4391. NullFields []string `json:"-"`
  4392. }
  4393. func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) {
  4394. type NoMethod GooglePrivacyDlpV2Range
  4395. raw := NoMethod(*s)
  4396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4397. }
  4398. // GooglePrivacyDlpV2RecordCondition: A condition for determining
  4399. // whether a transformation should be applied to
  4400. // a field.
  4401. type GooglePrivacyDlpV2RecordCondition struct {
  4402. // Expressions: An expression.
  4403. Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"`
  4404. // ForceSendFields is a list of field names (e.g. "Expressions") to
  4405. // unconditionally include in API requests. By default, fields with
  4406. // empty values are omitted from API requests. However, any non-pointer,
  4407. // non-interface field appearing in ForceSendFields will be sent to the
  4408. // server regardless of whether the field is empty or not. This may be
  4409. // used to include empty fields in Patch requests.
  4410. ForceSendFields []string `json:"-"`
  4411. // NullFields is a list of field names (e.g. "Expressions") to include
  4412. // in API requests with the JSON null value. By default, fields with
  4413. // empty values are omitted from API requests. However, any field with
  4414. // an empty value appearing in NullFields will be sent to the server as
  4415. // null. It is an error if a field in this list has a non-empty value.
  4416. // This may be used to include null fields in Patch requests.
  4417. NullFields []string `json:"-"`
  4418. }
  4419. func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) {
  4420. type NoMethod GooglePrivacyDlpV2RecordCondition
  4421. raw := NoMethod(*s)
  4422. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4423. }
  4424. // GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a
  4425. // record that contains a finding.
  4426. type GooglePrivacyDlpV2RecordKey struct {
  4427. BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"`
  4428. DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"`
  4429. // ForceSendFields is a list of field names (e.g. "BigQueryKey") to
  4430. // unconditionally include in API requests. By default, fields with
  4431. // empty values are omitted from API requests. However, any non-pointer,
  4432. // non-interface field appearing in ForceSendFields will be sent to the
  4433. // server regardless of whether the field is empty or not. This may be
  4434. // used to include empty fields in Patch requests.
  4435. ForceSendFields []string `json:"-"`
  4436. // NullFields is a list of field names (e.g. "BigQueryKey") to include
  4437. // in API requests with the JSON null value. By default, fields with
  4438. // empty values are omitted from API requests. However, any field with
  4439. // an empty value appearing in NullFields will be sent to the server as
  4440. // null. It is an error if a field in this list has a non-empty value.
  4441. // This may be used to include null fields in Patch requests.
  4442. NullFields []string `json:"-"`
  4443. }
  4444. func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) {
  4445. type NoMethod GooglePrivacyDlpV2RecordKey
  4446. raw := NoMethod(*s)
  4447. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4448. }
  4449. // GooglePrivacyDlpV2RecordLocation: Location of a finding within a row
  4450. // or record.
  4451. type GooglePrivacyDlpV2RecordLocation struct {
  4452. // FieldId: Field id of the field containing the finding.
  4453. FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"`
  4454. // RecordKey: Key of the finding.
  4455. RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"`
  4456. // TableLocation: Location within a `ContentItem.Table`.
  4457. TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"`
  4458. // ForceSendFields is a list of field names (e.g. "FieldId") to
  4459. // unconditionally include in API requests. By default, fields with
  4460. // empty values are omitted from API requests. However, any non-pointer,
  4461. // non-interface field appearing in ForceSendFields will be sent to the
  4462. // server regardless of whether the field is empty or not. This may be
  4463. // used to include empty fields in Patch requests.
  4464. ForceSendFields []string `json:"-"`
  4465. // NullFields is a list of field names (e.g. "FieldId") to include in
  4466. // API requests with the JSON null value. By default, fields with empty
  4467. // values are omitted from API requests. However, any field with an
  4468. // empty value appearing in NullFields will be sent to the server as
  4469. // null. It is an error if a field in this list has a non-empty value.
  4470. // This may be used to include null fields in Patch requests.
  4471. NullFields []string `json:"-"`
  4472. }
  4473. func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) {
  4474. type NoMethod GooglePrivacyDlpV2RecordLocation
  4475. raw := NoMethod(*s)
  4476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4477. }
  4478. // GooglePrivacyDlpV2RecordSuppression: Configuration to suppress
  4479. // records whose suppression conditions evaluate to
  4480. // true.
  4481. type GooglePrivacyDlpV2RecordSuppression struct {
  4482. // Condition: A condition that when it evaluates to true will result in
  4483. // the record being
  4484. // evaluated to be suppressed from the transformed content.
  4485. Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"`
  4486. // ForceSendFields is a list of field names (e.g. "Condition") to
  4487. // unconditionally include in API requests. By default, fields with
  4488. // empty values are omitted from API requests. However, any non-pointer,
  4489. // non-interface field appearing in ForceSendFields will be sent to the
  4490. // server regardless of whether the field is empty or not. This may be
  4491. // used to include empty fields in Patch requests.
  4492. ForceSendFields []string `json:"-"`
  4493. // NullFields is a list of field names (e.g. "Condition") to include in
  4494. // API requests with the JSON null value. By default, fields with empty
  4495. // values are omitted from API requests. However, any field with an
  4496. // empty value appearing in NullFields will be sent to the server as
  4497. // null. It is an error if a field in this list has a non-empty value.
  4498. // This may be used to include null fields in Patch requests.
  4499. NullFields []string `json:"-"`
  4500. }
  4501. func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) {
  4502. type NoMethod GooglePrivacyDlpV2RecordSuppression
  4503. raw := NoMethod(*s)
  4504. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4505. }
  4506. // GooglePrivacyDlpV2RecordTransformations: A type of transformation
  4507. // that is applied over structured data such as a
  4508. // table.
  4509. type GooglePrivacyDlpV2RecordTransformations struct {
  4510. // FieldTransformations: Transform the record by applying various field
  4511. // transformations.
  4512. FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"`
  4513. // RecordSuppressions: Configuration defining which records get
  4514. // suppressed entirely. Records that
  4515. // match any suppression rule are omitted from the output [optional].
  4516. RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"`
  4517. // ForceSendFields is a list of field names (e.g.
  4518. // "FieldTransformations") to unconditionally include in API requests.
  4519. // By default, fields with empty values are omitted from API requests.
  4520. // However, any non-pointer, non-interface field appearing in
  4521. // ForceSendFields will be sent to the server regardless of whether the
  4522. // field is empty or not. This may be used to include empty fields in
  4523. // Patch requests.
  4524. ForceSendFields []string `json:"-"`
  4525. // NullFields is a list of field names (e.g. "FieldTransformations") to
  4526. // include in API requests with the JSON null value. By default, fields
  4527. // with empty values are omitted from API requests. However, any field
  4528. // with an empty value appearing in NullFields will be sent to the
  4529. // server as null. It is an error if a field in this list has a
  4530. // non-empty value. This may be used to include null fields in Patch
  4531. // requests.
  4532. NullFields []string `json:"-"`
  4533. }
  4534. func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) {
  4535. type NoMethod GooglePrivacyDlpV2RecordTransformations
  4536. raw := NoMethod(*s)
  4537. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4538. }
  4539. // GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if
  4540. // used with an `InfoTypeTransformation`
  4541. // transforming PHONE_NUMBER, and input 'My phone number is
  4542. // 206-555-0123', the
  4543. // output would be 'My phone number is '.
  4544. type GooglePrivacyDlpV2RedactConfig struct {
  4545. }
  4546. // GooglePrivacyDlpV2RedactImageRequest: Request to search for
  4547. // potentially sensitive info in an image and redact it
  4548. // by covering it with a colored rectangle.
  4549. type GooglePrivacyDlpV2RedactImageRequest struct {
  4550. // ByteItem: The content must be PNG, JPEG, SVG or BMP.
  4551. ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"`
  4552. // ImageRedactionConfigs: The configuration for specifying what content
  4553. // to redact from images.
  4554. ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"`
  4555. // InspectConfig: Configuration for the inspector.
  4556. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  4557. // ForceSendFields is a list of field names (e.g. "ByteItem") to
  4558. // unconditionally include in API requests. By default, fields with
  4559. // empty values are omitted from API requests. However, any non-pointer,
  4560. // non-interface field appearing in ForceSendFields will be sent to the
  4561. // server regardless of whether the field is empty or not. This may be
  4562. // used to include empty fields in Patch requests.
  4563. ForceSendFields []string `json:"-"`
  4564. // NullFields is a list of field names (e.g. "ByteItem") to include in
  4565. // API requests with the JSON null value. By default, fields with empty
  4566. // values are omitted from API requests. However, any field with an
  4567. // empty value appearing in NullFields will be sent to the server as
  4568. // null. It is an error if a field in this list has a non-empty value.
  4569. // This may be used to include null fields in Patch requests.
  4570. NullFields []string `json:"-"`
  4571. }
  4572. func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) {
  4573. type NoMethod GooglePrivacyDlpV2RedactImageRequest
  4574. raw := NoMethod(*s)
  4575. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4576. }
  4577. // GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image.
  4578. type GooglePrivacyDlpV2RedactImageResponse struct {
  4579. // ExtractedText: If an image was being inspected and the
  4580. // InspectConfig's include_quote was
  4581. // set to true, then this field will include all text, if any, that was
  4582. // found
  4583. // in the image.
  4584. ExtractedText string `json:"extractedText,omitempty"`
  4585. // RedactedImage: The redacted image. The type will be the same as the
  4586. // original image.
  4587. RedactedImage string `json:"redactedImage,omitempty"`
  4588. // ServerResponse contains the HTTP response code and headers from the
  4589. // server.
  4590. googleapi.ServerResponse `json:"-"`
  4591. // ForceSendFields is a list of field names (e.g. "ExtractedText") to
  4592. // unconditionally include in API requests. By default, fields with
  4593. // empty values are omitted from API requests. However, any non-pointer,
  4594. // non-interface field appearing in ForceSendFields will be sent to the
  4595. // server regardless of whether the field is empty or not. This may be
  4596. // used to include empty fields in Patch requests.
  4597. ForceSendFields []string `json:"-"`
  4598. // NullFields is a list of field names (e.g. "ExtractedText") to include
  4599. // in API requests with the JSON null value. By default, fields with
  4600. // empty values are omitted from API requests. However, any field with
  4601. // an empty value appearing in NullFields will be sent to the server as
  4602. // null. It is an error if a field in this list has a non-empty value.
  4603. // This may be used to include null fields in Patch requests.
  4604. NullFields []string `json:"-"`
  4605. }
  4606. func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) {
  4607. type NoMethod GooglePrivacyDlpV2RedactImageResponse
  4608. raw := NoMethod(*s)
  4609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4610. }
  4611. // GooglePrivacyDlpV2Regex: Message defining a custom regular
  4612. // expression.
  4613. type GooglePrivacyDlpV2Regex struct {
  4614. // Pattern: Pattern defining the regular expression.
  4615. Pattern string `json:"pattern,omitempty"`
  4616. // ForceSendFields is a list of field names (e.g. "Pattern") to
  4617. // unconditionally include in API requests. By default, fields with
  4618. // empty values are omitted from API requests. However, any non-pointer,
  4619. // non-interface field appearing in ForceSendFields will be sent to the
  4620. // server regardless of whether the field is empty or not. This may be
  4621. // used to include empty fields in Patch requests.
  4622. ForceSendFields []string `json:"-"`
  4623. // NullFields is a list of field names (e.g. "Pattern") to include in
  4624. // API requests with the JSON null value. By default, fields with empty
  4625. // values are omitted from API requests. However, any field with an
  4626. // empty value appearing in NullFields will be sent to the server as
  4627. // null. It is an error if a field in this list has a non-empty value.
  4628. // This may be used to include null fields in Patch requests.
  4629. NullFields []string `json:"-"`
  4630. }
  4631. func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) {
  4632. type NoMethod GooglePrivacyDlpV2Regex
  4633. raw := NoMethod(*s)
  4634. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4635. }
  4636. // GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an
  4637. // item.
  4638. type GooglePrivacyDlpV2ReidentifyContentRequest struct {
  4639. // InspectConfig: Configuration for the inspector.
  4640. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
  4641. // InspectTemplateName: Optional template to use. Any configuration
  4642. // directly specified in
  4643. // `inspect_config` will override those set in the template. Singular
  4644. // fields
  4645. // that are set in this request will replace their corresponding fields
  4646. // in the
  4647. // template. Repeated fields are appended. Singular sub-messages and
  4648. // groups
  4649. // are recursively merged.
  4650. InspectTemplateName string `json:"inspectTemplateName,omitempty"`
  4651. // Item: The item to re-identify. Will be treated as text.
  4652. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
  4653. // ReidentifyConfig: Configuration for the re-identification of the
  4654. // content item.
  4655. // This field shares the same proto message type that is used
  4656. // for
  4657. // de-identification, however its usage here is for the reversal of
  4658. // the
  4659. // previous de-identification. Re-identification is performed by
  4660. // examining
  4661. // the transformations used to de-identify the items and executing
  4662. // the
  4663. // reverse. This requires that only reversible transformations
  4664. // be provided here. The reversible transformations are:
  4665. //
  4666. // - `CryptoReplaceFfxFpeConfig`
  4667. ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"`
  4668. // ReidentifyTemplateName: Optional template to use. References an
  4669. // instance of `DeidentifyTemplate`.
  4670. // Any configuration directly specified in `reidentify_config`
  4671. // or
  4672. // `inspect_config` will override those set in the template. Singular
  4673. // fields
  4674. // that are set in this request will replace their corresponding fields
  4675. // in the
  4676. // template. Repeated fields are appended. Singular sub-messages and
  4677. // groups
  4678. // are recursively merged.
  4679. ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"`
  4680. // ForceSendFields is a list of field names (e.g. "InspectConfig") to
  4681. // unconditionally include in API requests. By default, fields with
  4682. // empty values are omitted from API requests. However, any non-pointer,
  4683. // non-interface field appearing in ForceSendFields will be sent to the
  4684. // server regardless of whether the field is empty or not. This may be
  4685. // used to include empty fields in Patch requests.
  4686. ForceSendFields []string `json:"-"`
  4687. // NullFields is a list of field names (e.g. "InspectConfig") to include
  4688. // in API requests with the JSON null value. By default, fields with
  4689. // empty values are omitted from API requests. However, any field with
  4690. // an empty value appearing in NullFields will be sent to the server as
  4691. // null. It is an error if a field in this list has a non-empty value.
  4692. // This may be used to include null fields in Patch requests.
  4693. NullFields []string `json:"-"`
  4694. }
  4695. func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) {
  4696. type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest
  4697. raw := NoMethod(*s)
  4698. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4699. }
  4700. // GooglePrivacyDlpV2ReidentifyContentResponse: Results of
  4701. // re-identifying a item.
  4702. type GooglePrivacyDlpV2ReidentifyContentResponse struct {
  4703. // Item: The re-identified item.
  4704. Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
  4705. // Overview: An overview of the changes that were made to the `item`.
  4706. Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"`
  4707. // ServerResponse contains the HTTP response code and headers from the
  4708. // server.
  4709. googleapi.ServerResponse `json:"-"`
  4710. // ForceSendFields is a list of field names (e.g. "Item") to
  4711. // unconditionally include in API requests. By default, fields with
  4712. // empty values are omitted from API requests. However, any non-pointer,
  4713. // non-interface field appearing in ForceSendFields will be sent to the
  4714. // server regardless of whether the field is empty or not. This may be
  4715. // used to include empty fields in Patch requests.
  4716. ForceSendFields []string `json:"-"`
  4717. // NullFields is a list of field names (e.g. "Item") to include in API
  4718. // requests with the JSON null value. By default, fields with empty
  4719. // values are omitted from API requests. However, any field with an
  4720. // empty value appearing in NullFields will be sent to the server as
  4721. // null. It is an error if a field in this list has a non-empty value.
  4722. // This may be used to include null fields in Patch requests.
  4723. NullFields []string `json:"-"`
  4724. }
  4725. func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) {
  4726. type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse
  4727. raw := NoMethod(*s)
  4728. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4729. }
  4730. // GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a
  4731. // given `Value`.
  4732. type GooglePrivacyDlpV2ReplaceValueConfig struct {
  4733. // NewValue: Value to replace it with.
  4734. NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"`
  4735. // ForceSendFields is a list of field names (e.g. "NewValue") to
  4736. // unconditionally include in API requests. By default, fields with
  4737. // empty values are omitted from API requests. However, any non-pointer,
  4738. // non-interface field appearing in ForceSendFields will be sent to the
  4739. // server regardless of whether the field is empty or not. This may be
  4740. // used to include empty fields in Patch requests.
  4741. ForceSendFields []string `json:"-"`
  4742. // NullFields is a list of field names (e.g. "NewValue") to include in
  4743. // API requests with the JSON null value. By default, fields with empty
  4744. // values are omitted from API requests. However, any field with an
  4745. // empty value appearing in NullFields will be sent to the server as
  4746. // null. It is an error if a field in this list has a non-empty value.
  4747. // This may be used to include null fields in Patch requests.
  4748. NullFields []string `json:"-"`
  4749. }
  4750. func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) {
  4751. type NoMethod GooglePrivacyDlpV2ReplaceValueConfig
  4752. raw := NoMethod(*s)
  4753. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4754. }
  4755. // GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching
  4756. // finding with the name of the info_type.
  4757. type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct {
  4758. }
  4759. type GooglePrivacyDlpV2RequestedOptions struct {
  4760. JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"`
  4761. // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot
  4762. // of its state at the time of
  4763. // this run.
  4764. SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"`
  4765. // ForceSendFields is a list of field names (e.g. "JobConfig") to
  4766. // unconditionally include in API requests. By default, fields with
  4767. // empty values are omitted from API requests. However, any non-pointer,
  4768. // non-interface field appearing in ForceSendFields will be sent to the
  4769. // server regardless of whether the field is empty or not. This may be
  4770. // used to include empty fields in Patch requests.
  4771. ForceSendFields []string `json:"-"`
  4772. // NullFields is a list of field names (e.g. "JobConfig") to include in
  4773. // API requests with the JSON null value. By default, fields with empty
  4774. // values are omitted from API requests. However, any field with an
  4775. // empty value appearing in NullFields will be sent to the server as
  4776. // null. It is an error if a field in this list has a non-empty value.
  4777. // This may be used to include null fields in Patch requests.
  4778. NullFields []string `json:"-"`
  4779. }
  4780. func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) {
  4781. type NoMethod GooglePrivacyDlpV2RequestedOptions
  4782. raw := NoMethod(*s)
  4783. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4784. }
  4785. type GooglePrivacyDlpV2Result struct {
  4786. // InfoTypeStats: Statistics of how many instances of each info type
  4787. // were found during
  4788. // inspect job.
  4789. InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"`
  4790. // ProcessedBytes: Total size in bytes that were processed.
  4791. ProcessedBytes int64 `json:"processedBytes,omitempty,string"`
  4792. // TotalEstimatedBytes: Estimate of the number of bytes to process.
  4793. TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"`
  4794. // ForceSendFields is a list of field names (e.g. "InfoTypeStats") to
  4795. // unconditionally include in API requests. By default, fields with
  4796. // empty values are omitted from API requests. However, any non-pointer,
  4797. // non-interface field appearing in ForceSendFields will be sent to the
  4798. // server regardless of whether the field is empty or not. This may be
  4799. // used to include empty fields in Patch requests.
  4800. ForceSendFields []string `json:"-"`
  4801. // NullFields is a list of field names (e.g. "InfoTypeStats") to include
  4802. // in API requests with the JSON null value. By default, fields with
  4803. // empty values are omitted from API requests. However, any field with
  4804. // an empty value appearing in NullFields will be sent to the server as
  4805. // null. It is an error if a field in this list has a non-empty value.
  4806. // This may be used to include null fields in Patch requests.
  4807. NullFields []string `json:"-"`
  4808. }
  4809. func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) {
  4810. type NoMethod GooglePrivacyDlpV2Result
  4811. raw := NoMethod(*s)
  4812. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4813. }
  4814. // GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk
  4815. // analysis job.
  4816. // See
  4817. // https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn
  4818. // more.
  4819. type GooglePrivacyDlpV2RiskAnalysisJobConfig struct {
  4820. // Actions: Actions to execute at the completion of the job. Are
  4821. // executed in the order
  4822. // provided.
  4823. Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"`
  4824. // PrivacyMetric: Privacy metric to compute.
  4825. PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"`
  4826. // SourceTable: Input dataset to compute metrics over.
  4827. SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"`
  4828. // ForceSendFields is a list of field names (e.g. "Actions") to
  4829. // unconditionally include in API requests. By default, fields with
  4830. // empty values are omitted from API requests. However, any non-pointer,
  4831. // non-interface field appearing in ForceSendFields will be sent to the
  4832. // server regardless of whether the field is empty or not. This may be
  4833. // used to include empty fields in Patch requests.
  4834. ForceSendFields []string `json:"-"`
  4835. // NullFields is a list of field names (e.g. "Actions") to include in
  4836. // API requests with the JSON null value. By default, fields with empty
  4837. // values are omitted from API requests. However, any field with an
  4838. // empty value appearing in NullFields will be sent to the server as
  4839. // null. It is an error if a field in this list has a non-empty value.
  4840. // This may be used to include null fields in Patch requests.
  4841. NullFields []string `json:"-"`
  4842. }
  4843. func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) {
  4844. type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig
  4845. raw := NoMethod(*s)
  4846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4847. }
  4848. type GooglePrivacyDlpV2Row struct {
  4849. Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"`
  4850. // ForceSendFields is a list of field names (e.g. "Values") to
  4851. // unconditionally include in API requests. By default, fields with
  4852. // empty values are omitted from API requests. However, any non-pointer,
  4853. // non-interface field appearing in ForceSendFields will be sent to the
  4854. // server regardless of whether the field is empty or not. This may be
  4855. // used to include empty fields in Patch requests.
  4856. ForceSendFields []string `json:"-"`
  4857. // NullFields is a list of field names (e.g. "Values") to include in API
  4858. // requests with the JSON null value. By default, fields with empty
  4859. // values are omitted from API requests. However, any field with an
  4860. // empty value appearing in NullFields will be sent to the server as
  4861. // null. It is an error if a field in this list has a non-empty value.
  4862. // This may be used to include null fields in Patch requests.
  4863. NullFields []string `json:"-"`
  4864. }
  4865. func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) {
  4866. type NoMethod GooglePrivacyDlpV2Row
  4867. raw := NoMethod(*s)
  4868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4869. }
  4870. // GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be
  4871. // persisted to the specified
  4872. // OutputStorageConfig. Only a single instance of this action can
  4873. // be
  4874. // specified.
  4875. // Compatible with: Inspect, Risk
  4876. type GooglePrivacyDlpV2SaveFindings struct {
  4877. OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"`
  4878. // ForceSendFields is a list of field names (e.g. "OutputConfig") to
  4879. // unconditionally include in API requests. By default, fields with
  4880. // empty values are omitted from API requests. However, any non-pointer,
  4881. // non-interface field appearing in ForceSendFields will be sent to the
  4882. // server regardless of whether the field is empty or not. This may be
  4883. // used to include empty fields in Patch requests.
  4884. ForceSendFields []string `json:"-"`
  4885. // NullFields is a list of field names (e.g. "OutputConfig") to include
  4886. // in API requests with the JSON null value. By default, fields with
  4887. // empty values are omitted from API requests. However, any field with
  4888. // an empty value appearing in NullFields will be sent to the server as
  4889. // null. It is an error if a field in this list has a non-empty value.
  4890. // This may be used to include null fields in Patch requests.
  4891. NullFields []string `json:"-"`
  4892. }
  4893. func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) {
  4894. type NoMethod GooglePrivacyDlpV2SaveFindings
  4895. raw := NoMethod(*s)
  4896. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4897. }
  4898. // GooglePrivacyDlpV2Schedule: Schedule for triggeredJobs.
  4899. type GooglePrivacyDlpV2Schedule struct {
  4900. // RecurrencePeriodDuration: With this option a job is started a regular
  4901. // periodic basis. For
  4902. // example: every day (86400 seconds).
  4903. //
  4904. // A scheduled start time will be skipped if the previous
  4905. // execution has not ended when its scheduled time occurs.
  4906. //
  4907. // This value must be set to a time duration greater than or equal
  4908. // to 1 day and can be no longer than 60 days.
  4909. RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"`
  4910. // ForceSendFields is a list of field names (e.g.
  4911. // "RecurrencePeriodDuration") to unconditionally include in API
  4912. // requests. By default, fields with empty values are omitted from API
  4913. // requests. However, any non-pointer, non-interface field appearing in
  4914. // ForceSendFields will be sent to the server regardless of whether the
  4915. // field is empty or not. This may be used to include empty fields in
  4916. // Patch requests.
  4917. ForceSendFields []string `json:"-"`
  4918. // NullFields is a list of field names (e.g. "RecurrencePeriodDuration")
  4919. // to include in API requests with the JSON null value. By default,
  4920. // fields with empty values are omitted from API requests. However, any
  4921. // field with an empty value appearing in NullFields will be sent to the
  4922. // server as null. It is an error if a field in this list has a
  4923. // non-empty value. This may be used to include null fields in Patch
  4924. // requests.
  4925. NullFields []string `json:"-"`
  4926. }
  4927. func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) {
  4928. type NoMethod GooglePrivacyDlpV2Schedule
  4929. raw := NoMethod(*s)
  4930. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4931. }
  4932. // GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing
  4933. // statistical information on the relative
  4934. // frequency of different quasi-identifiers values. It has one or
  4935. // several
  4936. // quasi-identifiers columns, and one column that indicates the
  4937. // relative
  4938. // frequency of each quasi-identifier tuple.
  4939. // If a tuple is present in the data but not in the auxiliary table,
  4940. // the
  4941. // corresponding relative frequency is assumed to be zero (and thus,
  4942. // the
  4943. // tuple is highly reidentifiable).
  4944. type GooglePrivacyDlpV2StatisticalTable struct {
  4945. // QuasiIds: Quasi-identifier columns. [required]
  4946. QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"`
  4947. // RelativeFrequency: The relative frequency column must contain a
  4948. // floating-point number
  4949. // between 0 and 1 (inclusive). Null values are assumed to be
  4950. // zero.
  4951. // [required]
  4952. RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"`
  4953. // Table: Auxiliary table location. [required]
  4954. Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"`
  4955. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  4956. // unconditionally include in API requests. By default, fields with
  4957. // empty values are omitted from API requests. However, any non-pointer,
  4958. // non-interface field appearing in ForceSendFields will be sent to the
  4959. // server regardless of whether the field is empty or not. This may be
  4960. // used to include empty fields in Patch requests.
  4961. ForceSendFields []string `json:"-"`
  4962. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  4963. // API requests with the JSON null value. By default, fields with empty
  4964. // values are omitted from API requests. However, any field with an
  4965. // empty value appearing in NullFields will be sent to the server as
  4966. // null. It is an error if a field in this list has a non-empty value.
  4967. // This may be used to include null fields in Patch requests.
  4968. NullFields []string `json:"-"`
  4969. }
  4970. func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) {
  4971. type NoMethod GooglePrivacyDlpV2StatisticalTable
  4972. raw := NoMethod(*s)
  4973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4974. }
  4975. // GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud
  4976. // storage type.
  4977. type GooglePrivacyDlpV2StorageConfig struct {
  4978. // BigQueryOptions: BigQuery options specification.
  4979. BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"`
  4980. // CloudStorageOptions: Google Cloud Storage options specification.
  4981. CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"`
  4982. // DatastoreOptions: Google Cloud Datastore options specification.
  4983. DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"`
  4984. TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"`
  4985. // ForceSendFields is a list of field names (e.g. "BigQueryOptions") 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. "BigQueryOptions") 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 *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) {
  5002. type NoMethod GooglePrivacyDlpV2StorageConfig
  5003. raw := NoMethod(*s)
  5004. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5005. }
  5006. // GooglePrivacyDlpV2SummaryResult: A collection that informs the user
  5007. // the number of times a particular
  5008. // `TransformationResultCode` and error details occurred.
  5009. type GooglePrivacyDlpV2SummaryResult struct {
  5010. // Possible values:
  5011. // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"
  5012. // "SUCCESS"
  5013. // "ERROR"
  5014. Code string `json:"code,omitempty"`
  5015. Count int64 `json:"count,omitempty,string"`
  5016. // Details: A place for warnings or errors to show up if a
  5017. // transformation didn't
  5018. // work as expected.
  5019. Details string `json:"details,omitempty"`
  5020. // ForceSendFields is a list of field names (e.g. "Code") to
  5021. // 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. "Code") to include in API
  5028. // requests with the JSON null value. By default, fields with empty
  5029. // values are omitted from API requests. However, any field with an
  5030. // empty value appearing in NullFields will be sent to the server as
  5031. // null. It is an error if a field in this list has a non-empty value.
  5032. // This may be used to include null fields in Patch requests.
  5033. NullFields []string `json:"-"`
  5034. }
  5035. func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) {
  5036. type NoMethod GooglePrivacyDlpV2SummaryResult
  5037. raw := NoMethod(*s)
  5038. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5039. }
  5040. // GooglePrivacyDlpV2SurrogateType: Message for detecting output from
  5041. // deidentification transformations
  5042. // such
  5043. // as
  5044. // [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizat
  5045. // ions.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  5046. // These types of transformations are
  5047. // those that perform pseudonymization, thereby producing a "surrogate"
  5048. // as
  5049. // output. This should be used in conjunction with a field on
  5050. // the
  5051. // transformation such as `surrogate_info_type`. This CustomInfoType
  5052. // does
  5053. // not support the use of `detection_rules`.
  5054. type GooglePrivacyDlpV2SurrogateType struct {
  5055. }
  5056. // GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000
  5057. // `Value`s per request allowed.
  5058. // See
  5059. // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table
  5060. // to
  5061. // learn more.
  5062. type GooglePrivacyDlpV2Table struct {
  5063. Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"`
  5064. Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"`
  5065. // ForceSendFields is a list of field names (e.g. "Headers") to
  5066. // unconditionally include in API requests. By default, fields with
  5067. // empty values are omitted from API requests. However, any non-pointer,
  5068. // non-interface field appearing in ForceSendFields will be sent to the
  5069. // server regardless of whether the field is empty or not. This may be
  5070. // used to include empty fields in Patch requests.
  5071. ForceSendFields []string `json:"-"`
  5072. // NullFields is a list of field names (e.g. "Headers") to include in
  5073. // API requests with the JSON null value. By default, fields with empty
  5074. // values are omitted from API requests. However, any field with an
  5075. // empty value appearing in NullFields will be sent to the server as
  5076. // null. It is an error if a field in this list has a non-empty value.
  5077. // This may be used to include null fields in Patch requests.
  5078. NullFields []string `json:"-"`
  5079. }
  5080. func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) {
  5081. type NoMethod GooglePrivacyDlpV2Table
  5082. raw := NoMethod(*s)
  5083. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5084. }
  5085. // GooglePrivacyDlpV2TableLocation: Location of a finding within a
  5086. // table.
  5087. type GooglePrivacyDlpV2TableLocation struct {
  5088. // RowIndex: The zero-based index of the row where the finding is
  5089. // located.
  5090. RowIndex int64 `json:"rowIndex,omitempty,string"`
  5091. // ForceSendFields is a list of field names (e.g. "RowIndex") to
  5092. // unconditionally include in API requests. By default, fields with
  5093. // empty values are omitted from API requests. However, any non-pointer,
  5094. // non-interface field appearing in ForceSendFields will be sent to the
  5095. // server regardless of whether the field is empty or not. This may be
  5096. // used to include empty fields in Patch requests.
  5097. ForceSendFields []string `json:"-"`
  5098. // NullFields is a list of field names (e.g. "RowIndex") to include in
  5099. // API requests with the JSON null value. By default, fields with empty
  5100. // values are omitted from API requests. However, any field with an
  5101. // empty value appearing in NullFields will be sent to the server as
  5102. // null. It is an error if a field in this list has a non-empty value.
  5103. // This may be used to include null fields in Patch requests.
  5104. NullFields []string `json:"-"`
  5105. }
  5106. func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) {
  5107. type NoMethod GooglePrivacyDlpV2TableLocation
  5108. raw := NoMethod(*s)
  5109. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5110. }
  5111. type GooglePrivacyDlpV2TaggedField struct {
  5112. // CustomTag: A column can be tagged with a custom tag. In this case,
  5113. // the user must
  5114. // indicate an auxiliary table that contains statistical information
  5115. // on
  5116. // the possible values of this column (below).
  5117. CustomTag string `json:"customTag,omitempty"`
  5118. // Field: Identifies the column. [required]
  5119. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  5120. // Inferred: If no semantic tag is indicated, we infer the statistical
  5121. // model from
  5122. // the distribution of values in the input data
  5123. Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"`
  5124. // InfoType: A column can be tagged with a InfoType to use the relevant
  5125. // public
  5126. // dataset as a statistical model of population, if available.
  5127. // We
  5128. // currently support US ZIP codes, region codes, ages and genders.
  5129. // To programmatically obtain the list of supported InfoTypes,
  5130. // use
  5131. // ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
  5132. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  5133. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  5134. // unconditionally include in API requests. By default, fields with
  5135. // empty values are omitted from API requests. However, any non-pointer,
  5136. // non-interface field appearing in ForceSendFields will be sent to the
  5137. // server regardless of whether the field is empty or not. This may be
  5138. // used to include empty fields in Patch requests.
  5139. ForceSendFields []string `json:"-"`
  5140. // NullFields is a list of field names (e.g. "CustomTag") to include in
  5141. // API requests with the JSON null value. By default, fields with empty
  5142. // values are omitted from API requests. However, any field with an
  5143. // empty value appearing in NullFields will be sent to the server as
  5144. // null. It is an error if a field in this list has a non-empty value.
  5145. // This may be used to include null fields in Patch requests.
  5146. NullFields []string `json:"-"`
  5147. }
  5148. func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) {
  5149. type NoMethod GooglePrivacyDlpV2TaggedField
  5150. raw := NoMethod(*s)
  5151. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5152. }
  5153. // GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`,
  5154. // and `TimeOfDay`, extract or preserve a
  5155. // portion of the value.
  5156. type GooglePrivacyDlpV2TimePartConfig struct {
  5157. // Possible values:
  5158. // "TIME_PART_UNSPECIFIED"
  5159. // "YEAR" - [0-9999]
  5160. // "MONTH" - [1-12]
  5161. // "DAY_OF_MONTH" - [1-31]
  5162. // "DAY_OF_WEEK" - [1-7]
  5163. // "WEEK_OF_YEAR" - [1-52]
  5164. // "HOUR_OF_DAY" - [0-23]
  5165. PartToExtract string `json:"partToExtract,omitempty"`
  5166. // ForceSendFields is a list of field names (e.g. "PartToExtract") to
  5167. // unconditionally include in API requests. By default, fields with
  5168. // empty values are omitted from API requests. However, any non-pointer,
  5169. // non-interface field appearing in ForceSendFields will be sent to the
  5170. // server regardless of whether the field is empty or not. This may be
  5171. // used to include empty fields in Patch requests.
  5172. ForceSendFields []string `json:"-"`
  5173. // NullFields is a list of field names (e.g. "PartToExtract") to include
  5174. // in API requests with the JSON null value. By default, fields with
  5175. // empty values are omitted from API requests. However, any field with
  5176. // an empty value appearing in NullFields will be sent to the server as
  5177. // null. It is an error if a field in this list has a non-empty value.
  5178. // This may be used to include null fields in Patch requests.
  5179. NullFields []string `json:"-"`
  5180. }
  5181. func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) {
  5182. type NoMethod GooglePrivacyDlpV2TimePartConfig
  5183. raw := NoMethod(*s)
  5184. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5185. }
  5186. type GooglePrivacyDlpV2TimeZone struct {
  5187. // OffsetMinutes: Set only if the offset can be determined. Positive for
  5188. // time ahead of UTC.
  5189. // E.g. For "UTC-9", this value is -540.
  5190. OffsetMinutes int64 `json:"offsetMinutes,omitempty"`
  5191. // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to
  5192. // unconditionally include in API requests. By default, fields with
  5193. // empty values are omitted from API requests. However, any non-pointer,
  5194. // non-interface field appearing in ForceSendFields will be sent to the
  5195. // server regardless of whether the field is empty or not. This may be
  5196. // used to include empty fields in Patch requests.
  5197. ForceSendFields []string `json:"-"`
  5198. // NullFields is a list of field names (e.g. "OffsetMinutes") to include
  5199. // in API requests with the JSON null value. By default, fields with
  5200. // empty values are omitted from API requests. However, any field with
  5201. // an empty value appearing in NullFields will be sent to the server as
  5202. // null. It is an error if a field in this list has a non-empty value.
  5203. // This may be used to include null fields in Patch requests.
  5204. NullFields []string `json:"-"`
  5205. }
  5206. func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) {
  5207. type NoMethod GooglePrivacyDlpV2TimeZone
  5208. raw := NoMethod(*s)
  5209. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5210. }
  5211. // GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of
  5212. // the items to include in scanning.
  5213. // Currently only supported when inspecting Google Cloud Storage and
  5214. // BigQuery.
  5215. type GooglePrivacyDlpV2TimespanConfig struct {
  5216. // EnableAutoPopulationOfTimespanConfig: When the job is started by a
  5217. // JobTrigger we will automatically figure out
  5218. // a valid start_time to avoid scanning files that have not been
  5219. // modified
  5220. // since the last time the JobTrigger executed. This will be based on
  5221. // the
  5222. // time of the execution of the last run of the JobTrigger.
  5223. EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"`
  5224. // EndTime: Exclude files newer than this value.
  5225. // If set to zero, no upper time limit is applied.
  5226. EndTime string `json:"endTime,omitempty"`
  5227. // StartTime: Exclude files older than this value.
  5228. StartTime string `json:"startTime,omitempty"`
  5229. // TimestampField: Specification of the field containing the timestamp
  5230. // of scanned items.
  5231. // Required for data sources like Datastore or BigQuery.
  5232. // The valid data types of the timestamp field are:
  5233. // for BigQuery - timestamp, date, datetime;
  5234. // for Datastore - timestamp.
  5235. // Datastore entity will be scanned if the timestamp property does not
  5236. // exist
  5237. // or its value is empty or invalid.
  5238. TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"`
  5239. // ForceSendFields is a list of field names (e.g.
  5240. // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in
  5241. // API requests. By default, fields with empty values are omitted from
  5242. // API requests. However, any non-pointer, non-interface field appearing
  5243. // in ForceSendFields will be sent to the server regardless of whether
  5244. // the field is empty or not. This may be used to include empty fields
  5245. // in Patch requests.
  5246. ForceSendFields []string `json:"-"`
  5247. // NullFields is a list of field names (e.g.
  5248. // "EnableAutoPopulationOfTimespanConfig") to include in API requests
  5249. // with the JSON null value. By default, fields with empty values are
  5250. // omitted from API requests. However, any field with an empty value
  5251. // appearing in NullFields will be sent to the server as null. It is an
  5252. // error if a field in this list has a non-empty value. This may be used
  5253. // to include null fields in Patch requests.
  5254. NullFields []string `json:"-"`
  5255. }
  5256. func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) {
  5257. type NoMethod GooglePrivacyDlpV2TimespanConfig
  5258. raw := NoMethod(*s)
  5259. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5260. }
  5261. // GooglePrivacyDlpV2TransformationOverview: Overview of the
  5262. // modifications that occurred.
  5263. type GooglePrivacyDlpV2TransformationOverview struct {
  5264. // TransformationSummaries: Transformations applied to the dataset.
  5265. TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"`
  5266. // TransformedBytes: Total size in bytes that were transformed in some
  5267. // way.
  5268. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  5269. // ForceSendFields is a list of field names (e.g.
  5270. // "TransformationSummaries") to unconditionally include in API
  5271. // requests. By default, fields with empty values are omitted from API
  5272. // requests. However, any non-pointer, non-interface field appearing in
  5273. // ForceSendFields will be sent to the server regardless of whether the
  5274. // field is empty or not. This may be used to include empty fields in
  5275. // Patch requests.
  5276. ForceSendFields []string `json:"-"`
  5277. // NullFields is a list of field names (e.g. "TransformationSummaries")
  5278. // to include in API requests with the JSON null value. By default,
  5279. // fields with empty values are omitted from API requests. However, any
  5280. // field with an empty value appearing in NullFields will be sent to the
  5281. // server as null. It is an error if a field in this list has a
  5282. // non-empty value. This may be used to include null fields in Patch
  5283. // requests.
  5284. NullFields []string `json:"-"`
  5285. }
  5286. func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) {
  5287. type NoMethod GooglePrivacyDlpV2TransformationOverview
  5288. raw := NoMethod(*s)
  5289. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5290. }
  5291. // GooglePrivacyDlpV2TransformationSummary: Summary of a single
  5292. // tranformation.
  5293. // Only one of 'transformation', 'field_transformation', or
  5294. // 'record_suppress'
  5295. // will be set.
  5296. type GooglePrivacyDlpV2TransformationSummary struct {
  5297. // Field: Set if the transformation was limited to a specific FieldId.
  5298. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
  5299. // FieldTransformations: The field transformation that was applied.
  5300. // If multiple field transformations are requested for a single
  5301. // field,
  5302. // this list will contain all of them; otherwise, only one is supplied.
  5303. FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"`
  5304. // InfoType: Set if the transformation was limited to a specific
  5305. // info_type.
  5306. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
  5307. // RecordSuppress: The specific suppression option these stats apply to.
  5308. RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"`
  5309. Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"`
  5310. // Transformation: The specific transformation these stats apply to.
  5311. Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"`
  5312. // TransformedBytes: Total size in bytes that were transformed in some
  5313. // way.
  5314. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  5315. // ForceSendFields is a list of field names (e.g. "Field") to
  5316. // unconditionally include in API requests. By default, fields with
  5317. // empty values are omitted from API requests. However, any non-pointer,
  5318. // non-interface field appearing in ForceSendFields will be sent to the
  5319. // server regardless of whether the field is empty or not. This may be
  5320. // used to include empty fields in Patch requests.
  5321. ForceSendFields []string `json:"-"`
  5322. // NullFields is a list of field names (e.g. "Field") to include in API
  5323. // requests with the JSON null value. By default, fields with empty
  5324. // values are omitted from API requests. However, any field with an
  5325. // empty value appearing in NullFields will be sent to the server as
  5326. // null. It is an error if a field in this list has a non-empty value.
  5327. // This may be used to include null fields in Patch requests.
  5328. NullFields []string `json:"-"`
  5329. }
  5330. func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) {
  5331. type NoMethod GooglePrivacyDlpV2TransformationSummary
  5332. raw := NoMethod(*s)
  5333. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5334. }
  5335. // GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data
  5336. // crypto key generated.
  5337. // It will be discarded after the request finishes.
  5338. type GooglePrivacyDlpV2TransientCryptoKey struct {
  5339. // Name: Name of the key. [required]
  5340. // This is an arbitrary string used to differentiate different keys.
  5341. // A unique key is generated per name: two separate
  5342. // `TransientCryptoKey`
  5343. // protos share the same generated key if their names are the same.
  5344. // When the data crypto key is generated, this name is not used in any
  5345. // way
  5346. // (repeating the api call will result in a different key being
  5347. // generated).
  5348. Name string `json:"name,omitempty"`
  5349. // ForceSendFields is a list of field names (e.g. "Name") to
  5350. // unconditionally include in API requests. By default, fields with
  5351. // empty values are omitted from API requests. However, any non-pointer,
  5352. // non-interface field appearing in ForceSendFields will be sent to the
  5353. // server regardless of whether the field is empty or not. This may be
  5354. // used to include empty fields in Patch requests.
  5355. ForceSendFields []string `json:"-"`
  5356. // NullFields is a list of field names (e.g. "Name") to include in API
  5357. // requests with the JSON null value. By default, fields with empty
  5358. // values are omitted from API requests. However, any field with an
  5359. // empty value appearing in NullFields will be sent to the server as
  5360. // null. It is an error if a field in this list has a non-empty value.
  5361. // This may be used to include null fields in Patch requests.
  5362. NullFields []string `json:"-"`
  5363. }
  5364. func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) {
  5365. type NoMethod GooglePrivacyDlpV2TransientCryptoKey
  5366. raw := NoMethod(*s)
  5367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5368. }
  5369. // GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to
  5370. // be started.
  5371. type GooglePrivacyDlpV2Trigger struct {
  5372. // Schedule: Create a job on a repeating basis based on the elapse of
  5373. // time.
  5374. Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"`
  5375. // ForceSendFields is a list of field names (e.g. "Schedule") to
  5376. // unconditionally include in API requests. By default, fields with
  5377. // empty values are omitted from API requests. However, any non-pointer,
  5378. // non-interface field appearing in ForceSendFields will be sent to the
  5379. // server regardless of whether the field is empty or not. This may be
  5380. // used to include empty fields in Patch requests.
  5381. ForceSendFields []string `json:"-"`
  5382. // NullFields is a list of field names (e.g. "Schedule") to include in
  5383. // API requests with the JSON null value. By default, fields with empty
  5384. // values are omitted from API requests. However, any field with an
  5385. // empty value appearing in NullFields will be sent to the server as
  5386. // null. It is an error if a field in this list has a non-empty value.
  5387. // This may be used to include null fields in Patch requests.
  5388. NullFields []string `json:"-"`
  5389. }
  5390. func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) {
  5391. type NoMethod GooglePrivacyDlpV2Trigger
  5392. raw := NoMethod(*s)
  5393. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5394. }
  5395. // GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to
  5396. // security risks due to accidentally
  5397. // leaking the key. Choose another type of key if possible.
  5398. type GooglePrivacyDlpV2UnwrappedCryptoKey struct {
  5399. // Key: The AES 128/192/256 bit key. [required]
  5400. Key string `json:"key,omitempty"`
  5401. // ForceSendFields is a list of field names (e.g. "Key") to
  5402. // unconditionally include in API requests. By default, fields with
  5403. // empty values are omitted from API requests. However, any non-pointer,
  5404. // non-interface field appearing in ForceSendFields will be sent to the
  5405. // server regardless of whether the field is empty or not. This may be
  5406. // used to include empty fields in Patch requests.
  5407. ForceSendFields []string `json:"-"`
  5408. // NullFields is a list of field names (e.g. "Key") to include in API
  5409. // requests with the JSON null value. By default, fields with empty
  5410. // values are omitted from API requests. However, any field with an
  5411. // empty value appearing in NullFields will be sent to the server as
  5412. // null. It is an error if a field in this list has a non-empty value.
  5413. // This may be used to include null fields in Patch requests.
  5414. NullFields []string `json:"-"`
  5415. }
  5416. func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) {
  5417. type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey
  5418. raw := NoMethod(*s)
  5419. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5420. }
  5421. // GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message
  5422. // for UpdateDeidentifyTemplate.
  5423. type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct {
  5424. // DeidentifyTemplate: New DeidentifyTemplate value.
  5425. DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
  5426. // UpdateMask: Mask to control which fields get updated.
  5427. UpdateMask string `json:"updateMask,omitempty"`
  5428. // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate")
  5429. // to 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. "DeidentifyTemplate") 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 *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) {
  5445. type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest
  5446. raw := NoMethod(*s)
  5447. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5448. }
  5449. // GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for
  5450. // UpdateInspectTemplate.
  5451. type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct {
  5452. // InspectTemplate: New InspectTemplate value.
  5453. InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"`
  5454. // UpdateMask: Mask to control which fields get updated.
  5455. UpdateMask string `json:"updateMask,omitempty"`
  5456. // ForceSendFields is a list of field names (e.g. "InspectTemplate") to
  5457. // unconditionally include in API requests. By default, fields with
  5458. // empty values are omitted from API requests. However, any non-pointer,
  5459. // non-interface field appearing in ForceSendFields will be sent to the
  5460. // server regardless of whether the field is empty or not. This may be
  5461. // used to include empty fields in Patch requests.
  5462. ForceSendFields []string `json:"-"`
  5463. // NullFields is a list of field names (e.g. "InspectTemplate") to
  5464. // include in API requests with the JSON null value. By default, fields
  5465. // with empty values are omitted from API requests. However, any field
  5466. // with an empty value appearing in NullFields will be sent to the
  5467. // server as null. It is an error if a field in this list has a
  5468. // non-empty value. This may be used to include null fields in Patch
  5469. // requests.
  5470. NullFields []string `json:"-"`
  5471. }
  5472. func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) {
  5473. type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest
  5474. raw := NoMethod(*s)
  5475. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5476. }
  5477. // GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for
  5478. // UpdateJobTrigger.
  5479. type GooglePrivacyDlpV2UpdateJobTriggerRequest struct {
  5480. // JobTrigger: New JobTrigger value.
  5481. JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"`
  5482. // UpdateMask: Mask to control which fields get updated.
  5483. UpdateMask string `json:"updateMask,omitempty"`
  5484. // ForceSendFields is a list of field names (e.g. "JobTrigger") to
  5485. // unconditionally include in API requests. By default, fields with
  5486. // empty values are omitted from API requests. However, any non-pointer,
  5487. // non-interface field appearing in ForceSendFields will be sent to the
  5488. // server regardless of whether the field is empty or not. This may be
  5489. // used to include empty fields in Patch requests.
  5490. ForceSendFields []string `json:"-"`
  5491. // NullFields is a list of field names (e.g. "JobTrigger") to include in
  5492. // API requests with the JSON null value. By default, fields with empty
  5493. // values are omitted from API requests. However, any field with an
  5494. // empty value appearing in NullFields will be sent to the server as
  5495. // null. It is an error if a field in this list has a non-empty value.
  5496. // This may be used to include null fields in Patch requests.
  5497. NullFields []string `json:"-"`
  5498. }
  5499. func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) {
  5500. type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest
  5501. raw := NoMethod(*s)
  5502. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5503. }
  5504. // GooglePrivacyDlpV2Value: Set of primitive values supported by the
  5505. // system.
  5506. // Note that for the purposes of inspection or transformation, the
  5507. // number
  5508. // of bytes considered to comprise a 'Value' is based on its
  5509. // representation
  5510. // as a UTF-8 encoded string. For example, if 'integer_value' is set
  5511. // to
  5512. // 123456789, the number of bytes would be counted as 9, even though
  5513. // an
  5514. // int64 only holds up to 8 bytes of data.
  5515. type GooglePrivacyDlpV2Value struct {
  5516. BooleanValue bool `json:"booleanValue,omitempty"`
  5517. DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
  5518. // Possible values:
  5519. // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week.
  5520. // "MONDAY" - The day-of-week of Monday.
  5521. // "TUESDAY" - The day-of-week of Tuesday.
  5522. // "WEDNESDAY" - The day-of-week of Wednesday.
  5523. // "THURSDAY" - The day-of-week of Thursday.
  5524. // "FRIDAY" - The day-of-week of Friday.
  5525. // "SATURDAY" - The day-of-week of Saturday.
  5526. // "SUNDAY" - The day-of-week of Sunday.
  5527. DayOfWeekValue string `json:"dayOfWeekValue,omitempty"`
  5528. FloatValue float64 `json:"floatValue,omitempty"`
  5529. IntegerValue int64 `json:"integerValue,omitempty,string"`
  5530. StringValue string `json:"stringValue,omitempty"`
  5531. TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"`
  5532. TimestampValue string `json:"timestampValue,omitempty"`
  5533. // ForceSendFields is a list of field names (e.g. "BooleanValue") to
  5534. // unconditionally include in API requests. By default, fields with
  5535. // empty values are omitted from API requests. However, any non-pointer,
  5536. // non-interface field appearing in ForceSendFields will be sent to the
  5537. // server regardless of whether the field is empty or not. This may be
  5538. // used to include empty fields in Patch requests.
  5539. ForceSendFields []string `json:"-"`
  5540. // NullFields is a list of field names (e.g. "BooleanValue") to include
  5541. // in API requests with the JSON null value. By default, fields with
  5542. // empty values are omitted from API requests. However, any field with
  5543. // an empty value appearing in NullFields will be sent to the server as
  5544. // null. It is an error if a field in this list has a non-empty value.
  5545. // This may be used to include null fields in Patch requests.
  5546. NullFields []string `json:"-"`
  5547. }
  5548. func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) {
  5549. type NoMethod GooglePrivacyDlpV2Value
  5550. raw := NoMethod(*s)
  5551. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5552. }
  5553. func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error {
  5554. type NoMethod GooglePrivacyDlpV2Value
  5555. var s1 struct {
  5556. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  5557. *NoMethod
  5558. }
  5559. s1.NoMethod = (*NoMethod)(s)
  5560. if err := json.Unmarshal(data, &s1); err != nil {
  5561. return err
  5562. }
  5563. s.FloatValue = float64(s1.FloatValue)
  5564. return nil
  5565. }
  5566. // GooglePrivacyDlpV2ValueFrequency: A value of a field, including its
  5567. // frequency.
  5568. type GooglePrivacyDlpV2ValueFrequency struct {
  5569. // Count: How many times the value is contained in the field.
  5570. Count int64 `json:"count,omitempty,string"`
  5571. // Value: A value contained in the field in question.
  5572. Value *GooglePrivacyDlpV2Value `json:"value,omitempty"`
  5573. // ForceSendFields is a list of field names (e.g. "Count") to
  5574. // unconditionally include in API requests. By default, fields with
  5575. // empty values are omitted from API requests. However, any non-pointer,
  5576. // non-interface field appearing in ForceSendFields will be sent to the
  5577. // server regardless of whether the field is empty or not. This may be
  5578. // used to include empty fields in Patch requests.
  5579. ForceSendFields []string `json:"-"`
  5580. // NullFields is a list of field names (e.g. "Count") to include in API
  5581. // requests with the JSON null value. By default, fields with empty
  5582. // values are omitted from API requests. However, any field with an
  5583. // empty value appearing in NullFields will be sent to the server as
  5584. // null. It is an error if a field in this list has a non-empty value.
  5585. // This may be used to include null fields in Patch requests.
  5586. NullFields []string `json:"-"`
  5587. }
  5588. func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) {
  5589. type NoMethod GooglePrivacyDlpV2ValueFrequency
  5590. raw := NoMethod(*s)
  5591. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5592. }
  5593. // GooglePrivacyDlpV2WordList: Message defining a list of words or
  5594. // phrases to search for in the data.
  5595. type GooglePrivacyDlpV2WordList struct {
  5596. // Words: Words or phrases defining the dictionary. The dictionary must
  5597. // contain
  5598. // at least one phrase and every phrase must contain at least 2
  5599. // characters
  5600. // that are letters or digits. [required]
  5601. Words []string `json:"words,omitempty"`
  5602. // ForceSendFields is a list of field names (e.g. "Words") to
  5603. // unconditionally include in API requests. By default, fields with
  5604. // empty values are omitted from API requests. However, any non-pointer,
  5605. // non-interface field appearing in ForceSendFields will be sent to the
  5606. // server regardless of whether the field is empty or not. This may be
  5607. // used to include empty fields in Patch requests.
  5608. ForceSendFields []string `json:"-"`
  5609. // NullFields is a list of field names (e.g. "Words") to include in API
  5610. // requests with the JSON null value. By default, fields with empty
  5611. // values are omitted from API requests. However, any field with an
  5612. // empty value appearing in NullFields will be sent to the server as
  5613. // null. It is an error if a field in this list has a non-empty value.
  5614. // This may be used to include null fields in Patch requests.
  5615. NullFields []string `json:"-"`
  5616. }
  5617. func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) {
  5618. type NoMethod GooglePrivacyDlpV2WordList
  5619. raw := NoMethod(*s)
  5620. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5621. }
  5622. // GoogleProtobufEmpty: A generic empty message that you can re-use to
  5623. // avoid defining duplicated
  5624. // empty messages in your APIs. A typical example is to use it as the
  5625. // request
  5626. // or the response type of an API method. For instance:
  5627. //
  5628. // service Foo {
  5629. // rpc Bar(google.protobuf.Empty) returns
  5630. // (google.protobuf.Empty);
  5631. // }
  5632. //
  5633. // The JSON representation for `Empty` is empty JSON object `{}`.
  5634. type GoogleProtobufEmpty struct {
  5635. // ServerResponse contains the HTTP response code and headers from the
  5636. // server.
  5637. googleapi.ServerResponse `json:"-"`
  5638. }
  5639. // GoogleRpcStatus: The `Status` type defines a logical error model that
  5640. // is suitable for different
  5641. // programming environments, including REST APIs and RPC APIs. It is
  5642. // used by
  5643. // [gRPC](https://github.com/grpc). The error model is designed to
  5644. // be:
  5645. //
  5646. // - Simple to use and understand for most users
  5647. // - Flexible enough to meet unexpected needs
  5648. //
  5649. // # Overview
  5650. //
  5651. // The `Status` message contains three pieces of data: error code, error
  5652. // message,
  5653. // and error details. The error code should be an enum value
  5654. // of
  5655. // google.rpc.Code, but it may accept additional error codes if needed.
  5656. // The
  5657. // error message should be a developer-facing English message that
  5658. // helps
  5659. // developers *understand* and *resolve* the error. If a localized
  5660. // user-facing
  5661. // error message is needed, put the localized message in the error
  5662. // details or
  5663. // localize it in the client. The optional error details may contain
  5664. // arbitrary
  5665. // information about the error. There is a predefined set of error
  5666. // detail types
  5667. // in the package `google.rpc` that can be used for common error
  5668. // conditions.
  5669. //
  5670. // # Language mapping
  5671. //
  5672. // The `Status` message is the logical representation of the error
  5673. // model, but it
  5674. // is not necessarily the actual wire format. When the `Status` message
  5675. // is
  5676. // exposed in different client libraries and different wire protocols,
  5677. // it can be
  5678. // mapped differently. For example, it will likely be mapped to some
  5679. // exceptions
  5680. // in Java, but more likely mapped to some error codes in C.
  5681. //
  5682. // # Other uses
  5683. //
  5684. // The error model and the `Status` message can be used in a variety
  5685. // of
  5686. // environments, either with or without APIs, to provide a
  5687. // consistent developer experience across different
  5688. // environments.
  5689. //
  5690. // Example uses of this error model include:
  5691. //
  5692. // - Partial errors. If a service needs to return partial errors to the
  5693. // client,
  5694. // it may embed the `Status` in the normal response to indicate the
  5695. // partial
  5696. // errors.
  5697. //
  5698. // - Workflow errors. A typical workflow has multiple steps. Each step
  5699. // may
  5700. // have a `Status` message for error reporting.
  5701. //
  5702. // - Batch operations. If a client uses batch request and batch
  5703. // response, the
  5704. // `Status` message should be used directly inside batch response,
  5705. // one for
  5706. // each error sub-response.
  5707. //
  5708. // - Asynchronous operations. If an API call embeds asynchronous
  5709. // operation
  5710. // results in its response, the status of those operations should
  5711. // be
  5712. // represented directly using the `Status` message.
  5713. //
  5714. // - Logging. If some API errors are stored in logs, the message
  5715. // `Status` could
  5716. // be used directly after any stripping needed for security/privacy
  5717. // reasons.
  5718. type GoogleRpcStatus struct {
  5719. // Code: The status code, which should be an enum value of
  5720. // google.rpc.Code.
  5721. Code int64 `json:"code,omitempty"`
  5722. // Details: A list of messages that carry the error details. There is a
  5723. // common set of
  5724. // message types for APIs to use.
  5725. Details []googleapi.RawMessage `json:"details,omitempty"`
  5726. // Message: A developer-facing error message, which should be in
  5727. // English. Any
  5728. // user-facing error message should be localized and sent in
  5729. // the
  5730. // google.rpc.Status.details field, or localized by the client.
  5731. Message string `json:"message,omitempty"`
  5732. // ForceSendFields is a list of field names (e.g. "Code") to
  5733. // unconditionally include in API requests. By default, fields with
  5734. // empty values are omitted from API requests. However, any non-pointer,
  5735. // non-interface field appearing in ForceSendFields will be sent to the
  5736. // server regardless of whether the field is empty or not. This may be
  5737. // used to include empty fields in Patch requests.
  5738. ForceSendFields []string `json:"-"`
  5739. // NullFields is a list of field names (e.g. "Code") to include in API
  5740. // requests with the JSON null value. By default, fields with empty
  5741. // values are omitted from API requests. However, any field with an
  5742. // empty value appearing in NullFields will be sent to the server as
  5743. // null. It is an error if a field in this list has a non-empty value.
  5744. // This may be used to include null fields in Patch requests.
  5745. NullFields []string `json:"-"`
  5746. }
  5747. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  5748. type NoMethod GoogleRpcStatus
  5749. raw := NoMethod(*s)
  5750. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5751. }
  5752. // GoogleTypeDate: Represents a whole calendar date, e.g. date of birth.
  5753. // The time of day and
  5754. // time zone are either specified elsewhere or are not significant. The
  5755. // date
  5756. // is relative to the Proleptic Gregorian Calendar. The day may be 0
  5757. // to
  5758. // represent a year and month where the day is not significant, e.g.
  5759. // credit card
  5760. // expiration date. The year may be 0 to represent a month and day
  5761. // independent
  5762. // of year, e.g. anniversary date. Related types are
  5763. // google.type.TimeOfDay
  5764. // and `google.protobuf.Timestamp`.
  5765. type GoogleTypeDate struct {
  5766. // Day: Day of month. Must be from 1 to 31 and valid for the year and
  5767. // month, or 0
  5768. // if specifying a year/month where the day is not significant.
  5769. Day int64 `json:"day,omitempty"`
  5770. // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date
  5771. // without a
  5772. // month.
  5773. Month int64 `json:"month,omitempty"`
  5774. // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
  5775. // without
  5776. // a year.
  5777. Year int64 `json:"year,omitempty"`
  5778. // ForceSendFields is a list of field names (e.g. "Day") to
  5779. // unconditionally include in API requests. By default, fields with
  5780. // empty values are omitted from API requests. However, any non-pointer,
  5781. // non-interface field appearing in ForceSendFields will be sent to the
  5782. // server regardless of whether the field is empty or not. This may be
  5783. // used to include empty fields in Patch requests.
  5784. ForceSendFields []string `json:"-"`
  5785. // NullFields is a list of field names (e.g. "Day") to include in API
  5786. // requests with the JSON null value. By default, fields with empty
  5787. // values are omitted from API requests. However, any field with an
  5788. // empty value appearing in NullFields will be sent to the server as
  5789. // null. It is an error if a field in this list has a non-empty value.
  5790. // This may be used to include null fields in Patch requests.
  5791. NullFields []string `json:"-"`
  5792. }
  5793. func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  5794. type NoMethod GoogleTypeDate
  5795. raw := NoMethod(*s)
  5796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5797. }
  5798. // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone
  5799. // are either not significant
  5800. // or are specified elsewhere. An API may choose to allow leap seconds.
  5801. // Related
  5802. // types are google.type.Date and `google.protobuf.Timestamp`.
  5803. type GoogleTypeTimeOfDay struct {
  5804. // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
  5805. // may choose
  5806. // to allow the value "24:00:00" for scenarios like business closing
  5807. // time.
  5808. Hours int64 `json:"hours,omitempty"`
  5809. // Minutes: Minutes of hour of day. Must be from 0 to 59.
  5810. Minutes int64 `json:"minutes,omitempty"`
  5811. // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
  5812. // 999,999,999.
  5813. Nanos int64 `json:"nanos,omitempty"`
  5814. // Seconds: Seconds of minutes of the time. Must normally be from 0 to
  5815. // 59. An API may
  5816. // allow the value 60 if it allows leap-seconds.
  5817. Seconds int64 `json:"seconds,omitempty"`
  5818. // ForceSendFields is a list of field names (e.g. "Hours") to
  5819. // unconditionally include in API requests. By default, fields with
  5820. // empty values are omitted from API requests. However, any non-pointer,
  5821. // non-interface field appearing in ForceSendFields will be sent to the
  5822. // server regardless of whether the field is empty or not. This may be
  5823. // used to include empty fields in Patch requests.
  5824. ForceSendFields []string `json:"-"`
  5825. // NullFields is a list of field names (e.g. "Hours") to include in API
  5826. // requests with the JSON null value. By default, fields with empty
  5827. // values are omitted from API requests. However, any field with an
  5828. // empty value appearing in NullFields will be sent to the server as
  5829. // null. It is an error if a field in this list has a non-empty value.
  5830. // This may be used to include null fields in Patch requests.
  5831. NullFields []string `json:"-"`
  5832. }
  5833. func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) {
  5834. type NoMethod GoogleTypeTimeOfDay
  5835. raw := NoMethod(*s)
  5836. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5837. }
  5838. // method id "dlp.infoTypes.list":
  5839. type InfoTypesListCall struct {
  5840. s *Service
  5841. urlParams_ gensupport.URLParams
  5842. ifNoneMatch_ string
  5843. ctx_ context.Context
  5844. header_ http.Header
  5845. }
  5846. // List: Returns a list of the sensitive information types that the DLP
  5847. // API
  5848. // supports. See https://cloud.google.com/dlp/docs/infotypes-reference
  5849. // to
  5850. // learn more.
  5851. func (r *InfoTypesService) List() *InfoTypesListCall {
  5852. c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5853. return c
  5854. }
  5855. // Filter sets the optional parameter "filter": Optional filter to only
  5856. // return infoTypes supported by certain parts of the
  5857. // API. Defaults to supported_by=INSPECT.
  5858. func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall {
  5859. c.urlParams_.Set("filter", filter)
  5860. return c
  5861. }
  5862. // LanguageCode sets the optional parameter "languageCode": Optional
  5863. // BCP-47 language code for localized infoType friendly
  5864. // names. If omitted, or if localized strings are not available,
  5865. // en-US strings will be returned.
  5866. func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall {
  5867. c.urlParams_.Set("languageCode", languageCode)
  5868. return c
  5869. }
  5870. // Fields allows partial responses to be retrieved. See
  5871. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5872. // for more information.
  5873. func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall {
  5874. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5875. return c
  5876. }
  5877. // IfNoneMatch sets the optional parameter which makes the operation
  5878. // fail if the object's ETag matches the given value. This is useful for
  5879. // getting updates only after the object has changed since the last
  5880. // request. Use googleapi.IsNotModified to check whether the response
  5881. // error from Do is the result of In-None-Match.
  5882. func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall {
  5883. c.ifNoneMatch_ = entityTag
  5884. return c
  5885. }
  5886. // Context sets the context to be used in this call's Do method. Any
  5887. // pending HTTP request will be aborted if the provided context is
  5888. // canceled.
  5889. func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall {
  5890. c.ctx_ = ctx
  5891. return c
  5892. }
  5893. // Header returns an http.Header that can be modified by the caller to
  5894. // add HTTP headers to the request.
  5895. func (c *InfoTypesListCall) Header() http.Header {
  5896. if c.header_ == nil {
  5897. c.header_ = make(http.Header)
  5898. }
  5899. return c.header_
  5900. }
  5901. func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) {
  5902. reqHeaders := make(http.Header)
  5903. for k, v := range c.header_ {
  5904. reqHeaders[k] = v
  5905. }
  5906. reqHeaders.Set("User-Agent", c.s.userAgent())
  5907. if c.ifNoneMatch_ != "" {
  5908. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5909. }
  5910. var body io.Reader = nil
  5911. c.urlParams_.Set("alt", alt)
  5912. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes")
  5913. urls += "?" + c.urlParams_.Encode()
  5914. req, _ := http.NewRequest("GET", urls, body)
  5915. req.Header = reqHeaders
  5916. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5917. }
  5918. // Do executes the "dlp.infoTypes.list" call.
  5919. // Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will
  5920. // be non-nil. Any non-2xx status code is an error. Response headers are
  5921. // in either
  5922. // *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if
  5923. // a response was returned at all) in error.(*googleapi.Error).Header.
  5924. // Use googleapi.IsNotModified to check whether the returned error was
  5925. // because http.StatusNotModified was returned.
  5926. func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) {
  5927. gensupport.SetOptions(c.urlParams_, opts...)
  5928. res, err := c.doRequest("json")
  5929. if res != nil && res.StatusCode == http.StatusNotModified {
  5930. if res.Body != nil {
  5931. res.Body.Close()
  5932. }
  5933. return nil, &googleapi.Error{
  5934. Code: res.StatusCode,
  5935. Header: res.Header,
  5936. }
  5937. }
  5938. if err != nil {
  5939. return nil, err
  5940. }
  5941. defer googleapi.CloseBody(res)
  5942. if err := googleapi.CheckResponse(res); err != nil {
  5943. return nil, err
  5944. }
  5945. ret := &GooglePrivacyDlpV2ListInfoTypesResponse{
  5946. ServerResponse: googleapi.ServerResponse{
  5947. Header: res.Header,
  5948. HTTPStatusCode: res.StatusCode,
  5949. },
  5950. }
  5951. target := &ret
  5952. if err := gensupport.DecodeResponse(target, res); err != nil {
  5953. return nil, err
  5954. }
  5955. return ret, nil
  5956. // {
  5957. // "description": "Returns a list of the sensitive information types that the DLP API\nsupports. See https://cloud.google.com/dlp/docs/infotypes-reference to\nlearn more.",
  5958. // "flatPath": "v2/infoTypes",
  5959. // "httpMethod": "GET",
  5960. // "id": "dlp.infoTypes.list",
  5961. // "parameterOrder": [],
  5962. // "parameters": {
  5963. // "filter": {
  5964. // "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.",
  5965. // "location": "query",
  5966. // "type": "string"
  5967. // },
  5968. // "languageCode": {
  5969. // "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.",
  5970. // "location": "query",
  5971. // "type": "string"
  5972. // }
  5973. // },
  5974. // "path": "v2/infoTypes",
  5975. // "response": {
  5976. // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse"
  5977. // },
  5978. // "scopes": [
  5979. // "https://www.googleapis.com/auth/cloud-platform"
  5980. // ]
  5981. // }
  5982. }
  5983. // method id "dlp.organizations.deidentifyTemplates.create":
  5984. type OrganizationsDeidentifyTemplatesCreateCall struct {
  5985. s *Service
  5986. parent string
  5987. googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
  5988. urlParams_ gensupport.URLParams
  5989. ctx_ context.Context
  5990. header_ http.Header
  5991. }
  5992. // Create: Creates a DeidentifyTemplate for re-using frequently used
  5993. // configuration
  5994. // for de-identifying content, images, and storage.
  5995. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  5996. // learn
  5997. // more.
  5998. func (r *OrganizationsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall {
  5999. c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6000. c.parent = parent
  6001. c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest
  6002. return c
  6003. }
  6004. // Fields allows partial responses to be retrieved. See
  6005. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6006. // for more information.
  6007. func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall {
  6008. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6009. return c
  6010. }
  6011. // Context sets the context to be used in this call's Do method. Any
  6012. // pending HTTP request will be aborted if the provided context is
  6013. // canceled.
  6014. func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall {
  6015. c.ctx_ = ctx
  6016. return c
  6017. }
  6018. // Header returns an http.Header that can be modified by the caller to
  6019. // add HTTP headers to the request.
  6020. func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header {
  6021. if c.header_ == nil {
  6022. c.header_ = make(http.Header)
  6023. }
  6024. return c.header_
  6025. }
  6026. func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  6027. reqHeaders := make(http.Header)
  6028. for k, v := range c.header_ {
  6029. reqHeaders[k] = v
  6030. }
  6031. reqHeaders.Set("User-Agent", c.s.userAgent())
  6032. var body io.Reader = nil
  6033. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest)
  6034. if err != nil {
  6035. return nil, err
  6036. }
  6037. reqHeaders.Set("Content-Type", "application/json")
  6038. c.urlParams_.Set("alt", alt)
  6039. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates")
  6040. urls += "?" + c.urlParams_.Encode()
  6041. req, _ := http.NewRequest("POST", urls, body)
  6042. req.Header = reqHeaders
  6043. googleapi.Expand(req.URL, map[string]string{
  6044. "parent": c.parent,
  6045. })
  6046. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6047. }
  6048. // Do executes the "dlp.organizations.deidentifyTemplates.create" call.
  6049. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  6050. // non-nil. Any non-2xx status code is an error. Response headers are in
  6051. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  6052. // (if a response was returned at all) in
  6053. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6054. // whether the returned error was because http.StatusNotModified was
  6055. // returned.
  6056. func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  6057. gensupport.SetOptions(c.urlParams_, opts...)
  6058. res, err := c.doRequest("json")
  6059. if res != nil && res.StatusCode == http.StatusNotModified {
  6060. if res.Body != nil {
  6061. res.Body.Close()
  6062. }
  6063. return nil, &googleapi.Error{
  6064. Code: res.StatusCode,
  6065. Header: res.Header,
  6066. }
  6067. }
  6068. if err != nil {
  6069. return nil, err
  6070. }
  6071. defer googleapi.CloseBody(res)
  6072. if err := googleapi.CheckResponse(res); err != nil {
  6073. return nil, err
  6074. }
  6075. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  6076. ServerResponse: googleapi.ServerResponse{
  6077. Header: res.Header,
  6078. HTTPStatusCode: res.StatusCode,
  6079. },
  6080. }
  6081. target := &ret
  6082. if err := gensupport.DecodeResponse(target, res); err != nil {
  6083. return nil, err
  6084. }
  6085. return ret, nil
  6086. // {
  6087. // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration\nfor de-identifying content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  6088. // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates",
  6089. // "httpMethod": "POST",
  6090. // "id": "dlp.organizations.deidentifyTemplates.create",
  6091. // "parameterOrder": [
  6092. // "parent"
  6093. // ],
  6094. // "parameters": {
  6095. // "parent": {
  6096. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  6097. // "location": "path",
  6098. // "pattern": "^organizations/[^/]+$",
  6099. // "required": true,
  6100. // "type": "string"
  6101. // }
  6102. // },
  6103. // "path": "v2/{+parent}/deidentifyTemplates",
  6104. // "request": {
  6105. // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest"
  6106. // },
  6107. // "response": {
  6108. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  6109. // },
  6110. // "scopes": [
  6111. // "https://www.googleapis.com/auth/cloud-platform"
  6112. // ]
  6113. // }
  6114. }
  6115. // method id "dlp.organizations.deidentifyTemplates.delete":
  6116. type OrganizationsDeidentifyTemplatesDeleteCall struct {
  6117. s *Service
  6118. name string
  6119. urlParams_ gensupport.URLParams
  6120. ctx_ context.Context
  6121. header_ http.Header
  6122. }
  6123. // Delete: Deletes a DeidentifyTemplate.
  6124. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  6125. // learn
  6126. // more.
  6127. func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall {
  6128. c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6129. c.name = name
  6130. return c
  6131. }
  6132. // Fields allows partial responses to be retrieved. See
  6133. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6134. // for more information.
  6135. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall {
  6136. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6137. return c
  6138. }
  6139. // Context sets the context to be used in this call's Do method. Any
  6140. // pending HTTP request will be aborted if the provided context is
  6141. // canceled.
  6142. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall {
  6143. c.ctx_ = ctx
  6144. return c
  6145. }
  6146. // Header returns an http.Header that can be modified by the caller to
  6147. // add HTTP headers to the request.
  6148. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header {
  6149. if c.header_ == nil {
  6150. c.header_ = make(http.Header)
  6151. }
  6152. return c.header_
  6153. }
  6154. func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6155. reqHeaders := make(http.Header)
  6156. for k, v := range c.header_ {
  6157. reqHeaders[k] = v
  6158. }
  6159. reqHeaders.Set("User-Agent", c.s.userAgent())
  6160. var body io.Reader = nil
  6161. c.urlParams_.Set("alt", alt)
  6162. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6163. urls += "?" + c.urlParams_.Encode()
  6164. req, _ := http.NewRequest("DELETE", urls, body)
  6165. req.Header = reqHeaders
  6166. googleapi.Expand(req.URL, map[string]string{
  6167. "name": c.name,
  6168. })
  6169. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6170. }
  6171. // Do executes the "dlp.organizations.deidentifyTemplates.delete" call.
  6172. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  6173. // non-2xx status code is an error. Response headers are in either
  6174. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  6175. // returned at all) in error.(*googleapi.Error).Header. Use
  6176. // googleapi.IsNotModified to check whether the returned error was
  6177. // because http.StatusNotModified was returned.
  6178. func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  6179. gensupport.SetOptions(c.urlParams_, opts...)
  6180. res, err := c.doRequest("json")
  6181. if res != nil && res.StatusCode == http.StatusNotModified {
  6182. if res.Body != nil {
  6183. res.Body.Close()
  6184. }
  6185. return nil, &googleapi.Error{
  6186. Code: res.StatusCode,
  6187. Header: res.Header,
  6188. }
  6189. }
  6190. if err != nil {
  6191. return nil, err
  6192. }
  6193. defer googleapi.CloseBody(res)
  6194. if err := googleapi.CheckResponse(res); err != nil {
  6195. return nil, err
  6196. }
  6197. ret := &GoogleProtobufEmpty{
  6198. ServerResponse: googleapi.ServerResponse{
  6199. Header: res.Header,
  6200. HTTPStatusCode: res.StatusCode,
  6201. },
  6202. }
  6203. target := &ret
  6204. if err := gensupport.DecodeResponse(target, res); err != nil {
  6205. return nil, err
  6206. }
  6207. return ret, nil
  6208. // {
  6209. // "description": "Deletes a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  6210. // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  6211. // "httpMethod": "DELETE",
  6212. // "id": "dlp.organizations.deidentifyTemplates.delete",
  6213. // "parameterOrder": [
  6214. // "name"
  6215. // ],
  6216. // "parameters": {
  6217. // "name": {
  6218. // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  6219. // "location": "path",
  6220. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  6221. // "required": true,
  6222. // "type": "string"
  6223. // }
  6224. // },
  6225. // "path": "v2/{+name}",
  6226. // "response": {
  6227. // "$ref": "GoogleProtobufEmpty"
  6228. // },
  6229. // "scopes": [
  6230. // "https://www.googleapis.com/auth/cloud-platform"
  6231. // ]
  6232. // }
  6233. }
  6234. // method id "dlp.organizations.deidentifyTemplates.get":
  6235. type OrganizationsDeidentifyTemplatesGetCall struct {
  6236. s *Service
  6237. name string
  6238. urlParams_ gensupport.URLParams
  6239. ifNoneMatch_ string
  6240. ctx_ context.Context
  6241. header_ http.Header
  6242. }
  6243. // Get: Gets a DeidentifyTemplate.
  6244. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  6245. // learn
  6246. // more.
  6247. func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall {
  6248. c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6249. c.name = name
  6250. return c
  6251. }
  6252. // Fields allows partial responses to be retrieved. See
  6253. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6254. // for more information.
  6255. func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall {
  6256. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6257. return c
  6258. }
  6259. // IfNoneMatch sets the optional parameter which makes the operation
  6260. // fail if the object's ETag matches the given value. This is useful for
  6261. // getting updates only after the object has changed since the last
  6262. // request. Use googleapi.IsNotModified to check whether the response
  6263. // error from Do is the result of In-None-Match.
  6264. func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall {
  6265. c.ifNoneMatch_ = entityTag
  6266. return c
  6267. }
  6268. // Context sets the context to be used in this call's Do method. Any
  6269. // pending HTTP request will be aborted if the provided context is
  6270. // canceled.
  6271. func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall {
  6272. c.ctx_ = ctx
  6273. return c
  6274. }
  6275. // Header returns an http.Header that can be modified by the caller to
  6276. // add HTTP headers to the request.
  6277. func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header {
  6278. if c.header_ == nil {
  6279. c.header_ = make(http.Header)
  6280. }
  6281. return c.header_
  6282. }
  6283. func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  6284. reqHeaders := make(http.Header)
  6285. for k, v := range c.header_ {
  6286. reqHeaders[k] = v
  6287. }
  6288. reqHeaders.Set("User-Agent", c.s.userAgent())
  6289. if c.ifNoneMatch_ != "" {
  6290. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6291. }
  6292. var body io.Reader = nil
  6293. c.urlParams_.Set("alt", alt)
  6294. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6295. urls += "?" + c.urlParams_.Encode()
  6296. req, _ := http.NewRequest("GET", urls, body)
  6297. req.Header = reqHeaders
  6298. googleapi.Expand(req.URL, map[string]string{
  6299. "name": c.name,
  6300. })
  6301. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6302. }
  6303. // Do executes the "dlp.organizations.deidentifyTemplates.get" call.
  6304. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  6305. // non-nil. Any non-2xx status code is an error. Response headers are in
  6306. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  6307. // (if a response was returned at all) in
  6308. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6309. // whether the returned error was because http.StatusNotModified was
  6310. // returned.
  6311. func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  6312. gensupport.SetOptions(c.urlParams_, opts...)
  6313. res, err := c.doRequest("json")
  6314. if res != nil && res.StatusCode == http.StatusNotModified {
  6315. if res.Body != nil {
  6316. res.Body.Close()
  6317. }
  6318. return nil, &googleapi.Error{
  6319. Code: res.StatusCode,
  6320. Header: res.Header,
  6321. }
  6322. }
  6323. if err != nil {
  6324. return nil, err
  6325. }
  6326. defer googleapi.CloseBody(res)
  6327. if err := googleapi.CheckResponse(res); err != nil {
  6328. return nil, err
  6329. }
  6330. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  6331. ServerResponse: googleapi.ServerResponse{
  6332. Header: res.Header,
  6333. HTTPStatusCode: res.StatusCode,
  6334. },
  6335. }
  6336. target := &ret
  6337. if err := gensupport.DecodeResponse(target, res); err != nil {
  6338. return nil, err
  6339. }
  6340. return ret, nil
  6341. // {
  6342. // "description": "Gets a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  6343. // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  6344. // "httpMethod": "GET",
  6345. // "id": "dlp.organizations.deidentifyTemplates.get",
  6346. // "parameterOrder": [
  6347. // "name"
  6348. // ],
  6349. // "parameters": {
  6350. // "name": {
  6351. // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  6352. // "location": "path",
  6353. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  6354. // "required": true,
  6355. // "type": "string"
  6356. // }
  6357. // },
  6358. // "path": "v2/{+name}",
  6359. // "response": {
  6360. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  6361. // },
  6362. // "scopes": [
  6363. // "https://www.googleapis.com/auth/cloud-platform"
  6364. // ]
  6365. // }
  6366. }
  6367. // method id "dlp.organizations.deidentifyTemplates.list":
  6368. type OrganizationsDeidentifyTemplatesListCall struct {
  6369. s *Service
  6370. parent string
  6371. urlParams_ gensupport.URLParams
  6372. ifNoneMatch_ string
  6373. ctx_ context.Context
  6374. header_ http.Header
  6375. }
  6376. // List: Lists DeidentifyTemplates.
  6377. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  6378. // learn
  6379. // more.
  6380. func (r *OrganizationsDeidentifyTemplatesService) List(parent string) *OrganizationsDeidentifyTemplatesListCall {
  6381. c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6382. c.parent = parent
  6383. return c
  6384. }
  6385. // PageSize sets the optional parameter "pageSize": Optional size of the
  6386. // page, can be limited by server. If zero server returns
  6387. // a page of max size 100.
  6388. func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall {
  6389. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6390. return c
  6391. }
  6392. // PageToken sets the optional parameter "pageToken": Optional page
  6393. // token to continue retrieval. Comes from previous call
  6394. // to `ListDeidentifyTemplates`.
  6395. func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall {
  6396. c.urlParams_.Set("pageToken", pageToken)
  6397. return c
  6398. }
  6399. // Fields allows partial responses to be retrieved. See
  6400. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6401. // for more information.
  6402. func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall {
  6403. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6404. return c
  6405. }
  6406. // IfNoneMatch sets the optional parameter which makes the operation
  6407. // fail if the object's ETag matches the given value. This is useful for
  6408. // getting updates only after the object has changed since the last
  6409. // request. Use googleapi.IsNotModified to check whether the response
  6410. // error from Do is the result of In-None-Match.
  6411. func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall {
  6412. c.ifNoneMatch_ = entityTag
  6413. return c
  6414. }
  6415. // Context sets the context to be used in this call's Do method. Any
  6416. // pending HTTP request will be aborted if the provided context is
  6417. // canceled.
  6418. func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall {
  6419. c.ctx_ = ctx
  6420. return c
  6421. }
  6422. // Header returns an http.Header that can be modified by the caller to
  6423. // add HTTP headers to the request.
  6424. func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header {
  6425. if c.header_ == nil {
  6426. c.header_ = make(http.Header)
  6427. }
  6428. return c.header_
  6429. }
  6430. func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  6431. reqHeaders := make(http.Header)
  6432. for k, v := range c.header_ {
  6433. reqHeaders[k] = v
  6434. }
  6435. reqHeaders.Set("User-Agent", c.s.userAgent())
  6436. if c.ifNoneMatch_ != "" {
  6437. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6438. }
  6439. var body io.Reader = nil
  6440. c.urlParams_.Set("alt", alt)
  6441. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates")
  6442. urls += "?" + c.urlParams_.Encode()
  6443. req, _ := http.NewRequest("GET", urls, body)
  6444. req.Header = reqHeaders
  6445. googleapi.Expand(req.URL, map[string]string{
  6446. "parent": c.parent,
  6447. })
  6448. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6449. }
  6450. // Do executes the "dlp.organizations.deidentifyTemplates.list" call.
  6451. // Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or
  6452. // error will be non-nil. Any non-2xx status code is an error. Response
  6453. // headers are in either
  6454. // *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head
  6455. // er or (if a response was returned at all) in
  6456. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6457. // whether the returned error was because http.StatusNotModified was
  6458. // returned.
  6459. func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) {
  6460. gensupport.SetOptions(c.urlParams_, opts...)
  6461. res, err := c.doRequest("json")
  6462. if res != nil && res.StatusCode == http.StatusNotModified {
  6463. if res.Body != nil {
  6464. res.Body.Close()
  6465. }
  6466. return nil, &googleapi.Error{
  6467. Code: res.StatusCode,
  6468. Header: res.Header,
  6469. }
  6470. }
  6471. if err != nil {
  6472. return nil, err
  6473. }
  6474. defer googleapi.CloseBody(res)
  6475. if err := googleapi.CheckResponse(res); err != nil {
  6476. return nil, err
  6477. }
  6478. ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{
  6479. ServerResponse: googleapi.ServerResponse{
  6480. Header: res.Header,
  6481. HTTPStatusCode: res.StatusCode,
  6482. },
  6483. }
  6484. target := &ret
  6485. if err := gensupport.DecodeResponse(target, res); err != nil {
  6486. return nil, err
  6487. }
  6488. return ret, nil
  6489. // {
  6490. // "description": "Lists DeidentifyTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  6491. // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates",
  6492. // "httpMethod": "GET",
  6493. // "id": "dlp.organizations.deidentifyTemplates.list",
  6494. // "parameterOrder": [
  6495. // "parent"
  6496. // ],
  6497. // "parameters": {
  6498. // "pageSize": {
  6499. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  6500. // "format": "int32",
  6501. // "location": "query",
  6502. // "type": "integer"
  6503. // },
  6504. // "pageToken": {
  6505. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.",
  6506. // "location": "query",
  6507. // "type": "string"
  6508. // },
  6509. // "parent": {
  6510. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  6511. // "location": "path",
  6512. // "pattern": "^organizations/[^/]+$",
  6513. // "required": true,
  6514. // "type": "string"
  6515. // }
  6516. // },
  6517. // "path": "v2/{+parent}/deidentifyTemplates",
  6518. // "response": {
  6519. // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse"
  6520. // },
  6521. // "scopes": [
  6522. // "https://www.googleapis.com/auth/cloud-platform"
  6523. // ]
  6524. // }
  6525. }
  6526. // Pages invokes f for each page of results.
  6527. // A non-nil error returned from f will halt the iteration.
  6528. // The provided context supersedes any context provided to the Context method.
  6529. func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error {
  6530. c.ctx_ = ctx
  6531. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6532. for {
  6533. x, err := c.Do()
  6534. if err != nil {
  6535. return err
  6536. }
  6537. if err := f(x); err != nil {
  6538. return err
  6539. }
  6540. if x.NextPageToken == "" {
  6541. return nil
  6542. }
  6543. c.PageToken(x.NextPageToken)
  6544. }
  6545. }
  6546. // method id "dlp.organizations.deidentifyTemplates.patch":
  6547. type OrganizationsDeidentifyTemplatesPatchCall struct {
  6548. s *Service
  6549. name string
  6550. googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest
  6551. urlParams_ gensupport.URLParams
  6552. ctx_ context.Context
  6553. header_ http.Header
  6554. }
  6555. // Patch: Updates the DeidentifyTemplate.
  6556. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  6557. // learn
  6558. // more.
  6559. func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall {
  6560. c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6561. c.name = name
  6562. c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest
  6563. return c
  6564. }
  6565. // Fields allows partial responses to be retrieved. See
  6566. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6567. // for more information.
  6568. func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall {
  6569. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6570. return c
  6571. }
  6572. // Context sets the context to be used in this call's Do method. Any
  6573. // pending HTTP request will be aborted if the provided context is
  6574. // canceled.
  6575. func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall {
  6576. c.ctx_ = ctx
  6577. return c
  6578. }
  6579. // Header returns an http.Header that can be modified by the caller to
  6580. // add HTTP headers to the request.
  6581. func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header {
  6582. if c.header_ == nil {
  6583. c.header_ = make(http.Header)
  6584. }
  6585. return c.header_
  6586. }
  6587. func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  6588. reqHeaders := make(http.Header)
  6589. for k, v := range c.header_ {
  6590. reqHeaders[k] = v
  6591. }
  6592. reqHeaders.Set("User-Agent", c.s.userAgent())
  6593. var body io.Reader = nil
  6594. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest)
  6595. if err != nil {
  6596. return nil, err
  6597. }
  6598. reqHeaders.Set("Content-Type", "application/json")
  6599. c.urlParams_.Set("alt", alt)
  6600. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6601. urls += "?" + c.urlParams_.Encode()
  6602. req, _ := http.NewRequest("PATCH", urls, body)
  6603. req.Header = reqHeaders
  6604. googleapi.Expand(req.URL, map[string]string{
  6605. "name": c.name,
  6606. })
  6607. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6608. }
  6609. // Do executes the "dlp.organizations.deidentifyTemplates.patch" call.
  6610. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  6611. // non-nil. Any non-2xx status code is an error. Response headers are in
  6612. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  6613. // (if a response was returned at all) in
  6614. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6615. // whether the returned error was because http.StatusNotModified was
  6616. // returned.
  6617. func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  6618. gensupport.SetOptions(c.urlParams_, opts...)
  6619. res, err := c.doRequest("json")
  6620. if res != nil && res.StatusCode == http.StatusNotModified {
  6621. if res.Body != nil {
  6622. res.Body.Close()
  6623. }
  6624. return nil, &googleapi.Error{
  6625. Code: res.StatusCode,
  6626. Header: res.Header,
  6627. }
  6628. }
  6629. if err != nil {
  6630. return nil, err
  6631. }
  6632. defer googleapi.CloseBody(res)
  6633. if err := googleapi.CheckResponse(res); err != nil {
  6634. return nil, err
  6635. }
  6636. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  6637. ServerResponse: googleapi.ServerResponse{
  6638. Header: res.Header,
  6639. HTTPStatusCode: res.StatusCode,
  6640. },
  6641. }
  6642. target := &ret
  6643. if err := gensupport.DecodeResponse(target, res); err != nil {
  6644. return nil, err
  6645. }
  6646. return ret, nil
  6647. // {
  6648. // "description": "Updates the DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  6649. // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  6650. // "httpMethod": "PATCH",
  6651. // "id": "dlp.organizations.deidentifyTemplates.patch",
  6652. // "parameterOrder": [
  6653. // "name"
  6654. // ],
  6655. // "parameters": {
  6656. // "name": {
  6657. // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  6658. // "location": "path",
  6659. // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$",
  6660. // "required": true,
  6661. // "type": "string"
  6662. // }
  6663. // },
  6664. // "path": "v2/{+name}",
  6665. // "request": {
  6666. // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest"
  6667. // },
  6668. // "response": {
  6669. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  6670. // },
  6671. // "scopes": [
  6672. // "https://www.googleapis.com/auth/cloud-platform"
  6673. // ]
  6674. // }
  6675. }
  6676. // method id "dlp.organizations.inspectTemplates.create":
  6677. type OrganizationsInspectTemplatesCreateCall struct {
  6678. s *Service
  6679. parent string
  6680. googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest
  6681. urlParams_ gensupport.URLParams
  6682. ctx_ context.Context
  6683. header_ http.Header
  6684. }
  6685. // Create: Creates an InspectTemplate for re-using frequently used
  6686. // configuration
  6687. // for inspecting content, images, and storage.
  6688. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  6689. // more.
  6690. func (r *OrganizationsInspectTemplatesService) Create(parent string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall {
  6691. c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6692. c.parent = parent
  6693. c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest
  6694. return c
  6695. }
  6696. // Fields allows partial responses to be retrieved. See
  6697. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6698. // for more information.
  6699. func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall {
  6700. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6701. return c
  6702. }
  6703. // Context sets the context to be used in this call's Do method. Any
  6704. // pending HTTP request will be aborted if the provided context is
  6705. // canceled.
  6706. func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall {
  6707. c.ctx_ = ctx
  6708. return c
  6709. }
  6710. // Header returns an http.Header that can be modified by the caller to
  6711. // add HTTP headers to the request.
  6712. func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header {
  6713. if c.header_ == nil {
  6714. c.header_ = make(http.Header)
  6715. }
  6716. return c.header_
  6717. }
  6718. func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  6719. reqHeaders := make(http.Header)
  6720. for k, v := range c.header_ {
  6721. reqHeaders[k] = v
  6722. }
  6723. reqHeaders.Set("User-Agent", c.s.userAgent())
  6724. var body io.Reader = nil
  6725. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest)
  6726. if err != nil {
  6727. return nil, err
  6728. }
  6729. reqHeaders.Set("Content-Type", "application/json")
  6730. c.urlParams_.Set("alt", alt)
  6731. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates")
  6732. urls += "?" + c.urlParams_.Encode()
  6733. req, _ := http.NewRequest("POST", urls, body)
  6734. req.Header = reqHeaders
  6735. googleapi.Expand(req.URL, map[string]string{
  6736. "parent": c.parent,
  6737. })
  6738. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6739. }
  6740. // Do executes the "dlp.organizations.inspectTemplates.create" call.
  6741. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  6742. // non-nil. Any non-2xx status code is an error. Response headers are in
  6743. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  6744. // (if a response was returned at all) in
  6745. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6746. // whether the returned error was because http.StatusNotModified was
  6747. // returned.
  6748. func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  6749. gensupport.SetOptions(c.urlParams_, opts...)
  6750. res, err := c.doRequest("json")
  6751. if res != nil && res.StatusCode == http.StatusNotModified {
  6752. if res.Body != nil {
  6753. res.Body.Close()
  6754. }
  6755. return nil, &googleapi.Error{
  6756. Code: res.StatusCode,
  6757. Header: res.Header,
  6758. }
  6759. }
  6760. if err != nil {
  6761. return nil, err
  6762. }
  6763. defer googleapi.CloseBody(res)
  6764. if err := googleapi.CheckResponse(res); err != nil {
  6765. return nil, err
  6766. }
  6767. ret := &GooglePrivacyDlpV2InspectTemplate{
  6768. ServerResponse: googleapi.ServerResponse{
  6769. Header: res.Header,
  6770. HTTPStatusCode: res.StatusCode,
  6771. },
  6772. }
  6773. target := &ret
  6774. if err := gensupport.DecodeResponse(target, res); err != nil {
  6775. return nil, err
  6776. }
  6777. return ret, nil
  6778. // {
  6779. // "description": "Creates an InspectTemplate for re-using frequently used configuration\nfor inspecting content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  6780. // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates",
  6781. // "httpMethod": "POST",
  6782. // "id": "dlp.organizations.inspectTemplates.create",
  6783. // "parameterOrder": [
  6784. // "parent"
  6785. // ],
  6786. // "parameters": {
  6787. // "parent": {
  6788. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  6789. // "location": "path",
  6790. // "pattern": "^organizations/[^/]+$",
  6791. // "required": true,
  6792. // "type": "string"
  6793. // }
  6794. // },
  6795. // "path": "v2/{+parent}/inspectTemplates",
  6796. // "request": {
  6797. // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest"
  6798. // },
  6799. // "response": {
  6800. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  6801. // },
  6802. // "scopes": [
  6803. // "https://www.googleapis.com/auth/cloud-platform"
  6804. // ]
  6805. // }
  6806. }
  6807. // method id "dlp.organizations.inspectTemplates.delete":
  6808. type OrganizationsInspectTemplatesDeleteCall struct {
  6809. s *Service
  6810. name string
  6811. urlParams_ gensupport.URLParams
  6812. ctx_ context.Context
  6813. header_ http.Header
  6814. }
  6815. // Delete: Deletes an InspectTemplate.
  6816. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  6817. // more.
  6818. func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall {
  6819. c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6820. c.name = name
  6821. return c
  6822. }
  6823. // Fields allows partial responses to be retrieved. See
  6824. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6825. // for more information.
  6826. func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall {
  6827. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6828. return c
  6829. }
  6830. // Context sets the context to be used in this call's Do method. Any
  6831. // pending HTTP request will be aborted if the provided context is
  6832. // canceled.
  6833. func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall {
  6834. c.ctx_ = ctx
  6835. return c
  6836. }
  6837. // Header returns an http.Header that can be modified by the caller to
  6838. // add HTTP headers to the request.
  6839. func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header {
  6840. if c.header_ == nil {
  6841. c.header_ = make(http.Header)
  6842. }
  6843. return c.header_
  6844. }
  6845. func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6846. reqHeaders := make(http.Header)
  6847. for k, v := range c.header_ {
  6848. reqHeaders[k] = v
  6849. }
  6850. reqHeaders.Set("User-Agent", c.s.userAgent())
  6851. var body io.Reader = nil
  6852. c.urlParams_.Set("alt", alt)
  6853. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6854. urls += "?" + c.urlParams_.Encode()
  6855. req, _ := http.NewRequest("DELETE", urls, body)
  6856. req.Header = reqHeaders
  6857. googleapi.Expand(req.URL, map[string]string{
  6858. "name": c.name,
  6859. })
  6860. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6861. }
  6862. // Do executes the "dlp.organizations.inspectTemplates.delete" call.
  6863. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  6864. // non-2xx status code is an error. Response headers are in either
  6865. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  6866. // returned at all) in error.(*googleapi.Error).Header. Use
  6867. // googleapi.IsNotModified to check whether the returned error was
  6868. // because http.StatusNotModified was returned.
  6869. func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  6870. gensupport.SetOptions(c.urlParams_, opts...)
  6871. res, err := c.doRequest("json")
  6872. if res != nil && res.StatusCode == http.StatusNotModified {
  6873. if res.Body != nil {
  6874. res.Body.Close()
  6875. }
  6876. return nil, &googleapi.Error{
  6877. Code: res.StatusCode,
  6878. Header: res.Header,
  6879. }
  6880. }
  6881. if err != nil {
  6882. return nil, err
  6883. }
  6884. defer googleapi.CloseBody(res)
  6885. if err := googleapi.CheckResponse(res); err != nil {
  6886. return nil, err
  6887. }
  6888. ret := &GoogleProtobufEmpty{
  6889. ServerResponse: googleapi.ServerResponse{
  6890. Header: res.Header,
  6891. HTTPStatusCode: res.StatusCode,
  6892. },
  6893. }
  6894. target := &ret
  6895. if err := gensupport.DecodeResponse(target, res); err != nil {
  6896. return nil, err
  6897. }
  6898. return ret, nil
  6899. // {
  6900. // "description": "Deletes an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  6901. // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  6902. // "httpMethod": "DELETE",
  6903. // "id": "dlp.organizations.inspectTemplates.delete",
  6904. // "parameterOrder": [
  6905. // "name"
  6906. // ],
  6907. // "parameters": {
  6908. // "name": {
  6909. // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  6910. // "location": "path",
  6911. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  6912. // "required": true,
  6913. // "type": "string"
  6914. // }
  6915. // },
  6916. // "path": "v2/{+name}",
  6917. // "response": {
  6918. // "$ref": "GoogleProtobufEmpty"
  6919. // },
  6920. // "scopes": [
  6921. // "https://www.googleapis.com/auth/cloud-platform"
  6922. // ]
  6923. // }
  6924. }
  6925. // method id "dlp.organizations.inspectTemplates.get":
  6926. type OrganizationsInspectTemplatesGetCall struct {
  6927. s *Service
  6928. name string
  6929. urlParams_ gensupport.URLParams
  6930. ifNoneMatch_ string
  6931. ctx_ context.Context
  6932. header_ http.Header
  6933. }
  6934. // Get: Gets an InspectTemplate.
  6935. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  6936. // more.
  6937. func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall {
  6938. c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6939. c.name = name
  6940. return c
  6941. }
  6942. // Fields allows partial responses to be retrieved. See
  6943. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6944. // for more information.
  6945. func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall {
  6946. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6947. return c
  6948. }
  6949. // IfNoneMatch sets the optional parameter which makes the operation
  6950. // fail if the object's ETag matches the given value. This is useful for
  6951. // getting updates only after the object has changed since the last
  6952. // request. Use googleapi.IsNotModified to check whether the response
  6953. // error from Do is the result of In-None-Match.
  6954. func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall {
  6955. c.ifNoneMatch_ = entityTag
  6956. return c
  6957. }
  6958. // Context sets the context to be used in this call's Do method. Any
  6959. // pending HTTP request will be aborted if the provided context is
  6960. // canceled.
  6961. func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall {
  6962. c.ctx_ = ctx
  6963. return c
  6964. }
  6965. // Header returns an http.Header that can be modified by the caller to
  6966. // add HTTP headers to the request.
  6967. func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header {
  6968. if c.header_ == nil {
  6969. c.header_ = make(http.Header)
  6970. }
  6971. return c.header_
  6972. }
  6973. func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  6974. reqHeaders := make(http.Header)
  6975. for k, v := range c.header_ {
  6976. reqHeaders[k] = v
  6977. }
  6978. reqHeaders.Set("User-Agent", c.s.userAgent())
  6979. if c.ifNoneMatch_ != "" {
  6980. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6981. }
  6982. var body io.Reader = nil
  6983. c.urlParams_.Set("alt", alt)
  6984. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6985. urls += "?" + c.urlParams_.Encode()
  6986. req, _ := http.NewRequest("GET", urls, body)
  6987. req.Header = reqHeaders
  6988. googleapi.Expand(req.URL, map[string]string{
  6989. "name": c.name,
  6990. })
  6991. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6992. }
  6993. // Do executes the "dlp.organizations.inspectTemplates.get" call.
  6994. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  6995. // non-nil. Any non-2xx status code is an error. Response headers are in
  6996. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  6997. // (if a response was returned at all) in
  6998. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6999. // whether the returned error was because http.StatusNotModified was
  7000. // returned.
  7001. func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  7002. gensupport.SetOptions(c.urlParams_, opts...)
  7003. res, err := c.doRequest("json")
  7004. if res != nil && res.StatusCode == http.StatusNotModified {
  7005. if res.Body != nil {
  7006. res.Body.Close()
  7007. }
  7008. return nil, &googleapi.Error{
  7009. Code: res.StatusCode,
  7010. Header: res.Header,
  7011. }
  7012. }
  7013. if err != nil {
  7014. return nil, err
  7015. }
  7016. defer googleapi.CloseBody(res)
  7017. if err := googleapi.CheckResponse(res); err != nil {
  7018. return nil, err
  7019. }
  7020. ret := &GooglePrivacyDlpV2InspectTemplate{
  7021. ServerResponse: googleapi.ServerResponse{
  7022. Header: res.Header,
  7023. HTTPStatusCode: res.StatusCode,
  7024. },
  7025. }
  7026. target := &ret
  7027. if err := gensupport.DecodeResponse(target, res); err != nil {
  7028. return nil, err
  7029. }
  7030. return ret, nil
  7031. // {
  7032. // "description": "Gets an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  7033. // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  7034. // "httpMethod": "GET",
  7035. // "id": "dlp.organizations.inspectTemplates.get",
  7036. // "parameterOrder": [
  7037. // "name"
  7038. // ],
  7039. // "parameters": {
  7040. // "name": {
  7041. // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  7042. // "location": "path",
  7043. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  7044. // "required": true,
  7045. // "type": "string"
  7046. // }
  7047. // },
  7048. // "path": "v2/{+name}",
  7049. // "response": {
  7050. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  7051. // },
  7052. // "scopes": [
  7053. // "https://www.googleapis.com/auth/cloud-platform"
  7054. // ]
  7055. // }
  7056. }
  7057. // method id "dlp.organizations.inspectTemplates.list":
  7058. type OrganizationsInspectTemplatesListCall struct {
  7059. s *Service
  7060. parent string
  7061. urlParams_ gensupport.URLParams
  7062. ifNoneMatch_ string
  7063. ctx_ context.Context
  7064. header_ http.Header
  7065. }
  7066. // List: Lists InspectTemplates.
  7067. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  7068. // more.
  7069. func (r *OrganizationsInspectTemplatesService) List(parent string) *OrganizationsInspectTemplatesListCall {
  7070. c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7071. c.parent = parent
  7072. return c
  7073. }
  7074. // PageSize sets the optional parameter "pageSize": Optional size of the
  7075. // page, can be limited by server. If zero server returns
  7076. // a page of max size 100.
  7077. func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall {
  7078. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7079. return c
  7080. }
  7081. // PageToken sets the optional parameter "pageToken": Optional page
  7082. // token to continue retrieval. Comes from previous call
  7083. // to `ListInspectTemplates`.
  7084. func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall {
  7085. c.urlParams_.Set("pageToken", pageToken)
  7086. return c
  7087. }
  7088. // Fields allows partial responses to be retrieved. See
  7089. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7090. // for more information.
  7091. func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall {
  7092. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7093. return c
  7094. }
  7095. // IfNoneMatch sets the optional parameter which makes the operation
  7096. // fail if the object's ETag matches the given value. This is useful for
  7097. // getting updates only after the object has changed since the last
  7098. // request. Use googleapi.IsNotModified to check whether the response
  7099. // error from Do is the result of In-None-Match.
  7100. func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall {
  7101. c.ifNoneMatch_ = entityTag
  7102. return c
  7103. }
  7104. // Context sets the context to be used in this call's Do method. Any
  7105. // pending HTTP request will be aborted if the provided context is
  7106. // canceled.
  7107. func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall {
  7108. c.ctx_ = ctx
  7109. return c
  7110. }
  7111. // Header returns an http.Header that can be modified by the caller to
  7112. // add HTTP headers to the request.
  7113. func (c *OrganizationsInspectTemplatesListCall) Header() http.Header {
  7114. if c.header_ == nil {
  7115. c.header_ = make(http.Header)
  7116. }
  7117. return c.header_
  7118. }
  7119. func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  7120. reqHeaders := make(http.Header)
  7121. for k, v := range c.header_ {
  7122. reqHeaders[k] = v
  7123. }
  7124. reqHeaders.Set("User-Agent", c.s.userAgent())
  7125. if c.ifNoneMatch_ != "" {
  7126. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7127. }
  7128. var body io.Reader = nil
  7129. c.urlParams_.Set("alt", alt)
  7130. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates")
  7131. urls += "?" + c.urlParams_.Encode()
  7132. req, _ := http.NewRequest("GET", urls, body)
  7133. req.Header = reqHeaders
  7134. googleapi.Expand(req.URL, map[string]string{
  7135. "parent": c.parent,
  7136. })
  7137. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7138. }
  7139. // Do executes the "dlp.organizations.inspectTemplates.list" call.
  7140. // Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or
  7141. // error will be non-nil. Any non-2xx status code is an error. Response
  7142. // headers are in either
  7143. // *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header
  7144. // or (if a response was returned at all) in
  7145. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7146. // whether the returned error was because http.StatusNotModified was
  7147. // returned.
  7148. func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) {
  7149. gensupport.SetOptions(c.urlParams_, opts...)
  7150. res, err := c.doRequest("json")
  7151. if res != nil && res.StatusCode == http.StatusNotModified {
  7152. if res.Body != nil {
  7153. res.Body.Close()
  7154. }
  7155. return nil, &googleapi.Error{
  7156. Code: res.StatusCode,
  7157. Header: res.Header,
  7158. }
  7159. }
  7160. if err != nil {
  7161. return nil, err
  7162. }
  7163. defer googleapi.CloseBody(res)
  7164. if err := googleapi.CheckResponse(res); err != nil {
  7165. return nil, err
  7166. }
  7167. ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{
  7168. ServerResponse: googleapi.ServerResponse{
  7169. Header: res.Header,
  7170. HTTPStatusCode: res.StatusCode,
  7171. },
  7172. }
  7173. target := &ret
  7174. if err := gensupport.DecodeResponse(target, res); err != nil {
  7175. return nil, err
  7176. }
  7177. return ret, nil
  7178. // {
  7179. // "description": "Lists InspectTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  7180. // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates",
  7181. // "httpMethod": "GET",
  7182. // "id": "dlp.organizations.inspectTemplates.list",
  7183. // "parameterOrder": [
  7184. // "parent"
  7185. // ],
  7186. // "parameters": {
  7187. // "pageSize": {
  7188. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  7189. // "format": "int32",
  7190. // "location": "query",
  7191. // "type": "integer"
  7192. // },
  7193. // "pageToken": {
  7194. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.",
  7195. // "location": "query",
  7196. // "type": "string"
  7197. // },
  7198. // "parent": {
  7199. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  7200. // "location": "path",
  7201. // "pattern": "^organizations/[^/]+$",
  7202. // "required": true,
  7203. // "type": "string"
  7204. // }
  7205. // },
  7206. // "path": "v2/{+parent}/inspectTemplates",
  7207. // "response": {
  7208. // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse"
  7209. // },
  7210. // "scopes": [
  7211. // "https://www.googleapis.com/auth/cloud-platform"
  7212. // ]
  7213. // }
  7214. }
  7215. // Pages invokes f for each page of results.
  7216. // A non-nil error returned from f will halt the iteration.
  7217. // The provided context supersedes any context provided to the Context method.
  7218. func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error {
  7219. c.ctx_ = ctx
  7220. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7221. for {
  7222. x, err := c.Do()
  7223. if err != nil {
  7224. return err
  7225. }
  7226. if err := f(x); err != nil {
  7227. return err
  7228. }
  7229. if x.NextPageToken == "" {
  7230. return nil
  7231. }
  7232. c.PageToken(x.NextPageToken)
  7233. }
  7234. }
  7235. // method id "dlp.organizations.inspectTemplates.patch":
  7236. type OrganizationsInspectTemplatesPatchCall struct {
  7237. s *Service
  7238. name string
  7239. googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest
  7240. urlParams_ gensupport.URLParams
  7241. ctx_ context.Context
  7242. header_ http.Header
  7243. }
  7244. // Patch: Updates the InspectTemplate.
  7245. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  7246. // more.
  7247. func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall {
  7248. c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7249. c.name = name
  7250. c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest
  7251. return c
  7252. }
  7253. // Fields allows partial responses to be retrieved. See
  7254. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7255. // for more information.
  7256. func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall {
  7257. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7258. return c
  7259. }
  7260. // Context sets the context to be used in this call's Do method. Any
  7261. // pending HTTP request will be aborted if the provided context is
  7262. // canceled.
  7263. func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall {
  7264. c.ctx_ = ctx
  7265. return c
  7266. }
  7267. // Header returns an http.Header that can be modified by the caller to
  7268. // add HTTP headers to the request.
  7269. func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header {
  7270. if c.header_ == nil {
  7271. c.header_ = make(http.Header)
  7272. }
  7273. return c.header_
  7274. }
  7275. func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  7276. reqHeaders := make(http.Header)
  7277. for k, v := range c.header_ {
  7278. reqHeaders[k] = v
  7279. }
  7280. reqHeaders.Set("User-Agent", c.s.userAgent())
  7281. var body io.Reader = nil
  7282. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest)
  7283. if err != nil {
  7284. return nil, err
  7285. }
  7286. reqHeaders.Set("Content-Type", "application/json")
  7287. c.urlParams_.Set("alt", alt)
  7288. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7289. urls += "?" + c.urlParams_.Encode()
  7290. req, _ := http.NewRequest("PATCH", urls, body)
  7291. req.Header = reqHeaders
  7292. googleapi.Expand(req.URL, map[string]string{
  7293. "name": c.name,
  7294. })
  7295. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7296. }
  7297. // Do executes the "dlp.organizations.inspectTemplates.patch" call.
  7298. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  7299. // non-nil. Any non-2xx status code is an error. Response headers are in
  7300. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  7301. // (if a response was returned at all) in
  7302. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7303. // whether the returned error was because http.StatusNotModified was
  7304. // returned.
  7305. func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  7306. gensupport.SetOptions(c.urlParams_, opts...)
  7307. res, err := c.doRequest("json")
  7308. if res != nil && res.StatusCode == http.StatusNotModified {
  7309. if res.Body != nil {
  7310. res.Body.Close()
  7311. }
  7312. return nil, &googleapi.Error{
  7313. Code: res.StatusCode,
  7314. Header: res.Header,
  7315. }
  7316. }
  7317. if err != nil {
  7318. return nil, err
  7319. }
  7320. defer googleapi.CloseBody(res)
  7321. if err := googleapi.CheckResponse(res); err != nil {
  7322. return nil, err
  7323. }
  7324. ret := &GooglePrivacyDlpV2InspectTemplate{
  7325. ServerResponse: googleapi.ServerResponse{
  7326. Header: res.Header,
  7327. HTTPStatusCode: res.StatusCode,
  7328. },
  7329. }
  7330. target := &ret
  7331. if err := gensupport.DecodeResponse(target, res); err != nil {
  7332. return nil, err
  7333. }
  7334. return ret, nil
  7335. // {
  7336. // "description": "Updates the InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  7337. // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}",
  7338. // "httpMethod": "PATCH",
  7339. // "id": "dlp.organizations.inspectTemplates.patch",
  7340. // "parameterOrder": [
  7341. // "name"
  7342. // ],
  7343. // "parameters": {
  7344. // "name": {
  7345. // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  7346. // "location": "path",
  7347. // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$",
  7348. // "required": true,
  7349. // "type": "string"
  7350. // }
  7351. // },
  7352. // "path": "v2/{+name}",
  7353. // "request": {
  7354. // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest"
  7355. // },
  7356. // "response": {
  7357. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  7358. // },
  7359. // "scopes": [
  7360. // "https://www.googleapis.com/auth/cloud-platform"
  7361. // ]
  7362. // }
  7363. }
  7364. // method id "dlp.projects.content.deidentify":
  7365. type ProjectsContentDeidentifyCall struct {
  7366. s *Service
  7367. parent string
  7368. googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest
  7369. urlParams_ gensupport.URLParams
  7370. ctx_ context.Context
  7371. header_ http.Header
  7372. }
  7373. // Deidentify: De-identifies potentially sensitive info from a
  7374. // ContentItem.
  7375. // This method has limits on input size and output size.
  7376. // See https://cloud.google.com/dlp/docs/deidentify-sensitive-data
  7377. // to
  7378. // learn more.
  7379. func (r *ProjectsContentService) Deidentify(parent string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall {
  7380. c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7381. c.parent = parent
  7382. c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest
  7383. return c
  7384. }
  7385. // Fields allows partial responses to be retrieved. See
  7386. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7387. // for more information.
  7388. func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall {
  7389. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7390. return c
  7391. }
  7392. // Context sets the context to be used in this call's Do method. Any
  7393. // pending HTTP request will be aborted if the provided context is
  7394. // canceled.
  7395. func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall {
  7396. c.ctx_ = ctx
  7397. return c
  7398. }
  7399. // Header returns an http.Header that can be modified by the caller to
  7400. // add HTTP headers to the request.
  7401. func (c *ProjectsContentDeidentifyCall) Header() http.Header {
  7402. if c.header_ == nil {
  7403. c.header_ = make(http.Header)
  7404. }
  7405. return c.header_
  7406. }
  7407. func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) {
  7408. reqHeaders := make(http.Header)
  7409. for k, v := range c.header_ {
  7410. reqHeaders[k] = v
  7411. }
  7412. reqHeaders.Set("User-Agent", c.s.userAgent())
  7413. var body io.Reader = nil
  7414. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest)
  7415. if err != nil {
  7416. return nil, err
  7417. }
  7418. reqHeaders.Set("Content-Type", "application/json")
  7419. c.urlParams_.Set("alt", alt)
  7420. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify")
  7421. urls += "?" + c.urlParams_.Encode()
  7422. req, _ := http.NewRequest("POST", urls, body)
  7423. req.Header = reqHeaders
  7424. googleapi.Expand(req.URL, map[string]string{
  7425. "parent": c.parent,
  7426. })
  7427. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7428. }
  7429. // Do executes the "dlp.projects.content.deidentify" call.
  7430. // Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error
  7431. // will be non-nil. Any non-2xx status code is an error. Response
  7432. // headers are in either
  7433. // *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or
  7434. // (if a response was returned at all) in
  7435. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7436. // whether the returned error was because http.StatusNotModified was
  7437. // returned.
  7438. func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) {
  7439. gensupport.SetOptions(c.urlParams_, opts...)
  7440. res, err := c.doRequest("json")
  7441. if res != nil && res.StatusCode == http.StatusNotModified {
  7442. if res.Body != nil {
  7443. res.Body.Close()
  7444. }
  7445. return nil, &googleapi.Error{
  7446. Code: res.StatusCode,
  7447. Header: res.Header,
  7448. }
  7449. }
  7450. if err != nil {
  7451. return nil, err
  7452. }
  7453. defer googleapi.CloseBody(res)
  7454. if err := googleapi.CheckResponse(res); err != nil {
  7455. return nil, err
  7456. }
  7457. ret := &GooglePrivacyDlpV2DeidentifyContentResponse{
  7458. ServerResponse: googleapi.ServerResponse{
  7459. Header: res.Header,
  7460. HTTPStatusCode: res.StatusCode,
  7461. },
  7462. }
  7463. target := &ret
  7464. if err := gensupport.DecodeResponse(target, res); err != nil {
  7465. return nil, err
  7466. }
  7467. return ret, nil
  7468. // {
  7469. // "description": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\nSee https://cloud.google.com/dlp/docs/deidentify-sensitive-data to\nlearn more.",
  7470. // "flatPath": "v2/projects/{projectsId}/content:deidentify",
  7471. // "httpMethod": "POST",
  7472. // "id": "dlp.projects.content.deidentify",
  7473. // "parameterOrder": [
  7474. // "parent"
  7475. // ],
  7476. // "parameters": {
  7477. // "parent": {
  7478. // "description": "The parent resource name, for example projects/my-project-id.",
  7479. // "location": "path",
  7480. // "pattern": "^projects/[^/]+$",
  7481. // "required": true,
  7482. // "type": "string"
  7483. // }
  7484. // },
  7485. // "path": "v2/{+parent}/content:deidentify",
  7486. // "request": {
  7487. // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest"
  7488. // },
  7489. // "response": {
  7490. // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse"
  7491. // },
  7492. // "scopes": [
  7493. // "https://www.googleapis.com/auth/cloud-platform"
  7494. // ]
  7495. // }
  7496. }
  7497. // method id "dlp.projects.content.inspect":
  7498. type ProjectsContentInspectCall struct {
  7499. s *Service
  7500. parent string
  7501. googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest
  7502. urlParams_ gensupport.URLParams
  7503. ctx_ context.Context
  7504. header_ http.Header
  7505. }
  7506. // Inspect: Finds potentially sensitive info in content.
  7507. // This method has limits on input size, processing time, and output
  7508. // size.
  7509. //
  7510. // For how to guides, see
  7511. // https://cloud.google.com/dlp/docs/inspecting-images
  7512. // and https://cloud.google.com/dlp/docs/inspecting-text,
  7513. func (r *ProjectsContentService) Inspect(parent string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall {
  7514. c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7515. c.parent = parent
  7516. c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest
  7517. return c
  7518. }
  7519. // Fields allows partial responses to be retrieved. See
  7520. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7521. // for more information.
  7522. func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall {
  7523. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7524. return c
  7525. }
  7526. // Context sets the context to be used in this call's Do method. Any
  7527. // pending HTTP request will be aborted if the provided context is
  7528. // canceled.
  7529. func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall {
  7530. c.ctx_ = ctx
  7531. return c
  7532. }
  7533. // Header returns an http.Header that can be modified by the caller to
  7534. // add HTTP headers to the request.
  7535. func (c *ProjectsContentInspectCall) Header() http.Header {
  7536. if c.header_ == nil {
  7537. c.header_ = make(http.Header)
  7538. }
  7539. return c.header_
  7540. }
  7541. func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) {
  7542. reqHeaders := make(http.Header)
  7543. for k, v := range c.header_ {
  7544. reqHeaders[k] = v
  7545. }
  7546. reqHeaders.Set("User-Agent", c.s.userAgent())
  7547. var body io.Reader = nil
  7548. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest)
  7549. if err != nil {
  7550. return nil, err
  7551. }
  7552. reqHeaders.Set("Content-Type", "application/json")
  7553. c.urlParams_.Set("alt", alt)
  7554. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect")
  7555. urls += "?" + c.urlParams_.Encode()
  7556. req, _ := http.NewRequest("POST", urls, body)
  7557. req.Header = reqHeaders
  7558. googleapi.Expand(req.URL, map[string]string{
  7559. "parent": c.parent,
  7560. })
  7561. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7562. }
  7563. // Do executes the "dlp.projects.content.inspect" call.
  7564. // Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error
  7565. // will be non-nil. Any non-2xx status code is an error. Response
  7566. // headers are in either
  7567. // *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or
  7568. // (if a response was returned at all) in
  7569. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7570. // whether the returned error was because http.StatusNotModified was
  7571. // returned.
  7572. func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) {
  7573. gensupport.SetOptions(c.urlParams_, opts...)
  7574. res, err := c.doRequest("json")
  7575. if res != nil && res.StatusCode == http.StatusNotModified {
  7576. if res.Body != nil {
  7577. res.Body.Close()
  7578. }
  7579. return nil, &googleapi.Error{
  7580. Code: res.StatusCode,
  7581. Header: res.Header,
  7582. }
  7583. }
  7584. if err != nil {
  7585. return nil, err
  7586. }
  7587. defer googleapi.CloseBody(res)
  7588. if err := googleapi.CheckResponse(res); err != nil {
  7589. return nil, err
  7590. }
  7591. ret := &GooglePrivacyDlpV2InspectContentResponse{
  7592. ServerResponse: googleapi.ServerResponse{
  7593. Header: res.Header,
  7594. HTTPStatusCode: res.StatusCode,
  7595. },
  7596. }
  7597. target := &ret
  7598. if err := gensupport.DecodeResponse(target, res); err != nil {
  7599. return nil, err
  7600. }
  7601. return ret, nil
  7602. // {
  7603. // "description": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n\nFor how to guides, see https://cloud.google.com/dlp/docs/inspecting-images\nand https://cloud.google.com/dlp/docs/inspecting-text,",
  7604. // "flatPath": "v2/projects/{projectsId}/content:inspect",
  7605. // "httpMethod": "POST",
  7606. // "id": "dlp.projects.content.inspect",
  7607. // "parameterOrder": [
  7608. // "parent"
  7609. // ],
  7610. // "parameters": {
  7611. // "parent": {
  7612. // "description": "The parent resource name, for example projects/my-project-id.",
  7613. // "location": "path",
  7614. // "pattern": "^projects/[^/]+$",
  7615. // "required": true,
  7616. // "type": "string"
  7617. // }
  7618. // },
  7619. // "path": "v2/{+parent}/content:inspect",
  7620. // "request": {
  7621. // "$ref": "GooglePrivacyDlpV2InspectContentRequest"
  7622. // },
  7623. // "response": {
  7624. // "$ref": "GooglePrivacyDlpV2InspectContentResponse"
  7625. // },
  7626. // "scopes": [
  7627. // "https://www.googleapis.com/auth/cloud-platform"
  7628. // ]
  7629. // }
  7630. }
  7631. // method id "dlp.projects.content.reidentify":
  7632. type ProjectsContentReidentifyCall struct {
  7633. s *Service
  7634. parent string
  7635. googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest
  7636. urlParams_ gensupport.URLParams
  7637. ctx_ context.Context
  7638. header_ http.Header
  7639. }
  7640. // Reidentify: Re-identifies content that has been
  7641. // de-identified.
  7642. // See
  7643. // https://cloud.google.com/dlp/docs/pseudonymization#
  7644. // re-identification_in_free_text_code_example
  7645. // to learn more.
  7646. func (r *ProjectsContentService) Reidentify(parent string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall {
  7647. c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7648. c.parent = parent
  7649. c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest
  7650. return c
  7651. }
  7652. // Fields allows partial responses to be retrieved. See
  7653. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7654. // for more information.
  7655. func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall {
  7656. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7657. return c
  7658. }
  7659. // Context sets the context to be used in this call's Do method. Any
  7660. // pending HTTP request will be aborted if the provided context is
  7661. // canceled.
  7662. func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall {
  7663. c.ctx_ = ctx
  7664. return c
  7665. }
  7666. // Header returns an http.Header that can be modified by the caller to
  7667. // add HTTP headers to the request.
  7668. func (c *ProjectsContentReidentifyCall) Header() http.Header {
  7669. if c.header_ == nil {
  7670. c.header_ = make(http.Header)
  7671. }
  7672. return c.header_
  7673. }
  7674. func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) {
  7675. reqHeaders := make(http.Header)
  7676. for k, v := range c.header_ {
  7677. reqHeaders[k] = v
  7678. }
  7679. reqHeaders.Set("User-Agent", c.s.userAgent())
  7680. var body io.Reader = nil
  7681. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest)
  7682. if err != nil {
  7683. return nil, err
  7684. }
  7685. reqHeaders.Set("Content-Type", "application/json")
  7686. c.urlParams_.Set("alt", alt)
  7687. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify")
  7688. urls += "?" + c.urlParams_.Encode()
  7689. req, _ := http.NewRequest("POST", urls, body)
  7690. req.Header = reqHeaders
  7691. googleapi.Expand(req.URL, map[string]string{
  7692. "parent": c.parent,
  7693. })
  7694. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7695. }
  7696. // Do executes the "dlp.projects.content.reidentify" call.
  7697. // Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error
  7698. // will be non-nil. Any non-2xx status code is an error. Response
  7699. // headers are in either
  7700. // *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or
  7701. // (if a response was returned at all) in
  7702. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7703. // whether the returned error was because http.StatusNotModified was
  7704. // returned.
  7705. func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) {
  7706. gensupport.SetOptions(c.urlParams_, opts...)
  7707. res, err := c.doRequest("json")
  7708. if res != nil && res.StatusCode == http.StatusNotModified {
  7709. if res.Body != nil {
  7710. res.Body.Close()
  7711. }
  7712. return nil, &googleapi.Error{
  7713. Code: res.StatusCode,
  7714. Header: res.Header,
  7715. }
  7716. }
  7717. if err != nil {
  7718. return nil, err
  7719. }
  7720. defer googleapi.CloseBody(res)
  7721. if err := googleapi.CheckResponse(res); err != nil {
  7722. return nil, err
  7723. }
  7724. ret := &GooglePrivacyDlpV2ReidentifyContentResponse{
  7725. ServerResponse: googleapi.ServerResponse{
  7726. Header: res.Header,
  7727. HTTPStatusCode: res.StatusCode,
  7728. },
  7729. }
  7730. target := &ret
  7731. if err := gensupport.DecodeResponse(target, res); err != nil {
  7732. return nil, err
  7733. }
  7734. return ret, nil
  7735. // {
  7736. // "description": "Re-identifies content that has been de-identified.\nSee\nhttps://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example\nto learn more.",
  7737. // "flatPath": "v2/projects/{projectsId}/content:reidentify",
  7738. // "httpMethod": "POST",
  7739. // "id": "dlp.projects.content.reidentify",
  7740. // "parameterOrder": [
  7741. // "parent"
  7742. // ],
  7743. // "parameters": {
  7744. // "parent": {
  7745. // "description": "The parent resource name.",
  7746. // "location": "path",
  7747. // "pattern": "^projects/[^/]+$",
  7748. // "required": true,
  7749. // "type": "string"
  7750. // }
  7751. // },
  7752. // "path": "v2/{+parent}/content:reidentify",
  7753. // "request": {
  7754. // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest"
  7755. // },
  7756. // "response": {
  7757. // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse"
  7758. // },
  7759. // "scopes": [
  7760. // "https://www.googleapis.com/auth/cloud-platform"
  7761. // ]
  7762. // }
  7763. }
  7764. // method id "dlp.projects.deidentifyTemplates.create":
  7765. type ProjectsDeidentifyTemplatesCreateCall struct {
  7766. s *Service
  7767. parent string
  7768. googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
  7769. urlParams_ gensupport.URLParams
  7770. ctx_ context.Context
  7771. header_ http.Header
  7772. }
  7773. // Create: Creates a DeidentifyTemplate for re-using frequently used
  7774. // configuration
  7775. // for de-identifying content, images, and storage.
  7776. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  7777. // learn
  7778. // more.
  7779. func (r *ProjectsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall {
  7780. c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7781. c.parent = parent
  7782. c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest
  7783. return c
  7784. }
  7785. // Fields allows partial responses to be retrieved. See
  7786. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7787. // for more information.
  7788. func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall {
  7789. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7790. return c
  7791. }
  7792. // Context sets the context to be used in this call's Do method. Any
  7793. // pending HTTP request will be aborted if the provided context is
  7794. // canceled.
  7795. func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall {
  7796. c.ctx_ = ctx
  7797. return c
  7798. }
  7799. // Header returns an http.Header that can be modified by the caller to
  7800. // add HTTP headers to the request.
  7801. func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header {
  7802. if c.header_ == nil {
  7803. c.header_ = make(http.Header)
  7804. }
  7805. return c.header_
  7806. }
  7807. func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  7808. reqHeaders := make(http.Header)
  7809. for k, v := range c.header_ {
  7810. reqHeaders[k] = v
  7811. }
  7812. reqHeaders.Set("User-Agent", c.s.userAgent())
  7813. var body io.Reader = nil
  7814. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest)
  7815. if err != nil {
  7816. return nil, err
  7817. }
  7818. reqHeaders.Set("Content-Type", "application/json")
  7819. c.urlParams_.Set("alt", alt)
  7820. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates")
  7821. urls += "?" + c.urlParams_.Encode()
  7822. req, _ := http.NewRequest("POST", urls, body)
  7823. req.Header = reqHeaders
  7824. googleapi.Expand(req.URL, map[string]string{
  7825. "parent": c.parent,
  7826. })
  7827. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7828. }
  7829. // Do executes the "dlp.projects.deidentifyTemplates.create" call.
  7830. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  7831. // non-nil. Any non-2xx status code is an error. Response headers are in
  7832. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  7833. // (if a response was returned at all) in
  7834. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7835. // whether the returned error was because http.StatusNotModified was
  7836. // returned.
  7837. func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  7838. gensupport.SetOptions(c.urlParams_, opts...)
  7839. res, err := c.doRequest("json")
  7840. if res != nil && res.StatusCode == http.StatusNotModified {
  7841. if res.Body != nil {
  7842. res.Body.Close()
  7843. }
  7844. return nil, &googleapi.Error{
  7845. Code: res.StatusCode,
  7846. Header: res.Header,
  7847. }
  7848. }
  7849. if err != nil {
  7850. return nil, err
  7851. }
  7852. defer googleapi.CloseBody(res)
  7853. if err := googleapi.CheckResponse(res); err != nil {
  7854. return nil, err
  7855. }
  7856. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  7857. ServerResponse: googleapi.ServerResponse{
  7858. Header: res.Header,
  7859. HTTPStatusCode: res.StatusCode,
  7860. },
  7861. }
  7862. target := &ret
  7863. if err := gensupport.DecodeResponse(target, res); err != nil {
  7864. return nil, err
  7865. }
  7866. return ret, nil
  7867. // {
  7868. // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration\nfor de-identifying content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  7869. // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates",
  7870. // "httpMethod": "POST",
  7871. // "id": "dlp.projects.deidentifyTemplates.create",
  7872. // "parameterOrder": [
  7873. // "parent"
  7874. // ],
  7875. // "parameters": {
  7876. // "parent": {
  7877. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  7878. // "location": "path",
  7879. // "pattern": "^projects/[^/]+$",
  7880. // "required": true,
  7881. // "type": "string"
  7882. // }
  7883. // },
  7884. // "path": "v2/{+parent}/deidentifyTemplates",
  7885. // "request": {
  7886. // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest"
  7887. // },
  7888. // "response": {
  7889. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  7890. // },
  7891. // "scopes": [
  7892. // "https://www.googleapis.com/auth/cloud-platform"
  7893. // ]
  7894. // }
  7895. }
  7896. // method id "dlp.projects.deidentifyTemplates.delete":
  7897. type ProjectsDeidentifyTemplatesDeleteCall struct {
  7898. s *Service
  7899. name string
  7900. urlParams_ gensupport.URLParams
  7901. ctx_ context.Context
  7902. header_ http.Header
  7903. }
  7904. // Delete: Deletes a DeidentifyTemplate.
  7905. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  7906. // learn
  7907. // more.
  7908. func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall {
  7909. c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7910. c.name = name
  7911. return c
  7912. }
  7913. // Fields allows partial responses to be retrieved. See
  7914. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7915. // for more information.
  7916. func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall {
  7917. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7918. return c
  7919. }
  7920. // Context sets the context to be used in this call's Do method. Any
  7921. // pending HTTP request will be aborted if the provided context is
  7922. // canceled.
  7923. func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall {
  7924. c.ctx_ = ctx
  7925. return c
  7926. }
  7927. // Header returns an http.Header that can be modified by the caller to
  7928. // add HTTP headers to the request.
  7929. func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header {
  7930. if c.header_ == nil {
  7931. c.header_ = make(http.Header)
  7932. }
  7933. return c.header_
  7934. }
  7935. func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7936. reqHeaders := make(http.Header)
  7937. for k, v := range c.header_ {
  7938. reqHeaders[k] = v
  7939. }
  7940. reqHeaders.Set("User-Agent", c.s.userAgent())
  7941. var body io.Reader = nil
  7942. c.urlParams_.Set("alt", alt)
  7943. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7944. urls += "?" + c.urlParams_.Encode()
  7945. req, _ := http.NewRequest("DELETE", urls, body)
  7946. req.Header = reqHeaders
  7947. googleapi.Expand(req.URL, map[string]string{
  7948. "name": c.name,
  7949. })
  7950. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7951. }
  7952. // Do executes the "dlp.projects.deidentifyTemplates.delete" call.
  7953. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  7954. // non-2xx status code is an error. Response headers are in either
  7955. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  7956. // returned at all) in error.(*googleapi.Error).Header. Use
  7957. // googleapi.IsNotModified to check whether the returned error was
  7958. // because http.StatusNotModified was returned.
  7959. func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  7960. gensupport.SetOptions(c.urlParams_, opts...)
  7961. res, err := c.doRequest("json")
  7962. if res != nil && res.StatusCode == http.StatusNotModified {
  7963. if res.Body != nil {
  7964. res.Body.Close()
  7965. }
  7966. return nil, &googleapi.Error{
  7967. Code: res.StatusCode,
  7968. Header: res.Header,
  7969. }
  7970. }
  7971. if err != nil {
  7972. return nil, err
  7973. }
  7974. defer googleapi.CloseBody(res)
  7975. if err := googleapi.CheckResponse(res); err != nil {
  7976. return nil, err
  7977. }
  7978. ret := &GoogleProtobufEmpty{
  7979. ServerResponse: googleapi.ServerResponse{
  7980. Header: res.Header,
  7981. HTTPStatusCode: res.StatusCode,
  7982. },
  7983. }
  7984. target := &ret
  7985. if err := gensupport.DecodeResponse(target, res); err != nil {
  7986. return nil, err
  7987. }
  7988. return ret, nil
  7989. // {
  7990. // "description": "Deletes a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  7991. // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  7992. // "httpMethod": "DELETE",
  7993. // "id": "dlp.projects.deidentifyTemplates.delete",
  7994. // "parameterOrder": [
  7995. // "name"
  7996. // ],
  7997. // "parameters": {
  7998. // "name": {
  7999. // "description": "Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  8000. // "location": "path",
  8001. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  8002. // "required": true,
  8003. // "type": "string"
  8004. // }
  8005. // },
  8006. // "path": "v2/{+name}",
  8007. // "response": {
  8008. // "$ref": "GoogleProtobufEmpty"
  8009. // },
  8010. // "scopes": [
  8011. // "https://www.googleapis.com/auth/cloud-platform"
  8012. // ]
  8013. // }
  8014. }
  8015. // method id "dlp.projects.deidentifyTemplates.get":
  8016. type ProjectsDeidentifyTemplatesGetCall struct {
  8017. s *Service
  8018. name string
  8019. urlParams_ gensupport.URLParams
  8020. ifNoneMatch_ string
  8021. ctx_ context.Context
  8022. header_ http.Header
  8023. }
  8024. // Get: Gets a DeidentifyTemplate.
  8025. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  8026. // learn
  8027. // more.
  8028. func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall {
  8029. c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8030. c.name = name
  8031. return c
  8032. }
  8033. // Fields allows partial responses to be retrieved. See
  8034. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8035. // for more information.
  8036. func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall {
  8037. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8038. return c
  8039. }
  8040. // IfNoneMatch sets the optional parameter which makes the operation
  8041. // fail if the object's ETag matches the given value. This is useful for
  8042. // getting updates only after the object has changed since the last
  8043. // request. Use googleapi.IsNotModified to check whether the response
  8044. // error from Do is the result of In-None-Match.
  8045. func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall {
  8046. c.ifNoneMatch_ = entityTag
  8047. return c
  8048. }
  8049. // Context sets the context to be used in this call's Do method. Any
  8050. // pending HTTP request will be aborted if the provided context is
  8051. // canceled.
  8052. func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall {
  8053. c.ctx_ = ctx
  8054. return c
  8055. }
  8056. // Header returns an http.Header that can be modified by the caller to
  8057. // add HTTP headers to the request.
  8058. func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header {
  8059. if c.header_ == nil {
  8060. c.header_ = make(http.Header)
  8061. }
  8062. return c.header_
  8063. }
  8064. func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  8065. reqHeaders := make(http.Header)
  8066. for k, v := range c.header_ {
  8067. reqHeaders[k] = v
  8068. }
  8069. reqHeaders.Set("User-Agent", c.s.userAgent())
  8070. if c.ifNoneMatch_ != "" {
  8071. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8072. }
  8073. var body io.Reader = nil
  8074. c.urlParams_.Set("alt", alt)
  8075. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8076. urls += "?" + c.urlParams_.Encode()
  8077. req, _ := http.NewRequest("GET", urls, body)
  8078. req.Header = reqHeaders
  8079. googleapi.Expand(req.URL, map[string]string{
  8080. "name": c.name,
  8081. })
  8082. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8083. }
  8084. // Do executes the "dlp.projects.deidentifyTemplates.get" call.
  8085. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  8086. // non-nil. Any non-2xx status code is an error. Response headers are in
  8087. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  8088. // (if a response was returned at all) in
  8089. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8090. // whether the returned error was because http.StatusNotModified was
  8091. // returned.
  8092. func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  8093. gensupport.SetOptions(c.urlParams_, opts...)
  8094. res, err := c.doRequest("json")
  8095. if res != nil && res.StatusCode == http.StatusNotModified {
  8096. if res.Body != nil {
  8097. res.Body.Close()
  8098. }
  8099. return nil, &googleapi.Error{
  8100. Code: res.StatusCode,
  8101. Header: res.Header,
  8102. }
  8103. }
  8104. if err != nil {
  8105. return nil, err
  8106. }
  8107. defer googleapi.CloseBody(res)
  8108. if err := googleapi.CheckResponse(res); err != nil {
  8109. return nil, err
  8110. }
  8111. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  8112. ServerResponse: googleapi.ServerResponse{
  8113. Header: res.Header,
  8114. HTTPStatusCode: res.StatusCode,
  8115. },
  8116. }
  8117. target := &ret
  8118. if err := gensupport.DecodeResponse(target, res); err != nil {
  8119. return nil, err
  8120. }
  8121. return ret, nil
  8122. // {
  8123. // "description": "Gets a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  8124. // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  8125. // "httpMethod": "GET",
  8126. // "id": "dlp.projects.deidentifyTemplates.get",
  8127. // "parameterOrder": [
  8128. // "name"
  8129. // ],
  8130. // "parameters": {
  8131. // "name": {
  8132. // "description": "Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  8133. // "location": "path",
  8134. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  8135. // "required": true,
  8136. // "type": "string"
  8137. // }
  8138. // },
  8139. // "path": "v2/{+name}",
  8140. // "response": {
  8141. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  8142. // },
  8143. // "scopes": [
  8144. // "https://www.googleapis.com/auth/cloud-platform"
  8145. // ]
  8146. // }
  8147. }
  8148. // method id "dlp.projects.deidentifyTemplates.list":
  8149. type ProjectsDeidentifyTemplatesListCall struct {
  8150. s *Service
  8151. parent string
  8152. urlParams_ gensupport.URLParams
  8153. ifNoneMatch_ string
  8154. ctx_ context.Context
  8155. header_ http.Header
  8156. }
  8157. // List: Lists DeidentifyTemplates.
  8158. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  8159. // learn
  8160. // more.
  8161. func (r *ProjectsDeidentifyTemplatesService) List(parent string) *ProjectsDeidentifyTemplatesListCall {
  8162. c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8163. c.parent = parent
  8164. return c
  8165. }
  8166. // PageSize sets the optional parameter "pageSize": Optional size of the
  8167. // page, can be limited by server. If zero server returns
  8168. // a page of max size 100.
  8169. func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall {
  8170. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8171. return c
  8172. }
  8173. // PageToken sets the optional parameter "pageToken": Optional page
  8174. // token to continue retrieval. Comes from previous call
  8175. // to `ListDeidentifyTemplates`.
  8176. func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall {
  8177. c.urlParams_.Set("pageToken", pageToken)
  8178. return c
  8179. }
  8180. // Fields allows partial responses to be retrieved. See
  8181. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8182. // for more information.
  8183. func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall {
  8184. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8185. return c
  8186. }
  8187. // IfNoneMatch sets the optional parameter which makes the operation
  8188. // fail if the object's ETag matches the given value. This is useful for
  8189. // getting updates only after the object has changed since the last
  8190. // request. Use googleapi.IsNotModified to check whether the response
  8191. // error from Do is the result of In-None-Match.
  8192. func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall {
  8193. c.ifNoneMatch_ = entityTag
  8194. return c
  8195. }
  8196. // Context sets the context to be used in this call's Do method. Any
  8197. // pending HTTP request will be aborted if the provided context is
  8198. // canceled.
  8199. func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall {
  8200. c.ctx_ = ctx
  8201. return c
  8202. }
  8203. // Header returns an http.Header that can be modified by the caller to
  8204. // add HTTP headers to the request.
  8205. func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header {
  8206. if c.header_ == nil {
  8207. c.header_ = make(http.Header)
  8208. }
  8209. return c.header_
  8210. }
  8211. func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  8212. reqHeaders := make(http.Header)
  8213. for k, v := range c.header_ {
  8214. reqHeaders[k] = v
  8215. }
  8216. reqHeaders.Set("User-Agent", c.s.userAgent())
  8217. if c.ifNoneMatch_ != "" {
  8218. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8219. }
  8220. var body io.Reader = nil
  8221. c.urlParams_.Set("alt", alt)
  8222. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates")
  8223. urls += "?" + c.urlParams_.Encode()
  8224. req, _ := http.NewRequest("GET", urls, body)
  8225. req.Header = reqHeaders
  8226. googleapi.Expand(req.URL, map[string]string{
  8227. "parent": c.parent,
  8228. })
  8229. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8230. }
  8231. // Do executes the "dlp.projects.deidentifyTemplates.list" call.
  8232. // Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or
  8233. // error will be non-nil. Any non-2xx status code is an error. Response
  8234. // headers are in either
  8235. // *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head
  8236. // er or (if a response was returned at all) in
  8237. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8238. // whether the returned error was because http.StatusNotModified was
  8239. // returned.
  8240. func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) {
  8241. gensupport.SetOptions(c.urlParams_, opts...)
  8242. res, err := c.doRequest("json")
  8243. if res != nil && res.StatusCode == http.StatusNotModified {
  8244. if res.Body != nil {
  8245. res.Body.Close()
  8246. }
  8247. return nil, &googleapi.Error{
  8248. Code: res.StatusCode,
  8249. Header: res.Header,
  8250. }
  8251. }
  8252. if err != nil {
  8253. return nil, err
  8254. }
  8255. defer googleapi.CloseBody(res)
  8256. if err := googleapi.CheckResponse(res); err != nil {
  8257. return nil, err
  8258. }
  8259. ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{
  8260. ServerResponse: googleapi.ServerResponse{
  8261. Header: res.Header,
  8262. HTTPStatusCode: res.StatusCode,
  8263. },
  8264. }
  8265. target := &ret
  8266. if err := gensupport.DecodeResponse(target, res); err != nil {
  8267. return nil, err
  8268. }
  8269. return ret, nil
  8270. // {
  8271. // "description": "Lists DeidentifyTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  8272. // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates",
  8273. // "httpMethod": "GET",
  8274. // "id": "dlp.projects.deidentifyTemplates.list",
  8275. // "parameterOrder": [
  8276. // "parent"
  8277. // ],
  8278. // "parameters": {
  8279. // "pageSize": {
  8280. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  8281. // "format": "int32",
  8282. // "location": "query",
  8283. // "type": "integer"
  8284. // },
  8285. // "pageToken": {
  8286. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.",
  8287. // "location": "query",
  8288. // "type": "string"
  8289. // },
  8290. // "parent": {
  8291. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  8292. // "location": "path",
  8293. // "pattern": "^projects/[^/]+$",
  8294. // "required": true,
  8295. // "type": "string"
  8296. // }
  8297. // },
  8298. // "path": "v2/{+parent}/deidentifyTemplates",
  8299. // "response": {
  8300. // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse"
  8301. // },
  8302. // "scopes": [
  8303. // "https://www.googleapis.com/auth/cloud-platform"
  8304. // ]
  8305. // }
  8306. }
  8307. // Pages invokes f for each page of results.
  8308. // A non-nil error returned from f will halt the iteration.
  8309. // The provided context supersedes any context provided to the Context method.
  8310. func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error {
  8311. c.ctx_ = ctx
  8312. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8313. for {
  8314. x, err := c.Do()
  8315. if err != nil {
  8316. return err
  8317. }
  8318. if err := f(x); err != nil {
  8319. return err
  8320. }
  8321. if x.NextPageToken == "" {
  8322. return nil
  8323. }
  8324. c.PageToken(x.NextPageToken)
  8325. }
  8326. }
  8327. // method id "dlp.projects.deidentifyTemplates.patch":
  8328. type ProjectsDeidentifyTemplatesPatchCall struct {
  8329. s *Service
  8330. name string
  8331. googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest
  8332. urlParams_ gensupport.URLParams
  8333. ctx_ context.Context
  8334. header_ http.Header
  8335. }
  8336. // Patch: Updates the DeidentifyTemplate.
  8337. // See https://cloud.google.com/dlp/docs/creating-templates-deid to
  8338. // learn
  8339. // more.
  8340. func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall {
  8341. c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8342. c.name = name
  8343. c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest
  8344. return c
  8345. }
  8346. // Fields allows partial responses to be retrieved. See
  8347. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8348. // for more information.
  8349. func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall {
  8350. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8351. return c
  8352. }
  8353. // Context sets the context to be used in this call's Do method. Any
  8354. // pending HTTP request will be aborted if the provided context is
  8355. // canceled.
  8356. func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall {
  8357. c.ctx_ = ctx
  8358. return c
  8359. }
  8360. // Header returns an http.Header that can be modified by the caller to
  8361. // add HTTP headers to the request.
  8362. func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header {
  8363. if c.header_ == nil {
  8364. c.header_ = make(http.Header)
  8365. }
  8366. return c.header_
  8367. }
  8368. func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  8369. reqHeaders := make(http.Header)
  8370. for k, v := range c.header_ {
  8371. reqHeaders[k] = v
  8372. }
  8373. reqHeaders.Set("User-Agent", c.s.userAgent())
  8374. var body io.Reader = nil
  8375. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest)
  8376. if err != nil {
  8377. return nil, err
  8378. }
  8379. reqHeaders.Set("Content-Type", "application/json")
  8380. c.urlParams_.Set("alt", alt)
  8381. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8382. urls += "?" + c.urlParams_.Encode()
  8383. req, _ := http.NewRequest("PATCH", urls, body)
  8384. req.Header = reqHeaders
  8385. googleapi.Expand(req.URL, map[string]string{
  8386. "name": c.name,
  8387. })
  8388. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8389. }
  8390. // Do executes the "dlp.projects.deidentifyTemplates.patch" call.
  8391. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be
  8392. // non-nil. Any non-2xx status code is an error. Response headers are in
  8393. // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or
  8394. // (if a response was returned at all) in
  8395. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8396. // whether the returned error was because http.StatusNotModified was
  8397. // returned.
  8398. func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) {
  8399. gensupport.SetOptions(c.urlParams_, opts...)
  8400. res, err := c.doRequest("json")
  8401. if res != nil && res.StatusCode == http.StatusNotModified {
  8402. if res.Body != nil {
  8403. res.Body.Close()
  8404. }
  8405. return nil, &googleapi.Error{
  8406. Code: res.StatusCode,
  8407. Header: res.Header,
  8408. }
  8409. }
  8410. if err != nil {
  8411. return nil, err
  8412. }
  8413. defer googleapi.CloseBody(res)
  8414. if err := googleapi.CheckResponse(res); err != nil {
  8415. return nil, err
  8416. }
  8417. ret := &GooglePrivacyDlpV2DeidentifyTemplate{
  8418. ServerResponse: googleapi.ServerResponse{
  8419. Header: res.Header,
  8420. HTTPStatusCode: res.StatusCode,
  8421. },
  8422. }
  8423. target := &ret
  8424. if err := gensupport.DecodeResponse(target, res); err != nil {
  8425. return nil, err
  8426. }
  8427. return ret, nil
  8428. // {
  8429. // "description": "Updates the DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.",
  8430. // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}",
  8431. // "httpMethod": "PATCH",
  8432. // "id": "dlp.projects.deidentifyTemplates.patch",
  8433. // "parameterOrder": [
  8434. // "name"
  8435. // ],
  8436. // "parameters": {
  8437. // "name": {
  8438. // "description": "Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.",
  8439. // "location": "path",
  8440. // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$",
  8441. // "required": true,
  8442. // "type": "string"
  8443. // }
  8444. // },
  8445. // "path": "v2/{+name}",
  8446. // "request": {
  8447. // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest"
  8448. // },
  8449. // "response": {
  8450. // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate"
  8451. // },
  8452. // "scopes": [
  8453. // "https://www.googleapis.com/auth/cloud-platform"
  8454. // ]
  8455. // }
  8456. }
  8457. // method id "dlp.projects.dlpJobs.cancel":
  8458. type ProjectsDlpJobsCancelCall struct {
  8459. s *Service
  8460. name string
  8461. googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest
  8462. urlParams_ gensupport.URLParams
  8463. ctx_ context.Context
  8464. header_ http.Header
  8465. }
  8466. // Cancel: Starts asynchronous cancellation on a long-running DlpJob.
  8467. // The server
  8468. // makes a best effort to cancel the DlpJob, but success is
  8469. // not
  8470. // guaranteed.
  8471. // See https://cloud.google.com/dlp/docs/inspecting-storage
  8472. // and
  8473. // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn
  8474. // more.
  8475. func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall {
  8476. c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8477. c.name = name
  8478. c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest
  8479. return c
  8480. }
  8481. // Fields allows partial responses to be retrieved. See
  8482. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8483. // for more information.
  8484. func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall {
  8485. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8486. return c
  8487. }
  8488. // Context sets the context to be used in this call's Do method. Any
  8489. // pending HTTP request will be aborted if the provided context is
  8490. // canceled.
  8491. func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall {
  8492. c.ctx_ = ctx
  8493. return c
  8494. }
  8495. // Header returns an http.Header that can be modified by the caller to
  8496. // add HTTP headers to the request.
  8497. func (c *ProjectsDlpJobsCancelCall) Header() http.Header {
  8498. if c.header_ == nil {
  8499. c.header_ = make(http.Header)
  8500. }
  8501. return c.header_
  8502. }
  8503. func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  8504. reqHeaders := make(http.Header)
  8505. for k, v := range c.header_ {
  8506. reqHeaders[k] = v
  8507. }
  8508. reqHeaders.Set("User-Agent", c.s.userAgent())
  8509. var body io.Reader = nil
  8510. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest)
  8511. if err != nil {
  8512. return nil, err
  8513. }
  8514. reqHeaders.Set("Content-Type", "application/json")
  8515. c.urlParams_.Set("alt", alt)
  8516. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
  8517. urls += "?" + c.urlParams_.Encode()
  8518. req, _ := http.NewRequest("POST", urls, body)
  8519. req.Header = reqHeaders
  8520. googleapi.Expand(req.URL, map[string]string{
  8521. "name": c.name,
  8522. })
  8523. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8524. }
  8525. // Do executes the "dlp.projects.dlpJobs.cancel" call.
  8526. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  8527. // non-2xx status code is an error. Response headers are in either
  8528. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  8529. // returned at all) in error.(*googleapi.Error).Header. Use
  8530. // googleapi.IsNotModified to check whether the returned error was
  8531. // because http.StatusNotModified was returned.
  8532. func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  8533. gensupport.SetOptions(c.urlParams_, opts...)
  8534. res, err := c.doRequest("json")
  8535. if res != nil && res.StatusCode == http.StatusNotModified {
  8536. if res.Body != nil {
  8537. res.Body.Close()
  8538. }
  8539. return nil, &googleapi.Error{
  8540. Code: res.StatusCode,
  8541. Header: res.Header,
  8542. }
  8543. }
  8544. if err != nil {
  8545. return nil, err
  8546. }
  8547. defer googleapi.CloseBody(res)
  8548. if err := googleapi.CheckResponse(res); err != nil {
  8549. return nil, err
  8550. }
  8551. ret := &GoogleProtobufEmpty{
  8552. ServerResponse: googleapi.ServerResponse{
  8553. Header: res.Header,
  8554. HTTPStatusCode: res.StatusCode,
  8555. },
  8556. }
  8557. target := &ret
  8558. if err := gensupport.DecodeResponse(target, res); err != nil {
  8559. return nil, err
  8560. }
  8561. return ret, nil
  8562. // {
  8563. // "description": "Starts asynchronous cancellation on a long-running DlpJob. The server\nmakes a best effort to cancel the DlpJob, but success is not\nguaranteed.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
  8564. // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel",
  8565. // "httpMethod": "POST",
  8566. // "id": "dlp.projects.dlpJobs.cancel",
  8567. // "parameterOrder": [
  8568. // "name"
  8569. // ],
  8570. // "parameters": {
  8571. // "name": {
  8572. // "description": "The name of the DlpJob resource to be cancelled.",
  8573. // "location": "path",
  8574. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  8575. // "required": true,
  8576. // "type": "string"
  8577. // }
  8578. // },
  8579. // "path": "v2/{+name}:cancel",
  8580. // "request": {
  8581. // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest"
  8582. // },
  8583. // "response": {
  8584. // "$ref": "GoogleProtobufEmpty"
  8585. // },
  8586. // "scopes": [
  8587. // "https://www.googleapis.com/auth/cloud-platform"
  8588. // ]
  8589. // }
  8590. }
  8591. // method id "dlp.projects.dlpJobs.create":
  8592. type ProjectsDlpJobsCreateCall struct {
  8593. s *Service
  8594. parent string
  8595. googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest
  8596. urlParams_ gensupport.URLParams
  8597. ctx_ context.Context
  8598. header_ http.Header
  8599. }
  8600. // Create: Creates a new job to inspect storage or calculate risk
  8601. // metrics.
  8602. // See https://cloud.google.com/dlp/docs/inspecting-storage
  8603. // and
  8604. // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn
  8605. // more.
  8606. func (r *ProjectsDlpJobsService) Create(parent string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall {
  8607. c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8608. c.parent = parent
  8609. c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest
  8610. return c
  8611. }
  8612. // Fields allows partial responses to be retrieved. See
  8613. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8614. // for more information.
  8615. func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall {
  8616. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8617. return c
  8618. }
  8619. // Context sets the context to be used in this call's Do method. Any
  8620. // pending HTTP request will be aborted if the provided context is
  8621. // canceled.
  8622. func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall {
  8623. c.ctx_ = ctx
  8624. return c
  8625. }
  8626. // Header returns an http.Header that can be modified by the caller to
  8627. // add HTTP headers to the request.
  8628. func (c *ProjectsDlpJobsCreateCall) Header() http.Header {
  8629. if c.header_ == nil {
  8630. c.header_ = make(http.Header)
  8631. }
  8632. return c.header_
  8633. }
  8634. func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  8635. reqHeaders := make(http.Header)
  8636. for k, v := range c.header_ {
  8637. reqHeaders[k] = v
  8638. }
  8639. reqHeaders.Set("User-Agent", c.s.userAgent())
  8640. var body io.Reader = nil
  8641. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest)
  8642. if err != nil {
  8643. return nil, err
  8644. }
  8645. reqHeaders.Set("Content-Type", "application/json")
  8646. c.urlParams_.Set("alt", alt)
  8647. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs")
  8648. urls += "?" + c.urlParams_.Encode()
  8649. req, _ := http.NewRequest("POST", urls, body)
  8650. req.Header = reqHeaders
  8651. googleapi.Expand(req.URL, map[string]string{
  8652. "parent": c.parent,
  8653. })
  8654. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8655. }
  8656. // Do executes the "dlp.projects.dlpJobs.create" call.
  8657. // Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil.
  8658. // Any non-2xx status code is an error. Response headers are in either
  8659. // *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was
  8660. // returned at all) in error.(*googleapi.Error).Header. Use
  8661. // googleapi.IsNotModified to check whether the returned error was
  8662. // because http.StatusNotModified was returned.
  8663. func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) {
  8664. gensupport.SetOptions(c.urlParams_, opts...)
  8665. res, err := c.doRequest("json")
  8666. if res != nil && res.StatusCode == http.StatusNotModified {
  8667. if res.Body != nil {
  8668. res.Body.Close()
  8669. }
  8670. return nil, &googleapi.Error{
  8671. Code: res.StatusCode,
  8672. Header: res.Header,
  8673. }
  8674. }
  8675. if err != nil {
  8676. return nil, err
  8677. }
  8678. defer googleapi.CloseBody(res)
  8679. if err := googleapi.CheckResponse(res); err != nil {
  8680. return nil, err
  8681. }
  8682. ret := &GooglePrivacyDlpV2DlpJob{
  8683. ServerResponse: googleapi.ServerResponse{
  8684. Header: res.Header,
  8685. HTTPStatusCode: res.StatusCode,
  8686. },
  8687. }
  8688. target := &ret
  8689. if err := gensupport.DecodeResponse(target, res); err != nil {
  8690. return nil, err
  8691. }
  8692. return ret, nil
  8693. // {
  8694. // "description": "Creates a new job to inspect storage or calculate risk metrics.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
  8695. // "flatPath": "v2/projects/{projectsId}/dlpJobs",
  8696. // "httpMethod": "POST",
  8697. // "id": "dlp.projects.dlpJobs.create",
  8698. // "parameterOrder": [
  8699. // "parent"
  8700. // ],
  8701. // "parameters": {
  8702. // "parent": {
  8703. // "description": "The parent resource name, for example projects/my-project-id.",
  8704. // "location": "path",
  8705. // "pattern": "^projects/[^/]+$",
  8706. // "required": true,
  8707. // "type": "string"
  8708. // }
  8709. // },
  8710. // "path": "v2/{+parent}/dlpJobs",
  8711. // "request": {
  8712. // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest"
  8713. // },
  8714. // "response": {
  8715. // "$ref": "GooglePrivacyDlpV2DlpJob"
  8716. // },
  8717. // "scopes": [
  8718. // "https://www.googleapis.com/auth/cloud-platform"
  8719. // ]
  8720. // }
  8721. }
  8722. // method id "dlp.projects.dlpJobs.delete":
  8723. type ProjectsDlpJobsDeleteCall struct {
  8724. s *Service
  8725. name string
  8726. urlParams_ gensupport.URLParams
  8727. ctx_ context.Context
  8728. header_ http.Header
  8729. }
  8730. // Delete: Deletes a long-running DlpJob. This method indicates that the
  8731. // client is
  8732. // no longer interested in the DlpJob result. The job will be cancelled
  8733. // if
  8734. // possible.
  8735. // See https://cloud.google.com/dlp/docs/inspecting-storage
  8736. // and
  8737. // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn
  8738. // more.
  8739. func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall {
  8740. c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8741. c.name = name
  8742. return c
  8743. }
  8744. // Fields allows partial responses to be retrieved. See
  8745. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8746. // for more information.
  8747. func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall {
  8748. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8749. return c
  8750. }
  8751. // Context sets the context to be used in this call's Do method. Any
  8752. // pending HTTP request will be aborted if the provided context is
  8753. // canceled.
  8754. func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall {
  8755. c.ctx_ = ctx
  8756. return c
  8757. }
  8758. // Header returns an http.Header that can be modified by the caller to
  8759. // add HTTP headers to the request.
  8760. func (c *ProjectsDlpJobsDeleteCall) Header() http.Header {
  8761. if c.header_ == nil {
  8762. c.header_ = make(http.Header)
  8763. }
  8764. return c.header_
  8765. }
  8766. func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8767. reqHeaders := make(http.Header)
  8768. for k, v := range c.header_ {
  8769. reqHeaders[k] = v
  8770. }
  8771. reqHeaders.Set("User-Agent", c.s.userAgent())
  8772. var body io.Reader = nil
  8773. c.urlParams_.Set("alt", alt)
  8774. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8775. urls += "?" + c.urlParams_.Encode()
  8776. req, _ := http.NewRequest("DELETE", urls, body)
  8777. req.Header = reqHeaders
  8778. googleapi.Expand(req.URL, map[string]string{
  8779. "name": c.name,
  8780. })
  8781. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8782. }
  8783. // Do executes the "dlp.projects.dlpJobs.delete" call.
  8784. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  8785. // non-2xx status code is an error. Response headers are in either
  8786. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  8787. // returned at all) in error.(*googleapi.Error).Header. Use
  8788. // googleapi.IsNotModified to check whether the returned error was
  8789. // because http.StatusNotModified was returned.
  8790. func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  8791. gensupport.SetOptions(c.urlParams_, opts...)
  8792. res, err := c.doRequest("json")
  8793. if res != nil && res.StatusCode == http.StatusNotModified {
  8794. if res.Body != nil {
  8795. res.Body.Close()
  8796. }
  8797. return nil, &googleapi.Error{
  8798. Code: res.StatusCode,
  8799. Header: res.Header,
  8800. }
  8801. }
  8802. if err != nil {
  8803. return nil, err
  8804. }
  8805. defer googleapi.CloseBody(res)
  8806. if err := googleapi.CheckResponse(res); err != nil {
  8807. return nil, err
  8808. }
  8809. ret := &GoogleProtobufEmpty{
  8810. ServerResponse: googleapi.ServerResponse{
  8811. Header: res.Header,
  8812. HTTPStatusCode: res.StatusCode,
  8813. },
  8814. }
  8815. target := &ret
  8816. if err := gensupport.DecodeResponse(target, res); err != nil {
  8817. return nil, err
  8818. }
  8819. return ret, nil
  8820. // {
  8821. // "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.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
  8822. // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}",
  8823. // "httpMethod": "DELETE",
  8824. // "id": "dlp.projects.dlpJobs.delete",
  8825. // "parameterOrder": [
  8826. // "name"
  8827. // ],
  8828. // "parameters": {
  8829. // "name": {
  8830. // "description": "The name of the DlpJob resource to be deleted.",
  8831. // "location": "path",
  8832. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  8833. // "required": true,
  8834. // "type": "string"
  8835. // }
  8836. // },
  8837. // "path": "v2/{+name}",
  8838. // "response": {
  8839. // "$ref": "GoogleProtobufEmpty"
  8840. // },
  8841. // "scopes": [
  8842. // "https://www.googleapis.com/auth/cloud-platform"
  8843. // ]
  8844. // }
  8845. }
  8846. // method id "dlp.projects.dlpJobs.get":
  8847. type ProjectsDlpJobsGetCall struct {
  8848. s *Service
  8849. name string
  8850. urlParams_ gensupport.URLParams
  8851. ifNoneMatch_ string
  8852. ctx_ context.Context
  8853. header_ http.Header
  8854. }
  8855. // Get: Gets the latest state of a long-running DlpJob.
  8856. // See https://cloud.google.com/dlp/docs/inspecting-storage
  8857. // and
  8858. // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn
  8859. // more.
  8860. func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall {
  8861. c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8862. c.name = name
  8863. return c
  8864. }
  8865. // Fields allows partial responses to be retrieved. See
  8866. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8867. // for more information.
  8868. func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall {
  8869. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8870. return c
  8871. }
  8872. // IfNoneMatch sets the optional parameter which makes the operation
  8873. // fail if the object's ETag matches the given value. This is useful for
  8874. // getting updates only after the object has changed since the last
  8875. // request. Use googleapi.IsNotModified to check whether the response
  8876. // error from Do is the result of In-None-Match.
  8877. func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall {
  8878. c.ifNoneMatch_ = entityTag
  8879. return c
  8880. }
  8881. // Context sets the context to be used in this call's Do method. Any
  8882. // pending HTTP request will be aborted if the provided context is
  8883. // canceled.
  8884. func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall {
  8885. c.ctx_ = ctx
  8886. return c
  8887. }
  8888. // Header returns an http.Header that can be modified by the caller to
  8889. // add HTTP headers to the request.
  8890. func (c *ProjectsDlpJobsGetCall) Header() http.Header {
  8891. if c.header_ == nil {
  8892. c.header_ = make(http.Header)
  8893. }
  8894. return c.header_
  8895. }
  8896. func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) {
  8897. reqHeaders := make(http.Header)
  8898. for k, v := range c.header_ {
  8899. reqHeaders[k] = v
  8900. }
  8901. reqHeaders.Set("User-Agent", c.s.userAgent())
  8902. if c.ifNoneMatch_ != "" {
  8903. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8904. }
  8905. var body io.Reader = nil
  8906. c.urlParams_.Set("alt", alt)
  8907. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8908. urls += "?" + c.urlParams_.Encode()
  8909. req, _ := http.NewRequest("GET", urls, body)
  8910. req.Header = reqHeaders
  8911. googleapi.Expand(req.URL, map[string]string{
  8912. "name": c.name,
  8913. })
  8914. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8915. }
  8916. // Do executes the "dlp.projects.dlpJobs.get" call.
  8917. // Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil.
  8918. // Any non-2xx status code is an error. Response headers are in either
  8919. // *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was
  8920. // returned at all) in error.(*googleapi.Error).Header. Use
  8921. // googleapi.IsNotModified to check whether the returned error was
  8922. // because http.StatusNotModified was returned.
  8923. func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) {
  8924. gensupport.SetOptions(c.urlParams_, opts...)
  8925. res, err := c.doRequest("json")
  8926. if res != nil && res.StatusCode == http.StatusNotModified {
  8927. if res.Body != nil {
  8928. res.Body.Close()
  8929. }
  8930. return nil, &googleapi.Error{
  8931. Code: res.StatusCode,
  8932. Header: res.Header,
  8933. }
  8934. }
  8935. if err != nil {
  8936. return nil, err
  8937. }
  8938. defer googleapi.CloseBody(res)
  8939. if err := googleapi.CheckResponse(res); err != nil {
  8940. return nil, err
  8941. }
  8942. ret := &GooglePrivacyDlpV2DlpJob{
  8943. ServerResponse: googleapi.ServerResponse{
  8944. Header: res.Header,
  8945. HTTPStatusCode: res.StatusCode,
  8946. },
  8947. }
  8948. target := &ret
  8949. if err := gensupport.DecodeResponse(target, res); err != nil {
  8950. return nil, err
  8951. }
  8952. return ret, nil
  8953. // {
  8954. // "description": "Gets the latest state of a long-running DlpJob.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
  8955. // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}",
  8956. // "httpMethod": "GET",
  8957. // "id": "dlp.projects.dlpJobs.get",
  8958. // "parameterOrder": [
  8959. // "name"
  8960. // ],
  8961. // "parameters": {
  8962. // "name": {
  8963. // "description": "The name of the DlpJob resource.",
  8964. // "location": "path",
  8965. // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$",
  8966. // "required": true,
  8967. // "type": "string"
  8968. // }
  8969. // },
  8970. // "path": "v2/{+name}",
  8971. // "response": {
  8972. // "$ref": "GooglePrivacyDlpV2DlpJob"
  8973. // },
  8974. // "scopes": [
  8975. // "https://www.googleapis.com/auth/cloud-platform"
  8976. // ]
  8977. // }
  8978. }
  8979. // method id "dlp.projects.dlpJobs.list":
  8980. type ProjectsDlpJobsListCall struct {
  8981. s *Service
  8982. parent string
  8983. urlParams_ gensupport.URLParams
  8984. ifNoneMatch_ string
  8985. ctx_ context.Context
  8986. header_ http.Header
  8987. }
  8988. // List: Lists DlpJobs that match the specified filter in the
  8989. // request.
  8990. // See https://cloud.google.com/dlp/docs/inspecting-storage
  8991. // and
  8992. // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn
  8993. // more.
  8994. func (r *ProjectsDlpJobsService) List(parent string) *ProjectsDlpJobsListCall {
  8995. c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8996. c.parent = parent
  8997. return c
  8998. }
  8999. // Filter sets the optional parameter "filter": Allows
  9000. // filtering.
  9001. //
  9002. // Supported syntax:
  9003. //
  9004. // * Filter expressions are made up of one or more restrictions.
  9005. // * Restrictions can be combined by `AND` or `OR` logical operators.
  9006. // A
  9007. // sequence of restrictions implicitly uses `AND`.
  9008. // * A restriction has the form of `<field> <operator> <value>`.
  9009. // * Supported fields/values for inspect jobs:
  9010. // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
  9011. // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
  9012. // - `trigger_name` - The resource name of the trigger that created
  9013. // job.
  9014. // * Supported fields for risk analysis jobs:
  9015. // - `state` - RUNNING|CANCELED|FINISHED|FAILED
  9016. // * The operator must be `=` or `!=`.
  9017. //
  9018. // Examples:
  9019. //
  9020. // * inspected_storage = cloud_storage AND state = done
  9021. // * inspected_storage = cloud_storage OR inspected_storage = bigquery
  9022. // * inspected_storage = cloud_storage AND (state = done OR state =
  9023. // canceled)
  9024. //
  9025. // The length of this field should be no more than 500 characters.
  9026. func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall {
  9027. c.urlParams_.Set("filter", filter)
  9028. return c
  9029. }
  9030. // PageSize sets the optional parameter "pageSize": The standard list
  9031. // page size.
  9032. func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall {
  9033. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9034. return c
  9035. }
  9036. // PageToken sets the optional parameter "pageToken": The standard list
  9037. // page token.
  9038. func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall {
  9039. c.urlParams_.Set("pageToken", pageToken)
  9040. return c
  9041. }
  9042. // Type sets the optional parameter "type": The type of job. Defaults to
  9043. // `DlpJobType.INSPECT`
  9044. //
  9045. // Possible values:
  9046. // "DLP_JOB_TYPE_UNSPECIFIED"
  9047. // "INSPECT_JOB"
  9048. // "RISK_ANALYSIS_JOB"
  9049. func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall {
  9050. c.urlParams_.Set("type", type_)
  9051. return c
  9052. }
  9053. // Fields allows partial responses to be retrieved. See
  9054. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9055. // for more information.
  9056. func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall {
  9057. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9058. return c
  9059. }
  9060. // IfNoneMatch sets the optional parameter which makes the operation
  9061. // fail if the object's ETag matches the given value. This is useful for
  9062. // getting updates only after the object has changed since the last
  9063. // request. Use googleapi.IsNotModified to check whether the response
  9064. // error from Do is the result of In-None-Match.
  9065. func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall {
  9066. c.ifNoneMatch_ = entityTag
  9067. return c
  9068. }
  9069. // Context sets the context to be used in this call's Do method. Any
  9070. // pending HTTP request will be aborted if the provided context is
  9071. // canceled.
  9072. func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall {
  9073. c.ctx_ = ctx
  9074. return c
  9075. }
  9076. // Header returns an http.Header that can be modified by the caller to
  9077. // add HTTP headers to the request.
  9078. func (c *ProjectsDlpJobsListCall) Header() http.Header {
  9079. if c.header_ == nil {
  9080. c.header_ = make(http.Header)
  9081. }
  9082. return c.header_
  9083. }
  9084. func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) {
  9085. reqHeaders := make(http.Header)
  9086. for k, v := range c.header_ {
  9087. reqHeaders[k] = v
  9088. }
  9089. reqHeaders.Set("User-Agent", c.s.userAgent())
  9090. if c.ifNoneMatch_ != "" {
  9091. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9092. }
  9093. var body io.Reader = nil
  9094. c.urlParams_.Set("alt", alt)
  9095. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs")
  9096. urls += "?" + c.urlParams_.Encode()
  9097. req, _ := http.NewRequest("GET", urls, body)
  9098. req.Header = reqHeaders
  9099. googleapi.Expand(req.URL, map[string]string{
  9100. "parent": c.parent,
  9101. })
  9102. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9103. }
  9104. // Do executes the "dlp.projects.dlpJobs.list" call.
  9105. // Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will
  9106. // be non-nil. Any non-2xx status code is an error. Response headers are
  9107. // in either
  9108. // *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a
  9109. // response was returned at all) in error.(*googleapi.Error).Header. Use
  9110. // googleapi.IsNotModified to check whether the returned error was
  9111. // because http.StatusNotModified was returned.
  9112. func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) {
  9113. gensupport.SetOptions(c.urlParams_, opts...)
  9114. res, err := c.doRequest("json")
  9115. if res != nil && res.StatusCode == http.StatusNotModified {
  9116. if res.Body != nil {
  9117. res.Body.Close()
  9118. }
  9119. return nil, &googleapi.Error{
  9120. Code: res.StatusCode,
  9121. Header: res.Header,
  9122. }
  9123. }
  9124. if err != nil {
  9125. return nil, err
  9126. }
  9127. defer googleapi.CloseBody(res)
  9128. if err := googleapi.CheckResponse(res); err != nil {
  9129. return nil, err
  9130. }
  9131. ret := &GooglePrivacyDlpV2ListDlpJobsResponse{
  9132. ServerResponse: googleapi.ServerResponse{
  9133. Header: res.Header,
  9134. HTTPStatusCode: res.StatusCode,
  9135. },
  9136. }
  9137. target := &ret
  9138. if err := gensupport.DecodeResponse(target, res); err != nil {
  9139. return nil, err
  9140. }
  9141. return ret, nil
  9142. // {
  9143. // "description": "Lists DlpJobs that match the specified filter in the request.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
  9144. // "flatPath": "v2/projects/{projectsId}/dlpJobs",
  9145. // "httpMethod": "GET",
  9146. // "id": "dlp.projects.dlpJobs.list",
  9147. // "parameterOrder": [
  9148. // "parent"
  9149. // ],
  9150. // "parameters": {
  9151. // "filter": {
  9152. // "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.",
  9153. // "location": "query",
  9154. // "type": "string"
  9155. // },
  9156. // "pageSize": {
  9157. // "description": "The standard list page size.",
  9158. // "format": "int32",
  9159. // "location": "query",
  9160. // "type": "integer"
  9161. // },
  9162. // "pageToken": {
  9163. // "description": "The standard list page token.",
  9164. // "location": "query",
  9165. // "type": "string"
  9166. // },
  9167. // "parent": {
  9168. // "description": "The parent resource name, for example projects/my-project-id.",
  9169. // "location": "path",
  9170. // "pattern": "^projects/[^/]+$",
  9171. // "required": true,
  9172. // "type": "string"
  9173. // },
  9174. // "type": {
  9175. // "description": "The type of job. Defaults to `DlpJobType.INSPECT`",
  9176. // "enum": [
  9177. // "DLP_JOB_TYPE_UNSPECIFIED",
  9178. // "INSPECT_JOB",
  9179. // "RISK_ANALYSIS_JOB"
  9180. // ],
  9181. // "location": "query",
  9182. // "type": "string"
  9183. // }
  9184. // },
  9185. // "path": "v2/{+parent}/dlpJobs",
  9186. // "response": {
  9187. // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse"
  9188. // },
  9189. // "scopes": [
  9190. // "https://www.googleapis.com/auth/cloud-platform"
  9191. // ]
  9192. // }
  9193. }
  9194. // Pages invokes f for each page of results.
  9195. // A non-nil error returned from f will halt the iteration.
  9196. // The provided context supersedes any context provided to the Context method.
  9197. func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error {
  9198. c.ctx_ = ctx
  9199. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9200. for {
  9201. x, err := c.Do()
  9202. if err != nil {
  9203. return err
  9204. }
  9205. if err := f(x); err != nil {
  9206. return err
  9207. }
  9208. if x.NextPageToken == "" {
  9209. return nil
  9210. }
  9211. c.PageToken(x.NextPageToken)
  9212. }
  9213. }
  9214. // method id "dlp.projects.image.redact":
  9215. type ProjectsImageRedactCall struct {
  9216. s *Service
  9217. parent string
  9218. googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest
  9219. urlParams_ gensupport.URLParams
  9220. ctx_ context.Context
  9221. header_ http.Header
  9222. }
  9223. // Redact: Redacts potentially sensitive info from an image.
  9224. // This method has limits on input size, processing time, and output
  9225. // size.
  9226. // See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images
  9227. // to
  9228. // learn more.
  9229. func (r *ProjectsImageService) Redact(parent string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall {
  9230. c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9231. c.parent = parent
  9232. c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest
  9233. return c
  9234. }
  9235. // Fields allows partial responses to be retrieved. See
  9236. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9237. // for more information.
  9238. func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall {
  9239. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9240. return c
  9241. }
  9242. // Context sets the context to be used in this call's Do method. Any
  9243. // pending HTTP request will be aborted if the provided context is
  9244. // canceled.
  9245. func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall {
  9246. c.ctx_ = ctx
  9247. return c
  9248. }
  9249. // Header returns an http.Header that can be modified by the caller to
  9250. // add HTTP headers to the request.
  9251. func (c *ProjectsImageRedactCall) Header() http.Header {
  9252. if c.header_ == nil {
  9253. c.header_ = make(http.Header)
  9254. }
  9255. return c.header_
  9256. }
  9257. func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) {
  9258. reqHeaders := make(http.Header)
  9259. for k, v := range c.header_ {
  9260. reqHeaders[k] = v
  9261. }
  9262. reqHeaders.Set("User-Agent", c.s.userAgent())
  9263. var body io.Reader = nil
  9264. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest)
  9265. if err != nil {
  9266. return nil, err
  9267. }
  9268. reqHeaders.Set("Content-Type", "application/json")
  9269. c.urlParams_.Set("alt", alt)
  9270. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact")
  9271. urls += "?" + c.urlParams_.Encode()
  9272. req, _ := http.NewRequest("POST", urls, body)
  9273. req.Header = reqHeaders
  9274. googleapi.Expand(req.URL, map[string]string{
  9275. "parent": c.parent,
  9276. })
  9277. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9278. }
  9279. // Do executes the "dlp.projects.image.redact" call.
  9280. // Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will
  9281. // be non-nil. Any non-2xx status code is an error. Response headers are
  9282. // in either
  9283. // *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a
  9284. // response was returned at all) in error.(*googleapi.Error).Header. Use
  9285. // googleapi.IsNotModified to check whether the returned error was
  9286. // because http.StatusNotModified was returned.
  9287. func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) {
  9288. gensupport.SetOptions(c.urlParams_, opts...)
  9289. res, err := c.doRequest("json")
  9290. if res != nil && res.StatusCode == http.StatusNotModified {
  9291. if res.Body != nil {
  9292. res.Body.Close()
  9293. }
  9294. return nil, &googleapi.Error{
  9295. Code: res.StatusCode,
  9296. Header: res.Header,
  9297. }
  9298. }
  9299. if err != nil {
  9300. return nil, err
  9301. }
  9302. defer googleapi.CloseBody(res)
  9303. if err := googleapi.CheckResponse(res); err != nil {
  9304. return nil, err
  9305. }
  9306. ret := &GooglePrivacyDlpV2RedactImageResponse{
  9307. ServerResponse: googleapi.ServerResponse{
  9308. Header: res.Header,
  9309. HTTPStatusCode: res.StatusCode,
  9310. },
  9311. }
  9312. target := &ret
  9313. if err := gensupport.DecodeResponse(target, res); err != nil {
  9314. return nil, err
  9315. }
  9316. return ret, nil
  9317. // {
  9318. // "description": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\nSee https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to\nlearn more.",
  9319. // "flatPath": "v2/projects/{projectsId}/image:redact",
  9320. // "httpMethod": "POST",
  9321. // "id": "dlp.projects.image.redact",
  9322. // "parameterOrder": [
  9323. // "parent"
  9324. // ],
  9325. // "parameters": {
  9326. // "parent": {
  9327. // "description": "The parent resource name, for example projects/my-project-id.",
  9328. // "location": "path",
  9329. // "pattern": "^projects/[^/]+$",
  9330. // "required": true,
  9331. // "type": "string"
  9332. // }
  9333. // },
  9334. // "path": "v2/{+parent}/image:redact",
  9335. // "request": {
  9336. // "$ref": "GooglePrivacyDlpV2RedactImageRequest"
  9337. // },
  9338. // "response": {
  9339. // "$ref": "GooglePrivacyDlpV2RedactImageResponse"
  9340. // },
  9341. // "scopes": [
  9342. // "https://www.googleapis.com/auth/cloud-platform"
  9343. // ]
  9344. // }
  9345. }
  9346. // method id "dlp.projects.inspectTemplates.create":
  9347. type ProjectsInspectTemplatesCreateCall struct {
  9348. s *Service
  9349. parent string
  9350. googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest
  9351. urlParams_ gensupport.URLParams
  9352. ctx_ context.Context
  9353. header_ http.Header
  9354. }
  9355. // Create: Creates an InspectTemplate for re-using frequently used
  9356. // configuration
  9357. // for inspecting content, images, and storage.
  9358. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  9359. // more.
  9360. func (r *ProjectsInspectTemplatesService) Create(parent string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall {
  9361. c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9362. c.parent = parent
  9363. c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest
  9364. return c
  9365. }
  9366. // Fields allows partial responses to be retrieved. See
  9367. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9368. // for more information.
  9369. func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall {
  9370. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9371. return c
  9372. }
  9373. // Context sets the context to be used in this call's Do method. Any
  9374. // pending HTTP request will be aborted if the provided context is
  9375. // canceled.
  9376. func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall {
  9377. c.ctx_ = ctx
  9378. return c
  9379. }
  9380. // Header returns an http.Header that can be modified by the caller to
  9381. // add HTTP headers to the request.
  9382. func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header {
  9383. if c.header_ == nil {
  9384. c.header_ = make(http.Header)
  9385. }
  9386. return c.header_
  9387. }
  9388. func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  9389. reqHeaders := make(http.Header)
  9390. for k, v := range c.header_ {
  9391. reqHeaders[k] = v
  9392. }
  9393. reqHeaders.Set("User-Agent", c.s.userAgent())
  9394. var body io.Reader = nil
  9395. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest)
  9396. if err != nil {
  9397. return nil, err
  9398. }
  9399. reqHeaders.Set("Content-Type", "application/json")
  9400. c.urlParams_.Set("alt", alt)
  9401. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates")
  9402. urls += "?" + c.urlParams_.Encode()
  9403. req, _ := http.NewRequest("POST", urls, body)
  9404. req.Header = reqHeaders
  9405. googleapi.Expand(req.URL, map[string]string{
  9406. "parent": c.parent,
  9407. })
  9408. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9409. }
  9410. // Do executes the "dlp.projects.inspectTemplates.create" call.
  9411. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  9412. // non-nil. Any non-2xx status code is an error. Response headers are in
  9413. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  9414. // (if a response was returned at all) in
  9415. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9416. // whether the returned error was because http.StatusNotModified was
  9417. // returned.
  9418. func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  9419. gensupport.SetOptions(c.urlParams_, opts...)
  9420. res, err := c.doRequest("json")
  9421. if res != nil && res.StatusCode == http.StatusNotModified {
  9422. if res.Body != nil {
  9423. res.Body.Close()
  9424. }
  9425. return nil, &googleapi.Error{
  9426. Code: res.StatusCode,
  9427. Header: res.Header,
  9428. }
  9429. }
  9430. if err != nil {
  9431. return nil, err
  9432. }
  9433. defer googleapi.CloseBody(res)
  9434. if err := googleapi.CheckResponse(res); err != nil {
  9435. return nil, err
  9436. }
  9437. ret := &GooglePrivacyDlpV2InspectTemplate{
  9438. ServerResponse: googleapi.ServerResponse{
  9439. Header: res.Header,
  9440. HTTPStatusCode: res.StatusCode,
  9441. },
  9442. }
  9443. target := &ret
  9444. if err := gensupport.DecodeResponse(target, res); err != nil {
  9445. return nil, err
  9446. }
  9447. return ret, nil
  9448. // {
  9449. // "description": "Creates an InspectTemplate for re-using frequently used configuration\nfor inspecting content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  9450. // "flatPath": "v2/projects/{projectsId}/inspectTemplates",
  9451. // "httpMethod": "POST",
  9452. // "id": "dlp.projects.inspectTemplates.create",
  9453. // "parameterOrder": [
  9454. // "parent"
  9455. // ],
  9456. // "parameters": {
  9457. // "parent": {
  9458. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  9459. // "location": "path",
  9460. // "pattern": "^projects/[^/]+$",
  9461. // "required": true,
  9462. // "type": "string"
  9463. // }
  9464. // },
  9465. // "path": "v2/{+parent}/inspectTemplates",
  9466. // "request": {
  9467. // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest"
  9468. // },
  9469. // "response": {
  9470. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  9471. // },
  9472. // "scopes": [
  9473. // "https://www.googleapis.com/auth/cloud-platform"
  9474. // ]
  9475. // }
  9476. }
  9477. // method id "dlp.projects.inspectTemplates.delete":
  9478. type ProjectsInspectTemplatesDeleteCall struct {
  9479. s *Service
  9480. name string
  9481. urlParams_ gensupport.URLParams
  9482. ctx_ context.Context
  9483. header_ http.Header
  9484. }
  9485. // Delete: Deletes an InspectTemplate.
  9486. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  9487. // more.
  9488. func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall {
  9489. c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9490. c.name = name
  9491. return c
  9492. }
  9493. // Fields allows partial responses to be retrieved. See
  9494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9495. // for more information.
  9496. func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall {
  9497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9498. return c
  9499. }
  9500. // Context sets the context to be used in this call's Do method. Any
  9501. // pending HTTP request will be aborted if the provided context is
  9502. // canceled.
  9503. func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall {
  9504. c.ctx_ = ctx
  9505. return c
  9506. }
  9507. // Header returns an http.Header that can be modified by the caller to
  9508. // add HTTP headers to the request.
  9509. func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header {
  9510. if c.header_ == nil {
  9511. c.header_ = make(http.Header)
  9512. }
  9513. return c.header_
  9514. }
  9515. func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9516. reqHeaders := make(http.Header)
  9517. for k, v := range c.header_ {
  9518. reqHeaders[k] = v
  9519. }
  9520. reqHeaders.Set("User-Agent", c.s.userAgent())
  9521. var body io.Reader = nil
  9522. c.urlParams_.Set("alt", alt)
  9523. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9524. urls += "?" + c.urlParams_.Encode()
  9525. req, _ := http.NewRequest("DELETE", urls, body)
  9526. req.Header = reqHeaders
  9527. googleapi.Expand(req.URL, map[string]string{
  9528. "name": c.name,
  9529. })
  9530. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9531. }
  9532. // Do executes the "dlp.projects.inspectTemplates.delete" call.
  9533. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  9534. // non-2xx status code is an error. Response headers are in either
  9535. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  9536. // returned at all) in error.(*googleapi.Error).Header. Use
  9537. // googleapi.IsNotModified to check whether the returned error was
  9538. // because http.StatusNotModified was returned.
  9539. func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  9540. gensupport.SetOptions(c.urlParams_, opts...)
  9541. res, err := c.doRequest("json")
  9542. if res != nil && res.StatusCode == http.StatusNotModified {
  9543. if res.Body != nil {
  9544. res.Body.Close()
  9545. }
  9546. return nil, &googleapi.Error{
  9547. Code: res.StatusCode,
  9548. Header: res.Header,
  9549. }
  9550. }
  9551. if err != nil {
  9552. return nil, err
  9553. }
  9554. defer googleapi.CloseBody(res)
  9555. if err := googleapi.CheckResponse(res); err != nil {
  9556. return nil, err
  9557. }
  9558. ret := &GoogleProtobufEmpty{
  9559. ServerResponse: googleapi.ServerResponse{
  9560. Header: res.Header,
  9561. HTTPStatusCode: res.StatusCode,
  9562. },
  9563. }
  9564. target := &ret
  9565. if err := gensupport.DecodeResponse(target, res); err != nil {
  9566. return nil, err
  9567. }
  9568. return ret, nil
  9569. // {
  9570. // "description": "Deletes an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  9571. // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  9572. // "httpMethod": "DELETE",
  9573. // "id": "dlp.projects.inspectTemplates.delete",
  9574. // "parameterOrder": [
  9575. // "name"
  9576. // ],
  9577. // "parameters": {
  9578. // "name": {
  9579. // "description": "Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  9580. // "location": "path",
  9581. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  9582. // "required": true,
  9583. // "type": "string"
  9584. // }
  9585. // },
  9586. // "path": "v2/{+name}",
  9587. // "response": {
  9588. // "$ref": "GoogleProtobufEmpty"
  9589. // },
  9590. // "scopes": [
  9591. // "https://www.googleapis.com/auth/cloud-platform"
  9592. // ]
  9593. // }
  9594. }
  9595. // method id "dlp.projects.inspectTemplates.get":
  9596. type ProjectsInspectTemplatesGetCall struct {
  9597. s *Service
  9598. name string
  9599. urlParams_ gensupport.URLParams
  9600. ifNoneMatch_ string
  9601. ctx_ context.Context
  9602. header_ http.Header
  9603. }
  9604. // Get: Gets an InspectTemplate.
  9605. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  9606. // more.
  9607. func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall {
  9608. c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9609. c.name = name
  9610. return c
  9611. }
  9612. // Fields allows partial responses to be retrieved. See
  9613. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9614. // for more information.
  9615. func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall {
  9616. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9617. return c
  9618. }
  9619. // IfNoneMatch sets the optional parameter which makes the operation
  9620. // fail if the object's ETag matches the given value. This is useful for
  9621. // getting updates only after the object has changed since the last
  9622. // request. Use googleapi.IsNotModified to check whether the response
  9623. // error from Do is the result of In-None-Match.
  9624. func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall {
  9625. c.ifNoneMatch_ = entityTag
  9626. return c
  9627. }
  9628. // Context sets the context to be used in this call's Do method. Any
  9629. // pending HTTP request will be aborted if the provided context is
  9630. // canceled.
  9631. func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall {
  9632. c.ctx_ = ctx
  9633. return c
  9634. }
  9635. // Header returns an http.Header that can be modified by the caller to
  9636. // add HTTP headers to the request.
  9637. func (c *ProjectsInspectTemplatesGetCall) Header() http.Header {
  9638. if c.header_ == nil {
  9639. c.header_ = make(http.Header)
  9640. }
  9641. return c.header_
  9642. }
  9643. func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  9644. reqHeaders := make(http.Header)
  9645. for k, v := range c.header_ {
  9646. reqHeaders[k] = v
  9647. }
  9648. reqHeaders.Set("User-Agent", c.s.userAgent())
  9649. if c.ifNoneMatch_ != "" {
  9650. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9651. }
  9652. var body io.Reader = nil
  9653. c.urlParams_.Set("alt", alt)
  9654. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9655. urls += "?" + c.urlParams_.Encode()
  9656. req, _ := http.NewRequest("GET", urls, body)
  9657. req.Header = reqHeaders
  9658. googleapi.Expand(req.URL, map[string]string{
  9659. "name": c.name,
  9660. })
  9661. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9662. }
  9663. // Do executes the "dlp.projects.inspectTemplates.get" call.
  9664. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  9665. // non-nil. Any non-2xx status code is an error. Response headers are in
  9666. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  9667. // (if a response was returned at all) in
  9668. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9669. // whether the returned error was because http.StatusNotModified was
  9670. // returned.
  9671. func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  9672. gensupport.SetOptions(c.urlParams_, opts...)
  9673. res, err := c.doRequest("json")
  9674. if res != nil && res.StatusCode == http.StatusNotModified {
  9675. if res.Body != nil {
  9676. res.Body.Close()
  9677. }
  9678. return nil, &googleapi.Error{
  9679. Code: res.StatusCode,
  9680. Header: res.Header,
  9681. }
  9682. }
  9683. if err != nil {
  9684. return nil, err
  9685. }
  9686. defer googleapi.CloseBody(res)
  9687. if err := googleapi.CheckResponse(res); err != nil {
  9688. return nil, err
  9689. }
  9690. ret := &GooglePrivacyDlpV2InspectTemplate{
  9691. ServerResponse: googleapi.ServerResponse{
  9692. Header: res.Header,
  9693. HTTPStatusCode: res.StatusCode,
  9694. },
  9695. }
  9696. target := &ret
  9697. if err := gensupport.DecodeResponse(target, res); err != nil {
  9698. return nil, err
  9699. }
  9700. return ret, nil
  9701. // {
  9702. // "description": "Gets an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  9703. // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  9704. // "httpMethod": "GET",
  9705. // "id": "dlp.projects.inspectTemplates.get",
  9706. // "parameterOrder": [
  9707. // "name"
  9708. // ],
  9709. // "parameters": {
  9710. // "name": {
  9711. // "description": "Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  9712. // "location": "path",
  9713. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  9714. // "required": true,
  9715. // "type": "string"
  9716. // }
  9717. // },
  9718. // "path": "v2/{+name}",
  9719. // "response": {
  9720. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  9721. // },
  9722. // "scopes": [
  9723. // "https://www.googleapis.com/auth/cloud-platform"
  9724. // ]
  9725. // }
  9726. }
  9727. // method id "dlp.projects.inspectTemplates.list":
  9728. type ProjectsInspectTemplatesListCall struct {
  9729. s *Service
  9730. parent string
  9731. urlParams_ gensupport.URLParams
  9732. ifNoneMatch_ string
  9733. ctx_ context.Context
  9734. header_ http.Header
  9735. }
  9736. // List: Lists InspectTemplates.
  9737. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  9738. // more.
  9739. func (r *ProjectsInspectTemplatesService) List(parent string) *ProjectsInspectTemplatesListCall {
  9740. c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9741. c.parent = parent
  9742. return c
  9743. }
  9744. // PageSize sets the optional parameter "pageSize": Optional size of the
  9745. // page, can be limited by server. If zero server returns
  9746. // a page of max size 100.
  9747. func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall {
  9748. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9749. return c
  9750. }
  9751. // PageToken sets the optional parameter "pageToken": Optional page
  9752. // token to continue retrieval. Comes from previous call
  9753. // to `ListInspectTemplates`.
  9754. func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall {
  9755. c.urlParams_.Set("pageToken", pageToken)
  9756. return c
  9757. }
  9758. // Fields allows partial responses to be retrieved. See
  9759. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9760. // for more information.
  9761. func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall {
  9762. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9763. return c
  9764. }
  9765. // IfNoneMatch sets the optional parameter which makes the operation
  9766. // fail if the object's ETag matches the given value. This is useful for
  9767. // getting updates only after the object has changed since the last
  9768. // request. Use googleapi.IsNotModified to check whether the response
  9769. // error from Do is the result of In-None-Match.
  9770. func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall {
  9771. c.ifNoneMatch_ = entityTag
  9772. return c
  9773. }
  9774. // Context sets the context to be used in this call's Do method. Any
  9775. // pending HTTP request will be aborted if the provided context is
  9776. // canceled.
  9777. func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall {
  9778. c.ctx_ = ctx
  9779. return c
  9780. }
  9781. // Header returns an http.Header that can be modified by the caller to
  9782. // add HTTP headers to the request.
  9783. func (c *ProjectsInspectTemplatesListCall) Header() http.Header {
  9784. if c.header_ == nil {
  9785. c.header_ = make(http.Header)
  9786. }
  9787. return c.header_
  9788. }
  9789. func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) {
  9790. reqHeaders := make(http.Header)
  9791. for k, v := range c.header_ {
  9792. reqHeaders[k] = v
  9793. }
  9794. reqHeaders.Set("User-Agent", c.s.userAgent())
  9795. if c.ifNoneMatch_ != "" {
  9796. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9797. }
  9798. var body io.Reader = nil
  9799. c.urlParams_.Set("alt", alt)
  9800. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates")
  9801. urls += "?" + c.urlParams_.Encode()
  9802. req, _ := http.NewRequest("GET", urls, body)
  9803. req.Header = reqHeaders
  9804. googleapi.Expand(req.URL, map[string]string{
  9805. "parent": c.parent,
  9806. })
  9807. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9808. }
  9809. // Do executes the "dlp.projects.inspectTemplates.list" call.
  9810. // Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or
  9811. // error will be non-nil. Any non-2xx status code is an error. Response
  9812. // headers are in either
  9813. // *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header
  9814. // or (if a response was returned at all) in
  9815. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9816. // whether the returned error was because http.StatusNotModified was
  9817. // returned.
  9818. func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) {
  9819. gensupport.SetOptions(c.urlParams_, opts...)
  9820. res, err := c.doRequest("json")
  9821. if res != nil && res.StatusCode == http.StatusNotModified {
  9822. if res.Body != nil {
  9823. res.Body.Close()
  9824. }
  9825. return nil, &googleapi.Error{
  9826. Code: res.StatusCode,
  9827. Header: res.Header,
  9828. }
  9829. }
  9830. if err != nil {
  9831. return nil, err
  9832. }
  9833. defer googleapi.CloseBody(res)
  9834. if err := googleapi.CheckResponse(res); err != nil {
  9835. return nil, err
  9836. }
  9837. ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{
  9838. ServerResponse: googleapi.ServerResponse{
  9839. Header: res.Header,
  9840. HTTPStatusCode: res.StatusCode,
  9841. },
  9842. }
  9843. target := &ret
  9844. if err := gensupport.DecodeResponse(target, res); err != nil {
  9845. return nil, err
  9846. }
  9847. return ret, nil
  9848. // {
  9849. // "description": "Lists InspectTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  9850. // "flatPath": "v2/projects/{projectsId}/inspectTemplates",
  9851. // "httpMethod": "GET",
  9852. // "id": "dlp.projects.inspectTemplates.list",
  9853. // "parameterOrder": [
  9854. // "parent"
  9855. // ],
  9856. // "parameters": {
  9857. // "pageSize": {
  9858. // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.",
  9859. // "format": "int32",
  9860. // "location": "query",
  9861. // "type": "integer"
  9862. // },
  9863. // "pageToken": {
  9864. // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.",
  9865. // "location": "query",
  9866. // "type": "string"
  9867. // },
  9868. // "parent": {
  9869. // "description": "The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.",
  9870. // "location": "path",
  9871. // "pattern": "^projects/[^/]+$",
  9872. // "required": true,
  9873. // "type": "string"
  9874. // }
  9875. // },
  9876. // "path": "v2/{+parent}/inspectTemplates",
  9877. // "response": {
  9878. // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse"
  9879. // },
  9880. // "scopes": [
  9881. // "https://www.googleapis.com/auth/cloud-platform"
  9882. // ]
  9883. // }
  9884. }
  9885. // Pages invokes f for each page of results.
  9886. // A non-nil error returned from f will halt the iteration.
  9887. // The provided context supersedes any context provided to the Context method.
  9888. func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error {
  9889. c.ctx_ = ctx
  9890. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9891. for {
  9892. x, err := c.Do()
  9893. if err != nil {
  9894. return err
  9895. }
  9896. if err := f(x); err != nil {
  9897. return err
  9898. }
  9899. if x.NextPageToken == "" {
  9900. return nil
  9901. }
  9902. c.PageToken(x.NextPageToken)
  9903. }
  9904. }
  9905. // method id "dlp.projects.inspectTemplates.patch":
  9906. type ProjectsInspectTemplatesPatchCall struct {
  9907. s *Service
  9908. name string
  9909. googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest
  9910. urlParams_ gensupport.URLParams
  9911. ctx_ context.Context
  9912. header_ http.Header
  9913. }
  9914. // Patch: Updates the InspectTemplate.
  9915. // See https://cloud.google.com/dlp/docs/creating-templates to learn
  9916. // more.
  9917. func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall {
  9918. c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9919. c.name = name
  9920. c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest
  9921. return c
  9922. }
  9923. // Fields allows partial responses to be retrieved. See
  9924. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9925. // for more information.
  9926. func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall {
  9927. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9928. return c
  9929. }
  9930. // Context sets the context to be used in this call's Do method. Any
  9931. // pending HTTP request will be aborted if the provided context is
  9932. // canceled.
  9933. func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall {
  9934. c.ctx_ = ctx
  9935. return c
  9936. }
  9937. // Header returns an http.Header that can be modified by the caller to
  9938. // add HTTP headers to the request.
  9939. func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header {
  9940. if c.header_ == nil {
  9941. c.header_ = make(http.Header)
  9942. }
  9943. return c.header_
  9944. }
  9945. func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
  9946. reqHeaders := make(http.Header)
  9947. for k, v := range c.header_ {
  9948. reqHeaders[k] = v
  9949. }
  9950. reqHeaders.Set("User-Agent", c.s.userAgent())
  9951. var body io.Reader = nil
  9952. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest)
  9953. if err != nil {
  9954. return nil, err
  9955. }
  9956. reqHeaders.Set("Content-Type", "application/json")
  9957. c.urlParams_.Set("alt", alt)
  9958. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  9959. urls += "?" + c.urlParams_.Encode()
  9960. req, _ := http.NewRequest("PATCH", urls, body)
  9961. req.Header = reqHeaders
  9962. googleapi.Expand(req.URL, map[string]string{
  9963. "name": c.name,
  9964. })
  9965. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9966. }
  9967. // Do executes the "dlp.projects.inspectTemplates.patch" call.
  9968. // Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be
  9969. // non-nil. Any non-2xx status code is an error. Response headers are in
  9970. // either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or
  9971. // (if a response was returned at all) in
  9972. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9973. // whether the returned error was because http.StatusNotModified was
  9974. // returned.
  9975. func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) {
  9976. gensupport.SetOptions(c.urlParams_, opts...)
  9977. res, err := c.doRequest("json")
  9978. if res != nil && res.StatusCode == http.StatusNotModified {
  9979. if res.Body != nil {
  9980. res.Body.Close()
  9981. }
  9982. return nil, &googleapi.Error{
  9983. Code: res.StatusCode,
  9984. Header: res.Header,
  9985. }
  9986. }
  9987. if err != nil {
  9988. return nil, err
  9989. }
  9990. defer googleapi.CloseBody(res)
  9991. if err := googleapi.CheckResponse(res); err != nil {
  9992. return nil, err
  9993. }
  9994. ret := &GooglePrivacyDlpV2InspectTemplate{
  9995. ServerResponse: googleapi.ServerResponse{
  9996. Header: res.Header,
  9997. HTTPStatusCode: res.StatusCode,
  9998. },
  9999. }
  10000. target := &ret
  10001. if err := gensupport.DecodeResponse(target, res); err != nil {
  10002. return nil, err
  10003. }
  10004. return ret, nil
  10005. // {
  10006. // "description": "Updates the InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.",
  10007. // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}",
  10008. // "httpMethod": "PATCH",
  10009. // "id": "dlp.projects.inspectTemplates.patch",
  10010. // "parameterOrder": [
  10011. // "name"
  10012. // ],
  10013. // "parameters": {
  10014. // "name": {
  10015. // "description": "Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.",
  10016. // "location": "path",
  10017. // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$",
  10018. // "required": true,
  10019. // "type": "string"
  10020. // }
  10021. // },
  10022. // "path": "v2/{+name}",
  10023. // "request": {
  10024. // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest"
  10025. // },
  10026. // "response": {
  10027. // "$ref": "GooglePrivacyDlpV2InspectTemplate"
  10028. // },
  10029. // "scopes": [
  10030. // "https://www.googleapis.com/auth/cloud-platform"
  10031. // ]
  10032. // }
  10033. }
  10034. // method id "dlp.projects.jobTriggers.create":
  10035. type ProjectsJobTriggersCreateCall struct {
  10036. s *Service
  10037. parent string
  10038. googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest
  10039. urlParams_ gensupport.URLParams
  10040. ctx_ context.Context
  10041. header_ http.Header
  10042. }
  10043. // Create: Creates a job trigger to run DLP actions such as scanning
  10044. // storage for
  10045. // sensitive information on a set schedule.
  10046. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
  10047. // more.
  10048. func (r *ProjectsJobTriggersService) Create(parent string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall {
  10049. c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10050. c.parent = parent
  10051. c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest
  10052. return c
  10053. }
  10054. // Fields allows partial responses to be retrieved. See
  10055. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10056. // for more information.
  10057. func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall {
  10058. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10059. return c
  10060. }
  10061. // Context sets the context to be used in this call's Do method. Any
  10062. // pending HTTP request will be aborted if the provided context is
  10063. // canceled.
  10064. func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall {
  10065. c.ctx_ = ctx
  10066. return c
  10067. }
  10068. // Header returns an http.Header that can be modified by the caller to
  10069. // add HTTP headers to the request.
  10070. func (c *ProjectsJobTriggersCreateCall) Header() http.Header {
  10071. if c.header_ == nil {
  10072. c.header_ = make(http.Header)
  10073. }
  10074. return c.header_
  10075. }
  10076. func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
  10077. reqHeaders := make(http.Header)
  10078. for k, v := range c.header_ {
  10079. reqHeaders[k] = v
  10080. }
  10081. reqHeaders.Set("User-Agent", c.s.userAgent())
  10082. var body io.Reader = nil
  10083. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest)
  10084. if err != nil {
  10085. return nil, err
  10086. }
  10087. reqHeaders.Set("Content-Type", "application/json")
  10088. c.urlParams_.Set("alt", alt)
  10089. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers")
  10090. urls += "?" + c.urlParams_.Encode()
  10091. req, _ := http.NewRequest("POST", urls, body)
  10092. req.Header = reqHeaders
  10093. googleapi.Expand(req.URL, map[string]string{
  10094. "parent": c.parent,
  10095. })
  10096. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10097. }
  10098. // Do executes the "dlp.projects.jobTriggers.create" call.
  10099. // Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be
  10100. // non-nil. Any non-2xx status code is an error. Response headers are in
  10101. // either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a
  10102. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10103. // googleapi.IsNotModified to check whether the returned error was
  10104. // because http.StatusNotModified was returned.
  10105. func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) {
  10106. gensupport.SetOptions(c.urlParams_, opts...)
  10107. res, err := c.doRequest("json")
  10108. if res != nil && res.StatusCode == http.StatusNotModified {
  10109. if res.Body != nil {
  10110. res.Body.Close()
  10111. }
  10112. return nil, &googleapi.Error{
  10113. Code: res.StatusCode,
  10114. Header: res.Header,
  10115. }
  10116. }
  10117. if err != nil {
  10118. return nil, err
  10119. }
  10120. defer googleapi.CloseBody(res)
  10121. if err := googleapi.CheckResponse(res); err != nil {
  10122. return nil, err
  10123. }
  10124. ret := &GooglePrivacyDlpV2JobTrigger{
  10125. ServerResponse: googleapi.ServerResponse{
  10126. Header: res.Header,
  10127. HTTPStatusCode: res.StatusCode,
  10128. },
  10129. }
  10130. target := &ret
  10131. if err := gensupport.DecodeResponse(target, res); err != nil {
  10132. return nil, err
  10133. }
  10134. return ret, nil
  10135. // {
  10136. // "description": "Creates a job trigger to run DLP actions such as scanning storage for\nsensitive information on a set schedule.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.",
  10137. // "flatPath": "v2/projects/{projectsId}/jobTriggers",
  10138. // "httpMethod": "POST",
  10139. // "id": "dlp.projects.jobTriggers.create",
  10140. // "parameterOrder": [
  10141. // "parent"
  10142. // ],
  10143. // "parameters": {
  10144. // "parent": {
  10145. // "description": "The parent resource name, for example projects/my-project-id.",
  10146. // "location": "path",
  10147. // "pattern": "^projects/[^/]+$",
  10148. // "required": true,
  10149. // "type": "string"
  10150. // }
  10151. // },
  10152. // "path": "v2/{+parent}/jobTriggers",
  10153. // "request": {
  10154. // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest"
  10155. // },
  10156. // "response": {
  10157. // "$ref": "GooglePrivacyDlpV2JobTrigger"
  10158. // },
  10159. // "scopes": [
  10160. // "https://www.googleapis.com/auth/cloud-platform"
  10161. // ]
  10162. // }
  10163. }
  10164. // method id "dlp.projects.jobTriggers.delete":
  10165. type ProjectsJobTriggersDeleteCall struct {
  10166. s *Service
  10167. name string
  10168. urlParams_ gensupport.URLParams
  10169. ctx_ context.Context
  10170. header_ http.Header
  10171. }
  10172. // Delete: Deletes a job trigger.
  10173. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
  10174. // more.
  10175. func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall {
  10176. c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10177. c.name = name
  10178. return c
  10179. }
  10180. // Fields allows partial responses to be retrieved. See
  10181. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10182. // for more information.
  10183. func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall {
  10184. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10185. return c
  10186. }
  10187. // Context sets the context to be used in this call's Do method. Any
  10188. // pending HTTP request will be aborted if the provided context is
  10189. // canceled.
  10190. func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall {
  10191. c.ctx_ = ctx
  10192. return c
  10193. }
  10194. // Header returns an http.Header that can be modified by the caller to
  10195. // add HTTP headers to the request.
  10196. func (c *ProjectsJobTriggersDeleteCall) Header() http.Header {
  10197. if c.header_ == nil {
  10198. c.header_ = make(http.Header)
  10199. }
  10200. return c.header_
  10201. }
  10202. func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
  10203. reqHeaders := make(http.Header)
  10204. for k, v := range c.header_ {
  10205. reqHeaders[k] = v
  10206. }
  10207. reqHeaders.Set("User-Agent", c.s.userAgent())
  10208. var body io.Reader = nil
  10209. c.urlParams_.Set("alt", alt)
  10210. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  10211. urls += "?" + c.urlParams_.Encode()
  10212. req, _ := http.NewRequest("DELETE", urls, body)
  10213. req.Header = reqHeaders
  10214. googleapi.Expand(req.URL, map[string]string{
  10215. "name": c.name,
  10216. })
  10217. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10218. }
  10219. // Do executes the "dlp.projects.jobTriggers.delete" call.
  10220. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  10221. // non-2xx status code is an error. Response headers are in either
  10222. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  10223. // returned at all) in error.(*googleapi.Error).Header. Use
  10224. // googleapi.IsNotModified to check whether the returned error was
  10225. // because http.StatusNotModified was returned.
  10226. func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  10227. gensupport.SetOptions(c.urlParams_, opts...)
  10228. res, err := c.doRequest("json")
  10229. if res != nil && res.StatusCode == http.StatusNotModified {
  10230. if res.Body != nil {
  10231. res.Body.Close()
  10232. }
  10233. return nil, &googleapi.Error{
  10234. Code: res.StatusCode,
  10235. Header: res.Header,
  10236. }
  10237. }
  10238. if err != nil {
  10239. return nil, err
  10240. }
  10241. defer googleapi.CloseBody(res)
  10242. if err := googleapi.CheckResponse(res); err != nil {
  10243. return nil, err
  10244. }
  10245. ret := &GoogleProtobufEmpty{
  10246. ServerResponse: googleapi.ServerResponse{
  10247. Header: res.Header,
  10248. HTTPStatusCode: res.StatusCode,
  10249. },
  10250. }
  10251. target := &ret
  10252. if err := gensupport.DecodeResponse(target, res); err != nil {
  10253. return nil, err
  10254. }
  10255. return ret, nil
  10256. // {
  10257. // "description": "Deletes a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.",
  10258. // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  10259. // "httpMethod": "DELETE",
  10260. // "id": "dlp.projects.jobTriggers.delete",
  10261. // "parameterOrder": [
  10262. // "name"
  10263. // ],
  10264. // "parameters": {
  10265. // "name": {
  10266. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  10267. // "location": "path",
  10268. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  10269. // "required": true,
  10270. // "type": "string"
  10271. // }
  10272. // },
  10273. // "path": "v2/{+name}",
  10274. // "response": {
  10275. // "$ref": "GoogleProtobufEmpty"
  10276. // },
  10277. // "scopes": [
  10278. // "https://www.googleapis.com/auth/cloud-platform"
  10279. // ]
  10280. // }
  10281. }
  10282. // method id "dlp.projects.jobTriggers.get":
  10283. type ProjectsJobTriggersGetCall struct {
  10284. s *Service
  10285. name string
  10286. urlParams_ gensupport.URLParams
  10287. ifNoneMatch_ string
  10288. ctx_ context.Context
  10289. header_ http.Header
  10290. }
  10291. // Get: Gets a job trigger.
  10292. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
  10293. // more.
  10294. func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall {
  10295. c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10296. c.name = name
  10297. return c
  10298. }
  10299. // Fields allows partial responses to be retrieved. See
  10300. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10301. // for more information.
  10302. func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall {
  10303. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10304. return c
  10305. }
  10306. // IfNoneMatch sets the optional parameter which makes the operation
  10307. // fail if the object's ETag matches the given value. This is useful for
  10308. // getting updates only after the object has changed since the last
  10309. // request. Use googleapi.IsNotModified to check whether the response
  10310. // error from Do is the result of In-None-Match.
  10311. func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall {
  10312. c.ifNoneMatch_ = entityTag
  10313. return c
  10314. }
  10315. // Context sets the context to be used in this call's Do method. Any
  10316. // pending HTTP request will be aborted if the provided context is
  10317. // canceled.
  10318. func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall {
  10319. c.ctx_ = ctx
  10320. return c
  10321. }
  10322. // Header returns an http.Header that can be modified by the caller to
  10323. // add HTTP headers to the request.
  10324. func (c *ProjectsJobTriggersGetCall) Header() http.Header {
  10325. if c.header_ == nil {
  10326. c.header_ = make(http.Header)
  10327. }
  10328. return c.header_
  10329. }
  10330. func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) {
  10331. reqHeaders := make(http.Header)
  10332. for k, v := range c.header_ {
  10333. reqHeaders[k] = v
  10334. }
  10335. reqHeaders.Set("User-Agent", c.s.userAgent())
  10336. if c.ifNoneMatch_ != "" {
  10337. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10338. }
  10339. var body io.Reader = nil
  10340. c.urlParams_.Set("alt", alt)
  10341. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  10342. urls += "?" + c.urlParams_.Encode()
  10343. req, _ := http.NewRequest("GET", urls, body)
  10344. req.Header = reqHeaders
  10345. googleapi.Expand(req.URL, map[string]string{
  10346. "name": c.name,
  10347. })
  10348. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10349. }
  10350. // Do executes the "dlp.projects.jobTriggers.get" call.
  10351. // Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be
  10352. // non-nil. Any non-2xx status code is an error. Response headers are in
  10353. // either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a
  10354. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10355. // googleapi.IsNotModified to check whether the returned error was
  10356. // because http.StatusNotModified was returned.
  10357. func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) {
  10358. gensupport.SetOptions(c.urlParams_, opts...)
  10359. res, err := c.doRequest("json")
  10360. if res != nil && res.StatusCode == http.StatusNotModified {
  10361. if res.Body != nil {
  10362. res.Body.Close()
  10363. }
  10364. return nil, &googleapi.Error{
  10365. Code: res.StatusCode,
  10366. Header: res.Header,
  10367. }
  10368. }
  10369. if err != nil {
  10370. return nil, err
  10371. }
  10372. defer googleapi.CloseBody(res)
  10373. if err := googleapi.CheckResponse(res); err != nil {
  10374. return nil, err
  10375. }
  10376. ret := &GooglePrivacyDlpV2JobTrigger{
  10377. ServerResponse: googleapi.ServerResponse{
  10378. Header: res.Header,
  10379. HTTPStatusCode: res.StatusCode,
  10380. },
  10381. }
  10382. target := &ret
  10383. if err := gensupport.DecodeResponse(target, res); err != nil {
  10384. return nil, err
  10385. }
  10386. return ret, nil
  10387. // {
  10388. // "description": "Gets a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.",
  10389. // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  10390. // "httpMethod": "GET",
  10391. // "id": "dlp.projects.jobTriggers.get",
  10392. // "parameterOrder": [
  10393. // "name"
  10394. // ],
  10395. // "parameters": {
  10396. // "name": {
  10397. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  10398. // "location": "path",
  10399. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  10400. // "required": true,
  10401. // "type": "string"
  10402. // }
  10403. // },
  10404. // "path": "v2/{+name}",
  10405. // "response": {
  10406. // "$ref": "GooglePrivacyDlpV2JobTrigger"
  10407. // },
  10408. // "scopes": [
  10409. // "https://www.googleapis.com/auth/cloud-platform"
  10410. // ]
  10411. // }
  10412. }
  10413. // method id "dlp.projects.jobTriggers.list":
  10414. type ProjectsJobTriggersListCall struct {
  10415. s *Service
  10416. parent string
  10417. urlParams_ gensupport.URLParams
  10418. ifNoneMatch_ string
  10419. ctx_ context.Context
  10420. header_ http.Header
  10421. }
  10422. // List: Lists job triggers.
  10423. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
  10424. // more.
  10425. func (r *ProjectsJobTriggersService) List(parent string) *ProjectsJobTriggersListCall {
  10426. c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10427. c.parent = parent
  10428. return c
  10429. }
  10430. // OrderBy sets the optional parameter "orderBy": Optional comma
  10431. // separated list of triggeredJob fields to order by,
  10432. // followed by `asc` or `desc` postfix. This list is
  10433. // case-insensitive,
  10434. // default sorting order is ascending, redundant space characters
  10435. // are
  10436. // insignificant.
  10437. //
  10438. // Example: `name asc,update_time, create_time desc`
  10439. //
  10440. // Supported fields are:
  10441. //
  10442. // - `create_time`: corresponds to time the triggeredJob was created.
  10443. // - `update_time`: corresponds to time the triggeredJob was last
  10444. // updated.
  10445. // - `name`: corresponds to JobTrigger's name.
  10446. func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall {
  10447. c.urlParams_.Set("orderBy", orderBy)
  10448. return c
  10449. }
  10450. // PageSize sets the optional parameter "pageSize": Optional size of the
  10451. // page, can be limited by a server.
  10452. func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall {
  10453. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  10454. return c
  10455. }
  10456. // PageToken sets the optional parameter "pageToken": Optional page
  10457. // token to continue retrieval. Comes from previous call
  10458. // to ListJobTriggers. `order_by` field must not
  10459. // change for subsequent calls.
  10460. func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall {
  10461. c.urlParams_.Set("pageToken", pageToken)
  10462. return c
  10463. }
  10464. // Fields allows partial responses to be retrieved. See
  10465. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10466. // for more information.
  10467. func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall {
  10468. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10469. return c
  10470. }
  10471. // IfNoneMatch sets the optional parameter which makes the operation
  10472. // fail if the object's ETag matches the given value. This is useful for
  10473. // getting updates only after the object has changed since the last
  10474. // request. Use googleapi.IsNotModified to check whether the response
  10475. // error from Do is the result of In-None-Match.
  10476. func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall {
  10477. c.ifNoneMatch_ = entityTag
  10478. return c
  10479. }
  10480. // Context sets the context to be used in this call's Do method. Any
  10481. // pending HTTP request will be aborted if the provided context is
  10482. // canceled.
  10483. func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall {
  10484. c.ctx_ = ctx
  10485. return c
  10486. }
  10487. // Header returns an http.Header that can be modified by the caller to
  10488. // add HTTP headers to the request.
  10489. func (c *ProjectsJobTriggersListCall) Header() http.Header {
  10490. if c.header_ == nil {
  10491. c.header_ = make(http.Header)
  10492. }
  10493. return c.header_
  10494. }
  10495. func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) {
  10496. reqHeaders := make(http.Header)
  10497. for k, v := range c.header_ {
  10498. reqHeaders[k] = v
  10499. }
  10500. reqHeaders.Set("User-Agent", c.s.userAgent())
  10501. if c.ifNoneMatch_ != "" {
  10502. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10503. }
  10504. var body io.Reader = nil
  10505. c.urlParams_.Set("alt", alt)
  10506. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers")
  10507. urls += "?" + c.urlParams_.Encode()
  10508. req, _ := http.NewRequest("GET", urls, body)
  10509. req.Header = reqHeaders
  10510. googleapi.Expand(req.URL, map[string]string{
  10511. "parent": c.parent,
  10512. })
  10513. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10514. }
  10515. // Do executes the "dlp.projects.jobTriggers.list" call.
  10516. // Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error
  10517. // will be non-nil. Any non-2xx status code is an error. Response
  10518. // headers are in either
  10519. // *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or
  10520. // (if a response was returned at all) in
  10521. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10522. // whether the returned error was because http.StatusNotModified was
  10523. // returned.
  10524. func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) {
  10525. gensupport.SetOptions(c.urlParams_, opts...)
  10526. res, err := c.doRequest("json")
  10527. if res != nil && res.StatusCode == http.StatusNotModified {
  10528. if res.Body != nil {
  10529. res.Body.Close()
  10530. }
  10531. return nil, &googleapi.Error{
  10532. Code: res.StatusCode,
  10533. Header: res.Header,
  10534. }
  10535. }
  10536. if err != nil {
  10537. return nil, err
  10538. }
  10539. defer googleapi.CloseBody(res)
  10540. if err := googleapi.CheckResponse(res); err != nil {
  10541. return nil, err
  10542. }
  10543. ret := &GooglePrivacyDlpV2ListJobTriggersResponse{
  10544. ServerResponse: googleapi.ServerResponse{
  10545. Header: res.Header,
  10546. HTTPStatusCode: res.StatusCode,
  10547. },
  10548. }
  10549. target := &ret
  10550. if err := gensupport.DecodeResponse(target, res); err != nil {
  10551. return nil, err
  10552. }
  10553. return ret, nil
  10554. // {
  10555. // "description": "Lists job triggers.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.",
  10556. // "flatPath": "v2/projects/{projectsId}/jobTriggers",
  10557. // "httpMethod": "GET",
  10558. // "id": "dlp.projects.jobTriggers.list",
  10559. // "parameterOrder": [
  10560. // "parent"
  10561. // ],
  10562. // "parameters": {
  10563. // "orderBy": {
  10564. // "description": "Optional comma separated list of triggeredJob fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields 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 name.",
  10565. // "location": "query",
  10566. // "type": "string"
  10567. // },
  10568. // "pageSize": {
  10569. // "description": "Optional size of the page, can be limited by a server.",
  10570. // "format": "int32",
  10571. // "location": "query",
  10572. // "type": "integer"
  10573. // },
  10574. // "pageToken": {
  10575. // "description": "Optional page token to continue retrieval. Comes from previous call\nto ListJobTriggers. `order_by` field must not\nchange for subsequent calls.",
  10576. // "location": "query",
  10577. // "type": "string"
  10578. // },
  10579. // "parent": {
  10580. // "description": "The parent resource name, for example `projects/my-project-id`.",
  10581. // "location": "path",
  10582. // "pattern": "^projects/[^/]+$",
  10583. // "required": true,
  10584. // "type": "string"
  10585. // }
  10586. // },
  10587. // "path": "v2/{+parent}/jobTriggers",
  10588. // "response": {
  10589. // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse"
  10590. // },
  10591. // "scopes": [
  10592. // "https://www.googleapis.com/auth/cloud-platform"
  10593. // ]
  10594. // }
  10595. }
  10596. // Pages invokes f for each page of results.
  10597. // A non-nil error returned from f will halt the iteration.
  10598. // The provided context supersedes any context provided to the Context method.
  10599. func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error {
  10600. c.ctx_ = ctx
  10601. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  10602. for {
  10603. x, err := c.Do()
  10604. if err != nil {
  10605. return err
  10606. }
  10607. if err := f(x); err != nil {
  10608. return err
  10609. }
  10610. if x.NextPageToken == "" {
  10611. return nil
  10612. }
  10613. c.PageToken(x.NextPageToken)
  10614. }
  10615. }
  10616. // method id "dlp.projects.jobTriggers.patch":
  10617. type ProjectsJobTriggersPatchCall struct {
  10618. s *Service
  10619. name string
  10620. googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest
  10621. urlParams_ gensupport.URLParams
  10622. ctx_ context.Context
  10623. header_ http.Header
  10624. }
  10625. // Patch: Updates a job trigger.
  10626. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
  10627. // more.
  10628. func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall {
  10629. c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10630. c.name = name
  10631. c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest
  10632. return c
  10633. }
  10634. // Fields allows partial responses to be retrieved. See
  10635. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10636. // for more information.
  10637. func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall {
  10638. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10639. return c
  10640. }
  10641. // Context sets the context to be used in this call's Do method. Any
  10642. // pending HTTP request will be aborted if the provided context is
  10643. // canceled.
  10644. func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall {
  10645. c.ctx_ = ctx
  10646. return c
  10647. }
  10648. // Header returns an http.Header that can be modified by the caller to
  10649. // add HTTP headers to the request.
  10650. func (c *ProjectsJobTriggersPatchCall) Header() http.Header {
  10651. if c.header_ == nil {
  10652. c.header_ = make(http.Header)
  10653. }
  10654. return c.header_
  10655. }
  10656. func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
  10657. reqHeaders := make(http.Header)
  10658. for k, v := range c.header_ {
  10659. reqHeaders[k] = v
  10660. }
  10661. reqHeaders.Set("User-Agent", c.s.userAgent())
  10662. var body io.Reader = nil
  10663. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest)
  10664. if err != nil {
  10665. return nil, err
  10666. }
  10667. reqHeaders.Set("Content-Type", "application/json")
  10668. c.urlParams_.Set("alt", alt)
  10669. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  10670. urls += "?" + c.urlParams_.Encode()
  10671. req, _ := http.NewRequest("PATCH", urls, body)
  10672. req.Header = reqHeaders
  10673. googleapi.Expand(req.URL, map[string]string{
  10674. "name": c.name,
  10675. })
  10676. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10677. }
  10678. // Do executes the "dlp.projects.jobTriggers.patch" call.
  10679. // Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be
  10680. // non-nil. Any non-2xx status code is an error. Response headers are in
  10681. // either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a
  10682. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10683. // googleapi.IsNotModified to check whether the returned error was
  10684. // because http.StatusNotModified was returned.
  10685. func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) {
  10686. gensupport.SetOptions(c.urlParams_, opts...)
  10687. res, err := c.doRequest("json")
  10688. if res != nil && res.StatusCode == http.StatusNotModified {
  10689. if res.Body != nil {
  10690. res.Body.Close()
  10691. }
  10692. return nil, &googleapi.Error{
  10693. Code: res.StatusCode,
  10694. Header: res.Header,
  10695. }
  10696. }
  10697. if err != nil {
  10698. return nil, err
  10699. }
  10700. defer googleapi.CloseBody(res)
  10701. if err := googleapi.CheckResponse(res); err != nil {
  10702. return nil, err
  10703. }
  10704. ret := &GooglePrivacyDlpV2JobTrigger{
  10705. ServerResponse: googleapi.ServerResponse{
  10706. Header: res.Header,
  10707. HTTPStatusCode: res.StatusCode,
  10708. },
  10709. }
  10710. target := &ret
  10711. if err := gensupport.DecodeResponse(target, res); err != nil {
  10712. return nil, err
  10713. }
  10714. return ret, nil
  10715. // {
  10716. // "description": "Updates a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.",
  10717. // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}",
  10718. // "httpMethod": "PATCH",
  10719. // "id": "dlp.projects.jobTriggers.patch",
  10720. // "parameterOrder": [
  10721. // "name"
  10722. // ],
  10723. // "parameters": {
  10724. // "name": {
  10725. // "description": "Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.",
  10726. // "location": "path",
  10727. // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$",
  10728. // "required": true,
  10729. // "type": "string"
  10730. // }
  10731. // },
  10732. // "path": "v2/{+name}",
  10733. // "request": {
  10734. // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest"
  10735. // },
  10736. // "response": {
  10737. // "$ref": "GooglePrivacyDlpV2JobTrigger"
  10738. // },
  10739. // "scopes": [
  10740. // "https://www.googleapis.com/auth/cloud-platform"
  10741. // ]
  10742. // }
  10743. }