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.
 
 
 

7250 lines
289 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/v2beta1"
  8. // ...
  9. // dlpService, err := dlp.New(oauthHttpClient)
  10. package dlp // import "google.golang.org/api/dlp/v2beta1"
  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:v2beta1"
  41. const apiName = "dlp"
  42. const apiVersion = "v2beta1"
  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.Content = NewContentService(s)
  55. s.DataSource = NewDataSourceService(s)
  56. s.Inspect = NewInspectService(s)
  57. s.RiskAnalysis = NewRiskAnalysisService(s)
  58. s.RootCategories = NewRootCategoriesService(s)
  59. return s, nil
  60. }
  61. type Service struct {
  62. client *http.Client
  63. BasePath string // API endpoint base URL
  64. UserAgent string // optional additional User-Agent fragment
  65. Content *ContentService
  66. DataSource *DataSourceService
  67. Inspect *InspectService
  68. RiskAnalysis *RiskAnalysisService
  69. RootCategories *RootCategoriesService
  70. }
  71. func (s *Service) userAgent() string {
  72. if s.UserAgent == "" {
  73. return googleapi.UserAgent
  74. }
  75. return googleapi.UserAgent + " " + s.UserAgent
  76. }
  77. func NewContentService(s *Service) *ContentService {
  78. rs := &ContentService{s: s}
  79. return rs
  80. }
  81. type ContentService struct {
  82. s *Service
  83. }
  84. func NewDataSourceService(s *Service) *DataSourceService {
  85. rs := &DataSourceService{s: s}
  86. return rs
  87. }
  88. type DataSourceService struct {
  89. s *Service
  90. }
  91. func NewInspectService(s *Service) *InspectService {
  92. rs := &InspectService{s: s}
  93. rs.Operations = NewInspectOperationsService(s)
  94. rs.Results = NewInspectResultsService(s)
  95. return rs
  96. }
  97. type InspectService struct {
  98. s *Service
  99. Operations *InspectOperationsService
  100. Results *InspectResultsService
  101. }
  102. func NewInspectOperationsService(s *Service) *InspectOperationsService {
  103. rs := &InspectOperationsService{s: s}
  104. return rs
  105. }
  106. type InspectOperationsService struct {
  107. s *Service
  108. }
  109. func NewInspectResultsService(s *Service) *InspectResultsService {
  110. rs := &InspectResultsService{s: s}
  111. rs.Findings = NewInspectResultsFindingsService(s)
  112. return rs
  113. }
  114. type InspectResultsService struct {
  115. s *Service
  116. Findings *InspectResultsFindingsService
  117. }
  118. func NewInspectResultsFindingsService(s *Service) *InspectResultsFindingsService {
  119. rs := &InspectResultsFindingsService{s: s}
  120. return rs
  121. }
  122. type InspectResultsFindingsService struct {
  123. s *Service
  124. }
  125. func NewRiskAnalysisService(s *Service) *RiskAnalysisService {
  126. rs := &RiskAnalysisService{s: s}
  127. rs.Operations = NewRiskAnalysisOperationsService(s)
  128. return rs
  129. }
  130. type RiskAnalysisService struct {
  131. s *Service
  132. Operations *RiskAnalysisOperationsService
  133. }
  134. func NewRiskAnalysisOperationsService(s *Service) *RiskAnalysisOperationsService {
  135. rs := &RiskAnalysisOperationsService{s: s}
  136. return rs
  137. }
  138. type RiskAnalysisOperationsService struct {
  139. s *Service
  140. }
  141. func NewRootCategoriesService(s *Service) *RootCategoriesService {
  142. rs := &RootCategoriesService{s: s}
  143. rs.InfoTypes = NewRootCategoriesInfoTypesService(s)
  144. return rs
  145. }
  146. type RootCategoriesService struct {
  147. s *Service
  148. InfoTypes *RootCategoriesInfoTypesService
  149. }
  150. func NewRootCategoriesInfoTypesService(s *Service) *RootCategoriesInfoTypesService {
  151. rs := &RootCategoriesInfoTypesService{s: s}
  152. return rs
  153. }
  154. type RootCategoriesInfoTypesService struct {
  155. s *Service
  156. }
  157. // GoogleLongrunningCancelOperationRequest: The request message for
  158. // Operations.CancelOperation.
  159. type GoogleLongrunningCancelOperationRequest struct {
  160. }
  161. // GoogleLongrunningListOperationsResponse: The response message for
  162. // Operations.ListOperations.
  163. type GoogleLongrunningListOperationsResponse struct {
  164. // NextPageToken: The standard List next-page token.
  165. NextPageToken string `json:"nextPageToken,omitempty"`
  166. // Operations: A list of operations that matches the specified filter in
  167. // the request.
  168. Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  169. // ServerResponse contains the HTTP response code and headers from the
  170. // server.
  171. googleapi.ServerResponse `json:"-"`
  172. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  173. // unconditionally include in API requests. By default, fields with
  174. // empty values are omitted from API requests. However, any non-pointer,
  175. // non-interface field appearing in ForceSendFields will be sent to the
  176. // server regardless of whether the field is empty or not. This may be
  177. // used to include empty fields in Patch requests.
  178. ForceSendFields []string `json:"-"`
  179. // NullFields is a list of field names (e.g. "NextPageToken") to include
  180. // in API requests with the JSON null value. By default, fields with
  181. // empty values are omitted from API requests. However, any field with
  182. // an empty value appearing in NullFields will be sent to the server as
  183. // null. It is an error if a field in this list has a non-empty value.
  184. // This may be used to include null fields in Patch requests.
  185. NullFields []string `json:"-"`
  186. }
  187. func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  188. type NoMethod GoogleLongrunningListOperationsResponse
  189. raw := NoMethod(*s)
  190. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  191. }
  192. // GoogleLongrunningOperation: This resource represents a long-running
  193. // operation that is the result of a
  194. // network API call.
  195. type GoogleLongrunningOperation struct {
  196. // Done: If the value is `false`, it means the operation is still in
  197. // progress.
  198. // If `true`, the operation is completed, and either `error` or
  199. // `response` is
  200. // available.
  201. Done bool `json:"done,omitempty"`
  202. // Error: The error result of the operation in case of failure or
  203. // cancellation.
  204. Error *GoogleRpcStatus `json:"error,omitempty"`
  205. // Metadata: This field will contain an InspectOperationMetadata object
  206. // for `inspect.operations.create` or a RiskAnalysisOperationMetadata
  207. // object for `dataSource.analyze`. This will always be returned with
  208. // the Operation.
  209. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  210. // Name: The server-assigned name. The `name` should have the format of
  211. // `inspect/operations/<identifier>`.
  212. Name string `json:"name,omitempty"`
  213. // Response: This field will contain an InspectOperationResult object
  214. // for `inspect.operations.create` or a RiskAnalysisOperationResult
  215. // object for `dataSource.analyze`.
  216. Response googleapi.RawMessage `json:"response,omitempty"`
  217. // ServerResponse contains the HTTP response code and headers from the
  218. // server.
  219. googleapi.ServerResponse `json:"-"`
  220. // ForceSendFields is a list of field names (e.g. "Done") to
  221. // unconditionally include in API requests. By default, fields with
  222. // empty values are omitted from API requests. However, any non-pointer,
  223. // non-interface field appearing in ForceSendFields will be sent to the
  224. // server regardless of whether the field is empty or not. This may be
  225. // used to include empty fields in Patch requests.
  226. ForceSendFields []string `json:"-"`
  227. // NullFields is a list of field names (e.g. "Done") to include in API
  228. // requests with the JSON null value. By default, fields with empty
  229. // values are omitted from API requests. However, any field with an
  230. // empty value appearing in NullFields will be sent to the server as
  231. // null. It is an error if a field in this list has a non-empty value.
  232. // This may be used to include null fields in Patch requests.
  233. NullFields []string `json:"-"`
  234. }
  235. func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  236. type NoMethod GoogleLongrunningOperation
  237. raw := NoMethod(*s)
  238. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  239. }
  240. // GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest: Request for
  241. // creating a risk analysis operation.
  242. type GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest struct {
  243. // PrivacyMetric: Privacy metric to compute.
  244. PrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"privacyMetric,omitempty"`
  245. // SourceTable: Input dataset to compute metrics over.
  246. SourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"sourceTable,omitempty"`
  247. // ForceSendFields is a list of field names (e.g. "PrivacyMetric") to
  248. // unconditionally include in API requests. By default, fields with
  249. // empty values are omitted from API requests. However, any non-pointer,
  250. // non-interface field appearing in ForceSendFields will be sent to the
  251. // server regardless of whether the field is empty or not. This may be
  252. // used to include empty fields in Patch requests.
  253. ForceSendFields []string `json:"-"`
  254. // NullFields is a list of field names (e.g. "PrivacyMetric") to include
  255. // in API requests with the JSON null value. By default, fields with
  256. // empty values are omitted from API requests. However, any field with
  257. // an empty value appearing in NullFields will be sent to the server as
  258. // null. It is an error if a field in this list has a non-empty value.
  259. // This may be used to include null fields in Patch requests.
  260. NullFields []string `json:"-"`
  261. }
  262. func (s *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest) MarshalJSON() ([]byte, error) {
  263. type NoMethod GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest
  264. raw := NoMethod(*s)
  265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  266. }
  267. // GooglePrivacyDlpV2beta1AuxiliaryTable: An auxiliary table contains
  268. // statistical information on the relative
  269. // frequency of different quasi-identifiers values. It has one or
  270. // several
  271. // quasi-identifiers columns, and one column that indicates the
  272. // relative
  273. // frequency of each quasi-identifier tuple.
  274. // If a tuple is present in the data but not in the auxiliary table,
  275. // the
  276. // corresponding relative frequency is assumed to be zero (and thus,
  277. // the
  278. // tuple is highly reidentifiable).
  279. type GooglePrivacyDlpV2beta1AuxiliaryTable struct {
  280. // QuasiIds: Quasi-identifier columns. [required]
  281. QuasiIds []*GooglePrivacyDlpV2beta1QuasiIdField `json:"quasiIds,omitempty"`
  282. // RelativeFrequency: The relative frequency column must contain a
  283. // floating-point number
  284. // between 0 and 1 (inclusive). Null values are assumed to be
  285. // zero.
  286. // [required]
  287. RelativeFrequency *GooglePrivacyDlpV2beta1FieldId `json:"relativeFrequency,omitempty"`
  288. // Table: Auxiliary table location. [required]
  289. Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"`
  290. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  291. // unconditionally include in API requests. By default, fields with
  292. // empty values are omitted from API requests. However, any non-pointer,
  293. // non-interface field appearing in ForceSendFields will be sent to the
  294. // server regardless of whether the field is empty or not. This may be
  295. // used to include empty fields in Patch requests.
  296. ForceSendFields []string `json:"-"`
  297. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  298. // API requests with the JSON null value. By default, fields with empty
  299. // values are omitted from API requests. However, any field with an
  300. // empty value appearing in NullFields will be sent to the server as
  301. // null. It is an error if a field in this list has a non-empty value.
  302. // This may be used to include null fields in Patch requests.
  303. NullFields []string `json:"-"`
  304. }
  305. func (s *GooglePrivacyDlpV2beta1AuxiliaryTable) MarshalJSON() ([]byte, error) {
  306. type NoMethod GooglePrivacyDlpV2beta1AuxiliaryTable
  307. raw := NoMethod(*s)
  308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  309. }
  310. // GooglePrivacyDlpV2beta1BigQueryKey: LINT.IfChange
  311. // Row key for identifying a record in BigQuery table.
  312. type GooglePrivacyDlpV2beta1BigQueryKey struct {
  313. // RowNumber: Absolute number of the row from the beginning of the table
  314. // at the time
  315. // of scanning.
  316. RowNumber int64 `json:"rowNumber,omitempty,string"`
  317. // TableReference: Complete BigQuery table reference.
  318. TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"`
  319. // ForceSendFields is a list of field names (e.g. "RowNumber") to
  320. // unconditionally include in API requests. By default, fields with
  321. // empty values are omitted from API requests. However, any non-pointer,
  322. // non-interface field appearing in ForceSendFields will be sent to the
  323. // server regardless of whether the field is empty or not. This may be
  324. // used to include empty fields in Patch requests.
  325. ForceSendFields []string `json:"-"`
  326. // NullFields is a list of field names (e.g. "RowNumber") to include in
  327. // API requests with the JSON null value. By default, fields with empty
  328. // values are omitted from API requests. However, any field with an
  329. // empty value appearing in NullFields will be sent to the server as
  330. // null. It is an error if a field in this list has a non-empty value.
  331. // This may be used to include null fields in Patch requests.
  332. NullFields []string `json:"-"`
  333. }
  334. func (s *GooglePrivacyDlpV2beta1BigQueryKey) MarshalJSON() ([]byte, error) {
  335. type NoMethod GooglePrivacyDlpV2beta1BigQueryKey
  336. raw := NoMethod(*s)
  337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  338. }
  339. // GooglePrivacyDlpV2beta1BigQueryOptions: Options defining BigQuery
  340. // table and row identifiers.
  341. type GooglePrivacyDlpV2beta1BigQueryOptions struct {
  342. // IdentifyingFields: References to fields uniquely identifying rows
  343. // within the table.
  344. // Nested fields in the format, like `person.birthdate.year`, are
  345. // allowed.
  346. IdentifyingFields []*GooglePrivacyDlpV2beta1FieldId `json:"identifyingFields,omitempty"`
  347. // TableReference: Complete BigQuery table reference.
  348. TableReference *GooglePrivacyDlpV2beta1BigQueryTable `json:"tableReference,omitempty"`
  349. // ForceSendFields is a list of field names (e.g. "IdentifyingFields")
  350. // to unconditionally include in API requests. By default, fields with
  351. // empty values are omitted from API requests. However, any non-pointer,
  352. // non-interface field appearing in ForceSendFields will be sent to the
  353. // server regardless of whether the field is empty or not. This may be
  354. // used to include empty fields in Patch requests.
  355. ForceSendFields []string `json:"-"`
  356. // NullFields is a list of field names (e.g. "IdentifyingFields") to
  357. // include in API requests with the JSON null value. By default, fields
  358. // with empty values are omitted from API requests. However, any field
  359. // with an empty value appearing in NullFields will be sent to the
  360. // server as null. It is an error if a field in this list has a
  361. // non-empty value. This may be used to include null fields in Patch
  362. // requests.
  363. NullFields []string `json:"-"`
  364. }
  365. func (s *GooglePrivacyDlpV2beta1BigQueryOptions) MarshalJSON() ([]byte, error) {
  366. type NoMethod GooglePrivacyDlpV2beta1BigQueryOptions
  367. raw := NoMethod(*s)
  368. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  369. }
  370. // GooglePrivacyDlpV2beta1BigQueryTable: Message defining the location
  371. // of a BigQuery table. A table is uniquely
  372. // identified by its project_id, dataset_id, and table_name. Within a
  373. // query
  374. // a table is often referenced with a string in the format
  375. // of:
  376. // `<project_id>:<dataset_id>.<table_id>`
  377. // or
  378. // `<project_id>.<dataset_id>.<table_id>`.
  379. type GooglePrivacyDlpV2beta1BigQueryTable struct {
  380. // DatasetId: Dataset ID of the table.
  381. DatasetId string `json:"datasetId,omitempty"`
  382. // ProjectId: The Google Cloud Platform project ID of the project
  383. // containing the table.
  384. // If omitted, project ID is inferred from the API call.
  385. ProjectId string `json:"projectId,omitempty"`
  386. // TableId: Name of the table.
  387. TableId string `json:"tableId,omitempty"`
  388. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  389. // unconditionally include in API requests. By default, fields with
  390. // empty values are omitted from API requests. However, any non-pointer,
  391. // non-interface field appearing in ForceSendFields will be sent to the
  392. // server regardless of whether the field is empty or not. This may be
  393. // used to include empty fields in Patch requests.
  394. ForceSendFields []string `json:"-"`
  395. // NullFields is a list of field names (e.g. "DatasetId") to include in
  396. // API requests with the JSON null value. By default, fields with empty
  397. // values are omitted from API requests. However, any field with an
  398. // empty value appearing in NullFields will be sent to the server as
  399. // null. It is an error if a field in this list has a non-empty value.
  400. // This may be used to include null fields in Patch requests.
  401. NullFields []string `json:"-"`
  402. }
  403. func (s *GooglePrivacyDlpV2beta1BigQueryTable) MarshalJSON() ([]byte, error) {
  404. type NoMethod GooglePrivacyDlpV2beta1BigQueryTable
  405. raw := NoMethod(*s)
  406. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  407. }
  408. // GooglePrivacyDlpV2beta1Bucket: Buckets represented as ranges, along
  409. // with replacement values. Ranges must
  410. // be non-overlapping.
  411. type GooglePrivacyDlpV2beta1Bucket struct {
  412. // Max: Upper bound of the range, exclusive; type must match min.
  413. Max *GooglePrivacyDlpV2beta1Value `json:"max,omitempty"`
  414. // Min: Lower bound of the range, inclusive. Type should be the same as
  415. // max if
  416. // used.
  417. Min *GooglePrivacyDlpV2beta1Value `json:"min,omitempty"`
  418. // ReplacementValue: Replacement value for this bucket. If not
  419. // provided
  420. // the default behavior will be to hyphenate the min-max range.
  421. ReplacementValue *GooglePrivacyDlpV2beta1Value `json:"replacementValue,omitempty"`
  422. // ForceSendFields is a list of field names (e.g. "Max") to
  423. // unconditionally include in API requests. By default, fields with
  424. // empty values are omitted from API requests. However, any non-pointer,
  425. // non-interface field appearing in ForceSendFields will be sent to the
  426. // server regardless of whether the field is empty or not. This may be
  427. // used to include empty fields in Patch requests.
  428. ForceSendFields []string `json:"-"`
  429. // NullFields is a list of field names (e.g. "Max") to include in API
  430. // requests with the JSON null value. By default, fields with empty
  431. // values are omitted from API requests. However, any field with an
  432. // empty value appearing in NullFields will be sent to the server as
  433. // null. It is an error if a field in this list has a non-empty value.
  434. // This may be used to include null fields in Patch requests.
  435. NullFields []string `json:"-"`
  436. }
  437. func (s *GooglePrivacyDlpV2beta1Bucket) MarshalJSON() ([]byte, error) {
  438. type NoMethod GooglePrivacyDlpV2beta1Bucket
  439. raw := NoMethod(*s)
  440. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  441. }
  442. // GooglePrivacyDlpV2beta1BucketingConfig: Generalization function that
  443. // buckets values based on ranges. The ranges and
  444. // replacement values are dynamically provided by the user for custom
  445. // behavior,
  446. // such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
  447. // This can be used on
  448. // data of type: number, long, string, timestamp.
  449. // If the bound `Value` type differs from the type of data being
  450. // transformed, we
  451. // will first attempt converting the type of the data to be transformed
  452. // to match
  453. // the type of the bound before comparing.
  454. type GooglePrivacyDlpV2beta1BucketingConfig struct {
  455. Buckets []*GooglePrivacyDlpV2beta1Bucket `json:"buckets,omitempty"`
  456. // ForceSendFields is a list of field names (e.g. "Buckets") to
  457. // unconditionally include in API requests. By default, fields with
  458. // empty values are omitted from API requests. However, any non-pointer,
  459. // non-interface field appearing in ForceSendFields will be sent to the
  460. // server regardless of whether the field is empty or not. This may be
  461. // used to include empty fields in Patch requests.
  462. ForceSendFields []string `json:"-"`
  463. // NullFields is a list of field names (e.g. "Buckets") to include in
  464. // API requests with the JSON null value. By default, fields with empty
  465. // values are omitted from API requests. However, any field with an
  466. // empty value appearing in NullFields will be sent to the server as
  467. // null. It is an error if a field in this list has a non-empty value.
  468. // This may be used to include null fields in Patch requests.
  469. NullFields []string `json:"-"`
  470. }
  471. func (s *GooglePrivacyDlpV2beta1BucketingConfig) MarshalJSON() ([]byte, error) {
  472. type NoMethod GooglePrivacyDlpV2beta1BucketingConfig
  473. raw := NoMethod(*s)
  474. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  475. }
  476. // GooglePrivacyDlpV2beta1CategoricalStatsConfig: Compute numerical
  477. // stats over an individual column, including
  478. // number of distinct values and value count distribution.
  479. type GooglePrivacyDlpV2beta1CategoricalStatsConfig struct {
  480. // Field: Field to compute categorical stats on. All column types
  481. // are
  482. // supported except for arrays and structs. However, it may be
  483. // more
  484. // informative to use NumericalStats when the field type is
  485. // supported,
  486. // depending on the data.
  487. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  488. // ForceSendFields is a list of field names (e.g. "Field") to
  489. // unconditionally include in API requests. By default, fields with
  490. // empty values are omitted from API requests. However, any non-pointer,
  491. // non-interface field appearing in ForceSendFields will be sent to the
  492. // server regardless of whether the field is empty or not. This may be
  493. // used to include empty fields in Patch requests.
  494. ForceSendFields []string `json:"-"`
  495. // NullFields is a list of field names (e.g. "Field") to include in API
  496. // requests with the JSON null value. By default, fields with empty
  497. // values are omitted from API requests. However, any field with an
  498. // empty value appearing in NullFields will be sent to the server as
  499. // null. It is an error if a field in this list has a non-empty value.
  500. // This may be used to include null fields in Patch requests.
  501. NullFields []string `json:"-"`
  502. }
  503. func (s *GooglePrivacyDlpV2beta1CategoricalStatsConfig) MarshalJSON() ([]byte, error) {
  504. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsConfig
  505. raw := NoMethod(*s)
  506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  507. }
  508. // GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket: Histogram
  509. // bucket of value frequencies in the column.
  510. type GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket struct {
  511. // BucketSize: Total number of records in this bucket.
  512. BucketSize int64 `json:"bucketSize,omitempty,string"`
  513. // BucketValues: Sample of value frequencies in this bucket. The total
  514. // number of
  515. // values returned per bucket is capped at 20.
  516. BucketValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"bucketValues,omitempty"`
  517. // ValueFrequencyLowerBound: Lower bound on the value frequency of the
  518. // values in this bucket.
  519. ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"`
  520. // ValueFrequencyUpperBound: Upper bound on the value frequency of the
  521. // values in this bucket.
  522. ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"`
  523. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  524. // unconditionally include in API requests. By default, fields with
  525. // empty values are omitted from API requests. However, any non-pointer,
  526. // non-interface field appearing in ForceSendFields will be sent to the
  527. // server regardless of whether the field is empty or not. This may be
  528. // used to include empty fields in Patch requests.
  529. ForceSendFields []string `json:"-"`
  530. // NullFields is a list of field names (e.g. "BucketSize") to include in
  531. // API requests with the JSON null value. By default, fields with empty
  532. // values are omitted from API requests. However, any field with an
  533. // empty value appearing in NullFields will be sent to the server as
  534. // null. It is an error if a field in this list has a non-empty value.
  535. // This may be used to include null fields in Patch requests.
  536. NullFields []string `json:"-"`
  537. }
  538. func (s *GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) {
  539. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket
  540. raw := NoMethod(*s)
  541. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  542. }
  543. // GooglePrivacyDlpV2beta1CategoricalStatsResult: Result of the
  544. // categorical stats computation.
  545. type GooglePrivacyDlpV2beta1CategoricalStatsResult struct {
  546. // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the
  547. // column.
  548. ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"`
  549. // ForceSendFields is a list of field names (e.g.
  550. // "ValueFrequencyHistogramBuckets") to unconditionally include in API
  551. // requests. By default, fields with empty values are omitted from API
  552. // requests. However, any non-pointer, non-interface field appearing in
  553. // ForceSendFields will be sent to the server regardless of whether the
  554. // field is empty or not. This may be used to include empty fields in
  555. // Patch requests.
  556. ForceSendFields []string `json:"-"`
  557. // NullFields is a list of field names (e.g.
  558. // "ValueFrequencyHistogramBuckets") to include in API requests with the
  559. // JSON null value. By default, fields with empty values are omitted
  560. // from API requests. However, any field with an empty value appearing
  561. // in NullFields will be sent to the server as null. It is an error if a
  562. // field in this list has a non-empty value. This may be used to include
  563. // null fields in Patch requests.
  564. NullFields []string `json:"-"`
  565. }
  566. func (s *GooglePrivacyDlpV2beta1CategoricalStatsResult) MarshalJSON() ([]byte, error) {
  567. type NoMethod GooglePrivacyDlpV2beta1CategoricalStatsResult
  568. raw := NoMethod(*s)
  569. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  570. }
  571. // GooglePrivacyDlpV2beta1CategoryDescription: Info Type Category
  572. // description.
  573. type GooglePrivacyDlpV2beta1CategoryDescription struct {
  574. // DisplayName: Human readable form of the category name.
  575. DisplayName string `json:"displayName,omitempty"`
  576. // Name: Internal name of the category.
  577. Name string `json:"name,omitempty"`
  578. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  579. // unconditionally include in API requests. By default, fields with
  580. // empty values are omitted from API requests. However, any non-pointer,
  581. // non-interface field appearing in ForceSendFields will be sent to the
  582. // server regardless of whether the field is empty or not. This may be
  583. // used to include empty fields in Patch requests.
  584. ForceSendFields []string `json:"-"`
  585. // NullFields is a list of field names (e.g. "DisplayName") to include
  586. // in API requests with the JSON null value. By default, fields with
  587. // empty values are omitted from API requests. However, any field with
  588. // an empty value appearing in NullFields will be sent to the server as
  589. // null. It is an error if a field in this list has a non-empty value.
  590. // This may be used to include null fields in Patch requests.
  591. NullFields []string `json:"-"`
  592. }
  593. func (s *GooglePrivacyDlpV2beta1CategoryDescription) MarshalJSON() ([]byte, error) {
  594. type NoMethod GooglePrivacyDlpV2beta1CategoryDescription
  595. raw := NoMethod(*s)
  596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  597. }
  598. // GooglePrivacyDlpV2beta1CharacterMaskConfig: Partially mask a string
  599. // by replacing a given number of characters with a
  600. // fixed character. Masking can start from the beginning or end of the
  601. // string.
  602. // This can be used on data of any type (numbers, longs, and so on) and
  603. // when
  604. // de-identifying structured data we'll attempt to preserve the original
  605. // data's
  606. // type. (This allows you to take a long like 123 and modify it to a
  607. // string like
  608. // **3.
  609. type GooglePrivacyDlpV2beta1CharacterMaskConfig struct {
  610. // CharactersToIgnore: When masking a string, items in this list will be
  611. // skipped when replacing.
  612. // For example, if your string is 555-555-5555 and you ask us to skip
  613. // `-` and
  614. // mask 5 chars with * we would produce ***-*55-5555.
  615. CharactersToIgnore []*GooglePrivacyDlpV2beta1CharsToIgnore `json:"charactersToIgnore,omitempty"`
  616. // MaskingCharacter: Character to mask the sensitive values&mdash;for
  617. // example, "*" for an
  618. // alphabetic string such as name, or "0" for a numeric string such as
  619. // ZIP
  620. // code or credit card number. String must have length 1. If not
  621. // supplied, we
  622. // will default to "*" for strings, 0 for digits.
  623. MaskingCharacter string `json:"maskingCharacter,omitempty"`
  624. // NumberToMask: Number of characters to mask. If not set, all matching
  625. // chars will be
  626. // masked. Skipped characters do not count towards this tally.
  627. NumberToMask int64 `json:"numberToMask,omitempty"`
  628. // ReverseOrder: Mask characters in reverse order. For example, if
  629. // `masking_character` is
  630. // '0', number_to_mask is 14, and `reverse_order` is false,
  631. // then
  632. // 1234-5678-9012-3456 -> 00000000000000-3456
  633. // If `masking_character` is '*', `number_to_mask` is 3, and
  634. // `reverse_order`
  635. // is true, then 12345 -> 12***
  636. ReverseOrder bool `json:"reverseOrder,omitempty"`
  637. // ForceSendFields is a list of field names (e.g. "CharactersToIgnore")
  638. // to unconditionally include in API requests. By default, fields with
  639. // empty values are omitted from API requests. However, any non-pointer,
  640. // non-interface field appearing in ForceSendFields will be sent to the
  641. // server regardless of whether the field is empty or not. This may be
  642. // used to include empty fields in Patch requests.
  643. ForceSendFields []string `json:"-"`
  644. // NullFields is a list of field names (e.g. "CharactersToIgnore") to
  645. // include in API requests with the JSON null value. By default, fields
  646. // with empty values are omitted from API requests. However, any field
  647. // with an empty value appearing in NullFields will be sent to the
  648. // server as null. It is an error if a field in this list has a
  649. // non-empty value. This may be used to include null fields in Patch
  650. // requests.
  651. NullFields []string `json:"-"`
  652. }
  653. func (s *GooglePrivacyDlpV2beta1CharacterMaskConfig) MarshalJSON() ([]byte, error) {
  654. type NoMethod GooglePrivacyDlpV2beta1CharacterMaskConfig
  655. raw := NoMethod(*s)
  656. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  657. }
  658. // GooglePrivacyDlpV2beta1CharsToIgnore: Characters to skip when doing
  659. // deidentification of a value. These will be left
  660. // alone and skipped.
  661. type GooglePrivacyDlpV2beta1CharsToIgnore struct {
  662. CharactersToSkip string `json:"charactersToSkip,omitempty"`
  663. // Possible values:
  664. // "CHARACTER_GROUP_UNSPECIFIED"
  665. // "NUMERIC" - 0-9
  666. // "ALPHA_UPPER_CASE" - A-Z
  667. // "ALPHA_LOWER_CASE" - a-z
  668. // "PUNCTUATION" - US Punctuation, one of
  669. // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  670. // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r]
  671. CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"`
  672. // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to
  673. // unconditionally include in API requests. By default, fields with
  674. // empty values are omitted from API requests. However, any non-pointer,
  675. // non-interface field appearing in ForceSendFields will be sent to the
  676. // server regardless of whether the field is empty or not. This may be
  677. // used to include empty fields in Patch requests.
  678. ForceSendFields []string `json:"-"`
  679. // NullFields is a list of field names (e.g. "CharactersToSkip") to
  680. // include in API requests with the JSON null value. By default, fields
  681. // with empty values are omitted from API requests. However, any field
  682. // with an empty value appearing in NullFields will be sent to the
  683. // server as null. It is an error if a field in this list has a
  684. // non-empty value. This may be used to include null fields in Patch
  685. // requests.
  686. NullFields []string `json:"-"`
  687. }
  688. func (s *GooglePrivacyDlpV2beta1CharsToIgnore) MarshalJSON() ([]byte, error) {
  689. type NoMethod GooglePrivacyDlpV2beta1CharsToIgnore
  690. raw := NoMethod(*s)
  691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  692. }
  693. // GooglePrivacyDlpV2beta1CloudStorageKey: Record key for a finding in a
  694. // Cloud Storage file.
  695. type GooglePrivacyDlpV2beta1CloudStorageKey struct {
  696. // FilePath: Path to the file.
  697. FilePath string `json:"filePath,omitempty"`
  698. // StartOffset: Byte offset of the referenced data in the file.
  699. StartOffset int64 `json:"startOffset,omitempty,string"`
  700. // ForceSendFields is a list of field names (e.g. "FilePath") to
  701. // unconditionally include in API requests. By default, fields with
  702. // empty values are omitted from API requests. However, any non-pointer,
  703. // non-interface field appearing in ForceSendFields will be sent to the
  704. // server regardless of whether the field is empty or not. This may be
  705. // used to include empty fields in Patch requests.
  706. ForceSendFields []string `json:"-"`
  707. // NullFields is a list of field names (e.g. "FilePath") to include in
  708. // API requests with the JSON null value. By default, fields with empty
  709. // values are omitted from API requests. However, any field with an
  710. // empty value appearing in NullFields will be sent to the server as
  711. // null. It is an error if a field in this list has a non-empty value.
  712. // This may be used to include null fields in Patch requests.
  713. NullFields []string `json:"-"`
  714. }
  715. func (s *GooglePrivacyDlpV2beta1CloudStorageKey) MarshalJSON() ([]byte, error) {
  716. type NoMethod GooglePrivacyDlpV2beta1CloudStorageKey
  717. raw := NoMethod(*s)
  718. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  719. }
  720. // GooglePrivacyDlpV2beta1CloudStorageOptions: Options defining a file
  721. // or a set of files (path ending with *) within
  722. // a Google Cloud Storage bucket.
  723. type GooglePrivacyDlpV2beta1CloudStorageOptions struct {
  724. FileSet *GooglePrivacyDlpV2beta1FileSet `json:"fileSet,omitempty"`
  725. // ForceSendFields is a list of field names (e.g. "FileSet") to
  726. // unconditionally include in API requests. By default, fields with
  727. // empty values are omitted from API requests. However, any non-pointer,
  728. // non-interface field appearing in ForceSendFields will be sent to the
  729. // server regardless of whether the field is empty or not. This may be
  730. // used to include empty fields in Patch requests.
  731. ForceSendFields []string `json:"-"`
  732. // NullFields is a list of field names (e.g. "FileSet") to include in
  733. // API requests with the JSON null value. By default, fields with empty
  734. // values are omitted from API requests. However, any field with an
  735. // empty value appearing in NullFields will be sent to the server as
  736. // null. It is an error if a field in this list has a non-empty value.
  737. // This may be used to include null fields in Patch requests.
  738. NullFields []string `json:"-"`
  739. }
  740. func (s *GooglePrivacyDlpV2beta1CloudStorageOptions) MarshalJSON() ([]byte, error) {
  741. type NoMethod GooglePrivacyDlpV2beta1CloudStorageOptions
  742. raw := NoMethod(*s)
  743. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  744. }
  745. // GooglePrivacyDlpV2beta1CloudStoragePath: A location in Cloud Storage.
  746. type GooglePrivacyDlpV2beta1CloudStoragePath struct {
  747. // Path: The url, in the format of `gs://bucket/<path>`.
  748. Path string `json:"path,omitempty"`
  749. // ForceSendFields is a list of field names (e.g. "Path") to
  750. // unconditionally include in API requests. By default, fields with
  751. // empty values are omitted from API requests. However, any non-pointer,
  752. // non-interface field appearing in ForceSendFields will be sent to the
  753. // server regardless of whether the field is empty or not. This may be
  754. // used to include empty fields in Patch requests.
  755. ForceSendFields []string `json:"-"`
  756. // NullFields is a list of field names (e.g. "Path") to include in API
  757. // requests with the JSON null value. By default, fields with empty
  758. // values are omitted from API requests. However, any field with an
  759. // empty value appearing in NullFields will be sent to the server as
  760. // null. It is an error if a field in this list has a non-empty value.
  761. // This may be used to include null fields in Patch requests.
  762. NullFields []string `json:"-"`
  763. }
  764. func (s *GooglePrivacyDlpV2beta1CloudStoragePath) MarshalJSON() ([]byte, error) {
  765. type NoMethod GooglePrivacyDlpV2beta1CloudStoragePath
  766. raw := NoMethod(*s)
  767. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  768. }
  769. // GooglePrivacyDlpV2beta1Color: Represents a color in the RGB color
  770. // space.
  771. type GooglePrivacyDlpV2beta1Color struct {
  772. // Blue: The amount of blue in the color as a value in the interval [0,
  773. // 1].
  774. Blue float64 `json:"blue,omitempty"`
  775. // Green: The amount of green in the color as a value in the interval
  776. // [0, 1].
  777. Green float64 `json:"green,omitempty"`
  778. // Red: The amount of red in the color as a value in the interval [0,
  779. // 1].
  780. Red float64 `json:"red,omitempty"`
  781. // ForceSendFields is a list of field names (e.g. "Blue") to
  782. // unconditionally include in API requests. By default, fields with
  783. // empty values are omitted from API requests. However, any non-pointer,
  784. // non-interface field appearing in ForceSendFields will be sent to the
  785. // server regardless of whether the field is empty or not. This may be
  786. // used to include empty fields in Patch requests.
  787. ForceSendFields []string `json:"-"`
  788. // NullFields is a list of field names (e.g. "Blue") to include in API
  789. // requests with the JSON null value. By default, fields with empty
  790. // values are omitted from API requests. However, any field with an
  791. // empty value appearing in NullFields will be sent to the server as
  792. // null. It is an error if a field in this list has a non-empty value.
  793. // This may be used to include null fields in Patch requests.
  794. NullFields []string `json:"-"`
  795. }
  796. func (s *GooglePrivacyDlpV2beta1Color) MarshalJSON() ([]byte, error) {
  797. type NoMethod GooglePrivacyDlpV2beta1Color
  798. raw := NoMethod(*s)
  799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  800. }
  801. func (s *GooglePrivacyDlpV2beta1Color) UnmarshalJSON(data []byte) error {
  802. type NoMethod GooglePrivacyDlpV2beta1Color
  803. var s1 struct {
  804. Blue gensupport.JSONFloat64 `json:"blue"`
  805. Green gensupport.JSONFloat64 `json:"green"`
  806. Red gensupport.JSONFloat64 `json:"red"`
  807. *NoMethod
  808. }
  809. s1.NoMethod = (*NoMethod)(s)
  810. if err := json.Unmarshal(data, &s1); err != nil {
  811. return err
  812. }
  813. s.Blue = float64(s1.Blue)
  814. s.Green = float64(s1.Green)
  815. s.Red = float64(s1.Red)
  816. return nil
  817. }
  818. // GooglePrivacyDlpV2beta1Condition: The field type of `value` and
  819. // `field` do not need to match to be
  820. // considered equal, but not all comparisons are possible.
  821. //
  822. // A `value` of type:
  823. //
  824. // - `string` can be compared against all other types
  825. // - `boolean` can only be compared against other booleans
  826. // - `integer` can be compared against doubles or a string if the string
  827. // value
  828. // can be parsed as an integer.
  829. // - `double` can be compared against integers or a string if the string
  830. // can
  831. // be parsed as a double.
  832. // - `Timestamp` can be compared against strings in RFC 3339 date
  833. // string
  834. // format.
  835. // - `TimeOfDay` can be compared against timestamps and strings in the
  836. // format
  837. // of 'HH:mm:ss'.
  838. //
  839. // If we fail to compare do to type mismatch, a warning will be given
  840. // and
  841. // the condition will evaluate to false.
  842. type GooglePrivacyDlpV2beta1Condition struct {
  843. // Field: Field within the record this condition is evaluated against.
  844. // [required]
  845. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  846. // Operator: Operator used to compare the field or info type to the
  847. // value. [required]
  848. //
  849. // Possible values:
  850. // "RELATIONAL_OPERATOR_UNSPECIFIED"
  851. // "EQUAL_TO" - Equal.
  852. // "NOT_EQUAL_TO" - Not equal to.
  853. // "GREATER_THAN" - Greater than.
  854. // "LESS_THAN" - Less than.
  855. // "GREATER_THAN_OR_EQUALS" - Greater than or equals.
  856. // "LESS_THAN_OR_EQUALS" - Less than or equals.
  857. // "EXISTS" - Exists
  858. Operator string `json:"operator,omitempty"`
  859. // Value: Value to compare against. [Required, except for `EXISTS`
  860. // tests.]
  861. Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"`
  862. // ForceSendFields is a list of field names (e.g. "Field") to
  863. // unconditionally include in API requests. By default, fields with
  864. // empty values are omitted from API requests. However, any non-pointer,
  865. // non-interface field appearing in ForceSendFields will be sent to the
  866. // server regardless of whether the field is empty or not. This may be
  867. // used to include empty fields in Patch requests.
  868. ForceSendFields []string `json:"-"`
  869. // NullFields is a list of field names (e.g. "Field") to include in API
  870. // requests with the JSON null value. By default, fields with empty
  871. // values are omitted from API requests. However, any field with an
  872. // empty value appearing in NullFields will be sent to the server as
  873. // null. It is an error if a field in this list has a non-empty value.
  874. // This may be used to include null fields in Patch requests.
  875. NullFields []string `json:"-"`
  876. }
  877. func (s *GooglePrivacyDlpV2beta1Condition) MarshalJSON() ([]byte, error) {
  878. type NoMethod GooglePrivacyDlpV2beta1Condition
  879. raw := NoMethod(*s)
  880. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  881. }
  882. type GooglePrivacyDlpV2beta1Conditions struct {
  883. Conditions []*GooglePrivacyDlpV2beta1Condition `json:"conditions,omitempty"`
  884. // ForceSendFields is a list of field names (e.g. "Conditions") to
  885. // unconditionally include in API requests. By default, fields with
  886. // empty values are omitted from API requests. However, any non-pointer,
  887. // non-interface field appearing in ForceSendFields will be sent to the
  888. // server regardless of whether the field is empty or not. This may be
  889. // used to include empty fields in Patch requests.
  890. ForceSendFields []string `json:"-"`
  891. // NullFields is a list of field names (e.g. "Conditions") to include in
  892. // API requests with the JSON null value. By default, fields with empty
  893. // values are omitted from API requests. However, any field with an
  894. // empty value appearing in NullFields will be sent to the server as
  895. // null. It is an error if a field in this list has a non-empty value.
  896. // This may be used to include null fields in Patch requests.
  897. NullFields []string `json:"-"`
  898. }
  899. func (s *GooglePrivacyDlpV2beta1Conditions) MarshalJSON() ([]byte, error) {
  900. type NoMethod GooglePrivacyDlpV2beta1Conditions
  901. raw := NoMethod(*s)
  902. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  903. }
  904. // GooglePrivacyDlpV2beta1ContentItem: Container structure for the
  905. // content to inspect.
  906. type GooglePrivacyDlpV2beta1ContentItem struct {
  907. // Data: Content data to inspect or redact.
  908. Data string `json:"data,omitempty"`
  909. // Table: Structured content for inspection.
  910. Table *GooglePrivacyDlpV2beta1Table `json:"table,omitempty"`
  911. // Type: Type of the content, as defined in Content-Type HTTP
  912. // header.
  913. // Supported types are: all "text" types, octet streams, PNG
  914. // images,
  915. // JPEG images.
  916. Type string `json:"type,omitempty"`
  917. // Value: String data to inspect or redact.
  918. Value string `json:"value,omitempty"`
  919. // ForceSendFields is a list of field names (e.g. "Data") to
  920. // unconditionally include in API requests. By default, fields with
  921. // empty values are omitted from API requests. However, any non-pointer,
  922. // non-interface field appearing in ForceSendFields will be sent to the
  923. // server regardless of whether the field is empty or not. This may be
  924. // used to include empty fields in Patch requests.
  925. ForceSendFields []string `json:"-"`
  926. // NullFields is a list of field names (e.g. "Data") to include in API
  927. // requests with the JSON null value. By default, fields with empty
  928. // values are omitted from API requests. However, any field with an
  929. // empty value appearing in NullFields will be sent to the server as
  930. // null. It is an error if a field in this list has a non-empty value.
  931. // This may be used to include null fields in Patch requests.
  932. NullFields []string `json:"-"`
  933. }
  934. func (s *GooglePrivacyDlpV2beta1ContentItem) MarshalJSON() ([]byte, error) {
  935. type NoMethod GooglePrivacyDlpV2beta1ContentItem
  936. raw := NoMethod(*s)
  937. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  938. }
  939. // GooglePrivacyDlpV2beta1CreateInspectOperationRequest: Request for
  940. // scheduling a scan of a data subset from a Google Platform
  941. // data
  942. // repository.
  943. type GooglePrivacyDlpV2beta1CreateInspectOperationRequest struct {
  944. // InspectConfig: Configuration for the inspector.
  945. InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"`
  946. // OperationConfig: Additional configuration settings for long running
  947. // operations.
  948. OperationConfig *GooglePrivacyDlpV2beta1OperationConfig `json:"operationConfig,omitempty"`
  949. // OutputConfig: Optional location to store findings.
  950. OutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"outputConfig,omitempty"`
  951. // StorageConfig: Specification of the data set to process.
  952. StorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"storageConfig,omitempty"`
  953. // ForceSendFields is a list of field names (e.g. "InspectConfig") to
  954. // unconditionally include in API requests. By default, fields with
  955. // empty values are omitted from API requests. However, any non-pointer,
  956. // non-interface field appearing in ForceSendFields will be sent to the
  957. // server regardless of whether the field is empty or not. This may be
  958. // used to include empty fields in Patch requests.
  959. ForceSendFields []string `json:"-"`
  960. // NullFields is a list of field names (e.g. "InspectConfig") to include
  961. // in API requests with the JSON null value. By default, fields with
  962. // empty values are omitted from API requests. However, any field with
  963. // an empty value appearing in NullFields will be sent to the server as
  964. // null. It is an error if a field in this list has a non-empty value.
  965. // This may be used to include null fields in Patch requests.
  966. NullFields []string `json:"-"`
  967. }
  968. func (s *GooglePrivacyDlpV2beta1CreateInspectOperationRequest) MarshalJSON() ([]byte, error) {
  969. type NoMethod GooglePrivacyDlpV2beta1CreateInspectOperationRequest
  970. raw := NoMethod(*s)
  971. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  972. }
  973. // GooglePrivacyDlpV2beta1CryptoHashConfig: Pseudonymization method that
  974. // generates surrogates via cryptographic hashing.
  975. // Uses SHA-256.
  976. // Outputs a 32 byte digest as an uppercase hex string
  977. // (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
  978. // Currently, only string and integer values can be hashed.
  979. type GooglePrivacyDlpV2beta1CryptoHashConfig struct {
  980. // CryptoKey: The key used by the hash function.
  981. CryptoKey *GooglePrivacyDlpV2beta1CryptoKey `json:"cryptoKey,omitempty"`
  982. // ForceSendFields is a list of field names (e.g. "CryptoKey") to
  983. // unconditionally include in API requests. By default, fields with
  984. // empty values are omitted from API requests. However, any non-pointer,
  985. // non-interface field appearing in ForceSendFields will be sent to the
  986. // server regardless of whether the field is empty or not. This may be
  987. // used to include empty fields in Patch requests.
  988. ForceSendFields []string `json:"-"`
  989. // NullFields is a list of field names (e.g. "CryptoKey") to include in
  990. // API requests with the JSON null value. By default, fields with empty
  991. // values are omitted from API requests. However, any field with an
  992. // empty value appearing in NullFields will be sent to the server as
  993. // null. It is an error if a field in this list has a non-empty value.
  994. // This may be used to include null fields in Patch requests.
  995. NullFields []string `json:"-"`
  996. }
  997. func (s *GooglePrivacyDlpV2beta1CryptoHashConfig) MarshalJSON() ([]byte, error) {
  998. type NoMethod GooglePrivacyDlpV2beta1CryptoHashConfig
  999. raw := NoMethod(*s)
  1000. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1001. }
  1002. // GooglePrivacyDlpV2beta1CryptoKey: This is a data encryption key (DEK)
  1003. // (as opposed to
  1004. // a key encryption key (KEK) stored by KMS).
  1005. // When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
  1006. // IAM policy on the KMS CryptoKey (KEK) to ensure an attacker
  1007. // cannot
  1008. // unwrap the data crypto key.
  1009. type GooglePrivacyDlpV2beta1CryptoKey struct {
  1010. KmsWrapped *GooglePrivacyDlpV2beta1KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
  1011. Transient *GooglePrivacyDlpV2beta1TransientCryptoKey `json:"transient,omitempty"`
  1012. Unwrapped *GooglePrivacyDlpV2beta1UnwrappedCryptoKey `json:"unwrapped,omitempty"`
  1013. // ForceSendFields is a list of field names (e.g. "KmsWrapped") to
  1014. // unconditionally include in API requests. By default, fields with
  1015. // empty values are omitted from API requests. However, any non-pointer,
  1016. // non-interface field appearing in ForceSendFields will be sent to the
  1017. // server regardless of whether the field is empty or not. This may be
  1018. // used to include empty fields in Patch requests.
  1019. ForceSendFields []string `json:"-"`
  1020. // NullFields is a list of field names (e.g. "KmsWrapped") to include in
  1021. // API requests with the JSON null value. By default, fields with empty
  1022. // values are omitted from API requests. However, any field with an
  1023. // empty value appearing in NullFields will be sent to the server as
  1024. // null. It is an error if a field in this list has a non-empty value.
  1025. // This may be used to include null fields in Patch requests.
  1026. NullFields []string `json:"-"`
  1027. }
  1028. func (s *GooglePrivacyDlpV2beta1CryptoKey) MarshalJSON() ([]byte, error) {
  1029. type NoMethod GooglePrivacyDlpV2beta1CryptoKey
  1030. raw := NoMethod(*s)
  1031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1032. }
  1033. // GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig: Replaces an
  1034. // identifier with a surrogate using FPE with the FFX
  1035. // mode of operation.
  1036. // The identifier must be representable by the US-ASCII character
  1037. // set.
  1038. // For a given crypto key and context, the same identifier will
  1039. // be
  1040. // replaced with the same surrogate.
  1041. // Identifiers must be at least two characters long.
  1042. // In the case that the identifier is the empty string, it will be
  1043. // skipped.
  1044. type GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig struct {
  1045. // Possible values:
  1046. // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED"
  1047. // "NUMERIC" - [0-9] (radix of 10)
  1048. // "HEXADECIMAL" - [0-9A-F] (radix of 16)
  1049. // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36)
  1050. // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62)
  1051. CommonAlphabet string `json:"commonAlphabet,omitempty"`
  1052. // Context: A context may be used for higher security since the
  1053. // same
  1054. // identifier in two different contexts likely will be given a
  1055. // distinct
  1056. // surrogate. The principle is that the likeliness is inversely
  1057. // related
  1058. // to the ratio of the number of distinct identifiers per context over
  1059. // the
  1060. // number of possible surrogates: As long as this ratio is small,
  1061. // the
  1062. // likehood is large.
  1063. //
  1064. // If the context is not set, a default tweak will be used.
  1065. // If the context is set but:
  1066. //
  1067. // 1. there is no record present when transforming a given value or
  1068. // 1. the field is not present when transforming a given value,
  1069. //
  1070. // a default tweak will be used.
  1071. //
  1072. // Note that case (1) is expected when an `InfoTypeTransformation`
  1073. // is
  1074. // applied to both structured and non-structured
  1075. // `ContentItem`s.
  1076. // Currently, the referenced field may be of value type integer or
  1077. // string.
  1078. //
  1079. // The tweak is constructed as a sequence of bytes in big endian byte
  1080. // order
  1081. // such that:
  1082. //
  1083. // - a 64 bit integer is encoded followed by a single byte of value 1
  1084. // - a string is encoded in UTF-8 format followed by a single byte of
  1085. // value 2
  1086. //
  1087. // This is also known as the 'tweak', as in tweakable encryption.
  1088. Context *GooglePrivacyDlpV2beta1FieldId `json:"context,omitempty"`
  1089. // CryptoKey: The key used by the encryption algorithm. [required]
  1090. CryptoKey *GooglePrivacyDlpV2beta1CryptoKey `json:"cryptoKey,omitempty"`
  1091. // CustomAlphabet: This is supported by mapping these to the
  1092. // alphanumeric characters
  1093. // that the FFX mode natively supports. This happens
  1094. // before/after
  1095. // encryption/decryption.
  1096. // Each character listed must appear only once.
  1097. // Number of characters must be in the range [2, 62].
  1098. // This must be encoded as ASCII.
  1099. // The order of characters does not matter.
  1100. CustomAlphabet string `json:"customAlphabet,omitempty"`
  1101. // Radix: The native way to select the alphabet. Must be in the range
  1102. // [2, 62].
  1103. Radix int64 `json:"radix,omitempty"`
  1104. // SurrogateInfoType: The custom info type to annotate the surrogate
  1105. // with.
  1106. // This annotation will be applied to the surrogate by prefixing it
  1107. // with
  1108. // the name of the custom info type followed by the number of
  1109. // characters comprising the surrogate. The following scheme defines
  1110. // the
  1111. // format: info_type_name(surrogate_character_count):surrogate
  1112. //
  1113. // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE'
  1114. // and
  1115. // the surrogate is 'abc', the full replacement value
  1116. // will be: 'MY_TOKEN_INFO_TYPE(3):abc'
  1117. //
  1118. // This annotation identifies the surrogate when inspecting content
  1119. // using the
  1120. // custom info
  1121. // type
  1122. // [`SurrogateType`](/dlp/docs/reference/rest/v2beta1/InspectConfig#
  1123. // surrogatetype).
  1124. // This facilitates reversal of the surrogate when it occurs in free
  1125. // text.
  1126. //
  1127. // In order for inspection to work properly, the name of this info type
  1128. // must
  1129. // not occur naturally anywhere in your data; otherwise, inspection
  1130. // may
  1131. // find a surrogate that does not correspond to an actual
  1132. // identifier.
  1133. // Therefore, choose your custom info type name carefully after
  1134. // considering
  1135. // what your data looks like. One way to select a name that has a high
  1136. // chance
  1137. // of yielding reliable detection is to include one or more unicode
  1138. // characters
  1139. // that are highly improbable to exist in your data.
  1140. // For example, assuming your data is entered from a regular ASCII
  1141. // keyboard,
  1142. // the symbol with the hex code point 29DD might be used like
  1143. // so:
  1144. // ⧝MY_TOKEN_TYPE
  1145. SurrogateInfoType *GooglePrivacyDlpV2beta1InfoType `json:"surrogateInfoType,omitempty"`
  1146. // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to
  1147. // unconditionally include in API requests. By default, fields with
  1148. // empty values are omitted from API requests. However, any non-pointer,
  1149. // non-interface field appearing in ForceSendFields will be sent to the
  1150. // server regardless of whether the field is empty or not. This may be
  1151. // used to include empty fields in Patch requests.
  1152. ForceSendFields []string `json:"-"`
  1153. // NullFields is a list of field names (e.g. "CommonAlphabet") to
  1154. // include in API requests with the JSON null value. By default, fields
  1155. // with empty values are omitted from API requests. However, any field
  1156. // with an empty value appearing in NullFields will be sent to the
  1157. // server as null. It is an error if a field in this list has a
  1158. // non-empty value. This may be used to include null fields in Patch
  1159. // requests.
  1160. NullFields []string `json:"-"`
  1161. }
  1162. func (s *GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) {
  1163. type NoMethod GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig
  1164. raw := NoMethod(*s)
  1165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1166. }
  1167. // GooglePrivacyDlpV2beta1CustomInfoType: Custom information type
  1168. // provided by the user. Used to find domain-specific
  1169. // sensitive information configurable to the data in question.
  1170. type GooglePrivacyDlpV2beta1CustomInfoType struct {
  1171. // Dictionary: Dictionary-based custom info type.
  1172. Dictionary *GooglePrivacyDlpV2beta1Dictionary `json:"dictionary,omitempty"`
  1173. // InfoType: Info type configuration. All custom info types must have
  1174. // configurations
  1175. // that do not conflict with built-in info types or other custom info
  1176. // types.
  1177. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1178. // SurrogateType: Surrogate info type.
  1179. SurrogateType *GooglePrivacyDlpV2beta1SurrogateType `json:"surrogateType,omitempty"`
  1180. // ForceSendFields is a list of field names (e.g. "Dictionary") to
  1181. // unconditionally include in API requests. By default, fields with
  1182. // empty values are omitted from API requests. However, any non-pointer,
  1183. // non-interface field appearing in ForceSendFields will be sent to the
  1184. // server regardless of whether the field is empty or not. This may be
  1185. // used to include empty fields in Patch requests.
  1186. ForceSendFields []string `json:"-"`
  1187. // NullFields is a list of field names (e.g. "Dictionary") to include in
  1188. // API requests with the JSON null value. By default, fields with empty
  1189. // values are omitted from API requests. However, any field with an
  1190. // empty value appearing in NullFields will be sent to the server as
  1191. // null. It is an error if a field in this list has a non-empty value.
  1192. // This may be used to include null fields in Patch requests.
  1193. NullFields []string `json:"-"`
  1194. }
  1195. func (s *GooglePrivacyDlpV2beta1CustomInfoType) MarshalJSON() ([]byte, error) {
  1196. type NoMethod GooglePrivacyDlpV2beta1CustomInfoType
  1197. raw := NoMethod(*s)
  1198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1199. }
  1200. // GooglePrivacyDlpV2beta1DatastoreKey: Record key for a finding in
  1201. // Cloud Datastore.
  1202. type GooglePrivacyDlpV2beta1DatastoreKey struct {
  1203. // EntityKey: Datastore entity key.
  1204. EntityKey *GooglePrivacyDlpV2beta1Key `json:"entityKey,omitempty"`
  1205. // ForceSendFields is a list of field names (e.g. "EntityKey") to
  1206. // unconditionally include in API requests. By default, fields with
  1207. // empty values are omitted from API requests. However, any non-pointer,
  1208. // non-interface field appearing in ForceSendFields will be sent to the
  1209. // server regardless of whether the field is empty or not. This may be
  1210. // used to include empty fields in Patch requests.
  1211. ForceSendFields []string `json:"-"`
  1212. // NullFields is a list of field names (e.g. "EntityKey") to include in
  1213. // API requests with the JSON null value. By default, fields with empty
  1214. // values are omitted from API requests. However, any field with an
  1215. // empty value appearing in NullFields will be sent to the server as
  1216. // null. It is an error if a field in this list has a non-empty value.
  1217. // This may be used to include null fields in Patch requests.
  1218. NullFields []string `json:"-"`
  1219. }
  1220. func (s *GooglePrivacyDlpV2beta1DatastoreKey) MarshalJSON() ([]byte, error) {
  1221. type NoMethod GooglePrivacyDlpV2beta1DatastoreKey
  1222. raw := NoMethod(*s)
  1223. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1224. }
  1225. // GooglePrivacyDlpV2beta1DatastoreOptions: Options defining a data set
  1226. // within Google Cloud Datastore.
  1227. type GooglePrivacyDlpV2beta1DatastoreOptions struct {
  1228. // Kind: The kind to process.
  1229. Kind *GooglePrivacyDlpV2beta1KindExpression `json:"kind,omitempty"`
  1230. // PartitionId: A partition ID identifies a grouping of entities. The
  1231. // grouping is always
  1232. // by project and namespace, however the namespace ID may be empty.
  1233. PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"`
  1234. // Projection: Properties to scan. If none are specified, all properties
  1235. // will be scanned
  1236. // by default.
  1237. Projection []*GooglePrivacyDlpV2beta1Projection `json:"projection,omitempty"`
  1238. // ForceSendFields is a list of field names (e.g. "Kind") to
  1239. // unconditionally include in API requests. By default, fields with
  1240. // empty values are omitted from API requests. However, any non-pointer,
  1241. // non-interface field appearing in ForceSendFields will be sent to the
  1242. // server regardless of whether the field is empty or not. This may be
  1243. // used to include empty fields in Patch requests.
  1244. ForceSendFields []string `json:"-"`
  1245. // NullFields is a list of field names (e.g. "Kind") to include in API
  1246. // requests with the JSON null value. By default, fields with empty
  1247. // values are omitted from API requests. However, any field with an
  1248. // empty value appearing in NullFields will be sent to the server as
  1249. // null. It is an error if a field in this list has a non-empty value.
  1250. // This may be used to include null fields in Patch requests.
  1251. NullFields []string `json:"-"`
  1252. }
  1253. func (s *GooglePrivacyDlpV2beta1DatastoreOptions) MarshalJSON() ([]byte, error) {
  1254. type NoMethod GooglePrivacyDlpV2beta1DatastoreOptions
  1255. raw := NoMethod(*s)
  1256. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1257. }
  1258. // GooglePrivacyDlpV2beta1DeidentificationSummary: High level summary of
  1259. // deidentification.
  1260. type GooglePrivacyDlpV2beta1DeidentificationSummary struct {
  1261. // TransformationSummaries: Transformations applied to the dataset.
  1262. TransformationSummaries []*GooglePrivacyDlpV2beta1TransformationSummary `json:"transformationSummaries,omitempty"`
  1263. // TransformedBytes: Total size in bytes that were transformed in some
  1264. // way.
  1265. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  1266. // ForceSendFields is a list of field names (e.g.
  1267. // "TransformationSummaries") to unconditionally include in API
  1268. // requests. By default, fields with empty values are omitted from API
  1269. // requests. However, any non-pointer, non-interface field appearing in
  1270. // ForceSendFields will be sent to the server regardless of whether the
  1271. // field is empty or not. This may be used to include empty fields in
  1272. // Patch requests.
  1273. ForceSendFields []string `json:"-"`
  1274. // NullFields is a list of field names (e.g. "TransformationSummaries")
  1275. // to include in API requests with the JSON null value. By default,
  1276. // fields with empty values are omitted from API requests. However, any
  1277. // field with an empty value appearing in NullFields will be sent to the
  1278. // server as null. It is an error if a field in this list has a
  1279. // non-empty value. This may be used to include null fields in Patch
  1280. // requests.
  1281. NullFields []string `json:"-"`
  1282. }
  1283. func (s *GooglePrivacyDlpV2beta1DeidentificationSummary) MarshalJSON() ([]byte, error) {
  1284. type NoMethod GooglePrivacyDlpV2beta1DeidentificationSummary
  1285. raw := NoMethod(*s)
  1286. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1287. }
  1288. // GooglePrivacyDlpV2beta1DeidentifyConfig: The configuration that
  1289. // controls how the data will change.
  1290. type GooglePrivacyDlpV2beta1DeidentifyConfig struct {
  1291. // InfoTypeTransformations: Treat the dataset as free-form text and
  1292. // apply the same free text
  1293. // transformation everywhere.
  1294. InfoTypeTransformations *GooglePrivacyDlpV2beta1InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  1295. // RecordTransformations: Treat the dataset as structured.
  1296. // Transformations can be applied to
  1297. // specific locations within structured datasets, such as transforming
  1298. // a column within a table.
  1299. RecordTransformations *GooglePrivacyDlpV2beta1RecordTransformations `json:"recordTransformations,omitempty"`
  1300. // ForceSendFields is a list of field names (e.g.
  1301. // "InfoTypeTransformations") to unconditionally include in API
  1302. // requests. By default, fields with empty values are omitted from API
  1303. // requests. However, any non-pointer, non-interface field appearing in
  1304. // ForceSendFields will be sent to the server regardless of whether the
  1305. // field is empty or not. This may be used to include empty fields in
  1306. // Patch requests.
  1307. ForceSendFields []string `json:"-"`
  1308. // NullFields is a list of field names (e.g. "InfoTypeTransformations")
  1309. // to include in API requests with the JSON null value. By default,
  1310. // fields with empty values are omitted from API requests. However, any
  1311. // field with an empty value appearing in NullFields will be sent to the
  1312. // server as null. It is an error if a field in this list has a
  1313. // non-empty value. This may be used to include null fields in Patch
  1314. // requests.
  1315. NullFields []string `json:"-"`
  1316. }
  1317. func (s *GooglePrivacyDlpV2beta1DeidentifyConfig) MarshalJSON() ([]byte, error) {
  1318. type NoMethod GooglePrivacyDlpV2beta1DeidentifyConfig
  1319. raw := NoMethod(*s)
  1320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1321. }
  1322. // GooglePrivacyDlpV2beta1DeidentifyContentRequest: Request to
  1323. // de-identify a list of items.
  1324. type GooglePrivacyDlpV2beta1DeidentifyContentRequest struct {
  1325. // DeidentifyConfig: Configuration for the de-identification of the list
  1326. // of content items.
  1327. DeidentifyConfig *GooglePrivacyDlpV2beta1DeidentifyConfig `json:"deidentifyConfig,omitempty"`
  1328. // InspectConfig: Configuration for the inspector.
  1329. InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"`
  1330. // Items: The list of items to inspect. Up to 100 are allowed per
  1331. // request.
  1332. // All items will be treated as text/*.
  1333. Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"`
  1334. // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to
  1335. // unconditionally include in API requests. By default, fields with
  1336. // empty values are omitted from API requests. However, any non-pointer,
  1337. // non-interface field appearing in ForceSendFields will be sent to the
  1338. // server regardless of whether the field is empty or not. This may be
  1339. // used to include empty fields in Patch requests.
  1340. ForceSendFields []string `json:"-"`
  1341. // NullFields is a list of field names (e.g. "DeidentifyConfig") to
  1342. // include in API requests with the JSON null value. By default, fields
  1343. // with empty values are omitted from API requests. However, any field
  1344. // with an empty value appearing in NullFields will be sent to the
  1345. // server as null. It is an error if a field in this list has a
  1346. // non-empty value. This may be used to include null fields in Patch
  1347. // requests.
  1348. NullFields []string `json:"-"`
  1349. }
  1350. func (s *GooglePrivacyDlpV2beta1DeidentifyContentRequest) MarshalJSON() ([]byte, error) {
  1351. type NoMethod GooglePrivacyDlpV2beta1DeidentifyContentRequest
  1352. raw := NoMethod(*s)
  1353. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1354. }
  1355. // GooglePrivacyDlpV2beta1DeidentifyContentResponse: Results of
  1356. // de-identifying a list of items.
  1357. type GooglePrivacyDlpV2beta1DeidentifyContentResponse struct {
  1358. Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"`
  1359. // Summaries: A review of the transformations that took place for each
  1360. // item.
  1361. Summaries []*GooglePrivacyDlpV2beta1DeidentificationSummary `json:"summaries,omitempty"`
  1362. // ServerResponse contains the HTTP response code and headers from the
  1363. // server.
  1364. googleapi.ServerResponse `json:"-"`
  1365. // ForceSendFields is a list of field names (e.g. "Items") to
  1366. // unconditionally include in API requests. By default, fields with
  1367. // empty values are omitted from API requests. However, any non-pointer,
  1368. // non-interface field appearing in ForceSendFields will be sent to the
  1369. // server regardless of whether the field is empty or not. This may be
  1370. // used to include empty fields in Patch requests.
  1371. ForceSendFields []string `json:"-"`
  1372. // NullFields is a list of field names (e.g. "Items") to include in API
  1373. // requests with the JSON null value. By default, fields with empty
  1374. // values are omitted from API requests. However, any field with an
  1375. // empty value appearing in NullFields will be sent to the server as
  1376. // null. It is an error if a field in this list has a non-empty value.
  1377. // This may be used to include null fields in Patch requests.
  1378. NullFields []string `json:"-"`
  1379. }
  1380. func (s *GooglePrivacyDlpV2beta1DeidentifyContentResponse) MarshalJSON() ([]byte, error) {
  1381. type NoMethod GooglePrivacyDlpV2beta1DeidentifyContentResponse
  1382. raw := NoMethod(*s)
  1383. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1384. }
  1385. // GooglePrivacyDlpV2beta1Dictionary: Custom information type based on a
  1386. // dictionary of words or phrases. This can
  1387. // be used to match sensitive information specific to the data, such as
  1388. // a list
  1389. // of employee IDs or job titles.
  1390. //
  1391. // Dictionary words are case-insensitive and all characters other than
  1392. // letters
  1393. // and digits in the unicode [Basic
  1394. // Multilingual
  1395. // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#
  1396. // Basic_Multilingual_Plane)
  1397. // will be replaced with whitespace when scanning for matches, so
  1398. // the
  1399. // dictionary phrase "Sam Johnson" will match all three phrases "sam
  1400. // johnson",
  1401. // "Sam, Johnson", and "Sam (Johnson)". Additionally, the
  1402. // characters
  1403. // surrounding any match must be of a different type than the
  1404. // adjacent
  1405. // characters within the word, so letters must be next to non-letters
  1406. // and
  1407. // digits next to non-digits. For example, the dictionary word "jen"
  1408. // will
  1409. // match the first three letters of the text "jen123" but will return
  1410. // no
  1411. // matches for "jennifer".
  1412. //
  1413. // Dictionary words containing a large number of characters that are
  1414. // not
  1415. // letters or digits may result in unexpected findings because such
  1416. // characters
  1417. // are treated as whitespace.
  1418. type GooglePrivacyDlpV2beta1Dictionary struct {
  1419. // WordList: List of words or phrases to search for.
  1420. WordList *GooglePrivacyDlpV2beta1WordList `json:"wordList,omitempty"`
  1421. // ForceSendFields is a list of field names (e.g. "WordList") to
  1422. // unconditionally include in API requests. By default, fields with
  1423. // empty values are omitted from API requests. However, any non-pointer,
  1424. // non-interface field appearing in ForceSendFields will be sent to the
  1425. // server regardless of whether the field is empty or not. This may be
  1426. // used to include empty fields in Patch requests.
  1427. ForceSendFields []string `json:"-"`
  1428. // NullFields is a list of field names (e.g. "WordList") to include in
  1429. // API requests with the JSON null value. By default, fields with empty
  1430. // values are omitted from API requests. However, any field with an
  1431. // empty value appearing in NullFields will be sent to the server as
  1432. // null. It is an error if a field in this list has a non-empty value.
  1433. // This may be used to include null fields in Patch requests.
  1434. NullFields []string `json:"-"`
  1435. }
  1436. func (s *GooglePrivacyDlpV2beta1Dictionary) MarshalJSON() ([]byte, error) {
  1437. type NoMethod GooglePrivacyDlpV2beta1Dictionary
  1438. raw := NoMethod(*s)
  1439. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1440. }
  1441. // GooglePrivacyDlpV2beta1EntityId: An entity in a dataset is a field or
  1442. // set of fields that correspond to a
  1443. // single person. For example, in medical records the `EntityId` might
  1444. // be
  1445. // a patient identifier, or for financial records it might be an
  1446. // account
  1447. // identifier. This message is used when generalizations or analysis
  1448. // must be
  1449. // consistent across multiple rows pertaining to the same entity.
  1450. type GooglePrivacyDlpV2beta1EntityId struct {
  1451. // Field: Composite key indicating which field contains the entity
  1452. // identifier.
  1453. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  1454. // ForceSendFields is a list of field names (e.g. "Field") to
  1455. // unconditionally include in API requests. By default, fields with
  1456. // empty values are omitted from API requests. However, any non-pointer,
  1457. // non-interface field appearing in ForceSendFields will be sent to the
  1458. // server regardless of whether the field is empty or not. This may be
  1459. // used to include empty fields in Patch requests.
  1460. ForceSendFields []string `json:"-"`
  1461. // NullFields is a list of field names (e.g. "Field") to include in API
  1462. // requests with the JSON null value. By default, fields with empty
  1463. // values are omitted from API requests. However, any field with an
  1464. // empty value appearing in NullFields will be sent to the server as
  1465. // null. It is an error if a field in this list has a non-empty value.
  1466. // This may be used to include null fields in Patch requests.
  1467. NullFields []string `json:"-"`
  1468. }
  1469. func (s *GooglePrivacyDlpV2beta1EntityId) MarshalJSON() ([]byte, error) {
  1470. type NoMethod GooglePrivacyDlpV2beta1EntityId
  1471. raw := NoMethod(*s)
  1472. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1473. }
  1474. // GooglePrivacyDlpV2beta1Expressions: A collection of expressions
  1475. type GooglePrivacyDlpV2beta1Expressions struct {
  1476. Conditions *GooglePrivacyDlpV2beta1Conditions `json:"conditions,omitempty"`
  1477. // LogicalOperator: The operator to apply to the result of conditions.
  1478. // Default and currently
  1479. // only supported value is `AND`.
  1480. //
  1481. // Possible values:
  1482. // "LOGICAL_OPERATOR_UNSPECIFIED"
  1483. // "AND"
  1484. LogicalOperator string `json:"logicalOperator,omitempty"`
  1485. // ForceSendFields is a list of field names (e.g. "Conditions") to
  1486. // unconditionally include in API requests. By default, fields with
  1487. // empty values are omitted from API requests. However, any non-pointer,
  1488. // non-interface field appearing in ForceSendFields will be sent to the
  1489. // server regardless of whether the field is empty or not. This may be
  1490. // used to include empty fields in Patch requests.
  1491. ForceSendFields []string `json:"-"`
  1492. // NullFields is a list of field names (e.g. "Conditions") to include in
  1493. // API requests with the JSON null value. By default, fields with empty
  1494. // values are omitted from API requests. However, any field with an
  1495. // empty value appearing in NullFields will be sent to the server as
  1496. // null. It is an error if a field in this list has a non-empty value.
  1497. // This may be used to include null fields in Patch requests.
  1498. NullFields []string `json:"-"`
  1499. }
  1500. func (s *GooglePrivacyDlpV2beta1Expressions) MarshalJSON() ([]byte, error) {
  1501. type NoMethod GooglePrivacyDlpV2beta1Expressions
  1502. raw := NoMethod(*s)
  1503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1504. }
  1505. // GooglePrivacyDlpV2beta1FieldId: General identifier of a data field in
  1506. // a storage service.
  1507. type GooglePrivacyDlpV2beta1FieldId struct {
  1508. // ColumnName: Name describing the field.
  1509. ColumnName string `json:"columnName,omitempty"`
  1510. // ForceSendFields is a list of field names (e.g. "ColumnName") to
  1511. // unconditionally include in API requests. By default, fields with
  1512. // empty values are omitted from API requests. However, any non-pointer,
  1513. // non-interface field appearing in ForceSendFields will be sent to the
  1514. // server regardless of whether the field is empty or not. This may be
  1515. // used to include empty fields in Patch requests.
  1516. ForceSendFields []string `json:"-"`
  1517. // NullFields is a list of field names (e.g. "ColumnName") to include in
  1518. // API requests with the JSON null value. By default, fields with empty
  1519. // values are omitted from API requests. However, any field with an
  1520. // empty value appearing in NullFields will be sent to the server as
  1521. // null. It is an error if a field in this list has a non-empty value.
  1522. // This may be used to include null fields in Patch requests.
  1523. NullFields []string `json:"-"`
  1524. }
  1525. func (s *GooglePrivacyDlpV2beta1FieldId) MarshalJSON() ([]byte, error) {
  1526. type NoMethod GooglePrivacyDlpV2beta1FieldId
  1527. raw := NoMethod(*s)
  1528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1529. }
  1530. // GooglePrivacyDlpV2beta1FieldTransformation: The transformation to
  1531. // apply to the field.
  1532. type GooglePrivacyDlpV2beta1FieldTransformation struct {
  1533. // Condition: Only apply the transformation if the condition evaluates
  1534. // to true for the
  1535. // given `RecordCondition`. The conditions are allowed to reference
  1536. // fields
  1537. // that are not used in the actual transformation. [optional]
  1538. //
  1539. // Example Use Cases:
  1540. //
  1541. // - Apply a different bucket transformation to an age column if the zip
  1542. // code
  1543. // column for the same record is within a specific range.
  1544. // - Redact a field if the date of birth field is greater than 85.
  1545. Condition *GooglePrivacyDlpV2beta1RecordCondition `json:"condition,omitempty"`
  1546. // Fields: Input field(s) to apply the transformation to. [required]
  1547. Fields []*GooglePrivacyDlpV2beta1FieldId `json:"fields,omitempty"`
  1548. // InfoTypeTransformations: Treat the contents of the field as free
  1549. // text, and selectively
  1550. // transform content that matches an `InfoType`.
  1551. InfoTypeTransformations *GooglePrivacyDlpV2beta1InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
  1552. // PrimitiveTransformation: Apply the transformation to the entire
  1553. // field.
  1554. PrimitiveTransformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  1555. // ForceSendFields is a list of field names (e.g. "Condition") to
  1556. // unconditionally include in API requests. By default, fields with
  1557. // empty values are omitted from API requests. However, any non-pointer,
  1558. // non-interface field appearing in ForceSendFields will be sent to the
  1559. // server regardless of whether the field is empty or not. This may be
  1560. // used to include empty fields in Patch requests.
  1561. ForceSendFields []string `json:"-"`
  1562. // NullFields is a list of field names (e.g. "Condition") to include in
  1563. // API requests with the JSON null value. By default, fields with empty
  1564. // values are omitted from API requests. However, any field with an
  1565. // empty value appearing in NullFields will be sent to the server as
  1566. // null. It is an error if a field in this list has a non-empty value.
  1567. // This may be used to include null fields in Patch requests.
  1568. NullFields []string `json:"-"`
  1569. }
  1570. func (s *GooglePrivacyDlpV2beta1FieldTransformation) MarshalJSON() ([]byte, error) {
  1571. type NoMethod GooglePrivacyDlpV2beta1FieldTransformation
  1572. raw := NoMethod(*s)
  1573. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1574. }
  1575. // GooglePrivacyDlpV2beta1FileSet: Set of files to scan.
  1576. type GooglePrivacyDlpV2beta1FileSet struct {
  1577. // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard
  1578. // in the
  1579. // path is allowed.
  1580. Url string `json:"url,omitempty"`
  1581. // ForceSendFields is a list of field names (e.g. "Url") to
  1582. // unconditionally include in API requests. By default, fields with
  1583. // empty values are omitted from API requests. However, any non-pointer,
  1584. // non-interface field appearing in ForceSendFields will be sent to the
  1585. // server regardless of whether the field is empty or not. This may be
  1586. // used to include empty fields in Patch requests.
  1587. ForceSendFields []string `json:"-"`
  1588. // NullFields is a list of field names (e.g. "Url") to include in API
  1589. // requests with the JSON null value. By default, fields with empty
  1590. // values are omitted from API requests. However, any field with an
  1591. // empty value appearing in NullFields will be sent to the server as
  1592. // null. It is an error if a field in this list has a non-empty value.
  1593. // This may be used to include null fields in Patch requests.
  1594. NullFields []string `json:"-"`
  1595. }
  1596. func (s *GooglePrivacyDlpV2beta1FileSet) MarshalJSON() ([]byte, error) {
  1597. type NoMethod GooglePrivacyDlpV2beta1FileSet
  1598. raw := NoMethod(*s)
  1599. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1600. }
  1601. // GooglePrivacyDlpV2beta1Finding: Represents a piece of potentially
  1602. // sensitive content.
  1603. type GooglePrivacyDlpV2beta1Finding struct {
  1604. // CreateTime: Timestamp when finding was detected.
  1605. CreateTime string `json:"createTime,omitempty"`
  1606. // InfoType: The type of content that might have been found.
  1607. // Provided if requested by the `InspectConfig`.
  1608. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1609. // Likelihood: Estimate of how likely it is that the `info_type` is
  1610. // correct.
  1611. //
  1612. // Possible values:
  1613. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  1614. // likelihoods is included.
  1615. // "VERY_UNLIKELY" - Few matching elements.
  1616. // "UNLIKELY"
  1617. // "POSSIBLE" - Some matching elements.
  1618. // "LIKELY"
  1619. // "VERY_LIKELY" - Many matching elements.
  1620. Likelihood string `json:"likelihood,omitempty"`
  1621. // Location: Where the content was found.
  1622. Location *GooglePrivacyDlpV2beta1Location `json:"location,omitempty"`
  1623. // Quote: The content that was found. Even if the content is not
  1624. // textual, it
  1625. // may be converted to a textual representation here.
  1626. // Provided if requested by the `InspectConfig` and the finding is
  1627. // less than or equal to 4096 bytes long. If the finding exceeds 4096
  1628. // bytes
  1629. // in length, the quote may be omitted.
  1630. Quote string `json:"quote,omitempty"`
  1631. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  1632. // unconditionally include in API requests. By default, fields with
  1633. // empty values are omitted from API requests. However, any non-pointer,
  1634. // non-interface field appearing in ForceSendFields will be sent to the
  1635. // server regardless of whether the field is empty or not. This may be
  1636. // used to include empty fields in Patch requests.
  1637. ForceSendFields []string `json:"-"`
  1638. // NullFields is a list of field names (e.g. "CreateTime") to include in
  1639. // API requests with the JSON null value. By default, fields with empty
  1640. // values are omitted from API requests. However, any field with an
  1641. // empty value appearing in NullFields will be sent to the server as
  1642. // null. It is an error if a field in this list has a non-empty value.
  1643. // This may be used to include null fields in Patch requests.
  1644. NullFields []string `json:"-"`
  1645. }
  1646. func (s *GooglePrivacyDlpV2beta1Finding) MarshalJSON() ([]byte, error) {
  1647. type NoMethod GooglePrivacyDlpV2beta1Finding
  1648. raw := NoMethod(*s)
  1649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1650. }
  1651. // GooglePrivacyDlpV2beta1FixedSizeBucketingConfig: Buckets values based
  1652. // on fixed size ranges. The
  1653. // Bucketing transformation can provide all of this functionality,
  1654. // but requires more configuration. This message is provided as a
  1655. // convenience to
  1656. // the user for simple bucketing strategies.
  1657. // The resulting value will be a hyphenated string
  1658. // of
  1659. // lower_bound-upper_bound.
  1660. // This can be used on data of type: double, long.
  1661. // If the bound Value type differs from the type of data
  1662. // being transformed, we will first attempt converting the type of the
  1663. // data to
  1664. // be transformed to match the type of the bound before comparing.
  1665. type GooglePrivacyDlpV2beta1FixedSizeBucketingConfig struct {
  1666. // BucketSize: Size of each bucket (except for minimum and maximum
  1667. // buckets). So if
  1668. // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then
  1669. // the
  1670. // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50,
  1671. // 50-60,
  1672. // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
  1673. // [Required].
  1674. BucketSize float64 `json:"bucketSize,omitempty"`
  1675. // LowerBound: Lower bound value of buckets. All values less than
  1676. // `lower_bound` are
  1677. // grouped together into a single bucket; for example if `lower_bound` =
  1678. // 10,
  1679. // then all values less than 10 are replaced with the value “-10”.
  1680. // [Required].
  1681. LowerBound *GooglePrivacyDlpV2beta1Value `json:"lowerBound,omitempty"`
  1682. // UpperBound: Upper bound value of buckets. All values greater than
  1683. // upper_bound are
  1684. // grouped together into a single bucket; for example if `upper_bound` =
  1685. // 89,
  1686. // then all values greater than 89 are replaced with the value
  1687. // “89+”.
  1688. // [Required].
  1689. UpperBound *GooglePrivacyDlpV2beta1Value `json:"upperBound,omitempty"`
  1690. // ForceSendFields is a list of field names (e.g. "BucketSize") 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. "BucketSize") 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 *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) {
  1706. type NoMethod GooglePrivacyDlpV2beta1FixedSizeBucketingConfig
  1707. raw := NoMethod(*s)
  1708. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1709. }
  1710. func (s *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error {
  1711. type NoMethod GooglePrivacyDlpV2beta1FixedSizeBucketingConfig
  1712. var s1 struct {
  1713. BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
  1714. *NoMethod
  1715. }
  1716. s1.NoMethod = (*NoMethod)(s)
  1717. if err := json.Unmarshal(data, &s1); err != nil {
  1718. return err
  1719. }
  1720. s.BucketSize = float64(s1.BucketSize)
  1721. return nil
  1722. }
  1723. // GooglePrivacyDlpV2beta1ImageLocation: Bounding box encompassing
  1724. // detected text within an image.
  1725. type GooglePrivacyDlpV2beta1ImageLocation struct {
  1726. // Height: Height of the bounding box in pixels.
  1727. Height int64 `json:"height,omitempty"`
  1728. // Left: Left coordinate of the bounding box. (0,0) is upper left.
  1729. Left int64 `json:"left,omitempty"`
  1730. // Top: Top coordinate of the bounding box. (0,0) is upper left.
  1731. Top int64 `json:"top,omitempty"`
  1732. // Width: Width of the bounding box in pixels.
  1733. Width int64 `json:"width,omitempty"`
  1734. // ForceSendFields is a list of field names (e.g. "Height") 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. "Height") to include in API
  1742. // requests with the JSON null value. By default, fields with empty
  1743. // values are omitted from API requests. However, any field with an
  1744. // empty value appearing in NullFields will be sent to the server as
  1745. // null. It is an error if a field in this list has a non-empty value.
  1746. // This may be used to include null fields in Patch requests.
  1747. NullFields []string `json:"-"`
  1748. }
  1749. func (s *GooglePrivacyDlpV2beta1ImageLocation) MarshalJSON() ([]byte, error) {
  1750. type NoMethod GooglePrivacyDlpV2beta1ImageLocation
  1751. raw := NoMethod(*s)
  1752. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1753. }
  1754. // GooglePrivacyDlpV2beta1ImageRedactionConfig: Configuration for
  1755. // determining how redaction of images should occur.
  1756. type GooglePrivacyDlpV2beta1ImageRedactionConfig struct {
  1757. // InfoType: Only one per info_type should be provided per request. If
  1758. // not
  1759. // specified, and redact_all_text is false, the DLP API will redact
  1760. // all
  1761. // text that it matches against all info_types that are found, but
  1762. // not
  1763. // specified in another ImageRedactionConfig.
  1764. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1765. // RedactAllText: If true, all text found in the image, regardless
  1766. // whether it matches an
  1767. // info_type, is redacted.
  1768. RedactAllText bool `json:"redactAllText,omitempty"`
  1769. // RedactionColor: The color to use when redacting content from an
  1770. // image. If not specified,
  1771. // the default is black.
  1772. RedactionColor *GooglePrivacyDlpV2beta1Color `json:"redactionColor,omitempty"`
  1773. // ForceSendFields is a list of field names (e.g. "InfoType") to
  1774. // unconditionally include in API requests. By default, fields with
  1775. // empty values are omitted from API requests. However, any non-pointer,
  1776. // non-interface field appearing in ForceSendFields will be sent to the
  1777. // server regardless of whether the field is empty or not. This may be
  1778. // used to include empty fields in Patch requests.
  1779. ForceSendFields []string `json:"-"`
  1780. // NullFields is a list of field names (e.g. "InfoType") to include in
  1781. // API requests with the JSON null value. By default, fields with empty
  1782. // values are omitted from API requests. However, any field with an
  1783. // empty value appearing in NullFields will be sent to the server as
  1784. // null. It is an error if a field in this list has a non-empty value.
  1785. // This may be used to include null fields in Patch requests.
  1786. NullFields []string `json:"-"`
  1787. }
  1788. func (s *GooglePrivacyDlpV2beta1ImageRedactionConfig) MarshalJSON() ([]byte, error) {
  1789. type NoMethod GooglePrivacyDlpV2beta1ImageRedactionConfig
  1790. raw := NoMethod(*s)
  1791. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1792. }
  1793. // GooglePrivacyDlpV2beta1InfoType: Type of information detected by the
  1794. // API.
  1795. type GooglePrivacyDlpV2beta1InfoType struct {
  1796. // Name: Name of the information type.
  1797. Name string `json:"name,omitempty"`
  1798. // ForceSendFields is a list of field names (e.g. "Name") to
  1799. // unconditionally include in API requests. By default, fields with
  1800. // empty values are omitted from API requests. However, any non-pointer,
  1801. // non-interface field appearing in ForceSendFields will be sent to the
  1802. // server regardless of whether the field is empty or not. This may be
  1803. // used to include empty fields in Patch requests.
  1804. ForceSendFields []string `json:"-"`
  1805. // NullFields is a list of field names (e.g. "Name") to include in API
  1806. // requests with the JSON null value. By default, fields with empty
  1807. // values are omitted from API requests. However, any field with an
  1808. // empty value appearing in NullFields will be sent to the server as
  1809. // null. It is an error if a field in this list has a non-empty value.
  1810. // This may be used to include null fields in Patch requests.
  1811. NullFields []string `json:"-"`
  1812. }
  1813. func (s *GooglePrivacyDlpV2beta1InfoType) MarshalJSON() ([]byte, error) {
  1814. type NoMethod GooglePrivacyDlpV2beta1InfoType
  1815. raw := NoMethod(*s)
  1816. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1817. }
  1818. // GooglePrivacyDlpV2beta1InfoTypeDescription: Description of the
  1819. // information type (infoType).
  1820. type GooglePrivacyDlpV2beta1InfoTypeDescription struct {
  1821. // Categories: List of categories this infoType belongs to.
  1822. Categories []*GooglePrivacyDlpV2beta1CategoryDescription `json:"categories,omitempty"`
  1823. // DisplayName: Human readable form of the infoType name.
  1824. DisplayName string `json:"displayName,omitempty"`
  1825. // Name: Internal name of the infoType.
  1826. Name string `json:"name,omitempty"`
  1827. // ForceSendFields is a list of field names (e.g. "Categories") to
  1828. // unconditionally include in API requests. By default, fields with
  1829. // empty values are omitted from API requests. However, any non-pointer,
  1830. // non-interface field appearing in ForceSendFields will be sent to the
  1831. // server regardless of whether the field is empty or not. This may be
  1832. // used to include empty fields in Patch requests.
  1833. ForceSendFields []string `json:"-"`
  1834. // NullFields is a list of field names (e.g. "Categories") to include in
  1835. // API requests with the JSON null value. By default, fields with empty
  1836. // values are omitted from API requests. However, any field with an
  1837. // empty value appearing in NullFields will be sent to the server as
  1838. // null. It is an error if a field in this list has a non-empty value.
  1839. // This may be used to include null fields in Patch requests.
  1840. NullFields []string `json:"-"`
  1841. }
  1842. func (s *GooglePrivacyDlpV2beta1InfoTypeDescription) MarshalJSON() ([]byte, error) {
  1843. type NoMethod GooglePrivacyDlpV2beta1InfoTypeDescription
  1844. raw := NoMethod(*s)
  1845. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1846. }
  1847. // GooglePrivacyDlpV2beta1InfoTypeLimit: Max findings configuration per
  1848. // info type, per content item or long running
  1849. // operation.
  1850. type GooglePrivacyDlpV2beta1InfoTypeLimit struct {
  1851. // InfoType: Type of information the findings limit applies to. Only one
  1852. // limit per
  1853. // info_type should be provided. If InfoTypeLimit does not have
  1854. // an
  1855. // info_type, the DLP API applies the limit against all info_types that
  1856. // are
  1857. // found but not specified in another InfoTypeLimit.
  1858. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1859. // MaxFindings: Max findings limit for the given infoType.
  1860. MaxFindings int64 `json:"maxFindings,omitempty"`
  1861. // ForceSendFields is a list of field names (e.g. "InfoType") to
  1862. // unconditionally include in API requests. By default, fields with
  1863. // empty values are omitted from API requests. However, any non-pointer,
  1864. // non-interface field appearing in ForceSendFields will be sent to the
  1865. // server regardless of whether the field is empty or not. This may be
  1866. // used to include empty fields in Patch requests.
  1867. ForceSendFields []string `json:"-"`
  1868. // NullFields is a list of field names (e.g. "InfoType") to include in
  1869. // API requests with the JSON null value. By default, fields with empty
  1870. // values are omitted from API requests. However, any field with an
  1871. // empty value appearing in NullFields will be sent to the server as
  1872. // null. It is an error if a field in this list has a non-empty value.
  1873. // This may be used to include null fields in Patch requests.
  1874. NullFields []string `json:"-"`
  1875. }
  1876. func (s *GooglePrivacyDlpV2beta1InfoTypeLimit) MarshalJSON() ([]byte, error) {
  1877. type NoMethod GooglePrivacyDlpV2beta1InfoTypeLimit
  1878. raw := NoMethod(*s)
  1879. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1880. }
  1881. // GooglePrivacyDlpV2beta1InfoTypeStatistics: Statistics regarding a
  1882. // specific InfoType.
  1883. type GooglePrivacyDlpV2beta1InfoTypeStatistics struct {
  1884. // Count: Number of findings for this info type.
  1885. Count int64 `json:"count,omitempty,string"`
  1886. // InfoType: The type of finding this stat is for.
  1887. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  1888. // ForceSendFields is a list of field names (e.g. "Count") to
  1889. // unconditionally include in API requests. By default, fields with
  1890. // empty values are omitted from API requests. However, any non-pointer,
  1891. // non-interface field appearing in ForceSendFields will be sent to the
  1892. // server regardless of whether the field is empty or not. This may be
  1893. // used to include empty fields in Patch requests.
  1894. ForceSendFields []string `json:"-"`
  1895. // NullFields is a list of field names (e.g. "Count") to include in API
  1896. // requests with the JSON null value. By default, fields with empty
  1897. // values are omitted from API requests. However, any field with an
  1898. // empty value appearing in NullFields will be sent to the server as
  1899. // null. It is an error if a field in this list has a non-empty value.
  1900. // This may be used to include null fields in Patch requests.
  1901. NullFields []string `json:"-"`
  1902. }
  1903. func (s *GooglePrivacyDlpV2beta1InfoTypeStatistics) MarshalJSON() ([]byte, error) {
  1904. type NoMethod GooglePrivacyDlpV2beta1InfoTypeStatistics
  1905. raw := NoMethod(*s)
  1906. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1907. }
  1908. // GooglePrivacyDlpV2beta1InfoTypeTransformation: A transformation to
  1909. // apply to text that is identified as a specific
  1910. // info_type.
  1911. type GooglePrivacyDlpV2beta1InfoTypeTransformation struct {
  1912. // InfoTypes: Info types to apply the transformation to. Empty list will
  1913. // match all
  1914. // available info types for this transformation.
  1915. InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"`
  1916. // PrimitiveTransformation: Primitive transformation to apply to the
  1917. // info type. [required]
  1918. PrimitiveTransformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
  1919. // ForceSendFields is a list of field names (e.g. "InfoTypes") 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. "InfoTypes") to include in
  1927. // API requests with the JSON null value. By default, fields with empty
  1928. // values are omitted from API requests. However, any field with an
  1929. // 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 *GooglePrivacyDlpV2beta1InfoTypeTransformation) MarshalJSON() ([]byte, error) {
  1935. type NoMethod GooglePrivacyDlpV2beta1InfoTypeTransformation
  1936. raw := NoMethod(*s)
  1937. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1938. }
  1939. // GooglePrivacyDlpV2beta1InfoTypeTransformations: A type of
  1940. // transformation that will scan unstructured text and
  1941. // apply various `PrimitiveTransformation`s to each finding, where
  1942. // the
  1943. // transformation is applied to only values that were identified as a
  1944. // specific
  1945. // info_type.
  1946. type GooglePrivacyDlpV2beta1InfoTypeTransformations struct {
  1947. // Transformations: Transformation for each info type. Cannot specify
  1948. // more than one
  1949. // for a given info type. [required]
  1950. Transformations []*GooglePrivacyDlpV2beta1InfoTypeTransformation `json:"transformations,omitempty"`
  1951. // ForceSendFields is a list of field names (e.g. "Transformations") to
  1952. // unconditionally include in API requests. By default, fields with
  1953. // empty values are omitted from API requests. However, any non-pointer,
  1954. // non-interface field appearing in ForceSendFields will be sent to the
  1955. // server regardless of whether the field is empty or not. This may be
  1956. // used to include empty fields in Patch requests.
  1957. ForceSendFields []string `json:"-"`
  1958. // NullFields is a list of field names (e.g. "Transformations") to
  1959. // include in API requests with the JSON null value. By default, fields
  1960. // with empty values are omitted from API requests. However, any field
  1961. // with an empty value appearing in NullFields will be sent to the
  1962. // server as null. It is an error if a field in this list has a
  1963. // non-empty value. This may be used to include null fields in Patch
  1964. // requests.
  1965. NullFields []string `json:"-"`
  1966. }
  1967. func (s *GooglePrivacyDlpV2beta1InfoTypeTransformations) MarshalJSON() ([]byte, error) {
  1968. type NoMethod GooglePrivacyDlpV2beta1InfoTypeTransformations
  1969. raw := NoMethod(*s)
  1970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1971. }
  1972. // GooglePrivacyDlpV2beta1InspectConfig: Configuration description of
  1973. // the scanning process.
  1974. // When used with redactContent only info_types and min_likelihood are
  1975. // currently
  1976. // used.
  1977. type GooglePrivacyDlpV2beta1InspectConfig struct {
  1978. // CustomInfoTypes: Custom info types provided by the user.
  1979. CustomInfoTypes []*GooglePrivacyDlpV2beta1CustomInfoType `json:"customInfoTypes,omitempty"`
  1980. // ExcludeTypes: When true, excludes type information of the findings.
  1981. ExcludeTypes bool `json:"excludeTypes,omitempty"`
  1982. // IncludeQuote: When true, a contextual quote from the data that
  1983. // triggered a finding is
  1984. // included in the response; see Finding.quote.
  1985. IncludeQuote bool `json:"includeQuote,omitempty"`
  1986. // InfoTypeLimits: Configuration of findings limit given for specified
  1987. // info types.
  1988. InfoTypeLimits []*GooglePrivacyDlpV2beta1InfoTypeLimit `json:"infoTypeLimits,omitempty"`
  1989. // InfoTypes: Restricts what info_types to look for. The values must
  1990. // correspond to
  1991. // InfoType values returned by ListInfoTypes or found in
  1992. // documentation.
  1993. // Empty info_types runs all enabled detectors.
  1994. InfoTypes []*GooglePrivacyDlpV2beta1InfoType `json:"infoTypes,omitempty"`
  1995. // MaxFindings: Limits the number of findings per content item or long
  1996. // running operation.
  1997. MaxFindings int64 `json:"maxFindings,omitempty"`
  1998. // MinLikelihood: Only returns findings equal or above this threshold.
  1999. //
  2000. // Possible values:
  2001. // "LIKELIHOOD_UNSPECIFIED" - Default value; information with all
  2002. // likelihoods is included.
  2003. // "VERY_UNLIKELY" - Few matching elements.
  2004. // "UNLIKELY"
  2005. // "POSSIBLE" - Some matching elements.
  2006. // "LIKELY"
  2007. // "VERY_LIKELY" - Many matching elements.
  2008. MinLikelihood string `json:"minLikelihood,omitempty"`
  2009. // ForceSendFields is a list of field names (e.g. "CustomInfoTypes") to
  2010. // unconditionally include in API requests. By default, fields with
  2011. // empty values are omitted from API requests. However, any non-pointer,
  2012. // non-interface field appearing in ForceSendFields will be sent to the
  2013. // server regardless of whether the field is empty or not. This may be
  2014. // used to include empty fields in Patch requests.
  2015. ForceSendFields []string `json:"-"`
  2016. // NullFields is a list of field names (e.g. "CustomInfoTypes") to
  2017. // include in API requests with the JSON null value. By default, fields
  2018. // with empty values are omitted from API requests. However, any field
  2019. // with an empty value appearing in NullFields will be sent to the
  2020. // server as null. It is an error if a field in this list has a
  2021. // non-empty value. This may be used to include null fields in Patch
  2022. // requests.
  2023. NullFields []string `json:"-"`
  2024. }
  2025. func (s *GooglePrivacyDlpV2beta1InspectConfig) MarshalJSON() ([]byte, error) {
  2026. type NoMethod GooglePrivacyDlpV2beta1InspectConfig
  2027. raw := NoMethod(*s)
  2028. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2029. }
  2030. // GooglePrivacyDlpV2beta1InspectContentRequest: Request to search for
  2031. // potentially sensitive info in a list of items.
  2032. type GooglePrivacyDlpV2beta1InspectContentRequest struct {
  2033. // InspectConfig: Configuration for the inspector.
  2034. InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"`
  2035. // Items: The list of items to inspect. Items in a single request
  2036. // are
  2037. // considered "related" unless inspect_config.independent_inputs is
  2038. // true.
  2039. // Up to 100 are allowed per request.
  2040. Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"`
  2041. // ForceSendFields is a list of field names (e.g. "InspectConfig") 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. "InspectConfig") to include
  2049. // in API requests with the JSON null value. By default, fields with
  2050. // empty values are omitted from API requests. However, any field with
  2051. // an 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 *GooglePrivacyDlpV2beta1InspectContentRequest) MarshalJSON() ([]byte, error) {
  2057. type NoMethod GooglePrivacyDlpV2beta1InspectContentRequest
  2058. raw := NoMethod(*s)
  2059. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2060. }
  2061. // GooglePrivacyDlpV2beta1InspectContentResponse: Results of inspecting
  2062. // a list of items.
  2063. type GooglePrivacyDlpV2beta1InspectContentResponse struct {
  2064. // Results: Each content_item from the request has a result in this
  2065. // list, in the
  2066. // same order as the request.
  2067. Results []*GooglePrivacyDlpV2beta1InspectResult `json:"results,omitempty"`
  2068. // ServerResponse contains the HTTP response code and headers from the
  2069. // server.
  2070. googleapi.ServerResponse `json:"-"`
  2071. // ForceSendFields is a list of field names (e.g. "Results") to
  2072. // unconditionally include in API requests. By default, fields with
  2073. // empty values are omitted from API requests. However, any non-pointer,
  2074. // non-interface field appearing in ForceSendFields will be sent to the
  2075. // server regardless of whether the field is empty or not. This may be
  2076. // used to include empty fields in Patch requests.
  2077. ForceSendFields []string `json:"-"`
  2078. // NullFields is a list of field names (e.g. "Results") to include in
  2079. // API requests with the JSON null value. By default, fields with empty
  2080. // values are omitted from API requests. However, any field with an
  2081. // empty value appearing in NullFields will be sent to the server as
  2082. // null. It is an error if a field in this list has a non-empty value.
  2083. // This may be used to include null fields in Patch requests.
  2084. NullFields []string `json:"-"`
  2085. }
  2086. func (s *GooglePrivacyDlpV2beta1InspectContentResponse) MarshalJSON() ([]byte, error) {
  2087. type NoMethod GooglePrivacyDlpV2beta1InspectContentResponse
  2088. raw := NoMethod(*s)
  2089. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2090. }
  2091. // GooglePrivacyDlpV2beta1InspectOperationMetadata: Metadata returned
  2092. // within GetOperation for an inspect request.
  2093. type GooglePrivacyDlpV2beta1InspectOperationMetadata struct {
  2094. // CreateTime: The time which this request was started.
  2095. CreateTime string `json:"createTime,omitempty"`
  2096. InfoTypeStats []*GooglePrivacyDlpV2beta1InfoTypeStatistics `json:"infoTypeStats,omitempty"`
  2097. // ProcessedBytes: Total size in bytes that were processed.
  2098. ProcessedBytes int64 `json:"processedBytes,omitempty,string"`
  2099. // RequestInspectConfig: The inspect config used to create the
  2100. // Operation.
  2101. RequestInspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"requestInspectConfig,omitempty"`
  2102. // RequestOutputConfig: Optional location to store findings.
  2103. RequestOutputConfig *GooglePrivacyDlpV2beta1OutputStorageConfig `json:"requestOutputConfig,omitempty"`
  2104. // RequestStorageConfig: The storage config used to create the
  2105. // Operation.
  2106. RequestStorageConfig *GooglePrivacyDlpV2beta1StorageConfig `json:"requestStorageConfig,omitempty"`
  2107. // TotalEstimatedBytes: Estimate of the number of bytes to process.
  2108. TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"`
  2109. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  2110. // unconditionally include in API requests. By default, fields with
  2111. // empty values are omitted from API requests. However, any non-pointer,
  2112. // non-interface field appearing in ForceSendFields will be sent to the
  2113. // server regardless of whether the field is empty or not. This may be
  2114. // used to include empty fields in Patch requests.
  2115. ForceSendFields []string `json:"-"`
  2116. // NullFields is a list of field names (e.g. "CreateTime") to include in
  2117. // API requests with the JSON null value. By default, fields with empty
  2118. // values are omitted from API requests. However, any field with an
  2119. // empty value appearing in NullFields will be sent to the server as
  2120. // null. It is an error if a field in this list has a non-empty value.
  2121. // This may be used to include null fields in Patch requests.
  2122. NullFields []string `json:"-"`
  2123. }
  2124. func (s *GooglePrivacyDlpV2beta1InspectOperationMetadata) MarshalJSON() ([]byte, error) {
  2125. type NoMethod GooglePrivacyDlpV2beta1InspectOperationMetadata
  2126. raw := NoMethod(*s)
  2127. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2128. }
  2129. // GooglePrivacyDlpV2beta1InspectOperationResult: The operational data.
  2130. type GooglePrivacyDlpV2beta1InspectOperationResult struct {
  2131. // Name: The server-assigned name, which is only unique within the same
  2132. // service that
  2133. // originally returns it. If you use the default HTTP mapping,
  2134. // the
  2135. // `name` should have the format of `inspect/results/{id}`.
  2136. Name string `json:"name,omitempty"`
  2137. // ForceSendFields is a list of field names (e.g. "Name") to
  2138. // unconditionally include in API requests. By default, fields with
  2139. // empty values are omitted from API requests. However, any non-pointer,
  2140. // non-interface field appearing in ForceSendFields will be sent to the
  2141. // server regardless of whether the field is empty or not. This may be
  2142. // used to include empty fields in Patch requests.
  2143. ForceSendFields []string `json:"-"`
  2144. // NullFields is a list of field names (e.g. "Name") to include in API
  2145. // requests with the JSON null value. By default, fields with empty
  2146. // values are omitted from API requests. However, any field with an
  2147. // empty value appearing in NullFields will be sent to the server as
  2148. // null. It is an error if a field in this list has a non-empty value.
  2149. // This may be used to include null fields in Patch requests.
  2150. NullFields []string `json:"-"`
  2151. }
  2152. func (s *GooglePrivacyDlpV2beta1InspectOperationResult) MarshalJSON() ([]byte, error) {
  2153. type NoMethod GooglePrivacyDlpV2beta1InspectOperationResult
  2154. raw := NoMethod(*s)
  2155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2156. }
  2157. // GooglePrivacyDlpV2beta1InspectResult: All the findings for a single
  2158. // scanned item.
  2159. type GooglePrivacyDlpV2beta1InspectResult struct {
  2160. // Findings: List of findings for an item.
  2161. Findings []*GooglePrivacyDlpV2beta1Finding `json:"findings,omitempty"`
  2162. // FindingsTruncated: If true, then this item might have more findings
  2163. // than were returned,
  2164. // and the findings returned are an arbitrary subset of all
  2165. // findings.
  2166. // The findings list might be truncated because the input items were
  2167. // too
  2168. // large, or because the server reached the maximum amount of
  2169. // resources
  2170. // allowed for a single API call. For best results, divide the input
  2171. // into
  2172. // smaller batches.
  2173. FindingsTruncated bool `json:"findingsTruncated,omitempty"`
  2174. // ForceSendFields is a list of field names (e.g. "Findings") to
  2175. // unconditionally include in API requests. By default, fields with
  2176. // empty values are omitted from API requests. However, any non-pointer,
  2177. // non-interface field appearing in ForceSendFields will be sent to the
  2178. // server regardless of whether the field is empty or not. This may be
  2179. // used to include empty fields in Patch requests.
  2180. ForceSendFields []string `json:"-"`
  2181. // NullFields is a list of field names (e.g. "Findings") to include in
  2182. // API requests with the JSON null value. By default, fields with empty
  2183. // values are omitted from API requests. However, any field with an
  2184. // empty value appearing in NullFields will be sent to the server as
  2185. // null. It is an error if a field in this list has a non-empty value.
  2186. // This may be used to include null fields in Patch requests.
  2187. NullFields []string `json:"-"`
  2188. }
  2189. func (s *GooglePrivacyDlpV2beta1InspectResult) MarshalJSON() ([]byte, error) {
  2190. type NoMethod GooglePrivacyDlpV2beta1InspectResult
  2191. raw := NoMethod(*s)
  2192. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2193. }
  2194. // GooglePrivacyDlpV2beta1KAnonymityConfig: k-anonymity metric, used for
  2195. // analysis of reidentification risk.
  2196. type GooglePrivacyDlpV2beta1KAnonymityConfig struct {
  2197. // EntityId: Optional message indicating that each distinct entity_id
  2198. // should not
  2199. // contribute to the k-anonymity count more than once per equivalence
  2200. // class.
  2201. // If an entity_id appears on several rows with different
  2202. // quasi-identifier
  2203. // tuples, it will contribute to each count exactly once.
  2204. //
  2205. // This can lead to unexpected results. Consider a table where ID 1
  2206. // is
  2207. // associated to quasi-identifier "foo", ID 2 to "bar", and ID 3 to
  2208. // *both*
  2209. // quasi-identifiers "foo" and "bar" (on separate rows), and where this
  2210. // ID
  2211. // is used as entity_id. Then, the anonymity value associated to ID 3
  2212. // will
  2213. // be 2, even if it is the only ID to be associated to both values "foo"
  2214. // and
  2215. // "bar".
  2216. EntityId *GooglePrivacyDlpV2beta1EntityId `json:"entityId,omitempty"`
  2217. // QuasiIds: Set of fields to compute k-anonymity over. When multiple
  2218. // fields are
  2219. // specified, they are considered a single composite key. Structs
  2220. // and
  2221. // repeated data types are not supported; however, nested fields
  2222. // are
  2223. // supported so long as they are not structs themselves or nested
  2224. // within
  2225. // a repeated field.
  2226. QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"`
  2227. // ForceSendFields is a list of field names (e.g. "EntityId") to
  2228. // unconditionally include in API requests. By default, fields with
  2229. // empty values are omitted from API requests. However, any non-pointer,
  2230. // non-interface field appearing in ForceSendFields will be sent to the
  2231. // server regardless of whether the field is empty or not. This may be
  2232. // used to include empty fields in Patch requests.
  2233. ForceSendFields []string `json:"-"`
  2234. // NullFields is a list of field names (e.g. "EntityId") to include in
  2235. // API requests with the JSON null value. By default, fields with empty
  2236. // values are omitted from API requests. However, any field with an
  2237. // empty value appearing in NullFields will be sent to the server as
  2238. // null. It is an error if a field in this list has a non-empty value.
  2239. // This may be used to include null fields in Patch requests.
  2240. NullFields []string `json:"-"`
  2241. }
  2242. func (s *GooglePrivacyDlpV2beta1KAnonymityConfig) MarshalJSON() ([]byte, error) {
  2243. type NoMethod GooglePrivacyDlpV2beta1KAnonymityConfig
  2244. raw := NoMethod(*s)
  2245. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2246. }
  2247. // GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass: The set of
  2248. // columns' values that share the same k-anonymity value.
  2249. type GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass struct {
  2250. // EquivalenceClassSize: Size of the equivalence class, for example
  2251. // number of rows with the
  2252. // above set of values.
  2253. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  2254. // QuasiIdsValues: Set of values defining the equivalence class. One
  2255. // value per
  2256. // quasi-identifier column in the original KAnonymity metric
  2257. // message.
  2258. // The order is always the same as the original request.
  2259. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  2260. // ForceSendFields is a list of field names (e.g.
  2261. // "EquivalenceClassSize") to unconditionally include in API requests.
  2262. // By default, fields with empty values are omitted from API requests.
  2263. // However, any non-pointer, non-interface field appearing in
  2264. // ForceSendFields will be sent to the server regardless of whether the
  2265. // field is empty or not. This may be used to include empty fields in
  2266. // Patch requests.
  2267. ForceSendFields []string `json:"-"`
  2268. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  2269. // include in API requests with the JSON null value. By default, fields
  2270. // with empty values are omitted from API requests. However, any field
  2271. // with an empty value appearing in NullFields will be sent to the
  2272. // server as null. It is an error if a field in this list has a
  2273. // non-empty value. This may be used to include null fields in Patch
  2274. // requests.
  2275. NullFields []string `json:"-"`
  2276. }
  2277. func (s *GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) {
  2278. type NoMethod GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass
  2279. raw := NoMethod(*s)
  2280. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2281. }
  2282. // GooglePrivacyDlpV2beta1KAnonymityHistogramBucket: Histogram bucket of
  2283. // equivalence class sizes in the table.
  2284. type GooglePrivacyDlpV2beta1KAnonymityHistogramBucket struct {
  2285. // BucketSize: Total number of records in this bucket.
  2286. BucketSize int64 `json:"bucketSize,omitempty,string"`
  2287. // BucketValues: Sample of equivalence classes in this bucket. The total
  2288. // number of
  2289. // classes returned per bucket is capped at 20.
  2290. BucketValues []*GooglePrivacyDlpV2beta1KAnonymityEquivalenceClass `json:"bucketValues,omitempty"`
  2291. // EquivalenceClassSizeLowerBound: Lower bound on the size of the
  2292. // equivalence classes in this bucket.
  2293. EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"`
  2294. // EquivalenceClassSizeUpperBound: Upper bound on the size of the
  2295. // equivalence classes in this bucket.
  2296. EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"`
  2297. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  2298. // unconditionally include in API requests. By default, fields with
  2299. // empty values are omitted from API requests. However, any non-pointer,
  2300. // non-interface field appearing in ForceSendFields will be sent to the
  2301. // server regardless of whether the field is empty or not. This may be
  2302. // used to include empty fields in Patch requests.
  2303. ForceSendFields []string `json:"-"`
  2304. // NullFields is a list of field names (e.g. "BucketSize") to include in
  2305. // API requests with the JSON null value. By default, fields with empty
  2306. // values are omitted from API requests. However, any field with an
  2307. // empty value appearing in NullFields will be sent to the server as
  2308. // null. It is an error if a field in this list has a non-empty value.
  2309. // This may be used to include null fields in Patch requests.
  2310. NullFields []string `json:"-"`
  2311. }
  2312. func (s *GooglePrivacyDlpV2beta1KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) {
  2313. type NoMethod GooglePrivacyDlpV2beta1KAnonymityHistogramBucket
  2314. raw := NoMethod(*s)
  2315. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2316. }
  2317. // GooglePrivacyDlpV2beta1KAnonymityResult: Result of the k-anonymity
  2318. // computation.
  2319. type GooglePrivacyDlpV2beta1KAnonymityResult struct {
  2320. // EquivalenceClassHistogramBuckets: Histogram of k-anonymity
  2321. // equivalence classes.
  2322. EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2beta1KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"`
  2323. // ForceSendFields is a list of field names (e.g.
  2324. // "EquivalenceClassHistogramBuckets") to unconditionally include in API
  2325. // requests. By default, fields with empty values are omitted from API
  2326. // requests. However, any non-pointer, non-interface field appearing in
  2327. // ForceSendFields will be sent to the server regardless of whether the
  2328. // field is empty or not. This may be used to include empty fields in
  2329. // Patch requests.
  2330. ForceSendFields []string `json:"-"`
  2331. // NullFields is a list of field names (e.g.
  2332. // "EquivalenceClassHistogramBuckets") to include in API requests with
  2333. // the JSON null value. By default, fields with empty values are omitted
  2334. // from API requests. However, any field with an empty value appearing
  2335. // in NullFields will be sent to the server as null. It is an error if a
  2336. // field in this list has a non-empty value. This may be used to include
  2337. // null fields in Patch requests.
  2338. NullFields []string `json:"-"`
  2339. }
  2340. func (s *GooglePrivacyDlpV2beta1KAnonymityResult) MarshalJSON() ([]byte, error) {
  2341. type NoMethod GooglePrivacyDlpV2beta1KAnonymityResult
  2342. raw := NoMethod(*s)
  2343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2344. }
  2345. // GooglePrivacyDlpV2beta1KMapEstimationConfig: Reidentifiability
  2346. // metric. This corresponds to a risk model similar to what
  2347. // is called "journalist risk" in the literature, except the attack
  2348. // dataset is
  2349. // statistically modeled instead of being perfectly known. This can be
  2350. // done
  2351. // using publicly available data (like the US Census), or using a
  2352. // custom
  2353. // statistical model (indicated as one or several BigQuery tables), or
  2354. // by
  2355. // extrapolating from the distribution of values in the input dataset.
  2356. type GooglePrivacyDlpV2beta1KMapEstimationConfig struct {
  2357. // AuxiliaryTables: Several auxiliary tables can be used in the
  2358. // analysis. Each custom_tag
  2359. // used to tag a quasi-identifiers column must appear in exactly one
  2360. // column
  2361. // of one auxiliary table.
  2362. AuxiliaryTables []*GooglePrivacyDlpV2beta1AuxiliaryTable `json:"auxiliaryTables,omitempty"`
  2363. // QuasiIds: Fields considered to be quasi-identifiers. No two columns
  2364. // can have the
  2365. // same tag. [required]
  2366. QuasiIds []*GooglePrivacyDlpV2beta1TaggedField `json:"quasiIds,omitempty"`
  2367. // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
  2368. // modeling.
  2369. // Required if no column is tagged with a region-specific InfoType
  2370. // (like
  2371. // US_ZIP_5) or a region code.
  2372. RegionCode string `json:"regionCode,omitempty"`
  2373. // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
  2374. // unconditionally include in API requests. By default, fields with
  2375. // empty values are omitted from API requests. However, any non-pointer,
  2376. // non-interface field appearing in ForceSendFields will be sent to the
  2377. // server regardless of whether the field is empty or not. This may be
  2378. // used to include empty fields in Patch requests.
  2379. ForceSendFields []string `json:"-"`
  2380. // NullFields is a list of field names (e.g. "AuxiliaryTables") to
  2381. // include in API requests with the JSON null value. By default, fields
  2382. // with empty values are omitted from API requests. However, any field
  2383. // with an empty value appearing in NullFields will be sent to the
  2384. // server as null. It is an error if a field in this list has a
  2385. // non-empty value. This may be used to include null fields in Patch
  2386. // requests.
  2387. NullFields []string `json:"-"`
  2388. }
  2389. func (s *GooglePrivacyDlpV2beta1KMapEstimationConfig) MarshalJSON() ([]byte, error) {
  2390. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationConfig
  2391. raw := NoMethod(*s)
  2392. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2393. }
  2394. // GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket: A
  2395. // KMapEstimationHistogramBucket message with the following values:
  2396. // min_anonymity: 3
  2397. // max_anonymity: 5
  2398. // frequency: 42
  2399. // means that there are 42 records whose quasi-identifier values
  2400. // correspond
  2401. // to 3, 4 or 5 people in the overlying population. An important
  2402. // particular
  2403. // case is when min_anonymity = max_anonymity = 1: the frequency field
  2404. // then
  2405. // corresponds to the number of uniquely identifiable records.
  2406. type GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket struct {
  2407. // BucketSize: Number of records within these anonymity bounds.
  2408. BucketSize int64 `json:"bucketSize,omitempty,string"`
  2409. // BucketValues: Sample of quasi-identifier tuple values in this bucket.
  2410. // The total
  2411. // number of classes returned per bucket is capped at 20.
  2412. BucketValues []*GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"`
  2413. // MaxAnonymity: Always greater than or equal to min_anonymity.
  2414. MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"`
  2415. // MinAnonymity: Always positive.
  2416. MinAnonymity int64 `json:"minAnonymity,omitempty,string"`
  2417. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  2418. // unconditionally include in API requests. By default, fields with
  2419. // empty values are omitted from API requests. However, any non-pointer,
  2420. // non-interface field appearing in ForceSendFields will be sent to the
  2421. // server regardless of whether the field is empty or not. This may be
  2422. // used to include empty fields in Patch requests.
  2423. ForceSendFields []string `json:"-"`
  2424. // NullFields is a list of field names (e.g. "BucketSize") to include in
  2425. // API requests with the JSON null value. By default, fields with empty
  2426. // values are omitted from API requests. However, any field with an
  2427. // empty value appearing in NullFields will be sent to the server as
  2428. // null. It is an error if a field in this list has a non-empty value.
  2429. // This may be used to include null fields in Patch requests.
  2430. NullFields []string `json:"-"`
  2431. }
  2432. func (s *GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
  2433. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket
  2434. raw := NoMethod(*s)
  2435. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2436. }
  2437. // GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues: A tuple of values
  2438. // for the quasi-identifier columns.
  2439. type GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues struct {
  2440. // EstimatedAnonymity: The estimated anonymity for these
  2441. // quasi-identifier values.
  2442. EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"`
  2443. // QuasiIdsValues: The quasi-identifier values.
  2444. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  2445. // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity")
  2446. // to unconditionally include in API requests. By default, fields with
  2447. // empty values are omitted from API requests. However, any non-pointer,
  2448. // non-interface field appearing in ForceSendFields will be sent to the
  2449. // server regardless of whether the field is empty or not. This may be
  2450. // used to include empty fields in Patch requests.
  2451. ForceSendFields []string `json:"-"`
  2452. // NullFields is a list of field names (e.g. "EstimatedAnonymity") to
  2453. // include in API requests with the JSON null value. By default, fields
  2454. // with empty values are omitted from API requests. However, any field
  2455. // with an empty value appearing in NullFields will be sent to the
  2456. // server as null. It is an error if a field in this list has a
  2457. // non-empty value. This may be used to include null fields in Patch
  2458. // requests.
  2459. NullFields []string `json:"-"`
  2460. }
  2461. func (s *GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
  2462. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationQuasiIdValues
  2463. raw := NoMethod(*s)
  2464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2465. }
  2466. // GooglePrivacyDlpV2beta1KMapEstimationResult: Result of the
  2467. // reidentifiability analysis. Note that these results are
  2468. // an
  2469. // estimation, not exact values.
  2470. type GooglePrivacyDlpV2beta1KMapEstimationResult struct {
  2471. // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity]
  2472. // do not overlap. If a value
  2473. // doesn't correspond to any such interval, the associated frequency
  2474. // is
  2475. // zero. For example, the following records:
  2476. // {min_anonymity: 1, max_anonymity: 1, frequency: 17}
  2477. // {min_anonymity: 2, max_anonymity: 3, frequency: 42}
  2478. // {min_anonymity: 5, max_anonymity: 10, frequency: 99}
  2479. // mean that there are no record with an estimated anonymity of 4, 5,
  2480. // or
  2481. // larger than 10.
  2482. KMapEstimationHistogram []*GooglePrivacyDlpV2beta1KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"`
  2483. // ForceSendFields is a list of field names (e.g.
  2484. // "KMapEstimationHistogram") to unconditionally include in API
  2485. // requests. By default, fields with empty values are omitted from API
  2486. // requests. However, any non-pointer, non-interface field appearing in
  2487. // ForceSendFields will be sent to the server regardless of whether the
  2488. // field is empty or not. This may be used to include empty fields in
  2489. // Patch requests.
  2490. ForceSendFields []string `json:"-"`
  2491. // NullFields is a list of field names (e.g. "KMapEstimationHistogram")
  2492. // to include in API requests with the JSON null value. By default,
  2493. // fields with empty values are omitted from API requests. However, any
  2494. // field with an empty value appearing in NullFields will be sent to the
  2495. // server as null. It is an error if a field in this list has a
  2496. // non-empty value. This may be used to include null fields in Patch
  2497. // requests.
  2498. NullFields []string `json:"-"`
  2499. }
  2500. func (s *GooglePrivacyDlpV2beta1KMapEstimationResult) MarshalJSON() ([]byte, error) {
  2501. type NoMethod GooglePrivacyDlpV2beta1KMapEstimationResult
  2502. raw := NoMethod(*s)
  2503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2504. }
  2505. // GooglePrivacyDlpV2beta1Key: A unique identifier for a Datastore
  2506. // entity.
  2507. // If a key's partition ID or any of its path kinds or names
  2508. // are
  2509. // reserved/read-only, the key is reserved/read-only.
  2510. // A reserved/read-only key is forbidden in certain documented contexts.
  2511. type GooglePrivacyDlpV2beta1Key struct {
  2512. // PartitionId: Entities are partitioned into subsets, currently
  2513. // identified by a project
  2514. // ID and namespace ID.
  2515. // Queries are scoped to a single partition.
  2516. PartitionId *GooglePrivacyDlpV2beta1PartitionId `json:"partitionId,omitempty"`
  2517. // Path: The entity path.
  2518. // An entity path consists of one or more elements composed of a kind
  2519. // and a
  2520. // string or numerical identifier, which identify entities. The
  2521. // first
  2522. // element identifies a _root entity_, the second element identifies
  2523. // a _child_ of the root entity, the third element identifies a child of
  2524. // the
  2525. // second entity, and so forth. The entities identified by all prefixes
  2526. // of
  2527. // the path are called the element's _ancestors_.
  2528. //
  2529. // A path can never be empty, and a path can have at most 100 elements.
  2530. Path []*GooglePrivacyDlpV2beta1PathElement `json:"path,omitempty"`
  2531. // ForceSendFields is a list of field names (e.g. "PartitionId") to
  2532. // unconditionally include in API requests. By default, fields with
  2533. // empty values are omitted from API requests. However, any non-pointer,
  2534. // non-interface field appearing in ForceSendFields will be sent to the
  2535. // server regardless of whether the field is empty or not. This may be
  2536. // used to include empty fields in Patch requests.
  2537. ForceSendFields []string `json:"-"`
  2538. // NullFields is a list of field names (e.g. "PartitionId") to include
  2539. // in API requests with the JSON null value. By default, fields with
  2540. // empty values are omitted from API requests. However, any field with
  2541. // an empty value appearing in NullFields will be sent to the server as
  2542. // null. It is an error if a field in this list has a non-empty value.
  2543. // This may be used to include null fields in Patch requests.
  2544. NullFields []string `json:"-"`
  2545. }
  2546. func (s *GooglePrivacyDlpV2beta1Key) MarshalJSON() ([]byte, error) {
  2547. type NoMethod GooglePrivacyDlpV2beta1Key
  2548. raw := NoMethod(*s)
  2549. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2550. }
  2551. // GooglePrivacyDlpV2beta1KindExpression: A representation of a
  2552. // Datastore kind.
  2553. type GooglePrivacyDlpV2beta1KindExpression struct {
  2554. // Name: The name of the kind.
  2555. Name string `json:"name,omitempty"`
  2556. // ForceSendFields is a list of field names (e.g. "Name") to
  2557. // unconditionally include in API requests. By default, fields with
  2558. // empty values are omitted from API requests. However, any non-pointer,
  2559. // non-interface field appearing in ForceSendFields will be sent to the
  2560. // server regardless of whether the field is empty or not. This may be
  2561. // used to include empty fields in Patch requests.
  2562. ForceSendFields []string `json:"-"`
  2563. // NullFields is a list of field names (e.g. "Name") to include in API
  2564. // requests with the JSON null value. By default, fields with empty
  2565. // values are omitted from API requests. However, any field with an
  2566. // empty value appearing in NullFields will be sent to the server as
  2567. // null. It is an error if a field in this list has a non-empty value.
  2568. // This may be used to include null fields in Patch requests.
  2569. NullFields []string `json:"-"`
  2570. }
  2571. func (s *GooglePrivacyDlpV2beta1KindExpression) MarshalJSON() ([]byte, error) {
  2572. type NoMethod GooglePrivacyDlpV2beta1KindExpression
  2573. raw := NoMethod(*s)
  2574. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2575. }
  2576. // GooglePrivacyDlpV2beta1KmsWrappedCryptoKey: Include to use an
  2577. // existing data crypto key wrapped by KMS.
  2578. // Authorization requires the following IAM permissions when sending a
  2579. // request
  2580. // to perform a crypto transformation using a kms-wrapped crypto
  2581. // key:
  2582. // dlp.kms.encrypt
  2583. type GooglePrivacyDlpV2beta1KmsWrappedCryptoKey struct {
  2584. // CryptoKeyName: The resource name of the KMS CryptoKey to use for
  2585. // unwrapping. [required]
  2586. CryptoKeyName string `json:"cryptoKeyName,omitempty"`
  2587. // WrappedKey: The wrapped data crypto key. [required]
  2588. WrappedKey string `json:"wrappedKey,omitempty"`
  2589. // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to
  2590. // unconditionally include in API requests. By default, fields with
  2591. // empty values are omitted from API requests. However, any non-pointer,
  2592. // non-interface field appearing in ForceSendFields will be sent to the
  2593. // server regardless of whether the field is empty or not. This may be
  2594. // used to include empty fields in Patch requests.
  2595. ForceSendFields []string `json:"-"`
  2596. // NullFields is a list of field names (e.g. "CryptoKeyName") to include
  2597. // in API requests with the JSON null value. By default, fields with
  2598. // empty values are omitted from API requests. However, any field with
  2599. // an empty value appearing in NullFields will be sent to the server as
  2600. // null. It is an error if a field in this list has a non-empty value.
  2601. // This may be used to include null fields in Patch requests.
  2602. NullFields []string `json:"-"`
  2603. }
  2604. func (s *GooglePrivacyDlpV2beta1KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) {
  2605. type NoMethod GooglePrivacyDlpV2beta1KmsWrappedCryptoKey
  2606. raw := NoMethod(*s)
  2607. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2608. }
  2609. // GooglePrivacyDlpV2beta1LDiversityConfig: l-diversity metric, used for
  2610. // analysis of reidentification risk.
  2611. type GooglePrivacyDlpV2beta1LDiversityConfig struct {
  2612. // QuasiIds: Set of quasi-identifiers indicating how equivalence classes
  2613. // are
  2614. // defined for the l-diversity computation. When multiple fields
  2615. // are
  2616. // specified, they are considered a single composite key.
  2617. QuasiIds []*GooglePrivacyDlpV2beta1FieldId `json:"quasiIds,omitempty"`
  2618. // SensitiveAttribute: Sensitive field for computing the l-value.
  2619. SensitiveAttribute *GooglePrivacyDlpV2beta1FieldId `json:"sensitiveAttribute,omitempty"`
  2620. // ForceSendFields is a list of field names (e.g. "QuasiIds") to
  2621. // unconditionally include in API requests. By default, fields with
  2622. // empty values are omitted from API requests. However, any non-pointer,
  2623. // non-interface field appearing in ForceSendFields will be sent to the
  2624. // server regardless of whether the field is empty or not. This may be
  2625. // used to include empty fields in Patch requests.
  2626. ForceSendFields []string `json:"-"`
  2627. // NullFields is a list of field names (e.g. "QuasiIds") to include in
  2628. // API requests with the JSON null value. By default, fields with empty
  2629. // values are omitted from API requests. However, any field with an
  2630. // empty value appearing in NullFields will be sent to the server as
  2631. // null. It is an error if a field in this list has a non-empty value.
  2632. // This may be used to include null fields in Patch requests.
  2633. NullFields []string `json:"-"`
  2634. }
  2635. func (s *GooglePrivacyDlpV2beta1LDiversityConfig) MarshalJSON() ([]byte, error) {
  2636. type NoMethod GooglePrivacyDlpV2beta1LDiversityConfig
  2637. raw := NoMethod(*s)
  2638. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2639. }
  2640. // GooglePrivacyDlpV2beta1LDiversityEquivalenceClass: The set of
  2641. // columns' values that share the same l-diversity value.
  2642. type GooglePrivacyDlpV2beta1LDiversityEquivalenceClass struct {
  2643. // EquivalenceClassSize: Size of the k-anonymity equivalence class.
  2644. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"`
  2645. // NumDistinctSensitiveValues: Number of distinct sensitive values in
  2646. // this equivalence class.
  2647. NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"`
  2648. // QuasiIdsValues: Quasi-identifier values defining the k-anonymity
  2649. // equivalence
  2650. // class. The order is always the same as the original request.
  2651. QuasiIdsValues []*GooglePrivacyDlpV2beta1Value `json:"quasiIdsValues,omitempty"`
  2652. // TopSensitiveValues: Estimated frequencies of top sensitive values.
  2653. TopSensitiveValues []*GooglePrivacyDlpV2beta1ValueFrequency `json:"topSensitiveValues,omitempty"`
  2654. // ForceSendFields is a list of field names (e.g.
  2655. // "EquivalenceClassSize") to unconditionally include in API requests.
  2656. // By default, fields with empty values are omitted from API requests.
  2657. // However, any non-pointer, non-interface field appearing in
  2658. // ForceSendFields will be sent to the server regardless of whether the
  2659. // field is empty or not. This may be used to include empty fields in
  2660. // Patch requests.
  2661. ForceSendFields []string `json:"-"`
  2662. // NullFields is a list of field names (e.g. "EquivalenceClassSize") to
  2663. // include in API requests with the JSON null value. By default, fields
  2664. // with empty values are omitted from API requests. However, any field
  2665. // with an empty value appearing in NullFields will be sent to the
  2666. // server as null. It is an error if a field in this list has a
  2667. // non-empty value. This may be used to include null fields in Patch
  2668. // requests.
  2669. NullFields []string `json:"-"`
  2670. }
  2671. func (s *GooglePrivacyDlpV2beta1LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) {
  2672. type NoMethod GooglePrivacyDlpV2beta1LDiversityEquivalenceClass
  2673. raw := NoMethod(*s)
  2674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2675. }
  2676. // GooglePrivacyDlpV2beta1LDiversityHistogramBucket: Histogram bucket of
  2677. // sensitive value frequencies in the table.
  2678. type GooglePrivacyDlpV2beta1LDiversityHistogramBucket struct {
  2679. // BucketSize: Total number of records in this bucket.
  2680. BucketSize int64 `json:"bucketSize,omitempty,string"`
  2681. // BucketValues: Sample of equivalence classes in this bucket. The total
  2682. // number of
  2683. // classes returned per bucket is capped at 20.
  2684. BucketValues []*GooglePrivacyDlpV2beta1LDiversityEquivalenceClass `json:"bucketValues,omitempty"`
  2685. // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value
  2686. // frequencies of the equivalence
  2687. // classes in this bucket.
  2688. SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"`
  2689. // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value
  2690. // frequencies of the equivalence
  2691. // classes in this bucket.
  2692. SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"`
  2693. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  2694. // unconditionally include in API requests. By default, fields with
  2695. // empty values are omitted from API requests. However, any non-pointer,
  2696. // non-interface field appearing in ForceSendFields will be sent to the
  2697. // server regardless of whether the field is empty or not. This may be
  2698. // used to include empty fields in Patch requests.
  2699. ForceSendFields []string `json:"-"`
  2700. // NullFields is a list of field names (e.g. "BucketSize") to include in
  2701. // API requests with the JSON null value. By default, fields with empty
  2702. // values are omitted from API requests. However, any field with an
  2703. // empty value appearing in NullFields will be sent to the server as
  2704. // null. It is an error if a field in this list has a non-empty value.
  2705. // This may be used to include null fields in Patch requests.
  2706. NullFields []string `json:"-"`
  2707. }
  2708. func (s *GooglePrivacyDlpV2beta1LDiversityHistogramBucket) MarshalJSON() ([]byte, error) {
  2709. type NoMethod GooglePrivacyDlpV2beta1LDiversityHistogramBucket
  2710. raw := NoMethod(*s)
  2711. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2712. }
  2713. // GooglePrivacyDlpV2beta1LDiversityResult: Result of the l-diversity
  2714. // computation.
  2715. type GooglePrivacyDlpV2beta1LDiversityResult struct {
  2716. // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity
  2717. // equivalence class sensitive value frequencies.
  2718. SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2beta1LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"`
  2719. // ForceSendFields is a list of field names (e.g.
  2720. // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include
  2721. // in API requests. By default, fields with empty values are omitted
  2722. // from API requests. However, any non-pointer, non-interface field
  2723. // appearing in ForceSendFields will be sent to the server regardless of
  2724. // whether the field is empty or not. This may be used to include empty
  2725. // fields in Patch requests.
  2726. ForceSendFields []string `json:"-"`
  2727. // NullFields is a list of field names (e.g.
  2728. // "SensitiveValueFrequencyHistogramBuckets") to include in API requests
  2729. // with the JSON null value. By default, fields with empty values are
  2730. // omitted from API requests. However, any field with an empty value
  2731. // appearing in NullFields will be sent to the server as null. It is an
  2732. // error if a field in this list has a non-empty value. This may be used
  2733. // to include null fields in Patch requests.
  2734. NullFields []string `json:"-"`
  2735. }
  2736. func (s *GooglePrivacyDlpV2beta1LDiversityResult) MarshalJSON() ([]byte, error) {
  2737. type NoMethod GooglePrivacyDlpV2beta1LDiversityResult
  2738. raw := NoMethod(*s)
  2739. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2740. }
  2741. // GooglePrivacyDlpV2beta1ListInfoTypesResponse: Response to the
  2742. // ListInfoTypes request.
  2743. type GooglePrivacyDlpV2beta1ListInfoTypesResponse struct {
  2744. // InfoTypes: Set of sensitive info types belonging to a category.
  2745. InfoTypes []*GooglePrivacyDlpV2beta1InfoTypeDescription `json:"infoTypes,omitempty"`
  2746. // ServerResponse contains the HTTP response code and headers from the
  2747. // server.
  2748. googleapi.ServerResponse `json:"-"`
  2749. // ForceSendFields is a list of field names (e.g. "InfoTypes") to
  2750. // unconditionally include in API requests. By default, fields with
  2751. // empty values are omitted from API requests. However, any non-pointer,
  2752. // non-interface field appearing in ForceSendFields will be sent to the
  2753. // server regardless of whether the field is empty or not. This may be
  2754. // used to include empty fields in Patch requests.
  2755. ForceSendFields []string `json:"-"`
  2756. // NullFields is a list of field names (e.g. "InfoTypes") to include in
  2757. // API requests with the JSON null value. By default, fields with empty
  2758. // values are omitted from API requests. However, any field with an
  2759. // empty value appearing in NullFields will be sent to the server as
  2760. // null. It is an error if a field in this list has a non-empty value.
  2761. // This may be used to include null fields in Patch requests.
  2762. NullFields []string `json:"-"`
  2763. }
  2764. func (s *GooglePrivacyDlpV2beta1ListInfoTypesResponse) MarshalJSON() ([]byte, error) {
  2765. type NoMethod GooglePrivacyDlpV2beta1ListInfoTypesResponse
  2766. raw := NoMethod(*s)
  2767. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2768. }
  2769. // GooglePrivacyDlpV2beta1ListInspectFindingsResponse: Response to the
  2770. // ListInspectFindings request.
  2771. type GooglePrivacyDlpV2beta1ListInspectFindingsResponse struct {
  2772. // NextPageToken: If not empty, indicates that there may be more results
  2773. // that match the
  2774. // request; this value should be passed in a new
  2775. // `ListInspectFindingsRequest`.
  2776. NextPageToken string `json:"nextPageToken,omitempty"`
  2777. // Result: The results.
  2778. Result *GooglePrivacyDlpV2beta1InspectResult `json:"result,omitempty"`
  2779. // ServerResponse contains the HTTP response code and headers from the
  2780. // server.
  2781. googleapi.ServerResponse `json:"-"`
  2782. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2783. // unconditionally include in API requests. By default, fields with
  2784. // empty values are omitted from API requests. However, any non-pointer,
  2785. // non-interface field appearing in ForceSendFields will be sent to the
  2786. // server regardless of whether the field is empty or not. This may be
  2787. // used to include empty fields in Patch requests.
  2788. ForceSendFields []string `json:"-"`
  2789. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2790. // in API requests with the JSON null value. By default, fields with
  2791. // empty values are omitted from API requests. However, any field with
  2792. // an empty value appearing in NullFields will be sent to the server as
  2793. // null. It is an error if a field in this list has a non-empty value.
  2794. // This may be used to include null fields in Patch requests.
  2795. NullFields []string `json:"-"`
  2796. }
  2797. func (s *GooglePrivacyDlpV2beta1ListInspectFindingsResponse) MarshalJSON() ([]byte, error) {
  2798. type NoMethod GooglePrivacyDlpV2beta1ListInspectFindingsResponse
  2799. raw := NoMethod(*s)
  2800. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2801. }
  2802. // GooglePrivacyDlpV2beta1ListRootCategoriesResponse: Response for
  2803. // ListRootCategories request.
  2804. type GooglePrivacyDlpV2beta1ListRootCategoriesResponse struct {
  2805. // Categories: List of all into type categories supported by the API.
  2806. Categories []*GooglePrivacyDlpV2beta1CategoryDescription `json:"categories,omitempty"`
  2807. // ServerResponse contains the HTTP response code and headers from the
  2808. // server.
  2809. googleapi.ServerResponse `json:"-"`
  2810. // ForceSendFields is a list of field names (e.g. "Categories") to
  2811. // unconditionally include in API requests. By default, fields with
  2812. // empty values are omitted from API requests. However, any non-pointer,
  2813. // non-interface field appearing in ForceSendFields will be sent to the
  2814. // server regardless of whether the field is empty or not. This may be
  2815. // used to include empty fields in Patch requests.
  2816. ForceSendFields []string `json:"-"`
  2817. // NullFields is a list of field names (e.g. "Categories") to include in
  2818. // API requests with the JSON null value. By default, fields with empty
  2819. // values are omitted from API requests. However, any field with an
  2820. // empty value appearing in NullFields will be sent to the server as
  2821. // null. It is an error if a field in this list has a non-empty value.
  2822. // This may be used to include null fields in Patch requests.
  2823. NullFields []string `json:"-"`
  2824. }
  2825. func (s *GooglePrivacyDlpV2beta1ListRootCategoriesResponse) MarshalJSON() ([]byte, error) {
  2826. type NoMethod GooglePrivacyDlpV2beta1ListRootCategoriesResponse
  2827. raw := NoMethod(*s)
  2828. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2829. }
  2830. // GooglePrivacyDlpV2beta1Location: Specifies the location of the
  2831. // finding.
  2832. type GooglePrivacyDlpV2beta1Location struct {
  2833. // ByteRange: Zero-based byte offsets delimiting the finding.
  2834. // These are relative to the finding's containing element.
  2835. // Note that when the content is not textual, this references
  2836. // the UTF-8 encoded textual representation of the content.
  2837. // Omitted if content is an image.
  2838. ByteRange *GooglePrivacyDlpV2beta1Range `json:"byteRange,omitempty"`
  2839. // CodepointRange: Unicode character offsets delimiting the
  2840. // finding.
  2841. // These are relative to the finding's containing element.
  2842. // Provided when the content is text.
  2843. CodepointRange *GooglePrivacyDlpV2beta1Range `json:"codepointRange,omitempty"`
  2844. // FieldId: The pointer to the property or cell that contained the
  2845. // finding.
  2846. // Provided when the finding's containing element is a cell in a
  2847. // table
  2848. // or a property of storage object.
  2849. FieldId *GooglePrivacyDlpV2beta1FieldId `json:"fieldId,omitempty"`
  2850. // ImageBoxes: The area within the image that contained the
  2851. // finding.
  2852. // Provided when the content is an image.
  2853. ImageBoxes []*GooglePrivacyDlpV2beta1ImageLocation `json:"imageBoxes,omitempty"`
  2854. // RecordKey: The pointer to the record in storage that contained the
  2855. // field the
  2856. // finding was found in.
  2857. // Provided when the finding's containing element is a property
  2858. // of a storage object.
  2859. RecordKey *GooglePrivacyDlpV2beta1RecordKey `json:"recordKey,omitempty"`
  2860. // TableLocation: The pointer to the row of the table that contained the
  2861. // finding.
  2862. // Provided when the finding's containing element is a cell of a table.
  2863. TableLocation *GooglePrivacyDlpV2beta1TableLocation `json:"tableLocation,omitempty"`
  2864. // ForceSendFields is a list of field names (e.g. "ByteRange") to
  2865. // unconditionally include in API requests. By default, fields with
  2866. // empty values are omitted from API requests. However, any non-pointer,
  2867. // non-interface field appearing in ForceSendFields will be sent to the
  2868. // server regardless of whether the field is empty or not. This may be
  2869. // used to include empty fields in Patch requests.
  2870. ForceSendFields []string `json:"-"`
  2871. // NullFields is a list of field names (e.g. "ByteRange") to include in
  2872. // API requests with the JSON null value. By default, fields with empty
  2873. // values are omitted from API requests. However, any field with an
  2874. // empty value appearing in NullFields will be sent to the server as
  2875. // null. It is an error if a field in this list has a non-empty value.
  2876. // This may be used to include null fields in Patch requests.
  2877. NullFields []string `json:"-"`
  2878. }
  2879. func (s *GooglePrivacyDlpV2beta1Location) MarshalJSON() ([]byte, error) {
  2880. type NoMethod GooglePrivacyDlpV2beta1Location
  2881. raw := NoMethod(*s)
  2882. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2883. }
  2884. // GooglePrivacyDlpV2beta1NumericalStatsConfig: Compute numerical stats
  2885. // over an individual column, including
  2886. // min, max, and quantiles.
  2887. type GooglePrivacyDlpV2beta1NumericalStatsConfig struct {
  2888. // Field: Field to compute numerical stats on. Supported types
  2889. // are
  2890. // integer, float, date, datetime, timestamp, time.
  2891. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  2892. // ForceSendFields is a list of field names (e.g. "Field") to
  2893. // unconditionally include in API requests. By default, fields with
  2894. // empty values are omitted from API requests. However, any non-pointer,
  2895. // non-interface field appearing in ForceSendFields will be sent to the
  2896. // server regardless of whether the field is empty or not. This may be
  2897. // used to include empty fields in Patch requests.
  2898. ForceSendFields []string `json:"-"`
  2899. // NullFields is a list of field names (e.g. "Field") to include in API
  2900. // requests with the JSON null value. By default, fields with empty
  2901. // values are omitted from API requests. However, any field with an
  2902. // empty value appearing in NullFields will be sent to the server as
  2903. // null. It is an error if a field in this list has a non-empty value.
  2904. // This may be used to include null fields in Patch requests.
  2905. NullFields []string `json:"-"`
  2906. }
  2907. func (s *GooglePrivacyDlpV2beta1NumericalStatsConfig) MarshalJSON() ([]byte, error) {
  2908. type NoMethod GooglePrivacyDlpV2beta1NumericalStatsConfig
  2909. raw := NoMethod(*s)
  2910. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2911. }
  2912. // GooglePrivacyDlpV2beta1NumericalStatsResult: Result of the numerical
  2913. // stats computation.
  2914. type GooglePrivacyDlpV2beta1NumericalStatsResult struct {
  2915. // MaxValue: Maximum value appearing in the column.
  2916. MaxValue *GooglePrivacyDlpV2beta1Value `json:"maxValue,omitempty"`
  2917. // MinValue: Minimum value appearing in the column.
  2918. MinValue *GooglePrivacyDlpV2beta1Value `json:"minValue,omitempty"`
  2919. // QuantileValues: List of 99 values that partition the set of field
  2920. // values into 100 equal
  2921. // sized buckets.
  2922. QuantileValues []*GooglePrivacyDlpV2beta1Value `json:"quantileValues,omitempty"`
  2923. // ForceSendFields is a list of field names (e.g. "MaxValue") to
  2924. // unconditionally include in API requests. By default, fields with
  2925. // empty values are omitted from API requests. However, any non-pointer,
  2926. // non-interface field appearing in ForceSendFields will be sent to the
  2927. // server regardless of whether the field is empty or not. This may be
  2928. // used to include empty fields in Patch requests.
  2929. ForceSendFields []string `json:"-"`
  2930. // NullFields is a list of field names (e.g. "MaxValue") to include in
  2931. // API requests with the JSON null value. By default, fields with empty
  2932. // values are omitted from API requests. However, any field with an
  2933. // empty value appearing in NullFields will be sent to the server as
  2934. // null. It is an error if a field in this list has a non-empty value.
  2935. // This may be used to include null fields in Patch requests.
  2936. NullFields []string `json:"-"`
  2937. }
  2938. func (s *GooglePrivacyDlpV2beta1NumericalStatsResult) MarshalJSON() ([]byte, error) {
  2939. type NoMethod GooglePrivacyDlpV2beta1NumericalStatsResult
  2940. raw := NoMethod(*s)
  2941. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2942. }
  2943. // GooglePrivacyDlpV2beta1OperationConfig: Additional configuration for
  2944. // inspect long running operations.
  2945. type GooglePrivacyDlpV2beta1OperationConfig struct {
  2946. // MaxItemFindings: Max number of findings per file, Datastore entity,
  2947. // or database row.
  2948. MaxItemFindings int64 `json:"maxItemFindings,omitempty,string"`
  2949. // ForceSendFields is a list of field names (e.g. "MaxItemFindings") to
  2950. // unconditionally include in API requests. By default, fields with
  2951. // empty values are omitted from API requests. However, any non-pointer,
  2952. // non-interface field appearing in ForceSendFields will be sent to the
  2953. // server regardless of whether the field is empty or not. This may be
  2954. // used to include empty fields in Patch requests.
  2955. ForceSendFields []string `json:"-"`
  2956. // NullFields is a list of field names (e.g. "MaxItemFindings") to
  2957. // include in API requests with the JSON null value. By default, fields
  2958. // with empty values are omitted from API requests. However, any field
  2959. // with an empty value appearing in NullFields will be sent to the
  2960. // server as null. It is an error if a field in this list has a
  2961. // non-empty value. This may be used to include null fields in Patch
  2962. // requests.
  2963. NullFields []string `json:"-"`
  2964. }
  2965. func (s *GooglePrivacyDlpV2beta1OperationConfig) MarshalJSON() ([]byte, error) {
  2966. type NoMethod GooglePrivacyDlpV2beta1OperationConfig
  2967. raw := NoMethod(*s)
  2968. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2969. }
  2970. // GooglePrivacyDlpV2beta1OutputStorageConfig: Cloud repository for
  2971. // storing output.
  2972. type GooglePrivacyDlpV2beta1OutputStorageConfig struct {
  2973. // StoragePath: The path to a Google Cloud Storage location to store
  2974. // output.
  2975. // The bucket must already exist and
  2976. // the Google APIs service account for DLP must have write permission
  2977. // to
  2978. // write to the given bucket.
  2979. // Results are split over multiple csv files with each file name
  2980. // matching
  2981. // the pattern "[operation_id]_[count].csv", for
  2982. // example
  2983. // `3094877188788974909_1.csv`. The `operation_id` matches
  2984. // the
  2985. // identifier for the Operation, and the `count` is a counter used
  2986. // for
  2987. // tracking the number of files written.
  2988. //
  2989. // The CSV file(s) contain the following columns regardless of storage
  2990. // type
  2991. // scanned:
  2992. // - id
  2993. // - info_type
  2994. // - likelihood
  2995. // - byte size of finding
  2996. // - quote
  2997. // - timestamp
  2998. //
  2999. // For Cloud Storage the next columns are:
  3000. //
  3001. // - file_path
  3002. // - start_offset
  3003. //
  3004. // For Cloud Datastore the next columns are:
  3005. //
  3006. // - project_id
  3007. // - namespace_id
  3008. // - path
  3009. // - column_name
  3010. // - offset
  3011. //
  3012. // For BigQuery the next columns are:
  3013. //
  3014. // - row_number
  3015. // - project_id
  3016. // - dataset_id
  3017. // - table_id
  3018. StoragePath *GooglePrivacyDlpV2beta1CloudStoragePath `json:"storagePath,omitempty"`
  3019. // Table: Store findings in a new table in the dataset.
  3020. Table *GooglePrivacyDlpV2beta1BigQueryTable `json:"table,omitempty"`
  3021. // ForceSendFields is a list of field names (e.g. "StoragePath") to
  3022. // unconditionally include in API requests. By default, fields with
  3023. // empty values are omitted from API requests. However, any non-pointer,
  3024. // non-interface field appearing in ForceSendFields will be sent to the
  3025. // server regardless of whether the field is empty or not. This may be
  3026. // used to include empty fields in Patch requests.
  3027. ForceSendFields []string `json:"-"`
  3028. // NullFields is a list of field names (e.g. "StoragePath") to include
  3029. // in API requests with the JSON null value. By default, fields with
  3030. // empty values are omitted from API requests. However, any field with
  3031. // an empty value appearing in NullFields will be sent to the server as
  3032. // null. It is an error if a field in this list has a non-empty value.
  3033. // This may be used to include null fields in Patch requests.
  3034. NullFields []string `json:"-"`
  3035. }
  3036. func (s *GooglePrivacyDlpV2beta1OutputStorageConfig) MarshalJSON() ([]byte, error) {
  3037. type NoMethod GooglePrivacyDlpV2beta1OutputStorageConfig
  3038. raw := NoMethod(*s)
  3039. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3040. }
  3041. // GooglePrivacyDlpV2beta1PartitionId: Datastore partition ID.
  3042. // A partition ID identifies a grouping of entities. The grouping is
  3043. // always
  3044. // by project and namespace, however the namespace ID may be empty.
  3045. //
  3046. // A partition ID contains several dimensions:
  3047. // project ID and namespace ID.
  3048. type GooglePrivacyDlpV2beta1PartitionId struct {
  3049. // NamespaceId: If not empty, the ID of the namespace to which the
  3050. // entities belong.
  3051. NamespaceId string `json:"namespaceId,omitempty"`
  3052. // ProjectId: The ID of the project to which the entities belong.
  3053. ProjectId string `json:"projectId,omitempty"`
  3054. // ForceSendFields is a list of field names (e.g. "NamespaceId") to
  3055. // unconditionally include in API requests. By default, fields with
  3056. // empty values are omitted from API requests. However, any non-pointer,
  3057. // non-interface field appearing in ForceSendFields will be sent to the
  3058. // server regardless of whether the field is empty or not. This may be
  3059. // used to include empty fields in Patch requests.
  3060. ForceSendFields []string `json:"-"`
  3061. // NullFields is a list of field names (e.g. "NamespaceId") to include
  3062. // in API requests with the JSON null value. By default, fields with
  3063. // empty values are omitted from API requests. However, any field with
  3064. // an empty value appearing in NullFields will be sent to the server as
  3065. // null. It is an error if a field in this list has a non-empty value.
  3066. // This may be used to include null fields in Patch requests.
  3067. NullFields []string `json:"-"`
  3068. }
  3069. func (s *GooglePrivacyDlpV2beta1PartitionId) MarshalJSON() ([]byte, error) {
  3070. type NoMethod GooglePrivacyDlpV2beta1PartitionId
  3071. raw := NoMethod(*s)
  3072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3073. }
  3074. // GooglePrivacyDlpV2beta1PathElement: A (kind, ID/name) pair used to
  3075. // construct a key path.
  3076. //
  3077. // If either name or ID is set, the element is complete.
  3078. // If neither is set, the element is incomplete.
  3079. type GooglePrivacyDlpV2beta1PathElement struct {
  3080. // Id: The auto-allocated ID of the entity.
  3081. // Never equal to zero. Values less than zero are discouraged and may
  3082. // not
  3083. // be supported in the future.
  3084. Id int64 `json:"id,omitempty,string"`
  3085. // Kind: The kind of the entity.
  3086. // A kind matching regex `__.*__` is reserved/read-only.
  3087. // A kind must not contain more than 1500 bytes when UTF-8
  3088. // encoded.
  3089. // Cannot be "".
  3090. Kind string `json:"kind,omitempty"`
  3091. // Name: The name of the entity.
  3092. // A name matching regex `__.*__` is reserved/read-only.
  3093. // A name must not be more than 1500 bytes when UTF-8 encoded.
  3094. // Cannot be "".
  3095. Name string `json:"name,omitempty"`
  3096. // ForceSendFields is a list of field names (e.g. "Id") to
  3097. // unconditionally include in API requests. By default, fields with
  3098. // empty values are omitted from API requests. However, any non-pointer,
  3099. // non-interface field appearing in ForceSendFields will be sent to the
  3100. // server regardless of whether the field is empty or not. This may be
  3101. // used to include empty fields in Patch requests.
  3102. ForceSendFields []string `json:"-"`
  3103. // NullFields is a list of field names (e.g. "Id") to include in API
  3104. // requests with the JSON null value. By default, fields with empty
  3105. // values are omitted from API requests. However, any field with an
  3106. // empty value appearing in NullFields will be sent to the server as
  3107. // null. It is an error if a field in this list has a non-empty value.
  3108. // This may be used to include null fields in Patch requests.
  3109. NullFields []string `json:"-"`
  3110. }
  3111. func (s *GooglePrivacyDlpV2beta1PathElement) MarshalJSON() ([]byte, error) {
  3112. type NoMethod GooglePrivacyDlpV2beta1PathElement
  3113. raw := NoMethod(*s)
  3114. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3115. }
  3116. // GooglePrivacyDlpV2beta1PrimitiveTransformation: A rule for
  3117. // transforming a value.
  3118. type GooglePrivacyDlpV2beta1PrimitiveTransformation struct {
  3119. BucketingConfig *GooglePrivacyDlpV2beta1BucketingConfig `json:"bucketingConfig,omitempty"`
  3120. CharacterMaskConfig *GooglePrivacyDlpV2beta1CharacterMaskConfig `json:"characterMaskConfig,omitempty"`
  3121. CryptoHashConfig *GooglePrivacyDlpV2beta1CryptoHashConfig `json:"cryptoHashConfig,omitempty"`
  3122. CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"`
  3123. FixedSizeBucketingConfig *GooglePrivacyDlpV2beta1FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"`
  3124. RedactConfig *GooglePrivacyDlpV2beta1RedactConfig `json:"redactConfig,omitempty"`
  3125. ReplaceConfig *GooglePrivacyDlpV2beta1ReplaceValueConfig `json:"replaceConfig,omitempty"`
  3126. ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"`
  3127. TimePartConfig *GooglePrivacyDlpV2beta1TimePartConfig `json:"timePartConfig,omitempty"`
  3128. // ForceSendFields is a list of field names (e.g. "BucketingConfig") to
  3129. // unconditionally include in API requests. By default, fields with
  3130. // empty values are omitted from API requests. However, any non-pointer,
  3131. // non-interface field appearing in ForceSendFields will be sent to the
  3132. // server regardless of whether the field is empty or not. This may be
  3133. // used to include empty fields in Patch requests.
  3134. ForceSendFields []string `json:"-"`
  3135. // NullFields is a list of field names (e.g. "BucketingConfig") to
  3136. // include in API requests with the JSON null value. By default, fields
  3137. // with empty values are omitted from API requests. However, any field
  3138. // with an empty value appearing in NullFields will be sent to the
  3139. // server as null. It is an error if a field in this list has a
  3140. // non-empty value. This may be used to include null fields in Patch
  3141. // requests.
  3142. NullFields []string `json:"-"`
  3143. }
  3144. func (s *GooglePrivacyDlpV2beta1PrimitiveTransformation) MarshalJSON() ([]byte, error) {
  3145. type NoMethod GooglePrivacyDlpV2beta1PrimitiveTransformation
  3146. raw := NoMethod(*s)
  3147. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3148. }
  3149. // GooglePrivacyDlpV2beta1PrivacyMetric: Privacy metric to compute for
  3150. // reidentification risk analysis.
  3151. type GooglePrivacyDlpV2beta1PrivacyMetric struct {
  3152. CategoricalStatsConfig *GooglePrivacyDlpV2beta1CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"`
  3153. KAnonymityConfig *GooglePrivacyDlpV2beta1KAnonymityConfig `json:"kAnonymityConfig,omitempty"`
  3154. KMapEstimationConfig *GooglePrivacyDlpV2beta1KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"`
  3155. LDiversityConfig *GooglePrivacyDlpV2beta1LDiversityConfig `json:"lDiversityConfig,omitempty"`
  3156. NumericalStatsConfig *GooglePrivacyDlpV2beta1NumericalStatsConfig `json:"numericalStatsConfig,omitempty"`
  3157. // ForceSendFields is a list of field names (e.g.
  3158. // "CategoricalStatsConfig") to unconditionally include in API requests.
  3159. // By default, fields with empty values are omitted from API requests.
  3160. // However, any non-pointer, non-interface field appearing in
  3161. // ForceSendFields will be sent to the server regardless of whether the
  3162. // field is empty or not. This may be used to include empty fields in
  3163. // Patch requests.
  3164. ForceSendFields []string `json:"-"`
  3165. // NullFields is a list of field names (e.g. "CategoricalStatsConfig")
  3166. // to include in API requests with the JSON null value. By default,
  3167. // fields with empty values are omitted from API requests. However, any
  3168. // field with an empty value appearing in NullFields will be sent to the
  3169. // server as null. It is an error if a field in this list has a
  3170. // non-empty value. This may be used to include null fields in Patch
  3171. // requests.
  3172. NullFields []string `json:"-"`
  3173. }
  3174. func (s *GooglePrivacyDlpV2beta1PrivacyMetric) MarshalJSON() ([]byte, error) {
  3175. type NoMethod GooglePrivacyDlpV2beta1PrivacyMetric
  3176. raw := NoMethod(*s)
  3177. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3178. }
  3179. // GooglePrivacyDlpV2beta1Projection: A representation of a Datastore
  3180. // property in a projection.
  3181. type GooglePrivacyDlpV2beta1Projection struct {
  3182. // Property: The property to project.
  3183. Property *GooglePrivacyDlpV2beta1PropertyReference `json:"property,omitempty"`
  3184. // ForceSendFields is a list of field names (e.g. "Property") to
  3185. // unconditionally include in API requests. By default, fields with
  3186. // empty values are omitted from API requests. However, any non-pointer,
  3187. // non-interface field appearing in ForceSendFields will be sent to the
  3188. // server regardless of whether the field is empty or not. This may be
  3189. // used to include empty fields in Patch requests.
  3190. ForceSendFields []string `json:"-"`
  3191. // NullFields is a list of field names (e.g. "Property") to include in
  3192. // API requests with the JSON null value. By default, fields with empty
  3193. // values are omitted from API requests. However, any field with an
  3194. // empty value appearing in NullFields will be sent to the server as
  3195. // null. It is an error if a field in this list has a non-empty value.
  3196. // This may be used to include null fields in Patch requests.
  3197. NullFields []string `json:"-"`
  3198. }
  3199. func (s *GooglePrivacyDlpV2beta1Projection) MarshalJSON() ([]byte, error) {
  3200. type NoMethod GooglePrivacyDlpV2beta1Projection
  3201. raw := NoMethod(*s)
  3202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3203. }
  3204. // GooglePrivacyDlpV2beta1PropertyReference: A reference to a property
  3205. // relative to the Datastore kind expressions.
  3206. type GooglePrivacyDlpV2beta1PropertyReference struct {
  3207. // Name: The name of the property.
  3208. // If name includes "."s, it may be interpreted as a property name path.
  3209. Name string `json:"name,omitempty"`
  3210. // ForceSendFields is a list of field names (e.g. "Name") to
  3211. // unconditionally include in API requests. By default, fields with
  3212. // empty values are omitted from API requests. However, any non-pointer,
  3213. // non-interface field appearing in ForceSendFields will be sent to the
  3214. // server regardless of whether the field is empty or not. This may be
  3215. // used to include empty fields in Patch requests.
  3216. ForceSendFields []string `json:"-"`
  3217. // NullFields is a list of field names (e.g. "Name") to include in API
  3218. // requests with the JSON null value. By default, fields with empty
  3219. // values are omitted from API requests. However, any field with an
  3220. // empty value appearing in NullFields will be sent to the server as
  3221. // null. It is an error if a field in this list has a non-empty value.
  3222. // This may be used to include null fields in Patch requests.
  3223. NullFields []string `json:"-"`
  3224. }
  3225. func (s *GooglePrivacyDlpV2beta1PropertyReference) MarshalJSON() ([]byte, error) {
  3226. type NoMethod GooglePrivacyDlpV2beta1PropertyReference
  3227. raw := NoMethod(*s)
  3228. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3229. }
  3230. // GooglePrivacyDlpV2beta1QuasiIdField: A quasi-identifier column has a
  3231. // custom_tag, used to know which column
  3232. // in the data corresponds to which column in the statistical model.
  3233. type GooglePrivacyDlpV2beta1QuasiIdField struct {
  3234. CustomTag string `json:"customTag,omitempty"`
  3235. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  3236. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  3237. // unconditionally include in API requests. By default, fields with
  3238. // empty values are omitted from API requests. However, any non-pointer,
  3239. // non-interface field appearing in ForceSendFields will be sent to the
  3240. // server regardless of whether the field is empty or not. This may be
  3241. // used to include empty fields in Patch requests.
  3242. ForceSendFields []string `json:"-"`
  3243. // NullFields is a list of field names (e.g. "CustomTag") to include in
  3244. // API requests with the JSON null value. By default, fields with empty
  3245. // values are omitted from API requests. However, any field with an
  3246. // empty value appearing in NullFields will be sent to the server as
  3247. // null. It is an error if a field in this list has a non-empty value.
  3248. // This may be used to include null fields in Patch requests.
  3249. NullFields []string `json:"-"`
  3250. }
  3251. func (s *GooglePrivacyDlpV2beta1QuasiIdField) MarshalJSON() ([]byte, error) {
  3252. type NoMethod GooglePrivacyDlpV2beta1QuasiIdField
  3253. raw := NoMethod(*s)
  3254. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3255. }
  3256. // GooglePrivacyDlpV2beta1Range: Generic half-open interval [start, end)
  3257. type GooglePrivacyDlpV2beta1Range struct {
  3258. // End: Index of the last character of the range (exclusive).
  3259. End int64 `json:"end,omitempty,string"`
  3260. // Start: Index of the first character of the range (inclusive).
  3261. Start int64 `json:"start,omitempty,string"`
  3262. // ForceSendFields is a list of field names (e.g. "End") to
  3263. // unconditionally include in API requests. By default, fields with
  3264. // empty values are omitted from API requests. However, any non-pointer,
  3265. // non-interface field appearing in ForceSendFields will be sent to the
  3266. // server regardless of whether the field is empty or not. This may be
  3267. // used to include empty fields in Patch requests.
  3268. ForceSendFields []string `json:"-"`
  3269. // NullFields is a list of field names (e.g. "End") to include in API
  3270. // requests with the JSON null value. By default, fields with empty
  3271. // values are omitted from API requests. However, any field with an
  3272. // empty value appearing in NullFields will be sent to the server as
  3273. // null. It is an error if a field in this list has a non-empty value.
  3274. // This may be used to include null fields in Patch requests.
  3275. NullFields []string `json:"-"`
  3276. }
  3277. func (s *GooglePrivacyDlpV2beta1Range) MarshalJSON() ([]byte, error) {
  3278. type NoMethod GooglePrivacyDlpV2beta1Range
  3279. raw := NoMethod(*s)
  3280. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3281. }
  3282. // GooglePrivacyDlpV2beta1RecordCondition: A condition for determining
  3283. // whether a transformation should be applied to
  3284. // a field.
  3285. type GooglePrivacyDlpV2beta1RecordCondition struct {
  3286. Expressions *GooglePrivacyDlpV2beta1Expressions `json:"expressions,omitempty"`
  3287. // ForceSendFields is a list of field names (e.g. "Expressions") to
  3288. // unconditionally include in API requests. By default, fields with
  3289. // empty values are omitted from API requests. However, any non-pointer,
  3290. // non-interface field appearing in ForceSendFields will be sent to the
  3291. // server regardless of whether the field is empty or not. This may be
  3292. // used to include empty fields in Patch requests.
  3293. ForceSendFields []string `json:"-"`
  3294. // NullFields is a list of field names (e.g. "Expressions") to include
  3295. // in API requests with the JSON null value. By default, fields with
  3296. // empty values are omitted from API requests. However, any field with
  3297. // an empty value appearing in NullFields will be sent to the server as
  3298. // null. It is an error if a field in this list has a non-empty value.
  3299. // This may be used to include null fields in Patch requests.
  3300. NullFields []string `json:"-"`
  3301. }
  3302. func (s *GooglePrivacyDlpV2beta1RecordCondition) MarshalJSON() ([]byte, error) {
  3303. type NoMethod GooglePrivacyDlpV2beta1RecordCondition
  3304. raw := NoMethod(*s)
  3305. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3306. }
  3307. // GooglePrivacyDlpV2beta1RecordKey: Message for a unique key indicating
  3308. // a record that contains a finding.
  3309. type GooglePrivacyDlpV2beta1RecordKey struct {
  3310. BigQueryKey *GooglePrivacyDlpV2beta1BigQueryKey `json:"bigQueryKey,omitempty"`
  3311. CloudStorageKey *GooglePrivacyDlpV2beta1CloudStorageKey `json:"cloudStorageKey,omitempty"`
  3312. DatastoreKey *GooglePrivacyDlpV2beta1DatastoreKey `json:"datastoreKey,omitempty"`
  3313. // ForceSendFields is a list of field names (e.g. "BigQueryKey") to
  3314. // unconditionally include in API requests. By default, fields with
  3315. // empty values are omitted from API requests. However, any non-pointer,
  3316. // non-interface field appearing in ForceSendFields will be sent to the
  3317. // server regardless of whether the field is empty or not. This may be
  3318. // used to include empty fields in Patch requests.
  3319. ForceSendFields []string `json:"-"`
  3320. // NullFields is a list of field names (e.g. "BigQueryKey") to include
  3321. // in API requests with the JSON null value. By default, fields with
  3322. // empty values are omitted from API requests. However, any field with
  3323. // an empty value appearing in NullFields will be sent to the server as
  3324. // null. It is an error if a field in this list has a non-empty value.
  3325. // This may be used to include null fields in Patch requests.
  3326. NullFields []string `json:"-"`
  3327. }
  3328. func (s *GooglePrivacyDlpV2beta1RecordKey) MarshalJSON() ([]byte, error) {
  3329. type NoMethod GooglePrivacyDlpV2beta1RecordKey
  3330. raw := NoMethod(*s)
  3331. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3332. }
  3333. // GooglePrivacyDlpV2beta1RecordSuppression: Configuration to suppress
  3334. // records whose suppression conditions evaluate to
  3335. // true.
  3336. type GooglePrivacyDlpV2beta1RecordSuppression struct {
  3337. Condition *GooglePrivacyDlpV2beta1RecordCondition `json:"condition,omitempty"`
  3338. // ForceSendFields is a list of field names (e.g. "Condition") to
  3339. // unconditionally include in API requests. By default, fields with
  3340. // empty values are omitted from API requests. However, any non-pointer,
  3341. // non-interface field appearing in ForceSendFields will be sent to the
  3342. // server regardless of whether the field is empty or not. This may be
  3343. // used to include empty fields in Patch requests.
  3344. ForceSendFields []string `json:"-"`
  3345. // NullFields is a list of field names (e.g. "Condition") to include in
  3346. // API requests with the JSON null value. By default, fields with empty
  3347. // values are omitted from API requests. However, any field with an
  3348. // empty value appearing in NullFields will be sent to the server as
  3349. // null. It is an error if a field in this list has a non-empty value.
  3350. // This may be used to include null fields in Patch requests.
  3351. NullFields []string `json:"-"`
  3352. }
  3353. func (s *GooglePrivacyDlpV2beta1RecordSuppression) MarshalJSON() ([]byte, error) {
  3354. type NoMethod GooglePrivacyDlpV2beta1RecordSuppression
  3355. raw := NoMethod(*s)
  3356. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3357. }
  3358. // GooglePrivacyDlpV2beta1RecordTransformations: A type of
  3359. // transformation that is applied over structured data such as a
  3360. // table.
  3361. type GooglePrivacyDlpV2beta1RecordTransformations struct {
  3362. // FieldTransformations: Transform the record by applying various field
  3363. // transformations.
  3364. FieldTransformations []*GooglePrivacyDlpV2beta1FieldTransformation `json:"fieldTransformations,omitempty"`
  3365. // RecordSuppressions: Configuration defining which records get
  3366. // suppressed entirely. Records that
  3367. // match any suppression rule are omitted from the output [optional].
  3368. RecordSuppressions []*GooglePrivacyDlpV2beta1RecordSuppression `json:"recordSuppressions,omitempty"`
  3369. // ForceSendFields is a list of field names (e.g.
  3370. // "FieldTransformations") to unconditionally include in API requests.
  3371. // By default, fields with empty values are omitted from API requests.
  3372. // However, any non-pointer, non-interface field appearing in
  3373. // ForceSendFields will be sent to the server regardless of whether the
  3374. // field is empty or not. This may be used to include empty fields in
  3375. // Patch requests.
  3376. ForceSendFields []string `json:"-"`
  3377. // NullFields is a list of field names (e.g. "FieldTransformations") to
  3378. // include in API requests with the JSON null value. By default, fields
  3379. // with empty values are omitted from API requests. However, any field
  3380. // with an empty value appearing in NullFields will be sent to the
  3381. // server as null. It is an error if a field in this list has a
  3382. // non-empty value. This may be used to include null fields in Patch
  3383. // requests.
  3384. NullFields []string `json:"-"`
  3385. }
  3386. func (s *GooglePrivacyDlpV2beta1RecordTransformations) MarshalJSON() ([]byte, error) {
  3387. type NoMethod GooglePrivacyDlpV2beta1RecordTransformations
  3388. raw := NoMethod(*s)
  3389. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3390. }
  3391. // GooglePrivacyDlpV2beta1RedactConfig: Redact a given value. For
  3392. // example, if used with an `InfoTypeTransformation`
  3393. // transforming PHONE_NUMBER, and input 'My phone number is
  3394. // 206-555-0123', the
  3395. // output would be 'My phone number is '.
  3396. type GooglePrivacyDlpV2beta1RedactConfig struct {
  3397. }
  3398. // GooglePrivacyDlpV2beta1RedactContentRequest: Request to search for
  3399. // potentially sensitive info in a list of items
  3400. // and replace it with a default or provided content.
  3401. type GooglePrivacyDlpV2beta1RedactContentRequest struct {
  3402. // ImageRedactionConfigs: The configuration for specifying what content
  3403. // to redact from images.
  3404. ImageRedactionConfigs []*GooglePrivacyDlpV2beta1ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"`
  3405. // InspectConfig: Configuration for the inspector.
  3406. InspectConfig *GooglePrivacyDlpV2beta1InspectConfig `json:"inspectConfig,omitempty"`
  3407. // Items: The list of items to inspect. Up to 100 are allowed per
  3408. // request.
  3409. Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"`
  3410. // ReplaceConfigs: The strings to replace findings text findings with.
  3411. // Must specify at least
  3412. // one of these or one ImageRedactionConfig if redacting images.
  3413. ReplaceConfigs []*GooglePrivacyDlpV2beta1ReplaceConfig `json:"replaceConfigs,omitempty"`
  3414. // ForceSendFields is a list of field names (e.g.
  3415. // "ImageRedactionConfigs") to unconditionally include in API requests.
  3416. // By default, fields with empty values are omitted from API requests.
  3417. // However, any non-pointer, non-interface field appearing in
  3418. // ForceSendFields will be sent to the server regardless of whether the
  3419. // field is empty or not. This may be used to include empty fields in
  3420. // Patch requests.
  3421. ForceSendFields []string `json:"-"`
  3422. // NullFields is a list of field names (e.g. "ImageRedactionConfigs") to
  3423. // include in API requests with the JSON null value. By default, fields
  3424. // with empty values are omitted from API requests. However, any field
  3425. // with an empty value appearing in NullFields will be sent to the
  3426. // server as null. It is an error if a field in this list has a
  3427. // non-empty value. This may be used to include null fields in Patch
  3428. // requests.
  3429. NullFields []string `json:"-"`
  3430. }
  3431. func (s *GooglePrivacyDlpV2beta1RedactContentRequest) MarshalJSON() ([]byte, error) {
  3432. type NoMethod GooglePrivacyDlpV2beta1RedactContentRequest
  3433. raw := NoMethod(*s)
  3434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3435. }
  3436. // GooglePrivacyDlpV2beta1RedactContentResponse: Results of redacting a
  3437. // list of items.
  3438. type GooglePrivacyDlpV2beta1RedactContentResponse struct {
  3439. // Items: The redacted content.
  3440. Items []*GooglePrivacyDlpV2beta1ContentItem `json:"items,omitempty"`
  3441. // ServerResponse contains the HTTP response code and headers from the
  3442. // server.
  3443. googleapi.ServerResponse `json:"-"`
  3444. // ForceSendFields is a list of field names (e.g. "Items") to
  3445. // unconditionally include in API requests. By default, fields with
  3446. // empty values are omitted from API requests. However, any non-pointer,
  3447. // non-interface field appearing in ForceSendFields will be sent to the
  3448. // server regardless of whether the field is empty or not. This may be
  3449. // used to include empty fields in Patch requests.
  3450. ForceSendFields []string `json:"-"`
  3451. // NullFields is a list of field names (e.g. "Items") to include in API
  3452. // requests with the JSON null value. By default, fields with empty
  3453. // values are omitted from API requests. However, any field with an
  3454. // empty value appearing in NullFields will be sent to the server as
  3455. // null. It is an error if a field in this list has a non-empty value.
  3456. // This may be used to include null fields in Patch requests.
  3457. NullFields []string `json:"-"`
  3458. }
  3459. func (s *GooglePrivacyDlpV2beta1RedactContentResponse) MarshalJSON() ([]byte, error) {
  3460. type NoMethod GooglePrivacyDlpV2beta1RedactContentResponse
  3461. raw := NoMethod(*s)
  3462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3463. }
  3464. type GooglePrivacyDlpV2beta1ReplaceConfig struct {
  3465. // InfoType: Type of information to replace. Only one ReplaceConfig per
  3466. // info_type
  3467. // should be provided. If ReplaceConfig does not have an info_type, the
  3468. // DLP
  3469. // API matches it against all info_types that are found but not
  3470. // specified in
  3471. // another ReplaceConfig.
  3472. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  3473. // ReplaceWith: Content replacing sensitive information of given type.
  3474. // Max 256 chars.
  3475. ReplaceWith string `json:"replaceWith,omitempty"`
  3476. // ForceSendFields is a list of field names (e.g. "InfoType") to
  3477. // unconditionally include in API requests. By default, fields with
  3478. // empty values are omitted from API requests. However, any non-pointer,
  3479. // non-interface field appearing in ForceSendFields will be sent to the
  3480. // server regardless of whether the field is empty or not. This may be
  3481. // used to include empty fields in Patch requests.
  3482. ForceSendFields []string `json:"-"`
  3483. // NullFields is a list of field names (e.g. "InfoType") to include in
  3484. // API requests with the JSON null value. By default, fields with empty
  3485. // values are omitted from API requests. However, any field with an
  3486. // empty value appearing in NullFields will be sent to the server as
  3487. // null. It is an error if a field in this list has a non-empty value.
  3488. // This may be used to include null fields in Patch requests.
  3489. NullFields []string `json:"-"`
  3490. }
  3491. func (s *GooglePrivacyDlpV2beta1ReplaceConfig) MarshalJSON() ([]byte, error) {
  3492. type NoMethod GooglePrivacyDlpV2beta1ReplaceConfig
  3493. raw := NoMethod(*s)
  3494. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3495. }
  3496. // GooglePrivacyDlpV2beta1ReplaceValueConfig: Replace each input value
  3497. // with a given `Value`.
  3498. type GooglePrivacyDlpV2beta1ReplaceValueConfig struct {
  3499. // NewValue: Value to replace it with.
  3500. NewValue *GooglePrivacyDlpV2beta1Value `json:"newValue,omitempty"`
  3501. // ForceSendFields is a list of field names (e.g. "NewValue") to
  3502. // unconditionally include in API requests. By default, fields with
  3503. // empty values are omitted from API requests. However, any non-pointer,
  3504. // non-interface field appearing in ForceSendFields will be sent to the
  3505. // server regardless of whether the field is empty or not. This may be
  3506. // used to include empty fields in Patch requests.
  3507. ForceSendFields []string `json:"-"`
  3508. // NullFields is a list of field names (e.g. "NewValue") to include in
  3509. // API requests with the JSON null value. By default, fields with empty
  3510. // values are omitted from API requests. However, any field with an
  3511. // empty value appearing in NullFields will be sent to the server as
  3512. // null. It is an error if a field in this list has a non-empty value.
  3513. // This may be used to include null fields in Patch requests.
  3514. NullFields []string `json:"-"`
  3515. }
  3516. func (s *GooglePrivacyDlpV2beta1ReplaceValueConfig) MarshalJSON() ([]byte, error) {
  3517. type NoMethod GooglePrivacyDlpV2beta1ReplaceValueConfig
  3518. raw := NoMethod(*s)
  3519. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3520. }
  3521. // GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig: Replace each
  3522. // matching finding with the name of the info_type.
  3523. type GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig struct {
  3524. }
  3525. // GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata: Metadata
  3526. // returned within
  3527. // the
  3528. // [`riskAnalysis.operations.get`](/dlp/docs/reference/rest/v2beta1/r
  3529. // iskAnalysis.operations/get)
  3530. // for risk analysis.
  3531. type GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata struct {
  3532. // CreateTime: The time which this request was started.
  3533. CreateTime string `json:"createTime,omitempty"`
  3534. // RequestedPrivacyMetric: Privacy metric to compute.
  3535. RequestedPrivacyMetric *GooglePrivacyDlpV2beta1PrivacyMetric `json:"requestedPrivacyMetric,omitempty"`
  3536. // RequestedSourceTable: Input dataset to compute metrics over.
  3537. RequestedSourceTable *GooglePrivacyDlpV2beta1BigQueryTable `json:"requestedSourceTable,omitempty"`
  3538. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  3539. // unconditionally include in API requests. By default, fields with
  3540. // empty values are omitted from API requests. However, any non-pointer,
  3541. // non-interface field appearing in ForceSendFields will be sent to the
  3542. // server regardless of whether the field is empty or not. This may be
  3543. // used to include empty fields in Patch requests.
  3544. ForceSendFields []string `json:"-"`
  3545. // NullFields is a list of field names (e.g. "CreateTime") to include in
  3546. // API requests with the JSON null value. By default, fields with empty
  3547. // values are omitted from API requests. However, any field with an
  3548. // empty value appearing in NullFields will be sent to the server as
  3549. // null. It is an error if a field in this list has a non-empty value.
  3550. // This may be used to include null fields in Patch requests.
  3551. NullFields []string `json:"-"`
  3552. }
  3553. func (s *GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata) MarshalJSON() ([]byte, error) {
  3554. type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationMetadata
  3555. raw := NoMethod(*s)
  3556. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3557. }
  3558. // GooglePrivacyDlpV2beta1RiskAnalysisOperationResult: Result of a risk
  3559. // analysis
  3560. // [`Operation`](/dlp/docs/reference/rest/v2beta1/inspect.operat
  3561. // ions)
  3562. // request.
  3563. type GooglePrivacyDlpV2beta1RiskAnalysisOperationResult struct {
  3564. CategoricalStatsResult *GooglePrivacyDlpV2beta1CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
  3565. KAnonymityResult *GooglePrivacyDlpV2beta1KAnonymityResult `json:"kAnonymityResult,omitempty"`
  3566. KMapEstimationResult *GooglePrivacyDlpV2beta1KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
  3567. LDiversityResult *GooglePrivacyDlpV2beta1LDiversityResult `json:"lDiversityResult,omitempty"`
  3568. NumericalStatsResult *GooglePrivacyDlpV2beta1NumericalStatsResult `json:"numericalStatsResult,omitempty"`
  3569. // ForceSendFields is a list of field names (e.g.
  3570. // "CategoricalStatsResult") 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. "CategoricalStatsResult")
  3578. // to include in API requests with the JSON null value. By default,
  3579. // fields with empty values are omitted from API requests. However, any
  3580. // field 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 *GooglePrivacyDlpV2beta1RiskAnalysisOperationResult) MarshalJSON() ([]byte, error) {
  3587. type NoMethod GooglePrivacyDlpV2beta1RiskAnalysisOperationResult
  3588. raw := NoMethod(*s)
  3589. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3590. }
  3591. type GooglePrivacyDlpV2beta1Row struct {
  3592. Values []*GooglePrivacyDlpV2beta1Value `json:"values,omitempty"`
  3593. // ForceSendFields is a list of field names (e.g. "Values") to
  3594. // unconditionally include in API requests. By default, fields with
  3595. // empty values are omitted from API requests. However, any non-pointer,
  3596. // non-interface field appearing in ForceSendFields will be sent to the
  3597. // server regardless of whether the field is empty or not. This may be
  3598. // used to include empty fields in Patch requests.
  3599. ForceSendFields []string `json:"-"`
  3600. // NullFields is a list of field names (e.g. "Values") to include in API
  3601. // requests with the JSON null value. By default, fields with empty
  3602. // values are omitted from API requests. However, any field with an
  3603. // empty value appearing in NullFields will be sent to the server as
  3604. // null. It is an error if a field in this list has a non-empty value.
  3605. // This may be used to include null fields in Patch requests.
  3606. NullFields []string `json:"-"`
  3607. }
  3608. func (s *GooglePrivacyDlpV2beta1Row) MarshalJSON() ([]byte, error) {
  3609. type NoMethod GooglePrivacyDlpV2beta1Row
  3610. raw := NoMethod(*s)
  3611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3612. }
  3613. // GooglePrivacyDlpV2beta1StorageConfig: Shared message indicating Cloud
  3614. // storage type.
  3615. type GooglePrivacyDlpV2beta1StorageConfig struct {
  3616. // BigQueryOptions: BigQuery options specification.
  3617. BigQueryOptions *GooglePrivacyDlpV2beta1BigQueryOptions `json:"bigQueryOptions,omitempty"`
  3618. // CloudStorageOptions: Google Cloud Storage options specification.
  3619. CloudStorageOptions *GooglePrivacyDlpV2beta1CloudStorageOptions `json:"cloudStorageOptions,omitempty"`
  3620. // DatastoreOptions: Google Cloud Datastore options specification.
  3621. DatastoreOptions *GooglePrivacyDlpV2beta1DatastoreOptions `json:"datastoreOptions,omitempty"`
  3622. // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to
  3623. // unconditionally include in API requests. By default, fields with
  3624. // empty values are omitted from API requests. However, any non-pointer,
  3625. // non-interface field appearing in ForceSendFields will be sent to the
  3626. // server regardless of whether the field is empty or not. This may be
  3627. // used to include empty fields in Patch requests.
  3628. ForceSendFields []string `json:"-"`
  3629. // NullFields is a list of field names (e.g. "BigQueryOptions") to
  3630. // include in API requests with the JSON null value. By default, fields
  3631. // with empty values are omitted from API requests. However, any field
  3632. // with an empty value appearing in NullFields will be sent to the
  3633. // server as null. It is an error if a field in this list has a
  3634. // non-empty value. This may be used to include null fields in Patch
  3635. // requests.
  3636. NullFields []string `json:"-"`
  3637. }
  3638. func (s *GooglePrivacyDlpV2beta1StorageConfig) MarshalJSON() ([]byte, error) {
  3639. type NoMethod GooglePrivacyDlpV2beta1StorageConfig
  3640. raw := NoMethod(*s)
  3641. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3642. }
  3643. // GooglePrivacyDlpV2beta1SummaryResult: A collection that informs the
  3644. // user the number of times a particular
  3645. // `TransformationResultCode` and error details occurred.
  3646. type GooglePrivacyDlpV2beta1SummaryResult struct {
  3647. // Possible values:
  3648. // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"
  3649. // "SUCCESS"
  3650. // "ERROR"
  3651. Code string `json:"code,omitempty"`
  3652. Count int64 `json:"count,omitempty,string"`
  3653. // Details: A place for warnings or errors to show up if a
  3654. // transformation didn't
  3655. // work as expected.
  3656. Details string `json:"details,omitempty"`
  3657. // ForceSendFields is a list of field names (e.g. "Code") to
  3658. // unconditionally include in API requests. By default, fields with
  3659. // empty values are omitted from API requests. However, any non-pointer,
  3660. // non-interface field appearing in ForceSendFields will be sent to the
  3661. // server regardless of whether the field is empty or not. This may be
  3662. // used to include empty fields in Patch requests.
  3663. ForceSendFields []string `json:"-"`
  3664. // NullFields is a list of field names (e.g. "Code") to include in API
  3665. // requests with the JSON null value. By default, fields with empty
  3666. // values are omitted from API requests. However, any field with an
  3667. // empty value appearing in NullFields will be sent to the server as
  3668. // null. It is an error if a field in this list has a non-empty value.
  3669. // This may be used to include null fields in Patch requests.
  3670. NullFields []string `json:"-"`
  3671. }
  3672. func (s *GooglePrivacyDlpV2beta1SummaryResult) MarshalJSON() ([]byte, error) {
  3673. type NoMethod GooglePrivacyDlpV2beta1SummaryResult
  3674. raw := NoMethod(*s)
  3675. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3676. }
  3677. // GooglePrivacyDlpV2beta1SurrogateType: Message for detecting output
  3678. // from deidentification transformations
  3679. // such
  3680. // as
  3681. // [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2beta1/cont
  3682. // ent/deidentify#CryptoReplaceFfxFpeConfig).
  3683. // These types of transformations are
  3684. // those that perform pseudonymization, thereby producing a "surrogate"
  3685. // as
  3686. // output. This should be used in conjunction with a field on
  3687. // the
  3688. // transformation such as `surrogate_info_type`. This custom info type
  3689. // does
  3690. // not support the use of `detection_rules`.
  3691. type GooglePrivacyDlpV2beta1SurrogateType struct {
  3692. }
  3693. // GooglePrivacyDlpV2beta1Table: Structured content to inspect. Up to
  3694. // 50,000 `Value`s per request allowed.
  3695. type GooglePrivacyDlpV2beta1Table struct {
  3696. Headers []*GooglePrivacyDlpV2beta1FieldId `json:"headers,omitempty"`
  3697. Rows []*GooglePrivacyDlpV2beta1Row `json:"rows,omitempty"`
  3698. // ForceSendFields is a list of field names (e.g. "Headers") to
  3699. // unconditionally include in API requests. By default, fields with
  3700. // empty values are omitted from API requests. However, any non-pointer,
  3701. // non-interface field appearing in ForceSendFields will be sent to the
  3702. // server regardless of whether the field is empty or not. This may be
  3703. // used to include empty fields in Patch requests.
  3704. ForceSendFields []string `json:"-"`
  3705. // NullFields is a list of field names (e.g. "Headers") to include in
  3706. // API requests with the JSON null value. By default, fields with empty
  3707. // values are omitted from API requests. However, any field with an
  3708. // empty value appearing in NullFields will be sent to the server as
  3709. // null. It is an error if a field in this list has a non-empty value.
  3710. // This may be used to include null fields in Patch requests.
  3711. NullFields []string `json:"-"`
  3712. }
  3713. func (s *GooglePrivacyDlpV2beta1Table) MarshalJSON() ([]byte, error) {
  3714. type NoMethod GooglePrivacyDlpV2beta1Table
  3715. raw := NoMethod(*s)
  3716. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3717. }
  3718. // GooglePrivacyDlpV2beta1TableLocation: Location of a finding within a
  3719. // table.
  3720. type GooglePrivacyDlpV2beta1TableLocation struct {
  3721. // RowIndex: The zero-based index of the row where the finding is
  3722. // located.
  3723. RowIndex int64 `json:"rowIndex,omitempty,string"`
  3724. // ForceSendFields is a list of field names (e.g. "RowIndex") to
  3725. // unconditionally include in API requests. By default, fields with
  3726. // empty values are omitted from API requests. However, any non-pointer,
  3727. // non-interface field appearing in ForceSendFields will be sent to the
  3728. // server regardless of whether the field is empty or not. This may be
  3729. // used to include empty fields in Patch requests.
  3730. ForceSendFields []string `json:"-"`
  3731. // NullFields is a list of field names (e.g. "RowIndex") to include in
  3732. // API requests with the JSON null value. By default, fields with empty
  3733. // values are omitted from API requests. However, any field with an
  3734. // empty value appearing in NullFields will be sent to the server as
  3735. // null. It is an error if a field in this list has a non-empty value.
  3736. // This may be used to include null fields in Patch requests.
  3737. NullFields []string `json:"-"`
  3738. }
  3739. func (s *GooglePrivacyDlpV2beta1TableLocation) MarshalJSON() ([]byte, error) {
  3740. type NoMethod GooglePrivacyDlpV2beta1TableLocation
  3741. raw := NoMethod(*s)
  3742. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3743. }
  3744. // GooglePrivacyDlpV2beta1TaggedField: A column with a semantic tag
  3745. // attached.
  3746. type GooglePrivacyDlpV2beta1TaggedField struct {
  3747. // CustomTag: A column can be tagged with a custom tag. In this case,
  3748. // the user must
  3749. // indicate an auxiliary table that contains statistical information
  3750. // on
  3751. // the possible values of this column (below).
  3752. CustomTag string `json:"customTag,omitempty"`
  3753. // Field: Identifies the column. [required]
  3754. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  3755. // Inferred: If no semantic tag is indicated, we infer the statistical
  3756. // model from
  3757. // the distribution of values in the input data
  3758. Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"`
  3759. // InfoType: A column can be tagged with a InfoType to use the relevant
  3760. // public
  3761. // dataset as a statistical model of population, if available.
  3762. // We
  3763. // currently support US ZIP codes, region codes, ages and genders.
  3764. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  3765. // ForceSendFields is a list of field names (e.g. "CustomTag") to
  3766. // unconditionally include in API requests. By default, fields with
  3767. // empty values are omitted from API requests. However, any non-pointer,
  3768. // non-interface field appearing in ForceSendFields will be sent to the
  3769. // server regardless of whether the field is empty or not. This may be
  3770. // used to include empty fields in Patch requests.
  3771. ForceSendFields []string `json:"-"`
  3772. // NullFields is a list of field names (e.g. "CustomTag") to include in
  3773. // API requests with the JSON null value. By default, fields with empty
  3774. // values are omitted from API requests. However, any field with an
  3775. // empty value appearing in NullFields will be sent to the server as
  3776. // null. It is an error if a field in this list has a non-empty value.
  3777. // This may be used to include null fields in Patch requests.
  3778. NullFields []string `json:"-"`
  3779. }
  3780. func (s *GooglePrivacyDlpV2beta1TaggedField) MarshalJSON() ([]byte, error) {
  3781. type NoMethod GooglePrivacyDlpV2beta1TaggedField
  3782. raw := NoMethod(*s)
  3783. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3784. }
  3785. // GooglePrivacyDlpV2beta1TimePartConfig: For use with `Date`,
  3786. // `Timestamp`, and `TimeOfDay`, extract or preserve a
  3787. // portion of the value.
  3788. type GooglePrivacyDlpV2beta1TimePartConfig struct {
  3789. // Possible values:
  3790. // "TIME_PART_UNSPECIFIED"
  3791. // "YEAR" - [000-9999]
  3792. // "MONTH" - [1-12]
  3793. // "DAY_OF_MONTH" - [1-31]
  3794. // "DAY_OF_WEEK" - [1-7]
  3795. // "WEEK_OF_YEAR" - [1-52]
  3796. // "HOUR_OF_DAY" - [0-24]
  3797. PartToExtract string `json:"partToExtract,omitempty"`
  3798. // ForceSendFields is a list of field names (e.g. "PartToExtract") to
  3799. // unconditionally include in API requests. By default, fields with
  3800. // empty values are omitted from API requests. However, any non-pointer,
  3801. // non-interface field appearing in ForceSendFields will be sent to the
  3802. // server regardless of whether the field is empty or not. This may be
  3803. // used to include empty fields in Patch requests.
  3804. ForceSendFields []string `json:"-"`
  3805. // NullFields is a list of field names (e.g. "PartToExtract") to include
  3806. // in API requests with the JSON null value. By default, fields with
  3807. // empty values are omitted from API requests. However, any field with
  3808. // an empty value appearing in NullFields will be sent to the server as
  3809. // null. It is an error if a field in this list has a non-empty value.
  3810. // This may be used to include null fields in Patch requests.
  3811. NullFields []string `json:"-"`
  3812. }
  3813. func (s *GooglePrivacyDlpV2beta1TimePartConfig) MarshalJSON() ([]byte, error) {
  3814. type NoMethod GooglePrivacyDlpV2beta1TimePartConfig
  3815. raw := NoMethod(*s)
  3816. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3817. }
  3818. // GooglePrivacyDlpV2beta1TransformationSummary: Summary of a single
  3819. // tranformation.
  3820. // Only one of 'transformation', 'field_transformation', or
  3821. // 'record_suppress'
  3822. // will be set.
  3823. type GooglePrivacyDlpV2beta1TransformationSummary struct {
  3824. // Field: Set if the transformation was limited to a specific FieldId.
  3825. Field *GooglePrivacyDlpV2beta1FieldId `json:"field,omitempty"`
  3826. // FieldTransformations: The field transformation that was applied.
  3827. // If multiple field transformations are requested for a single
  3828. // field,
  3829. // this list will contain all of them; otherwise, only one is supplied.
  3830. FieldTransformations []*GooglePrivacyDlpV2beta1FieldTransformation `json:"fieldTransformations,omitempty"`
  3831. // InfoType: Set if the transformation was limited to a specific
  3832. // info_type.
  3833. InfoType *GooglePrivacyDlpV2beta1InfoType `json:"infoType,omitempty"`
  3834. // RecordSuppress: The specific suppression option these stats apply to.
  3835. RecordSuppress *GooglePrivacyDlpV2beta1RecordSuppression `json:"recordSuppress,omitempty"`
  3836. Results []*GooglePrivacyDlpV2beta1SummaryResult `json:"results,omitempty"`
  3837. // Transformation: The specific transformation these stats apply to.
  3838. Transformation *GooglePrivacyDlpV2beta1PrimitiveTransformation `json:"transformation,omitempty"`
  3839. // TransformedBytes: Total size in bytes that were transformed in some
  3840. // way.
  3841. TransformedBytes int64 `json:"transformedBytes,omitempty,string"`
  3842. // ForceSendFields is a list of field names (e.g. "Field") to
  3843. // unconditionally include in API requests. By default, fields with
  3844. // empty values are omitted from API requests. However, any non-pointer,
  3845. // non-interface field appearing in ForceSendFields will be sent to the
  3846. // server regardless of whether the field is empty or not. This may be
  3847. // used to include empty fields in Patch requests.
  3848. ForceSendFields []string `json:"-"`
  3849. // NullFields is a list of field names (e.g. "Field") to include in API
  3850. // requests with the JSON null value. By default, fields with empty
  3851. // values are omitted from API requests. However, any field with an
  3852. // empty value appearing in NullFields will be sent to the server as
  3853. // null. It is an error if a field in this list has a non-empty value.
  3854. // This may be used to include null fields in Patch requests.
  3855. NullFields []string `json:"-"`
  3856. }
  3857. func (s *GooglePrivacyDlpV2beta1TransformationSummary) MarshalJSON() ([]byte, error) {
  3858. type NoMethod GooglePrivacyDlpV2beta1TransformationSummary
  3859. raw := NoMethod(*s)
  3860. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3861. }
  3862. // GooglePrivacyDlpV2beta1TransientCryptoKey: Use this to have a random
  3863. // data crypto key generated.
  3864. // It will be discarded after the operation/request finishes.
  3865. type GooglePrivacyDlpV2beta1TransientCryptoKey struct {
  3866. // Name: Name of the key. [required]
  3867. // This is an arbitrary string used to differentiate different keys.
  3868. // A unique key is generated per name: two separate
  3869. // `TransientCryptoKey`
  3870. // protos share the same generated key if their names are the same.
  3871. // When the data crypto key is generated, this name is not used in any
  3872. // way
  3873. // (repeating the api call will result in a different key being
  3874. // generated).
  3875. Name string `json:"name,omitempty"`
  3876. // ForceSendFields is a list of field names (e.g. "Name") to
  3877. // unconditionally include in API requests. By default, fields with
  3878. // empty values are omitted from API requests. However, any non-pointer,
  3879. // non-interface field appearing in ForceSendFields will be sent to the
  3880. // server regardless of whether the field is empty or not. This may be
  3881. // used to include empty fields in Patch requests.
  3882. ForceSendFields []string `json:"-"`
  3883. // NullFields is a list of field names (e.g. "Name") to include in API
  3884. // requests with the JSON null value. By default, fields with empty
  3885. // values are omitted from API requests. However, any field with an
  3886. // empty value appearing in NullFields will be sent to the server as
  3887. // null. It is an error if a field in this list has a non-empty value.
  3888. // This may be used to include null fields in Patch requests.
  3889. NullFields []string `json:"-"`
  3890. }
  3891. func (s *GooglePrivacyDlpV2beta1TransientCryptoKey) MarshalJSON() ([]byte, error) {
  3892. type NoMethod GooglePrivacyDlpV2beta1TransientCryptoKey
  3893. raw := NoMethod(*s)
  3894. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3895. }
  3896. // GooglePrivacyDlpV2beta1UnwrappedCryptoKey: Using raw keys is prone to
  3897. // security risks due to accidentally
  3898. // leaking the key. Choose another type of key if possible.
  3899. type GooglePrivacyDlpV2beta1UnwrappedCryptoKey struct {
  3900. // Key: The AES 128/192/256 bit key. [required]
  3901. Key string `json:"key,omitempty"`
  3902. // ForceSendFields is a list of field names (e.g. "Key") to
  3903. // unconditionally include in API requests. By default, fields with
  3904. // empty values are omitted from API requests. However, any non-pointer,
  3905. // non-interface field appearing in ForceSendFields will be sent to the
  3906. // server regardless of whether the field is empty or not. This may be
  3907. // used to include empty fields in Patch requests.
  3908. ForceSendFields []string `json:"-"`
  3909. // NullFields is a list of field names (e.g. "Key") to include in API
  3910. // requests with the JSON null value. By default, fields with empty
  3911. // values are omitted from API requests. However, any field with an
  3912. // empty value appearing in NullFields will be sent to the server as
  3913. // null. It is an error if a field in this list has a non-empty value.
  3914. // This may be used to include null fields in Patch requests.
  3915. NullFields []string `json:"-"`
  3916. }
  3917. func (s *GooglePrivacyDlpV2beta1UnwrappedCryptoKey) MarshalJSON() ([]byte, error) {
  3918. type NoMethod GooglePrivacyDlpV2beta1UnwrappedCryptoKey
  3919. raw := NoMethod(*s)
  3920. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3921. }
  3922. // GooglePrivacyDlpV2beta1Value: Set of primitive values supported by
  3923. // the system.
  3924. // Note that for the purposes of inspection or transformation, the
  3925. // number
  3926. // of bytes considered to comprise a 'Value' is based on its
  3927. // representation
  3928. // as a UTF-8 encoded string. For example, if 'integer_value' is set
  3929. // to
  3930. // 123456789, the number of bytes would be counted as 9, even though
  3931. // an
  3932. // int64 only holds up to 8 bytes of data.
  3933. type GooglePrivacyDlpV2beta1Value struct {
  3934. BooleanValue bool `json:"booleanValue,omitempty"`
  3935. DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
  3936. FloatValue float64 `json:"floatValue,omitempty"`
  3937. IntegerValue int64 `json:"integerValue,omitempty,string"`
  3938. StringValue string `json:"stringValue,omitempty"`
  3939. TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"`
  3940. TimestampValue string `json:"timestampValue,omitempty"`
  3941. // ForceSendFields is a list of field names (e.g. "BooleanValue") to
  3942. // unconditionally include in API requests. By default, fields with
  3943. // empty values are omitted from API requests. However, any non-pointer,
  3944. // non-interface field appearing in ForceSendFields will be sent to the
  3945. // server regardless of whether the field is empty or not. This may be
  3946. // used to include empty fields in Patch requests.
  3947. ForceSendFields []string `json:"-"`
  3948. // NullFields is a list of field names (e.g. "BooleanValue") to include
  3949. // in API requests with the JSON null value. By default, fields with
  3950. // empty values are omitted from API requests. However, any field with
  3951. // an empty value appearing in NullFields will be sent to the server as
  3952. // null. It is an error if a field in this list has a non-empty value.
  3953. // This may be used to include null fields in Patch requests.
  3954. NullFields []string `json:"-"`
  3955. }
  3956. func (s *GooglePrivacyDlpV2beta1Value) MarshalJSON() ([]byte, error) {
  3957. type NoMethod GooglePrivacyDlpV2beta1Value
  3958. raw := NoMethod(*s)
  3959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3960. }
  3961. func (s *GooglePrivacyDlpV2beta1Value) UnmarshalJSON(data []byte) error {
  3962. type NoMethod GooglePrivacyDlpV2beta1Value
  3963. var s1 struct {
  3964. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  3965. *NoMethod
  3966. }
  3967. s1.NoMethod = (*NoMethod)(s)
  3968. if err := json.Unmarshal(data, &s1); err != nil {
  3969. return err
  3970. }
  3971. s.FloatValue = float64(s1.FloatValue)
  3972. return nil
  3973. }
  3974. // GooglePrivacyDlpV2beta1ValueFrequency: A value of a field, including
  3975. // its frequency.
  3976. type GooglePrivacyDlpV2beta1ValueFrequency struct {
  3977. // Count: How many times the value is contained in the field.
  3978. Count int64 `json:"count,omitempty,string"`
  3979. // Value: A value contained in the field in question.
  3980. Value *GooglePrivacyDlpV2beta1Value `json:"value,omitempty"`
  3981. // ForceSendFields is a list of field names (e.g. "Count") to
  3982. // unconditionally include in API requests. By default, fields with
  3983. // empty values are omitted from API requests. However, any non-pointer,
  3984. // non-interface field appearing in ForceSendFields will be sent to the
  3985. // server regardless of whether the field is empty or not. This may be
  3986. // used to include empty fields in Patch requests.
  3987. ForceSendFields []string `json:"-"`
  3988. // NullFields is a list of field names (e.g. "Count") to include in API
  3989. // requests with the JSON null value. By default, fields with empty
  3990. // values are omitted from API requests. However, any field with an
  3991. // empty value appearing in NullFields will be sent to the server as
  3992. // null. It is an error if a field in this list has a non-empty value.
  3993. // This may be used to include null fields in Patch requests.
  3994. NullFields []string `json:"-"`
  3995. }
  3996. func (s *GooglePrivacyDlpV2beta1ValueFrequency) MarshalJSON() ([]byte, error) {
  3997. type NoMethod GooglePrivacyDlpV2beta1ValueFrequency
  3998. raw := NoMethod(*s)
  3999. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4000. }
  4001. // GooglePrivacyDlpV2beta1WordList: Message defining a list of words or
  4002. // phrases to search for in the data.
  4003. type GooglePrivacyDlpV2beta1WordList struct {
  4004. // Words: Words or phrases defining the dictionary. The dictionary must
  4005. // contain
  4006. // at least one phrase and every phrase must contain at least 2
  4007. // characters
  4008. // that are letters or digits. [required]
  4009. Words []string `json:"words,omitempty"`
  4010. // ForceSendFields is a list of field names (e.g. "Words") to
  4011. // unconditionally include in API requests. By default, fields with
  4012. // empty values are omitted from API requests. However, any non-pointer,
  4013. // non-interface field appearing in ForceSendFields will be sent to the
  4014. // server regardless of whether the field is empty or not. This may be
  4015. // used to include empty fields in Patch requests.
  4016. ForceSendFields []string `json:"-"`
  4017. // NullFields is a list of field names (e.g. "Words") to include in API
  4018. // requests with the JSON null value. By default, fields with empty
  4019. // values are omitted from API requests. However, any field with an
  4020. // empty value appearing in NullFields will be sent to the server as
  4021. // null. It is an error if a field in this list has a non-empty value.
  4022. // This may be used to include null fields in Patch requests.
  4023. NullFields []string `json:"-"`
  4024. }
  4025. func (s *GooglePrivacyDlpV2beta1WordList) MarshalJSON() ([]byte, error) {
  4026. type NoMethod GooglePrivacyDlpV2beta1WordList
  4027. raw := NoMethod(*s)
  4028. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4029. }
  4030. // GoogleProtobufEmpty: A generic empty message that you can re-use to
  4031. // avoid defining duplicated
  4032. // empty messages in your APIs. A typical example is to use it as the
  4033. // request
  4034. // or the response type of an API method. For instance:
  4035. //
  4036. // service Foo {
  4037. // rpc Bar(google.protobuf.Empty) returns
  4038. // (google.protobuf.Empty);
  4039. // }
  4040. //
  4041. // The JSON representation for `Empty` is empty JSON object `{}`.
  4042. type GoogleProtobufEmpty struct {
  4043. // ServerResponse contains the HTTP response code and headers from the
  4044. // server.
  4045. googleapi.ServerResponse `json:"-"`
  4046. }
  4047. // GoogleRpcStatus: The `Status` type defines a logical error model that
  4048. // is suitable for different
  4049. // programming environments, including REST APIs and RPC APIs. It is
  4050. // used by
  4051. // [gRPC](https://github.com/grpc). The error model is designed to
  4052. // be:
  4053. //
  4054. // - Simple to use and understand for most users
  4055. // - Flexible enough to meet unexpected needs
  4056. //
  4057. // # Overview
  4058. //
  4059. // The `Status` message contains three pieces of data: error code, error
  4060. // message,
  4061. // and error details. The error code should be an enum value
  4062. // of
  4063. // google.rpc.Code, but it may accept additional error codes if needed.
  4064. // The
  4065. // error message should be a developer-facing English message that
  4066. // helps
  4067. // developers *understand* and *resolve* the error. If a localized
  4068. // user-facing
  4069. // error message is needed, put the localized message in the error
  4070. // details or
  4071. // localize it in the client. The optional error details may contain
  4072. // arbitrary
  4073. // information about the error. There is a predefined set of error
  4074. // detail types
  4075. // in the package `google.rpc` that can be used for common error
  4076. // conditions.
  4077. //
  4078. // # Language mapping
  4079. //
  4080. // The `Status` message is the logical representation of the error
  4081. // model, but it
  4082. // is not necessarily the actual wire format. When the `Status` message
  4083. // is
  4084. // exposed in different client libraries and different wire protocols,
  4085. // it can be
  4086. // mapped differently. For example, it will likely be mapped to some
  4087. // exceptions
  4088. // in Java, but more likely mapped to some error codes in C.
  4089. //
  4090. // # Other uses
  4091. //
  4092. // The error model and the `Status` message can be used in a variety
  4093. // of
  4094. // environments, either with or without APIs, to provide a
  4095. // consistent developer experience across different
  4096. // environments.
  4097. //
  4098. // Example uses of this error model include:
  4099. //
  4100. // - Partial errors. If a service needs to return partial errors to the
  4101. // client,
  4102. // it may embed the `Status` in the normal response to indicate the
  4103. // partial
  4104. // errors.
  4105. //
  4106. // - Workflow errors. A typical workflow has multiple steps. Each step
  4107. // may
  4108. // have a `Status` message for error reporting.
  4109. //
  4110. // - Batch operations. If a client uses batch request and batch
  4111. // response, the
  4112. // `Status` message should be used directly inside batch response,
  4113. // one for
  4114. // each error sub-response.
  4115. //
  4116. // - Asynchronous operations. If an API call embeds asynchronous
  4117. // operation
  4118. // results in its response, the status of those operations should
  4119. // be
  4120. // represented directly using the `Status` message.
  4121. //
  4122. // - Logging. If some API errors are stored in logs, the message
  4123. // `Status` could
  4124. // be used directly after any stripping needed for security/privacy
  4125. // reasons.
  4126. type GoogleRpcStatus struct {
  4127. // Code: The status code, which should be an enum value of
  4128. // google.rpc.Code.
  4129. Code int64 `json:"code,omitempty"`
  4130. // Details: A list of messages that carry the error details. There is a
  4131. // common set of
  4132. // message types for APIs to use.
  4133. Details []googleapi.RawMessage `json:"details,omitempty"`
  4134. // Message: A developer-facing error message, which should be in
  4135. // English. Any
  4136. // user-facing error message should be localized and sent in
  4137. // the
  4138. // google.rpc.Status.details field, or localized by the client.
  4139. Message string `json:"message,omitempty"`
  4140. // ForceSendFields is a list of field names (e.g. "Code") to
  4141. // unconditionally include in API requests. By default, fields with
  4142. // empty values are omitted from API requests. However, any non-pointer,
  4143. // non-interface field appearing in ForceSendFields will be sent to the
  4144. // server regardless of whether the field is empty or not. This may be
  4145. // used to include empty fields in Patch requests.
  4146. ForceSendFields []string `json:"-"`
  4147. // NullFields is a list of field names (e.g. "Code") to include in API
  4148. // requests with the JSON null value. By default, fields with empty
  4149. // values are omitted from API requests. However, any field with an
  4150. // empty value appearing in NullFields will be sent to the server as
  4151. // null. It is an error if a field in this list has a non-empty value.
  4152. // This may be used to include null fields in Patch requests.
  4153. NullFields []string `json:"-"`
  4154. }
  4155. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  4156. type NoMethod GoogleRpcStatus
  4157. raw := NoMethod(*s)
  4158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4159. }
  4160. // GoogleTypeDate: Represents a whole calendar date, e.g. date of birth.
  4161. // The time of day and
  4162. // time zone are either specified elsewhere or are not significant. The
  4163. // date
  4164. // is relative to the Proleptic Gregorian Calendar. The day may be 0
  4165. // to
  4166. // represent a year and month where the day is not significant, e.g.
  4167. // credit card
  4168. // expiration date. The year may be 0 to represent a month and day
  4169. // independent
  4170. // of year, e.g. anniversary date. Related types are
  4171. // google.type.TimeOfDay
  4172. // and `google.protobuf.Timestamp`.
  4173. type GoogleTypeDate struct {
  4174. // Day: Day of month. Must be from 1 to 31 and valid for the year and
  4175. // month, or 0
  4176. // if specifying a year/month where the day is not significant.
  4177. Day int64 `json:"day,omitempty"`
  4178. // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date
  4179. // without a
  4180. // month.
  4181. Month int64 `json:"month,omitempty"`
  4182. // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
  4183. // without
  4184. // a year.
  4185. Year int64 `json:"year,omitempty"`
  4186. // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") to include in API
  4194. // requests with the JSON null value. By default, fields with empty
  4195. // values are omitted from API requests. However, any field with an
  4196. // 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) {
  4202. type NoMethod GoogleTypeDate
  4203. raw := NoMethod(*s)
  4204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4205. }
  4206. // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone
  4207. // are either not significant
  4208. // or are specified elsewhere. An API may choose to allow leap seconds.
  4209. // Related
  4210. // types are google.type.Date and `google.protobuf.Timestamp`.
  4211. type GoogleTypeTimeOfDay struct {
  4212. // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
  4213. // may choose
  4214. // to allow the value "24:00:00" for scenarios like business closing
  4215. // time.
  4216. Hours int64 `json:"hours,omitempty"`
  4217. // Minutes: Minutes of hour of day. Must be from 0 to 59.
  4218. Minutes int64 `json:"minutes,omitempty"`
  4219. // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
  4220. // 999,999,999.
  4221. Nanos int64 `json:"nanos,omitempty"`
  4222. // Seconds: Seconds of minutes of the time. Must normally be from 0 to
  4223. // 59. An API may
  4224. // allow the value 60 if it allows leap-seconds.
  4225. Seconds int64 `json:"seconds,omitempty"`
  4226. // ForceSendFields is a list of field names (e.g. "Hours") to
  4227. // unconditionally include in API requests. By default, fields with
  4228. // empty values are omitted from API requests. However, any non-pointer,
  4229. // non-interface field appearing in ForceSendFields will be sent to the
  4230. // server regardless of whether the field is empty or not. This may be
  4231. // used to include empty fields in Patch requests.
  4232. ForceSendFields []string `json:"-"`
  4233. // NullFields is a list of field names (e.g. "Hours") to include in API
  4234. // requests with the JSON null value. By default, fields with empty
  4235. // values are omitted from API requests. However, any field with an
  4236. // empty value appearing in NullFields will be sent to the server as
  4237. // null. It is an error if a field in this list has a non-empty value.
  4238. // This may be used to include null fields in Patch requests.
  4239. NullFields []string `json:"-"`
  4240. }
  4241. func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) {
  4242. type NoMethod GoogleTypeTimeOfDay
  4243. raw := NoMethod(*s)
  4244. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4245. }
  4246. // method id "dlp.content.deidentify":
  4247. type ContentDeidentifyCall struct {
  4248. s *Service
  4249. googleprivacydlpv2beta1deidentifycontentrequest *GooglePrivacyDlpV2beta1DeidentifyContentRequest
  4250. urlParams_ gensupport.URLParams
  4251. ctx_ context.Context
  4252. header_ http.Header
  4253. }
  4254. // Deidentify: De-identifies potentially sensitive info from a list of
  4255. // strings.
  4256. // This method has limits on input size and output size.
  4257. func (r *ContentService) Deidentify(googleprivacydlpv2beta1deidentifycontentrequest *GooglePrivacyDlpV2beta1DeidentifyContentRequest) *ContentDeidentifyCall {
  4258. c := &ContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4259. c.googleprivacydlpv2beta1deidentifycontentrequest = googleprivacydlpv2beta1deidentifycontentrequest
  4260. return c
  4261. }
  4262. // Fields allows partial responses to be retrieved. See
  4263. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4264. // for more information.
  4265. func (c *ContentDeidentifyCall) Fields(s ...googleapi.Field) *ContentDeidentifyCall {
  4266. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4267. return c
  4268. }
  4269. // Context sets the context to be used in this call's Do method. Any
  4270. // pending HTTP request will be aborted if the provided context is
  4271. // canceled.
  4272. func (c *ContentDeidentifyCall) Context(ctx context.Context) *ContentDeidentifyCall {
  4273. c.ctx_ = ctx
  4274. return c
  4275. }
  4276. // Header returns an http.Header that can be modified by the caller to
  4277. // add HTTP headers to the request.
  4278. func (c *ContentDeidentifyCall) Header() http.Header {
  4279. if c.header_ == nil {
  4280. c.header_ = make(http.Header)
  4281. }
  4282. return c.header_
  4283. }
  4284. func (c *ContentDeidentifyCall) doRequest(alt string) (*http.Response, error) {
  4285. reqHeaders := make(http.Header)
  4286. for k, v := range c.header_ {
  4287. reqHeaders[k] = v
  4288. }
  4289. reqHeaders.Set("User-Agent", c.s.userAgent())
  4290. var body io.Reader = nil
  4291. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta1deidentifycontentrequest)
  4292. if err != nil {
  4293. return nil, err
  4294. }
  4295. reqHeaders.Set("Content-Type", "application/json")
  4296. c.urlParams_.Set("alt", alt)
  4297. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:deidentify")
  4298. urls += "?" + c.urlParams_.Encode()
  4299. req, _ := http.NewRequest("POST", urls, body)
  4300. req.Header = reqHeaders
  4301. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4302. }
  4303. // Do executes the "dlp.content.deidentify" call.
  4304. // Exactly one of *GooglePrivacyDlpV2beta1DeidentifyContentResponse or
  4305. // error will be non-nil. Any non-2xx status code is an error. Response
  4306. // headers are in either
  4307. // *GooglePrivacyDlpV2beta1DeidentifyContentResponse.ServerResponse.Heade
  4308. // r or (if a response was returned at all) in
  4309. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4310. // whether the returned error was because http.StatusNotModified was
  4311. // returned.
  4312. func (c *ContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1DeidentifyContentResponse, error) {
  4313. gensupport.SetOptions(c.urlParams_, opts...)
  4314. res, err := c.doRequest("json")
  4315. if res != nil && res.StatusCode == http.StatusNotModified {
  4316. if res.Body != nil {
  4317. res.Body.Close()
  4318. }
  4319. return nil, &googleapi.Error{
  4320. Code: res.StatusCode,
  4321. Header: res.Header,
  4322. }
  4323. }
  4324. if err != nil {
  4325. return nil, err
  4326. }
  4327. defer googleapi.CloseBody(res)
  4328. if err := googleapi.CheckResponse(res); err != nil {
  4329. return nil, err
  4330. }
  4331. ret := &GooglePrivacyDlpV2beta1DeidentifyContentResponse{
  4332. ServerResponse: googleapi.ServerResponse{
  4333. Header: res.Header,
  4334. HTTPStatusCode: res.StatusCode,
  4335. },
  4336. }
  4337. target := &ret
  4338. if err := gensupport.DecodeResponse(target, res); err != nil {
  4339. return nil, err
  4340. }
  4341. return ret, nil
  4342. // {
  4343. // "description": "De-identifies potentially sensitive info from a list of strings.\nThis method has limits on input size and output size.",
  4344. // "flatPath": "v2beta1/content:deidentify",
  4345. // "httpMethod": "POST",
  4346. // "id": "dlp.content.deidentify",
  4347. // "parameterOrder": [],
  4348. // "parameters": {},
  4349. // "path": "v2beta1/content:deidentify",
  4350. // "request": {
  4351. // "$ref": "GooglePrivacyDlpV2beta1DeidentifyContentRequest"
  4352. // },
  4353. // "response": {
  4354. // "$ref": "GooglePrivacyDlpV2beta1DeidentifyContentResponse"
  4355. // },
  4356. // "scopes": [
  4357. // "https://www.googleapis.com/auth/cloud-platform"
  4358. // ]
  4359. // }
  4360. }
  4361. // method id "dlp.content.inspect":
  4362. type ContentInspectCall struct {
  4363. s *Service
  4364. googleprivacydlpv2beta1inspectcontentrequest *GooglePrivacyDlpV2beta1InspectContentRequest
  4365. urlParams_ gensupport.URLParams
  4366. ctx_ context.Context
  4367. header_ http.Header
  4368. }
  4369. // Inspect: Finds potentially sensitive info in a list of strings.
  4370. // This method has limits on input size, processing time, and output
  4371. // size.
  4372. func (r *ContentService) Inspect(googleprivacydlpv2beta1inspectcontentrequest *GooglePrivacyDlpV2beta1InspectContentRequest) *ContentInspectCall {
  4373. c := &ContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4374. c.googleprivacydlpv2beta1inspectcontentrequest = googleprivacydlpv2beta1inspectcontentrequest
  4375. return c
  4376. }
  4377. // Fields allows partial responses to be retrieved. See
  4378. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4379. // for more information.
  4380. func (c *ContentInspectCall) Fields(s ...googleapi.Field) *ContentInspectCall {
  4381. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4382. return c
  4383. }
  4384. // Context sets the context to be used in this call's Do method. Any
  4385. // pending HTTP request will be aborted if the provided context is
  4386. // canceled.
  4387. func (c *ContentInspectCall) Context(ctx context.Context) *ContentInspectCall {
  4388. c.ctx_ = ctx
  4389. return c
  4390. }
  4391. // Header returns an http.Header that can be modified by the caller to
  4392. // add HTTP headers to the request.
  4393. func (c *ContentInspectCall) Header() http.Header {
  4394. if c.header_ == nil {
  4395. c.header_ = make(http.Header)
  4396. }
  4397. return c.header_
  4398. }
  4399. func (c *ContentInspectCall) doRequest(alt string) (*http.Response, error) {
  4400. reqHeaders := make(http.Header)
  4401. for k, v := range c.header_ {
  4402. reqHeaders[k] = v
  4403. }
  4404. reqHeaders.Set("User-Agent", c.s.userAgent())
  4405. var body io.Reader = nil
  4406. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta1inspectcontentrequest)
  4407. if err != nil {
  4408. return nil, err
  4409. }
  4410. reqHeaders.Set("Content-Type", "application/json")
  4411. c.urlParams_.Set("alt", alt)
  4412. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:inspect")
  4413. urls += "?" + c.urlParams_.Encode()
  4414. req, _ := http.NewRequest("POST", urls, body)
  4415. req.Header = reqHeaders
  4416. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4417. }
  4418. // Do executes the "dlp.content.inspect" call.
  4419. // Exactly one of *GooglePrivacyDlpV2beta1InspectContentResponse or
  4420. // error will be non-nil. Any non-2xx status code is an error. Response
  4421. // headers are in either
  4422. // *GooglePrivacyDlpV2beta1InspectContentResponse.ServerResponse.Header
  4423. // or (if a response was returned at all) in
  4424. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4425. // whether the returned error was because http.StatusNotModified was
  4426. // returned.
  4427. func (c *ContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1InspectContentResponse, error) {
  4428. gensupport.SetOptions(c.urlParams_, opts...)
  4429. res, err := c.doRequest("json")
  4430. if res != nil && res.StatusCode == http.StatusNotModified {
  4431. if res.Body != nil {
  4432. res.Body.Close()
  4433. }
  4434. return nil, &googleapi.Error{
  4435. Code: res.StatusCode,
  4436. Header: res.Header,
  4437. }
  4438. }
  4439. if err != nil {
  4440. return nil, err
  4441. }
  4442. defer googleapi.CloseBody(res)
  4443. if err := googleapi.CheckResponse(res); err != nil {
  4444. return nil, err
  4445. }
  4446. ret := &GooglePrivacyDlpV2beta1InspectContentResponse{
  4447. ServerResponse: googleapi.ServerResponse{
  4448. Header: res.Header,
  4449. HTTPStatusCode: res.StatusCode,
  4450. },
  4451. }
  4452. target := &ret
  4453. if err := gensupport.DecodeResponse(target, res); err != nil {
  4454. return nil, err
  4455. }
  4456. return ret, nil
  4457. // {
  4458. // "description": "Finds potentially sensitive info in a list of strings.\nThis method has limits on input size, processing time, and output size.",
  4459. // "flatPath": "v2beta1/content:inspect",
  4460. // "httpMethod": "POST",
  4461. // "id": "dlp.content.inspect",
  4462. // "parameterOrder": [],
  4463. // "parameters": {},
  4464. // "path": "v2beta1/content:inspect",
  4465. // "request": {
  4466. // "$ref": "GooglePrivacyDlpV2beta1InspectContentRequest"
  4467. // },
  4468. // "response": {
  4469. // "$ref": "GooglePrivacyDlpV2beta1InspectContentResponse"
  4470. // },
  4471. // "scopes": [
  4472. // "https://www.googleapis.com/auth/cloud-platform"
  4473. // ]
  4474. // }
  4475. }
  4476. // method id "dlp.content.redact":
  4477. type ContentRedactCall struct {
  4478. s *Service
  4479. googleprivacydlpv2beta1redactcontentrequest *GooglePrivacyDlpV2beta1RedactContentRequest
  4480. urlParams_ gensupport.URLParams
  4481. ctx_ context.Context
  4482. header_ http.Header
  4483. }
  4484. // Redact: Redacts potentially sensitive info from a list of
  4485. // strings.
  4486. // This method has limits on input size, processing time, and output
  4487. // size.
  4488. func (r *ContentService) Redact(googleprivacydlpv2beta1redactcontentrequest *GooglePrivacyDlpV2beta1RedactContentRequest) *ContentRedactCall {
  4489. c := &ContentRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4490. c.googleprivacydlpv2beta1redactcontentrequest = googleprivacydlpv2beta1redactcontentrequest
  4491. return c
  4492. }
  4493. // Fields allows partial responses to be retrieved. See
  4494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4495. // for more information.
  4496. func (c *ContentRedactCall) Fields(s ...googleapi.Field) *ContentRedactCall {
  4497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4498. return c
  4499. }
  4500. // Context sets the context to be used in this call's Do method. Any
  4501. // pending HTTP request will be aborted if the provided context is
  4502. // canceled.
  4503. func (c *ContentRedactCall) Context(ctx context.Context) *ContentRedactCall {
  4504. c.ctx_ = ctx
  4505. return c
  4506. }
  4507. // Header returns an http.Header that can be modified by the caller to
  4508. // add HTTP headers to the request.
  4509. func (c *ContentRedactCall) Header() http.Header {
  4510. if c.header_ == nil {
  4511. c.header_ = make(http.Header)
  4512. }
  4513. return c.header_
  4514. }
  4515. func (c *ContentRedactCall) doRequest(alt string) (*http.Response, error) {
  4516. reqHeaders := make(http.Header)
  4517. for k, v := range c.header_ {
  4518. reqHeaders[k] = v
  4519. }
  4520. reqHeaders.Set("User-Agent", c.s.userAgent())
  4521. var body io.Reader = nil
  4522. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta1redactcontentrequest)
  4523. if err != nil {
  4524. return nil, err
  4525. }
  4526. reqHeaders.Set("Content-Type", "application/json")
  4527. c.urlParams_.Set("alt", alt)
  4528. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/content:redact")
  4529. urls += "?" + c.urlParams_.Encode()
  4530. req, _ := http.NewRequest("POST", urls, body)
  4531. req.Header = reqHeaders
  4532. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4533. }
  4534. // Do executes the "dlp.content.redact" call.
  4535. // Exactly one of *GooglePrivacyDlpV2beta1RedactContentResponse or error
  4536. // will be non-nil. Any non-2xx status code is an error. Response
  4537. // headers are in either
  4538. // *GooglePrivacyDlpV2beta1RedactContentResponse.ServerResponse.Header
  4539. // or (if a response was returned at all) in
  4540. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4541. // whether the returned error was because http.StatusNotModified was
  4542. // returned.
  4543. func (c *ContentRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1RedactContentResponse, error) {
  4544. gensupport.SetOptions(c.urlParams_, opts...)
  4545. res, err := c.doRequest("json")
  4546. if res != nil && res.StatusCode == http.StatusNotModified {
  4547. if res.Body != nil {
  4548. res.Body.Close()
  4549. }
  4550. return nil, &googleapi.Error{
  4551. Code: res.StatusCode,
  4552. Header: res.Header,
  4553. }
  4554. }
  4555. if err != nil {
  4556. return nil, err
  4557. }
  4558. defer googleapi.CloseBody(res)
  4559. if err := googleapi.CheckResponse(res); err != nil {
  4560. return nil, err
  4561. }
  4562. ret := &GooglePrivacyDlpV2beta1RedactContentResponse{
  4563. ServerResponse: googleapi.ServerResponse{
  4564. Header: res.Header,
  4565. HTTPStatusCode: res.StatusCode,
  4566. },
  4567. }
  4568. target := &ret
  4569. if err := gensupport.DecodeResponse(target, res); err != nil {
  4570. return nil, err
  4571. }
  4572. return ret, nil
  4573. // {
  4574. // "description": "Redacts potentially sensitive info from a list of strings.\nThis method has limits on input size, processing time, and output size.",
  4575. // "flatPath": "v2beta1/content:redact",
  4576. // "httpMethod": "POST",
  4577. // "id": "dlp.content.redact",
  4578. // "parameterOrder": [],
  4579. // "parameters": {},
  4580. // "path": "v2beta1/content:redact",
  4581. // "request": {
  4582. // "$ref": "GooglePrivacyDlpV2beta1RedactContentRequest"
  4583. // },
  4584. // "response": {
  4585. // "$ref": "GooglePrivacyDlpV2beta1RedactContentResponse"
  4586. // },
  4587. // "scopes": [
  4588. // "https://www.googleapis.com/auth/cloud-platform"
  4589. // ]
  4590. // }
  4591. }
  4592. // method id "dlp.dataSource.analyze":
  4593. type DataSourceAnalyzeCall struct {
  4594. s *Service
  4595. googleprivacydlpv2beta1analyzedatasourceriskrequest *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest
  4596. urlParams_ gensupport.URLParams
  4597. ctx_ context.Context
  4598. header_ http.Header
  4599. }
  4600. // Analyze: Schedules a job to compute risk analysis metrics over
  4601. // content in a Google
  4602. // Cloud Platform repository.
  4603. func (r *DataSourceService) Analyze(googleprivacydlpv2beta1analyzedatasourceriskrequest *GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest) *DataSourceAnalyzeCall {
  4604. c := &DataSourceAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4605. c.googleprivacydlpv2beta1analyzedatasourceriskrequest = googleprivacydlpv2beta1analyzedatasourceriskrequest
  4606. return c
  4607. }
  4608. // Fields allows partial responses to be retrieved. See
  4609. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4610. // for more information.
  4611. func (c *DataSourceAnalyzeCall) Fields(s ...googleapi.Field) *DataSourceAnalyzeCall {
  4612. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4613. return c
  4614. }
  4615. // Context sets the context to be used in this call's Do method. Any
  4616. // pending HTTP request will be aborted if the provided context is
  4617. // canceled.
  4618. func (c *DataSourceAnalyzeCall) Context(ctx context.Context) *DataSourceAnalyzeCall {
  4619. c.ctx_ = ctx
  4620. return c
  4621. }
  4622. // Header returns an http.Header that can be modified by the caller to
  4623. // add HTTP headers to the request.
  4624. func (c *DataSourceAnalyzeCall) Header() http.Header {
  4625. if c.header_ == nil {
  4626. c.header_ = make(http.Header)
  4627. }
  4628. return c.header_
  4629. }
  4630. func (c *DataSourceAnalyzeCall) doRequest(alt string) (*http.Response, error) {
  4631. reqHeaders := make(http.Header)
  4632. for k, v := range c.header_ {
  4633. reqHeaders[k] = v
  4634. }
  4635. reqHeaders.Set("User-Agent", c.s.userAgent())
  4636. var body io.Reader = nil
  4637. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta1analyzedatasourceriskrequest)
  4638. if err != nil {
  4639. return nil, err
  4640. }
  4641. reqHeaders.Set("Content-Type", "application/json")
  4642. c.urlParams_.Set("alt", alt)
  4643. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/dataSource:analyze")
  4644. urls += "?" + c.urlParams_.Encode()
  4645. req, _ := http.NewRequest("POST", urls, body)
  4646. req.Header = reqHeaders
  4647. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4648. }
  4649. // Do executes the "dlp.dataSource.analyze" call.
  4650. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  4651. // Any non-2xx status code is an error. Response headers are in either
  4652. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  4653. // was returned at all) in error.(*googleapi.Error).Header. Use
  4654. // googleapi.IsNotModified to check whether the returned error was
  4655. // because http.StatusNotModified was returned.
  4656. func (c *DataSourceAnalyzeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4657. gensupport.SetOptions(c.urlParams_, opts...)
  4658. res, err := c.doRequest("json")
  4659. if res != nil && res.StatusCode == http.StatusNotModified {
  4660. if res.Body != nil {
  4661. res.Body.Close()
  4662. }
  4663. return nil, &googleapi.Error{
  4664. Code: res.StatusCode,
  4665. Header: res.Header,
  4666. }
  4667. }
  4668. if err != nil {
  4669. return nil, err
  4670. }
  4671. defer googleapi.CloseBody(res)
  4672. if err := googleapi.CheckResponse(res); err != nil {
  4673. return nil, err
  4674. }
  4675. ret := &GoogleLongrunningOperation{
  4676. ServerResponse: googleapi.ServerResponse{
  4677. Header: res.Header,
  4678. HTTPStatusCode: res.StatusCode,
  4679. },
  4680. }
  4681. target := &ret
  4682. if err := gensupport.DecodeResponse(target, res); err != nil {
  4683. return nil, err
  4684. }
  4685. return ret, nil
  4686. // {
  4687. // "description": "Schedules a job to compute risk analysis metrics over content in a Google\nCloud Platform repository.",
  4688. // "flatPath": "v2beta1/dataSource:analyze",
  4689. // "httpMethod": "POST",
  4690. // "id": "dlp.dataSource.analyze",
  4691. // "parameterOrder": [],
  4692. // "parameters": {},
  4693. // "path": "v2beta1/dataSource:analyze",
  4694. // "request": {
  4695. // "$ref": "GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest"
  4696. // },
  4697. // "response": {
  4698. // "$ref": "GoogleLongrunningOperation"
  4699. // },
  4700. // "scopes": [
  4701. // "https://www.googleapis.com/auth/cloud-platform"
  4702. // ]
  4703. // }
  4704. }
  4705. // method id "dlp.inspect.operations.cancel":
  4706. type InspectOperationsCancelCall struct {
  4707. s *Service
  4708. name string
  4709. googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
  4710. urlParams_ gensupport.URLParams
  4711. ctx_ context.Context
  4712. header_ http.Header
  4713. }
  4714. // Cancel: Cancels an operation. Use the `inspect.operations.get` to
  4715. // check whether the cancellation succeeded or the operation completed
  4716. // despite cancellation.
  4717. func (r *InspectOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *InspectOperationsCancelCall {
  4718. c := &InspectOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4719. c.name = name
  4720. c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
  4721. return c
  4722. }
  4723. // Fields allows partial responses to be retrieved. See
  4724. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4725. // for more information.
  4726. func (c *InspectOperationsCancelCall) Fields(s ...googleapi.Field) *InspectOperationsCancelCall {
  4727. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4728. return c
  4729. }
  4730. // Context sets the context to be used in this call's Do method. Any
  4731. // pending HTTP request will be aborted if the provided context is
  4732. // canceled.
  4733. func (c *InspectOperationsCancelCall) Context(ctx context.Context) *InspectOperationsCancelCall {
  4734. c.ctx_ = ctx
  4735. return c
  4736. }
  4737. // Header returns an http.Header that can be modified by the caller to
  4738. // add HTTP headers to the request.
  4739. func (c *InspectOperationsCancelCall) Header() http.Header {
  4740. if c.header_ == nil {
  4741. c.header_ = make(http.Header)
  4742. }
  4743. return c.header_
  4744. }
  4745. func (c *InspectOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4746. reqHeaders := make(http.Header)
  4747. for k, v := range c.header_ {
  4748. reqHeaders[k] = v
  4749. }
  4750. reqHeaders.Set("User-Agent", c.s.userAgent())
  4751. var body io.Reader = nil
  4752. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
  4753. if err != nil {
  4754. return nil, err
  4755. }
  4756. reqHeaders.Set("Content-Type", "application/json")
  4757. c.urlParams_.Set("alt", alt)
  4758. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
  4759. urls += "?" + c.urlParams_.Encode()
  4760. req, _ := http.NewRequest("POST", urls, body)
  4761. req.Header = reqHeaders
  4762. googleapi.Expand(req.URL, map[string]string{
  4763. "name": c.name,
  4764. })
  4765. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4766. }
  4767. // Do executes the "dlp.inspect.operations.cancel" call.
  4768. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  4769. // non-2xx status code is an error. Response headers are in either
  4770. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  4771. // returned at all) in error.(*googleapi.Error).Header. Use
  4772. // googleapi.IsNotModified to check whether the returned error was
  4773. // because http.StatusNotModified was returned.
  4774. func (c *InspectOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  4775. gensupport.SetOptions(c.urlParams_, opts...)
  4776. res, err := c.doRequest("json")
  4777. if res != nil && res.StatusCode == http.StatusNotModified {
  4778. if res.Body != nil {
  4779. res.Body.Close()
  4780. }
  4781. return nil, &googleapi.Error{
  4782. Code: res.StatusCode,
  4783. Header: res.Header,
  4784. }
  4785. }
  4786. if err != nil {
  4787. return nil, err
  4788. }
  4789. defer googleapi.CloseBody(res)
  4790. if err := googleapi.CheckResponse(res); err != nil {
  4791. return nil, err
  4792. }
  4793. ret := &GoogleProtobufEmpty{
  4794. ServerResponse: googleapi.ServerResponse{
  4795. Header: res.Header,
  4796. HTTPStatusCode: res.StatusCode,
  4797. },
  4798. }
  4799. target := &ret
  4800. if err := gensupport.DecodeResponse(target, res); err != nil {
  4801. return nil, err
  4802. }
  4803. return ret, nil
  4804. // {
  4805. // "description": "Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation.",
  4806. // "flatPath": "v2beta1/inspect/operations/{operationsId}:cancel",
  4807. // "httpMethod": "POST",
  4808. // "id": "dlp.inspect.operations.cancel",
  4809. // "parameterOrder": [
  4810. // "name"
  4811. // ],
  4812. // "parameters": {
  4813. // "name": {
  4814. // "description": "The name of the operation resource to be cancelled.",
  4815. // "location": "path",
  4816. // "pattern": "^inspect/operations/[^/]+$",
  4817. // "required": true,
  4818. // "type": "string"
  4819. // }
  4820. // },
  4821. // "path": "v2beta1/{+name}:cancel",
  4822. // "request": {
  4823. // "$ref": "GoogleLongrunningCancelOperationRequest"
  4824. // },
  4825. // "response": {
  4826. // "$ref": "GoogleProtobufEmpty"
  4827. // },
  4828. // "scopes": [
  4829. // "https://www.googleapis.com/auth/cloud-platform"
  4830. // ]
  4831. // }
  4832. }
  4833. // method id "dlp.inspect.operations.create":
  4834. type InspectOperationsCreateCall struct {
  4835. s *Service
  4836. googleprivacydlpv2beta1createinspectoperationrequest *GooglePrivacyDlpV2beta1CreateInspectOperationRequest
  4837. urlParams_ gensupport.URLParams
  4838. ctx_ context.Context
  4839. header_ http.Header
  4840. }
  4841. // Create: Schedules a job scanning content in a Google Cloud Platform
  4842. // data
  4843. // repository.
  4844. func (r *InspectOperationsService) Create(googleprivacydlpv2beta1createinspectoperationrequest *GooglePrivacyDlpV2beta1CreateInspectOperationRequest) *InspectOperationsCreateCall {
  4845. c := &InspectOperationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4846. c.googleprivacydlpv2beta1createinspectoperationrequest = googleprivacydlpv2beta1createinspectoperationrequest
  4847. return c
  4848. }
  4849. // Fields allows partial responses to be retrieved. See
  4850. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4851. // for more information.
  4852. func (c *InspectOperationsCreateCall) Fields(s ...googleapi.Field) *InspectOperationsCreateCall {
  4853. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4854. return c
  4855. }
  4856. // Context sets the context to be used in this call's Do method. Any
  4857. // pending HTTP request will be aborted if the provided context is
  4858. // canceled.
  4859. func (c *InspectOperationsCreateCall) Context(ctx context.Context) *InspectOperationsCreateCall {
  4860. c.ctx_ = ctx
  4861. return c
  4862. }
  4863. // Header returns an http.Header that can be modified by the caller to
  4864. // add HTTP headers to the request.
  4865. func (c *InspectOperationsCreateCall) Header() http.Header {
  4866. if c.header_ == nil {
  4867. c.header_ = make(http.Header)
  4868. }
  4869. return c.header_
  4870. }
  4871. func (c *InspectOperationsCreateCall) doRequest(alt string) (*http.Response, error) {
  4872. reqHeaders := make(http.Header)
  4873. for k, v := range c.header_ {
  4874. reqHeaders[k] = v
  4875. }
  4876. reqHeaders.Set("User-Agent", c.s.userAgent())
  4877. var body io.Reader = nil
  4878. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2beta1createinspectoperationrequest)
  4879. if err != nil {
  4880. return nil, err
  4881. }
  4882. reqHeaders.Set("Content-Type", "application/json")
  4883. c.urlParams_.Set("alt", alt)
  4884. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/inspect/operations")
  4885. urls += "?" + c.urlParams_.Encode()
  4886. req, _ := http.NewRequest("POST", urls, body)
  4887. req.Header = reqHeaders
  4888. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4889. }
  4890. // Do executes the "dlp.inspect.operations.create" call.
  4891. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  4892. // Any non-2xx status code is an error. Response headers are in either
  4893. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  4894. // was returned at all) in error.(*googleapi.Error).Header. Use
  4895. // googleapi.IsNotModified to check whether the returned error was
  4896. // because http.StatusNotModified was returned.
  4897. func (c *InspectOperationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4898. gensupport.SetOptions(c.urlParams_, opts...)
  4899. res, err := c.doRequest("json")
  4900. if res != nil && res.StatusCode == http.StatusNotModified {
  4901. if res.Body != nil {
  4902. res.Body.Close()
  4903. }
  4904. return nil, &googleapi.Error{
  4905. Code: res.StatusCode,
  4906. Header: res.Header,
  4907. }
  4908. }
  4909. if err != nil {
  4910. return nil, err
  4911. }
  4912. defer googleapi.CloseBody(res)
  4913. if err := googleapi.CheckResponse(res); err != nil {
  4914. return nil, err
  4915. }
  4916. ret := &GoogleLongrunningOperation{
  4917. ServerResponse: googleapi.ServerResponse{
  4918. Header: res.Header,
  4919. HTTPStatusCode: res.StatusCode,
  4920. },
  4921. }
  4922. target := &ret
  4923. if err := gensupport.DecodeResponse(target, res); err != nil {
  4924. return nil, err
  4925. }
  4926. return ret, nil
  4927. // {
  4928. // "description": "Schedules a job scanning content in a Google Cloud Platform data\nrepository.",
  4929. // "flatPath": "v2beta1/inspect/operations",
  4930. // "httpMethod": "POST",
  4931. // "id": "dlp.inspect.operations.create",
  4932. // "parameterOrder": [],
  4933. // "parameters": {},
  4934. // "path": "v2beta1/inspect/operations",
  4935. // "request": {
  4936. // "$ref": "GooglePrivacyDlpV2beta1CreateInspectOperationRequest"
  4937. // },
  4938. // "response": {
  4939. // "$ref": "GoogleLongrunningOperation"
  4940. // },
  4941. // "scopes": [
  4942. // "https://www.googleapis.com/auth/cloud-platform"
  4943. // ]
  4944. // }
  4945. }
  4946. // method id "dlp.inspect.operations.delete":
  4947. type InspectOperationsDeleteCall struct {
  4948. s *Service
  4949. name string
  4950. urlParams_ gensupport.URLParams
  4951. ctx_ context.Context
  4952. header_ http.Header
  4953. }
  4954. // Delete: This method is not supported and the server returns
  4955. // `UNIMPLEMENTED`.
  4956. func (r *InspectOperationsService) Delete(name string) *InspectOperationsDeleteCall {
  4957. c := &InspectOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4958. c.name = name
  4959. return c
  4960. }
  4961. // Fields allows partial responses to be retrieved. See
  4962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4963. // for more information.
  4964. func (c *InspectOperationsDeleteCall) Fields(s ...googleapi.Field) *InspectOperationsDeleteCall {
  4965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4966. return c
  4967. }
  4968. // Context sets the context to be used in this call's Do method. Any
  4969. // pending HTTP request will be aborted if the provided context is
  4970. // canceled.
  4971. func (c *InspectOperationsDeleteCall) Context(ctx context.Context) *InspectOperationsDeleteCall {
  4972. c.ctx_ = ctx
  4973. return c
  4974. }
  4975. // Header returns an http.Header that can be modified by the caller to
  4976. // add HTTP headers to the request.
  4977. func (c *InspectOperationsDeleteCall) Header() http.Header {
  4978. if c.header_ == nil {
  4979. c.header_ = make(http.Header)
  4980. }
  4981. return c.header_
  4982. }
  4983. func (c *InspectOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4984. reqHeaders := make(http.Header)
  4985. for k, v := range c.header_ {
  4986. reqHeaders[k] = v
  4987. }
  4988. reqHeaders.Set("User-Agent", c.s.userAgent())
  4989. var body io.Reader = nil
  4990. c.urlParams_.Set("alt", alt)
  4991. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  4992. urls += "?" + c.urlParams_.Encode()
  4993. req, _ := http.NewRequest("DELETE", urls, body)
  4994. req.Header = reqHeaders
  4995. googleapi.Expand(req.URL, map[string]string{
  4996. "name": c.name,
  4997. })
  4998. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4999. }
  5000. // Do executes the "dlp.inspect.operations.delete" call.
  5001. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  5002. // non-2xx status code is an error. Response headers are in either
  5003. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  5004. // returned at all) in error.(*googleapi.Error).Header. Use
  5005. // googleapi.IsNotModified to check whether the returned error was
  5006. // because http.StatusNotModified was returned.
  5007. func (c *InspectOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  5008. gensupport.SetOptions(c.urlParams_, opts...)
  5009. res, err := c.doRequest("json")
  5010. if res != nil && res.StatusCode == http.StatusNotModified {
  5011. if res.Body != nil {
  5012. res.Body.Close()
  5013. }
  5014. return nil, &googleapi.Error{
  5015. Code: res.StatusCode,
  5016. Header: res.Header,
  5017. }
  5018. }
  5019. if err != nil {
  5020. return nil, err
  5021. }
  5022. defer googleapi.CloseBody(res)
  5023. if err := googleapi.CheckResponse(res); err != nil {
  5024. return nil, err
  5025. }
  5026. ret := &GoogleProtobufEmpty{
  5027. ServerResponse: googleapi.ServerResponse{
  5028. Header: res.Header,
  5029. HTTPStatusCode: res.StatusCode,
  5030. },
  5031. }
  5032. target := &ret
  5033. if err := gensupport.DecodeResponse(target, res); err != nil {
  5034. return nil, err
  5035. }
  5036. return ret, nil
  5037. // {
  5038. // "description": "This method is not supported and the server returns `UNIMPLEMENTED`.",
  5039. // "flatPath": "v2beta1/inspect/operations/{operationsId}",
  5040. // "httpMethod": "DELETE",
  5041. // "id": "dlp.inspect.operations.delete",
  5042. // "parameterOrder": [
  5043. // "name"
  5044. // ],
  5045. // "parameters": {
  5046. // "name": {
  5047. // "description": "The name of the operation resource to be deleted.",
  5048. // "location": "path",
  5049. // "pattern": "^inspect/operations/[^/]+$",
  5050. // "required": true,
  5051. // "type": "string"
  5052. // }
  5053. // },
  5054. // "path": "v2beta1/{+name}",
  5055. // "response": {
  5056. // "$ref": "GoogleProtobufEmpty"
  5057. // },
  5058. // "scopes": [
  5059. // "https://www.googleapis.com/auth/cloud-platform"
  5060. // ]
  5061. // }
  5062. }
  5063. // method id "dlp.inspect.operations.get":
  5064. type InspectOperationsGetCall struct {
  5065. s *Service
  5066. name string
  5067. urlParams_ gensupport.URLParams
  5068. ifNoneMatch_ string
  5069. ctx_ context.Context
  5070. header_ http.Header
  5071. }
  5072. // Get: Gets the latest state of a long-running operation. Clients can
  5073. // use this
  5074. // method to poll the operation result at intervals as recommended by
  5075. // the API
  5076. // service.
  5077. func (r *InspectOperationsService) Get(name string) *InspectOperationsGetCall {
  5078. c := &InspectOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5079. c.name = name
  5080. return c
  5081. }
  5082. // Fields allows partial responses to be retrieved. See
  5083. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5084. // for more information.
  5085. func (c *InspectOperationsGetCall) Fields(s ...googleapi.Field) *InspectOperationsGetCall {
  5086. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5087. return c
  5088. }
  5089. // IfNoneMatch sets the optional parameter which makes the operation
  5090. // fail if the object's ETag matches the given value. This is useful for
  5091. // getting updates only after the object has changed since the last
  5092. // request. Use googleapi.IsNotModified to check whether the response
  5093. // error from Do is the result of In-None-Match.
  5094. func (c *InspectOperationsGetCall) IfNoneMatch(entityTag string) *InspectOperationsGetCall {
  5095. c.ifNoneMatch_ = entityTag
  5096. return c
  5097. }
  5098. // Context sets the context to be used in this call's Do method. Any
  5099. // pending HTTP request will be aborted if the provided context is
  5100. // canceled.
  5101. func (c *InspectOperationsGetCall) Context(ctx context.Context) *InspectOperationsGetCall {
  5102. c.ctx_ = ctx
  5103. return c
  5104. }
  5105. // Header returns an http.Header that can be modified by the caller to
  5106. // add HTTP headers to the request.
  5107. func (c *InspectOperationsGetCall) Header() http.Header {
  5108. if c.header_ == nil {
  5109. c.header_ = make(http.Header)
  5110. }
  5111. return c.header_
  5112. }
  5113. func (c *InspectOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5114. reqHeaders := make(http.Header)
  5115. for k, v := range c.header_ {
  5116. reqHeaders[k] = v
  5117. }
  5118. reqHeaders.Set("User-Agent", c.s.userAgent())
  5119. if c.ifNoneMatch_ != "" {
  5120. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5121. }
  5122. var body io.Reader = nil
  5123. c.urlParams_.Set("alt", alt)
  5124. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  5125. urls += "?" + c.urlParams_.Encode()
  5126. req, _ := http.NewRequest("GET", urls, body)
  5127. req.Header = reqHeaders
  5128. googleapi.Expand(req.URL, map[string]string{
  5129. "name": c.name,
  5130. })
  5131. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5132. }
  5133. // Do executes the "dlp.inspect.operations.get" call.
  5134. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  5135. // Any non-2xx status code is an error. Response headers are in either
  5136. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  5137. // was returned at all) in error.(*googleapi.Error).Header. Use
  5138. // googleapi.IsNotModified to check whether the returned error was
  5139. // because http.StatusNotModified was returned.
  5140. func (c *InspectOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5141. gensupport.SetOptions(c.urlParams_, opts...)
  5142. res, err := c.doRequest("json")
  5143. if res != nil && res.StatusCode == http.StatusNotModified {
  5144. if res.Body != nil {
  5145. res.Body.Close()
  5146. }
  5147. return nil, &googleapi.Error{
  5148. Code: res.StatusCode,
  5149. Header: res.Header,
  5150. }
  5151. }
  5152. if err != nil {
  5153. return nil, err
  5154. }
  5155. defer googleapi.CloseBody(res)
  5156. if err := googleapi.CheckResponse(res); err != nil {
  5157. return nil, err
  5158. }
  5159. ret := &GoogleLongrunningOperation{
  5160. ServerResponse: googleapi.ServerResponse{
  5161. Header: res.Header,
  5162. HTTPStatusCode: res.StatusCode,
  5163. },
  5164. }
  5165. target := &ret
  5166. if err := gensupport.DecodeResponse(target, res); err != nil {
  5167. return nil, err
  5168. }
  5169. return ret, nil
  5170. // {
  5171. // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
  5172. // "flatPath": "v2beta1/inspect/operations/{operationsId}",
  5173. // "httpMethod": "GET",
  5174. // "id": "dlp.inspect.operations.get",
  5175. // "parameterOrder": [
  5176. // "name"
  5177. // ],
  5178. // "parameters": {
  5179. // "name": {
  5180. // "description": "The name of the operation resource.",
  5181. // "location": "path",
  5182. // "pattern": "^inspect/operations/[^/]+$",
  5183. // "required": true,
  5184. // "type": "string"
  5185. // }
  5186. // },
  5187. // "path": "v2beta1/{+name}",
  5188. // "response": {
  5189. // "$ref": "GoogleLongrunningOperation"
  5190. // },
  5191. // "scopes": [
  5192. // "https://www.googleapis.com/auth/cloud-platform"
  5193. // ]
  5194. // }
  5195. }
  5196. // method id "dlp.inspect.operations.list":
  5197. type InspectOperationsListCall struct {
  5198. s *Service
  5199. name string
  5200. urlParams_ gensupport.URLParams
  5201. ifNoneMatch_ string
  5202. ctx_ context.Context
  5203. header_ http.Header
  5204. }
  5205. // List: Fetches the list of long running operations.
  5206. func (r *InspectOperationsService) List(name string) *InspectOperationsListCall {
  5207. c := &InspectOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5208. c.name = name
  5209. return c
  5210. }
  5211. // Filter sets the optional parameter "filter": Filters by `done`. That
  5212. // is, `done=true` or `done=false`.
  5213. func (c *InspectOperationsListCall) Filter(filter string) *InspectOperationsListCall {
  5214. c.urlParams_.Set("filter", filter)
  5215. return c
  5216. }
  5217. // PageSize sets the optional parameter "pageSize": The list page size.
  5218. // The maximum allowed value is 256 and the default is 100.
  5219. func (c *InspectOperationsListCall) PageSize(pageSize int64) *InspectOperationsListCall {
  5220. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5221. return c
  5222. }
  5223. // PageToken sets the optional parameter "pageToken": The standard list
  5224. // page token.
  5225. func (c *InspectOperationsListCall) PageToken(pageToken string) *InspectOperationsListCall {
  5226. c.urlParams_.Set("pageToken", pageToken)
  5227. return c
  5228. }
  5229. // Fields allows partial responses to be retrieved. See
  5230. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5231. // for more information.
  5232. func (c *InspectOperationsListCall) Fields(s ...googleapi.Field) *InspectOperationsListCall {
  5233. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5234. return c
  5235. }
  5236. // IfNoneMatch sets the optional parameter which makes the operation
  5237. // fail if the object's ETag matches the given value. This is useful for
  5238. // getting updates only after the object has changed since the last
  5239. // request. Use googleapi.IsNotModified to check whether the response
  5240. // error from Do is the result of In-None-Match.
  5241. func (c *InspectOperationsListCall) IfNoneMatch(entityTag string) *InspectOperationsListCall {
  5242. c.ifNoneMatch_ = entityTag
  5243. return c
  5244. }
  5245. // Context sets the context to be used in this call's Do method. Any
  5246. // pending HTTP request will be aborted if the provided context is
  5247. // canceled.
  5248. func (c *InspectOperationsListCall) Context(ctx context.Context) *InspectOperationsListCall {
  5249. c.ctx_ = ctx
  5250. return c
  5251. }
  5252. // Header returns an http.Header that can be modified by the caller to
  5253. // add HTTP headers to the request.
  5254. func (c *InspectOperationsListCall) Header() http.Header {
  5255. if c.header_ == nil {
  5256. c.header_ = make(http.Header)
  5257. }
  5258. return c.header_
  5259. }
  5260. func (c *InspectOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5261. reqHeaders := make(http.Header)
  5262. for k, v := range c.header_ {
  5263. reqHeaders[k] = v
  5264. }
  5265. reqHeaders.Set("User-Agent", c.s.userAgent())
  5266. if c.ifNoneMatch_ != "" {
  5267. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5268. }
  5269. var body io.Reader = nil
  5270. c.urlParams_.Set("alt", alt)
  5271. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  5272. urls += "?" + c.urlParams_.Encode()
  5273. req, _ := http.NewRequest("GET", urls, body)
  5274. req.Header = reqHeaders
  5275. googleapi.Expand(req.URL, map[string]string{
  5276. "name": c.name,
  5277. })
  5278. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5279. }
  5280. // Do executes the "dlp.inspect.operations.list" call.
  5281. // Exactly one of *GoogleLongrunningListOperationsResponse or error will
  5282. // be non-nil. Any non-2xx status code is an error. Response headers are
  5283. // in either
  5284. // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
  5285. // a response was returned at all) in error.(*googleapi.Error).Header.
  5286. // Use googleapi.IsNotModified to check whether the returned error was
  5287. // because http.StatusNotModified was returned.
  5288. func (c *InspectOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  5289. gensupport.SetOptions(c.urlParams_, opts...)
  5290. res, err := c.doRequest("json")
  5291. if res != nil && res.StatusCode == http.StatusNotModified {
  5292. if res.Body != nil {
  5293. res.Body.Close()
  5294. }
  5295. return nil, &googleapi.Error{
  5296. Code: res.StatusCode,
  5297. Header: res.Header,
  5298. }
  5299. }
  5300. if err != nil {
  5301. return nil, err
  5302. }
  5303. defer googleapi.CloseBody(res)
  5304. if err := googleapi.CheckResponse(res); err != nil {
  5305. return nil, err
  5306. }
  5307. ret := &GoogleLongrunningListOperationsResponse{
  5308. ServerResponse: googleapi.ServerResponse{
  5309. Header: res.Header,
  5310. HTTPStatusCode: res.StatusCode,
  5311. },
  5312. }
  5313. target := &ret
  5314. if err := gensupport.DecodeResponse(target, res); err != nil {
  5315. return nil, err
  5316. }
  5317. return ret, nil
  5318. // {
  5319. // "description": "Fetches the list of long running operations.",
  5320. // "flatPath": "v2beta1/inspect/operations",
  5321. // "httpMethod": "GET",
  5322. // "id": "dlp.inspect.operations.list",
  5323. // "parameterOrder": [
  5324. // "name"
  5325. // ],
  5326. // "parameters": {
  5327. // "filter": {
  5328. // "description": "Filters by `done`. That is, `done=true` or `done=false`.",
  5329. // "location": "query",
  5330. // "type": "string"
  5331. // },
  5332. // "name": {
  5333. // "description": "The name of the operation's parent resource.",
  5334. // "location": "path",
  5335. // "pattern": "^inspect/operations$",
  5336. // "required": true,
  5337. // "type": "string"
  5338. // },
  5339. // "pageSize": {
  5340. // "description": "The list page size. The maximum allowed value is 256 and the default is 100.",
  5341. // "format": "int32",
  5342. // "location": "query",
  5343. // "type": "integer"
  5344. // },
  5345. // "pageToken": {
  5346. // "description": "The standard list page token.",
  5347. // "location": "query",
  5348. // "type": "string"
  5349. // }
  5350. // },
  5351. // "path": "v2beta1/{+name}",
  5352. // "response": {
  5353. // "$ref": "GoogleLongrunningListOperationsResponse"
  5354. // },
  5355. // "scopes": [
  5356. // "https://www.googleapis.com/auth/cloud-platform"
  5357. // ]
  5358. // }
  5359. }
  5360. // Pages invokes f for each page of results.
  5361. // A non-nil error returned from f will halt the iteration.
  5362. // The provided context supersedes any context provided to the Context method.
  5363. func (c *InspectOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  5364. c.ctx_ = ctx
  5365. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5366. for {
  5367. x, err := c.Do()
  5368. if err != nil {
  5369. return err
  5370. }
  5371. if err := f(x); err != nil {
  5372. return err
  5373. }
  5374. if x.NextPageToken == "" {
  5375. return nil
  5376. }
  5377. c.PageToken(x.NextPageToken)
  5378. }
  5379. }
  5380. // method id "dlp.inspect.results.findings.list":
  5381. type InspectResultsFindingsListCall struct {
  5382. s *Service
  5383. name string
  5384. urlParams_ gensupport.URLParams
  5385. ifNoneMatch_ string
  5386. ctx_ context.Context
  5387. header_ http.Header
  5388. }
  5389. // List: Returns list of results for given inspect operation result set
  5390. // id.
  5391. func (r *InspectResultsFindingsService) List(name string) *InspectResultsFindingsListCall {
  5392. c := &InspectResultsFindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5393. c.name = name
  5394. return c
  5395. }
  5396. // Filter sets the optional parameter "filter": Restricts findings to
  5397. // items that match. Supports info_type and likelihood.
  5398. //
  5399. // Examples:
  5400. //
  5401. // - info_type=EMAIL_ADDRESS
  5402. // - info_type=PHONE_NUMBER,EMAIL_ADDRESS
  5403. // - likelihood=VERY_LIKELY
  5404. // - likelihood=VERY_LIKELY,LIKELY
  5405. // - info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY
  5406. func (c *InspectResultsFindingsListCall) Filter(filter string) *InspectResultsFindingsListCall {
  5407. c.urlParams_.Set("filter", filter)
  5408. return c
  5409. }
  5410. // PageSize sets the optional parameter "pageSize": Maximum number of
  5411. // results to return.
  5412. // If 0, the implementation selects a reasonable value.
  5413. func (c *InspectResultsFindingsListCall) PageSize(pageSize int64) *InspectResultsFindingsListCall {
  5414. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5415. return c
  5416. }
  5417. // PageToken sets the optional parameter "pageToken": The value returned
  5418. // by the last `ListInspectFindingsResponse`; indicates
  5419. // that this is a continuation of a prior `ListInspectFindings` call,
  5420. // and that
  5421. // the system should return the next page of data.
  5422. func (c *InspectResultsFindingsListCall) PageToken(pageToken string) *InspectResultsFindingsListCall {
  5423. c.urlParams_.Set("pageToken", pageToken)
  5424. return c
  5425. }
  5426. // Fields allows partial responses to be retrieved. See
  5427. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5428. // for more information.
  5429. func (c *InspectResultsFindingsListCall) Fields(s ...googleapi.Field) *InspectResultsFindingsListCall {
  5430. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5431. return c
  5432. }
  5433. // IfNoneMatch sets the optional parameter which makes the operation
  5434. // fail if the object's ETag matches the given value. This is useful for
  5435. // getting updates only after the object has changed since the last
  5436. // request. Use googleapi.IsNotModified to check whether the response
  5437. // error from Do is the result of In-None-Match.
  5438. func (c *InspectResultsFindingsListCall) IfNoneMatch(entityTag string) *InspectResultsFindingsListCall {
  5439. c.ifNoneMatch_ = entityTag
  5440. return c
  5441. }
  5442. // Context sets the context to be used in this call's Do method. Any
  5443. // pending HTTP request will be aborted if the provided context is
  5444. // canceled.
  5445. func (c *InspectResultsFindingsListCall) Context(ctx context.Context) *InspectResultsFindingsListCall {
  5446. c.ctx_ = ctx
  5447. return c
  5448. }
  5449. // Header returns an http.Header that can be modified by the caller to
  5450. // add HTTP headers to the request.
  5451. func (c *InspectResultsFindingsListCall) Header() http.Header {
  5452. if c.header_ == nil {
  5453. c.header_ = make(http.Header)
  5454. }
  5455. return c.header_
  5456. }
  5457. func (c *InspectResultsFindingsListCall) doRequest(alt string) (*http.Response, error) {
  5458. reqHeaders := make(http.Header)
  5459. for k, v := range c.header_ {
  5460. reqHeaders[k] = v
  5461. }
  5462. reqHeaders.Set("User-Agent", c.s.userAgent())
  5463. if c.ifNoneMatch_ != "" {
  5464. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5465. }
  5466. var body io.Reader = nil
  5467. c.urlParams_.Set("alt", alt)
  5468. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}/findings")
  5469. urls += "?" + c.urlParams_.Encode()
  5470. req, _ := http.NewRequest("GET", urls, body)
  5471. req.Header = reqHeaders
  5472. googleapi.Expand(req.URL, map[string]string{
  5473. "name": c.name,
  5474. })
  5475. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5476. }
  5477. // Do executes the "dlp.inspect.results.findings.list" call.
  5478. // Exactly one of *GooglePrivacyDlpV2beta1ListInspectFindingsResponse or
  5479. // error will be non-nil. Any non-2xx status code is an error. Response
  5480. // headers are in either
  5481. // *GooglePrivacyDlpV2beta1ListInspectFindingsResponse.ServerResponse.Hea
  5482. // der or (if a response was returned at all) in
  5483. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5484. // whether the returned error was because http.StatusNotModified was
  5485. // returned.
  5486. func (c *InspectResultsFindingsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListInspectFindingsResponse, error) {
  5487. gensupport.SetOptions(c.urlParams_, opts...)
  5488. res, err := c.doRequest("json")
  5489. if res != nil && res.StatusCode == http.StatusNotModified {
  5490. if res.Body != nil {
  5491. res.Body.Close()
  5492. }
  5493. return nil, &googleapi.Error{
  5494. Code: res.StatusCode,
  5495. Header: res.Header,
  5496. }
  5497. }
  5498. if err != nil {
  5499. return nil, err
  5500. }
  5501. defer googleapi.CloseBody(res)
  5502. if err := googleapi.CheckResponse(res); err != nil {
  5503. return nil, err
  5504. }
  5505. ret := &GooglePrivacyDlpV2beta1ListInspectFindingsResponse{
  5506. ServerResponse: googleapi.ServerResponse{
  5507. Header: res.Header,
  5508. HTTPStatusCode: res.StatusCode,
  5509. },
  5510. }
  5511. target := &ret
  5512. if err := gensupport.DecodeResponse(target, res); err != nil {
  5513. return nil, err
  5514. }
  5515. return ret, nil
  5516. // {
  5517. // "description": "Returns list of results for given inspect operation result set id.",
  5518. // "flatPath": "v2beta1/inspect/results/{resultsId}/findings",
  5519. // "httpMethod": "GET",
  5520. // "id": "dlp.inspect.results.findings.list",
  5521. // "parameterOrder": [
  5522. // "name"
  5523. // ],
  5524. // "parameters": {
  5525. // "filter": {
  5526. // "description": "Restricts findings to items that match. Supports info_type and likelihood.\n\nExamples:\n\n- info_type=EMAIL_ADDRESS\n- info_type=PHONE_NUMBER,EMAIL_ADDRESS\n- likelihood=VERY_LIKELY\n- likelihood=VERY_LIKELY,LIKELY\n- info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY",
  5527. // "location": "query",
  5528. // "type": "string"
  5529. // },
  5530. // "name": {
  5531. // "description": "Identifier of the results set returned as metadata of\nthe longrunning operation created by a call to InspectDataSource.\nShould be in the format of `inspect/results/{id}`.",
  5532. // "location": "path",
  5533. // "pattern": "^inspect/results/[^/]+$",
  5534. // "required": true,
  5535. // "type": "string"
  5536. // },
  5537. // "pageSize": {
  5538. // "description": "Maximum number of results to return.\nIf 0, the implementation selects a reasonable value.",
  5539. // "format": "int32",
  5540. // "location": "query",
  5541. // "type": "integer"
  5542. // },
  5543. // "pageToken": {
  5544. // "description": "The value returned by the last `ListInspectFindingsResponse`; indicates\nthat this is a continuation of a prior `ListInspectFindings` call, and that\nthe system should return the next page of data.",
  5545. // "location": "query",
  5546. // "type": "string"
  5547. // }
  5548. // },
  5549. // "path": "v2beta1/{+name}/findings",
  5550. // "response": {
  5551. // "$ref": "GooglePrivacyDlpV2beta1ListInspectFindingsResponse"
  5552. // },
  5553. // "scopes": [
  5554. // "https://www.googleapis.com/auth/cloud-platform"
  5555. // ]
  5556. // }
  5557. }
  5558. // Pages invokes f for each page of results.
  5559. // A non-nil error returned from f will halt the iteration.
  5560. // The provided context supersedes any context provided to the Context method.
  5561. func (c *InspectResultsFindingsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2beta1ListInspectFindingsResponse) error) error {
  5562. c.ctx_ = ctx
  5563. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5564. for {
  5565. x, err := c.Do()
  5566. if err != nil {
  5567. return err
  5568. }
  5569. if err := f(x); err != nil {
  5570. return err
  5571. }
  5572. if x.NextPageToken == "" {
  5573. return nil
  5574. }
  5575. c.PageToken(x.NextPageToken)
  5576. }
  5577. }
  5578. // method id "dlp.riskAnalysis.operations.cancel":
  5579. type RiskAnalysisOperationsCancelCall struct {
  5580. s *Service
  5581. name string
  5582. googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
  5583. urlParams_ gensupport.URLParams
  5584. ctx_ context.Context
  5585. header_ http.Header
  5586. }
  5587. // Cancel: Cancels an operation. Use the `inspect.operations.get` to
  5588. // check whether the cancellation succeeded or the operation completed
  5589. // despite cancellation.
  5590. func (r *RiskAnalysisOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *RiskAnalysisOperationsCancelCall {
  5591. c := &RiskAnalysisOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5592. c.name = name
  5593. c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
  5594. return c
  5595. }
  5596. // Fields allows partial responses to be retrieved. See
  5597. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5598. // for more information.
  5599. func (c *RiskAnalysisOperationsCancelCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsCancelCall {
  5600. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5601. return c
  5602. }
  5603. // Context sets the context to be used in this call's Do method. Any
  5604. // pending HTTP request will be aborted if the provided context is
  5605. // canceled.
  5606. func (c *RiskAnalysisOperationsCancelCall) Context(ctx context.Context) *RiskAnalysisOperationsCancelCall {
  5607. c.ctx_ = ctx
  5608. return c
  5609. }
  5610. // Header returns an http.Header that can be modified by the caller to
  5611. // add HTTP headers to the request.
  5612. func (c *RiskAnalysisOperationsCancelCall) Header() http.Header {
  5613. if c.header_ == nil {
  5614. c.header_ = make(http.Header)
  5615. }
  5616. return c.header_
  5617. }
  5618. func (c *RiskAnalysisOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5619. reqHeaders := make(http.Header)
  5620. for k, v := range c.header_ {
  5621. reqHeaders[k] = v
  5622. }
  5623. reqHeaders.Set("User-Agent", c.s.userAgent())
  5624. var body io.Reader = nil
  5625. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
  5626. if err != nil {
  5627. return nil, err
  5628. }
  5629. reqHeaders.Set("Content-Type", "application/json")
  5630. c.urlParams_.Set("alt", alt)
  5631. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}:cancel")
  5632. urls += "?" + c.urlParams_.Encode()
  5633. req, _ := http.NewRequest("POST", urls, body)
  5634. req.Header = reqHeaders
  5635. googleapi.Expand(req.URL, map[string]string{
  5636. "name": c.name,
  5637. })
  5638. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5639. }
  5640. // Do executes the "dlp.riskAnalysis.operations.cancel" call.
  5641. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  5642. // non-2xx status code is an error. Response headers are in either
  5643. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  5644. // returned at all) in error.(*googleapi.Error).Header. Use
  5645. // googleapi.IsNotModified to check whether the returned error was
  5646. // because http.StatusNotModified was returned.
  5647. func (c *RiskAnalysisOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  5648. gensupport.SetOptions(c.urlParams_, opts...)
  5649. res, err := c.doRequest("json")
  5650. if res != nil && res.StatusCode == http.StatusNotModified {
  5651. if res.Body != nil {
  5652. res.Body.Close()
  5653. }
  5654. return nil, &googleapi.Error{
  5655. Code: res.StatusCode,
  5656. Header: res.Header,
  5657. }
  5658. }
  5659. if err != nil {
  5660. return nil, err
  5661. }
  5662. defer googleapi.CloseBody(res)
  5663. if err := googleapi.CheckResponse(res); err != nil {
  5664. return nil, err
  5665. }
  5666. ret := &GoogleProtobufEmpty{
  5667. ServerResponse: googleapi.ServerResponse{
  5668. Header: res.Header,
  5669. HTTPStatusCode: res.StatusCode,
  5670. },
  5671. }
  5672. target := &ret
  5673. if err := gensupport.DecodeResponse(target, res); err != nil {
  5674. return nil, err
  5675. }
  5676. return ret, nil
  5677. // {
  5678. // "description": "Cancels an operation. Use the `inspect.operations.get` to check whether the cancellation succeeded or the operation completed despite cancellation.",
  5679. // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}:cancel",
  5680. // "httpMethod": "POST",
  5681. // "id": "dlp.riskAnalysis.operations.cancel",
  5682. // "parameterOrder": [
  5683. // "name"
  5684. // ],
  5685. // "parameters": {
  5686. // "name": {
  5687. // "description": "The name of the operation resource to be cancelled.",
  5688. // "location": "path",
  5689. // "pattern": "^riskAnalysis/operations/[^/]+$",
  5690. // "required": true,
  5691. // "type": "string"
  5692. // }
  5693. // },
  5694. // "path": "v2beta1/{+name}:cancel",
  5695. // "request": {
  5696. // "$ref": "GoogleLongrunningCancelOperationRequest"
  5697. // },
  5698. // "response": {
  5699. // "$ref": "GoogleProtobufEmpty"
  5700. // },
  5701. // "scopes": [
  5702. // "https://www.googleapis.com/auth/cloud-platform"
  5703. // ]
  5704. // }
  5705. }
  5706. // method id "dlp.riskAnalysis.operations.delete":
  5707. type RiskAnalysisOperationsDeleteCall struct {
  5708. s *Service
  5709. name string
  5710. urlParams_ gensupport.URLParams
  5711. ctx_ context.Context
  5712. header_ http.Header
  5713. }
  5714. // Delete: This method is not supported and the server returns
  5715. // `UNIMPLEMENTED`.
  5716. func (r *RiskAnalysisOperationsService) Delete(name string) *RiskAnalysisOperationsDeleteCall {
  5717. c := &RiskAnalysisOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5718. c.name = name
  5719. return c
  5720. }
  5721. // Fields allows partial responses to be retrieved. See
  5722. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5723. // for more information.
  5724. func (c *RiskAnalysisOperationsDeleteCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsDeleteCall {
  5725. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5726. return c
  5727. }
  5728. // Context sets the context to be used in this call's Do method. Any
  5729. // pending HTTP request will be aborted if the provided context is
  5730. // canceled.
  5731. func (c *RiskAnalysisOperationsDeleteCall) Context(ctx context.Context) *RiskAnalysisOperationsDeleteCall {
  5732. c.ctx_ = ctx
  5733. return c
  5734. }
  5735. // Header returns an http.Header that can be modified by the caller to
  5736. // add HTTP headers to the request.
  5737. func (c *RiskAnalysisOperationsDeleteCall) Header() http.Header {
  5738. if c.header_ == nil {
  5739. c.header_ = make(http.Header)
  5740. }
  5741. return c.header_
  5742. }
  5743. func (c *RiskAnalysisOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5744. reqHeaders := make(http.Header)
  5745. for k, v := range c.header_ {
  5746. reqHeaders[k] = v
  5747. }
  5748. reqHeaders.Set("User-Agent", c.s.userAgent())
  5749. var body io.Reader = nil
  5750. c.urlParams_.Set("alt", alt)
  5751. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  5752. urls += "?" + c.urlParams_.Encode()
  5753. req, _ := http.NewRequest("DELETE", urls, body)
  5754. req.Header = reqHeaders
  5755. googleapi.Expand(req.URL, map[string]string{
  5756. "name": c.name,
  5757. })
  5758. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5759. }
  5760. // Do executes the "dlp.riskAnalysis.operations.delete" call.
  5761. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
  5762. // non-2xx status code is an error. Response headers are in either
  5763. // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
  5764. // returned at all) in error.(*googleapi.Error).Header. Use
  5765. // googleapi.IsNotModified to check whether the returned error was
  5766. // because http.StatusNotModified was returned.
  5767. func (c *RiskAnalysisOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  5768. gensupport.SetOptions(c.urlParams_, opts...)
  5769. res, err := c.doRequest("json")
  5770. if res != nil && res.StatusCode == http.StatusNotModified {
  5771. if res.Body != nil {
  5772. res.Body.Close()
  5773. }
  5774. return nil, &googleapi.Error{
  5775. Code: res.StatusCode,
  5776. Header: res.Header,
  5777. }
  5778. }
  5779. if err != nil {
  5780. return nil, err
  5781. }
  5782. defer googleapi.CloseBody(res)
  5783. if err := googleapi.CheckResponse(res); err != nil {
  5784. return nil, err
  5785. }
  5786. ret := &GoogleProtobufEmpty{
  5787. ServerResponse: googleapi.ServerResponse{
  5788. Header: res.Header,
  5789. HTTPStatusCode: res.StatusCode,
  5790. },
  5791. }
  5792. target := &ret
  5793. if err := gensupport.DecodeResponse(target, res); err != nil {
  5794. return nil, err
  5795. }
  5796. return ret, nil
  5797. // {
  5798. // "description": "This method is not supported and the server returns `UNIMPLEMENTED`.",
  5799. // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}",
  5800. // "httpMethod": "DELETE",
  5801. // "id": "dlp.riskAnalysis.operations.delete",
  5802. // "parameterOrder": [
  5803. // "name"
  5804. // ],
  5805. // "parameters": {
  5806. // "name": {
  5807. // "description": "The name of the operation resource to be deleted.",
  5808. // "location": "path",
  5809. // "pattern": "^riskAnalysis/operations/[^/]+$",
  5810. // "required": true,
  5811. // "type": "string"
  5812. // }
  5813. // },
  5814. // "path": "v2beta1/{+name}",
  5815. // "response": {
  5816. // "$ref": "GoogleProtobufEmpty"
  5817. // },
  5818. // "scopes": [
  5819. // "https://www.googleapis.com/auth/cloud-platform"
  5820. // ]
  5821. // }
  5822. }
  5823. // method id "dlp.riskAnalysis.operations.get":
  5824. type RiskAnalysisOperationsGetCall struct {
  5825. s *Service
  5826. name string
  5827. urlParams_ gensupport.URLParams
  5828. ifNoneMatch_ string
  5829. ctx_ context.Context
  5830. header_ http.Header
  5831. }
  5832. // Get: Gets the latest state of a long-running operation. Clients can
  5833. // use this
  5834. // method to poll the operation result at intervals as recommended by
  5835. // the API
  5836. // service.
  5837. func (r *RiskAnalysisOperationsService) Get(name string) *RiskAnalysisOperationsGetCall {
  5838. c := &RiskAnalysisOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5839. c.name = name
  5840. return c
  5841. }
  5842. // Fields allows partial responses to be retrieved. See
  5843. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5844. // for more information.
  5845. func (c *RiskAnalysisOperationsGetCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsGetCall {
  5846. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5847. return c
  5848. }
  5849. // IfNoneMatch sets the optional parameter which makes the operation
  5850. // fail if the object's ETag matches the given value. This is useful for
  5851. // getting updates only after the object has changed since the last
  5852. // request. Use googleapi.IsNotModified to check whether the response
  5853. // error from Do is the result of In-None-Match.
  5854. func (c *RiskAnalysisOperationsGetCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsGetCall {
  5855. c.ifNoneMatch_ = entityTag
  5856. return c
  5857. }
  5858. // Context sets the context to be used in this call's Do method. Any
  5859. // pending HTTP request will be aborted if the provided context is
  5860. // canceled.
  5861. func (c *RiskAnalysisOperationsGetCall) Context(ctx context.Context) *RiskAnalysisOperationsGetCall {
  5862. c.ctx_ = ctx
  5863. return c
  5864. }
  5865. // Header returns an http.Header that can be modified by the caller to
  5866. // add HTTP headers to the request.
  5867. func (c *RiskAnalysisOperationsGetCall) Header() http.Header {
  5868. if c.header_ == nil {
  5869. c.header_ = make(http.Header)
  5870. }
  5871. return c.header_
  5872. }
  5873. func (c *RiskAnalysisOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5874. reqHeaders := make(http.Header)
  5875. for k, v := range c.header_ {
  5876. reqHeaders[k] = v
  5877. }
  5878. reqHeaders.Set("User-Agent", c.s.userAgent())
  5879. if c.ifNoneMatch_ != "" {
  5880. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5881. }
  5882. var body io.Reader = nil
  5883. c.urlParams_.Set("alt", alt)
  5884. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  5885. urls += "?" + c.urlParams_.Encode()
  5886. req, _ := http.NewRequest("GET", urls, body)
  5887. req.Header = reqHeaders
  5888. googleapi.Expand(req.URL, map[string]string{
  5889. "name": c.name,
  5890. })
  5891. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5892. }
  5893. // Do executes the "dlp.riskAnalysis.operations.get" call.
  5894. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  5895. // Any non-2xx status code is an error. Response headers are in either
  5896. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  5897. // was returned at all) in error.(*googleapi.Error).Header. Use
  5898. // googleapi.IsNotModified to check whether the returned error was
  5899. // because http.StatusNotModified was returned.
  5900. func (c *RiskAnalysisOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5901. gensupport.SetOptions(c.urlParams_, opts...)
  5902. res, err := c.doRequest("json")
  5903. if res != nil && res.StatusCode == http.StatusNotModified {
  5904. if res.Body != nil {
  5905. res.Body.Close()
  5906. }
  5907. return nil, &googleapi.Error{
  5908. Code: res.StatusCode,
  5909. Header: res.Header,
  5910. }
  5911. }
  5912. if err != nil {
  5913. return nil, err
  5914. }
  5915. defer googleapi.CloseBody(res)
  5916. if err := googleapi.CheckResponse(res); err != nil {
  5917. return nil, err
  5918. }
  5919. ret := &GoogleLongrunningOperation{
  5920. ServerResponse: googleapi.ServerResponse{
  5921. Header: res.Header,
  5922. HTTPStatusCode: res.StatusCode,
  5923. },
  5924. }
  5925. target := &ret
  5926. if err := gensupport.DecodeResponse(target, res); err != nil {
  5927. return nil, err
  5928. }
  5929. return ret, nil
  5930. // {
  5931. // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
  5932. // "flatPath": "v2beta1/riskAnalysis/operations/{operationsId}",
  5933. // "httpMethod": "GET",
  5934. // "id": "dlp.riskAnalysis.operations.get",
  5935. // "parameterOrder": [
  5936. // "name"
  5937. // ],
  5938. // "parameters": {
  5939. // "name": {
  5940. // "description": "The name of the operation resource.",
  5941. // "location": "path",
  5942. // "pattern": "^riskAnalysis/operations/[^/]+$",
  5943. // "required": true,
  5944. // "type": "string"
  5945. // }
  5946. // },
  5947. // "path": "v2beta1/{+name}",
  5948. // "response": {
  5949. // "$ref": "GoogleLongrunningOperation"
  5950. // },
  5951. // "scopes": [
  5952. // "https://www.googleapis.com/auth/cloud-platform"
  5953. // ]
  5954. // }
  5955. }
  5956. // method id "dlp.riskAnalysis.operations.list":
  5957. type RiskAnalysisOperationsListCall struct {
  5958. s *Service
  5959. name string
  5960. urlParams_ gensupport.URLParams
  5961. ifNoneMatch_ string
  5962. ctx_ context.Context
  5963. header_ http.Header
  5964. }
  5965. // List: Fetches the list of long running operations.
  5966. func (r *RiskAnalysisOperationsService) List(name string) *RiskAnalysisOperationsListCall {
  5967. c := &RiskAnalysisOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5968. c.name = name
  5969. return c
  5970. }
  5971. // Filter sets the optional parameter "filter": Filters by `done`. That
  5972. // is, `done=true` or `done=false`.
  5973. func (c *RiskAnalysisOperationsListCall) Filter(filter string) *RiskAnalysisOperationsListCall {
  5974. c.urlParams_.Set("filter", filter)
  5975. return c
  5976. }
  5977. // PageSize sets the optional parameter "pageSize": The list page size.
  5978. // The maximum allowed value is 256 and the default is 100.
  5979. func (c *RiskAnalysisOperationsListCall) PageSize(pageSize int64) *RiskAnalysisOperationsListCall {
  5980. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5981. return c
  5982. }
  5983. // PageToken sets the optional parameter "pageToken": The standard list
  5984. // page token.
  5985. func (c *RiskAnalysisOperationsListCall) PageToken(pageToken string) *RiskAnalysisOperationsListCall {
  5986. c.urlParams_.Set("pageToken", pageToken)
  5987. return c
  5988. }
  5989. // Fields allows partial responses to be retrieved. See
  5990. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5991. // for more information.
  5992. func (c *RiskAnalysisOperationsListCall) Fields(s ...googleapi.Field) *RiskAnalysisOperationsListCall {
  5993. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5994. return c
  5995. }
  5996. // IfNoneMatch sets the optional parameter which makes the operation
  5997. // fail if the object's ETag matches the given value. This is useful for
  5998. // getting updates only after the object has changed since the last
  5999. // request. Use googleapi.IsNotModified to check whether the response
  6000. // error from Do is the result of In-None-Match.
  6001. func (c *RiskAnalysisOperationsListCall) IfNoneMatch(entityTag string) *RiskAnalysisOperationsListCall {
  6002. c.ifNoneMatch_ = entityTag
  6003. return c
  6004. }
  6005. // Context sets the context to be used in this call's Do method. Any
  6006. // pending HTTP request will be aborted if the provided context is
  6007. // canceled.
  6008. func (c *RiskAnalysisOperationsListCall) Context(ctx context.Context) *RiskAnalysisOperationsListCall {
  6009. c.ctx_ = ctx
  6010. return c
  6011. }
  6012. // Header returns an http.Header that can be modified by the caller to
  6013. // add HTTP headers to the request.
  6014. func (c *RiskAnalysisOperationsListCall) Header() http.Header {
  6015. if c.header_ == nil {
  6016. c.header_ = make(http.Header)
  6017. }
  6018. return c.header_
  6019. }
  6020. func (c *RiskAnalysisOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6021. reqHeaders := make(http.Header)
  6022. for k, v := range c.header_ {
  6023. reqHeaders[k] = v
  6024. }
  6025. reqHeaders.Set("User-Agent", c.s.userAgent())
  6026. if c.ifNoneMatch_ != "" {
  6027. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6028. }
  6029. var body io.Reader = nil
  6030. c.urlParams_.Set("alt", alt)
  6031. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
  6032. urls += "?" + c.urlParams_.Encode()
  6033. req, _ := http.NewRequest("GET", urls, body)
  6034. req.Header = reqHeaders
  6035. googleapi.Expand(req.URL, map[string]string{
  6036. "name": c.name,
  6037. })
  6038. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6039. }
  6040. // Do executes the "dlp.riskAnalysis.operations.list" call.
  6041. // Exactly one of *GoogleLongrunningListOperationsResponse or error will
  6042. // be non-nil. Any non-2xx status code is an error. Response headers are
  6043. // in either
  6044. // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if
  6045. // a response was returned at all) in error.(*googleapi.Error).Header.
  6046. // Use googleapi.IsNotModified to check whether the returned error was
  6047. // because http.StatusNotModified was returned.
  6048. func (c *RiskAnalysisOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  6049. gensupport.SetOptions(c.urlParams_, opts...)
  6050. res, err := c.doRequest("json")
  6051. if res != nil && res.StatusCode == http.StatusNotModified {
  6052. if res.Body != nil {
  6053. res.Body.Close()
  6054. }
  6055. return nil, &googleapi.Error{
  6056. Code: res.StatusCode,
  6057. Header: res.Header,
  6058. }
  6059. }
  6060. if err != nil {
  6061. return nil, err
  6062. }
  6063. defer googleapi.CloseBody(res)
  6064. if err := googleapi.CheckResponse(res); err != nil {
  6065. return nil, err
  6066. }
  6067. ret := &GoogleLongrunningListOperationsResponse{
  6068. ServerResponse: googleapi.ServerResponse{
  6069. Header: res.Header,
  6070. HTTPStatusCode: res.StatusCode,
  6071. },
  6072. }
  6073. target := &ret
  6074. if err := gensupport.DecodeResponse(target, res); err != nil {
  6075. return nil, err
  6076. }
  6077. return ret, nil
  6078. // {
  6079. // "description": "Fetches the list of long running operations.",
  6080. // "flatPath": "v2beta1/riskAnalysis/operations",
  6081. // "httpMethod": "GET",
  6082. // "id": "dlp.riskAnalysis.operations.list",
  6083. // "parameterOrder": [
  6084. // "name"
  6085. // ],
  6086. // "parameters": {
  6087. // "filter": {
  6088. // "description": "Filters by `done`. That is, `done=true` or `done=false`.",
  6089. // "location": "query",
  6090. // "type": "string"
  6091. // },
  6092. // "name": {
  6093. // "description": "The name of the operation's parent resource.",
  6094. // "location": "path",
  6095. // "pattern": "^riskAnalysis/operations$",
  6096. // "required": true,
  6097. // "type": "string"
  6098. // },
  6099. // "pageSize": {
  6100. // "description": "The list page size. The maximum allowed value is 256 and the default is 100.",
  6101. // "format": "int32",
  6102. // "location": "query",
  6103. // "type": "integer"
  6104. // },
  6105. // "pageToken": {
  6106. // "description": "The standard list page token.",
  6107. // "location": "query",
  6108. // "type": "string"
  6109. // }
  6110. // },
  6111. // "path": "v2beta1/{+name}",
  6112. // "response": {
  6113. // "$ref": "GoogleLongrunningListOperationsResponse"
  6114. // },
  6115. // "scopes": [
  6116. // "https://www.googleapis.com/auth/cloud-platform"
  6117. // ]
  6118. // }
  6119. }
  6120. // Pages invokes f for each page of results.
  6121. // A non-nil error returned from f will halt the iteration.
  6122. // The provided context supersedes any context provided to the Context method.
  6123. func (c *RiskAnalysisOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  6124. c.ctx_ = ctx
  6125. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6126. for {
  6127. x, err := c.Do()
  6128. if err != nil {
  6129. return err
  6130. }
  6131. if err := f(x); err != nil {
  6132. return err
  6133. }
  6134. if x.NextPageToken == "" {
  6135. return nil
  6136. }
  6137. c.PageToken(x.NextPageToken)
  6138. }
  6139. }
  6140. // method id "dlp.rootCategories.list":
  6141. type RootCategoriesListCall struct {
  6142. s *Service
  6143. urlParams_ gensupport.URLParams
  6144. ifNoneMatch_ string
  6145. ctx_ context.Context
  6146. header_ http.Header
  6147. }
  6148. // List: Returns the list of root categories of sensitive information.
  6149. func (r *RootCategoriesService) List() *RootCategoriesListCall {
  6150. c := &RootCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6151. return c
  6152. }
  6153. // LanguageCode sets the optional parameter "languageCode": Optional
  6154. // language code for localized friendly category names.
  6155. // If omitted or if localized strings are not available,
  6156. // en-US strings will be returned.
  6157. func (c *RootCategoriesListCall) LanguageCode(languageCode string) *RootCategoriesListCall {
  6158. c.urlParams_.Set("languageCode", languageCode)
  6159. return c
  6160. }
  6161. // Fields allows partial responses to be retrieved. See
  6162. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6163. // for more information.
  6164. func (c *RootCategoriesListCall) Fields(s ...googleapi.Field) *RootCategoriesListCall {
  6165. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6166. return c
  6167. }
  6168. // IfNoneMatch sets the optional parameter which makes the operation
  6169. // fail if the object's ETag matches the given value. This is useful for
  6170. // getting updates only after the object has changed since the last
  6171. // request. Use googleapi.IsNotModified to check whether the response
  6172. // error from Do is the result of In-None-Match.
  6173. func (c *RootCategoriesListCall) IfNoneMatch(entityTag string) *RootCategoriesListCall {
  6174. c.ifNoneMatch_ = entityTag
  6175. return c
  6176. }
  6177. // Context sets the context to be used in this call's Do method. Any
  6178. // pending HTTP request will be aborted if the provided context is
  6179. // canceled.
  6180. func (c *RootCategoriesListCall) Context(ctx context.Context) *RootCategoriesListCall {
  6181. c.ctx_ = ctx
  6182. return c
  6183. }
  6184. // Header returns an http.Header that can be modified by the caller to
  6185. // add HTTP headers to the request.
  6186. func (c *RootCategoriesListCall) Header() http.Header {
  6187. if c.header_ == nil {
  6188. c.header_ = make(http.Header)
  6189. }
  6190. return c.header_
  6191. }
  6192. func (c *RootCategoriesListCall) doRequest(alt string) (*http.Response, error) {
  6193. reqHeaders := make(http.Header)
  6194. for k, v := range c.header_ {
  6195. reqHeaders[k] = v
  6196. }
  6197. reqHeaders.Set("User-Agent", c.s.userAgent())
  6198. if c.ifNoneMatch_ != "" {
  6199. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6200. }
  6201. var body io.Reader = nil
  6202. c.urlParams_.Set("alt", alt)
  6203. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/rootCategories")
  6204. urls += "?" + c.urlParams_.Encode()
  6205. req, _ := http.NewRequest("GET", urls, body)
  6206. req.Header = reqHeaders
  6207. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6208. }
  6209. // Do executes the "dlp.rootCategories.list" call.
  6210. // Exactly one of *GooglePrivacyDlpV2beta1ListRootCategoriesResponse or
  6211. // error will be non-nil. Any non-2xx status code is an error. Response
  6212. // headers are in either
  6213. // *GooglePrivacyDlpV2beta1ListRootCategoriesResponse.ServerResponse.Head
  6214. // er or (if a response was returned at all) in
  6215. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6216. // whether the returned error was because http.StatusNotModified was
  6217. // returned.
  6218. func (c *RootCategoriesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListRootCategoriesResponse, error) {
  6219. gensupport.SetOptions(c.urlParams_, opts...)
  6220. res, err := c.doRequest("json")
  6221. if res != nil && res.StatusCode == http.StatusNotModified {
  6222. if res.Body != nil {
  6223. res.Body.Close()
  6224. }
  6225. return nil, &googleapi.Error{
  6226. Code: res.StatusCode,
  6227. Header: res.Header,
  6228. }
  6229. }
  6230. if err != nil {
  6231. return nil, err
  6232. }
  6233. defer googleapi.CloseBody(res)
  6234. if err := googleapi.CheckResponse(res); err != nil {
  6235. return nil, err
  6236. }
  6237. ret := &GooglePrivacyDlpV2beta1ListRootCategoriesResponse{
  6238. ServerResponse: googleapi.ServerResponse{
  6239. Header: res.Header,
  6240. HTTPStatusCode: res.StatusCode,
  6241. },
  6242. }
  6243. target := &ret
  6244. if err := gensupport.DecodeResponse(target, res); err != nil {
  6245. return nil, err
  6246. }
  6247. return ret, nil
  6248. // {
  6249. // "description": "Returns the list of root categories of sensitive information.",
  6250. // "flatPath": "v2beta1/rootCategories",
  6251. // "httpMethod": "GET",
  6252. // "id": "dlp.rootCategories.list",
  6253. // "parameterOrder": [],
  6254. // "parameters": {
  6255. // "languageCode": {
  6256. // "description": "Optional language code for localized friendly category names.\nIf omitted or if localized strings are not available,\nen-US strings will be returned.",
  6257. // "location": "query",
  6258. // "type": "string"
  6259. // }
  6260. // },
  6261. // "path": "v2beta1/rootCategories",
  6262. // "response": {
  6263. // "$ref": "GooglePrivacyDlpV2beta1ListRootCategoriesResponse"
  6264. // },
  6265. // "scopes": [
  6266. // "https://www.googleapis.com/auth/cloud-platform"
  6267. // ]
  6268. // }
  6269. }
  6270. // method id "dlp.rootCategories.infoTypes.list":
  6271. type RootCategoriesInfoTypesListCall struct {
  6272. s *Service
  6273. category string
  6274. urlParams_ gensupport.URLParams
  6275. ifNoneMatch_ string
  6276. ctx_ context.Context
  6277. header_ http.Header
  6278. }
  6279. // List: Returns sensitive information types for given category.
  6280. func (r *RootCategoriesInfoTypesService) List(category string) *RootCategoriesInfoTypesListCall {
  6281. c := &RootCategoriesInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6282. c.category = category
  6283. return c
  6284. }
  6285. // LanguageCode sets the optional parameter "languageCode": Optional
  6286. // BCP-47 language code for localized info type friendly
  6287. // names. If omitted, or if localized strings are not available,
  6288. // en-US strings will be returned.
  6289. func (c *RootCategoriesInfoTypesListCall) LanguageCode(languageCode string) *RootCategoriesInfoTypesListCall {
  6290. c.urlParams_.Set("languageCode", languageCode)
  6291. return c
  6292. }
  6293. // Fields allows partial responses to be retrieved. See
  6294. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6295. // for more information.
  6296. func (c *RootCategoriesInfoTypesListCall) Fields(s ...googleapi.Field) *RootCategoriesInfoTypesListCall {
  6297. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6298. return c
  6299. }
  6300. // IfNoneMatch sets the optional parameter which makes the operation
  6301. // fail if the object's ETag matches the given value. This is useful for
  6302. // getting updates only after the object has changed since the last
  6303. // request. Use googleapi.IsNotModified to check whether the response
  6304. // error from Do is the result of In-None-Match.
  6305. func (c *RootCategoriesInfoTypesListCall) IfNoneMatch(entityTag string) *RootCategoriesInfoTypesListCall {
  6306. c.ifNoneMatch_ = entityTag
  6307. return c
  6308. }
  6309. // Context sets the context to be used in this call's Do method. Any
  6310. // pending HTTP request will be aborted if the provided context is
  6311. // canceled.
  6312. func (c *RootCategoriesInfoTypesListCall) Context(ctx context.Context) *RootCategoriesInfoTypesListCall {
  6313. c.ctx_ = ctx
  6314. return c
  6315. }
  6316. // Header returns an http.Header that can be modified by the caller to
  6317. // add HTTP headers to the request.
  6318. func (c *RootCategoriesInfoTypesListCall) Header() http.Header {
  6319. if c.header_ == nil {
  6320. c.header_ = make(http.Header)
  6321. }
  6322. return c.header_
  6323. }
  6324. func (c *RootCategoriesInfoTypesListCall) doRequest(alt string) (*http.Response, error) {
  6325. reqHeaders := make(http.Header)
  6326. for k, v := range c.header_ {
  6327. reqHeaders[k] = v
  6328. }
  6329. reqHeaders.Set("User-Agent", c.s.userAgent())
  6330. if c.ifNoneMatch_ != "" {
  6331. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6332. }
  6333. var body io.Reader = nil
  6334. c.urlParams_.Set("alt", alt)
  6335. urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/rootCategories/{+category}/infoTypes")
  6336. urls += "?" + c.urlParams_.Encode()
  6337. req, _ := http.NewRequest("GET", urls, body)
  6338. req.Header = reqHeaders
  6339. googleapi.Expand(req.URL, map[string]string{
  6340. "category": c.category,
  6341. })
  6342. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6343. }
  6344. // Do executes the "dlp.rootCategories.infoTypes.list" call.
  6345. // Exactly one of *GooglePrivacyDlpV2beta1ListInfoTypesResponse or error
  6346. // will be non-nil. Any non-2xx status code is an error. Response
  6347. // headers are in either
  6348. // *GooglePrivacyDlpV2beta1ListInfoTypesResponse.ServerResponse.Header
  6349. // or (if a response was returned at all) in
  6350. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6351. // whether the returned error was because http.StatusNotModified was
  6352. // returned.
  6353. func (c *RootCategoriesInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2beta1ListInfoTypesResponse, error) {
  6354. gensupport.SetOptions(c.urlParams_, opts...)
  6355. res, err := c.doRequest("json")
  6356. if res != nil && res.StatusCode == http.StatusNotModified {
  6357. if res.Body != nil {
  6358. res.Body.Close()
  6359. }
  6360. return nil, &googleapi.Error{
  6361. Code: res.StatusCode,
  6362. Header: res.Header,
  6363. }
  6364. }
  6365. if err != nil {
  6366. return nil, err
  6367. }
  6368. defer googleapi.CloseBody(res)
  6369. if err := googleapi.CheckResponse(res); err != nil {
  6370. return nil, err
  6371. }
  6372. ret := &GooglePrivacyDlpV2beta1ListInfoTypesResponse{
  6373. ServerResponse: googleapi.ServerResponse{
  6374. Header: res.Header,
  6375. HTTPStatusCode: res.StatusCode,
  6376. },
  6377. }
  6378. target := &ret
  6379. if err := gensupport.DecodeResponse(target, res); err != nil {
  6380. return nil, err
  6381. }
  6382. return ret, nil
  6383. // {
  6384. // "description": "Returns sensitive information types for given category.",
  6385. // "flatPath": "v2beta1/rootCategories/{rootCategoriesId}/infoTypes",
  6386. // "httpMethod": "GET",
  6387. // "id": "dlp.rootCategories.infoTypes.list",
  6388. // "parameterOrder": [
  6389. // "category"
  6390. // ],
  6391. // "parameters": {
  6392. // "category": {
  6393. // "description": "Category name as returned by ListRootCategories.",
  6394. // "location": "path",
  6395. // "pattern": "^[^/]+$",
  6396. // "required": true,
  6397. // "type": "string"
  6398. // },
  6399. // "languageCode": {
  6400. // "description": "Optional BCP-47 language code for localized info type friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.",
  6401. // "location": "query",
  6402. // "type": "string"
  6403. // }
  6404. // },
  6405. // "path": "v2beta1/rootCategories/{+category}/infoTypes",
  6406. // "response": {
  6407. // "$ref": "GooglePrivacyDlpV2beta1ListInfoTypesResponse"
  6408. // },
  6409. // "scopes": [
  6410. // "https://www.googleapis.com/auth/cloud-platform"
  6411. // ]
  6412. // }
  6413. }