1// Copyright 2019 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package dlp provides access to the Cloud Data Loss Prevention (DLP) API. 8// 9// This package is DEPRECATED. Use package cloud.google.com/go/dlp/apiv2 instead. 10// 11// For product documentation, see: https://cloud.google.com/dlp/docs/ 12// 13// Creating a client 14// 15// Usage example: 16// 17// import "google.golang.org/api/dlp/v2" 18// ... 19// ctx := context.Background() 20// dlpService, err := dlp.NewService(ctx) 21// 22// In this example, Google Application Default Credentials are used for authentication. 23// 24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 25// 26// Other authentication options 27// 28// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 29// 30// dlpService, err := dlp.NewService(ctx, option.WithAPIKey("AIza...")) 31// 32// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 33// 34// config := &oauth2.Config{...} 35// // ... 36// token, err := config.Exchange(ctx, ...) 37// dlpService, err := dlp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 38// 39// See https://godoc.org/google.golang.org/api/option/ for details on options. 40package dlp // import "google.golang.org/api/dlp/v2" 41 42import ( 43 "bytes" 44 "context" 45 "encoding/json" 46 "errors" 47 "fmt" 48 "io" 49 "net/http" 50 "net/url" 51 "strconv" 52 "strings" 53 54 googleapi "google.golang.org/api/googleapi" 55 gensupport "google.golang.org/api/internal/gensupport" 56 option "google.golang.org/api/option" 57 htransport "google.golang.org/api/transport/http" 58) 59 60// Always reference these packages, just in case the auto-generated code 61// below doesn't. 62var _ = bytes.NewBuffer 63var _ = strconv.Itoa 64var _ = fmt.Sprintf 65var _ = json.NewDecoder 66var _ = io.Copy 67var _ = url.Parse 68var _ = gensupport.MarshalJSON 69var _ = googleapi.Version 70var _ = errors.New 71var _ = strings.Replace 72var _ = context.Canceled 73 74const apiId = "dlp:v2" 75const apiName = "dlp" 76const apiVersion = "v2" 77const basePath = "https://dlp.googleapis.com/" 78 79// OAuth2 scopes used by this API. 80const ( 81 // View and manage your data across Google Cloud Platform services 82 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 83) 84 85// NewService creates a new Service. 86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 87 scopesOption := option.WithScopes( 88 "https://www.googleapis.com/auth/cloud-platform", 89 ) 90 // NOTE: prepend, so we don't override user-specified scopes. 91 opts = append([]option.ClientOption{scopesOption}, opts...) 92 client, endpoint, err := htransport.NewClient(ctx, opts...) 93 if err != nil { 94 return nil, err 95 } 96 s, err := New(client) 97 if err != nil { 98 return nil, err 99 } 100 if endpoint != "" { 101 s.BasePath = endpoint 102 } 103 return s, nil 104} 105 106// New creates a new Service. It uses the provided http.Client for requests. 107// 108// Deprecated: please use NewService instead. 109// To provide a custom HTTP client, use option.WithHTTPClient. 110// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 111func New(client *http.Client) (*Service, error) { 112 if client == nil { 113 return nil, errors.New("client is nil") 114 } 115 s := &Service{client: client, BasePath: basePath} 116 s.InfoTypes = NewInfoTypesService(s) 117 s.Locations = NewLocationsService(s) 118 s.Organizations = NewOrganizationsService(s) 119 s.Projects = NewProjectsService(s) 120 return s, nil 121} 122 123type Service struct { 124 client *http.Client 125 BasePath string // API endpoint base URL 126 UserAgent string // optional additional User-Agent fragment 127 128 InfoTypes *InfoTypesService 129 130 Locations *LocationsService 131 132 Organizations *OrganizationsService 133 134 Projects *ProjectsService 135} 136 137func (s *Service) userAgent() string { 138 if s.UserAgent == "" { 139 return googleapi.UserAgent 140 } 141 return googleapi.UserAgent + " " + s.UserAgent 142} 143 144func NewInfoTypesService(s *Service) *InfoTypesService { 145 rs := &InfoTypesService{s: s} 146 return rs 147} 148 149type InfoTypesService struct { 150 s *Service 151} 152 153func NewLocationsService(s *Service) *LocationsService { 154 rs := &LocationsService{s: s} 155 rs.InfoTypes = NewLocationsInfoTypesService(s) 156 return rs 157} 158 159type LocationsService struct { 160 s *Service 161 162 InfoTypes *LocationsInfoTypesService 163} 164 165func NewLocationsInfoTypesService(s *Service) *LocationsInfoTypesService { 166 rs := &LocationsInfoTypesService{s: s} 167 return rs 168} 169 170type LocationsInfoTypesService struct { 171 s *Service 172} 173 174func NewOrganizationsService(s *Service) *OrganizationsService { 175 rs := &OrganizationsService{s: s} 176 rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s) 177 rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s) 178 rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s) 179 return rs 180} 181 182type OrganizationsService struct { 183 s *Service 184 185 DeidentifyTemplates *OrganizationsDeidentifyTemplatesService 186 187 InspectTemplates *OrganizationsInspectTemplatesService 188 189 StoredInfoTypes *OrganizationsStoredInfoTypesService 190} 191 192func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService { 193 rs := &OrganizationsDeidentifyTemplatesService{s: s} 194 return rs 195} 196 197type OrganizationsDeidentifyTemplatesService struct { 198 s *Service 199} 200 201func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService { 202 rs := &OrganizationsInspectTemplatesService{s: s} 203 return rs 204} 205 206type OrganizationsInspectTemplatesService struct { 207 s *Service 208} 209 210func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService { 211 rs := &OrganizationsStoredInfoTypesService{s: s} 212 return rs 213} 214 215type OrganizationsStoredInfoTypesService struct { 216 s *Service 217} 218 219func NewProjectsService(s *Service) *ProjectsService { 220 rs := &ProjectsService{s: s} 221 rs.Content = NewProjectsContentService(s) 222 rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s) 223 rs.DlpJobs = NewProjectsDlpJobsService(s) 224 rs.Image = NewProjectsImageService(s) 225 rs.InspectTemplates = NewProjectsInspectTemplatesService(s) 226 rs.JobTriggers = NewProjectsJobTriggersService(s) 227 rs.Locations = NewProjectsLocationsService(s) 228 rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s) 229 return rs 230} 231 232type ProjectsService struct { 233 s *Service 234 235 Content *ProjectsContentService 236 237 DeidentifyTemplates *ProjectsDeidentifyTemplatesService 238 239 DlpJobs *ProjectsDlpJobsService 240 241 Image *ProjectsImageService 242 243 InspectTemplates *ProjectsInspectTemplatesService 244 245 JobTriggers *ProjectsJobTriggersService 246 247 Locations *ProjectsLocationsService 248 249 StoredInfoTypes *ProjectsStoredInfoTypesService 250} 251 252func NewProjectsContentService(s *Service) *ProjectsContentService { 253 rs := &ProjectsContentService{s: s} 254 return rs 255} 256 257type ProjectsContentService struct { 258 s *Service 259} 260 261func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService { 262 rs := &ProjectsDeidentifyTemplatesService{s: s} 263 return rs 264} 265 266type ProjectsDeidentifyTemplatesService struct { 267 s *Service 268} 269 270func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService { 271 rs := &ProjectsDlpJobsService{s: s} 272 return rs 273} 274 275type ProjectsDlpJobsService struct { 276 s *Service 277} 278 279func NewProjectsImageService(s *Service) *ProjectsImageService { 280 rs := &ProjectsImageService{s: s} 281 return rs 282} 283 284type ProjectsImageService struct { 285 s *Service 286} 287 288func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService { 289 rs := &ProjectsInspectTemplatesService{s: s} 290 return rs 291} 292 293type ProjectsInspectTemplatesService struct { 294 s *Service 295} 296 297func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService { 298 rs := &ProjectsJobTriggersService{s: s} 299 return rs 300} 301 302type ProjectsJobTriggersService struct { 303 s *Service 304} 305 306func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 307 rs := &ProjectsLocationsService{s: s} 308 rs.Content = NewProjectsLocationsContentService(s) 309 rs.Image = NewProjectsLocationsImageService(s) 310 return rs 311} 312 313type ProjectsLocationsService struct { 314 s *Service 315 316 Content *ProjectsLocationsContentService 317 318 Image *ProjectsLocationsImageService 319} 320 321func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { 322 rs := &ProjectsLocationsContentService{s: s} 323 return rs 324} 325 326type ProjectsLocationsContentService struct { 327 s *Service 328} 329 330func NewProjectsLocationsImageService(s *Service) *ProjectsLocationsImageService { 331 rs := &ProjectsLocationsImageService{s: s} 332 return rs 333} 334 335type ProjectsLocationsImageService struct { 336 s *Service 337} 338 339func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService { 340 rs := &ProjectsStoredInfoTypesService{s: s} 341 return rs 342} 343 344type ProjectsStoredInfoTypesService struct { 345 s *Service 346} 347 348// GooglePrivacyDlpV2Action: A task to execute on the completion of a 349// job. 350// See https://cloud.google.com/dlp/docs/concepts-actions to learn more. 351type GooglePrivacyDlpV2Action struct { 352 // JobNotificationEmails: Enable email notification to project owners 353 // and editors on job's 354 // completion/failure. 355 JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` 356 357 // PubSub: Publish a notification to a pubsub topic. 358 PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"` 359 360 // PublishFindingsToCloudDataCatalog: Publish findings to Cloud Datahub. 361 PublishFindingsToCloudDataCatalog *GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog `json:"publishFindingsToCloudDataCatalog,omitempty"` 362 363 // PublishSummaryToCscc: Publish summary to Cloud Security Command 364 // Center (Alpha). 365 PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"` 366 367 // PublishToStackdriver: Enable Stackdriver metric 368 // dlp.googleapis.com/finding_count 369 PublishToStackdriver *GooglePrivacyDlpV2PublishToStackdriver `json:"publishToStackdriver,omitempty"` 370 371 // SaveFindings: Save resulting findings in a provided location. 372 SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"` 373 374 // ForceSendFields is a list of field names (e.g. 375 // "JobNotificationEmails") to unconditionally include in API requests. 376 // By default, fields with empty values are omitted from API requests. 377 // However, any non-pointer, non-interface field appearing in 378 // ForceSendFields will be sent to the server regardless of whether the 379 // field is empty or not. This may be used to include empty fields in 380 // Patch requests. 381 ForceSendFields []string `json:"-"` 382 383 // NullFields is a list of field names (e.g. "JobNotificationEmails") to 384 // include in API requests with the JSON null value. By default, fields 385 // with empty values are omitted from API requests. However, any field 386 // with an empty value appearing in NullFields will be sent to the 387 // server as null. It is an error if a field in this list has a 388 // non-empty value. This may be used to include null fields in Patch 389 // requests. 390 NullFields []string `json:"-"` 391} 392 393func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) { 394 type NoMethod GooglePrivacyDlpV2Action 395 raw := NoMethod(*s) 396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 397} 398 399// GooglePrivacyDlpV2ActivateJobTriggerRequest: Request message for 400// ActivateJobTrigger. 401type GooglePrivacyDlpV2ActivateJobTriggerRequest struct { 402} 403 404// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk 405// analysis operation request. 406type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct { 407 CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` 408 409 DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"` 410 411 KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"` 412 413 KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"` 414 415 LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"` 416 417 NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"` 418 419 // RequestedPrivacyMetric: Privacy metric to compute. 420 RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` 421 422 // RequestedSourceTable: Input dataset to compute metrics over. 423 RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"` 424 425 // ForceSendFields is a list of field names (e.g. 426 // "CategoricalStatsResult") to unconditionally include in API requests. 427 // By default, fields with empty values are omitted from API requests. 428 // However, any non-pointer, non-interface field appearing in 429 // ForceSendFields will be sent to the server regardless of whether the 430 // field is empty or not. This may be used to include empty fields in 431 // Patch requests. 432 ForceSendFields []string `json:"-"` 433 434 // NullFields is a list of field names (e.g. "CategoricalStatsResult") 435 // to include in API requests with the JSON null value. By default, 436 // fields with empty values are omitted from API requests. However, any 437 // field with an empty value appearing in NullFields will be sent to the 438 // server as null. It is an error if a field in this list has a 439 // non-empty value. This may be used to include null fields in Patch 440 // requests. 441 NullFields []string `json:"-"` 442} 443 444func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) { 445 type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails 446 raw := NoMethod(*s) 447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 448} 449 450// GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains 451// statistical information on the relative 452// frequency of different quasi-identifiers values. It has one or 453// several 454// quasi-identifiers columns, and one column that indicates the 455// relative 456// frequency of each quasi-identifier tuple. 457// If a tuple is present in the data but not in the auxiliary table, 458// the 459// corresponding relative frequency is assumed to be zero (and thus, 460// the 461// tuple is highly reidentifiable). 462type GooglePrivacyDlpV2AuxiliaryTable struct { 463 // QuasiIds: Quasi-identifier columns. [required] 464 QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"` 465 466 // RelativeFrequency: The relative frequency column must contain a 467 // floating-point number 468 // between 0 and 1 (inclusive). Null values are assumed to be 469 // zero. 470 // [required] 471 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 472 473 // Table: Auxiliary table location. [required] 474 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 475 476 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 477 // unconditionally include in API requests. By default, fields with 478 // empty values are omitted from API requests. However, any non-pointer, 479 // non-interface field appearing in ForceSendFields will be sent to the 480 // server regardless of whether the field is empty or not. This may be 481 // used to include empty fields in Patch requests. 482 ForceSendFields []string `json:"-"` 483 484 // NullFields is a list of field names (e.g. "QuasiIds") to include in 485 // API requests with the JSON null value. By default, fields with empty 486 // values are omitted from API requests. However, any field with an 487 // empty value appearing in NullFields will be sent to the server as 488 // null. It is an error if a field in this list has a non-empty value. 489 // This may be used to include null fields in Patch requests. 490 NullFields []string `json:"-"` 491} 492 493func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) { 494 type NoMethod GooglePrivacyDlpV2AuxiliaryTable 495 raw := NoMethod(*s) 496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 497} 498 499// GooglePrivacyDlpV2BigQueryField: Message defining a field of a 500// BigQuery table. 501type GooglePrivacyDlpV2BigQueryField struct { 502 // Field: Designated field in the BigQuery table. 503 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 504 505 // Table: Source table of the field. 506 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 507 508 // ForceSendFields is a list of field names (e.g. "Field") to 509 // unconditionally include in API requests. By default, fields with 510 // empty values are omitted from API requests. However, any non-pointer, 511 // non-interface field appearing in ForceSendFields will be sent to the 512 // server regardless of whether the field is empty or not. This may be 513 // used to include empty fields in Patch requests. 514 ForceSendFields []string `json:"-"` 515 516 // NullFields is a list of field names (e.g. "Field") to include in API 517 // requests with the JSON null value. By default, fields with empty 518 // values are omitted from API requests. However, any field with an 519 // empty value appearing in NullFields will be sent to the server as 520 // null. It is an error if a field in this list has a non-empty value. 521 // This may be used to include null fields in Patch requests. 522 NullFields []string `json:"-"` 523} 524 525func (s *GooglePrivacyDlpV2BigQueryField) MarshalJSON() ([]byte, error) { 526 type NoMethod GooglePrivacyDlpV2BigQueryField 527 raw := NoMethod(*s) 528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 529} 530 531// GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in 532// BigQuery table. 533type GooglePrivacyDlpV2BigQueryKey struct { 534 // RowNumber: Absolute number of the row from the beginning of the table 535 // at the time 536 // of scanning. 537 RowNumber int64 `json:"rowNumber,omitempty,string"` 538 539 // TableReference: Complete BigQuery table reference. 540 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 541 542 // ForceSendFields is a list of field names (e.g. "RowNumber") to 543 // unconditionally include in API requests. By default, fields with 544 // empty values are omitted from API requests. However, any non-pointer, 545 // non-interface field appearing in ForceSendFields will be sent to the 546 // server regardless of whether the field is empty or not. This may be 547 // used to include empty fields in Patch requests. 548 ForceSendFields []string `json:"-"` 549 550 // NullFields is a list of field names (e.g. "RowNumber") to include in 551 // API requests with the JSON null value. By default, fields with empty 552 // values are omitted from API requests. However, any field with an 553 // empty value appearing in NullFields will be sent to the server as 554 // null. It is an error if a field in this list has a non-empty value. 555 // This may be used to include null fields in Patch requests. 556 NullFields []string `json:"-"` 557} 558 559func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) { 560 type NoMethod GooglePrivacyDlpV2BigQueryKey 561 raw := NoMethod(*s) 562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 563} 564 565// GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table 566// and row identifiers. 567type GooglePrivacyDlpV2BigQueryOptions struct { 568 // ExcludedFields: References to fields excluded from scanning. This 569 // allows you to skip 570 // inspection of entire columns which you know have no findings. 571 ExcludedFields []*GooglePrivacyDlpV2FieldId `json:"excludedFields,omitempty"` 572 573 // IdentifyingFields: References to fields uniquely identifying rows 574 // within the table. 575 // Nested fields in the format, like `person.birthdate.year`, are 576 // allowed. 577 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 578 579 // RowsLimit: Max number of rows to scan. If the table has more rows 580 // than this value, the 581 // rest of the rows are omitted. If not set, or if set to 0, all rows 582 // will be 583 // scanned. Only one of rows_limit and rows_limit_percent can be 584 // specified. 585 // Cannot be used in conjunction with TimespanConfig. 586 RowsLimit int64 `json:"rowsLimit,omitempty,string"` 587 588 // RowsLimitPercent: Max percentage of rows to scan. The rest are 589 // omitted. The number of rows 590 // scanned is rounded down. Must be between 0 and 100, inclusively. Both 591 // 0 and 592 // 100 means no limit. Defaults to 0. Only one of rows_limit 593 // and 594 // rows_limit_percent can be specified. Cannot be used in conjunction 595 // with 596 // TimespanConfig. 597 RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"` 598 599 // Possible values: 600 // "SAMPLE_METHOD_UNSPECIFIED" 601 // "TOP" - Scan from the top (default). 602 // "RANDOM_START" - Randomly pick the row to start scanning. The 603 // scanned rows are contiguous. 604 SampleMethod string `json:"sampleMethod,omitempty"` 605 606 // TableReference: Complete BigQuery table reference. 607 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 608 609 // ForceSendFields is a list of field names (e.g. "ExcludedFields") to 610 // unconditionally include in API requests. By default, fields with 611 // empty values are omitted from API requests. However, any non-pointer, 612 // non-interface field appearing in ForceSendFields will be sent to the 613 // server regardless of whether the field is empty or not. This may be 614 // used to include empty fields in Patch requests. 615 ForceSendFields []string `json:"-"` 616 617 // NullFields is a list of field names (e.g. "ExcludedFields") to 618 // include in API requests with the JSON null value. By default, fields 619 // with empty values are omitted from API requests. However, any field 620 // with an empty value appearing in NullFields will be sent to the 621 // server as null. It is an error if a field in this list has a 622 // non-empty value. This may be used to include null fields in Patch 623 // requests. 624 NullFields []string `json:"-"` 625} 626 627func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) { 628 type NoMethod GooglePrivacyDlpV2BigQueryOptions 629 raw := NoMethod(*s) 630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 631} 632 633// GooglePrivacyDlpV2BigQueryTable: Message defining the location of a 634// BigQuery table. A table is uniquely 635// identified by its project_id, dataset_id, and table_name. Within a 636// query 637// a table is often referenced with a string in the format 638// of: 639// `<project_id>:<dataset_id>.<table_id>` 640// or 641// `<project_id>.<dataset_id>.<table_id>`. 642type GooglePrivacyDlpV2BigQueryTable struct { 643 // DatasetId: Dataset ID of the table. 644 DatasetId string `json:"datasetId,omitempty"` 645 646 // ProjectId: The Google Cloud Platform project ID of the project 647 // containing the table. 648 // If omitted, project ID is inferred from the API call. 649 ProjectId string `json:"projectId,omitempty"` 650 651 // TableId: Name of the table. 652 TableId string `json:"tableId,omitempty"` 653 654 // ForceSendFields is a list of field names (e.g. "DatasetId") to 655 // unconditionally include in API requests. By default, fields with 656 // empty values are omitted from API requests. However, any non-pointer, 657 // non-interface field appearing in ForceSendFields will be sent to the 658 // server regardless of whether the field is empty or not. This may be 659 // used to include empty fields in Patch requests. 660 ForceSendFields []string `json:"-"` 661 662 // NullFields is a list of field names (e.g. "DatasetId") to include in 663 // API requests with the JSON null value. By default, fields with empty 664 // values are omitted from API requests. However, any field with an 665 // empty value appearing in NullFields will be sent to the server as 666 // null. It is an error if a field in this list has a non-empty value. 667 // This may be used to include null fields in Patch requests. 668 NullFields []string `json:"-"` 669} 670 671func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) { 672 type NoMethod GooglePrivacyDlpV2BigQueryTable 673 raw := NoMethod(*s) 674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 675} 676 677// GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected 678// text within an image. 679type GooglePrivacyDlpV2BoundingBox struct { 680 // Height: Height of the bounding box in pixels. 681 Height int64 `json:"height,omitempty"` 682 683 // Left: Left coordinate of the bounding box. (0,0) is upper left. 684 Left int64 `json:"left,omitempty"` 685 686 // Top: Top coordinate of the bounding box. (0,0) is upper left. 687 Top int64 `json:"top,omitempty"` 688 689 // Width: Width of the bounding box in pixels. 690 Width int64 `json:"width,omitempty"` 691 692 // ForceSendFields is a list of field names (e.g. "Height") to 693 // unconditionally include in API requests. By default, fields with 694 // empty values are omitted from API requests. However, any non-pointer, 695 // non-interface field appearing in ForceSendFields will be sent to the 696 // server regardless of whether the field is empty or not. This may be 697 // used to include empty fields in Patch requests. 698 ForceSendFields []string `json:"-"` 699 700 // NullFields is a list of field names (e.g. "Height") to include in API 701 // requests with the JSON null value. By default, fields with empty 702 // values are omitted from API requests. However, any field with an 703 // empty value appearing in NullFields will be sent to the server as 704 // null. It is an error if a field in this list has a non-empty value. 705 // This may be used to include null fields in Patch requests. 706 NullFields []string `json:"-"` 707} 708 709func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) { 710 type NoMethod GooglePrivacyDlpV2BoundingBox 711 raw := NoMethod(*s) 712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 713} 714 715// GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along 716// with replacement values. 717type GooglePrivacyDlpV2Bucket struct { 718 // Max: Upper bound of the range, exclusive; type must match min. 719 Max *GooglePrivacyDlpV2Value `json:"max,omitempty"` 720 721 // Min: Lower bound of the range, inclusive. Type should be the same as 722 // max if 723 // used. 724 Min *GooglePrivacyDlpV2Value `json:"min,omitempty"` 725 726 // ReplacementValue: Replacement value for this bucket. If not 727 // provided 728 // the default behavior will be to hyphenate the min-max range. 729 ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"` 730 731 // ForceSendFields is a list of field names (e.g. "Max") to 732 // unconditionally include in API requests. By default, fields with 733 // empty values are omitted from API requests. However, any non-pointer, 734 // non-interface field appearing in ForceSendFields will be sent to the 735 // server regardless of whether the field is empty or not. This may be 736 // used to include empty fields in Patch requests. 737 ForceSendFields []string `json:"-"` 738 739 // NullFields is a list of field names (e.g. "Max") to include in API 740 // requests with the JSON null value. By default, fields with empty 741 // values are omitted from API requests. However, any field with an 742 // empty value appearing in NullFields will be sent to the server as 743 // null. It is an error if a field in this list has a non-empty value. 744 // This may be used to include null fields in Patch requests. 745 NullFields []string `json:"-"` 746} 747 748func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) { 749 type NoMethod GooglePrivacyDlpV2Bucket 750 raw := NoMethod(*s) 751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 752} 753 754// GooglePrivacyDlpV2BucketingConfig: Generalization function that 755// buckets values based on ranges. The ranges and 756// replacement values are dynamically provided by the user for custom 757// behavior, 758// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH 759// This can be used on 760// data of type: number, long, string, timestamp. 761// If the bound `Value` type differs from the type of data being 762// transformed, we 763// will first attempt converting the type of the data to be transformed 764// to match 765// the type of the bound before comparing. 766// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn 767// more. 768type GooglePrivacyDlpV2BucketingConfig struct { 769 // Buckets: Set of buckets. Ranges must be non-overlapping. 770 Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"` 771 772 // ForceSendFields is a list of field names (e.g. "Buckets") to 773 // unconditionally include in API requests. By default, fields with 774 // empty values are omitted from API requests. However, any non-pointer, 775 // non-interface field appearing in ForceSendFields will be sent to the 776 // server regardless of whether the field is empty or not. This may be 777 // used to include empty fields in Patch requests. 778 ForceSendFields []string `json:"-"` 779 780 // NullFields is a list of field names (e.g. "Buckets") to include in 781 // API requests with the JSON null value. By default, fields with empty 782 // values are omitted from API requests. However, any field with an 783 // empty value appearing in NullFields will be sent to the server as 784 // null. It is an error if a field in this list has a non-empty value. 785 // This may be used to include null fields in Patch requests. 786 NullFields []string `json:"-"` 787} 788 789func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) { 790 type NoMethod GooglePrivacyDlpV2BucketingConfig 791 raw := NoMethod(*s) 792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 793} 794 795// GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or 796// redact. 797type GooglePrivacyDlpV2ByteContentItem struct { 798 // Data: Content data to inspect or redact. 799 Data string `json:"data,omitempty"` 800 801 // Type: The type of data stored in the bytes string. Default will be 802 // TEXT_UTF8. 803 // 804 // Possible values: 805 // "BYTES_TYPE_UNSPECIFIED" 806 // "IMAGE" 807 // "IMAGE_JPEG" 808 // "IMAGE_BMP" 809 // "IMAGE_PNG" 810 // "IMAGE_SVG" 811 // "TEXT_UTF8" 812 // "AVRO" 813 Type string `json:"type,omitempty"` 814 815 // ForceSendFields is a list of field names (e.g. "Data") to 816 // unconditionally include in API requests. By default, fields with 817 // empty values are omitted from API requests. However, any non-pointer, 818 // non-interface field appearing in ForceSendFields will be sent to the 819 // server regardless of whether the field is empty or not. This may be 820 // used to include empty fields in Patch requests. 821 ForceSendFields []string `json:"-"` 822 823 // NullFields is a list of field names (e.g. "Data") to include in API 824 // requests with the JSON null value. By default, fields with empty 825 // values are omitted from API requests. However, any field with an 826 // empty value appearing in NullFields will be sent to the server as 827 // null. It is an error if a field in this list has a non-empty value. 828 // This may be used to include null fields in Patch requests. 829 NullFields []string `json:"-"` 830} 831 832func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) { 833 type NoMethod GooglePrivacyDlpV2ByteContentItem 834 raw := NoMethod(*s) 835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 836} 837 838// GooglePrivacyDlpV2CancelDlpJobRequest: The request message for 839// canceling a DLP job. 840type GooglePrivacyDlpV2CancelDlpJobRequest struct { 841} 842 843// GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats 844// over an individual column, including 845// number of distinct values and value count distribution. 846type GooglePrivacyDlpV2CategoricalStatsConfig struct { 847 // Field: Field to compute categorical stats on. All column types 848 // are 849 // supported except for arrays and structs. However, it may be 850 // more 851 // informative to use NumericalStats when the field type is 852 // supported, 853 // depending on the data. 854 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 855 856 // ForceSendFields is a list of field names (e.g. "Field") to 857 // unconditionally include in API requests. By default, fields with 858 // empty values are omitted from API requests. However, any non-pointer, 859 // non-interface field appearing in ForceSendFields will be sent to the 860 // server regardless of whether the field is empty or not. This may be 861 // used to include empty fields in Patch requests. 862 ForceSendFields []string `json:"-"` 863 864 // NullFields is a list of field names (e.g. "Field") to include in API 865 // requests with the JSON null value. By default, fields with empty 866 // values are omitted from API requests. However, any field with an 867 // empty value appearing in NullFields will be sent to the server as 868 // null. It is an error if a field in this list has a non-empty value. 869 // This may be used to include null fields in Patch requests. 870 NullFields []string `json:"-"` 871} 872 873func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) { 874 type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig 875 raw := NoMethod(*s) 876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 877} 878 879type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct { 880 // BucketSize: Total number of values in this bucket. 881 BucketSize int64 `json:"bucketSize,omitempty,string"` 882 883 // BucketValueCount: Total number of distinct values in this bucket. 884 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 885 886 // BucketValues: Sample of value frequencies in this bucket. The total 887 // number of 888 // values returned per bucket is capped at 20. 889 BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"` 890 891 // ValueFrequencyLowerBound: Lower bound on the value frequency of the 892 // values in this bucket. 893 ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` 894 895 // ValueFrequencyUpperBound: Upper bound on the value frequency of the 896 // values in this bucket. 897 ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` 898 899 // ForceSendFields is a list of field names (e.g. "BucketSize") to 900 // unconditionally include in API requests. By default, fields with 901 // empty values are omitted from API requests. However, any non-pointer, 902 // non-interface field appearing in ForceSendFields will be sent to the 903 // server regardless of whether the field is empty or not. This may be 904 // used to include empty fields in Patch requests. 905 ForceSendFields []string `json:"-"` 906 907 // NullFields is a list of field names (e.g. "BucketSize") to include in 908 // API requests with the JSON null value. By default, fields with empty 909 // values are omitted from API requests. However, any field with an 910 // empty value appearing in NullFields will be sent to the server as 911 // null. It is an error if a field in this list has a non-empty value. 912 // This may be used to include null fields in Patch requests. 913 NullFields []string `json:"-"` 914} 915 916func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { 917 type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket 918 raw := NoMethod(*s) 919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 920} 921 922// GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical 923// stats computation. 924type GooglePrivacyDlpV2CategoricalStatsResult struct { 925 // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the 926 // column. 927 ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` 928 929 // ForceSendFields is a list of field names (e.g. 930 // "ValueFrequencyHistogramBuckets") to unconditionally include in API 931 // requests. By default, fields with empty values are omitted from API 932 // requests. However, any non-pointer, non-interface field appearing in 933 // ForceSendFields will be sent to the server regardless of whether the 934 // field is empty or not. This may be used to include empty fields in 935 // Patch requests. 936 ForceSendFields []string `json:"-"` 937 938 // NullFields is a list of field names (e.g. 939 // "ValueFrequencyHistogramBuckets") to include in API requests with the 940 // JSON null value. By default, fields with empty values are omitted 941 // from API requests. However, any field with an empty value appearing 942 // in NullFields will be sent to the server as null. It is an error if a 943 // field in this list has a non-empty value. This may be used to include 944 // null fields in Patch requests. 945 NullFields []string `json:"-"` 946} 947 948func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) { 949 type NoMethod GooglePrivacyDlpV2CategoricalStatsResult 950 raw := NoMethod(*s) 951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 952} 953 954// GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by 955// replacing a given number of characters with a 956// fixed character. Masking can start from the beginning or end of the 957// string. 958// This can be used on data of any type (numbers, longs, and so on) and 959// when 960// de-identifying structured data we'll attempt to preserve the original 961// data's 962// type. (This allows you to take a long like 123 and modify it to a 963// string like 964// **3. 965type GooglePrivacyDlpV2CharacterMaskConfig struct { 966 // CharactersToIgnore: When masking a string, items in this list will be 967 // skipped when replacing 968 // characters. For example, if the input string is `555-555-5555` and 969 // you 970 // instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud 971 // DLP 972 // returns `***-**5-5555`. 973 CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"` 974 975 // MaskingCharacter: Character to use to mask the sensitive 976 // values—for example, `*` for an 977 // alphabetic string such as a name, or `0` for a numeric string such as 978 // ZIP 979 // code or credit card number. This string must have a length of 1. If 980 // not 981 // supplied, this value defaults to `*` for strings, and `0` for digits. 982 MaskingCharacter string `json:"maskingCharacter,omitempty"` 983 984 // NumberToMask: Number of characters to mask. If not set, all matching 985 // chars will be 986 // masked. Skipped characters do not count towards this tally. 987 NumberToMask int64 `json:"numberToMask,omitempty"` 988 989 // ReverseOrder: Mask characters in reverse order. For example, if 990 // `masking_character` is 991 // `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then 992 // the 993 // input string `1234-5678-9012-3456` is masked as 994 // `00000000000000-3456`. 995 // If `masking_character` is `*`, `number_to_mask` is `3`, and 996 // `reverse_order` 997 // is `true`, then the string `12345` is masked as `12***`. 998 ReverseOrder bool `json:"reverseOrder,omitempty"` 999 1000 // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") 1001 // to unconditionally include in API requests. By default, fields with 1002 // empty values are omitted from API requests. However, any non-pointer, 1003 // non-interface field appearing in ForceSendFields will be sent to the 1004 // server regardless of whether the field is empty or not. This may be 1005 // used to include empty fields in Patch requests. 1006 ForceSendFields []string `json:"-"` 1007 1008 // NullFields is a list of field names (e.g. "CharactersToIgnore") to 1009 // include in API requests with the JSON null value. By default, fields 1010 // with empty values are omitted from API requests. However, any field 1011 // with an empty value appearing in NullFields will be sent to the 1012 // server as null. It is an error if a field in this list has a 1013 // non-empty value. This may be used to include null fields in Patch 1014 // requests. 1015 NullFields []string `json:"-"` 1016} 1017 1018func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) { 1019 type NoMethod GooglePrivacyDlpV2CharacterMaskConfig 1020 raw := NoMethod(*s) 1021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1022} 1023 1024// GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing 1025// deidentification of a value. These will be left 1026// alone and skipped. 1027type GooglePrivacyDlpV2CharsToIgnore struct { 1028 CharactersToSkip string `json:"charactersToSkip,omitempty"` 1029 1030 // Possible values: 1031 // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" 1032 // "NUMERIC" - 0-9 1033 // "ALPHA_UPPER_CASE" - A-Z 1034 // "ALPHA_LOWER_CASE" - a-z 1035 // "PUNCTUATION" - US Punctuation, one of 1036 // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ 1037 // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] 1038 CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` 1039 1040 // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to 1041 // unconditionally include in API requests. By default, fields with 1042 // empty values are omitted from API requests. However, any non-pointer, 1043 // non-interface field appearing in ForceSendFields will be sent to the 1044 // server regardless of whether the field is empty or not. This may be 1045 // used to include empty fields in Patch requests. 1046 ForceSendFields []string `json:"-"` 1047 1048 // NullFields is a list of field names (e.g. "CharactersToSkip") to 1049 // include in API requests with the JSON null value. By default, fields 1050 // with empty values are omitted from API requests. However, any field 1051 // with an empty value appearing in NullFields will be sent to the 1052 // server as null. It is an error if a field in this list has a 1053 // non-empty value. This may be used to include null fields in Patch 1054 // requests. 1055 NullFields []string `json:"-"` 1056} 1057 1058func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) { 1059 type NoMethod GooglePrivacyDlpV2CharsToIgnore 1060 raw := NoMethod(*s) 1061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1062} 1063 1064// GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of 1065// files in Cloud Storage. 1066type GooglePrivacyDlpV2CloudStorageFileSet struct { 1067 // Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard 1068 // in the 1069 // path is allowed. 1070 Url string `json:"url,omitempty"` 1071 1072 // ForceSendFields is a list of field names (e.g. "Url") to 1073 // unconditionally include in API requests. By default, fields with 1074 // empty values are omitted from API requests. However, any non-pointer, 1075 // non-interface field appearing in ForceSendFields will be sent to the 1076 // server regardless of whether the field is empty or not. This may be 1077 // used to include empty fields in Patch requests. 1078 ForceSendFields []string `json:"-"` 1079 1080 // NullFields is a list of field names (e.g. "Url") to include in API 1081 // requests with the JSON null value. By default, fields with empty 1082 // values are omitted from API requests. However, any field with an 1083 // empty value appearing in NullFields will be sent to the server as 1084 // null. It is an error if a field in this list has a non-empty value. 1085 // This may be used to include null fields in Patch requests. 1086 NullFields []string `json:"-"` 1087} 1088 1089func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) { 1090 type NoMethod GooglePrivacyDlpV2CloudStorageFileSet 1091 raw := NoMethod(*s) 1092 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1093} 1094 1095// GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a 1096// set of files within a Google Cloud Storage 1097// bucket. 1098type GooglePrivacyDlpV2CloudStorageOptions struct { 1099 // BytesLimitPerFile: Max number of bytes to scan from a file. If a 1100 // scanned file's size is bigger 1101 // than this value then the rest of the bytes are omitted. Only one 1102 // of bytes_limit_per_file and bytes_limit_per_file_percent can be 1103 // specified. 1104 BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` 1105 1106 // BytesLimitPerFilePercent: Max percentage of bytes to scan from a 1107 // file. The rest are omitted. The 1108 // number of bytes scanned is rounded down. Must be between 0 and 1109 // 100, 1110 // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only 1111 // one 1112 // of bytes_limit_per_file and bytes_limit_per_file_percent can be 1113 // specified. 1114 BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"` 1115 1116 // FileSet: The set of one or more files to scan. 1117 FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"` 1118 1119 // FileTypes: List of file type groups to include in the scan. 1120 // If empty, all files are scanned and available data format 1121 // processors 1122 // are applied. In addition, the binary content of the selected files 1123 // is always scanned as well. 1124 // 1125 // Possible values: 1126 // "FILE_TYPE_UNSPECIFIED" - Includes all files. 1127 // "BINARY_FILE" - Includes all file extensions not covered by text 1128 // file types. 1129 // "TEXT_FILE" - Included file extensions: 1130 // asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh, 1131 // hpp, 1132 // hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js, 1133 // json, 1134 // ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py, 1135 // pyw, 1136 // rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, 1137 // wml, 1138 // xml, xsl, xsd, yml, yaml. 1139 // "IMAGE" - Included file extensions: 1140 // bmp, gif, jpg, jpeg, jpe, png. 1141 // bytes_limit_per_file has no effect on image files. 1142 // "AVRO" - Included file extensions: 1143 // avro 1144 FileTypes []string `json:"fileTypes,omitempty"` 1145 1146 // FilesLimitPercent: Limits the number of files to scan to this 1147 // percentage of the input FileSet. 1148 // Number of files scanned is rounded down. Must be between 0 and 1149 // 100, 1150 // inclusively. Both 0 and 100 means no limit. Defaults to 0. 1151 FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"` 1152 1153 // Possible values: 1154 // "SAMPLE_METHOD_UNSPECIFIED" 1155 // "TOP" - Scan from the top (default). 1156 // "RANDOM_START" - For each file larger than bytes_limit_per_file, 1157 // randomly pick the offset 1158 // to start scanning. The scanned bytes are contiguous. 1159 SampleMethod string `json:"sampleMethod,omitempty"` 1160 1161 // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile") 1162 // to unconditionally include in API requests. By default, fields with 1163 // empty values are omitted from API requests. However, any non-pointer, 1164 // non-interface field appearing in ForceSendFields will be sent to the 1165 // server regardless of whether the field is empty or not. This may be 1166 // used to include empty fields in Patch requests. 1167 ForceSendFields []string `json:"-"` 1168 1169 // NullFields is a list of field names (e.g. "BytesLimitPerFile") to 1170 // include in API requests with the JSON null value. By default, fields 1171 // with empty values are omitted from API requests. However, any field 1172 // with an empty value appearing in NullFields will be sent to the 1173 // server as null. It is an error if a field in this list has a 1174 // non-empty value. This may be used to include null fields in Patch 1175 // requests. 1176 NullFields []string `json:"-"` 1177} 1178 1179func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) { 1180 type NoMethod GooglePrivacyDlpV2CloudStorageOptions 1181 raw := NoMethod(*s) 1182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1183} 1184 1185// GooglePrivacyDlpV2CloudStoragePath: Message representing a single 1186// file or path in Cloud Storage. 1187type GooglePrivacyDlpV2CloudStoragePath struct { 1188 // Path: A url representing a file or path (no wildcards) in Cloud 1189 // Storage. 1190 // Example: gs://[BUCKET_NAME]/dictionary.txt 1191 Path string `json:"path,omitempty"` 1192 1193 // ForceSendFields is a list of field names (e.g. "Path") to 1194 // unconditionally include in API requests. By default, fields with 1195 // empty values are omitted from API requests. However, any non-pointer, 1196 // non-interface field appearing in ForceSendFields will be sent to the 1197 // server regardless of whether the field is empty or not. This may be 1198 // used to include empty fields in Patch requests. 1199 ForceSendFields []string `json:"-"` 1200 1201 // NullFields is a list of field names (e.g. "Path") to include in API 1202 // requests with the JSON null value. By default, fields with empty 1203 // values are omitted from API requests. However, any field with an 1204 // empty value appearing in NullFields will be sent to the server as 1205 // null. It is an error if a field in this list has a non-empty value. 1206 // This may be used to include null fields in Patch requests. 1207 NullFields []string `json:"-"` 1208} 1209 1210func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) { 1211 type NoMethod GooglePrivacyDlpV2CloudStoragePath 1212 raw := NoMethod(*s) 1213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1214} 1215 1216// GooglePrivacyDlpV2CloudStorageRegexFileSet: Message representing a 1217// set of files in a Cloud Storage bucket. Regular 1218// expressions are used to allow fine-grained control over which files 1219// in the 1220// bucket to include. 1221// 1222// Included files are those that match at least one item in 1223// `include_regex` and 1224// do not match any items in `exclude_regex`. Note that a file that 1225// matches 1226// items from both lists will _not_ be included. For a match to occur, 1227// the 1228// entire file path (i.e., everything in the url after the bucket name) 1229// must 1230// match the regular expression. 1231// 1232// For example, given the input `{bucket_name: "mybucket", 1233// include_regex: 1234// ["directory1/.*"], exclude_regex: 1235// ["directory1/excluded.*"]}`: 1236// 1237// * `gs://mybucket/directory1/myfile` will be included 1238// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` 1239// matches 1240// across `/`) 1241// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included 1242// (the 1243// full path doesn't match any items in `include_regex`) 1244// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the 1245// path 1246// matches an item in `exclude_regex`) 1247// 1248// If `include_regex` is left empty, it will match all files by 1249// default 1250// (this is equivalent to setting `include_regex: [".*"]`). 1251// 1252// Some other common use cases: 1253// 1254// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will 1255// include all 1256// files in `mybucket` except for .pdf files 1257// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` 1258// will 1259// include all files directly under `gs://mybucket/directory/`, without 1260// matching 1261// across `/` 1262type GooglePrivacyDlpV2CloudStorageRegexFileSet struct { 1263 // BucketName: The name of a Cloud Storage bucket. Required. 1264 BucketName string `json:"bucketName,omitempty"` 1265 1266 // ExcludeRegex: A list of regular expressions matching file paths to 1267 // exclude. All files in 1268 // the bucket that match at least one of these regular expressions will 1269 // be 1270 // excluded from the scan. 1271 // 1272 // Regular expressions use 1273 // RE2 1274 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1275 // found 1276 // under the google/re2 repository on GitHub. 1277 ExcludeRegex []string `json:"excludeRegex,omitempty"` 1278 1279 // IncludeRegex: A list of regular expressions matching file paths to 1280 // include. All files in 1281 // the bucket that match at least one of these regular expressions will 1282 // be 1283 // included in the set of files, except for those that also match an 1284 // item in 1285 // `exclude_regex`. Leaving this field empty will match all files by 1286 // default 1287 // (this is equivalent to including `.*` in the list). 1288 // 1289 // Regular expressions use 1290 // RE2 1291 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1292 // found 1293 // under the google/re2 repository on GitHub. 1294 IncludeRegex []string `json:"includeRegex,omitempty"` 1295 1296 // ForceSendFields is a list of field names (e.g. "BucketName") to 1297 // unconditionally include in API requests. By default, fields with 1298 // empty values are omitted from API requests. However, any non-pointer, 1299 // non-interface field appearing in ForceSendFields will be sent to the 1300 // server regardless of whether the field is empty or not. This may be 1301 // used to include empty fields in Patch requests. 1302 ForceSendFields []string `json:"-"` 1303 1304 // NullFields is a list of field names (e.g. "BucketName") to include in 1305 // API requests with the JSON null value. By default, fields with empty 1306 // values are omitted from API requests. However, any field with an 1307 // empty value appearing in NullFields will be sent to the server as 1308 // null. It is an error if a field in this list has a non-empty value. 1309 // This may be used to include null fields in Patch requests. 1310 NullFields []string `json:"-"` 1311} 1312 1313func (s *GooglePrivacyDlpV2CloudStorageRegexFileSet) MarshalJSON() ([]byte, error) { 1314 type NoMethod GooglePrivacyDlpV2CloudStorageRegexFileSet 1315 raw := NoMethod(*s) 1316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1317} 1318 1319// GooglePrivacyDlpV2Color: Represents a color in the RGB color space. 1320type GooglePrivacyDlpV2Color struct { 1321 // Blue: The amount of blue in the color as a value in the interval [0, 1322 // 1]. 1323 Blue float64 `json:"blue,omitempty"` 1324 1325 // Green: The amount of green in the color as a value in the interval 1326 // [0, 1]. 1327 Green float64 `json:"green,omitempty"` 1328 1329 // Red: The amount of red in the color as a value in the interval [0, 1330 // 1]. 1331 Red float64 `json:"red,omitempty"` 1332 1333 // ForceSendFields is a list of field names (e.g. "Blue") to 1334 // unconditionally include in API requests. By default, fields with 1335 // empty values are omitted from API requests. However, any non-pointer, 1336 // non-interface field appearing in ForceSendFields will be sent to the 1337 // server regardless of whether the field is empty or not. This may be 1338 // used to include empty fields in Patch requests. 1339 ForceSendFields []string `json:"-"` 1340 1341 // NullFields is a list of field names (e.g. "Blue") to include in API 1342 // requests with the JSON null value. By default, fields with empty 1343 // values are omitted from API requests. However, any field with an 1344 // empty value appearing in NullFields will be sent to the server as 1345 // null. It is an error if a field in this list has a non-empty value. 1346 // This may be used to include null fields in Patch requests. 1347 NullFields []string `json:"-"` 1348} 1349 1350func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) { 1351 type NoMethod GooglePrivacyDlpV2Color 1352 raw := NoMethod(*s) 1353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1354} 1355 1356func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error { 1357 type NoMethod GooglePrivacyDlpV2Color 1358 var s1 struct { 1359 Blue gensupport.JSONFloat64 `json:"blue"` 1360 Green gensupport.JSONFloat64 `json:"green"` 1361 Red gensupport.JSONFloat64 `json:"red"` 1362 *NoMethod 1363 } 1364 s1.NoMethod = (*NoMethod)(s) 1365 if err := json.Unmarshal(data, &s1); err != nil { 1366 return err 1367 } 1368 s.Blue = float64(s1.Blue) 1369 s.Green = float64(s1.Green) 1370 s.Red = float64(s1.Red) 1371 return nil 1372} 1373 1374// GooglePrivacyDlpV2Condition: The field type of `value` and `field` do 1375// not need to match to be 1376// considered equal, but not all comparisons are possible. 1377// EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible 1378// types, 1379// but all other comparisons are invalid with incompatible types. 1380// A `value` of type: 1381// 1382// - `string` can be compared against all other types 1383// - `boolean` can only be compared against other booleans 1384// - `integer` can be compared against doubles or a string if the string 1385// value 1386// can be parsed as an integer. 1387// - `double` can be compared against integers or a string if the string 1388// can 1389// be parsed as a double. 1390// - `Timestamp` can be compared against strings in RFC 3339 date 1391// string 1392// format. 1393// - `TimeOfDay` can be compared against timestamps and strings in the 1394// format 1395// of 'HH:mm:ss'. 1396// 1397// If we fail to compare do to type mismatch, a warning will be given 1398// and 1399// the condition will evaluate to false. 1400type GooglePrivacyDlpV2Condition struct { 1401 // Field: Field within the record this condition is evaluated against. 1402 // [required] 1403 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 1404 1405 // Operator: Operator used to compare the field or infoType to the 1406 // value. [required] 1407 // 1408 // Possible values: 1409 // "RELATIONAL_OPERATOR_UNSPECIFIED" 1410 // "EQUAL_TO" - Equal. Attempts to match even with incompatible types. 1411 // "NOT_EQUAL_TO" - Not equal to. Attempts to match even with 1412 // incompatible types. 1413 // "GREATER_THAN" - Greater than. 1414 // "LESS_THAN" - Less than. 1415 // "GREATER_THAN_OR_EQUALS" - Greater than or equals. 1416 // "LESS_THAN_OR_EQUALS" - Less than or equals. 1417 // "EXISTS" - Exists 1418 Operator string `json:"operator,omitempty"` 1419 1420 // Value: Value to compare against. [Required, except for `EXISTS` 1421 // tests.] 1422 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 1423 1424 // ForceSendFields is a list of field names (e.g. "Field") to 1425 // unconditionally include in API requests. By default, fields with 1426 // empty values are omitted from API requests. However, any non-pointer, 1427 // non-interface field appearing in ForceSendFields will be sent to the 1428 // server regardless of whether the field is empty or not. This may be 1429 // used to include empty fields in Patch requests. 1430 ForceSendFields []string `json:"-"` 1431 1432 // NullFields is a list of field names (e.g. "Field") to include in API 1433 // requests with the JSON null value. By default, fields with empty 1434 // values are omitted from API requests. However, any field with an 1435 // empty value appearing in NullFields will be sent to the server as 1436 // null. It is an error if a field in this list has a non-empty value. 1437 // This may be used to include null fields in Patch requests. 1438 NullFields []string `json:"-"` 1439} 1440 1441func (s *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) { 1442 type NoMethod GooglePrivacyDlpV2Condition 1443 raw := NoMethod(*s) 1444 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1445} 1446 1447// GooglePrivacyDlpV2Conditions: A collection of conditions. 1448type GooglePrivacyDlpV2Conditions struct { 1449 Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"` 1450 1451 // ForceSendFields is a list of field names (e.g. "Conditions") to 1452 // unconditionally include in API requests. By default, fields with 1453 // empty values are omitted from API requests. However, any non-pointer, 1454 // non-interface field appearing in ForceSendFields will be sent to the 1455 // server regardless of whether the field is empty or not. This may be 1456 // used to include empty fields in Patch requests. 1457 ForceSendFields []string `json:"-"` 1458 1459 // NullFields is a list of field names (e.g. "Conditions") to include in 1460 // API requests with the JSON null value. By default, fields with empty 1461 // values are omitted from API requests. However, any field with an 1462 // empty value appearing in NullFields will be sent to the server as 1463 // null. It is an error if a field in this list has a non-empty value. 1464 // This may be used to include null fields in Patch requests. 1465 NullFields []string `json:"-"` 1466} 1467 1468func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { 1469 type NoMethod GooglePrivacyDlpV2Conditions 1470 raw := NoMethod(*s) 1471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1472} 1473 1474// GooglePrivacyDlpV2ContentItem: Container structure for the content to 1475// inspect. 1476type GooglePrivacyDlpV2ContentItem struct { 1477 // ByteItem: Content data to inspect or redact. Replaces `type` and 1478 // `data`. 1479 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 1480 1481 // Table: Structured content for inspection. 1482 // See 1483 // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_tab 1484 // le to 1485 // learn more. 1486 Table *GooglePrivacyDlpV2Table `json:"table,omitempty"` 1487 1488 // Value: String data to inspect or redact. 1489 Value string `json:"value,omitempty"` 1490 1491 // ForceSendFields is a list of field names (e.g. "ByteItem") to 1492 // unconditionally include in API requests. By default, fields with 1493 // empty values are omitted from API requests. However, any non-pointer, 1494 // non-interface field appearing in ForceSendFields will be sent to the 1495 // server regardless of whether the field is empty or not. This may be 1496 // used to include empty fields in Patch requests. 1497 ForceSendFields []string `json:"-"` 1498 1499 // NullFields is a list of field names (e.g. "ByteItem") to include in 1500 // API requests with the JSON null value. By default, fields with empty 1501 // values are omitted from API requests. However, any field with an 1502 // empty value appearing in NullFields will be sent to the server as 1503 // null. It is an error if a field in this list has a non-empty value. 1504 // This may be used to include null fields in Patch requests. 1505 NullFields []string `json:"-"` 1506} 1507 1508func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) { 1509 type NoMethod GooglePrivacyDlpV2ContentItem 1510 raw := NoMethod(*s) 1511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1512} 1513 1514// GooglePrivacyDlpV2ContentLocation: Findings container location data. 1515type GooglePrivacyDlpV2ContentLocation struct { 1516 // ContainerName: Name of the container where the finding is 1517 // located. 1518 // The top level name is the source file name or table name. Names of 1519 // some 1520 // common storage containers are formatted as follows: 1521 // 1522 // * BigQuery tables: `<project_id>:<dataset_id>.<table_id>` 1523 // * Cloud Storage files: `gs://<bucket>/<path>` 1524 // * Datastore namespace: <namespace> 1525 // 1526 // Nested names could be absent if the embedded object has no 1527 // string 1528 // identifier (for an example an image contained within a document). 1529 ContainerName string `json:"containerName,omitempty"` 1530 1531 // ContainerTimestamp: Findings container modification timestamp, if 1532 // applicable. 1533 // For Google Cloud Storage contains last file modification 1534 // timestamp. 1535 // For BigQuery table contains last_modified_time property. 1536 // For Datastore - not populated. 1537 ContainerTimestamp string `json:"containerTimestamp,omitempty"` 1538 1539 // ContainerVersion: Findings container version, if 1540 // available 1541 // ("generation" for Google Cloud Storage). 1542 ContainerVersion string `json:"containerVersion,omitempty"` 1543 1544 // DocumentLocation: Location data for document files. 1545 DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"` 1546 1547 // ImageLocation: Location within an image's pixels. 1548 ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"` 1549 1550 // RecordLocation: Location within a row or record of a database table. 1551 RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"` 1552 1553 // ForceSendFields is a list of field names (e.g. "ContainerName") to 1554 // unconditionally include in API requests. By default, fields with 1555 // empty values are omitted from API requests. However, any non-pointer, 1556 // non-interface field appearing in ForceSendFields will be sent to the 1557 // server regardless of whether the field is empty or not. This may be 1558 // used to include empty fields in Patch requests. 1559 ForceSendFields []string `json:"-"` 1560 1561 // NullFields is a list of field names (e.g. "ContainerName") to include 1562 // in API requests with the JSON null value. By default, fields with 1563 // empty values are omitted from API requests. However, any field with 1564 // an empty value appearing in NullFields will be sent to the server as 1565 // null. It is an error if a field in this list has a non-empty value. 1566 // This may be used to include null fields in Patch requests. 1567 NullFields []string `json:"-"` 1568} 1569 1570func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) { 1571 type NoMethod GooglePrivacyDlpV2ContentLocation 1572 raw := NoMethod(*s) 1573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1574} 1575 1576// GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message 1577// for CreateDeidentifyTemplate. 1578type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct { 1579 // DeidentifyTemplate: The DeidentifyTemplate to create. 1580 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 1581 1582 // TemplateId: The template id can contain uppercase and lowercase 1583 // letters, 1584 // numbers, and hyphens; that is, it must match the regular 1585 // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 1586 // characters. Can be empty to allow the system to generate one. 1587 TemplateId string `json:"templateId,omitempty"` 1588 1589 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 1590 // to unconditionally include in API requests. By default, fields with 1591 // empty values are omitted from API requests. However, any non-pointer, 1592 // non-interface field appearing in ForceSendFields will be sent to the 1593 // server regardless of whether the field is empty or not. This may be 1594 // used to include empty fields in Patch requests. 1595 ForceSendFields []string `json:"-"` 1596 1597 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 1598 // include in API requests with the JSON null value. By default, fields 1599 // with empty values are omitted from API requests. However, any field 1600 // with an empty value appearing in NullFields will be sent to the 1601 // server as null. It is an error if a field in this list has a 1602 // non-empty value. This may be used to include null fields in Patch 1603 // requests. 1604 NullFields []string `json:"-"` 1605} 1606 1607func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 1608 type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 1609 raw := NoMethod(*s) 1610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1611} 1612 1613// GooglePrivacyDlpV2CreateDlpJobRequest: Request message for 1614// CreateDlpJobRequest. Used to initiate long running 1615// jobs such as calculating risk metrics or inspecting Google 1616// Cloud 1617// Storage. 1618type GooglePrivacyDlpV2CreateDlpJobRequest struct { 1619 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 1620 1621 // JobId: The job id can contain uppercase and lowercase 1622 // letters, 1623 // numbers, and hyphens; that is, it must match the regular 1624 // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 1625 // characters. Can be empty to allow the system to generate one. 1626 JobId string `json:"jobId,omitempty"` 1627 1628 RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"` 1629 1630 // ForceSendFields is a list of field names (e.g. "InspectJob") to 1631 // unconditionally include in API requests. By default, fields with 1632 // empty values are omitted from API requests. However, any non-pointer, 1633 // non-interface field appearing in ForceSendFields will be sent to the 1634 // server regardless of whether the field is empty or not. This may be 1635 // used to include empty fields in Patch requests. 1636 ForceSendFields []string `json:"-"` 1637 1638 // NullFields is a list of field names (e.g. "InspectJob") 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 1647func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) { 1648 type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest 1649 raw := NoMethod(*s) 1650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1651} 1652 1653// GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for 1654// CreateInspectTemplate. 1655type GooglePrivacyDlpV2CreateInspectTemplateRequest struct { 1656 // InspectTemplate: The InspectTemplate to create. 1657 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 1658 1659 // TemplateId: The template id can contain uppercase and lowercase 1660 // letters, 1661 // numbers, and hyphens; that is, it must match the regular 1662 // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 1663 // characters. Can be empty to allow the system to generate one. 1664 TemplateId string `json:"templateId,omitempty"` 1665 1666 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 1667 // unconditionally include in API requests. By default, fields with 1668 // empty values are omitted from API requests. However, any non-pointer, 1669 // non-interface field appearing in ForceSendFields will be sent to the 1670 // server regardless of whether the field is empty or not. This may be 1671 // used to include empty fields in Patch requests. 1672 ForceSendFields []string `json:"-"` 1673 1674 // NullFields is a list of field names (e.g. "InspectTemplate") to 1675 // include in API requests with the JSON null value. By default, fields 1676 // with empty values are omitted from API requests. However, any field 1677 // with an empty value appearing in NullFields will be sent to the 1678 // server as null. It is an error if a field in this list has a 1679 // non-empty value. This may be used to include null fields in Patch 1680 // requests. 1681 NullFields []string `json:"-"` 1682} 1683 1684func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 1685 type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest 1686 raw := NoMethod(*s) 1687 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1688} 1689 1690// GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for 1691// CreateJobTrigger. 1692type GooglePrivacyDlpV2CreateJobTriggerRequest struct { 1693 // JobTrigger: The JobTrigger to create. 1694 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 1695 1696 // TriggerId: The trigger id can contain uppercase and lowercase 1697 // letters, 1698 // numbers, and hyphens; that is, it must match the regular 1699 // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 1700 // characters. Can be empty to allow the system to generate one. 1701 TriggerId string `json:"triggerId,omitempty"` 1702 1703 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 1704 // unconditionally include in API requests. By default, fields with 1705 // empty values are omitted from API requests. However, any non-pointer, 1706 // non-interface field appearing in ForceSendFields will be sent to the 1707 // server regardless of whether the field is empty or not. This may be 1708 // used to include empty fields in Patch requests. 1709 ForceSendFields []string `json:"-"` 1710 1711 // NullFields is a list of field names (e.g. "JobTrigger") to include in 1712 // API requests with the JSON null value. By default, fields with empty 1713 // values are omitted from API requests. However, any field with an 1714 // empty value appearing in NullFields will be sent to the server as 1715 // null. It is an error if a field in this list has a non-empty value. 1716 // This may be used to include null fields in Patch requests. 1717 NullFields []string `json:"-"` 1718} 1719 1720func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) { 1721 type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest 1722 raw := NoMethod(*s) 1723 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1724} 1725 1726// GooglePrivacyDlpV2CreateStoredInfoTypeRequest: Request message for 1727// CreateStoredInfoType. 1728type GooglePrivacyDlpV2CreateStoredInfoTypeRequest struct { 1729 // Config: Configuration of the storedInfoType to create. 1730 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 1731 1732 // StoredInfoTypeId: The storedInfoType ID can contain uppercase and 1733 // lowercase letters, 1734 // numbers, and hyphens; that is, it must match the regular 1735 // expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 1736 // characters. Can be empty to allow the system to generate one. 1737 StoredInfoTypeId string `json:"storedInfoTypeId,omitempty"` 1738 1739 // ForceSendFields is a list of field names (e.g. "Config") to 1740 // unconditionally include in API requests. By default, fields with 1741 // empty values are omitted from API requests. However, any non-pointer, 1742 // non-interface field appearing in ForceSendFields will be sent to the 1743 // server regardless of whether the field is empty or not. This may be 1744 // used to include empty fields in Patch requests. 1745 ForceSendFields []string `json:"-"` 1746 1747 // NullFields is a list of field names (e.g. "Config") to include in API 1748 // requests with the JSON null value. By default, fields with empty 1749 // values are omitted from API requests. However, any field with an 1750 // empty value appearing in NullFields will be sent to the server as 1751 // null. It is an error if a field in this list has a non-empty value. 1752 // This may be used to include null fields in Patch requests. 1753 NullFields []string `json:"-"` 1754} 1755 1756func (s *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 1757 type NoMethod GooglePrivacyDlpV2CreateStoredInfoTypeRequest 1758 raw := NoMethod(*s) 1759 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1760} 1761 1762// GooglePrivacyDlpV2CryptoDeterministicConfig: Pseudonymization method 1763// that generates deterministic encryption for the given 1764// input. Outputs a base64 encoded representation of the encrypted 1765// output. 1766// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. 1767type GooglePrivacyDlpV2CryptoDeterministicConfig struct { 1768 // Context: Optional. A context may be used for higher security and 1769 // maintaining 1770 // referential integrity such that the same identifier in two 1771 // different 1772 // contexts will be given a distinct surrogate. The context is appended 1773 // to 1774 // plaintext value being encrypted. On decryption the provided context 1775 // is 1776 // validated against the value used during encryption. If a context 1777 // was 1778 // provided during encryption, same context must be provided during 1779 // decryption 1780 // as well. 1781 // 1782 // If the context is not set, plaintext would be used as is for 1783 // encryption. 1784 // If the context is set but: 1785 // 1786 // 1. there is no record present when transforming a given value or 1787 // 2. the field is not present when transforming a given 1788 // value, 1789 // 1790 // plaintext would be used as is for encryption. 1791 // 1792 // Note that case (1) is expected when an `InfoTypeTransformation` 1793 // is 1794 // applied to both structured and non-structured `ContentItem`s. 1795 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 1796 1797 // CryptoKey: The key used by the encryption function. 1798 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1799 1800 // SurrogateInfoType: The custom info type to annotate the surrogate 1801 // with. 1802 // This annotation will be applied to the surrogate by prefixing it 1803 // with 1804 // the name of the custom info type followed by the number of 1805 // characters comprising the surrogate. The following scheme defines 1806 // the 1807 // format: <info type name>(<surrogate character 1808 // count>):<surrogate> 1809 // 1810 // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' 1811 // and 1812 // the surrogate is 'abc', the full replacement value 1813 // will be: 'MY_TOKEN_INFO_TYPE(3):abc' 1814 // 1815 // This annotation identifies the surrogate when inspecting content 1816 // using the 1817 // custom info type 'Surrogate'. This facilitates reversal of 1818 // the 1819 // surrogate when it occurs in free text. 1820 // 1821 // Note: For record transformations where the entire cell in a table is 1822 // being 1823 // transformed, surrogates are optional to use. Surrogates are used to 1824 // denote 1825 // the location of the token and are necessary for re-identification in 1826 // free 1827 // form text. 1828 // 1829 // In order for inspection to work properly, the name of this info type 1830 // must 1831 // not occur naturally anywhere in your data; otherwise, inspection may 1832 // either 1833 // 1834 // - reverse a surrogate that does not correspond to an actual 1835 // identifier 1836 // - be unable to parse the surrogate and result in an error 1837 // 1838 // Therefore, choose your custom info type name carefully after 1839 // considering 1840 // what your data looks like. One way to select a name that has a high 1841 // chance 1842 // of yielding reliable detection is to include one or more unicode 1843 // characters 1844 // that are highly improbable to exist in your data. 1845 // For example, assuming your data is entered from a regular ASCII 1846 // keyboard, 1847 // the symbol with the hex code point 29DD might be used like 1848 // so: 1849 // ⧝MY_TOKEN_TYPE. 1850 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 1851 1852 // ForceSendFields is a list of field names (e.g. "Context") to 1853 // unconditionally include in API requests. By default, fields with 1854 // empty values are omitted from API requests. However, any non-pointer, 1855 // non-interface field appearing in ForceSendFields will be sent to the 1856 // server regardless of whether the field is empty or not. This may be 1857 // used to include empty fields in Patch requests. 1858 ForceSendFields []string `json:"-"` 1859 1860 // NullFields is a list of field names (e.g. "Context") to include in 1861 // API requests with the JSON null value. By default, fields with empty 1862 // values are omitted from API requests. However, any field with an 1863 // empty value appearing in NullFields will be sent to the server as 1864 // null. It is an error if a field in this list has a non-empty value. 1865 // This may be used to include null fields in Patch requests. 1866 NullFields []string `json:"-"` 1867} 1868 1869func (s *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, error) { 1870 type NoMethod GooglePrivacyDlpV2CryptoDeterministicConfig 1871 raw := NoMethod(*s) 1872 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1873} 1874 1875// GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that 1876// generates surrogates via cryptographic hashing. 1877// Uses SHA-256. 1878// The key size must be either 32 or 64 bytes. 1879// Outputs a base64 encoded representation of the hashed output 1880// (for example, 1881// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). 1882// Currently, only string and integer values can be hashed. 1883// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. 1884type GooglePrivacyDlpV2CryptoHashConfig struct { 1885 // CryptoKey: The key used by the hash function. 1886 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1887 1888 // ForceSendFields is a list of field names (e.g. "CryptoKey") 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 1896 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1897 // API requests with the JSON null value. By default, fields with empty 1898 // values are omitted from API requests. However, any field with an 1899 // empty value appearing in NullFields will be sent to the server as 1900 // null. It is an error if a field in this list has a non-empty value. 1901 // This may be used to include null fields in Patch requests. 1902 NullFields []string `json:"-"` 1903} 1904 1905func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) { 1906 type NoMethod GooglePrivacyDlpV2CryptoHashConfig 1907 raw := NoMethod(*s) 1908 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1909} 1910 1911// GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as 1912// opposed to 1913// a key encryption key (KEK) stored by KMS). 1914// When using KMS to wrap/unwrap DEKs, be sure to set an appropriate 1915// IAM policy on the KMS CryptoKey (KEK) to ensure an attacker 1916// cannot 1917// unwrap the data crypto key. 1918type GooglePrivacyDlpV2CryptoKey struct { 1919 KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` 1920 1921 Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"` 1922 1923 Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"` 1924 1925 // ForceSendFields is a list of field names (e.g. "KmsWrapped") to 1926 // unconditionally include in API requests. By default, fields with 1927 // empty values are omitted from API requests. However, any non-pointer, 1928 // non-interface field appearing in ForceSendFields will be sent to the 1929 // server regardless of whether the field is empty or not. This may be 1930 // used to include empty fields in Patch requests. 1931 ForceSendFields []string `json:"-"` 1932 1933 // NullFields is a list of field names (e.g. "KmsWrapped") to include in 1934 // API requests with the JSON null value. By default, fields with empty 1935 // values are omitted from API requests. However, any field with an 1936 // empty value appearing in NullFields will be sent to the server as 1937 // null. It is an error if a field in this list has a non-empty value. 1938 // This may be used to include null fields in Patch requests. 1939 NullFields []string `json:"-"` 1940} 1941 1942func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) { 1943 type NoMethod GooglePrivacyDlpV2CryptoKey 1944 raw := NoMethod(*s) 1945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1946} 1947 1948// GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier 1949// with a surrogate using Format Preserving Encryption 1950// (FPE) with the FFX mode of operation; however when used in 1951// the 1952// `ReidentifyContent` API method, it serves the opposite function by 1953// reversing 1954// the surrogate back into the original identifier. The identifier must 1955// be 1956// encoded as ASCII. For a given crypto key and context, the same 1957// identifier 1958// will be replaced with the same surrogate. Identifiers must be at 1959// least two 1960// characters long. In the case that the identifier is the empty string, 1961// it will 1962// be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to 1963// learn 1964// more. 1965// 1966// Note: We recommend using CryptoDeterministicConfig for all use cases 1967// which 1968// do not require preserving the input alphabet space and size, plus 1969// warrant 1970// referential integrity. 1971type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { 1972 // Possible values: 1973 // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" 1974 // "NUMERIC" - [0-9] (radix of 10) 1975 // "HEXADECIMAL" - [0-9A-F] (radix of 16) 1976 // "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36) 1977 // "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62) 1978 CommonAlphabet string `json:"commonAlphabet,omitempty"` 1979 1980 // Context: The 'tweak', a context may be used for higher security since 1981 // the same 1982 // identifier in two different contexts won't be given the same 1983 // surrogate. If 1984 // the context is not set, a default tweak will be used. 1985 // 1986 // If the context is set but: 1987 // 1988 // 1. there is no record present when transforming a given value or 1989 // 1. the field is not present when transforming a given value, 1990 // 1991 // a default tweak will be used. 1992 // 1993 // Note that case (1) is expected when an `InfoTypeTransformation` 1994 // is 1995 // applied to both structured and non-structured 1996 // `ContentItem`s. 1997 // Currently, the referenced field may be of value type integer or 1998 // string. 1999 // 2000 // The tweak is constructed as a sequence of bytes in big endian byte 2001 // order 2002 // such that: 2003 // 2004 // - a 64 bit integer is encoded followed by a single byte of value 1 2005 // - a string is encoded in UTF-8 format followed by a single byte of 2006 // value 2 2007 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2008 2009 // CryptoKey: The key used by the encryption algorithm. [required] 2010 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2011 2012 // CustomAlphabet: This is supported by mapping these to the 2013 // alphanumeric characters 2014 // that the FFX mode natively supports. This happens 2015 // before/after 2016 // encryption/decryption. 2017 // Each character listed must appear only once. 2018 // Number of characters must be in the range [2, 62]. 2019 // This must be encoded as ASCII. 2020 // The order of characters does not matter. 2021 CustomAlphabet string `json:"customAlphabet,omitempty"` 2022 2023 // Radix: The native way to select the alphabet. Must be in the range 2024 // [2, 62]. 2025 Radix int64 `json:"radix,omitempty"` 2026 2027 // SurrogateInfoType: The custom infoType to annotate the surrogate 2028 // with. 2029 // This annotation will be applied to the surrogate by prefixing it 2030 // with 2031 // the name of the custom infoType followed by the number of 2032 // characters comprising the surrogate. The following scheme defines 2033 // the 2034 // format: info_type_name(surrogate_character_count):surrogate 2035 // 2036 // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' 2037 // and 2038 // the surrogate is 'abc', the full replacement value 2039 // will be: 'MY_TOKEN_INFO_TYPE(3):abc' 2040 // 2041 // This annotation identifies the surrogate when inspecting content 2042 // using the 2043 // custom 2044 // infoType 2045 // [`SurrogateType`](/dlp/docs/reference/rest/v2/InspectConfig#s 2046 // urrogatetype). 2047 // This facilitates reversal of the surrogate when it occurs in free 2048 // text. 2049 // 2050 // In order for inspection to work properly, the name of this infoType 2051 // must 2052 // not occur naturally anywhere in your data; otherwise, inspection 2053 // may 2054 // find a surrogate that does not correspond to an actual 2055 // identifier. 2056 // Therefore, choose your custom infoType name carefully after 2057 // considering 2058 // what your data looks like. One way to select a name that has a high 2059 // chance 2060 // of yielding reliable detection is to include one or more unicode 2061 // characters 2062 // that are highly improbable to exist in your data. 2063 // For example, assuming your data is entered from a regular ASCII 2064 // keyboard, 2065 // the symbol with the hex code point 29DD might be used like 2066 // so: 2067 // ⧝MY_TOKEN_TYPE 2068 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 2069 2070 // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to 2071 // unconditionally include in API requests. By default, fields with 2072 // empty values are omitted from API requests. However, any non-pointer, 2073 // non-interface field appearing in ForceSendFields will be sent to the 2074 // server regardless of whether the field is empty or not. This may be 2075 // used to include empty fields in Patch requests. 2076 ForceSendFields []string `json:"-"` 2077 2078 // NullFields is a list of field names (e.g. "CommonAlphabet") to 2079 // include in API requests with the JSON null value. By default, fields 2080 // with empty values are omitted from API requests. However, any field 2081 // with an empty value appearing in NullFields will be sent to the 2082 // server as null. It is an error if a field in this list has a 2083 // non-empty value. This may be used to include null fields in Patch 2084 // requests. 2085 NullFields []string `json:"-"` 2086} 2087 2088func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { 2089 type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig 2090 raw := NoMethod(*s) 2091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2092} 2093 2094// GooglePrivacyDlpV2CustomInfoType: Custom information type provided by 2095// the user. Used to find domain-specific 2096// sensitive information configurable to the data in question. 2097type GooglePrivacyDlpV2CustomInfoType struct { 2098 // DetectionRules: Set of detection rules to apply to all findings of 2099 // this CustomInfoType. 2100 // Rules are applied in order that they are specified. Not supported for 2101 // the 2102 // `surrogate_type` CustomInfoType. 2103 DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"` 2104 2105 // Dictionary: A list of phrases to detect as a CustomInfoType. 2106 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 2107 2108 // ExclusionType: If set to EXCLUSION_TYPE_EXCLUDE this infoType will 2109 // not cause a finding 2110 // to be returned. It still can be used for rules matching. 2111 // 2112 // Possible values: 2113 // "EXCLUSION_TYPE_UNSPECIFIED" - A finding of this custom info type 2114 // will not be excluded from results. 2115 // "EXCLUSION_TYPE_EXCLUDE" - A finding of this custom info type will 2116 // be excluded from final results, 2117 // but can still affect rule execution. 2118 ExclusionType string `json:"exclusionType,omitempty"` 2119 2120 // InfoType: CustomInfoType can either be a new infoType, or an 2121 // extension of built-in 2122 // infoType, when the name matches one of existing infoTypes and that 2123 // infoType 2124 // is specified in `InspectContent.info_types` field. Specifying the 2125 // latter 2126 // adds findings to the one detected by the system. If built-in info 2127 // type is 2128 // not specified in `InspectContent.info_types` list then the name is 2129 // treated 2130 // as a custom info type. 2131 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 2132 2133 // Likelihood: Likelihood to return for this CustomInfoType. This base 2134 // value can be 2135 // altered by a detection rule if the finding meets the criteria 2136 // specified by 2137 // the rule. Defaults to `VERY_LIKELY` if not specified. 2138 // 2139 // Possible values: 2140 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 2141 // "VERY_UNLIKELY" - Few matching elements. 2142 // "UNLIKELY" 2143 // "POSSIBLE" - Some matching elements. 2144 // "LIKELY" 2145 // "VERY_LIKELY" - Many matching elements. 2146 Likelihood string `json:"likelihood,omitempty"` 2147 2148 // Regex: Regular expression based CustomInfoType. 2149 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 2150 2151 // StoredType: Load an existing `StoredInfoType` resource for use 2152 // in 2153 // `InspectDataSource`. Not currently supported in `InspectContent`. 2154 StoredType *GooglePrivacyDlpV2StoredType `json:"storedType,omitempty"` 2155 2156 // SurrogateType: Message for detecting output from deidentification 2157 // transformations that 2158 // support reversing. 2159 SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"` 2160 2161 // ForceSendFields is a list of field names (e.g. "DetectionRules") to 2162 // unconditionally include in API requests. By default, fields with 2163 // empty values are omitted from API requests. However, any non-pointer, 2164 // non-interface field appearing in ForceSendFields will be sent to the 2165 // server regardless of whether the field is empty or not. This may be 2166 // used to include empty fields in Patch requests. 2167 ForceSendFields []string `json:"-"` 2168 2169 // NullFields is a list of field names (e.g. "DetectionRules") to 2170 // include in API requests with the JSON null value. By default, fields 2171 // with empty values are omitted from API requests. However, any field 2172 // with an empty value appearing in NullFields will be sent to the 2173 // server as null. It is an error if a field in this list has a 2174 // non-empty value. This may be used to include null fields in Patch 2175 // requests. 2176 NullFields []string `json:"-"` 2177} 2178 2179func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) { 2180 type NoMethod GooglePrivacyDlpV2CustomInfoType 2181 raw := NoMethod(*s) 2182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2183} 2184 2185// GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud 2186// Datastore. 2187type GooglePrivacyDlpV2DatastoreKey struct { 2188 // EntityKey: Datastore entity key. 2189 EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"` 2190 2191 // ForceSendFields is a list of field names (e.g. "EntityKey") to 2192 // unconditionally include in API requests. By default, fields with 2193 // empty values are omitted from API requests. However, any non-pointer, 2194 // non-interface field appearing in ForceSendFields will be sent to the 2195 // server regardless of whether the field is empty or not. This may be 2196 // used to include empty fields in Patch requests. 2197 ForceSendFields []string `json:"-"` 2198 2199 // NullFields is a list of field names (e.g. "EntityKey") to include in 2200 // API requests with the JSON null value. By default, fields with empty 2201 // values are omitted from API requests. However, any field with an 2202 // empty value appearing in NullFields will be sent to the server as 2203 // null. It is an error if a field in this list has a non-empty value. 2204 // This may be used to include null fields in Patch requests. 2205 NullFields []string `json:"-"` 2206} 2207 2208func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) { 2209 type NoMethod GooglePrivacyDlpV2DatastoreKey 2210 raw := NoMethod(*s) 2211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2212} 2213 2214// GooglePrivacyDlpV2DatastoreOptions: Options defining a data set 2215// within Google Cloud Datastore. 2216type GooglePrivacyDlpV2DatastoreOptions struct { 2217 // Kind: The kind to process. 2218 Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"` 2219 2220 // PartitionId: A partition ID identifies a grouping of entities. The 2221 // grouping is always 2222 // by project and namespace, however the namespace ID may be empty. 2223 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 2224 2225 // ForceSendFields is a list of field names (e.g. "Kind") to 2226 // unconditionally include in API requests. By default, fields with 2227 // empty values are omitted from API requests. However, any non-pointer, 2228 // non-interface field appearing in ForceSendFields will be sent to the 2229 // server regardless of whether the field is empty or not. This may be 2230 // used to include empty fields in Patch requests. 2231 ForceSendFields []string `json:"-"` 2232 2233 // NullFields is a list of field names (e.g. "Kind") to include in API 2234 // requests with the JSON null value. By default, fields with empty 2235 // values are omitted from API requests. However, any field with an 2236 // empty value appearing in NullFields will be sent to the server as 2237 // null. It is an error if a field in this list has a non-empty value. 2238 // This may be used to include null fields in Patch requests. 2239 NullFields []string `json:"-"` 2240} 2241 2242func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) { 2243 type NoMethod GooglePrivacyDlpV2DatastoreOptions 2244 raw := NoMethod(*s) 2245 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2246} 2247 2248// GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of 2249// days, with option to be consistent for the 2250// same context. See 2251// https://cloud.google.com/dlp/docs/concepts-date-shifting 2252// to learn more. 2253type GooglePrivacyDlpV2DateShiftConfig struct { 2254 // Context: Points to the field that contains the context, for example, 2255 // an entity id. 2256 // If set, must also set method. If set, shift will be consistent for 2257 // the 2258 // given context. 2259 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2260 2261 // CryptoKey: Causes the shift to be computed based on this key and the 2262 // context. This 2263 // results in the same shift for the same context and crypto_key. 2264 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2265 2266 // LowerBoundDays: For example, -5 means shift date to at most 5 days 2267 // back in the past. 2268 // [Required] 2269 LowerBoundDays int64 `json:"lowerBoundDays,omitempty"` 2270 2271 // UpperBoundDays: Range of shift in days. Actual shift will be selected 2272 // at random within this 2273 // range (inclusive ends). Negative means shift to earlier in time. Must 2274 // not 2275 // be more than 365250 days (1000 years) each direction. 2276 // 2277 // For example, 3 means shift date to at most 3 days into the 2278 // future. 2279 // [Required] 2280 UpperBoundDays int64 `json:"upperBoundDays,omitempty"` 2281 2282 // ForceSendFields is a list of field names (e.g. "Context") to 2283 // unconditionally include in API requests. By default, fields with 2284 // empty values are omitted from API requests. However, any non-pointer, 2285 // non-interface field appearing in ForceSendFields will be sent to the 2286 // server regardless of whether the field is empty or not. This may be 2287 // used to include empty fields in Patch requests. 2288 ForceSendFields []string `json:"-"` 2289 2290 // NullFields is a list of field names (e.g. "Context") to include in 2291 // API requests with the JSON null value. By default, fields with empty 2292 // values are omitted from API requests. However, any field with an 2293 // empty value appearing in NullFields will be sent to the server as 2294 // null. It is an error if a field in this list has a non-empty value. 2295 // This may be used to include null fields in Patch requests. 2296 NullFields []string `json:"-"` 2297} 2298 2299func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) { 2300 type NoMethod GooglePrivacyDlpV2DateShiftConfig 2301 raw := NoMethod(*s) 2302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2303} 2304 2305// GooglePrivacyDlpV2DateTime: Message for a date time object. 2306// e.g. 2018-01-01, 5th August. 2307type GooglePrivacyDlpV2DateTime struct { 2308 // Date: One or more of the following must be set. All fields are 2309 // optional, but 2310 // when set must be valid date or time values. 2311 Date *GoogleTypeDate `json:"date,omitempty"` 2312 2313 // Possible values: 2314 // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week. 2315 // "MONDAY" - The day-of-week of Monday. 2316 // "TUESDAY" - The day-of-week of Tuesday. 2317 // "WEDNESDAY" - The day-of-week of Wednesday. 2318 // "THURSDAY" - The day-of-week of Thursday. 2319 // "FRIDAY" - The day-of-week of Friday. 2320 // "SATURDAY" - The day-of-week of Saturday. 2321 // "SUNDAY" - The day-of-week of Sunday. 2322 DayOfWeek string `json:"dayOfWeek,omitempty"` 2323 2324 Time *GoogleTypeTimeOfDay `json:"time,omitempty"` 2325 2326 TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"` 2327 2328 // ForceSendFields is a list of field names (e.g. "Date") to 2329 // unconditionally include in API requests. By default, fields with 2330 // empty values are omitted from API requests. However, any non-pointer, 2331 // non-interface field appearing in ForceSendFields will be sent to the 2332 // server regardless of whether the field is empty or not. This may be 2333 // used to include empty fields in Patch requests. 2334 ForceSendFields []string `json:"-"` 2335 2336 // NullFields is a list of field names (e.g. "Date") to include in API 2337 // requests with the JSON null value. By default, fields with empty 2338 // values are omitted from API requests. However, any field with an 2339 // empty value appearing in NullFields will be sent to the server as 2340 // null. It is an error if a field in this list has a non-empty value. 2341 // This may be used to include null fields in Patch requests. 2342 NullFields []string `json:"-"` 2343} 2344 2345func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) { 2346 type NoMethod GooglePrivacyDlpV2DateTime 2347 raw := NoMethod(*s) 2348 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2349} 2350 2351// GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls 2352// how the data will change. 2353type GooglePrivacyDlpV2DeidentifyConfig struct { 2354 // InfoTypeTransformations: Treat the dataset as free-form text and 2355 // apply the same free text 2356 // transformation everywhere. 2357 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 2358 2359 // RecordTransformations: Treat the dataset as structured. 2360 // Transformations can be applied to 2361 // specific locations within structured datasets, such as transforming 2362 // a column within a table. 2363 RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"` 2364 2365 // ForceSendFields is a list of field names (e.g. 2366 // "InfoTypeTransformations") to unconditionally include in API 2367 // requests. By default, fields with empty values are omitted from API 2368 // requests. However, any non-pointer, non-interface field appearing in 2369 // ForceSendFields will be sent to the server regardless of whether the 2370 // field is empty or not. This may be used to include empty fields in 2371 // Patch requests. 2372 ForceSendFields []string `json:"-"` 2373 2374 // NullFields is a list of field names (e.g. "InfoTypeTransformations") 2375 // to include in API requests with the JSON null value. By default, 2376 // fields with empty values are omitted from API requests. However, any 2377 // field with an empty value appearing in NullFields will be sent to the 2378 // server as null. It is an error if a field in this list has a 2379 // non-empty value. This may be used to include null fields in Patch 2380 // requests. 2381 NullFields []string `json:"-"` 2382} 2383 2384func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) { 2385 type NoMethod GooglePrivacyDlpV2DeidentifyConfig 2386 raw := NoMethod(*s) 2387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2388} 2389 2390// GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a 2391// list of items. 2392type GooglePrivacyDlpV2DeidentifyContentRequest struct { 2393 // DeidentifyConfig: Configuration for the de-identification of the 2394 // content item. 2395 // Items specified here will override the template referenced by 2396 // the 2397 // deidentify_template_name argument. 2398 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2399 2400 // DeidentifyTemplateName: Optional template to use. Any configuration 2401 // directly specified in 2402 // deidentify_config will override those set in the template. Singular 2403 // fields 2404 // that are set in this request will replace their corresponding fields 2405 // in the 2406 // template. Repeated fields are appended. Singular sub-messages and 2407 // groups 2408 // are recursively merged. 2409 DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"` 2410 2411 // InspectConfig: Configuration for the inspector. 2412 // Items specified here will override the template referenced by 2413 // the 2414 // inspect_template_name argument. 2415 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 2416 2417 // InspectTemplateName: Optional template to use. Any configuration 2418 // directly specified in 2419 // inspect_config will override those set in the template. Singular 2420 // fields 2421 // that are set in this request will replace their corresponding fields 2422 // in the 2423 // template. Repeated fields are appended. Singular sub-messages and 2424 // groups 2425 // are recursively merged. 2426 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 2427 2428 // Item: The item to de-identify. Will be treated as text. 2429 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2430 2431 // Location: The geographic location to process de-identification. 2432 // Reserved for future 2433 // extensions. 2434 Location string `json:"location,omitempty"` 2435 2436 // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to 2437 // unconditionally include in API requests. By default, fields with 2438 // empty values are omitted from API requests. However, any non-pointer, 2439 // non-interface field appearing in ForceSendFields will be sent to the 2440 // server regardless of whether the field is empty or not. This may be 2441 // used to include empty fields in Patch requests. 2442 ForceSendFields []string `json:"-"` 2443 2444 // NullFields is a list of field names (e.g. "DeidentifyConfig") to 2445 // include in API requests with the JSON null value. By default, fields 2446 // with empty values are omitted from API requests. However, any field 2447 // with an empty value appearing in NullFields will be sent to the 2448 // server as null. It is an error if a field in this list has a 2449 // non-empty value. This may be used to include null fields in Patch 2450 // requests. 2451 NullFields []string `json:"-"` 2452} 2453 2454func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) { 2455 type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest 2456 raw := NoMethod(*s) 2457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2458} 2459 2460// GooglePrivacyDlpV2DeidentifyContentResponse: Results of 2461// de-identifying a ContentItem. 2462type GooglePrivacyDlpV2DeidentifyContentResponse struct { 2463 // Item: The de-identified item. 2464 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2465 2466 // Overview: An overview of the changes that were made on the `item`. 2467 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 2468 2469 // ServerResponse contains the HTTP response code and headers from the 2470 // server. 2471 googleapi.ServerResponse `json:"-"` 2472 2473 // ForceSendFields is a list of field names (e.g. "Item") to 2474 // unconditionally include in API requests. By default, fields with 2475 // empty values are omitted from API requests. However, any non-pointer, 2476 // non-interface field appearing in ForceSendFields will be sent to the 2477 // server regardless of whether the field is empty or not. This may be 2478 // used to include empty fields in Patch requests. 2479 ForceSendFields []string `json:"-"` 2480 2481 // NullFields is a list of field names (e.g. "Item") to include in API 2482 // requests with the JSON null value. By default, fields with empty 2483 // values are omitted from API requests. However, any field with an 2484 // empty value appearing in NullFields will be sent to the server as 2485 // null. It is an error if a field in this list has a non-empty value. 2486 // This may be used to include null fields in Patch requests. 2487 NullFields []string `json:"-"` 2488} 2489 2490func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) { 2491 type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse 2492 raw := NoMethod(*s) 2493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2494} 2495 2496// GooglePrivacyDlpV2DeidentifyTemplate: The DeidentifyTemplates 2497// contains instructions on how to deidentify content. 2498// See https://cloud.google.com/dlp/docs/concepts-templates to learn 2499// more. 2500type GooglePrivacyDlpV2DeidentifyTemplate struct { 2501 // CreateTime: The creation timestamp of a inspectTemplate, output only 2502 // field. 2503 CreateTime string `json:"createTime,omitempty"` 2504 2505 // DeidentifyConfig: ///////////// // The core content of the template 2506 // // /////////////// 2507 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2508 2509 // Description: Short description (max 256 chars). 2510 Description string `json:"description,omitempty"` 2511 2512 // DisplayName: Display name (max 256 chars). 2513 DisplayName string `json:"displayName,omitempty"` 2514 2515 // Name: The template name. Output only. 2516 // 2517 // The template will have one of the following 2518 // formats: 2519 // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` 2520 // OR 2521 // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 2522 Name string `json:"name,omitempty"` 2523 2524 // UpdateTime: The last update timestamp of a inspectTemplate, output 2525 // only field. 2526 UpdateTime string `json:"updateTime,omitempty"` 2527 2528 // ServerResponse contains the HTTP response code and headers from the 2529 // server. 2530 googleapi.ServerResponse `json:"-"` 2531 2532 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2533 // unconditionally include in API requests. By default, fields with 2534 // empty values are omitted from API requests. However, any non-pointer, 2535 // non-interface field appearing in ForceSendFields will be sent to the 2536 // server regardless of whether the field is empty or not. This may be 2537 // used to include empty fields in Patch requests. 2538 ForceSendFields []string `json:"-"` 2539 2540 // NullFields is a list of field names (e.g. "CreateTime") to include in 2541 // API requests with the JSON null value. By default, fields with empty 2542 // values are omitted from API requests. However, any field with an 2543 // empty value appearing in NullFields will be sent to the server as 2544 // null. It is an error if a field in this list has a non-empty value. 2545 // This may be used to include null fields in Patch requests. 2546 NullFields []string `json:"-"` 2547} 2548 2549func (s *GooglePrivacyDlpV2DeidentifyTemplate) MarshalJSON() ([]byte, error) { 2550 type NoMethod GooglePrivacyDlpV2DeidentifyTemplate 2551 raw := NoMethod(*s) 2552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2553} 2554 2555// GooglePrivacyDlpV2DeltaPresenceEstimationConfig: δ-presence metric, 2556// used to estimate how likely it is for an attacker to 2557// figure out that one given individual appears in a de-identified 2558// dataset. 2559// Similarly to the k-map metric, we cannot compute δ-presence exactly 2560// without 2561// knowing the attack dataset, so we use a statistical model instead. 2562type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct { 2563 // AuxiliaryTables: Several auxiliary tables can be used in the 2564 // analysis. Each custom_tag 2565 // used to tag a quasi-identifiers field must appear in exactly 2566 // one 2567 // field of one auxiliary table. 2568 AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"` 2569 2570 // QuasiIds: Fields considered to be quasi-identifiers. No two fields 2571 // can have the 2572 // same tag. [required] 2573 QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"` 2574 2575 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 2576 // modeling. 2577 // Required if no column is tagged with a region-specific InfoType 2578 // (like 2579 // US_ZIP_5) or a region code. 2580 RegionCode string `json:"regionCode,omitempty"` 2581 2582 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 2583 // unconditionally include in API requests. By default, fields with 2584 // empty values are omitted from API requests. However, any non-pointer, 2585 // non-interface field appearing in ForceSendFields will be sent to the 2586 // server regardless of whether the field is empty or not. This may be 2587 // used to include empty fields in Patch requests. 2588 ForceSendFields []string `json:"-"` 2589 2590 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 2591 // include in API requests with the JSON null value. By default, fields 2592 // with empty values are omitted from API requests. However, any field 2593 // with an empty value appearing in NullFields will be sent to the 2594 // server as null. It is an error if a field in this list has a 2595 // non-empty value. This may be used to include null fields in Patch 2596 // requests. 2597 NullFields []string `json:"-"` 2598} 2599 2600func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) { 2601 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig 2602 raw := NoMethod(*s) 2603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2604} 2605 2606// GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A 2607// DeltaPresenceEstimationHistogramBucket message with the 2608// following 2609// values: 2610// min_probability: 0.1 2611// max_probability: 0.2 2612// frequency: 42 2613// means that there are 42 records for which δ is in [0.1, 0.2). 2614// An 2615// important particular case is when min_probability = max_probability = 2616// 1: 2617// then, every individual who shares this quasi-identifier combination 2618// is in 2619// the dataset. 2620type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct { 2621 // BucketSize: Number of records within these probability bounds. 2622 BucketSize int64 `json:"bucketSize,omitempty,string"` 2623 2624 // BucketValueCount: Total number of distinct quasi-identifier tuple 2625 // values in this bucket. 2626 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 2627 2628 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 2629 // The total 2630 // number of classes returned per bucket is capped at 20. 2631 BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"` 2632 2633 // MaxProbability: Always greater than or equal to min_probability. 2634 MaxProbability float64 `json:"maxProbability,omitempty"` 2635 2636 // MinProbability: Between 0 and 1. 2637 MinProbability float64 `json:"minProbability,omitempty"` 2638 2639 // ForceSendFields is a list of field names (e.g. "BucketSize") to 2640 // unconditionally include in API requests. By default, fields with 2641 // empty values are omitted from API requests. However, any non-pointer, 2642 // non-interface field appearing in ForceSendFields will be sent to the 2643 // server regardless of whether the field is empty or not. This may be 2644 // used to include empty fields in Patch requests. 2645 ForceSendFields []string `json:"-"` 2646 2647 // NullFields is a list of field names (e.g. "BucketSize") to include in 2648 // API requests with the JSON null value. By default, fields with empty 2649 // values are omitted from API requests. However, any field with an 2650 // empty value appearing in NullFields will be sent to the server as 2651 // null. It is an error if a field in this list has a non-empty value. 2652 // This may be used to include null fields in Patch requests. 2653 NullFields []string `json:"-"` 2654} 2655 2656func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 2657 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2658 raw := NoMethod(*s) 2659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2660} 2661 2662func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error { 2663 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2664 var s1 struct { 2665 MaxProbability gensupport.JSONFloat64 `json:"maxProbability"` 2666 MinProbability gensupport.JSONFloat64 `json:"minProbability"` 2667 *NoMethod 2668 } 2669 s1.NoMethod = (*NoMethod)(s) 2670 if err := json.Unmarshal(data, &s1); err != nil { 2671 return err 2672 } 2673 s.MaxProbability = float64(s1.MaxProbability) 2674 s.MinProbability = float64(s1.MinProbability) 2675 return nil 2676} 2677 2678// GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of 2679// values for the quasi-identifier columns. 2680type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct { 2681 // EstimatedProbability: The estimated probability that a given 2682 // individual sharing these 2683 // quasi-identifier values is in the dataset. This value, typically 2684 // called 2685 // δ, is the ratio between the number of records in the dataset with 2686 // these 2687 // quasi-identifier values, and the total number of individuals 2688 // (inside 2689 // *and* outside the dataset) with these quasi-identifier values. 2690 // For example, if there are 15 individuals in the dataset who share 2691 // the 2692 // same quasi-identifier values, and an estimated 100 people in the 2693 // entire 2694 // population with these values, then δ is 0.15. 2695 EstimatedProbability float64 `json:"estimatedProbability,omitempty"` 2696 2697 // QuasiIdsValues: The quasi-identifier values. 2698 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 2699 2700 // ForceSendFields is a list of field names (e.g. 2701 // "EstimatedProbability") to unconditionally include in API requests. 2702 // By default, fields with empty values are omitted from API requests. 2703 // However, any non-pointer, non-interface field appearing in 2704 // ForceSendFields will be sent to the server regardless of whether the 2705 // field is empty or not. This may be used to include empty fields in 2706 // Patch requests. 2707 ForceSendFields []string `json:"-"` 2708 2709 // NullFields is a list of field names (e.g. "EstimatedProbability") to 2710 // include in API requests with the JSON null value. By default, fields 2711 // with empty values are omitted from API requests. However, any field 2712 // with an empty value appearing in NullFields will be sent to the 2713 // server as null. It is an error if a field in this list has a 2714 // non-empty value. This may be used to include null fields in Patch 2715 // requests. 2716 NullFields []string `json:"-"` 2717} 2718 2719func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 2720 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2721 raw := NoMethod(*s) 2722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2723} 2724 2725func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error { 2726 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2727 var s1 struct { 2728 EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"` 2729 *NoMethod 2730 } 2731 s1.NoMethod = (*NoMethod)(s) 2732 if err := json.Unmarshal(data, &s1); err != nil { 2733 return err 2734 } 2735 s.EstimatedProbability = float64(s1.EstimatedProbability) 2736 return nil 2737} 2738 2739// GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the 2740// δ-presence computation. Note that these results are an 2741// estimation, not exact values. 2742type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct { 2743 // DeltaPresenceEstimationHistogram: The intervals [min_probability, 2744 // max_probability) do not overlap. If a 2745 // value doesn't correspond to any such interval, the associated 2746 // frequency 2747 // is zero. For example, the following records: 2748 // {min_probability: 0, max_probability: 0.1, frequency: 17} 2749 // {min_probability: 0.2, max_probability: 0.3, frequency: 42} 2750 // {min_probability: 0.3, max_probability: 0.4, frequency: 99} 2751 // mean that there are no record with an estimated probability in [0.1, 2752 // 0.2) 2753 // nor larger or equal to 0.4. 2754 DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"` 2755 2756 // ForceSendFields is a list of field names (e.g. 2757 // "DeltaPresenceEstimationHistogram") to unconditionally include in API 2758 // requests. By default, fields with empty values are omitted from API 2759 // requests. However, any non-pointer, non-interface field appearing in 2760 // ForceSendFields will be sent to the server regardless of whether the 2761 // field is empty or not. This may be used to include empty fields in 2762 // Patch requests. 2763 ForceSendFields []string `json:"-"` 2764 2765 // NullFields is a list of field names (e.g. 2766 // "DeltaPresenceEstimationHistogram") to include in API requests with 2767 // the JSON null value. By default, fields with empty values are omitted 2768 // from API requests. However, any field with an empty value appearing 2769 // in NullFields will be sent to the server as null. It is an error if a 2770 // field in this list has a non-empty value. This may be used to include 2771 // null fields in Patch requests. 2772 NullFields []string `json:"-"` 2773} 2774 2775func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) { 2776 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult 2777 raw := NoMethod(*s) 2778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2779} 2780 2781// GooglePrivacyDlpV2DetectionRule: Deprecated; use `InspectionRuleSet` 2782// instead. Rule for modifying a 2783// `CustomInfoType` to alter behavior under certain circumstances, 2784// depending 2785// on the specific details of the rule. Not supported for the 2786// `surrogate_type` 2787// custom infoType. 2788type GooglePrivacyDlpV2DetectionRule struct { 2789 // HotwordRule: Hotword-based detection rule. 2790 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 2791 2792 // ForceSendFields is a list of field names (e.g. "HotwordRule") to 2793 // unconditionally include in API requests. By default, fields with 2794 // empty values are omitted from API requests. However, any non-pointer, 2795 // non-interface field appearing in ForceSendFields will be sent to the 2796 // server regardless of whether the field is empty or not. This may be 2797 // used to include empty fields in Patch requests. 2798 ForceSendFields []string `json:"-"` 2799 2800 // NullFields is a list of field names (e.g. "HotwordRule") to include 2801 // in API requests with the JSON null value. By default, fields with 2802 // empty values are omitted from API requests. However, any field with 2803 // an empty value appearing in NullFields will be sent to the server as 2804 // null. It is an error if a field in this list has a non-empty value. 2805 // This may be used to include null fields in Patch requests. 2806 NullFields []string `json:"-"` 2807} 2808 2809func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) { 2810 type NoMethod GooglePrivacyDlpV2DetectionRule 2811 raw := NoMethod(*s) 2812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2813} 2814 2815// GooglePrivacyDlpV2Dictionary: Custom information type based on a 2816// dictionary of words or phrases. This can 2817// be used to match sensitive information specific to the data, such as 2818// a list 2819// of employee IDs or job titles. 2820// 2821// Dictionary words are case-insensitive and all characters other than 2822// letters 2823// and digits in the unicode [Basic 2824// Multilingual 2825// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29# 2826// Basic_Multilingual_Plane) 2827// will be replaced with whitespace when scanning for matches, so 2828// the 2829// dictionary phrase "Sam Johnson" will match all three phrases "sam 2830// johnson", 2831// "Sam, Johnson", and "Sam (Johnson)". Additionally, the 2832// characters 2833// surrounding any match must be of a different type than the 2834// adjacent 2835// characters within the word, so letters must be next to non-letters 2836// and 2837// digits next to non-digits. For example, the dictionary word "jen" 2838// will 2839// match the first three letters of the text "jen123" but will return 2840// no 2841// matches for "jennifer". 2842// 2843// Dictionary words containing a large number of characters that are 2844// not 2845// letters or digits may result in unexpected findings because such 2846// characters 2847// are treated as whitespace. 2848// The 2849// [limits](https://cloud.google.com/dlp/limits) page contains details 2850// about 2851// the size limits of dictionaries. For dictionaries that do not fit 2852// within 2853// these constraints, consider using `LargeCustomDictionaryConfig` in 2854// the 2855// `StoredInfoType` API. 2856type GooglePrivacyDlpV2Dictionary struct { 2857 // CloudStoragePath: Newline-delimited file of words in Cloud Storage. 2858 // Only a single file 2859 // is accepted. 2860 CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"` 2861 2862 // WordList: List of words or phrases to search for. 2863 WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` 2864 2865 // ForceSendFields is a list of field names (e.g. "CloudStoragePath") to 2866 // unconditionally include in API requests. By default, fields with 2867 // empty values are omitted from API requests. However, any non-pointer, 2868 // non-interface field appearing in ForceSendFields will be sent to the 2869 // server regardless of whether the field is empty or not. This may be 2870 // used to include empty fields in Patch requests. 2871 ForceSendFields []string `json:"-"` 2872 2873 // NullFields is a list of field names (e.g. "CloudStoragePath") to 2874 // include in API requests with the JSON null value. By default, fields 2875 // with empty values are omitted from API requests. However, any field 2876 // with an empty value appearing in NullFields will be sent to the 2877 // server as null. It is an error if a field in this list has a 2878 // non-empty value. This may be used to include null fields in Patch 2879 // requests. 2880 NullFields []string `json:"-"` 2881} 2882 2883func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) { 2884 type NoMethod GooglePrivacyDlpV2Dictionary 2885 raw := NoMethod(*s) 2886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2887} 2888 2889// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP 2890// job. 2891type GooglePrivacyDlpV2DlpJob struct { 2892 // CreateTime: Time when the job was created. 2893 CreateTime string `json:"createTime,omitempty"` 2894 2895 // EndTime: Time when the job finished. 2896 EndTime string `json:"endTime,omitempty"` 2897 2898 // Errors: A stream of errors encountered running the job. 2899 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 2900 2901 // InspectDetails: Results from inspecting a data source. 2902 InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` 2903 2904 // JobTriggerName: If created by a job trigger, the resource name of the 2905 // trigger that 2906 // instantiated the job. 2907 JobTriggerName string `json:"jobTriggerName,omitempty"` 2908 2909 // Name: The server-assigned name. 2910 Name string `json:"name,omitempty"` 2911 2912 // RiskDetails: Results from analyzing risk of a data source. 2913 RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` 2914 2915 // StartTime: Time when the job started. 2916 StartTime string `json:"startTime,omitempty"` 2917 2918 // State: State of a job. 2919 // 2920 // Possible values: 2921 // "JOB_STATE_UNSPECIFIED" 2922 // "PENDING" - The job has not yet started. 2923 // "RUNNING" - The job is currently running. 2924 // "DONE" - The job is no longer running. 2925 // "CANCELED" - The job was canceled before it could complete. 2926 // "FAILED" - The job had an error and did not complete. 2927 State string `json:"state,omitempty"` 2928 2929 // Type: The type of job. 2930 // 2931 // Possible values: 2932 // "DLP_JOB_TYPE_UNSPECIFIED" 2933 // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 2934 // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 2935 Type string `json:"type,omitempty"` 2936 2937 // ServerResponse contains the HTTP response code and headers from the 2938 // server. 2939 googleapi.ServerResponse `json:"-"` 2940 2941 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2942 // unconditionally include in API requests. By default, fields with 2943 // empty values are omitted from API requests. However, any non-pointer, 2944 // non-interface field appearing in ForceSendFields will be sent to the 2945 // server regardless of whether the field is empty or not. This may be 2946 // used to include empty fields in Patch requests. 2947 ForceSendFields []string `json:"-"` 2948 2949 // NullFields is a list of field names (e.g. "CreateTime") to include in 2950 // API requests with the JSON null value. By default, fields with empty 2951 // values are omitted from API requests. However, any field with an 2952 // empty value appearing in NullFields will be sent to the server as 2953 // null. It is an error if a field in this list has a non-empty value. 2954 // This may be used to include null fields in Patch requests. 2955 NullFields []string `json:"-"` 2956} 2957 2958func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { 2959 type NoMethod GooglePrivacyDlpV2DlpJob 2960 raw := NoMethod(*s) 2961 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2962} 2963 2964// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a 2965// document. 2966type GooglePrivacyDlpV2DocumentLocation struct { 2967 // FileOffset: Offset of the line, from the beginning of the file, where 2968 // the finding 2969 // is located. 2970 FileOffset int64 `json:"fileOffset,omitempty,string"` 2971 2972 // ForceSendFields is a list of field names (e.g. "FileOffset") to 2973 // unconditionally include in API requests. By default, fields with 2974 // empty values are omitted from API requests. However, any non-pointer, 2975 // non-interface field appearing in ForceSendFields will be sent to the 2976 // server regardless of whether the field is empty or not. This may be 2977 // used to include empty fields in Patch requests. 2978 ForceSendFields []string `json:"-"` 2979 2980 // NullFields is a list of field names (e.g. "FileOffset") to include in 2981 // API requests with the JSON null value. By default, fields with empty 2982 // values are omitted from API requests. However, any field with an 2983 // empty value appearing in NullFields will be sent to the server as 2984 // null. It is an error if a field in this list has a non-empty value. 2985 // This may be used to include null fields in Patch requests. 2986 NullFields []string `json:"-"` 2987} 2988 2989func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { 2990 type NoMethod GooglePrivacyDlpV2DocumentLocation 2991 raw := NoMethod(*s) 2992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2993} 2994 2995// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set 2996// of fields that correspond to a 2997// single person. For example, in medical records the `EntityId` might 2998// be a 2999// patient identifier, or for financial records it might be an 3000// account 3001// identifier. This message is used when generalizations or analysis 3002// must take 3003// into account that multiple rows correspond to the same entity. 3004type GooglePrivacyDlpV2EntityId struct { 3005 // Field: Composite key indicating which field contains the entity 3006 // identifier. 3007 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 3008 3009 // ForceSendFields is a list of field names (e.g. "Field") to 3010 // unconditionally include in API requests. By default, fields with 3011 // empty values are omitted from API requests. However, any non-pointer, 3012 // non-interface field appearing in ForceSendFields will be sent to the 3013 // server regardless of whether the field is empty or not. This may be 3014 // used to include empty fields in Patch requests. 3015 ForceSendFields []string `json:"-"` 3016 3017 // NullFields is a list of field names (e.g. "Field") to include in API 3018 // requests with the JSON null value. By default, fields with empty 3019 // values are omitted from API requests. However, any field with an 3020 // empty value appearing in NullFields will be sent to the server as 3021 // null. It is an error if a field in this list has a non-empty value. 3022 // This may be used to include null fields in Patch requests. 3023 NullFields []string `json:"-"` 3024} 3025 3026func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { 3027 type NoMethod GooglePrivacyDlpV2EntityId 3028 raw := NoMethod(*s) 3029 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3030} 3031 3032// GooglePrivacyDlpV2Error: Details information about an error 3033// encountered during job execution or 3034// the results of an unsuccessful activation of the JobTrigger. 3035// Output only field. 3036type GooglePrivacyDlpV2Error struct { 3037 Details *GoogleRpcStatus `json:"details,omitempty"` 3038 3039 // Timestamps: The times the error occurred. 3040 Timestamps []string `json:"timestamps,omitempty"` 3041 3042 // ForceSendFields is a list of field names (e.g. "Details") to 3043 // unconditionally include in API requests. By default, fields with 3044 // empty values are omitted from API requests. However, any non-pointer, 3045 // non-interface field appearing in ForceSendFields will be sent to the 3046 // server regardless of whether the field is empty or not. This may be 3047 // used to include empty fields in Patch requests. 3048 ForceSendFields []string `json:"-"` 3049 3050 // NullFields is a list of field names (e.g. "Details") to include in 3051 // API requests with the JSON null value. By default, fields with empty 3052 // values are omitted from API requests. However, any field with an 3053 // empty value appearing in NullFields will be sent to the server as 3054 // null. It is an error if a field in this list has a non-empty value. 3055 // This may be used to include null fields in Patch requests. 3056 NullFields []string `json:"-"` 3057} 3058 3059func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { 3060 type NoMethod GooglePrivacyDlpV2Error 3061 raw := NoMethod(*s) 3062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3063} 3064 3065// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes. 3066type GooglePrivacyDlpV2ExcludeInfoTypes struct { 3067 // InfoTypes: InfoType list in ExclusionRule rule drops a finding when 3068 // it overlaps or 3069 // contained within with a finding of an infoType from this list. 3070 // For 3071 // example, for `InspectionRuleSet.info_types` containing 3072 // "PHONE_NUMBER" and 3073 // `exclusion_rule` containing `exclude_info_types.info_types` 3074 // with 3075 // "EMAIL_ADDRESS" the phone number findings are dropped if they 3076 // overlap 3077 // with EMAIL_ADDRESS finding. 3078 // That leads to "555-222-2222@example.org" to generate only a 3079 // single 3080 // finding, namely email address. 3081 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3082 3083 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3084 // unconditionally include in API requests. By default, fields with 3085 // empty values are omitted from API requests. However, any non-pointer, 3086 // non-interface field appearing in ForceSendFields will be sent to the 3087 // server regardless of whether the field is empty or not. This may be 3088 // used to include empty fields in Patch requests. 3089 ForceSendFields []string `json:"-"` 3090 3091 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3092 // API requests with the JSON null value. By default, fields with empty 3093 // values are omitted from API requests. However, any field with an 3094 // empty value appearing in NullFields will be sent to the server as 3095 // null. It is an error if a field in this list has a non-empty value. 3096 // This may be used to include null fields in Patch requests. 3097 NullFields []string `json:"-"` 3098} 3099 3100func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { 3101 type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes 3102 raw := NoMethod(*s) 3103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3104} 3105 3106// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions 3107// when findings of infoTypes specified in 3108// `InspectionRuleSet` are removed from results. 3109type GooglePrivacyDlpV2ExclusionRule struct { 3110 // Dictionary: Dictionary which defines the rule. 3111 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 3112 3113 // ExcludeInfoTypes: Set of infoTypes for which findings would affect 3114 // this rule. 3115 ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` 3116 3117 // MatchingType: How the rule is applied, see MatchingType documentation 3118 // for details. 3119 // 3120 // Possible values: 3121 // "MATCHING_TYPE_UNSPECIFIED" - Invalid. 3122 // "MATCHING_TYPE_FULL_MATCH" - Full match. 3123 // 3124 // - Dictionary: join of Dictionary results matched complete finding 3125 // quote 3126 // - Regex: all regex matches fill a finding quote start to end 3127 // - Exclude info type: completely inside affecting info types findings 3128 // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. 3129 // 3130 // - Dictionary: at least one of the tokens in the finding matches 3131 // - Regex: substring of the finding matches 3132 // - Exclude info type: intersects with affecting info types findings 3133 // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. 3134 // 3135 // - Dictionary: no tokens in the finding match the dictionary 3136 // - Regex: finding doesn't match the regex 3137 // - Exclude info type: no intersection with affecting info types 3138 // findings 3139 MatchingType string `json:"matchingType,omitempty"` 3140 3141 // Regex: Regular expression which defines the rule. 3142 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 3143 3144 // ForceSendFields is a list of field names (e.g. "Dictionary") to 3145 // unconditionally include in API requests. By default, fields with 3146 // empty values are omitted from API requests. However, any non-pointer, 3147 // non-interface field appearing in ForceSendFields will be sent to the 3148 // server regardless of whether the field is empty or not. This may be 3149 // used to include empty fields in Patch requests. 3150 ForceSendFields []string `json:"-"` 3151 3152 // NullFields is a list of field names (e.g. "Dictionary") to include in 3153 // API requests with the JSON null value. By default, fields with empty 3154 // values are omitted from API requests. However, any field with an 3155 // empty value appearing in NullFields will be sent to the server as 3156 // null. It is an error if a field in this list has a non-empty value. 3157 // This may be used to include null fields in Patch requests. 3158 NullFields []string `json:"-"` 3159} 3160 3161func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { 3162 type NoMethod GooglePrivacyDlpV2ExclusionRule 3163 raw := NoMethod(*s) 3164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3165} 3166 3167// GooglePrivacyDlpV2Expressions: An expression, consisting or an 3168// operator and conditions. 3169type GooglePrivacyDlpV2Expressions struct { 3170 Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` 3171 3172 // LogicalOperator: The operator to apply to the result of conditions. 3173 // Default and currently 3174 // only supported value is `AND`. 3175 // 3176 // Possible values: 3177 // "LOGICAL_OPERATOR_UNSPECIFIED" 3178 // "AND" 3179 LogicalOperator string `json:"logicalOperator,omitempty"` 3180 3181 // ForceSendFields is a list of field names (e.g. "Conditions") to 3182 // unconditionally include in API requests. By default, fields with 3183 // empty values are omitted from API requests. However, any non-pointer, 3184 // non-interface field appearing in ForceSendFields will be sent to the 3185 // server regardless of whether the field is empty or not. This may be 3186 // used to include empty fields in Patch requests. 3187 ForceSendFields []string `json:"-"` 3188 3189 // NullFields is a list of field names (e.g. "Conditions") to include in 3190 // API requests with the JSON null value. By default, fields with empty 3191 // values are omitted from API requests. However, any field with an 3192 // empty value appearing in NullFields will be sent to the server as 3193 // null. It is an error if a field in this list has a non-empty value. 3194 // This may be used to include null fields in Patch requests. 3195 NullFields []string `json:"-"` 3196} 3197 3198func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { 3199 type NoMethod GooglePrivacyDlpV2Expressions 3200 raw := NoMethod(*s) 3201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3202} 3203 3204// GooglePrivacyDlpV2FieldId: General identifier of a data field in a 3205// storage service. 3206type GooglePrivacyDlpV2FieldId struct { 3207 // Name: Name describing the field. 3208 Name string `json:"name,omitempty"` 3209 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 3218 // NullFields is a list of field names (e.g. "Name") to include in API 3219 // requests with the JSON null value. By default, fields with empty 3220 // values are omitted from API requests. However, any field with an 3221 // empty value appearing in NullFields will be sent to the server as 3222 // null. It is an error if a field in this list has a non-empty value. 3223 // This may be used to include null fields in Patch requests. 3224 NullFields []string `json:"-"` 3225} 3226 3227func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { 3228 type NoMethod GooglePrivacyDlpV2FieldId 3229 raw := NoMethod(*s) 3230 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3231} 3232 3233// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to 3234// the field. 3235type GooglePrivacyDlpV2FieldTransformation struct { 3236 // Condition: Only apply the transformation if the condition evaluates 3237 // to true for the 3238 // given `RecordCondition`. The conditions are allowed to reference 3239 // fields 3240 // that are not used in the actual transformation. [optional] 3241 // 3242 // Example Use Cases: 3243 // 3244 // - Apply a different bucket transformation to an age column if the zip 3245 // code 3246 // column for the same record is within a specific range. 3247 // - Redact a field if the date of birth field is greater than 85. 3248 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 3249 3250 // Fields: Input field(s) to apply the transformation to. [required] 3251 Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` 3252 3253 // InfoTypeTransformations: Treat the contents of the field as free 3254 // text, and selectively 3255 // transform content that matches an `InfoType`. 3256 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 3257 3258 // PrimitiveTransformation: Apply the transformation to the entire 3259 // field. 3260 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3261 3262 // ForceSendFields is a list of field names (e.g. "Condition") 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 3270 // NullFields is a list of field names (e.g. "Condition") to include in 3271 // API requests with the JSON null value. By default, fields with empty 3272 // values are omitted from API requests. However, any field with an 3273 // empty value appearing in NullFields will be sent to the server as 3274 // null. It is an error if a field in this list has a non-empty value. 3275 // This may be used to include null fields in Patch requests. 3276 NullFields []string `json:"-"` 3277} 3278 3279func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { 3280 type NoMethod GooglePrivacyDlpV2FieldTransformation 3281 raw := NoMethod(*s) 3282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3283} 3284 3285// GooglePrivacyDlpV2FileSet: Set of files to scan. 3286type GooglePrivacyDlpV2FileSet struct { 3287 // RegexFileSet: The regex-filtered set of files to scan. Exactly one of 3288 // `url` or 3289 // `regex_file_set` must be set. 3290 RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` 3291 3292 // Url: The Cloud Storage url of the file(s) to scan, in the 3293 // format 3294 // `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed. 3295 // 3296 // If the url ends in a trailing slash, the bucket or directory 3297 // represented 3298 // by the url will be scanned non-recursively (content in 3299 // sub-directories 3300 // will not be scanned). This means that `gs://mybucket/` is equivalent 3301 // to 3302 // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent 3303 // to 3304 // `gs://mybucket/directory/*`. 3305 // 3306 // Exactly one of `url` or `regex_file_set` must be set. 3307 Url string `json:"url,omitempty"` 3308 3309 // ForceSendFields is a list of field names (e.g. "RegexFileSet") to 3310 // unconditionally include in API requests. By default, fields with 3311 // empty values are omitted from API requests. However, any non-pointer, 3312 // non-interface field appearing in ForceSendFields will be sent to the 3313 // server regardless of whether the field is empty or not. This may be 3314 // used to include empty fields in Patch requests. 3315 ForceSendFields []string `json:"-"` 3316 3317 // NullFields is a list of field names (e.g. "RegexFileSet") to include 3318 // in API requests with the JSON null value. By default, fields with 3319 // empty values are omitted from API requests. However, any field with 3320 // an empty value appearing in NullFields will be sent to the server as 3321 // null. It is an error if a field in this list has a non-empty value. 3322 // This may be used to include null fields in Patch requests. 3323 NullFields []string `json:"-"` 3324} 3325 3326func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { 3327 type NoMethod GooglePrivacyDlpV2FileSet 3328 raw := NoMethod(*s) 3329 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3330} 3331 3332// GooglePrivacyDlpV2Finding: Represents a piece of potentially 3333// sensitive content. 3334type GooglePrivacyDlpV2Finding struct { 3335 // CreateTime: Timestamp when finding was detected. 3336 CreateTime string `json:"createTime,omitempty"` 3337 3338 // InfoType: The type of content that might have been found. 3339 // Provided if `excluded_types` is false. 3340 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3341 3342 // Likelihood: Confidence of how likely it is that the `info_type` is 3343 // correct. 3344 // 3345 // Possible values: 3346 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 3347 // "VERY_UNLIKELY" - Few matching elements. 3348 // "UNLIKELY" 3349 // "POSSIBLE" - Some matching elements. 3350 // "LIKELY" 3351 // "VERY_LIKELY" - Many matching elements. 3352 Likelihood string `json:"likelihood,omitempty"` 3353 3354 // Location: Where the content was found. 3355 Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` 3356 3357 // Quote: The content that was found. Even if the content is not 3358 // textual, it 3359 // may be converted to a textual representation here. 3360 // Provided if `include_quote` is true and the finding is 3361 // less than or equal to 4096 bytes long. If the finding exceeds 4096 3362 // bytes 3363 // in length, the quote may be omitted. 3364 Quote string `json:"quote,omitempty"` 3365 3366 // QuoteInfo: Contains data parsed from quotes. Only populated if 3367 // include_quote was set 3368 // to true and a supported infoType was requested. Currently 3369 // supported 3370 // infoTypes: DATE, DATE_OF_BIRTH and TIME. 3371 QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` 3372 3373 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3374 // unconditionally include in API requests. By default, fields with 3375 // empty values are omitted from API requests. However, any non-pointer, 3376 // non-interface field appearing in ForceSendFields will be sent to the 3377 // server regardless of whether the field is empty or not. This may be 3378 // used to include empty fields in Patch requests. 3379 ForceSendFields []string `json:"-"` 3380 3381 // NullFields is a list of field names (e.g. "CreateTime") to include in 3382 // API requests with the JSON null value. By default, fields with empty 3383 // values are omitted from API requests. However, any field with an 3384 // empty value appearing in NullFields will be sent to the server as 3385 // null. It is an error if a field in this list has a non-empty value. 3386 // This may be used to include null fields in Patch requests. 3387 NullFields []string `json:"-"` 3388} 3389 3390func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { 3391 type NoMethod GooglePrivacyDlpV2Finding 3392 raw := NoMethod(*s) 3393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3394} 3395 3396type GooglePrivacyDlpV2FindingLimits struct { 3397 // MaxFindingsPerInfoType: Configuration of findings limit given for 3398 // specified infoTypes. 3399 MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` 3400 3401 // MaxFindingsPerItem: Max number of findings that will be returned for 3402 // each item scanned. 3403 // When set within `InspectDataSourceRequest`, 3404 // the maximum returned is 2000 regardless if this is set higher. 3405 // When set within `InspectContentRequest`, this field is ignored. 3406 MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` 3407 3408 // MaxFindingsPerRequest: Max number of findings that will be returned 3409 // per request/job. 3410 // When set within `InspectContentRequest`, the maximum returned is 3411 // 2000 3412 // regardless if this is set higher. 3413 MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` 3414 3415 // ForceSendFields is a list of field names (e.g. 3416 // "MaxFindingsPerInfoType") to unconditionally include in API requests. 3417 // By default, fields with empty values are omitted from API requests. 3418 // However, any non-pointer, non-interface field appearing in 3419 // ForceSendFields will be sent to the server regardless of whether the 3420 // field is empty or not. This may be used to include empty fields in 3421 // Patch requests. 3422 ForceSendFields []string `json:"-"` 3423 3424 // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") 3425 // to include in API requests with the JSON null value. By default, 3426 // fields with empty values are omitted from API requests. However, any 3427 // field with an empty value appearing in NullFields will be sent to the 3428 // server as null. It is an error if a field in this list has a 3429 // non-empty value. This may be used to include null fields in Patch 3430 // requests. 3431 NullFields []string `json:"-"` 3432} 3433 3434func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { 3435 type NoMethod GooglePrivacyDlpV2FindingLimits 3436 raw := NoMethod(*s) 3437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3438} 3439 3440// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on 3441// fixed size ranges. The 3442// Bucketing transformation can provide all of this functionality, 3443// but requires more configuration. This message is provided as a 3444// convenience to 3445// the user for simple bucketing strategies. 3446// 3447// The transformed value will be a hyphenated string 3448// of 3449// <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound 3450// = 20 3451// all values that are within this bucket will be replaced with 3452// "10-20". 3453// 3454// This can be used on data of type: double, long. 3455// 3456// If the bound Value type differs from the type of data 3457// being transformed, we will first attempt converting the type of the 3458// data to 3459// be transformed to match the type of the bound before comparing. 3460// 3461// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn 3462// more. 3463type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { 3464 // BucketSize: Size of each bucket (except for minimum and maximum 3465 // buckets). So if 3466 // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then 3467 // the 3468 // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 3469 // 50-60, 3470 // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. 3471 // [Required]. 3472 BucketSize float64 `json:"bucketSize,omitempty"` 3473 3474 // LowerBound: Lower bound value of buckets. All values less than 3475 // `lower_bound` are 3476 // grouped together into a single bucket; for example if `lower_bound` = 3477 // 10, 3478 // then all values less than 10 are replaced with the value “-10”. 3479 // [Required]. 3480 LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` 3481 3482 // UpperBound: Upper bound value of buckets. All values greater than 3483 // upper_bound are 3484 // grouped together into a single bucket; for example if `upper_bound` = 3485 // 89, 3486 // then all values greater than 89 are replaced with the value 3487 // “89+”. 3488 // [Required]. 3489 UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` 3490 3491 // ForceSendFields is a list of field names (e.g. "BucketSize") to 3492 // unconditionally include in API requests. By default, fields with 3493 // empty values are omitted from API requests. However, any non-pointer, 3494 // non-interface field appearing in ForceSendFields will be sent to the 3495 // server regardless of whether the field is empty or not. This may be 3496 // used to include empty fields in Patch requests. 3497 ForceSendFields []string `json:"-"` 3498 3499 // NullFields is a list of field names (e.g. "BucketSize") to include in 3500 // API requests with the JSON null value. By default, fields with empty 3501 // values are omitted from API requests. However, any field with an 3502 // empty value appearing in NullFields will be sent to the server as 3503 // null. It is an error if a field in this list has a non-empty value. 3504 // This may be used to include null fields in Patch requests. 3505 NullFields []string `json:"-"` 3506} 3507 3508func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { 3509 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3510 raw := NoMethod(*s) 3511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3512} 3513 3514func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { 3515 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3516 var s1 struct { 3517 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 3518 *NoMethod 3519 } 3520 s1.NoMethod = (*NoMethod)(s) 3521 if err := json.Unmarshal(data, &s1); err != nil { 3522 return err 3523 } 3524 s.BucketSize = float64(s1.BucketSize) 3525 return nil 3526} 3527 3528// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood 3529// of findings within a certain 3530// proximity of hotwords. 3531type GooglePrivacyDlpV2HotwordRule struct { 3532 // HotwordRegex: Regular expression pattern defining what qualifies as a 3533 // hotword. 3534 HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` 3535 3536 // LikelihoodAdjustment: Likelihood adjustment to apply to all matching 3537 // findings. 3538 LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` 3539 3540 // Proximity: Proximity of the finding within which the entire hotword 3541 // must reside. 3542 // The total length of the window cannot exceed 1000 characters. Note 3543 // that 3544 // the finding itself will be included in the window, so that hotwords 3545 // may 3546 // be used to match substrings of the finding itself. For example, 3547 // the 3548 // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could 3549 // be 3550 // adjusted upwards if the area code is known to be the local area code 3551 // of 3552 // a company office using the hotword regex "\(xxx\)", where "xxx" 3553 // is the area code in question. 3554 Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` 3555 3556 // ForceSendFields is a list of field names (e.g. "HotwordRegex") to 3557 // unconditionally include in API requests. By default, fields with 3558 // empty values are omitted from API requests. However, any non-pointer, 3559 // non-interface field appearing in ForceSendFields will be sent to the 3560 // server regardless of whether the field is empty or not. This may be 3561 // used to include empty fields in Patch requests. 3562 ForceSendFields []string `json:"-"` 3563 3564 // NullFields is a list of field names (e.g. "HotwordRegex") to include 3565 // in API requests with the JSON null value. By default, fields with 3566 // empty values are omitted from API requests. However, any field with 3567 // an empty value appearing in NullFields will be sent to the server as 3568 // null. It is an error if a field in this list has a non-empty value. 3569 // This may be used to include null fields in Patch requests. 3570 NullFields []string `json:"-"` 3571} 3572 3573func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { 3574 type NoMethod GooglePrivacyDlpV2HotwordRule 3575 raw := NoMethod(*s) 3576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3577} 3578 3579// GooglePrivacyDlpV2ImageLocation: Location of the finding within an 3580// image. 3581type GooglePrivacyDlpV2ImageLocation struct { 3582 // BoundingBoxes: Bounding boxes locating the pixels within the image 3583 // containing the finding. 3584 BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` 3585 3586 // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to 3587 // unconditionally include in API requests. By default, fields with 3588 // empty values are omitted from API requests. However, any non-pointer, 3589 // non-interface field appearing in ForceSendFields will be sent to the 3590 // server regardless of whether the field is empty or not. This may be 3591 // used to include empty fields in Patch requests. 3592 ForceSendFields []string `json:"-"` 3593 3594 // NullFields is a list of field names (e.g. "BoundingBoxes") to include 3595 // in API requests with the JSON null value. By default, fields with 3596 // empty values are omitted from API requests. However, any field with 3597 // an empty value appearing in NullFields will be sent to the server as 3598 // null. It is an error if a field in this list has a non-empty value. 3599 // This may be used to include null fields in Patch requests. 3600 NullFields []string `json:"-"` 3601} 3602 3603func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { 3604 type NoMethod GooglePrivacyDlpV2ImageLocation 3605 raw := NoMethod(*s) 3606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3607} 3608 3609// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining 3610// how redaction of images should occur. 3611type GooglePrivacyDlpV2ImageRedactionConfig struct { 3612 // InfoType: Only one per info_type should be provided per request. If 3613 // not 3614 // specified, and redact_all_text is false, the DLP API will redact 3615 // all 3616 // text that it matches against all info_types that are found, but 3617 // not 3618 // specified in another ImageRedactionConfig. 3619 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3620 3621 // RedactAllText: If true, all text found in the image, regardless 3622 // whether it matches an 3623 // info_type, is redacted. Only one should be provided. 3624 RedactAllText bool `json:"redactAllText,omitempty"` 3625 3626 // RedactionColor: The color to use when redacting content from an 3627 // image. If not specified, 3628 // the default is black. 3629 RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` 3630 3631 // ForceSendFields is a list of field names (e.g. "InfoType") to 3632 // unconditionally include in API requests. By default, fields with 3633 // empty values are omitted from API requests. However, any non-pointer, 3634 // non-interface field appearing in ForceSendFields will be sent to the 3635 // server regardless of whether the field is empty or not. This may be 3636 // used to include empty fields in Patch requests. 3637 ForceSendFields []string `json:"-"` 3638 3639 // NullFields is a list of field names (e.g. "InfoType") to include in 3640 // API requests with the JSON null value. By default, fields with empty 3641 // values are omitted from API requests. However, any field with an 3642 // empty value appearing in NullFields will be sent to the server as 3643 // null. It is an error if a field in this list has a non-empty value. 3644 // This may be used to include null fields in Patch requests. 3645 NullFields []string `json:"-"` 3646} 3647 3648func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { 3649 type NoMethod GooglePrivacyDlpV2ImageRedactionConfig 3650 raw := NoMethod(*s) 3651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3652} 3653 3654// GooglePrivacyDlpV2InfoType: Type of information detected by the API. 3655type GooglePrivacyDlpV2InfoType struct { 3656 // Name: Name of the information type. Either a name of your choosing 3657 // when 3658 // creating a CustomInfoType, or one of the names listed 3659 // at https://cloud.google.com/dlp/docs/infotypes-reference when 3660 // specifying 3661 // a built-in type. InfoType names should conform to the 3662 // pattern 3663 // [a-zA-Z0-9_]{1,64}. 3664 Name string `json:"name,omitempty"` 3665 3666 // ForceSendFields is a list of field names (e.g. "Name") to 3667 // unconditionally include in API requests. By default, fields with 3668 // empty values are omitted from API requests. However, any non-pointer, 3669 // non-interface field appearing in ForceSendFields will be sent to the 3670 // server regardless of whether the field is empty or not. This may be 3671 // used to include empty fields in Patch requests. 3672 ForceSendFields []string `json:"-"` 3673 3674 // NullFields is a list of field names (e.g. "Name") to include in API 3675 // requests with the JSON null value. By default, fields with empty 3676 // values are omitted from API requests. However, any field with an 3677 // empty value appearing in NullFields will be sent to the server as 3678 // null. It is an error if a field in this list has a non-empty value. 3679 // This may be used to include null fields in Patch requests. 3680 NullFields []string `json:"-"` 3681} 3682 3683func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { 3684 type NoMethod GooglePrivacyDlpV2InfoType 3685 raw := NoMethod(*s) 3686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3687} 3688 3689// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. 3690type GooglePrivacyDlpV2InfoTypeDescription struct { 3691 // Description: Description of the infotype. Translated when language is 3692 // provided in the 3693 // request. 3694 Description string `json:"description,omitempty"` 3695 3696 // DisplayName: Human readable form of the infoType name. 3697 DisplayName string `json:"displayName,omitempty"` 3698 3699 // Name: Internal name of the infoType. 3700 Name string `json:"name,omitempty"` 3701 3702 // SupportedBy: Which parts of the API supports this InfoType. 3703 // 3704 // Possible values: 3705 // "ENUM_TYPE_UNSPECIFIED" 3706 // "INSPECT" - Supported by the inspect operations. 3707 // "RISK_ANALYSIS" - Supported by the risk analysis operations. 3708 SupportedBy []string `json:"supportedBy,omitempty"` 3709 3710 // ForceSendFields is a list of field names (e.g. "Description") to 3711 // unconditionally include in API requests. By default, fields with 3712 // empty values are omitted from API requests. However, any non-pointer, 3713 // non-interface field appearing in ForceSendFields will be sent to the 3714 // server regardless of whether the field is empty or not. This may be 3715 // used to include empty fields in Patch requests. 3716 ForceSendFields []string `json:"-"` 3717 3718 // NullFields is a list of field names (e.g. "Description") to include 3719 // in API requests with the JSON null value. By default, fields with 3720 // empty values are omitted from API requests. However, any field with 3721 // an empty value appearing in NullFields will be sent to the server as 3722 // null. It is an error if a field in this list has a non-empty value. 3723 // This may be used to include null fields in Patch requests. 3724 NullFields []string `json:"-"` 3725} 3726 3727func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { 3728 type NoMethod GooglePrivacyDlpV2InfoTypeDescription 3729 raw := NoMethod(*s) 3730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3731} 3732 3733// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per 3734// infoType, per content item or long 3735// running DlpJob. 3736type GooglePrivacyDlpV2InfoTypeLimit struct { 3737 // InfoType: Type of information the findings limit applies to. Only one 3738 // limit per 3739 // info_type should be provided. If InfoTypeLimit does not have 3740 // an 3741 // info_type, the DLP API applies the limit against all info_types 3742 // that 3743 // are found but not specified in another InfoTypeLimit. 3744 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3745 3746 // MaxFindings: Max findings limit for the given infoType. 3747 MaxFindings int64 `json:"maxFindings,omitempty"` 3748 3749 // ForceSendFields is a list of field names (e.g. "InfoType") to 3750 // unconditionally include in API requests. By default, fields with 3751 // empty values are omitted from API requests. However, any non-pointer, 3752 // non-interface field appearing in ForceSendFields will be sent to the 3753 // server regardless of whether the field is empty or not. This may be 3754 // used to include empty fields in Patch requests. 3755 ForceSendFields []string `json:"-"` 3756 3757 // NullFields is a list of field names (e.g. "InfoType") to include in 3758 // API requests with the JSON null value. By default, fields with empty 3759 // values are omitted from API requests. However, any field with an 3760 // empty value appearing in NullFields will be sent to the server as 3761 // null. It is an error if a field in this list has a non-empty value. 3762 // This may be used to include null fields in Patch requests. 3763 NullFields []string `json:"-"` 3764} 3765 3766func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { 3767 type NoMethod GooglePrivacyDlpV2InfoTypeLimit 3768 raw := NoMethod(*s) 3769 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3770} 3771 3772// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific 3773// InfoType. 3774type GooglePrivacyDlpV2InfoTypeStats struct { 3775 // Count: Number of findings for this infoType. 3776 Count int64 `json:"count,omitempty,string"` 3777 3778 // InfoType: The type of finding this stat is for. 3779 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3780 3781 // ForceSendFields is a list of field names (e.g. "Count") to 3782 // unconditionally include in API requests. By default, fields with 3783 // empty values are omitted from API requests. However, any non-pointer, 3784 // non-interface field appearing in ForceSendFields will be sent to the 3785 // server regardless of whether the field is empty or not. This may be 3786 // used to include empty fields in Patch requests. 3787 ForceSendFields []string `json:"-"` 3788 3789 // NullFields is a list of field names (e.g. "Count") to include in API 3790 // requests with the JSON null value. By default, fields with empty 3791 // values are omitted from API requests. However, any field with an 3792 // empty value appearing in NullFields will be sent to the server as 3793 // null. It is an error if a field in this list has a non-empty value. 3794 // This may be used to include null fields in Patch requests. 3795 NullFields []string `json:"-"` 3796} 3797 3798func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { 3799 type NoMethod GooglePrivacyDlpV2InfoTypeStats 3800 raw := NoMethod(*s) 3801 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3802} 3803 3804// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply 3805// to text that is identified as a specific 3806// info_type. 3807type GooglePrivacyDlpV2InfoTypeTransformation struct { 3808 // InfoTypes: InfoTypes to apply the transformation to. An empty list 3809 // will cause 3810 // this transformation to apply to all findings that correspond 3811 // to 3812 // infoTypes that were requested in `InspectConfig`. 3813 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3814 3815 // PrimitiveTransformation: Primitive transformation to apply to the 3816 // infoType. [required] 3817 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3818 3819 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3820 // unconditionally include in API requests. By default, fields with 3821 // empty values are omitted from API requests. However, any non-pointer, 3822 // non-interface field appearing in ForceSendFields will be sent to the 3823 // server regardless of whether the field is empty or not. This may be 3824 // used to include empty fields in Patch requests. 3825 ForceSendFields []string `json:"-"` 3826 3827 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3828 // API requests with the JSON null value. By default, fields with empty 3829 // values are omitted from API requests. However, any field with an 3830 // empty value appearing in NullFields will be sent to the server as 3831 // null. It is an error if a field in this list has a non-empty value. 3832 // This may be used to include null fields in Patch requests. 3833 NullFields []string `json:"-"` 3834} 3835 3836func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { 3837 type NoMethod GooglePrivacyDlpV2InfoTypeTransformation 3838 raw := NoMethod(*s) 3839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3840} 3841 3842// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation 3843// that will scan unstructured text and 3844// apply various `PrimitiveTransformation`s to each finding, where 3845// the 3846// transformation is applied to only values that were identified as a 3847// specific 3848// info_type. 3849type GooglePrivacyDlpV2InfoTypeTransformations struct { 3850 // Transformations: Transformation for each infoType. Cannot specify 3851 // more than one 3852 // for a given infoType. [required] 3853 Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` 3854 3855 // ForceSendFields is a list of field names (e.g. "Transformations") to 3856 // unconditionally include in API requests. By default, fields with 3857 // empty values are omitted from API requests. However, any non-pointer, 3858 // non-interface field appearing in ForceSendFields will be sent to the 3859 // server regardless of whether the field is empty or not. This may be 3860 // used to include empty fields in Patch requests. 3861 ForceSendFields []string `json:"-"` 3862 3863 // NullFields is a list of field names (e.g. "Transformations") to 3864 // include in API requests with the JSON null value. By default, fields 3865 // with empty values are omitted from API requests. However, any field 3866 // with an empty value appearing in NullFields will be sent to the 3867 // server as null. It is an error if a field in this list has a 3868 // non-empty value. This may be used to include null fields in Patch 3869 // requests. 3870 NullFields []string `json:"-"` 3871} 3872 3873func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { 3874 type NoMethod GooglePrivacyDlpV2InfoTypeTransformations 3875 raw := NoMethod(*s) 3876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3877} 3878 3879// GooglePrivacyDlpV2InspectConfig: Configuration description of the 3880// scanning process. 3881// When used with redactContent only info_types and min_likelihood are 3882// currently 3883// used. 3884type GooglePrivacyDlpV2InspectConfig struct { 3885 // ContentOptions: List of options defining data content to scan. 3886 // If empty, text, images, and other content will be included. 3887 // 3888 // Possible values: 3889 // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data 3890 // stream. 3891 // "CONTENT_TEXT" - Text content within the data, excluding any 3892 // metadata. 3893 // "CONTENT_IMAGE" - Images found in the data. 3894 ContentOptions []string `json:"contentOptions,omitempty"` 3895 3896 // CustomInfoTypes: CustomInfoTypes provided by the user. 3897 // See 3898 // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn 3899 // more. 3900 CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` 3901 3902 // ExcludeInfoTypes: When true, excludes type information of the 3903 // findings. 3904 ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` 3905 3906 // IncludeQuote: When true, a contextual quote from the data that 3907 // triggered a finding is 3908 // included in the response; see Finding.quote. 3909 IncludeQuote bool `json:"includeQuote,omitempty"` 3910 3911 // InfoTypes: Restricts what info_types to look for. The values must 3912 // correspond to 3913 // InfoType values returned by ListInfoTypes or listed 3914 // at 3915 // https://cloud.google.com/dlp/docs/infotypes-reference. 3916 // 3917 // When no InfoTypes or CustomInfoTypes are specified in a request, 3918 // the 3919 // system may automatically choose what detectors to run. By default 3920 // this may 3921 // be all types, but may change over time as detectors are updated. 3922 // 3923 // If you need precise control and predictability as to what detectors 3924 // are 3925 // run you should specify specific InfoTypes listed in the 3926 // reference, 3927 // otherwise a default list will be used, which may change over time. 3928 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3929 3930 Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` 3931 3932 // MinLikelihood: Only returns findings equal or above this threshold. 3933 // The default is 3934 // POSSIBLE. 3935 // See https://cloud.google.com/dlp/docs/likelihood to learn more. 3936 // 3937 // Possible values: 3938 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 3939 // "VERY_UNLIKELY" - Few matching elements. 3940 // "UNLIKELY" 3941 // "POSSIBLE" - Some matching elements. 3942 // "LIKELY" 3943 // "VERY_LIKELY" - Many matching elements. 3944 MinLikelihood string `json:"minLikelihood,omitempty"` 3945 3946 // RuleSet: Set of rules to apply to the findings for this 3947 // InspectConfig. 3948 // Exclusion rules, contained in the set are executed in the end, 3949 // other 3950 // rules are executed in the order they are specified for each info 3951 // type. 3952 RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` 3953 3954 // ForceSendFields is a list of field names (e.g. "ContentOptions") to 3955 // unconditionally include in API requests. By default, fields with 3956 // empty values are omitted from API requests. However, any non-pointer, 3957 // non-interface field appearing in ForceSendFields will be sent to the 3958 // server regardless of whether the field is empty or not. This may be 3959 // used to include empty fields in Patch requests. 3960 ForceSendFields []string `json:"-"` 3961 3962 // NullFields is a list of field names (e.g. "ContentOptions") to 3963 // include in API requests with the JSON null value. By default, fields 3964 // with empty values are omitted from API requests. However, any field 3965 // with an empty value appearing in NullFields will be sent to the 3966 // server as null. It is an error if a field in this list has a 3967 // non-empty value. This may be used to include null fields in Patch 3968 // requests. 3969 NullFields []string `json:"-"` 3970} 3971 3972func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { 3973 type NoMethod GooglePrivacyDlpV2InspectConfig 3974 raw := NoMethod(*s) 3975 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3976} 3977 3978// GooglePrivacyDlpV2InspectContentRequest: Request to search for 3979// potentially sensitive info in a ContentItem. 3980type GooglePrivacyDlpV2InspectContentRequest struct { 3981 // InspectConfig: Configuration for the inspector. What specified here 3982 // will override 3983 // the template referenced by the inspect_template_name argument. 3984 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 3985 3986 // InspectTemplateName: Optional template to use. Any configuration 3987 // directly specified in 3988 // inspect_config will override those set in the template. Singular 3989 // fields 3990 // that are set in this request will replace their corresponding fields 3991 // in the 3992 // template. Repeated fields are appended. Singular sub-messages and 3993 // groups 3994 // are recursively merged. 3995 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 3996 3997 // Item: The item to inspect. 3998 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 3999 4000 // Location: The geographic location to process content inspection. 4001 // Reserved for future 4002 // extensions. 4003 Location string `json:"location,omitempty"` 4004 4005 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 4006 // unconditionally include in API requests. By default, fields with 4007 // empty values are omitted from API requests. However, any non-pointer, 4008 // non-interface field appearing in ForceSendFields will be sent to the 4009 // server regardless of whether the field is empty or not. This may be 4010 // used to include empty fields in Patch requests. 4011 ForceSendFields []string `json:"-"` 4012 4013 // NullFields is a list of field names (e.g. "InspectConfig") to include 4014 // in API requests with the JSON null value. By default, fields with 4015 // empty values are omitted from API requests. However, any field with 4016 // an empty value appearing in NullFields will be sent to the server as 4017 // null. It is an error if a field in this list has a non-empty value. 4018 // This may be used to include null fields in Patch requests. 4019 NullFields []string `json:"-"` 4020} 4021 4022func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { 4023 type NoMethod GooglePrivacyDlpV2InspectContentRequest 4024 raw := NoMethod(*s) 4025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4026} 4027 4028// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an 4029// item. 4030type GooglePrivacyDlpV2InspectContentResponse struct { 4031 // Result: The findings. 4032 Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` 4033 4034 // ServerResponse contains the HTTP response code and headers from the 4035 // server. 4036 googleapi.ServerResponse `json:"-"` 4037 4038 // ForceSendFields is a list of field names (e.g. "Result") to 4039 // unconditionally include in API requests. By default, fields with 4040 // empty values are omitted from API requests. However, any non-pointer, 4041 // non-interface field appearing in ForceSendFields will be sent to the 4042 // server regardless of whether the field is empty or not. This may be 4043 // used to include empty fields in Patch requests. 4044 ForceSendFields []string `json:"-"` 4045 4046 // NullFields is a list of field names (e.g. "Result") to include in API 4047 // requests with the JSON null value. By default, fields with empty 4048 // values are omitted from API requests. However, any field with an 4049 // empty value appearing in NullFields will be sent to the server as 4050 // null. It is an error if a field in this list has a non-empty value. 4051 // This may be used to include null fields in Patch requests. 4052 NullFields []string `json:"-"` 4053} 4054 4055func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { 4056 type NoMethod GooglePrivacyDlpV2InspectContentResponse 4057 raw := NoMethod(*s) 4058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4059} 4060 4061// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect 4062// DataSource job. 4063type GooglePrivacyDlpV2InspectDataSourceDetails struct { 4064 // RequestedOptions: The configuration used for this job. 4065 RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` 4066 4067 // Result: A summary of the outcome of this inspect job. 4068 Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` 4069 4070 // ForceSendFields is a list of field names (e.g. "RequestedOptions") to 4071 // unconditionally include in API requests. By default, fields with 4072 // empty values are omitted from API requests. However, any non-pointer, 4073 // non-interface field appearing in ForceSendFields will be sent to the 4074 // server regardless of whether the field is empty or not. This may be 4075 // used to include empty fields in Patch requests. 4076 ForceSendFields []string `json:"-"` 4077 4078 // NullFields is a list of field names (e.g. "RequestedOptions") to 4079 // include in API requests with the JSON null value. By default, fields 4080 // with empty values are omitted from API requests. However, any field 4081 // with an empty value appearing in NullFields will be sent to the 4082 // server as null. It is an error if a field in this list has a 4083 // non-empty value. This may be used to include null fields in Patch 4084 // requests. 4085 NullFields []string `json:"-"` 4086} 4087 4088func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { 4089 type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails 4090 raw := NoMethod(*s) 4091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4092} 4093 4094type GooglePrivacyDlpV2InspectJobConfig struct { 4095 // Actions: Actions to execute at the completion of the job. 4096 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 4097 4098 // InspectConfig: How and what to scan for. 4099 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4100 4101 // InspectTemplateName: If provided, will be used as the default for all 4102 // values in InspectConfig. 4103 // `inspect_config` will be merged into the values persisted as part of 4104 // the 4105 // template. 4106 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4107 4108 // StorageConfig: The data to scan. 4109 StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` 4110 4111 // ForceSendFields is a list of field names (e.g. "Actions") to 4112 // unconditionally include in API requests. By default, fields with 4113 // empty values are omitted from API requests. However, any non-pointer, 4114 // non-interface field appearing in ForceSendFields will be sent to the 4115 // server regardless of whether the field is empty or not. This may be 4116 // used to include empty fields in Patch requests. 4117 ForceSendFields []string `json:"-"` 4118 4119 // NullFields is a list of field names (e.g. "Actions") to include in 4120 // API requests with the JSON null value. By default, fields with empty 4121 // values are omitted from API requests. However, any field with an 4122 // empty value appearing in NullFields will be sent to the server as 4123 // null. It is an error if a field in this list has a non-empty value. 4124 // This may be used to include null fields in Patch requests. 4125 NullFields []string `json:"-"` 4126} 4127 4128func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { 4129 type NoMethod GooglePrivacyDlpV2InspectJobConfig 4130 raw := NoMethod(*s) 4131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4132} 4133 4134// GooglePrivacyDlpV2InspectResult: All the findings for a single 4135// scanned item. 4136type GooglePrivacyDlpV2InspectResult struct { 4137 // Findings: List of findings for an item. 4138 Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` 4139 4140 // FindingsTruncated: If true, then this item might have more findings 4141 // than were returned, 4142 // and the findings returned are an arbitrary subset of all 4143 // findings. 4144 // The findings list might be truncated because the input items were 4145 // too 4146 // large, or because the server reached the maximum amount of 4147 // resources 4148 // allowed for a single API call. For best results, divide the input 4149 // into 4150 // smaller batches. 4151 FindingsTruncated bool `json:"findingsTruncated,omitempty"` 4152 4153 // ForceSendFields is a list of field names (e.g. "Findings") to 4154 // unconditionally include in API requests. By default, fields with 4155 // empty values are omitted from API requests. However, any non-pointer, 4156 // non-interface field appearing in ForceSendFields will be sent to the 4157 // server regardless of whether the field is empty or not. This may be 4158 // used to include empty fields in Patch requests. 4159 ForceSendFields []string `json:"-"` 4160 4161 // NullFields is a list of field names (e.g. "Findings") to include in 4162 // API requests with the JSON null value. By default, fields with empty 4163 // values are omitted from API requests. However, any field with an 4164 // empty value appearing in NullFields will be sent to the server as 4165 // null. It is an error if a field in this list has a non-empty value. 4166 // This may be used to include null fields in Patch requests. 4167 NullFields []string `json:"-"` 4168} 4169 4170func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { 4171 type NoMethod GooglePrivacyDlpV2InspectResult 4172 raw := NoMethod(*s) 4173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4174} 4175 4176// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a 4177// configuration (set of types of sensitive data 4178// to be detected) to be used anywhere you otherwise would normally 4179// specify 4180// InspectConfig. See 4181// https://cloud.google.com/dlp/docs/concepts-templates 4182// to learn more. 4183type GooglePrivacyDlpV2InspectTemplate struct { 4184 // CreateTime: The creation timestamp of a inspectTemplate, output only 4185 // field. 4186 CreateTime string `json:"createTime,omitempty"` 4187 4188 // Description: Short description (max 256 chars). 4189 Description string `json:"description,omitempty"` 4190 4191 // DisplayName: Display name (max 256 chars). 4192 DisplayName string `json:"displayName,omitempty"` 4193 4194 // InspectConfig: The core content of the template. Configuration of the 4195 // scanning process. 4196 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4197 4198 // Name: The template name. Output only. 4199 // 4200 // The template will have one of the following 4201 // formats: 4202 // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` 4203 // OR 4204 // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID` 4205 Name string `json:"name,omitempty"` 4206 4207 // UpdateTime: The last update timestamp of a inspectTemplate, output 4208 // only field. 4209 UpdateTime string `json:"updateTime,omitempty"` 4210 4211 // ServerResponse contains the HTTP response code and headers from the 4212 // server. 4213 googleapi.ServerResponse `json:"-"` 4214 4215 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4216 // unconditionally include in API requests. By default, fields with 4217 // empty values are omitted from API requests. However, any non-pointer, 4218 // non-interface field appearing in ForceSendFields will be sent to the 4219 // server regardless of whether the field is empty or not. This may be 4220 // used to include empty fields in Patch requests. 4221 ForceSendFields []string `json:"-"` 4222 4223 // NullFields is a list of field names (e.g. "CreateTime") to include in 4224 // API requests with the JSON null value. By default, fields with empty 4225 // values are omitted from API requests. However, any field with an 4226 // empty value appearing in NullFields will be sent to the server as 4227 // null. It is an error if a field in this list has a non-empty value. 4228 // This may be used to include null fields in Patch requests. 4229 NullFields []string `json:"-"` 4230} 4231 4232func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { 4233 type NoMethod GooglePrivacyDlpV2InspectTemplate 4234 raw := NoMethod(*s) 4235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4236} 4237 4238// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be 4239// applied to infoTypes, specified in 4240// `InspectionRuleSet`. 4241type GooglePrivacyDlpV2InspectionRule struct { 4242 // ExclusionRule: Exclusion rule. 4243 ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` 4244 4245 // HotwordRule: Hotword-based detection rule. 4246 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 4247 4248 // ForceSendFields is a list of field names (e.g. "ExclusionRule") to 4249 // unconditionally include in API requests. By default, fields with 4250 // empty values are omitted from API requests. However, any non-pointer, 4251 // non-interface field appearing in ForceSendFields will be sent to the 4252 // server regardless of whether the field is empty or not. This may be 4253 // used to include empty fields in Patch requests. 4254 ForceSendFields []string `json:"-"` 4255 4256 // NullFields is a list of field names (e.g. "ExclusionRule") to include 4257 // in API requests with the JSON null value. By default, fields with 4258 // empty values are omitted from API requests. However, any field with 4259 // an empty value appearing in NullFields will be sent to the server as 4260 // null. It is an error if a field in this list has a non-empty value. 4261 // This may be used to include null fields in Patch requests. 4262 NullFields []string `json:"-"` 4263} 4264 4265func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { 4266 type NoMethod GooglePrivacyDlpV2InspectionRule 4267 raw := NoMethod(*s) 4268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4269} 4270 4271// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of 4272// infoTypes to alter behavior under certain 4273// circumstances, depending on the specific details of the rules within 4274// the set. 4275type GooglePrivacyDlpV2InspectionRuleSet struct { 4276 // InfoTypes: List of infoTypes this rule set is applied to. 4277 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4278 4279 // Rules: Set of rules to be applied to infoTypes. The rules are applied 4280 // in order. 4281 Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` 4282 4283 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 4284 // unconditionally include in API requests. By default, fields with 4285 // empty values are omitted from API requests. However, any non-pointer, 4286 // non-interface field appearing in ForceSendFields will be sent to the 4287 // server regardless of whether the field is empty or not. This may be 4288 // used to include empty fields in Patch requests. 4289 ForceSendFields []string `json:"-"` 4290 4291 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4292 // API requests with the JSON null value. By default, fields with empty 4293 // values are omitted from API requests. However, any field with an 4294 // empty value appearing in NullFields will be sent to the server as 4295 // null. It is an error if a field in this list has a non-empty value. 4296 // This may be used to include null fields in Patch requests. 4297 NullFields []string `json:"-"` 4298} 4299 4300func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { 4301 type NoMethod GooglePrivacyDlpV2InspectionRuleSet 4302 raw := NoMethod(*s) 4303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4304} 4305 4306// GooglePrivacyDlpV2JobNotificationEmails: Enable email notification to 4307// project owners and editors on jobs's 4308// completion/failure. 4309type GooglePrivacyDlpV2JobNotificationEmails struct { 4310} 4311 4312// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp 4313// api calls on a repeating basis. 4314// See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn 4315// more. 4316type GooglePrivacyDlpV2JobTrigger struct { 4317 // CreateTime: The creation timestamp of a triggeredJob, output only 4318 // field. 4319 CreateTime string `json:"createTime,omitempty"` 4320 4321 // Description: User provided description (max 256 chars) 4322 Description string `json:"description,omitempty"` 4323 4324 // DisplayName: Display name (max 100 chars) 4325 DisplayName string `json:"displayName,omitempty"` 4326 4327 // Errors: A stream of errors encountered when the trigger was 4328 // activated. Repeated 4329 // errors may result in the JobTrigger automatically being paused. 4330 // Will return the last 100 errors. Whenever the JobTrigger is 4331 // modified 4332 // this list will be cleared. Output only field. 4333 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 4334 4335 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 4336 4337 // LastRunTime: The timestamp of the last time this trigger executed, 4338 // output only field. 4339 LastRunTime string `json:"lastRunTime,omitempty"` 4340 4341 // Name: Unique resource name for the triggeredJob, assigned by the 4342 // service when the 4343 // triggeredJob is created, for 4344 // example 4345 // `projects/dlp-test-project/jobTriggers/53234423`. 4346 Name string `json:"name,omitempty"` 4347 4348 // Status: A status for this trigger. [required] 4349 // 4350 // Possible values: 4351 // "STATUS_UNSPECIFIED" 4352 // "HEALTHY" - Trigger is healthy. 4353 // "PAUSED" - Trigger is temporarily paused. 4354 // "CANCELLED" - Trigger is cancelled and can not be resumed. 4355 Status string `json:"status,omitempty"` 4356 4357 // Triggers: A list of triggers which will be OR'ed together. Only one 4358 // in the list 4359 // needs to trigger for a job to be started. The list may contain only 4360 // a single Schedule trigger and must have at least one object. 4361 Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` 4362 4363 // UpdateTime: The last update timestamp of a triggeredJob, output only 4364 // field. 4365 UpdateTime string `json:"updateTime,omitempty"` 4366 4367 // ServerResponse contains the HTTP response code and headers from the 4368 // server. 4369 googleapi.ServerResponse `json:"-"` 4370 4371 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4372 // unconditionally include in API requests. By default, fields with 4373 // empty values are omitted from API requests. However, any non-pointer, 4374 // non-interface field appearing in ForceSendFields will be sent to the 4375 // server regardless of whether the field is empty or not. This may be 4376 // used to include empty fields in Patch requests. 4377 ForceSendFields []string `json:"-"` 4378 4379 // NullFields is a list of field names (e.g. "CreateTime") to include in 4380 // API requests with the JSON null value. By default, fields with empty 4381 // values are omitted from API requests. However, any field with an 4382 // empty value appearing in NullFields will be sent to the server as 4383 // null. It is an error if a field in this list has a non-empty value. 4384 // This may be used to include null fields in Patch requests. 4385 NullFields []string `json:"-"` 4386} 4387 4388func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { 4389 type NoMethod GooglePrivacyDlpV2JobTrigger 4390 raw := NoMethod(*s) 4391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4392} 4393 4394// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for 4395// analysis of reidentification risk. 4396type GooglePrivacyDlpV2KAnonymityConfig struct { 4397 // EntityId: Optional message indicating that multiple rows might be 4398 // associated to a 4399 // single individual. If the same entity_id is associated to 4400 // multiple 4401 // quasi-identifier tuples over distinct rows, we consider the 4402 // entire 4403 // collection of tuples as the composite quasi-identifier. This 4404 // collection 4405 // is a multiset: the order in which the different tuples appear in 4406 // the 4407 // dataset is ignored, but their frequency is taken into 4408 // account. 4409 // 4410 // Important note: a maximum of 1000 rows can be associated to a 4411 // single 4412 // entity ID. If more rows are associated with the same entity ID, 4413 // some 4414 // might be ignored. 4415 EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` 4416 4417 // QuasiIds: Set of fields to compute k-anonymity over. When multiple 4418 // fields are 4419 // specified, they are considered a single composite key. Structs 4420 // and 4421 // repeated data types are not supported; however, nested fields 4422 // are 4423 // supported so long as they are not structs themselves or nested 4424 // within 4425 // a repeated field. 4426 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4427 4428 // ForceSendFields is a list of field names (e.g. "EntityId") to 4429 // unconditionally include in API requests. By default, fields with 4430 // empty values are omitted from API requests. However, any non-pointer, 4431 // non-interface field appearing in ForceSendFields will be sent to the 4432 // server regardless of whether the field is empty or not. This may be 4433 // used to include empty fields in Patch requests. 4434 ForceSendFields []string `json:"-"` 4435 4436 // NullFields is a list of field names (e.g. "EntityId") to include in 4437 // API requests with the JSON null value. By default, fields with empty 4438 // values are omitted from API requests. However, any field with an 4439 // empty value appearing in NullFields will be sent to the server as 4440 // null. It is an error if a field in this list has a non-empty value. 4441 // This may be used to include null fields in Patch requests. 4442 NullFields []string `json:"-"` 4443} 4444 4445func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { 4446 type NoMethod GooglePrivacyDlpV2KAnonymityConfig 4447 raw := NoMethod(*s) 4448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4449} 4450 4451// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' 4452// values that share the same ldiversity value 4453type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { 4454 // EquivalenceClassSize: Size of the equivalence class, for example 4455 // number of rows with the 4456 // above set of values. 4457 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4458 4459 // QuasiIdsValues: Set of values defining the equivalence class. One 4460 // value per 4461 // quasi-identifier column in the original KAnonymity metric 4462 // message. 4463 // The order is always the same as the original request. 4464 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4465 4466 // ForceSendFields is a list of field names (e.g. 4467 // "EquivalenceClassSize") to unconditionally include in API requests. 4468 // By default, fields with empty values are omitted from API requests. 4469 // However, any non-pointer, non-interface field appearing in 4470 // ForceSendFields will be sent to the server regardless of whether the 4471 // field is empty or not. This may be used to include empty fields in 4472 // Patch requests. 4473 ForceSendFields []string `json:"-"` 4474 4475 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 4476 // include in API requests with the JSON null value. By default, fields 4477 // with empty values are omitted from API requests. However, any field 4478 // with an empty value appearing in NullFields will be sent to the 4479 // server as null. It is an error if a field in this list has a 4480 // non-empty value. This may be used to include null fields in Patch 4481 // requests. 4482 NullFields []string `json:"-"` 4483} 4484 4485func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { 4486 type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass 4487 raw := NoMethod(*s) 4488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4489} 4490 4491type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { 4492 // BucketSize: Total number of equivalence classes in this bucket. 4493 BucketSize int64 `json:"bucketSize,omitempty,string"` 4494 4495 // BucketValueCount: Total number of distinct equivalence classes in 4496 // this bucket. 4497 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4498 4499 // BucketValues: Sample of equivalence classes in this bucket. The total 4500 // number of 4501 // classes returned per bucket is capped at 20. 4502 BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` 4503 4504 // EquivalenceClassSizeLowerBound: Lower bound on the size of the 4505 // equivalence classes in this bucket. 4506 EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` 4507 4508 // EquivalenceClassSizeUpperBound: Upper bound on the size of the 4509 // equivalence classes in this bucket. 4510 EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` 4511 4512 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4513 // unconditionally include in API requests. By default, fields with 4514 // empty values are omitted from API requests. However, any non-pointer, 4515 // non-interface field appearing in ForceSendFields will be sent to the 4516 // server regardless of whether the field is empty or not. This may be 4517 // used to include empty fields in Patch requests. 4518 ForceSendFields []string `json:"-"` 4519 4520 // NullFields is a list of field names (e.g. "BucketSize") to include in 4521 // API requests with the JSON null value. By default, fields with empty 4522 // values are omitted from API requests. However, any field with an 4523 // empty value appearing in NullFields will be sent to the server as 4524 // null. It is an error if a field in this list has a non-empty value. 4525 // This may be used to include null fields in Patch requests. 4526 NullFields []string `json:"-"` 4527} 4528 4529func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { 4530 type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket 4531 raw := NoMethod(*s) 4532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4533} 4534 4535// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity 4536// computation. 4537type GooglePrivacyDlpV2KAnonymityResult struct { 4538 // EquivalenceClassHistogramBuckets: Histogram of k-anonymity 4539 // equivalence classes. 4540 EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` 4541 4542 // ForceSendFields is a list of field names (e.g. 4543 // "EquivalenceClassHistogramBuckets") to unconditionally include in API 4544 // requests. By default, fields with empty values are omitted from API 4545 // requests. However, any non-pointer, non-interface field appearing in 4546 // ForceSendFields will be sent to the server regardless of whether the 4547 // field is empty or not. This may be used to include empty fields in 4548 // Patch requests. 4549 ForceSendFields []string `json:"-"` 4550 4551 // NullFields is a list of field names (e.g. 4552 // "EquivalenceClassHistogramBuckets") to include in API requests with 4553 // the JSON null value. By default, fields with empty values are omitted 4554 // from API requests. However, any field with an empty value appearing 4555 // in NullFields will be sent to the server as null. It is an error if a 4556 // field in this list has a non-empty value. This may be used to include 4557 // null fields in Patch requests. 4558 NullFields []string `json:"-"` 4559} 4560 4561func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { 4562 type NoMethod GooglePrivacyDlpV2KAnonymityResult 4563 raw := NoMethod(*s) 4564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4565} 4566 4567// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. 4568// This corresponds to a risk model similar to what 4569// is called "journalist risk" in the literature, except the attack 4570// dataset is 4571// statistically modeled instead of being perfectly known. This can be 4572// done 4573// using publicly available data (like the US Census), or using a 4574// custom 4575// statistical model (indicated as one or several BigQuery tables), or 4576// by 4577// extrapolating from the distribution of values in the input dataset. 4578// A column with a semantic tag attached. 4579type GooglePrivacyDlpV2KMapEstimationConfig struct { 4580 // AuxiliaryTables: Several auxiliary tables can be used in the 4581 // analysis. Each custom_tag 4582 // used to tag a quasi-identifiers column must appear in exactly one 4583 // column 4584 // of one auxiliary table. 4585 AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` 4586 4587 // QuasiIds: Fields considered to be quasi-identifiers. No two columns 4588 // can have the 4589 // same tag. [required] 4590 QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` 4591 4592 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 4593 // modeling. 4594 // Required if no column is tagged with a region-specific InfoType 4595 // (like 4596 // US_ZIP_5) or a region code. 4597 RegionCode string `json:"regionCode,omitempty"` 4598 4599 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 4600 // unconditionally include in API requests. By default, fields with 4601 // empty values are omitted from API requests. However, any non-pointer, 4602 // non-interface field appearing in ForceSendFields will be sent to the 4603 // server regardless of whether the field is empty or not. This may be 4604 // used to include empty fields in Patch requests. 4605 ForceSendFields []string `json:"-"` 4606 4607 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 4608 // include in API requests with the JSON null value. By default, fields 4609 // with empty values are omitted from API requests. However, any field 4610 // with an empty value appearing in NullFields will be sent to the 4611 // server as null. It is an error if a field in this list has a 4612 // non-empty value. This may be used to include null fields in Patch 4613 // requests. 4614 NullFields []string `json:"-"` 4615} 4616 4617func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { 4618 type NoMethod GooglePrivacyDlpV2KMapEstimationConfig 4619 raw := NoMethod(*s) 4620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4621} 4622 4623// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A 4624// KMapEstimationHistogramBucket message with the following values: 4625// min_anonymity: 3 4626// max_anonymity: 5 4627// frequency: 42 4628// means that there are 42 records whose quasi-identifier values 4629// correspond 4630// to 3, 4 or 5 people in the overlying population. An important 4631// particular 4632// case is when min_anonymity = max_anonymity = 1: the frequency field 4633// then 4634// corresponds to the number of uniquely identifiable records. 4635type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { 4636 // BucketSize: Number of records within these anonymity bounds. 4637 BucketSize int64 `json:"bucketSize,omitempty,string"` 4638 4639 // BucketValueCount: Total number of distinct quasi-identifier tuple 4640 // values in this bucket. 4641 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4642 4643 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 4644 // The total 4645 // number of classes returned per bucket is capped at 20. 4646 BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` 4647 4648 // MaxAnonymity: Always greater than or equal to min_anonymity. 4649 MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` 4650 4651 // MinAnonymity: Always positive. 4652 MinAnonymity int64 `json:"minAnonymity,omitempty,string"` 4653 4654 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4655 // unconditionally include in API requests. By default, fields with 4656 // empty values are omitted from API requests. However, any non-pointer, 4657 // non-interface field appearing in ForceSendFields will be sent to the 4658 // server regardless of whether the field is empty or not. This may be 4659 // used to include empty fields in Patch requests. 4660 ForceSendFields []string `json:"-"` 4661 4662 // NullFields is a list of field names (e.g. "BucketSize") to include in 4663 // API requests with the JSON null value. By default, fields with empty 4664 // values are omitted from API requests. However, any field with an 4665 // empty value appearing in NullFields will be sent to the server as 4666 // null. It is an error if a field in this list has a non-empty value. 4667 // This may be used to include null fields in Patch requests. 4668 NullFields []string `json:"-"` 4669} 4670 4671func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 4672 type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket 4673 raw := NoMethod(*s) 4674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4675} 4676 4677// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for 4678// the quasi-identifier columns. 4679type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { 4680 // EstimatedAnonymity: The estimated anonymity for these 4681 // quasi-identifier values. 4682 EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` 4683 4684 // QuasiIdsValues: The quasi-identifier values. 4685 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4686 4687 // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") 4688 // to unconditionally include in API requests. By default, fields with 4689 // empty values are omitted from API requests. However, any non-pointer, 4690 // non-interface field appearing in ForceSendFields will be sent to the 4691 // server regardless of whether the field is empty or not. This may be 4692 // used to include empty fields in Patch requests. 4693 ForceSendFields []string `json:"-"` 4694 4695 // NullFields is a list of field names (e.g. "EstimatedAnonymity") to 4696 // include in API requests with the JSON null value. By default, fields 4697 // with empty values are omitted from API requests. However, any field 4698 // with an empty value appearing in NullFields will be sent to the 4699 // server as null. It is an error if a field in this list has a 4700 // non-empty value. This may be used to include null fields in Patch 4701 // requests. 4702 NullFields []string `json:"-"` 4703} 4704 4705func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 4706 type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues 4707 raw := NoMethod(*s) 4708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4709} 4710 4711// GooglePrivacyDlpV2KMapEstimationResult: Result of the 4712// reidentifiability analysis. Note that these results are 4713// an 4714// estimation, not exact values. 4715type GooglePrivacyDlpV2KMapEstimationResult struct { 4716 // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] 4717 // do not overlap. If a value 4718 // doesn't correspond to any such interval, the associated frequency 4719 // is 4720 // zero. For example, the following records: 4721 // {min_anonymity: 1, max_anonymity: 1, frequency: 17} 4722 // {min_anonymity: 2, max_anonymity: 3, frequency: 42} 4723 // {min_anonymity: 5, max_anonymity: 10, frequency: 99} 4724 // mean that there are no record with an estimated anonymity of 4, 5, 4725 // or 4726 // larger than 10. 4727 KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` 4728 4729 // ForceSendFields is a list of field names (e.g. 4730 // "KMapEstimationHistogram") to unconditionally include in API 4731 // requests. By default, fields with empty values are omitted from API 4732 // requests. However, any non-pointer, non-interface field appearing in 4733 // ForceSendFields will be sent to the server regardless of whether the 4734 // field is empty or not. This may be used to include empty fields in 4735 // Patch requests. 4736 ForceSendFields []string `json:"-"` 4737 4738 // NullFields is a list of field names (e.g. "KMapEstimationHistogram") 4739 // to include in API requests with the JSON null value. By default, 4740 // fields with empty values are omitted from API requests. However, any 4741 // field with an empty value appearing in NullFields will be sent to the 4742 // server as null. It is an error if a field in this list has a 4743 // non-empty value. This may be used to include null fields in Patch 4744 // requests. 4745 NullFields []string `json:"-"` 4746} 4747 4748func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { 4749 type NoMethod GooglePrivacyDlpV2KMapEstimationResult 4750 raw := NoMethod(*s) 4751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4752} 4753 4754// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. 4755// If a key's partition ID or any of its path kinds or names 4756// are 4757// reserved/read-only, the key is reserved/read-only. 4758// A reserved/read-only key is forbidden in certain documented contexts. 4759type GooglePrivacyDlpV2Key struct { 4760 // PartitionId: Entities are partitioned into subsets, currently 4761 // identified by a project 4762 // ID and namespace ID. 4763 // Queries are scoped to a single partition. 4764 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 4765 4766 // Path: The entity path. 4767 // An entity path consists of one or more elements composed of a kind 4768 // and a 4769 // string or numerical identifier, which identify entities. The 4770 // first 4771 // element identifies a _root entity_, the second element identifies 4772 // a _child_ of the root entity, the third element identifies a child of 4773 // the 4774 // second entity, and so forth. The entities identified by all prefixes 4775 // of 4776 // the path are called the element's _ancestors_. 4777 // 4778 // A path can never be empty, and a path can have at most 100 elements. 4779 Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` 4780 4781 // ForceSendFields is a list of field names (e.g. "PartitionId") to 4782 // unconditionally include in API requests. By default, fields with 4783 // empty values are omitted from API requests. However, any non-pointer, 4784 // non-interface field appearing in ForceSendFields will be sent to the 4785 // server regardless of whether the field is empty or not. This may be 4786 // used to include empty fields in Patch requests. 4787 ForceSendFields []string `json:"-"` 4788 4789 // NullFields is a list of field names (e.g. "PartitionId") to include 4790 // in API requests with the JSON null value. By default, fields with 4791 // empty values are omitted from API requests. However, any field with 4792 // an empty value appearing in NullFields will be sent to the server as 4793 // null. It is an error if a field in this list has a non-empty value. 4794 // This may be used to include null fields in Patch requests. 4795 NullFields []string `json:"-"` 4796} 4797 4798func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { 4799 type NoMethod GooglePrivacyDlpV2Key 4800 raw := NoMethod(*s) 4801 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4802} 4803 4804// GooglePrivacyDlpV2KindExpression: A representation of a Datastore 4805// kind. 4806type GooglePrivacyDlpV2KindExpression struct { 4807 // Name: The name of the kind. 4808 Name string `json:"name,omitempty"` 4809 4810 // ForceSendFields is a list of field names (e.g. "Name") to 4811 // unconditionally include in API requests. By default, fields with 4812 // empty values are omitted from API requests. However, any non-pointer, 4813 // non-interface field appearing in ForceSendFields will be sent to the 4814 // server regardless of whether the field is empty or not. This may be 4815 // used to include empty fields in Patch requests. 4816 ForceSendFields []string `json:"-"` 4817 4818 // NullFields is a list of field names (e.g. "Name") to include in API 4819 // requests with the JSON null value. By default, fields with empty 4820 // values are omitted from API requests. However, any field with an 4821 // empty value appearing in NullFields will be sent to the server as 4822 // null. It is an error if a field in this list has a non-empty value. 4823 // This may be used to include null fields in Patch requests. 4824 NullFields []string `json:"-"` 4825} 4826 4827func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { 4828 type NoMethod GooglePrivacyDlpV2KindExpression 4829 raw := NoMethod(*s) 4830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4831} 4832 4833// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing 4834// data crypto key wrapped by KMS. 4835// The wrapped key must be a 128/192/256 bit key. 4836// Authorization requires the following IAM permissions when sending a 4837// request 4838// to perform a crypto transformation using a kms-wrapped crypto 4839// key: 4840// dlp.kms.encrypt 4841type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { 4842 // CryptoKeyName: The resource name of the KMS CryptoKey to use for 4843 // unwrapping. [required] 4844 CryptoKeyName string `json:"cryptoKeyName,omitempty"` 4845 4846 // WrappedKey: The wrapped data crypto key. [required] 4847 WrappedKey string `json:"wrappedKey,omitempty"` 4848 4849 // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to 4850 // unconditionally include in API requests. By default, fields with 4851 // empty values are omitted from API requests. However, any non-pointer, 4852 // non-interface field appearing in ForceSendFields will be sent to the 4853 // server regardless of whether the field is empty or not. This may be 4854 // used to include empty fields in Patch requests. 4855 ForceSendFields []string `json:"-"` 4856 4857 // NullFields is a list of field names (e.g. "CryptoKeyName") to include 4858 // in API requests with the JSON null value. By default, fields with 4859 // empty values are omitted from API requests. However, any field with 4860 // an empty value appearing in NullFields will be sent to the server as 4861 // null. It is an error if a field in this list has a non-empty value. 4862 // This may be used to include null fields in Patch requests. 4863 NullFields []string `json:"-"` 4864} 4865 4866func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { 4867 type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey 4868 raw := NoMethod(*s) 4869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4870} 4871 4872// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for 4873// analysis of reidentification risk. 4874type GooglePrivacyDlpV2LDiversityConfig struct { 4875 // QuasiIds: Set of quasi-identifiers indicating how equivalence classes 4876 // are 4877 // defined for the l-diversity computation. When multiple fields 4878 // are 4879 // specified, they are considered a single composite key. 4880 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4881 4882 // SensitiveAttribute: Sensitive field for computing the l-value. 4883 SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` 4884 4885 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 4886 // unconditionally include in API requests. By default, fields with 4887 // empty values are omitted from API requests. However, any non-pointer, 4888 // non-interface field appearing in ForceSendFields will be sent to the 4889 // server regardless of whether the field is empty or not. This may be 4890 // used to include empty fields in Patch requests. 4891 ForceSendFields []string `json:"-"` 4892 4893 // NullFields is a list of field names (e.g. "QuasiIds") to include in 4894 // API requests with the JSON null value. By default, fields with empty 4895 // values are omitted from API requests. However, any field with an 4896 // empty value appearing in NullFields will be sent to the server as 4897 // null. It is an error if a field in this list has a non-empty value. 4898 // This may be used to include null fields in Patch requests. 4899 NullFields []string `json:"-"` 4900} 4901 4902func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { 4903 type NoMethod GooglePrivacyDlpV2LDiversityConfig 4904 raw := NoMethod(*s) 4905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4906} 4907 4908// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' 4909// values that share the same ldiversity value. 4910type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { 4911 // EquivalenceClassSize: Size of the k-anonymity equivalence class. 4912 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4913 4914 // NumDistinctSensitiveValues: Number of distinct sensitive values in 4915 // this equivalence class. 4916 NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` 4917 4918 // QuasiIdsValues: Quasi-identifier values defining the k-anonymity 4919 // equivalence 4920 // class. The order is always the same as the original request. 4921 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4922 4923 // TopSensitiveValues: Estimated frequencies of top sensitive values. 4924 TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` 4925 4926 // ForceSendFields is a list of field names (e.g. 4927 // "EquivalenceClassSize") to unconditionally include in API requests. 4928 // By default, fields with empty values are omitted from API requests. 4929 // However, any non-pointer, non-interface field appearing in 4930 // ForceSendFields will be sent to the server regardless of whether the 4931 // field is empty or not. This may be used to include empty fields in 4932 // Patch requests. 4933 ForceSendFields []string `json:"-"` 4934 4935 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 4936 // include in API requests with the JSON null value. By default, fields 4937 // with empty values are omitted from API requests. However, any field 4938 // with an empty value appearing in NullFields will be sent to the 4939 // server as null. It is an error if a field in this list has a 4940 // non-empty value. This may be used to include null fields in Patch 4941 // requests. 4942 NullFields []string `json:"-"` 4943} 4944 4945func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { 4946 type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass 4947 raw := NoMethod(*s) 4948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4949} 4950 4951type GooglePrivacyDlpV2LDiversityHistogramBucket struct { 4952 // BucketSize: Total number of equivalence classes in this bucket. 4953 BucketSize int64 `json:"bucketSize,omitempty,string"` 4954 4955 // BucketValueCount: Total number of distinct equivalence classes in 4956 // this bucket. 4957 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4958 4959 // BucketValues: Sample of equivalence classes in this bucket. The total 4960 // number of 4961 // classes returned per bucket is capped at 20. 4962 BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` 4963 4964 // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value 4965 // frequencies of the equivalence 4966 // classes in this bucket. 4967 SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` 4968 4969 // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value 4970 // frequencies of the equivalence 4971 // classes in this bucket. 4972 SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` 4973 4974 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4975 // unconditionally include in API requests. By default, fields with 4976 // empty values are omitted from API requests. However, any non-pointer, 4977 // non-interface field appearing in ForceSendFields will be sent to the 4978 // server regardless of whether the field is empty or not. This may be 4979 // used to include empty fields in Patch requests. 4980 ForceSendFields []string `json:"-"` 4981 4982 // NullFields is a list of field names (e.g. "BucketSize") to include in 4983 // API requests with the JSON null value. By default, fields with empty 4984 // values are omitted from API requests. However, any field with an 4985 // empty value appearing in NullFields will be sent to the server as 4986 // null. It is an error if a field in this list has a non-empty value. 4987 // This may be used to include null fields in Patch requests. 4988 NullFields []string `json:"-"` 4989} 4990 4991func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { 4992 type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket 4993 raw := NoMethod(*s) 4994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4995} 4996 4997// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity 4998// computation. 4999type GooglePrivacyDlpV2LDiversityResult struct { 5000 // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity 5001 // equivalence class sensitive value frequencies. 5002 SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` 5003 5004 // ForceSendFields is a list of field names (e.g. 5005 // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include 5006 // in API requests. By default, fields with empty values are omitted 5007 // from API requests. However, any non-pointer, non-interface field 5008 // appearing in ForceSendFields will be sent to the server regardless of 5009 // whether the field is empty or not. This may be used to include empty 5010 // fields in Patch requests. 5011 ForceSendFields []string `json:"-"` 5012 5013 // NullFields is a list of field names (e.g. 5014 // "SensitiveValueFrequencyHistogramBuckets") to include in API requests 5015 // with the JSON null value. By default, fields with empty values are 5016 // omitted from API requests. However, any field with an empty value 5017 // appearing in NullFields will be sent to the server as null. It is an 5018 // error if a field in this list has a non-empty value. This may be used 5019 // to include null fields in Patch requests. 5020 NullFields []string `json:"-"` 5021} 5022 5023func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { 5024 type NoMethod GooglePrivacyDlpV2LDiversityResult 5025 raw := NoMethod(*s) 5026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5027} 5028 5029// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a 5030// custom dictionary created from a data source of any size 5031// up to the maximum size defined in 5032// the 5033// [limits](https://cloud.google.com/dlp/limits) page. The artifacts 5034// of 5035// dictionary creation are stored in the specified Google Cloud 5036// Storage 5037// location. Consider using `CustomInfoType.Dictionary` for smaller 5038// dictionaries 5039// that satisfy the size requirements. 5040type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { 5041 // BigQueryField: Field in a BigQuery table where each cell represents a 5042 // dictionary phrase. 5043 BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` 5044 5045 // CloudStorageFileSet: Set of files containing newline-delimited lists 5046 // of dictionary phrases. 5047 CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` 5048 5049 // OutputPath: Location to store dictionary artifacts in Google Cloud 5050 // Storage. These files 5051 // will only be accessible by project owners and the DLP API. If any of 5052 // these 5053 // artifacts are modified, the dictionary is considered invalid and can 5054 // no 5055 // longer be used. 5056 OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` 5057 5058 // ForceSendFields is a list of field names (e.g. "BigQueryField") to 5059 // unconditionally include in API requests. By default, fields with 5060 // empty values are omitted from API requests. However, any non-pointer, 5061 // non-interface field appearing in ForceSendFields will be sent to the 5062 // server regardless of whether the field is empty or not. This may be 5063 // used to include empty fields in Patch requests. 5064 ForceSendFields []string `json:"-"` 5065 5066 // NullFields is a list of field names (e.g. "BigQueryField") to include 5067 // in API requests with the JSON null value. By default, fields with 5068 // empty values are omitted from API requests. However, any field with 5069 // an empty value appearing in NullFields will be sent to the server as 5070 // null. It is an error if a field in this list has a non-empty value. 5071 // This may be used to include null fields in Patch requests. 5072 NullFields []string `json:"-"` 5073} 5074 5075func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { 5076 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig 5077 raw := NoMethod(*s) 5078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5079} 5080 5081// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a 5082// custom dictionary. 5083type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { 5084 // ApproxNumPhrases: Approximate number of distinct phrases in the 5085 // dictionary. 5086 ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` 5087 5088 // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to 5089 // unconditionally include in API requests. By default, fields with 5090 // empty values are omitted from API requests. However, any non-pointer, 5091 // non-interface field appearing in ForceSendFields will be sent to the 5092 // server regardless of whether the field is empty or not. This may be 5093 // used to include empty fields in Patch requests. 5094 ForceSendFields []string `json:"-"` 5095 5096 // NullFields is a list of field names (e.g. "ApproxNumPhrases") to 5097 // include in API requests with the JSON null value. By default, fields 5098 // with empty values are omitted from API requests. However, any field 5099 // with an empty value appearing in NullFields will be sent to the 5100 // server as null. It is an error if a field in this list has a 5101 // non-empty value. This may be used to include null fields in Patch 5102 // requests. 5103 NullFields []string `json:"-"` 5104} 5105 5106func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { 5107 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats 5108 raw := NoMethod(*s) 5109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5110} 5111 5112// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an 5113// adjustment to the likelihood of a finding as 5114// part of a detection rule. 5115type GooglePrivacyDlpV2LikelihoodAdjustment struct { 5116 // FixedLikelihood: Set the likelihood of a finding to a fixed value. 5117 // 5118 // Possible values: 5119 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 5120 // "VERY_UNLIKELY" - Few matching elements. 5121 // "UNLIKELY" 5122 // "POSSIBLE" - Some matching elements. 5123 // "LIKELY" 5124 // "VERY_LIKELY" - Many matching elements. 5125 FixedLikelihood string `json:"fixedLikelihood,omitempty"` 5126 5127 // RelativeLikelihood: Increase or decrease the likelihood by the 5128 // specified number of 5129 // levels. For example, if a finding would be `POSSIBLE` without 5130 // the 5131 // detection rule and `relative_likelihood` is 1, then it is upgraded 5132 // to 5133 // `LIKELY`, while a value of -1 would downgrade it to 5134 // `UNLIKELY`. 5135 // Likelihood may never drop below `VERY_UNLIKELY` or 5136 // exceed 5137 // `VERY_LIKELY`, so applying an adjustment of 1 followed by 5138 // an 5139 // adjustment of -1 when base likelihood is `VERY_LIKELY` will result 5140 // in 5141 // a final likelihood of `LIKELY`. 5142 RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` 5143 5144 // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to 5145 // unconditionally include in API requests. By default, fields with 5146 // empty values are omitted from API requests. However, any non-pointer, 5147 // non-interface field appearing in ForceSendFields will be sent to the 5148 // server regardless of whether the field is empty or not. This may be 5149 // used to include empty fields in Patch requests. 5150 ForceSendFields []string `json:"-"` 5151 5152 // NullFields is a list of field names (e.g. "FixedLikelihood") to 5153 // include in API requests with the JSON null value. By default, fields 5154 // with empty values are omitted from API requests. However, any field 5155 // with an empty value appearing in NullFields will be sent to the 5156 // server as null. It is an error if a field in this list has a 5157 // non-empty value. This may be used to include null fields in Patch 5158 // requests. 5159 NullFields []string `json:"-"` 5160} 5161 5162func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { 5163 type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment 5164 raw := NoMethod(*s) 5165 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5166} 5167 5168// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message 5169// for ListDeidentifyTemplates. 5170type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { 5171 // DeidentifyTemplates: List of deidentify templates, up to page_size 5172 // in 5173 // ListDeidentifyTemplatesRequest. 5174 DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` 5175 5176 // NextPageToken: If the next page is available then the next page token 5177 // to be used 5178 // in following ListDeidentifyTemplates request. 5179 NextPageToken string `json:"nextPageToken,omitempty"` 5180 5181 // ServerResponse contains the HTTP response code and headers from the 5182 // server. 5183 googleapi.ServerResponse `json:"-"` 5184 5185 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") 5186 // to unconditionally include in API requests. By default, fields with 5187 // empty values are omitted from API requests. However, any non-pointer, 5188 // non-interface field appearing in ForceSendFields will be sent to the 5189 // server regardless of whether the field is empty or not. This may be 5190 // used to include empty fields in Patch requests. 5191 ForceSendFields []string `json:"-"` 5192 5193 // NullFields is a list of field names (e.g. "DeidentifyTemplates") to 5194 // include in API requests with the JSON null value. By default, fields 5195 // with empty values are omitted from API requests. However, any field 5196 // with an empty value appearing in NullFields will be sent to the 5197 // server as null. It is an error if a field in this list has a 5198 // non-empty value. This may be used to include null fields in Patch 5199 // requests. 5200 NullFields []string `json:"-"` 5201} 5202 5203func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { 5204 type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse 5205 raw := NoMethod(*s) 5206 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5207} 5208 5209// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for 5210// listing DLP jobs. 5211type GooglePrivacyDlpV2ListDlpJobsResponse struct { 5212 // Jobs: A list of DlpJobs that matches the specified filter in the 5213 // request. 5214 Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` 5215 5216 // NextPageToken: The standard List next-page token. 5217 NextPageToken string `json:"nextPageToken,omitempty"` 5218 5219 // ServerResponse contains the HTTP response code and headers from the 5220 // server. 5221 googleapi.ServerResponse `json:"-"` 5222 5223 // ForceSendFields is a list of field names (e.g. "Jobs") to 5224 // unconditionally include in API requests. By default, fields with 5225 // empty values are omitted from API requests. However, any non-pointer, 5226 // non-interface field appearing in ForceSendFields will be sent to the 5227 // server regardless of whether the field is empty or not. This may be 5228 // used to include empty fields in Patch requests. 5229 ForceSendFields []string `json:"-"` 5230 5231 // NullFields is a list of field names (e.g. "Jobs") to include in API 5232 // requests with the JSON null value. By default, fields with empty 5233 // values are omitted from API requests. However, any field with an 5234 // empty value appearing in NullFields will be sent to the server as 5235 // null. It is an error if a field in this list has a non-empty value. 5236 // This may be used to include null fields in Patch requests. 5237 NullFields []string `json:"-"` 5238} 5239 5240func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { 5241 type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse 5242 raw := NoMethod(*s) 5243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5244} 5245 5246// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the 5247// ListInfoTypes request. 5248type GooglePrivacyDlpV2ListInfoTypesResponse struct { 5249 // InfoTypes: Set of sensitive infoTypes. 5250 InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` 5251 5252 // ServerResponse contains the HTTP response code and headers from the 5253 // server. 5254 googleapi.ServerResponse `json:"-"` 5255 5256 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 5257 // unconditionally include in API requests. By default, fields with 5258 // empty values are omitted from API requests. However, any non-pointer, 5259 // non-interface field appearing in ForceSendFields will be sent to the 5260 // server regardless of whether the field is empty or not. This may be 5261 // used to include empty fields in Patch requests. 5262 ForceSendFields []string `json:"-"` 5263 5264 // NullFields is a list of field names (e.g. "InfoTypes") to include in 5265 // API requests with the JSON null value. By default, fields with empty 5266 // values are omitted from API requests. However, any field with an 5267 // empty value appearing in NullFields will be sent to the server as 5268 // null. It is an error if a field in this list has a non-empty value. 5269 // This may be used to include null fields in Patch requests. 5270 NullFields []string `json:"-"` 5271} 5272 5273func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { 5274 type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse 5275 raw := NoMethod(*s) 5276 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5277} 5278 5279// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for 5280// ListInspectTemplates. 5281type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { 5282 // InspectTemplates: List of inspectTemplates, up to page_size in 5283 // ListInspectTemplatesRequest. 5284 InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` 5285 5286 // NextPageToken: If the next page is available then the next page token 5287 // to be used 5288 // in following ListInspectTemplates request. 5289 NextPageToken string `json:"nextPageToken,omitempty"` 5290 5291 // ServerResponse contains the HTTP response code and headers from the 5292 // server. 5293 googleapi.ServerResponse `json:"-"` 5294 5295 // ForceSendFields is a list of field names (e.g. "InspectTemplates") to 5296 // unconditionally include in API requests. By default, fields with 5297 // empty values are omitted from API requests. However, any non-pointer, 5298 // non-interface field appearing in ForceSendFields will be sent to the 5299 // server regardless of whether the field is empty or not. This may be 5300 // used to include empty fields in Patch requests. 5301 ForceSendFields []string `json:"-"` 5302 5303 // NullFields is a list of field names (e.g. "InspectTemplates") to 5304 // include in API requests with the JSON null value. By default, fields 5305 // with empty values are omitted from API requests. However, any field 5306 // with an empty value appearing in NullFields will be sent to the 5307 // server as null. It is an error if a field in this list has a 5308 // non-empty value. This may be used to include null fields in Patch 5309 // requests. 5310 NullFields []string `json:"-"` 5311} 5312 5313func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { 5314 type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse 5315 raw := NoMethod(*s) 5316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5317} 5318 5319// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for 5320// ListJobTriggers. 5321type GooglePrivacyDlpV2ListJobTriggersResponse struct { 5322 // JobTriggers: List of triggeredJobs, up to page_size in 5323 // ListJobTriggersRequest. 5324 JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` 5325 5326 // NextPageToken: If the next page is available then the next page token 5327 // to be used 5328 // in following ListJobTriggers request. 5329 NextPageToken string `json:"nextPageToken,omitempty"` 5330 5331 // ServerResponse contains the HTTP response code and headers from the 5332 // server. 5333 googleapi.ServerResponse `json:"-"` 5334 5335 // ForceSendFields is a list of field names (e.g. "JobTriggers") to 5336 // unconditionally include in API requests. By default, fields with 5337 // empty values are omitted from API requests. However, any non-pointer, 5338 // non-interface field appearing in ForceSendFields will be sent to the 5339 // server regardless of whether the field is empty or not. This may be 5340 // used to include empty fields in Patch requests. 5341 ForceSendFields []string `json:"-"` 5342 5343 // NullFields is a list of field names (e.g. "JobTriggers") to include 5344 // in API requests with the JSON null value. By default, fields with 5345 // empty values are omitted from API requests. However, any field with 5346 // an empty value appearing in NullFields will be sent to the server as 5347 // null. It is an error if a field in this list has a non-empty value. 5348 // This may be used to include null fields in Patch requests. 5349 NullFields []string `json:"-"` 5350} 5351 5352func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { 5353 type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse 5354 raw := NoMethod(*s) 5355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5356} 5357 5358// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for 5359// ListStoredInfoTypes. 5360type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { 5361 // NextPageToken: If the next page is available then the next page token 5362 // to be used 5363 // in following ListStoredInfoTypes request. 5364 NextPageToken string `json:"nextPageToken,omitempty"` 5365 5366 // StoredInfoTypes: List of storedInfoTypes, up to page_size in 5367 // ListStoredInfoTypesRequest. 5368 StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` 5369 5370 // ServerResponse contains the HTTP response code and headers from the 5371 // server. 5372 googleapi.ServerResponse `json:"-"` 5373 5374 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5375 // unconditionally include in API requests. By default, fields with 5376 // empty values are omitted from API requests. However, any non-pointer, 5377 // non-interface field appearing in ForceSendFields will be sent to the 5378 // server regardless of whether the field is empty or not. This may be 5379 // used to include empty fields in Patch requests. 5380 ForceSendFields []string `json:"-"` 5381 5382 // NullFields is a list of field names (e.g. "NextPageToken") to include 5383 // in API requests with the JSON null value. By default, fields with 5384 // empty values are omitted from API requests. However, any field with 5385 // an empty value appearing in NullFields will be sent to the server as 5386 // null. It is an error if a field in this list has a non-empty value. 5387 // This may be used to include null fields in Patch requests. 5388 NullFields []string `json:"-"` 5389} 5390 5391func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { 5392 type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse 5393 raw := NoMethod(*s) 5394 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5395} 5396 5397// GooglePrivacyDlpV2Location: Specifies the location of the finding. 5398type GooglePrivacyDlpV2Location struct { 5399 // ByteRange: Zero-based byte offsets delimiting the finding. 5400 // These are relative to the finding's containing element. 5401 // Note that when the content is not textual, this references 5402 // the UTF-8 encoded textual representation of the content. 5403 // Omitted if content is an image. 5404 ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` 5405 5406 // CodepointRange: Unicode character offsets delimiting the 5407 // finding. 5408 // These are relative to the finding's containing element. 5409 // Provided when the content is text. 5410 CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` 5411 5412 // ContentLocations: List of nested objects pointing to the precise 5413 // location of the finding 5414 // within the file or record. 5415 ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` 5416 5417 // ForceSendFields is a list of field names (e.g. "ByteRange") to 5418 // unconditionally include in API requests. By default, fields with 5419 // empty values are omitted from API requests. However, any non-pointer, 5420 // non-interface field appearing in ForceSendFields will be sent to the 5421 // server regardless of whether the field is empty or not. This may be 5422 // used to include empty fields in Patch requests. 5423 ForceSendFields []string `json:"-"` 5424 5425 // NullFields is a list of field names (e.g. "ByteRange") to include in 5426 // API requests with the JSON null value. By default, fields with empty 5427 // values are omitted from API requests. However, any field with an 5428 // empty value appearing in NullFields will be sent to the server as 5429 // null. It is an error if a field in this list has a non-empty value. 5430 // This may be used to include null fields in Patch requests. 5431 NullFields []string `json:"-"` 5432} 5433 5434func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { 5435 type NoMethod GooglePrivacyDlpV2Location 5436 raw := NoMethod(*s) 5437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5438} 5439 5440// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over 5441// an individual column, including 5442// min, max, and quantiles. 5443type GooglePrivacyDlpV2NumericalStatsConfig struct { 5444 // Field: Field to compute numerical stats on. Supported types 5445 // are 5446 // integer, float, date, datetime, timestamp, time. 5447 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5448 5449 // ForceSendFields is a list of field names (e.g. "Field") to 5450 // unconditionally include in API requests. By default, fields with 5451 // empty values are omitted from API requests. However, any non-pointer, 5452 // non-interface field appearing in ForceSendFields will be sent to the 5453 // server regardless of whether the field is empty or not. This may be 5454 // used to include empty fields in Patch requests. 5455 ForceSendFields []string `json:"-"` 5456 5457 // NullFields is a list of field names (e.g. "Field") to include in API 5458 // requests with the JSON null value. By default, fields with empty 5459 // values are omitted from API requests. However, any field with an 5460 // empty value appearing in NullFields will be sent to the server as 5461 // null. It is an error if a field in this list has a non-empty value. 5462 // This may be used to include null fields in Patch requests. 5463 NullFields []string `json:"-"` 5464} 5465 5466func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { 5467 type NoMethod GooglePrivacyDlpV2NumericalStatsConfig 5468 raw := NoMethod(*s) 5469 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5470} 5471 5472// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats 5473// computation. 5474type GooglePrivacyDlpV2NumericalStatsResult struct { 5475 // MaxValue: Maximum value appearing in the column. 5476 MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` 5477 5478 // MinValue: Minimum value appearing in the column. 5479 MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` 5480 5481 // QuantileValues: List of 99 values that partition the set of field 5482 // values into 100 equal 5483 // sized buckets. 5484 QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` 5485 5486 // ForceSendFields is a list of field names (e.g. "MaxValue") to 5487 // unconditionally include in API requests. By default, fields with 5488 // empty values are omitted from API requests. However, any non-pointer, 5489 // non-interface field appearing in ForceSendFields will be sent to the 5490 // server regardless of whether the field is empty or not. This may be 5491 // used to include empty fields in Patch requests. 5492 ForceSendFields []string `json:"-"` 5493 5494 // NullFields is a list of field names (e.g. "MaxValue") to include in 5495 // API requests with the JSON null value. By default, fields with empty 5496 // values are omitted from API requests. However, any field with an 5497 // empty value appearing in NullFields will be sent to the server as 5498 // null. It is an error if a field in this list has a non-empty value. 5499 // This may be used to include null fields in Patch requests. 5500 NullFields []string `json:"-"` 5501} 5502 5503func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { 5504 type NoMethod GooglePrivacyDlpV2NumericalStatsResult 5505 raw := NoMethod(*s) 5506 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5507} 5508 5509// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing 5510// output. 5511type GooglePrivacyDlpV2OutputStorageConfig struct { 5512 // OutputSchema: Schema used for writing the findings for Inspect jobs. 5513 // This field is only 5514 // used for Inspect and must be unspecified for Risk jobs. Columns are 5515 // derived 5516 // from the `Finding` object. If appending to an existing table, any 5517 // columns 5518 // from the predefined schema that are missing will be added. No columns 5519 // in 5520 // the existing table will be deleted. 5521 // 5522 // If unspecified, then all available columns will be used for a new 5523 // table or 5524 // an (existing) table with no schema, and no changes will be made to 5525 // an 5526 // existing table that has a schema. 5527 // 5528 // Possible values: 5529 // "OUTPUT_SCHEMA_UNSPECIFIED" 5530 // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, 5531 // `certainty`, and 5532 // `timestamp`. 5533 // "GCS_COLUMNS" - Schema tailored to findings from scanning Google 5534 // Cloud Storage. 5535 // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning 5536 // Google Datastore. 5537 // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning 5538 // Google BigQuery. 5539 // "ALL_COLUMNS" - Schema containing all columns. 5540 OutputSchema string `json:"outputSchema,omitempty"` 5541 5542 // Table: Store findings in an existing table or a new table in an 5543 // existing 5544 // dataset. If table_id is not set a new one will be generated 5545 // for you with the following 5546 // format: 5547 // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used 5548 // for 5549 // generating the date details. 5550 // 5551 // For Inspect, each column in an existing output table must have the 5552 // same 5553 // name, type, and mode of a field in the `Finding` object. 5554 // 5555 // For Risk, an existing output table should be the output of a 5556 // previous 5557 // Risk analysis job run on the same source table, with the same 5558 // privacy 5559 // metric and quasi-identifiers. Risk jobs that analyze the same table 5560 // but 5561 // compute a different privacy metric, or use different sets 5562 // of 5563 // quasi-identifiers, cannot store their results in the same table. 5564 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 5565 5566 // ForceSendFields is a list of field names (e.g. "OutputSchema") to 5567 // unconditionally include in API requests. By default, fields with 5568 // empty values are omitted from API requests. However, any non-pointer, 5569 // non-interface field appearing in ForceSendFields will be sent to the 5570 // server regardless of whether the field is empty or not. This may be 5571 // used to include empty fields in Patch requests. 5572 ForceSendFields []string `json:"-"` 5573 5574 // NullFields is a list of field names (e.g. "OutputSchema") to include 5575 // in API requests with the JSON null value. By default, fields with 5576 // empty values are omitted from API requests. However, any field with 5577 // an empty value appearing in NullFields will be sent to the server as 5578 // null. It is an error if a field in this list has a non-empty value. 5579 // This may be used to include null fields in Patch requests. 5580 NullFields []string `json:"-"` 5581} 5582 5583func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { 5584 type NoMethod GooglePrivacyDlpV2OutputStorageConfig 5585 raw := NoMethod(*s) 5586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5587} 5588 5589// GooglePrivacyDlpV2PartitionId: Datastore partition ID. 5590// A partition ID identifies a grouping of entities. The grouping is 5591// always 5592// by project and namespace, however the namespace ID may be empty. 5593// 5594// A partition ID contains several dimensions: 5595// project ID and namespace ID. 5596type GooglePrivacyDlpV2PartitionId struct { 5597 // NamespaceId: If not empty, the ID of the namespace to which the 5598 // entities belong. 5599 NamespaceId string `json:"namespaceId,omitempty"` 5600 5601 // ProjectId: The ID of the project to which the entities belong. 5602 ProjectId string `json:"projectId,omitempty"` 5603 5604 // ForceSendFields is a list of field names (e.g. "NamespaceId") to 5605 // unconditionally include in API requests. By default, fields with 5606 // empty values are omitted from API requests. However, any non-pointer, 5607 // non-interface field appearing in ForceSendFields will be sent to the 5608 // server regardless of whether the field is empty or not. This may be 5609 // used to include empty fields in Patch requests. 5610 ForceSendFields []string `json:"-"` 5611 5612 // NullFields is a list of field names (e.g. "NamespaceId") to include 5613 // in API requests with the JSON null value. By default, fields with 5614 // empty values are omitted from API requests. However, any field with 5615 // an empty value appearing in NullFields will be sent to the server as 5616 // null. It is an error if a field in this list has a non-empty value. 5617 // This may be used to include null fields in Patch requests. 5618 NullFields []string `json:"-"` 5619} 5620 5621func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { 5622 type NoMethod GooglePrivacyDlpV2PartitionId 5623 raw := NoMethod(*s) 5624 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5625} 5626 5627// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to 5628// construct a key path. 5629// 5630// If either name or ID is set, the element is complete. 5631// If neither is set, the element is incomplete. 5632type GooglePrivacyDlpV2PathElement struct { 5633 // Id: The auto-allocated ID of the entity. 5634 // Never equal to zero. Values less than zero are discouraged and may 5635 // not 5636 // be supported in the future. 5637 Id int64 `json:"id,omitempty,string"` 5638 5639 // Kind: The kind of the entity. 5640 // A kind matching regex `__.*__` is reserved/read-only. 5641 // A kind must not contain more than 1500 bytes when UTF-8 5642 // encoded. 5643 // Cannot be "". 5644 Kind string `json:"kind,omitempty"` 5645 5646 // Name: The name of the entity. 5647 // A name matching regex `__.*__` is reserved/read-only. 5648 // A name must not be more than 1500 bytes when UTF-8 encoded. 5649 // Cannot be "". 5650 Name string `json:"name,omitempty"` 5651 5652 // ForceSendFields is a list of field names (e.g. "Id") to 5653 // unconditionally include in API requests. By default, fields with 5654 // empty values are omitted from API requests. However, any non-pointer, 5655 // non-interface field appearing in ForceSendFields will be sent to the 5656 // server regardless of whether the field is empty or not. This may be 5657 // used to include empty fields in Patch requests. 5658 ForceSendFields []string `json:"-"` 5659 5660 // NullFields is a list of field names (e.g. "Id") to include in API 5661 // requests with the JSON null value. By default, fields with empty 5662 // values are omitted from API requests. However, any field with an 5663 // empty value appearing in NullFields will be sent to the server as 5664 // null. It is an error if a field in this list has a non-empty value. 5665 // This may be used to include null fields in Patch requests. 5666 NullFields []string `json:"-"` 5667} 5668 5669func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { 5670 type NoMethod GooglePrivacyDlpV2PathElement 5671 raw := NoMethod(*s) 5672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5673} 5674 5675// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a 5676// value. 5677type GooglePrivacyDlpV2PrimitiveTransformation struct { 5678 BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` 5679 5680 CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 5681 5682 CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` 5683 5684 CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 5685 5686 CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` 5687 5688 DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` 5689 5690 FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` 5691 5692 RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` 5693 5694 ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` 5695 5696 ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 5697 5698 TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` 5699 5700 // ForceSendFields is a list of field names (e.g. "BucketingConfig") to 5701 // unconditionally include in API requests. By default, fields with 5702 // empty values are omitted from API requests. However, any non-pointer, 5703 // non-interface field appearing in ForceSendFields will be sent to the 5704 // server regardless of whether the field is empty or not. This may be 5705 // used to include empty fields in Patch requests. 5706 ForceSendFields []string `json:"-"` 5707 5708 // NullFields is a list of field names (e.g. "BucketingConfig") to 5709 // include in API requests with the JSON null value. By default, fields 5710 // with empty values are omitted from API requests. However, any field 5711 // with an empty value appearing in NullFields will be sent to the 5712 // server as null. It is an error if a field in this list has a 5713 // non-empty value. This may be used to include null fields in Patch 5714 // requests. 5715 NullFields []string `json:"-"` 5716} 5717 5718func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { 5719 type NoMethod GooglePrivacyDlpV2PrimitiveTransformation 5720 raw := NoMethod(*s) 5721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5722} 5723 5724// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for 5725// reidentification risk analysis. 5726type GooglePrivacyDlpV2PrivacyMetric struct { 5727 CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` 5728 5729 DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` 5730 5731 KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` 5732 5733 KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` 5734 5735 LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` 5736 5737 NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` 5738 5739 // ForceSendFields is a list of field names (e.g. 5740 // "CategoricalStatsConfig") to unconditionally include in API requests. 5741 // By default, fields with empty values are omitted from API requests. 5742 // However, any non-pointer, non-interface field appearing in 5743 // ForceSendFields will be sent to the server regardless of whether the 5744 // field is empty or not. This may be used to include empty fields in 5745 // Patch requests. 5746 ForceSendFields []string `json:"-"` 5747 5748 // NullFields is a list of field names (e.g. "CategoricalStatsConfig") 5749 // to include in API requests with the JSON null value. By default, 5750 // fields with empty values are omitted from API requests. However, any 5751 // field with an empty value appearing in NullFields will be sent to the 5752 // server as null. It is an error if a field in this list has a 5753 // non-empty value. This may be used to include null fields in Patch 5754 // requests. 5755 NullFields []string `json:"-"` 5756} 5757 5758func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { 5759 type NoMethod GooglePrivacyDlpV2PrivacyMetric 5760 raw := NoMethod(*s) 5761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5762} 5763 5764// GooglePrivacyDlpV2Proximity: Message for specifying a window around a 5765// finding to apply a detection 5766// rule. 5767type GooglePrivacyDlpV2Proximity struct { 5768 // WindowAfter: Number of characters after the finding to consider. 5769 WindowAfter int64 `json:"windowAfter,omitempty"` 5770 5771 // WindowBefore: Number of characters before the finding to consider. 5772 WindowBefore int64 `json:"windowBefore,omitempty"` 5773 5774 // ForceSendFields is a list of field names (e.g. "WindowAfter") to 5775 // unconditionally include in API requests. By default, fields with 5776 // empty values are omitted from API requests. However, any non-pointer, 5777 // non-interface field appearing in ForceSendFields will be sent to the 5778 // server regardless of whether the field is empty or not. This may be 5779 // used to include empty fields in Patch requests. 5780 ForceSendFields []string `json:"-"` 5781 5782 // NullFields is a list of field names (e.g. "WindowAfter") to include 5783 // in API requests with the JSON null value. By default, fields with 5784 // empty values are omitted from API requests. However, any field with 5785 // an empty value appearing in NullFields will be sent to the server as 5786 // null. It is an error if a field in this list has a non-empty value. 5787 // This may be used to include null fields in Patch requests. 5788 NullFields []string `json:"-"` 5789} 5790 5791func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { 5792 type NoMethod GooglePrivacyDlpV2Proximity 5793 raw := NoMethod(*s) 5794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5795} 5796 5797// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings 5798// of a DlpJob to Cloud Data Catalog. Labels summarizing the 5799// results of the DlpJob will be applied to the entry for the resource 5800// scanned 5801// in Cloud Data Catalog. Any labels previously written by another 5802// DlpJob will 5803// be deleted. InfoType naming patterns are strictly enforced when using 5804// this 5805// feature. Note that the findings will be persisted in Cloud Data 5806// Catalog 5807// storage and are governed by Data Catalog service-specific policy, 5808// see 5809// https://cloud.google.com/terms/service-terms 5810// Only a single instance of this action can be specified and only 5811// allowed if 5812// all resources being scanned are BigQuery tables. 5813// Compatible with: Inspect 5814type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { 5815} 5816 5817// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of 5818// a DlpJob to the Cloud Security 5819// Command Center (CSCC Alpha). 5820// This action is only available for projects which are parts of 5821// an organization and whitelisted for the alpha Cloud Security 5822// Command 5823// Center. 5824// The action will publish count of finding instances and their info 5825// types. 5826// The summary of findings will be persisted in CSCC and are governed by 5827// CSCC 5828// service-specific policy, see 5829// https://cloud.google.com/terms/service-terms 5830// Only a single instance of this action can be specified. 5831// Compatible with: Inspect 5832type GooglePrivacyDlpV2PublishSummaryToCscc struct { 5833} 5834 5835// GooglePrivacyDlpV2PublishToPubSub: Publish a message into given 5836// Pub/Sub topic when DlpJob has completed. The 5837// message contains a single field, `DlpJobName`, which is equal to 5838// the 5839// finished 5840// job's 5841// [`DlpJob.name`](/dlp/docs/reference/rest/v2/projects.dlpJobs#Dlp 5842// Job). 5843// Compatible with: Inspect, Risk 5844type GooglePrivacyDlpV2PublishToPubSub struct { 5845 // Topic: Cloud Pub/Sub topic to send notifications to. The topic must 5846 // have given 5847 // publishing access rights to the DLP API service account executing 5848 // the long running DlpJob sending the notifications. 5849 // Format is projects/{project}/topics/{topic}. 5850 Topic string `json:"topic,omitempty"` 5851 5852 // ForceSendFields is a list of field names (e.g. "Topic") to 5853 // unconditionally include in API requests. By default, fields with 5854 // empty values are omitted from API requests. However, any non-pointer, 5855 // non-interface field appearing in ForceSendFields will be sent to the 5856 // server regardless of whether the field is empty or not. This may be 5857 // used to include empty fields in Patch requests. 5858 ForceSendFields []string `json:"-"` 5859 5860 // NullFields is a list of field names (e.g. "Topic") to include in API 5861 // requests with the JSON null value. By default, fields with empty 5862 // values are omitted from API requests. However, any field with an 5863 // empty value appearing in NullFields will be sent to the server as 5864 // null. It is an error if a field in this list has a non-empty value. 5865 // This may be used to include null fields in Patch requests. 5866 NullFields []string `json:"-"` 5867} 5868 5869func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { 5870 type NoMethod GooglePrivacyDlpV2PublishToPubSub 5871 raw := NoMethod(*s) 5872 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5873} 5874 5875// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric 5876// dlp.googleapis.com/finding_count. This 5877// will publish a metric to stack driver on each infotype requested 5878// and 5879// how many findings were found for it. CustomDetectors will be 5880// bucketed 5881// as 'Custom' under the Stackdriver label 'info_type'. 5882type GooglePrivacyDlpV2PublishToStackdriver struct { 5883} 5884 5885// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. 5886type GooglePrivacyDlpV2QuasiId struct { 5887 // CustomTag: A column can be tagged with a custom tag. In this case, 5888 // the user must 5889 // indicate an auxiliary table that contains statistical information 5890 // on 5891 // the possible values of this column (below). 5892 CustomTag string `json:"customTag,omitempty"` 5893 5894 // Field: Identifies the column. [required] 5895 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5896 5897 // Inferred: If no semantic tag is indicated, we infer the statistical 5898 // model from 5899 // the distribution of values in the input data 5900 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 5901 5902 // InfoType: A column can be tagged with a InfoType to use the relevant 5903 // public 5904 // dataset as a statistical model of population, if available. 5905 // We 5906 // currently support US ZIP codes, region codes, ages and genders. 5907 // To programmatically obtain the list of supported InfoTypes, 5908 // use 5909 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 5910 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 5911 5912 // ForceSendFields is a list of field names (e.g. "CustomTag") to 5913 // unconditionally include in API requests. By default, fields with 5914 // empty values are omitted from API requests. However, any non-pointer, 5915 // non-interface field appearing in ForceSendFields will be sent to the 5916 // server regardless of whether the field is empty or not. This may be 5917 // used to include empty fields in Patch requests. 5918 ForceSendFields []string `json:"-"` 5919 5920 // NullFields is a list of field names (e.g. "CustomTag") to include in 5921 // API requests with the JSON null value. By default, fields with empty 5922 // values are omitted from API requests. However, any field with an 5923 // empty value appearing in NullFields will be sent to the server as 5924 // null. It is an error if a field in this list has a non-empty value. 5925 // This may be used to include null fields in Patch requests. 5926 NullFields []string `json:"-"` 5927} 5928 5929func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { 5930 type NoMethod GooglePrivacyDlpV2QuasiId 5931 raw := NoMethod(*s) 5932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5933} 5934 5935// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a 5936// custom_tag, used to know which column 5937// in the data corresponds to which column in the statistical model. 5938type GooglePrivacyDlpV2QuasiIdField struct { 5939 CustomTag string `json:"customTag,omitempty"` 5940 5941 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5942 5943 // ForceSendFields is a list of field names (e.g. "CustomTag") to 5944 // unconditionally include in API requests. By default, fields with 5945 // empty values are omitted from API requests. However, any non-pointer, 5946 // non-interface field appearing in ForceSendFields will be sent to the 5947 // server regardless of whether the field is empty or not. This may be 5948 // used to include empty fields in Patch requests. 5949 ForceSendFields []string `json:"-"` 5950 5951 // NullFields is a list of field names (e.g. "CustomTag") to include in 5952 // API requests with the JSON null value. By default, fields with empty 5953 // values are omitted from API requests. However, any field with an 5954 // empty value appearing in NullFields will be sent to the server as 5955 // null. It is an error if a field in this list has a non-empty value. 5956 // This may be used to include null fields in Patch requests. 5957 NullFields []string `json:"-"` 5958} 5959 5960func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { 5961 type NoMethod GooglePrivacyDlpV2QuasiIdField 5962 raw := NoMethod(*s) 5963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5964} 5965 5966// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has 5967// a custom_tag, used to know which column 5968// in the data corresponds to which column in the statistical model. 5969type GooglePrivacyDlpV2QuasiIdentifierField struct { 5970 CustomTag string `json:"customTag,omitempty"` 5971 5972 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5973 5974 // ForceSendFields is a list of field names (e.g. "CustomTag") to 5975 // unconditionally include in API requests. By default, fields with 5976 // empty values are omitted from API requests. However, any non-pointer, 5977 // non-interface field appearing in ForceSendFields will be sent to the 5978 // server regardless of whether the field is empty or not. This may be 5979 // used to include empty fields in Patch requests. 5980 ForceSendFields []string `json:"-"` 5981 5982 // NullFields is a list of field names (e.g. "CustomTag") to include in 5983 // API requests with the JSON null value. By default, fields with empty 5984 // values are omitted from API requests. However, any field with an 5985 // empty value appearing in NullFields will be sent to the server as 5986 // null. It is an error if a field in this list has a non-empty value. 5987 // This may be used to include null fields in Patch requests. 5988 NullFields []string `json:"-"` 5989} 5990 5991func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { 5992 type NoMethod GooglePrivacyDlpV2QuasiIdentifierField 5993 raw := NoMethod(*s) 5994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5995} 5996 5997// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details 5998// parsed from quote. 5999type GooglePrivacyDlpV2QuoteInfo struct { 6000 // DateTime: The date time indicated by the quote. 6001 DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` 6002 6003 // ForceSendFields is a list of field names (e.g. "DateTime") to 6004 // unconditionally include in API requests. By default, fields with 6005 // empty values are omitted from API requests. However, any non-pointer, 6006 // non-interface field appearing in ForceSendFields will be sent to the 6007 // server regardless of whether the field is empty or not. This may be 6008 // used to include empty fields in Patch requests. 6009 ForceSendFields []string `json:"-"` 6010 6011 // NullFields is a list of field names (e.g. "DateTime") to include in 6012 // API requests with the JSON null value. By default, fields with empty 6013 // values are omitted from API requests. However, any field with an 6014 // empty value appearing in NullFields will be sent to the server as 6015 // null. It is an error if a field in this list has a non-empty value. 6016 // This may be used to include null fields in Patch requests. 6017 NullFields []string `json:"-"` 6018} 6019 6020func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { 6021 type NoMethod GooglePrivacyDlpV2QuoteInfo 6022 raw := NoMethod(*s) 6023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6024} 6025 6026// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) 6027type GooglePrivacyDlpV2Range struct { 6028 // End: Index of the last character of the range (exclusive). 6029 End int64 `json:"end,omitempty,string"` 6030 6031 // Start: Index of the first character of the range (inclusive). 6032 Start int64 `json:"start,omitempty,string"` 6033 6034 // ForceSendFields is a list of field names (e.g. "End") to 6035 // unconditionally include in API requests. By default, fields with 6036 // empty values are omitted from API requests. However, any non-pointer, 6037 // non-interface field appearing in ForceSendFields will be sent to the 6038 // server regardless of whether the field is empty or not. This may be 6039 // used to include empty fields in Patch requests. 6040 ForceSendFields []string `json:"-"` 6041 6042 // NullFields is a list of field names (e.g. "End") to include in API 6043 // requests with the JSON null value. By default, fields with empty 6044 // values are omitted from API requests. However, any field with an 6045 // empty value appearing in NullFields will be sent to the server as 6046 // null. It is an error if a field in this list has a non-empty value. 6047 // This may be used to include null fields in Patch requests. 6048 NullFields []string `json:"-"` 6049} 6050 6051func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { 6052 type NoMethod GooglePrivacyDlpV2Range 6053 raw := NoMethod(*s) 6054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6055} 6056 6057// GooglePrivacyDlpV2RecordCondition: A condition for determining 6058// whether a transformation should be applied to 6059// a field. 6060type GooglePrivacyDlpV2RecordCondition struct { 6061 // Expressions: An expression. 6062 Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` 6063 6064 // ForceSendFields is a list of field names (e.g. "Expressions") to 6065 // unconditionally include in API requests. By default, fields with 6066 // empty values are omitted from API requests. However, any non-pointer, 6067 // non-interface field appearing in ForceSendFields will be sent to the 6068 // server regardless of whether the field is empty or not. This may be 6069 // used to include empty fields in Patch requests. 6070 ForceSendFields []string `json:"-"` 6071 6072 // NullFields is a list of field names (e.g. "Expressions") to include 6073 // in API requests with the JSON null value. By default, fields with 6074 // empty values are omitted from API requests. However, any field with 6075 // an empty value appearing in NullFields will be sent to the server as 6076 // null. It is an error if a field in this list has a non-empty value. 6077 // This may be used to include null fields in Patch requests. 6078 NullFields []string `json:"-"` 6079} 6080 6081func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { 6082 type NoMethod GooglePrivacyDlpV2RecordCondition 6083 raw := NoMethod(*s) 6084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6085} 6086 6087// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a 6088// record that contains a finding. 6089type GooglePrivacyDlpV2RecordKey struct { 6090 BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` 6091 6092 DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` 6093 6094 // IdValues: Values of identifying columns in the given row. Order of 6095 // values matches 6096 // the order of field identifiers specified in the scanning request. 6097 IdValues []string `json:"idValues,omitempty"` 6098 6099 // ForceSendFields is a list of field names (e.g. "BigQueryKey") to 6100 // unconditionally include in API requests. By default, fields with 6101 // empty values are omitted from API requests. However, any non-pointer, 6102 // non-interface field appearing in ForceSendFields will be sent to the 6103 // server regardless of whether the field is empty or not. This may be 6104 // used to include empty fields in Patch requests. 6105 ForceSendFields []string `json:"-"` 6106 6107 // NullFields is a list of field names (e.g. "BigQueryKey") to include 6108 // in API requests with the JSON null value. By default, fields with 6109 // empty values are omitted from API requests. However, any field with 6110 // an empty value appearing in NullFields will be sent to the server as 6111 // null. It is an error if a field in this list has a non-empty value. 6112 // This may be used to include null fields in Patch requests. 6113 NullFields []string `json:"-"` 6114} 6115 6116func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { 6117 type NoMethod GooglePrivacyDlpV2RecordKey 6118 raw := NoMethod(*s) 6119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6120} 6121 6122// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row 6123// or record. 6124type GooglePrivacyDlpV2RecordLocation struct { 6125 // FieldId: Field id of the field containing the finding. 6126 FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` 6127 6128 // RecordKey: Key of the finding. 6129 RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` 6130 6131 // TableLocation: Location within a `ContentItem.Table`. 6132 TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` 6133 6134 // ForceSendFields is a list of field names (e.g. "FieldId") to 6135 // unconditionally include in API requests. By default, fields with 6136 // empty values are omitted from API requests. However, any non-pointer, 6137 // non-interface field appearing in ForceSendFields will be sent to the 6138 // server regardless of whether the field is empty or not. This may be 6139 // used to include empty fields in Patch requests. 6140 ForceSendFields []string `json:"-"` 6141 6142 // NullFields is a list of field names (e.g. "FieldId") to include in 6143 // API requests with the JSON null value. By default, fields with empty 6144 // values are omitted from API requests. However, any field with an 6145 // empty value appearing in NullFields will be sent to the server as 6146 // null. It is an error if a field in this list has a non-empty value. 6147 // This may be used to include null fields in Patch requests. 6148 NullFields []string `json:"-"` 6149} 6150 6151func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { 6152 type NoMethod GooglePrivacyDlpV2RecordLocation 6153 raw := NoMethod(*s) 6154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6155} 6156 6157// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress 6158// records whose suppression conditions evaluate to 6159// true. 6160type GooglePrivacyDlpV2RecordSuppression struct { 6161 // Condition: A condition that when it evaluates to true will result in 6162 // the record being 6163 // evaluated to be suppressed from the transformed content. 6164 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 6165 6166 // ForceSendFields is a list of field names (e.g. "Condition") to 6167 // unconditionally include in API requests. By default, fields with 6168 // empty values are omitted from API requests. However, any non-pointer, 6169 // non-interface field appearing in ForceSendFields will be sent to the 6170 // server regardless of whether the field is empty or not. This may be 6171 // used to include empty fields in Patch requests. 6172 ForceSendFields []string `json:"-"` 6173 6174 // NullFields is a list of field names (e.g. "Condition") to include in 6175 // API requests with the JSON null value. By default, fields with empty 6176 // values are omitted from API requests. However, any field with an 6177 // empty value appearing in NullFields will be sent to the server as 6178 // null. It is an error if a field in this list has a non-empty value. 6179 // This may be used to include null fields in Patch requests. 6180 NullFields []string `json:"-"` 6181} 6182 6183func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { 6184 type NoMethod GooglePrivacyDlpV2RecordSuppression 6185 raw := NoMethod(*s) 6186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6187} 6188 6189// GooglePrivacyDlpV2RecordTransformations: A type of transformation 6190// that is applied over structured data such as a 6191// table. 6192type GooglePrivacyDlpV2RecordTransformations struct { 6193 // FieldTransformations: Transform the record by applying various field 6194 // transformations. 6195 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 6196 6197 // RecordSuppressions: Configuration defining which records get 6198 // suppressed entirely. Records that 6199 // match any suppression rule are omitted from the output [optional]. 6200 RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` 6201 6202 // ForceSendFields is a list of field names (e.g. 6203 // "FieldTransformations") to unconditionally include in API requests. 6204 // By default, fields with empty values are omitted from API requests. 6205 // However, any non-pointer, non-interface field appearing in 6206 // ForceSendFields will be sent to the server regardless of whether the 6207 // field is empty or not. This may be used to include empty fields in 6208 // Patch requests. 6209 ForceSendFields []string `json:"-"` 6210 6211 // NullFields is a list of field names (e.g. "FieldTransformations") to 6212 // include in API requests with the JSON null value. By default, fields 6213 // with empty values are omitted from API requests. However, any field 6214 // with an empty value appearing in NullFields will be sent to the 6215 // server as null. It is an error if a field in this list has a 6216 // non-empty value. This may be used to include null fields in Patch 6217 // requests. 6218 NullFields []string `json:"-"` 6219} 6220 6221func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { 6222 type NoMethod GooglePrivacyDlpV2RecordTransformations 6223 raw := NoMethod(*s) 6224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6225} 6226 6227// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if 6228// used with an `InfoTypeTransformation` 6229// transforming PHONE_NUMBER, and input 'My phone number is 6230// 206-555-0123', the 6231// output would be 'My phone number is '. 6232type GooglePrivacyDlpV2RedactConfig struct { 6233} 6234 6235// GooglePrivacyDlpV2RedactImageRequest: Request to search for 6236// potentially sensitive info in an image and redact it 6237// by covering it with a colored rectangle. 6238type GooglePrivacyDlpV2RedactImageRequest struct { 6239 // ByteItem: The content must be PNG, JPEG, SVG or BMP. 6240 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 6241 6242 // ImageRedactionConfigs: The configuration for specifying what content 6243 // to redact from images. 6244 ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` 6245 6246 // IncludeFindings: Whether the response should include findings along 6247 // with the redacted 6248 // image. 6249 IncludeFindings bool `json:"includeFindings,omitempty"` 6250 6251 // InspectConfig: Configuration for the inspector. 6252 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6253 6254 // Location: The geographic location to process the request. Reserved 6255 // for future 6256 // extensions. 6257 Location string `json:"location,omitempty"` 6258 6259 // ForceSendFields is a list of field names (e.g. "ByteItem") to 6260 // unconditionally include in API requests. By default, fields with 6261 // empty values are omitted from API requests. However, any non-pointer, 6262 // non-interface field appearing in ForceSendFields will be sent to the 6263 // server regardless of whether the field is empty or not. This may be 6264 // used to include empty fields in Patch requests. 6265 ForceSendFields []string `json:"-"` 6266 6267 // NullFields is a list of field names (e.g. "ByteItem") to include in 6268 // API requests with the JSON null value. By default, fields with empty 6269 // values are omitted from API requests. However, any field with an 6270 // empty value appearing in NullFields will be sent to the server as 6271 // null. It is an error if a field in this list has a non-empty value. 6272 // This may be used to include null fields in Patch requests. 6273 NullFields []string `json:"-"` 6274} 6275 6276func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { 6277 type NoMethod GooglePrivacyDlpV2RedactImageRequest 6278 raw := NoMethod(*s) 6279 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6280} 6281 6282// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. 6283type GooglePrivacyDlpV2RedactImageResponse struct { 6284 // ExtractedText: If an image was being inspected and the 6285 // InspectConfig's include_quote was 6286 // set to true, then this field will include all text, if any, that was 6287 // found 6288 // in the image. 6289 ExtractedText string `json:"extractedText,omitempty"` 6290 6291 // InspectResult: The findings. Populated when include_findings in the 6292 // request is true. 6293 InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` 6294 6295 // RedactedImage: The redacted image. The type will be the same as the 6296 // original image. 6297 RedactedImage string `json:"redactedImage,omitempty"` 6298 6299 // ServerResponse contains the HTTP response code and headers from the 6300 // server. 6301 googleapi.ServerResponse `json:"-"` 6302 6303 // ForceSendFields is a list of field names (e.g. "ExtractedText") to 6304 // unconditionally include in API requests. By default, fields with 6305 // empty values are omitted from API requests. However, any non-pointer, 6306 // non-interface field appearing in ForceSendFields will be sent to the 6307 // server regardless of whether the field is empty or not. This may be 6308 // used to include empty fields in Patch requests. 6309 ForceSendFields []string `json:"-"` 6310 6311 // NullFields is a list of field names (e.g. "ExtractedText") to include 6312 // in API requests with the JSON null value. By default, fields with 6313 // empty values are omitted from API requests. However, any field with 6314 // an empty value appearing in NullFields will be sent to the server as 6315 // null. It is an error if a field in this list has a non-empty value. 6316 // This may be used to include null fields in Patch requests. 6317 NullFields []string `json:"-"` 6318} 6319 6320func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { 6321 type NoMethod GooglePrivacyDlpV2RedactImageResponse 6322 raw := NoMethod(*s) 6323 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6324} 6325 6326// GooglePrivacyDlpV2Regex: Message defining a custom regular 6327// expression. 6328type GooglePrivacyDlpV2Regex struct { 6329 // GroupIndexes: The index of the submatch to extract as findings. When 6330 // not 6331 // specified, the entire match is returned. No more than 3 may be 6332 // included. 6333 GroupIndexes []int64 `json:"groupIndexes,omitempty"` 6334 6335 // Pattern: Pattern defining the regular expression. Its 6336 // syntax 6337 // (https://github.com/google/re2/wiki/Syntax) can be found under 6338 // the 6339 // google/re2 repository on GitHub. 6340 Pattern string `json:"pattern,omitempty"` 6341 6342 // ForceSendFields is a list of field names (e.g. "GroupIndexes") to 6343 // unconditionally include in API requests. By default, fields with 6344 // empty values are omitted from API requests. However, any non-pointer, 6345 // non-interface field appearing in ForceSendFields will be sent to the 6346 // server regardless of whether the field is empty or not. This may be 6347 // used to include empty fields in Patch requests. 6348 ForceSendFields []string `json:"-"` 6349 6350 // NullFields is a list of field names (e.g. "GroupIndexes") to include 6351 // in API requests with the JSON null value. By default, fields with 6352 // empty values are omitted from API requests. However, any field with 6353 // an empty value appearing in NullFields will be sent to the server as 6354 // null. It is an error if a field in this list has a non-empty value. 6355 // This may be used to include null fields in Patch requests. 6356 NullFields []string `json:"-"` 6357} 6358 6359func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { 6360 type NoMethod GooglePrivacyDlpV2Regex 6361 raw := NoMethod(*s) 6362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6363} 6364 6365// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an 6366// item. 6367type GooglePrivacyDlpV2ReidentifyContentRequest struct { 6368 // InspectConfig: Configuration for the inspector. 6369 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6370 6371 // InspectTemplateName: Optional template to use. Any configuration 6372 // directly specified in 6373 // `inspect_config` will override those set in the template. Singular 6374 // fields 6375 // that are set in this request will replace their corresponding fields 6376 // in the 6377 // template. Repeated fields are appended. Singular sub-messages and 6378 // groups 6379 // are recursively merged. 6380 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 6381 6382 // Item: The item to re-identify. Will be treated as text. 6383 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6384 6385 // Location: The geographic location to process content 6386 // reidentification. Reserved for 6387 // future extensions. 6388 Location string `json:"location,omitempty"` 6389 6390 // ReidentifyConfig: Configuration for the re-identification of the 6391 // content item. 6392 // This field shares the same proto message type that is used 6393 // for 6394 // de-identification, however its usage here is for the reversal of 6395 // the 6396 // previous de-identification. Re-identification is performed by 6397 // examining 6398 // the transformations used to de-identify the items and executing 6399 // the 6400 // reverse. This requires that only reversible transformations 6401 // be provided here. The reversible transformations are: 6402 // 6403 // - `CryptoDeterministicConfig` 6404 // - `CryptoReplaceFfxFpeConfig` 6405 ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` 6406 6407 // ReidentifyTemplateName: Optional template to use. References an 6408 // instance of `DeidentifyTemplate`. 6409 // Any configuration directly specified in `reidentify_config` 6410 // or 6411 // `inspect_config` will override those set in the template. Singular 6412 // fields 6413 // that are set in this request will replace their corresponding fields 6414 // in the 6415 // template. Repeated fields are appended. Singular sub-messages and 6416 // groups 6417 // are recursively merged. 6418 ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` 6419 6420 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 6421 // unconditionally include in API requests. By default, fields with 6422 // empty values are omitted from API requests. However, any non-pointer, 6423 // non-interface field appearing in ForceSendFields will be sent to the 6424 // server regardless of whether the field is empty or not. This may be 6425 // used to include empty fields in Patch requests. 6426 ForceSendFields []string `json:"-"` 6427 6428 // NullFields is a list of field names (e.g. "InspectConfig") to include 6429 // in API requests with the JSON null value. By default, fields with 6430 // empty values are omitted from API requests. However, any field with 6431 // an empty value appearing in NullFields will be sent to the server as 6432 // null. It is an error if a field in this list has a non-empty value. 6433 // This may be used to include null fields in Patch requests. 6434 NullFields []string `json:"-"` 6435} 6436 6437func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { 6438 type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest 6439 raw := NoMethod(*s) 6440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6441} 6442 6443// GooglePrivacyDlpV2ReidentifyContentResponse: Results of 6444// re-identifying a item. 6445type GooglePrivacyDlpV2ReidentifyContentResponse struct { 6446 // Item: The re-identified item. 6447 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6448 6449 // Overview: An overview of the changes that were made to the `item`. 6450 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 6451 6452 // ServerResponse contains the HTTP response code and headers from the 6453 // server. 6454 googleapi.ServerResponse `json:"-"` 6455 6456 // ForceSendFields is a list of field names (e.g. "Item") to 6457 // unconditionally include in API requests. By default, fields with 6458 // empty values are omitted from API requests. However, any non-pointer, 6459 // non-interface field appearing in ForceSendFields will be sent to the 6460 // server regardless of whether the field is empty or not. This may be 6461 // used to include empty fields in Patch requests. 6462 ForceSendFields []string `json:"-"` 6463 6464 // NullFields is a list of field names (e.g. "Item") to include in API 6465 // requests with the JSON null value. By default, fields with empty 6466 // values are omitted from API requests. However, any field with an 6467 // empty value appearing in NullFields will be sent to the server as 6468 // null. It is an error if a field in this list has a non-empty value. 6469 // This may be used to include null fields in Patch requests. 6470 NullFields []string `json:"-"` 6471} 6472 6473func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { 6474 type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse 6475 raw := NoMethod(*s) 6476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6477} 6478 6479// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a 6480// given `Value`. 6481type GooglePrivacyDlpV2ReplaceValueConfig struct { 6482 // NewValue: Value to replace it with. 6483 NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` 6484 6485 // ForceSendFields is a list of field names (e.g. "NewValue") to 6486 // unconditionally include in API requests. By default, fields with 6487 // empty values are omitted from API requests. However, any non-pointer, 6488 // non-interface field appearing in ForceSendFields will be sent to the 6489 // server regardless of whether the field is empty or not. This may be 6490 // used to include empty fields in Patch requests. 6491 ForceSendFields []string `json:"-"` 6492 6493 // NullFields is a list of field names (e.g. "NewValue") to include in 6494 // API requests with the JSON null value. By default, fields with empty 6495 // values are omitted from API requests. However, any field with an 6496 // empty value appearing in NullFields will be sent to the server as 6497 // null. It is an error if a field in this list has a non-empty value. 6498 // This may be used to include null fields in Patch requests. 6499 NullFields []string `json:"-"` 6500} 6501 6502func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { 6503 type NoMethod GooglePrivacyDlpV2ReplaceValueConfig 6504 raw := NoMethod(*s) 6505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6506} 6507 6508// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching 6509// finding with the name of the info_type. 6510type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { 6511} 6512 6513type GooglePrivacyDlpV2RequestedOptions struct { 6514 JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` 6515 6516 // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot 6517 // of its state at the time of 6518 // this run. 6519 SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` 6520 6521 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6522 // unconditionally include in API requests. By default, fields with 6523 // empty values are omitted from API requests. However, any non-pointer, 6524 // non-interface field appearing in ForceSendFields will be sent to the 6525 // server regardless of whether the field is empty or not. This may be 6526 // used to include empty fields in Patch requests. 6527 ForceSendFields []string `json:"-"` 6528 6529 // NullFields is a list of field names (e.g. "JobConfig") to include in 6530 // API requests with the JSON null value. By default, fields with empty 6531 // values are omitted from API requests. However, any field with an 6532 // empty value appearing in NullFields will be sent to the server as 6533 // null. It is an error if a field in this list has a non-empty value. 6534 // This may be used to include null fields in Patch requests. 6535 NullFields []string `json:"-"` 6536} 6537 6538func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { 6539 type NoMethod GooglePrivacyDlpV2RequestedOptions 6540 raw := NoMethod(*s) 6541 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6542} 6543 6544// GooglePrivacyDlpV2Result: All result fields mentioned below are 6545// updated while the job is processing. 6546type GooglePrivacyDlpV2Result struct { 6547 // InfoTypeStats: Statistics of how many instances of each info type 6548 // were found during 6549 // inspect job. 6550 InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` 6551 6552 // ProcessedBytes: Total size in bytes that were processed. 6553 ProcessedBytes int64 `json:"processedBytes,omitempty,string"` 6554 6555 // TotalEstimatedBytes: Estimate of the number of bytes to process. 6556 TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` 6557 6558 // ForceSendFields is a list of field names (e.g. "InfoTypeStats") to 6559 // unconditionally include in API requests. By default, fields with 6560 // empty values are omitted from API requests. However, any non-pointer, 6561 // non-interface field appearing in ForceSendFields will be sent to the 6562 // server regardless of whether the field is empty or not. This may be 6563 // used to include empty fields in Patch requests. 6564 ForceSendFields []string `json:"-"` 6565 6566 // NullFields is a list of field names (e.g. "InfoTypeStats") to include 6567 // in API requests with the JSON null value. By default, fields with 6568 // empty values are omitted from API requests. However, any field with 6569 // an empty value appearing in NullFields will be sent to the server as 6570 // null. It is an error if a field in this list has a non-empty value. 6571 // This may be used to include null fields in Patch requests. 6572 NullFields []string `json:"-"` 6573} 6574 6575func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { 6576 type NoMethod GooglePrivacyDlpV2Result 6577 raw := NoMethod(*s) 6578 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6579} 6580 6581// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk 6582// analysis job. 6583// See 6584// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn 6585// more. 6586type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { 6587 // Actions: Actions to execute at the completion of the job. Are 6588 // executed in the order 6589 // provided. 6590 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 6591 6592 // PrivacyMetric: Privacy metric to compute. 6593 PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` 6594 6595 // SourceTable: Input dataset to compute metrics over. 6596 SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` 6597 6598 // ForceSendFields is a list of field names (e.g. "Actions") to 6599 // unconditionally include in API requests. By default, fields with 6600 // empty values are omitted from API requests. However, any non-pointer, 6601 // non-interface field appearing in ForceSendFields will be sent to the 6602 // server regardless of whether the field is empty or not. This may be 6603 // used to include empty fields in Patch requests. 6604 ForceSendFields []string `json:"-"` 6605 6606 // NullFields is a list of field names (e.g. "Actions") to include in 6607 // API requests with the JSON null value. By default, fields with empty 6608 // values are omitted from API requests. However, any field with an 6609 // empty value appearing in NullFields will be sent to the server as 6610 // null. It is an error if a field in this list has a non-empty value. 6611 // This may be used to include null fields in Patch requests. 6612 NullFields []string `json:"-"` 6613} 6614 6615func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { 6616 type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig 6617 raw := NoMethod(*s) 6618 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6619} 6620 6621type GooglePrivacyDlpV2Row struct { 6622 Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` 6623 6624 // ForceSendFields is a list of field names (e.g. "Values") to 6625 // unconditionally include in API requests. By default, fields with 6626 // empty values are omitted from API requests. However, any non-pointer, 6627 // non-interface field appearing in ForceSendFields will be sent to the 6628 // server regardless of whether the field is empty or not. This may be 6629 // used to include empty fields in Patch requests. 6630 ForceSendFields []string `json:"-"` 6631 6632 // NullFields is a list of field names (e.g. "Values") to include in API 6633 // requests with the JSON null value. By default, fields with empty 6634 // values are omitted from API requests. However, any field with an 6635 // empty value appearing in NullFields will be sent to the server as 6636 // null. It is an error if a field in this list has a non-empty value. 6637 // This may be used to include null fields in Patch requests. 6638 NullFields []string `json:"-"` 6639} 6640 6641func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { 6642 type NoMethod GooglePrivacyDlpV2Row 6643 raw := NoMethod(*s) 6644 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6645} 6646 6647// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be 6648// persisted to the specified 6649// OutputStorageConfig. Only a single instance of this action can 6650// be 6651// specified. 6652// Compatible with: Inspect, Risk 6653type GooglePrivacyDlpV2SaveFindings struct { 6654 OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` 6655 6656 // ForceSendFields is a list of field names (e.g. "OutputConfig") to 6657 // unconditionally include in API requests. By default, fields with 6658 // empty values are omitted from API requests. However, any non-pointer, 6659 // non-interface field appearing in ForceSendFields will be sent to the 6660 // server regardless of whether the field is empty or not. This may be 6661 // used to include empty fields in Patch requests. 6662 ForceSendFields []string `json:"-"` 6663 6664 // NullFields is a list of field names (e.g. "OutputConfig") to include 6665 // in API requests with the JSON null value. By default, fields with 6666 // empty values are omitted from API requests. However, any field with 6667 // an empty value appearing in NullFields will be sent to the server as 6668 // null. It is an error if a field in this list has a non-empty value. 6669 // This may be used to include null fields in Patch requests. 6670 NullFields []string `json:"-"` 6671} 6672 6673func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { 6674 type NoMethod GooglePrivacyDlpV2SaveFindings 6675 raw := NoMethod(*s) 6676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6677} 6678 6679// GooglePrivacyDlpV2Schedule: Schedule for triggeredJobs. 6680type GooglePrivacyDlpV2Schedule struct { 6681 // RecurrencePeriodDuration: With this option a job is started a regular 6682 // periodic basis. For 6683 // example: every day (86400 seconds). 6684 // 6685 // A scheduled start time will be skipped if the previous 6686 // execution has not ended when its scheduled time occurs. 6687 // 6688 // This value must be set to a time duration greater than or equal 6689 // to 1 day and can be no longer than 60 days. 6690 RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` 6691 6692 // ForceSendFields is a list of field names (e.g. 6693 // "RecurrencePeriodDuration") to unconditionally include in API 6694 // requests. By default, fields with empty values are omitted from API 6695 // requests. However, any non-pointer, non-interface field appearing in 6696 // ForceSendFields will be sent to the server regardless of whether the 6697 // field is empty or not. This may be used to include empty fields in 6698 // Patch requests. 6699 ForceSendFields []string `json:"-"` 6700 6701 // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") 6702 // to include in API requests with the JSON null value. By default, 6703 // fields with empty values are omitted from API requests. However, any 6704 // field with an empty value appearing in NullFields will be sent to the 6705 // server as null. It is an error if a field in this list has a 6706 // non-empty value. This may be used to include null fields in Patch 6707 // requests. 6708 NullFields []string `json:"-"` 6709} 6710 6711func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { 6712 type NoMethod GooglePrivacyDlpV2Schedule 6713 raw := NoMethod(*s) 6714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6715} 6716 6717// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing 6718// statistical information on the relative 6719// frequency of different quasi-identifiers values. It has one or 6720// several 6721// quasi-identifiers columns, and one column that indicates the 6722// relative 6723// frequency of each quasi-identifier tuple. 6724// If a tuple is present in the data but not in the auxiliary table, 6725// the 6726// corresponding relative frequency is assumed to be zero (and thus, 6727// the 6728// tuple is highly reidentifiable). 6729type GooglePrivacyDlpV2StatisticalTable struct { 6730 // QuasiIds: Quasi-identifier columns. [required] 6731 QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` 6732 6733 // RelativeFrequency: The relative frequency column must contain a 6734 // floating-point number 6735 // between 0 and 1 (inclusive). Null values are assumed to be 6736 // zero. 6737 // [required] 6738 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 6739 6740 // Table: Auxiliary table location. [required] 6741 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 6742 6743 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 6744 // unconditionally include in API requests. By default, fields with 6745 // empty values are omitted from API requests. However, any non-pointer, 6746 // non-interface field appearing in ForceSendFields will be sent to the 6747 // server regardless of whether the field is empty or not. This may be 6748 // used to include empty fields in Patch requests. 6749 ForceSendFields []string `json:"-"` 6750 6751 // NullFields is a list of field names (e.g. "QuasiIds") to include in 6752 // API requests with the JSON null value. By default, fields with empty 6753 // values are omitted from API requests. However, any field with an 6754 // empty value appearing in NullFields will be sent to the server as 6755 // null. It is an error if a field in this list has a non-empty value. 6756 // This may be used to include null fields in Patch requests. 6757 NullFields []string `json:"-"` 6758} 6759 6760func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { 6761 type NoMethod GooglePrivacyDlpV2StatisticalTable 6762 raw := NoMethod(*s) 6763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6764} 6765 6766// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud 6767// storage type. 6768type GooglePrivacyDlpV2StorageConfig struct { 6769 // BigQueryOptions: BigQuery options specification. 6770 BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` 6771 6772 // CloudStorageOptions: Google Cloud Storage options specification. 6773 CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` 6774 6775 // DatastoreOptions: Google Cloud Datastore options specification. 6776 DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` 6777 6778 TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` 6779 6780 // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to 6781 // unconditionally include in API requests. By default, fields with 6782 // empty values are omitted from API requests. However, any non-pointer, 6783 // non-interface field appearing in ForceSendFields will be sent to the 6784 // server regardless of whether the field is empty or not. This may be 6785 // used to include empty fields in Patch requests. 6786 ForceSendFields []string `json:"-"` 6787 6788 // NullFields is a list of field names (e.g. "BigQueryOptions") to 6789 // include in API requests with the JSON null value. By default, fields 6790 // with empty values are omitted from API requests. However, any field 6791 // with an empty value appearing in NullFields will be sent to the 6792 // server as null. It is an error if a field in this list has a 6793 // non-empty value. This may be used to include null fields in Patch 6794 // requests. 6795 NullFields []string `json:"-"` 6796} 6797 6798func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { 6799 type NoMethod GooglePrivacyDlpV2StorageConfig 6800 raw := NoMethod(*s) 6801 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6802} 6803 6804// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message 6805// that contains information about the current 6806// version and any pending updates. 6807type GooglePrivacyDlpV2StoredInfoType struct { 6808 // CurrentVersion: Current version of the stored info type. 6809 CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` 6810 6811 // Name: Resource name. 6812 Name string `json:"name,omitempty"` 6813 6814 // PendingVersions: Pending versions of the stored info type. Empty if 6815 // no versions are 6816 // pending. 6817 PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` 6818 6819 // ServerResponse contains the HTTP response code and headers from the 6820 // server. 6821 googleapi.ServerResponse `json:"-"` 6822 6823 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to 6824 // unconditionally include in API requests. By default, fields with 6825 // empty values are omitted from API requests. However, any non-pointer, 6826 // non-interface field appearing in ForceSendFields will be sent to the 6827 // server regardless of whether the field is empty or not. This may be 6828 // used to include empty fields in Patch requests. 6829 ForceSendFields []string `json:"-"` 6830 6831 // NullFields is a list of field names (e.g. "CurrentVersion") to 6832 // include in API requests with the JSON null value. By default, fields 6833 // with empty values are omitted from API requests. However, any field 6834 // with an empty value appearing in NullFields will be sent to the 6835 // server as null. It is an error if a field in this list has a 6836 // non-empty value. This may be used to include null fields in Patch 6837 // requests. 6838 NullFields []string `json:"-"` 6839} 6840 6841func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { 6842 type NoMethod GooglePrivacyDlpV2StoredInfoType 6843 raw := NoMethod(*s) 6844 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6845} 6846 6847// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for a 6848// StoredInfoType. 6849type GooglePrivacyDlpV2StoredInfoTypeConfig struct { 6850 // Description: Description of the StoredInfoType (max 256 characters). 6851 Description string `json:"description,omitempty"` 6852 6853 // DisplayName: Display name of the StoredInfoType (max 256 characters). 6854 DisplayName string `json:"displayName,omitempty"` 6855 6856 // LargeCustomDictionary: StoredInfoType where findings are defined by a 6857 // dictionary of phrases. 6858 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` 6859 6860 // ForceSendFields is a list of field names (e.g. "Description") to 6861 // unconditionally include in API requests. By default, fields with 6862 // empty values are omitted from API requests. However, any non-pointer, 6863 // non-interface field appearing in ForceSendFields will be sent to the 6864 // server regardless of whether the field is empty or not. This may be 6865 // used to include empty fields in Patch requests. 6866 ForceSendFields []string `json:"-"` 6867 6868 // NullFields is a list of field names (e.g. "Description") to include 6869 // in API requests with the JSON null value. By default, fields with 6870 // empty values are omitted from API requests. However, any field with 6871 // an empty value appearing in NullFields will be sent to the server as 6872 // null. It is an error if a field in this list has a non-empty value. 6873 // This may be used to include null fields in Patch requests. 6874 NullFields []string `json:"-"` 6875} 6876 6877func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { 6878 type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig 6879 raw := NoMethod(*s) 6880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6881} 6882 6883// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a 6884// StoredInfoType. 6885type GooglePrivacyDlpV2StoredInfoTypeStats struct { 6886 // LargeCustomDictionary: StoredInfoType where findings are defined by a 6887 // dictionary of phrases. 6888 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` 6889 6890 // ForceSendFields is a list of field names (e.g. 6891 // "LargeCustomDictionary") to unconditionally include in API requests. 6892 // By default, fields with empty values are omitted from API requests. 6893 // However, any non-pointer, non-interface field appearing in 6894 // ForceSendFields will be sent to the server regardless of whether the 6895 // field is empty or not. This may be used to include empty fields in 6896 // Patch requests. 6897 ForceSendFields []string `json:"-"` 6898 6899 // NullFields is a list of field names (e.g. "LargeCustomDictionary") to 6900 // include in API requests with the JSON null value. By default, fields 6901 // with empty values are omitted from API requests. However, any field 6902 // with an empty value appearing in NullFields will be sent to the 6903 // server as null. It is an error if a field in this list has a 6904 // non-empty value. This may be used to include null fields in Patch 6905 // requests. 6906 NullFields []string `json:"-"` 6907} 6908 6909func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { 6910 type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats 6911 raw := NoMethod(*s) 6912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6913} 6914 6915// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, 6916// including the configuration used to build it, 6917// create timestamp, and current state. 6918type GooglePrivacyDlpV2StoredInfoTypeVersion struct { 6919 // Config: StoredInfoType configuration. 6920 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 6921 6922 // CreateTime: Create timestamp of the version. Read-only, determined by 6923 // the system 6924 // when the version is created. 6925 CreateTime string `json:"createTime,omitempty"` 6926 6927 // Errors: Errors that occurred when creating this storedInfoType 6928 // version, or 6929 // anomalies detected in the storedInfoType data that render it 6930 // unusable. Only 6931 // the five most recent errors will be displayed, with the most recent 6932 // error 6933 // appearing first. 6934 // <p>For example, some of the data for stored custom dictionaries is 6935 // put in 6936 // the user's Google Cloud Storage bucket, and if this data is modified 6937 // or 6938 // deleted by the user or another system, the dictionary becomes 6939 // invalid. 6940 // <p>If any errors occur, fix the problem indicated by the error 6941 // message and 6942 // use the UpdateStoredInfoType API method to create another version of 6943 // the 6944 // storedInfoType to continue using it, reusing the same `config` if it 6945 // was 6946 // not the source of the error. 6947 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 6948 6949 // State: Stored info type version state. Read-only, updated by the 6950 // system 6951 // during dictionary creation. 6952 // 6953 // Possible values: 6954 // "STORED_INFO_TYPE_STATE_UNSPECIFIED" 6955 // "PENDING" - StoredInfoType version is being created. 6956 // "READY" - StoredInfoType version is ready for use. 6957 // "FAILED" - StoredInfoType creation failed. All relevant error 6958 // messages are returned in 6959 // the `StoredInfoTypeVersion` message. 6960 // "INVALID" - StoredInfoType is no longer valid because artifacts 6961 // stored in 6962 // user-controlled storage were modified. To fix an invalid 6963 // StoredInfoType, 6964 // use the `UpdateStoredInfoType` method to create a new version. 6965 State string `json:"state,omitempty"` 6966 6967 // Stats: Statistics about this storedInfoType version. 6968 Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` 6969 6970 // ForceSendFields is a list of field names (e.g. "Config") to 6971 // unconditionally include in API requests. By default, fields with 6972 // empty values are omitted from API requests. However, any non-pointer, 6973 // non-interface field appearing in ForceSendFields will be sent to the 6974 // server regardless of whether the field is empty or not. This may be 6975 // used to include empty fields in Patch requests. 6976 ForceSendFields []string `json:"-"` 6977 6978 // NullFields is a list of field names (e.g. "Config") to include in API 6979 // requests with the JSON null value. By default, fields with empty 6980 // values are omitted from API requests. However, any field with an 6981 // empty value appearing in NullFields will be sent to the server as 6982 // null. It is an error if a field in this list has a non-empty value. 6983 // This may be used to include null fields in Patch requests. 6984 NullFields []string `json:"-"` 6985} 6986 6987func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { 6988 type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion 6989 raw := NoMethod(*s) 6990 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6991} 6992 6993// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use 6994// with scanning. 6995type GooglePrivacyDlpV2StoredType struct { 6996 // CreateTime: Timestamp indicating when the version of the 6997 // `StoredInfoType` used for 6998 // inspection was created. Output-only field, populated by the system. 6999 CreateTime string `json:"createTime,omitempty"` 7000 7001 // Name: Resource name of the requested `StoredInfoType`, for 7002 // example 7003 // `organizations/433245324/storedInfoTypes/432452342` 7004 // or 7005 // `projects/project-id/storedInfoTypes/432452342`. 7006 Name string `json:"name,omitempty"` 7007 7008 // ForceSendFields is a list of field names (e.g. "CreateTime") to 7009 // unconditionally include in API requests. By default, fields with 7010 // empty values are omitted from API requests. However, any non-pointer, 7011 // non-interface field appearing in ForceSendFields will be sent to the 7012 // server regardless of whether the field is empty or not. This may be 7013 // used to include empty fields in Patch requests. 7014 ForceSendFields []string `json:"-"` 7015 7016 // NullFields is a list of field names (e.g. "CreateTime") to include in 7017 // API requests with the JSON null value. By default, fields with empty 7018 // values are omitted from API requests. However, any field with an 7019 // empty value appearing in NullFields will be sent to the server as 7020 // null. It is an error if a field in this list has a non-empty value. 7021 // This may be used to include null fields in Patch requests. 7022 NullFields []string `json:"-"` 7023} 7024 7025func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { 7026 type NoMethod GooglePrivacyDlpV2StoredType 7027 raw := NoMethod(*s) 7028 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7029} 7030 7031// GooglePrivacyDlpV2SummaryResult: A collection that informs the user 7032// the number of times a particular 7033// `TransformationResultCode` and error details occurred. 7034type GooglePrivacyDlpV2SummaryResult struct { 7035 // Possible values: 7036 // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" 7037 // "SUCCESS" 7038 // "ERROR" 7039 Code string `json:"code,omitempty"` 7040 7041 Count int64 `json:"count,omitempty,string"` 7042 7043 // Details: A place for warnings or errors to show up if a 7044 // transformation didn't 7045 // work as expected. 7046 Details string `json:"details,omitempty"` 7047 7048 // ForceSendFields is a list of field names (e.g. "Code") to 7049 // unconditionally include in API requests. By default, fields with 7050 // empty values are omitted from API requests. However, any non-pointer, 7051 // non-interface field appearing in ForceSendFields will be sent to the 7052 // server regardless of whether the field is empty or not. This may be 7053 // used to include empty fields in Patch requests. 7054 ForceSendFields []string `json:"-"` 7055 7056 // NullFields is a list of field names (e.g. "Code") to include in API 7057 // requests with the JSON null value. By default, fields with empty 7058 // values are omitted from API requests. However, any field with an 7059 // empty value appearing in NullFields will be sent to the server as 7060 // null. It is an error if a field in this list has a non-empty value. 7061 // This may be used to include null fields in Patch requests. 7062 NullFields []string `json:"-"` 7063} 7064 7065func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { 7066 type NoMethod GooglePrivacyDlpV2SummaryResult 7067 raw := NoMethod(*s) 7068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7069} 7070 7071// GooglePrivacyDlpV2SurrogateType: Message for detecting output from 7072// deidentification transformations 7073// such 7074// as 7075// [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizat 7076// ions.deidentifyTemplates#cryptoreplaceffxfpeconfig). 7077// These types of transformations are 7078// those that perform pseudonymization, thereby producing a "surrogate" 7079// as 7080// output. This should be used in conjunction with a field on 7081// the 7082// transformation such as `surrogate_info_type`. This CustomInfoType 7083// does 7084// not support the use of `detection_rules`. 7085type GooglePrivacyDlpV2SurrogateType struct { 7086} 7087 7088// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 7089// `Value`s per request allowed. 7090// See 7091// https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 7092// to 7093// learn more. 7094type GooglePrivacyDlpV2Table struct { 7095 Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` 7096 7097 Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` 7098 7099 // ForceSendFields is a list of field names (e.g. "Headers") to 7100 // unconditionally include in API requests. By default, fields with 7101 // empty values are omitted from API requests. However, any non-pointer, 7102 // non-interface field appearing in ForceSendFields will be sent to the 7103 // server regardless of whether the field is empty or not. This may be 7104 // used to include empty fields in Patch requests. 7105 ForceSendFields []string `json:"-"` 7106 7107 // NullFields is a list of field names (e.g. "Headers") to include in 7108 // API requests with the JSON null value. By default, fields with empty 7109 // values are omitted from API requests. However, any field with an 7110 // empty value appearing in NullFields will be sent to the server as 7111 // null. It is an error if a field in this list has a non-empty value. 7112 // This may be used to include null fields in Patch requests. 7113 NullFields []string `json:"-"` 7114} 7115 7116func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { 7117 type NoMethod GooglePrivacyDlpV2Table 7118 raw := NoMethod(*s) 7119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7120} 7121 7122// GooglePrivacyDlpV2TableLocation: Location of a finding within a 7123// table. 7124type GooglePrivacyDlpV2TableLocation struct { 7125 // RowIndex: The zero-based index of the row where the finding is 7126 // located. 7127 RowIndex int64 `json:"rowIndex,omitempty,string"` 7128 7129 // ForceSendFields is a list of field names (e.g. "RowIndex") to 7130 // unconditionally include in API requests. By default, fields with 7131 // empty values are omitted from API requests. However, any non-pointer, 7132 // non-interface field appearing in ForceSendFields will be sent to the 7133 // server regardless of whether the field is empty or not. This may be 7134 // used to include empty fields in Patch requests. 7135 ForceSendFields []string `json:"-"` 7136 7137 // NullFields is a list of field names (e.g. "RowIndex") to include in 7138 // API requests with the JSON null value. By default, fields with empty 7139 // values are omitted from API requests. However, any field with an 7140 // empty value appearing in NullFields will be sent to the server as 7141 // null. It is an error if a field in this list has a non-empty value. 7142 // This may be used to include null fields in Patch requests. 7143 NullFields []string `json:"-"` 7144} 7145 7146func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { 7147 type NoMethod GooglePrivacyDlpV2TableLocation 7148 raw := NoMethod(*s) 7149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7150} 7151 7152type GooglePrivacyDlpV2TaggedField struct { 7153 // CustomTag: A column can be tagged with a custom tag. In this case, 7154 // the user must 7155 // indicate an auxiliary table that contains statistical information 7156 // on 7157 // the possible values of this column (below). 7158 CustomTag string `json:"customTag,omitempty"` 7159 7160 // Field: Identifies the column. [required] 7161 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7162 7163 // Inferred: If no semantic tag is indicated, we infer the statistical 7164 // model from 7165 // the distribution of values in the input data 7166 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 7167 7168 // InfoType: A column can be tagged with a InfoType to use the relevant 7169 // public 7170 // dataset as a statistical model of population, if available. 7171 // We 7172 // currently support US ZIP codes, region codes, ages and genders. 7173 // To programmatically obtain the list of supported InfoTypes, 7174 // use 7175 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 7176 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7177 7178 // ForceSendFields is a list of field names (e.g. "CustomTag") to 7179 // unconditionally include in API requests. By default, fields with 7180 // empty values are omitted from API requests. However, any non-pointer, 7181 // non-interface field appearing in ForceSendFields will be sent to the 7182 // server regardless of whether the field is empty or not. This may be 7183 // used to include empty fields in Patch requests. 7184 ForceSendFields []string `json:"-"` 7185 7186 // NullFields is a list of field names (e.g. "CustomTag") to include in 7187 // API requests with the JSON null value. By default, fields with empty 7188 // values are omitted from API requests. However, any field with an 7189 // empty value appearing in NullFields will be sent to the server as 7190 // null. It is an error if a field in this list has a non-empty value. 7191 // This may be used to include null fields in Patch requests. 7192 NullFields []string `json:"-"` 7193} 7194 7195func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { 7196 type NoMethod GooglePrivacyDlpV2TaggedField 7197 raw := NoMethod(*s) 7198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7199} 7200 7201// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, 7202// and `TimeOfDay`, extract or preserve a 7203// portion of the value. 7204type GooglePrivacyDlpV2TimePartConfig struct { 7205 // Possible values: 7206 // "TIME_PART_UNSPECIFIED" 7207 // "YEAR" - [0-9999] 7208 // "MONTH" - [1-12] 7209 // "DAY_OF_MONTH" - [1-31] 7210 // "DAY_OF_WEEK" - [1-7] 7211 // "WEEK_OF_YEAR" - [1-53] 7212 // "HOUR_OF_DAY" - [0-23] 7213 PartToExtract string `json:"partToExtract,omitempty"` 7214 7215 // ForceSendFields is a list of field names (e.g. "PartToExtract") to 7216 // unconditionally include in API requests. By default, fields with 7217 // empty values are omitted from API requests. However, any non-pointer, 7218 // non-interface field appearing in ForceSendFields will be sent to the 7219 // server regardless of whether the field is empty or not. This may be 7220 // used to include empty fields in Patch requests. 7221 ForceSendFields []string `json:"-"` 7222 7223 // NullFields is a list of field names (e.g. "PartToExtract") to include 7224 // in API requests with the JSON null value. By default, fields with 7225 // empty values are omitted from API requests. However, any field with 7226 // an empty value appearing in NullFields will be sent to the server as 7227 // null. It is an error if a field in this list has a non-empty value. 7228 // This may be used to include null fields in Patch requests. 7229 NullFields []string `json:"-"` 7230} 7231 7232func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { 7233 type NoMethod GooglePrivacyDlpV2TimePartConfig 7234 raw := NoMethod(*s) 7235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7236} 7237 7238type GooglePrivacyDlpV2TimeZone struct { 7239 // OffsetMinutes: Set only if the offset can be determined. Positive for 7240 // time ahead of UTC. 7241 // E.g. For "UTC-9", this value is -540. 7242 OffsetMinutes int64 `json:"offsetMinutes,omitempty"` 7243 7244 // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to 7245 // unconditionally include in API requests. By default, fields with 7246 // empty values are omitted from API requests. However, any non-pointer, 7247 // non-interface field appearing in ForceSendFields will be sent to the 7248 // server regardless of whether the field is empty or not. This may be 7249 // used to include empty fields in Patch requests. 7250 ForceSendFields []string `json:"-"` 7251 7252 // NullFields is a list of field names (e.g. "OffsetMinutes") to include 7253 // in API requests with the JSON null value. By default, fields with 7254 // empty values are omitted from API requests. However, any field with 7255 // an empty value appearing in NullFields will be sent to the server as 7256 // null. It is an error if a field in this list has a non-empty value. 7257 // This may be used to include null fields in Patch requests. 7258 NullFields []string `json:"-"` 7259} 7260 7261func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { 7262 type NoMethod GooglePrivacyDlpV2TimeZone 7263 raw := NoMethod(*s) 7264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7265} 7266 7267// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of 7268// the items to include in scanning. 7269// Currently only supported when inspecting Google Cloud Storage and 7270// BigQuery. 7271type GooglePrivacyDlpV2TimespanConfig struct { 7272 // EnableAutoPopulationOfTimespanConfig: When the job is started by a 7273 // JobTrigger we will automatically figure out 7274 // a valid start_time to avoid scanning files that have not been 7275 // modified 7276 // since the last time the JobTrigger executed. This will be based on 7277 // the 7278 // time of the execution of the last run of the JobTrigger. 7279 EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` 7280 7281 // EndTime: Exclude files or rows newer than this value. 7282 // If set to zero, no upper time limit is applied. 7283 EndTime string `json:"endTime,omitempty"` 7284 7285 // StartTime: Exclude files or rows older than this value. 7286 StartTime string `json:"startTime,omitempty"` 7287 7288 // TimestampField: Specification of the field containing the timestamp 7289 // of scanned items. 7290 // Used for data sources like Datastore and BigQuery. 7291 // 7292 // For BigQuery: 7293 // Required to filter out rows based on the given start and 7294 // end times. If not specified and the table was modified between the 7295 // given 7296 // start and end times, the entire table will be scanned. 7297 // The valid data types of the timestamp field are: `INTEGER`, 7298 // `DATE`, 7299 // `TIMESTAMP`, or `DATETIME` BigQuery column. 7300 // 7301 // For Datastore. 7302 // Valid data types of the timestamp field are: `TIMESTAMP`. 7303 // Datastore entity will be scanned if the timestamp property does 7304 // not 7305 // exist or its value is empty or invalid. 7306 TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` 7307 7308 // ForceSendFields is a list of field names (e.g. 7309 // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in 7310 // API requests. By default, fields with empty values are omitted from 7311 // API requests. However, any non-pointer, non-interface field appearing 7312 // in ForceSendFields will be sent to the server regardless of whether 7313 // the field is empty or not. This may be used to include empty fields 7314 // in Patch requests. 7315 ForceSendFields []string `json:"-"` 7316 7317 // NullFields is a list of field names (e.g. 7318 // "EnableAutoPopulationOfTimespanConfig") to include in API requests 7319 // with the JSON null value. By default, fields with empty values are 7320 // omitted from API requests. However, any field with an empty value 7321 // appearing in NullFields will be sent to the server as null. It is an 7322 // error if a field in this list has a non-empty value. This may be used 7323 // to include null fields in Patch requests. 7324 NullFields []string `json:"-"` 7325} 7326 7327func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { 7328 type NoMethod GooglePrivacyDlpV2TimespanConfig 7329 raw := NoMethod(*s) 7330 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7331} 7332 7333// GooglePrivacyDlpV2TransformationOverview: Overview of the 7334// modifications that occurred. 7335type GooglePrivacyDlpV2TransformationOverview struct { 7336 // TransformationSummaries: Transformations applied to the dataset. 7337 TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` 7338 7339 // TransformedBytes: Total size in bytes that were transformed in some 7340 // way. 7341 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7342 7343 // ForceSendFields is a list of field names (e.g. 7344 // "TransformationSummaries") to unconditionally include in API 7345 // requests. By default, fields with empty values are omitted from API 7346 // requests. However, any non-pointer, non-interface field appearing in 7347 // ForceSendFields will be sent to the server regardless of whether the 7348 // field is empty or not. This may be used to include empty fields in 7349 // Patch requests. 7350 ForceSendFields []string `json:"-"` 7351 7352 // NullFields is a list of field names (e.g. "TransformationSummaries") 7353 // to include in API requests with the JSON null value. By default, 7354 // fields with empty values are omitted from API requests. However, any 7355 // field with an empty value appearing in NullFields will be sent to the 7356 // server as null. It is an error if a field in this list has a 7357 // non-empty value. This may be used to include null fields in Patch 7358 // requests. 7359 NullFields []string `json:"-"` 7360} 7361 7362func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { 7363 type NoMethod GooglePrivacyDlpV2TransformationOverview 7364 raw := NoMethod(*s) 7365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7366} 7367 7368// GooglePrivacyDlpV2TransformationSummary: Summary of a single 7369// transformation. 7370// Only one of 'transformation', 'field_transformation', or 7371// 'record_suppress' 7372// will be set. 7373type GooglePrivacyDlpV2TransformationSummary struct { 7374 // Field: Set if the transformation was limited to a specific FieldId. 7375 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7376 7377 // FieldTransformations: The field transformation that was applied. 7378 // If multiple field transformations are requested for a single 7379 // field, 7380 // this list will contain all of them; otherwise, only one is supplied. 7381 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 7382 7383 // InfoType: Set if the transformation was limited to a specific 7384 // InfoType. 7385 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7386 7387 // RecordSuppress: The specific suppression option these stats apply to. 7388 RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` 7389 7390 Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` 7391 7392 // Transformation: The specific transformation these stats apply to. 7393 Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` 7394 7395 // TransformedBytes: Total size in bytes that were transformed in some 7396 // way. 7397 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7398 7399 // ForceSendFields is a list of field names (e.g. "Field") to 7400 // unconditionally include in API requests. By default, fields with 7401 // empty values are omitted from API requests. However, any non-pointer, 7402 // non-interface field appearing in ForceSendFields will be sent to the 7403 // server regardless of whether the field is empty or not. This may be 7404 // used to include empty fields in Patch requests. 7405 ForceSendFields []string `json:"-"` 7406 7407 // NullFields is a list of field names (e.g. "Field") to include in API 7408 // requests with the JSON null value. By default, fields with empty 7409 // values are omitted from API requests. However, any field with an 7410 // empty value appearing in NullFields will be sent to the server as 7411 // null. It is an error if a field in this list has a non-empty value. 7412 // This may be used to include null fields in Patch requests. 7413 NullFields []string `json:"-"` 7414} 7415 7416func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { 7417 type NoMethod GooglePrivacyDlpV2TransformationSummary 7418 raw := NoMethod(*s) 7419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7420} 7421 7422// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data 7423// crypto key generated. 7424// It will be discarded after the request finishes. 7425type GooglePrivacyDlpV2TransientCryptoKey struct { 7426 // Name: Name of the key. [required] 7427 // This is an arbitrary string used to differentiate different keys. 7428 // A unique key is generated per name: two separate 7429 // `TransientCryptoKey` 7430 // protos share the same generated key if their names are the same. 7431 // When the data crypto key is generated, this name is not used in any 7432 // way 7433 // (repeating the api call will result in a different key being 7434 // generated). 7435 Name string `json:"name,omitempty"` 7436 7437 // ForceSendFields is a list of field names (e.g. "Name") to 7438 // unconditionally include in API requests. By default, fields with 7439 // empty values are omitted from API requests. However, any non-pointer, 7440 // non-interface field appearing in ForceSendFields will be sent to the 7441 // server regardless of whether the field is empty or not. This may be 7442 // used to include empty fields in Patch requests. 7443 ForceSendFields []string `json:"-"` 7444 7445 // NullFields is a list of field names (e.g. "Name") to include in API 7446 // requests with the JSON null value. By default, fields with empty 7447 // values are omitted from API requests. However, any field with an 7448 // empty value appearing in NullFields will be sent to the server as 7449 // null. It is an error if a field in this list has a non-empty value. 7450 // This may be used to include null fields in Patch requests. 7451 NullFields []string `json:"-"` 7452} 7453 7454func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { 7455 type NoMethod GooglePrivacyDlpV2TransientCryptoKey 7456 raw := NoMethod(*s) 7457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7458} 7459 7460// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to 7461// be started. 7462type GooglePrivacyDlpV2Trigger struct { 7463 // Schedule: Create a job on a repeating basis based on the elapse of 7464 // time. 7465 Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` 7466 7467 // ForceSendFields is a list of field names (e.g. "Schedule") to 7468 // unconditionally include in API requests. By default, fields with 7469 // empty values are omitted from API requests. However, any non-pointer, 7470 // non-interface field appearing in ForceSendFields will be sent to the 7471 // server regardless of whether the field is empty or not. This may be 7472 // used to include empty fields in Patch requests. 7473 ForceSendFields []string `json:"-"` 7474 7475 // NullFields is a list of field names (e.g. "Schedule") to include in 7476 // API requests with the JSON null value. By default, fields with empty 7477 // values are omitted from API requests. However, any field with an 7478 // empty value appearing in NullFields will be sent to the server as 7479 // null. It is an error if a field in this list has a non-empty value. 7480 // This may be used to include null fields in Patch requests. 7481 NullFields []string `json:"-"` 7482} 7483 7484func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { 7485 type NoMethod GooglePrivacyDlpV2Trigger 7486 raw := NoMethod(*s) 7487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7488} 7489 7490// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to 7491// security risks due to accidentally 7492// leaking the key. Choose another type of key if possible. 7493type GooglePrivacyDlpV2UnwrappedCryptoKey struct { 7494 // Key: A 128/192/256 bit key. [required] 7495 Key string `json:"key,omitempty"` 7496 7497 // ForceSendFields is a list of field names (e.g. "Key") to 7498 // unconditionally include in API requests. By default, fields with 7499 // empty values are omitted from API requests. However, any non-pointer, 7500 // non-interface field appearing in ForceSendFields will be sent to the 7501 // server regardless of whether the field is empty or not. This may be 7502 // used to include empty fields in Patch requests. 7503 ForceSendFields []string `json:"-"` 7504 7505 // NullFields is a list of field names (e.g. "Key") to include in API 7506 // requests with the JSON null value. By default, fields with empty 7507 // values are omitted from API requests. However, any field with an 7508 // empty value appearing in NullFields will be sent to the server as 7509 // null. It is an error if a field in this list has a non-empty value. 7510 // This may be used to include null fields in Patch requests. 7511 NullFields []string `json:"-"` 7512} 7513 7514func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { 7515 type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey 7516 raw := NoMethod(*s) 7517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7518} 7519 7520// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message 7521// for UpdateDeidentifyTemplate. 7522type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { 7523 // DeidentifyTemplate: New DeidentifyTemplate value. 7524 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 7525 7526 // UpdateMask: Mask to control which fields get updated. 7527 UpdateMask string `json:"updateMask,omitempty"` 7528 7529 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 7530 // to unconditionally include in API requests. By default, fields with 7531 // empty values are omitted from API requests. However, any non-pointer, 7532 // non-interface field appearing in ForceSendFields will be sent to the 7533 // server regardless of whether the field is empty or not. This may be 7534 // used to include empty fields in Patch requests. 7535 ForceSendFields []string `json:"-"` 7536 7537 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 7538 // include in API requests with the JSON null value. By default, fields 7539 // with empty values are omitted from API requests. However, any field 7540 // with an empty value appearing in NullFields will be sent to the 7541 // server as null. It is an error if a field in this list has a 7542 // non-empty value. This may be used to include null fields in Patch 7543 // requests. 7544 NullFields []string `json:"-"` 7545} 7546 7547func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 7548 type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 7549 raw := NoMethod(*s) 7550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7551} 7552 7553// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for 7554// UpdateInspectTemplate. 7555type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { 7556 // InspectTemplate: New InspectTemplate value. 7557 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 7558 7559 // UpdateMask: Mask to control which fields get updated. 7560 UpdateMask string `json:"updateMask,omitempty"` 7561 7562 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 7563 // unconditionally include in API requests. By default, fields with 7564 // empty values are omitted from API requests. However, any non-pointer, 7565 // non-interface field appearing in ForceSendFields will be sent to the 7566 // server regardless of whether the field is empty or not. This may be 7567 // used to include empty fields in Patch requests. 7568 ForceSendFields []string `json:"-"` 7569 7570 // NullFields is a list of field names (e.g. "InspectTemplate") to 7571 // include in API requests with the JSON null value. By default, fields 7572 // with empty values are omitted from API requests. However, any field 7573 // with an empty value appearing in NullFields will be sent to the 7574 // server as null. It is an error if a field in this list has a 7575 // non-empty value. This may be used to include null fields in Patch 7576 // requests. 7577 NullFields []string `json:"-"` 7578} 7579 7580func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 7581 type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest 7582 raw := NoMethod(*s) 7583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7584} 7585 7586// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for 7587// UpdateJobTrigger. 7588type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { 7589 // JobTrigger: New JobTrigger value. 7590 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 7591 7592 // UpdateMask: Mask to control which fields get updated. 7593 UpdateMask string `json:"updateMask,omitempty"` 7594 7595 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 7596 // unconditionally include in API requests. By default, fields with 7597 // empty values are omitted from API requests. However, any non-pointer, 7598 // non-interface field appearing in ForceSendFields will be sent to the 7599 // server regardless of whether the field is empty or not. This may be 7600 // used to include empty fields in Patch requests. 7601 ForceSendFields []string `json:"-"` 7602 7603 // NullFields is a list of field names (e.g. "JobTrigger") to include in 7604 // API requests with the JSON null value. By default, fields with empty 7605 // values are omitted from API requests. However, any field with an 7606 // empty value appearing in NullFields will be sent to the server as 7607 // null. It is an error if a field in this list has a non-empty value. 7608 // This may be used to include null fields in Patch requests. 7609 NullFields []string `json:"-"` 7610} 7611 7612func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { 7613 type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest 7614 raw := NoMethod(*s) 7615 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7616} 7617 7618// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for 7619// UpdateStoredInfoType. 7620type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { 7621 // Config: Updated configuration for the storedInfoType. If not 7622 // provided, a new 7623 // version of the storedInfoType will be created with the 7624 // existing 7625 // configuration. 7626 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7627 7628 // UpdateMask: Mask to control which fields get updated. 7629 UpdateMask string `json:"updateMask,omitempty"` 7630 7631 // ForceSendFields is a list of field names (e.g. "Config") to 7632 // unconditionally include in API requests. By default, fields with 7633 // empty values are omitted from API requests. However, any non-pointer, 7634 // non-interface field appearing in ForceSendFields will be sent to the 7635 // server regardless of whether the field is empty or not. This may be 7636 // used to include empty fields in Patch requests. 7637 ForceSendFields []string `json:"-"` 7638 7639 // NullFields is a list of field names (e.g. "Config") to include in API 7640 // requests with the JSON null value. By default, fields with empty 7641 // values are omitted from API requests. However, any field with an 7642 // empty value appearing in NullFields will be sent to the server as 7643 // null. It is an error if a field in this list has a non-empty value. 7644 // This may be used to include null fields in Patch requests. 7645 NullFields []string `json:"-"` 7646} 7647 7648func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 7649 type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 7650 raw := NoMethod(*s) 7651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7652} 7653 7654// GooglePrivacyDlpV2Value: Set of primitive values supported by the 7655// system. 7656// Note that for the purposes of inspection or transformation, the 7657// number 7658// of bytes considered to comprise a 'Value' is based on its 7659// representation 7660// as a UTF-8 encoded string. For example, if 'integer_value' is set 7661// to 7662// 123456789, the number of bytes would be counted as 9, even though 7663// an 7664// int64 only holds up to 8 bytes of data. 7665type GooglePrivacyDlpV2Value struct { 7666 BooleanValue bool `json:"booleanValue,omitempty"` 7667 7668 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 7669 7670 // Possible values: 7671 // "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week. 7672 // "MONDAY" - The day-of-week of Monday. 7673 // "TUESDAY" - The day-of-week of Tuesday. 7674 // "WEDNESDAY" - The day-of-week of Wednesday. 7675 // "THURSDAY" - The day-of-week of Thursday. 7676 // "FRIDAY" - The day-of-week of Friday. 7677 // "SATURDAY" - The day-of-week of Saturday. 7678 // "SUNDAY" - The day-of-week of Sunday. 7679 DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` 7680 7681 FloatValue float64 `json:"floatValue,omitempty"` 7682 7683 IntegerValue int64 `json:"integerValue,omitempty,string"` 7684 7685 StringValue string `json:"stringValue,omitempty"` 7686 7687 TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` 7688 7689 TimestampValue string `json:"timestampValue,omitempty"` 7690 7691 // ForceSendFields is a list of field names (e.g. "BooleanValue") to 7692 // unconditionally include in API requests. By default, fields with 7693 // empty values are omitted from API requests. However, any non-pointer, 7694 // non-interface field appearing in ForceSendFields will be sent to the 7695 // server regardless of whether the field is empty or not. This may be 7696 // used to include empty fields in Patch requests. 7697 ForceSendFields []string `json:"-"` 7698 7699 // NullFields is a list of field names (e.g. "BooleanValue") to include 7700 // in API requests with the JSON null value. By default, fields with 7701 // empty values are omitted from API requests. However, any field with 7702 // an empty value appearing in NullFields will be sent to the server as 7703 // null. It is an error if a field in this list has a non-empty value. 7704 // This may be used to include null fields in Patch requests. 7705 NullFields []string `json:"-"` 7706} 7707 7708func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { 7709 type NoMethod GooglePrivacyDlpV2Value 7710 raw := NoMethod(*s) 7711 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7712} 7713 7714func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { 7715 type NoMethod GooglePrivacyDlpV2Value 7716 var s1 struct { 7717 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 7718 *NoMethod 7719 } 7720 s1.NoMethod = (*NoMethod)(s) 7721 if err := json.Unmarshal(data, &s1); err != nil { 7722 return err 7723 } 7724 s.FloatValue = float64(s1.FloatValue) 7725 return nil 7726} 7727 7728// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its 7729// frequency. 7730type GooglePrivacyDlpV2ValueFrequency struct { 7731 // Count: How many times the value is contained in the field. 7732 Count int64 `json:"count,omitempty,string"` 7733 7734 // Value: A value contained in the field in question. 7735 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 7736 7737 // ForceSendFields is a list of field names (e.g. "Count") to 7738 // unconditionally include in API requests. By default, fields with 7739 // empty values are omitted from API requests. However, any non-pointer, 7740 // non-interface field appearing in ForceSendFields will be sent to the 7741 // server regardless of whether the field is empty or not. This may be 7742 // used to include empty fields in Patch requests. 7743 ForceSendFields []string `json:"-"` 7744 7745 // NullFields is a list of field names (e.g. "Count") to include in API 7746 // requests with the JSON null value. By default, fields with empty 7747 // values are omitted from API requests. However, any field with an 7748 // empty value appearing in NullFields will be sent to the server as 7749 // null. It is an error if a field in this list has a non-empty value. 7750 // This may be used to include null fields in Patch requests. 7751 NullFields []string `json:"-"` 7752} 7753 7754func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { 7755 type NoMethod GooglePrivacyDlpV2ValueFrequency 7756 raw := NoMethod(*s) 7757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7758} 7759 7760// GooglePrivacyDlpV2WordList: Message defining a list of words or 7761// phrases to search for in the data. 7762type GooglePrivacyDlpV2WordList struct { 7763 // Words: Words or phrases defining the dictionary. The dictionary must 7764 // contain 7765 // at least one phrase and every phrase must contain at least 2 7766 // characters 7767 // that are letters or digits. [required] 7768 Words []string `json:"words,omitempty"` 7769 7770 // ForceSendFields is a list of field names (e.g. "Words") to 7771 // unconditionally include in API requests. By default, fields with 7772 // empty values are omitted from API requests. However, any non-pointer, 7773 // non-interface field appearing in ForceSendFields will be sent to the 7774 // server regardless of whether the field is empty or not. This may be 7775 // used to include empty fields in Patch requests. 7776 ForceSendFields []string `json:"-"` 7777 7778 // NullFields is a list of field names (e.g. "Words") to include in API 7779 // requests with the JSON null value. By default, fields with empty 7780 // values are omitted from API requests. However, any field with an 7781 // empty value appearing in NullFields will be sent to the server as 7782 // null. It is an error if a field in this list has a non-empty value. 7783 // This may be used to include null fields in Patch requests. 7784 NullFields []string `json:"-"` 7785} 7786 7787func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { 7788 type NoMethod GooglePrivacyDlpV2WordList 7789 raw := NoMethod(*s) 7790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7791} 7792 7793// GoogleProtobufEmpty: A generic empty message that you can re-use to 7794// avoid defining duplicated 7795// empty messages in your APIs. A typical example is to use it as the 7796// request 7797// or the response type of an API method. For instance: 7798// 7799// service Foo { 7800// rpc Bar(google.protobuf.Empty) returns 7801// (google.protobuf.Empty); 7802// } 7803// 7804// The JSON representation for `Empty` is empty JSON object `{}`. 7805type GoogleProtobufEmpty struct { 7806 // ServerResponse contains the HTTP response code and headers from the 7807 // server. 7808 googleapi.ServerResponse `json:"-"` 7809} 7810 7811// GoogleRpcStatus: The `Status` type defines a logical error model that 7812// is suitable for 7813// different programming environments, including REST APIs and RPC APIs. 7814// It is 7815// used by [gRPC](https://github.com/grpc). Each `Status` message 7816// contains 7817// three pieces of data: error code, error message, and error 7818// details. 7819// 7820// You can find out more about this error model and how to work with it 7821// in the 7822// [API Design Guide](https://cloud.google.com/apis/design/errors). 7823type GoogleRpcStatus struct { 7824 // Code: The status code, which should be an enum value of 7825 // google.rpc.Code. 7826 Code int64 `json:"code,omitempty"` 7827 7828 // Details: A list of messages that carry the error details. There is a 7829 // common set of 7830 // message types for APIs to use. 7831 Details []googleapi.RawMessage `json:"details,omitempty"` 7832 7833 // Message: A developer-facing error message, which should be in 7834 // English. Any 7835 // user-facing error message should be localized and sent in 7836 // the 7837 // google.rpc.Status.details field, or localized by the client. 7838 Message string `json:"message,omitempty"` 7839 7840 // ForceSendFields is a list of field names (e.g. "Code") to 7841 // unconditionally include in API requests. By default, fields with 7842 // empty values are omitted from API requests. However, any non-pointer, 7843 // non-interface field appearing in ForceSendFields will be sent to the 7844 // server regardless of whether the field is empty or not. This may be 7845 // used to include empty fields in Patch requests. 7846 ForceSendFields []string `json:"-"` 7847 7848 // NullFields is a list of field names (e.g. "Code") to include in API 7849 // requests with the JSON null value. By default, fields with empty 7850 // values are omitted from API requests. However, any field with an 7851 // empty value appearing in NullFields will be sent to the server as 7852 // null. It is an error if a field in this list has a non-empty value. 7853 // This may be used to include null fields in Patch requests. 7854 NullFields []string `json:"-"` 7855} 7856 7857func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 7858 type NoMethod GoogleRpcStatus 7859 raw := NoMethod(*s) 7860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7861} 7862 7863// GoogleTypeDate: Represents a whole or partial calendar date, e.g. a 7864// birthday. The time of day 7865// and time zone are either specified elsewhere or are not significant. 7866// The date 7867// is relative to the Proleptic Gregorian Calendar. This can 7868// represent: 7869// 7870// * A full date, with non-zero year, month and day values 7871// * A month and day value, with a zero year, e.g. an anniversary 7872// * A year on its own, with zero month and day values 7873// * A year and month value, with a zero day, e.g. a credit card 7874// expiration date 7875// 7876// Related types are google.type.TimeOfDay and 7877// `google.protobuf.Timestamp`. 7878type GoogleTypeDate struct { 7879 // Day: Day of month. Must be from 1 to 31 and valid for the year and 7880 // month, or 0 7881 // if specifying a year by itself or a year and month where the day is 7882 // not 7883 // significant. 7884 Day int64 `json:"day,omitempty"` 7885 7886 // Month: Month of year. Must be from 1 to 12, or 0 if specifying a year 7887 // without a 7888 // month and day. 7889 Month int64 `json:"month,omitempty"` 7890 7891 // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date 7892 // without 7893 // a year. 7894 Year int64 `json:"year,omitempty"` 7895 7896 // ForceSendFields is a list of field names (e.g. "Day") to 7897 // unconditionally include in API requests. By default, fields with 7898 // empty values are omitted from API requests. However, any non-pointer, 7899 // non-interface field appearing in ForceSendFields will be sent to the 7900 // server regardless of whether the field is empty or not. This may be 7901 // used to include empty fields in Patch requests. 7902 ForceSendFields []string `json:"-"` 7903 7904 // NullFields is a list of field names (e.g. "Day") to include in API 7905 // requests with the JSON null value. By default, fields with empty 7906 // values are omitted from API requests. However, any field with an 7907 // empty value appearing in NullFields will be sent to the server as 7908 // null. It is an error if a field in this list has a non-empty value. 7909 // This may be used to include null fields in Patch requests. 7910 NullFields []string `json:"-"` 7911} 7912 7913func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 7914 type NoMethod GoogleTypeDate 7915 raw := NoMethod(*s) 7916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7917} 7918 7919// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone 7920// are either not significant 7921// or are specified elsewhere. An API may choose to allow leap seconds. 7922// Related 7923// types are google.type.Date and `google.protobuf.Timestamp`. 7924type GoogleTypeTimeOfDay struct { 7925 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 7926 // may choose 7927 // to allow the value "24:00:00" for scenarios like business closing 7928 // time. 7929 Hours int64 `json:"hours,omitempty"` 7930 7931 // Minutes: Minutes of hour of day. Must be from 0 to 59. 7932 Minutes int64 `json:"minutes,omitempty"` 7933 7934 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 7935 // 999,999,999. 7936 Nanos int64 `json:"nanos,omitempty"` 7937 7938 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 7939 // 59. An API may 7940 // allow the value 60 if it allows leap-seconds. 7941 Seconds int64 `json:"seconds,omitempty"` 7942 7943 // ForceSendFields is a list of field names (e.g. "Hours") to 7944 // unconditionally include in API requests. By default, fields with 7945 // empty values are omitted from API requests. However, any non-pointer, 7946 // non-interface field appearing in ForceSendFields will be sent to the 7947 // server regardless of whether the field is empty or not. This may be 7948 // used to include empty fields in Patch requests. 7949 ForceSendFields []string `json:"-"` 7950 7951 // NullFields is a list of field names (e.g. "Hours") to include in API 7952 // requests with the JSON null value. By default, fields with empty 7953 // values are omitted from API requests. However, any field with an 7954 // empty value appearing in NullFields will be sent to the server as 7955 // null. It is an error if a field in this list has a non-empty value. 7956 // This may be used to include null fields in Patch requests. 7957 NullFields []string `json:"-"` 7958} 7959 7960func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { 7961 type NoMethod GoogleTypeTimeOfDay 7962 raw := NoMethod(*s) 7963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7964} 7965 7966// method id "dlp.infoTypes.list": 7967 7968type InfoTypesListCall struct { 7969 s *Service 7970 urlParams_ gensupport.URLParams 7971 ifNoneMatch_ string 7972 ctx_ context.Context 7973 header_ http.Header 7974} 7975 7976// List: Returns a list of the sensitive information types that the DLP 7977// API 7978// supports. See https://cloud.google.com/dlp/docs/infotypes-reference 7979// to 7980// learn more. 7981func (r *InfoTypesService) List() *InfoTypesListCall { 7982 c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7983 return c 7984} 7985 7986// Filter sets the optional parameter "filter": Optional filter to only 7987// return infoTypes supported by certain parts of the 7988// API. Defaults to supported_by=INSPECT. 7989func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { 7990 c.urlParams_.Set("filter", filter) 7991 return c 7992} 7993 7994// LanguageCode sets the optional parameter "languageCode": Optional 7995// BCP-47 language code for localized infoType friendly 7996// names. If omitted, or if localized strings are not available, 7997// en-US strings will be returned. 7998func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { 7999 c.urlParams_.Set("languageCode", languageCode) 8000 return c 8001} 8002 8003// Location sets the optional parameter "location": The geographic 8004// location to list info types. Reserved for future 8005// extensions. 8006func (c *InfoTypesListCall) Location(location string) *InfoTypesListCall { 8007 c.urlParams_.Set("location", location) 8008 return c 8009} 8010 8011// Fields allows partial responses to be retrieved. See 8012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8013// for more information. 8014func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { 8015 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8016 return c 8017} 8018 8019// IfNoneMatch sets the optional parameter which makes the operation 8020// fail if the object's ETag matches the given value. This is useful for 8021// getting updates only after the object has changed since the last 8022// request. Use googleapi.IsNotModified to check whether the response 8023// error from Do is the result of In-None-Match. 8024func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { 8025 c.ifNoneMatch_ = entityTag 8026 return c 8027} 8028 8029// Context sets the context to be used in this call's Do method. Any 8030// pending HTTP request will be aborted if the provided context is 8031// canceled. 8032func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { 8033 c.ctx_ = ctx 8034 return c 8035} 8036 8037// Header returns an http.Header that can be modified by the caller to 8038// add HTTP headers to the request. 8039func (c *InfoTypesListCall) Header() http.Header { 8040 if c.header_ == nil { 8041 c.header_ = make(http.Header) 8042 } 8043 return c.header_ 8044} 8045 8046func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8047 reqHeaders := make(http.Header) 8048 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8049 for k, v := range c.header_ { 8050 reqHeaders[k] = v 8051 } 8052 reqHeaders.Set("User-Agent", c.s.userAgent()) 8053 if c.ifNoneMatch_ != "" { 8054 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8055 } 8056 var body io.Reader = nil 8057 c.urlParams_.Set("alt", alt) 8058 c.urlParams_.Set("prettyPrint", "false") 8059 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") 8060 urls += "?" + c.urlParams_.Encode() 8061 req, err := http.NewRequest("GET", urls, body) 8062 if err != nil { 8063 return nil, err 8064 } 8065 req.Header = reqHeaders 8066 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8067} 8068 8069// Do executes the "dlp.infoTypes.list" call. 8070// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8071// be non-nil. Any non-2xx status code is an error. Response headers are 8072// in either 8073// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8074// a response was returned at all) in error.(*googleapi.Error).Header. 8075// Use googleapi.IsNotModified to check whether the returned error was 8076// because http.StatusNotModified was returned. 8077func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8078 gensupport.SetOptions(c.urlParams_, opts...) 8079 res, err := c.doRequest("json") 8080 if res != nil && res.StatusCode == http.StatusNotModified { 8081 if res.Body != nil { 8082 res.Body.Close() 8083 } 8084 return nil, &googleapi.Error{ 8085 Code: res.StatusCode, 8086 Header: res.Header, 8087 } 8088 } 8089 if err != nil { 8090 return nil, err 8091 } 8092 defer googleapi.CloseBody(res) 8093 if err := googleapi.CheckResponse(res); err != nil { 8094 return nil, err 8095 } 8096 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8097 ServerResponse: googleapi.ServerResponse{ 8098 Header: res.Header, 8099 HTTPStatusCode: res.StatusCode, 8100 }, 8101 } 8102 target := &ret 8103 if err := gensupport.DecodeResponse(target, res); err != nil { 8104 return nil, err 8105 } 8106 return ret, nil 8107 // { 8108 // "description": "Returns a list of the sensitive information types that the DLP API\nsupports. See https://cloud.google.com/dlp/docs/infotypes-reference to\nlearn more.", 8109 // "flatPath": "v2/infoTypes", 8110 // "httpMethod": "GET", 8111 // "id": "dlp.infoTypes.list", 8112 // "parameterOrder": [], 8113 // "parameters": { 8114 // "filter": { 8115 // "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.", 8116 // "location": "query", 8117 // "type": "string" 8118 // }, 8119 // "languageCode": { 8120 // "description": "Optional BCP-47 language code for localized infoType friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", 8121 // "location": "query", 8122 // "type": "string" 8123 // }, 8124 // "location": { 8125 // "description": "The geographic location to list info types. Reserved for future\nextensions.", 8126 // "location": "query", 8127 // "type": "string" 8128 // } 8129 // }, 8130 // "path": "v2/infoTypes", 8131 // "response": { 8132 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8133 // }, 8134 // "scopes": [ 8135 // "https://www.googleapis.com/auth/cloud-platform" 8136 // ] 8137 // } 8138 8139} 8140 8141// method id "dlp.locations.infoTypes.list": 8142 8143type LocationsInfoTypesListCall struct { 8144 s *Service 8145 location string 8146 urlParams_ gensupport.URLParams 8147 ifNoneMatch_ string 8148 ctx_ context.Context 8149 header_ http.Header 8150} 8151 8152// List: Returns a list of the sensitive information types that the DLP 8153// API 8154// supports. See https://cloud.google.com/dlp/docs/infotypes-reference 8155// to 8156// learn more. 8157func (r *LocationsInfoTypesService) List(location string) *LocationsInfoTypesListCall { 8158 c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8159 c.location = location 8160 return c 8161} 8162 8163// Filter sets the optional parameter "filter": Optional filter to only 8164// return infoTypes supported by certain parts of the 8165// API. Defaults to supported_by=INSPECT. 8166func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { 8167 c.urlParams_.Set("filter", filter) 8168 return c 8169} 8170 8171// LanguageCode sets the optional parameter "languageCode": Optional 8172// BCP-47 language code for localized infoType friendly 8173// names. If omitted, or if localized strings are not available, 8174// en-US strings will be returned. 8175func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { 8176 c.urlParams_.Set("languageCode", languageCode) 8177 return c 8178} 8179 8180// Fields allows partial responses to be retrieved. See 8181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8182// for more information. 8183func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { 8184 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8185 return c 8186} 8187 8188// IfNoneMatch sets the optional parameter which makes the operation 8189// fail if the object's ETag matches the given value. This is useful for 8190// getting updates only after the object has changed since the last 8191// request. Use googleapi.IsNotModified to check whether the response 8192// error from Do is the result of In-None-Match. 8193func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { 8194 c.ifNoneMatch_ = entityTag 8195 return c 8196} 8197 8198// Context sets the context to be used in this call's Do method. Any 8199// pending HTTP request will be aborted if the provided context is 8200// canceled. 8201func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { 8202 c.ctx_ = ctx 8203 return c 8204} 8205 8206// Header returns an http.Header that can be modified by the caller to 8207// add HTTP headers to the request. 8208func (c *LocationsInfoTypesListCall) Header() http.Header { 8209 if c.header_ == nil { 8210 c.header_ = make(http.Header) 8211 } 8212 return c.header_ 8213} 8214 8215func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8216 reqHeaders := make(http.Header) 8217 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8218 for k, v := range c.header_ { 8219 reqHeaders[k] = v 8220 } 8221 reqHeaders.Set("User-Agent", c.s.userAgent()) 8222 if c.ifNoneMatch_ != "" { 8223 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8224 } 8225 var body io.Reader = nil 8226 c.urlParams_.Set("alt", alt) 8227 c.urlParams_.Set("prettyPrint", "false") 8228 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/locations/{location}/infoTypes") 8229 urls += "?" + c.urlParams_.Encode() 8230 req, err := http.NewRequest("GET", urls, body) 8231 if err != nil { 8232 return nil, err 8233 } 8234 req.Header = reqHeaders 8235 googleapi.Expand(req.URL, map[string]string{ 8236 "location": c.location, 8237 }) 8238 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8239} 8240 8241// Do executes the "dlp.locations.infoTypes.list" call. 8242// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8243// be non-nil. Any non-2xx status code is an error. Response headers are 8244// in either 8245// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8246// a response was returned at all) in error.(*googleapi.Error).Header. 8247// Use googleapi.IsNotModified to check whether the returned error was 8248// because http.StatusNotModified was returned. 8249func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8250 gensupport.SetOptions(c.urlParams_, opts...) 8251 res, err := c.doRequest("json") 8252 if res != nil && res.StatusCode == http.StatusNotModified { 8253 if res.Body != nil { 8254 res.Body.Close() 8255 } 8256 return nil, &googleapi.Error{ 8257 Code: res.StatusCode, 8258 Header: res.Header, 8259 } 8260 } 8261 if err != nil { 8262 return nil, err 8263 } 8264 defer googleapi.CloseBody(res) 8265 if err := googleapi.CheckResponse(res); err != nil { 8266 return nil, err 8267 } 8268 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8269 ServerResponse: googleapi.ServerResponse{ 8270 Header: res.Header, 8271 HTTPStatusCode: res.StatusCode, 8272 }, 8273 } 8274 target := &ret 8275 if err := gensupport.DecodeResponse(target, res); err != nil { 8276 return nil, err 8277 } 8278 return ret, nil 8279 // { 8280 // "description": "Returns a list of the sensitive information types that the DLP API\nsupports. See https://cloud.google.com/dlp/docs/infotypes-reference to\nlearn more.", 8281 // "flatPath": "v2/locations/{location}/infoTypes", 8282 // "httpMethod": "GET", 8283 // "id": "dlp.locations.infoTypes.list", 8284 // "parameterOrder": [ 8285 // "location" 8286 // ], 8287 // "parameters": { 8288 // "filter": { 8289 // "description": "Optional filter to only return infoTypes supported by certain parts of the\nAPI. Defaults to supported_by=INSPECT.", 8290 // "location": "query", 8291 // "type": "string" 8292 // }, 8293 // "languageCode": { 8294 // "description": "Optional BCP-47 language code for localized infoType friendly\nnames. If omitted, or if localized strings are not available,\nen-US strings will be returned.", 8295 // "location": "query", 8296 // "type": "string" 8297 // }, 8298 // "location": { 8299 // "description": "The geographic location to list info types. Reserved for future\nextensions.", 8300 // "location": "path", 8301 // "required": true, 8302 // "type": "string" 8303 // } 8304 // }, 8305 // "path": "v2/locations/{location}/infoTypes", 8306 // "response": { 8307 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8308 // }, 8309 // "scopes": [ 8310 // "https://www.googleapis.com/auth/cloud-platform" 8311 // ] 8312 // } 8313 8314} 8315 8316// method id "dlp.organizations.deidentifyTemplates.create": 8317 8318type OrganizationsDeidentifyTemplatesCreateCall struct { 8319 s *Service 8320 parent string 8321 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 8322 urlParams_ gensupport.URLParams 8323 ctx_ context.Context 8324 header_ http.Header 8325} 8326 8327// Create: Creates a DeidentifyTemplate for re-using frequently used 8328// configuration 8329// for de-identifying content, images, and storage. 8330// See https://cloud.google.com/dlp/docs/creating-templates-deid to 8331// learn 8332// more. 8333func (r *OrganizationsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { 8334 c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8335 c.parent = parent 8336 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 8337 return c 8338} 8339 8340// Fields allows partial responses to be retrieved. See 8341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8342// for more information. 8343func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { 8344 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8345 return c 8346} 8347 8348// Context sets the context to be used in this call's Do method. Any 8349// pending HTTP request will be aborted if the provided context is 8350// canceled. 8351func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { 8352 c.ctx_ = ctx 8353 return c 8354} 8355 8356// Header returns an http.Header that can be modified by the caller to 8357// add HTTP headers to the request. 8358func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { 8359 if c.header_ == nil { 8360 c.header_ = make(http.Header) 8361 } 8362 return c.header_ 8363} 8364 8365func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 8366 reqHeaders := make(http.Header) 8367 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8368 for k, v := range c.header_ { 8369 reqHeaders[k] = v 8370 } 8371 reqHeaders.Set("User-Agent", c.s.userAgent()) 8372 var body io.Reader = nil 8373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 8374 if err != nil { 8375 return nil, err 8376 } 8377 reqHeaders.Set("Content-Type", "application/json") 8378 c.urlParams_.Set("alt", alt) 8379 c.urlParams_.Set("prettyPrint", "false") 8380 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 8381 urls += "?" + c.urlParams_.Encode() 8382 req, err := http.NewRequest("POST", urls, body) 8383 if err != nil { 8384 return nil, err 8385 } 8386 req.Header = reqHeaders 8387 googleapi.Expand(req.URL, map[string]string{ 8388 "parent": c.parent, 8389 }) 8390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8391} 8392 8393// Do executes the "dlp.organizations.deidentifyTemplates.create" call. 8394// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8395// non-nil. Any non-2xx status code is an error. Response headers are in 8396// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8397// (if a response was returned at all) in 8398// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8399// whether the returned error was because http.StatusNotModified was 8400// returned. 8401func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8402 gensupport.SetOptions(c.urlParams_, opts...) 8403 res, err := c.doRequest("json") 8404 if res != nil && res.StatusCode == http.StatusNotModified { 8405 if res.Body != nil { 8406 res.Body.Close() 8407 } 8408 return nil, &googleapi.Error{ 8409 Code: res.StatusCode, 8410 Header: res.Header, 8411 } 8412 } 8413 if err != nil { 8414 return nil, err 8415 } 8416 defer googleapi.CloseBody(res) 8417 if err := googleapi.CheckResponse(res); err != nil { 8418 return nil, err 8419 } 8420 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8421 ServerResponse: googleapi.ServerResponse{ 8422 Header: res.Header, 8423 HTTPStatusCode: res.StatusCode, 8424 }, 8425 } 8426 target := &ret 8427 if err := gensupport.DecodeResponse(target, res); err != nil { 8428 return nil, err 8429 } 8430 return ret, nil 8431 // { 8432 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration\nfor de-identifying content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 8433 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 8434 // "httpMethod": "POST", 8435 // "id": "dlp.organizations.deidentifyTemplates.create", 8436 // "parameterOrder": [ 8437 // "parent" 8438 // ], 8439 // "parameters": { 8440 // "parent": { 8441 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 8442 // "location": "path", 8443 // "pattern": "^organizations/[^/]+$", 8444 // "required": true, 8445 // "type": "string" 8446 // } 8447 // }, 8448 // "path": "v2/{+parent}/deidentifyTemplates", 8449 // "request": { 8450 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 8451 // }, 8452 // "response": { 8453 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8454 // }, 8455 // "scopes": [ 8456 // "https://www.googleapis.com/auth/cloud-platform" 8457 // ] 8458 // } 8459 8460} 8461 8462// method id "dlp.organizations.deidentifyTemplates.delete": 8463 8464type OrganizationsDeidentifyTemplatesDeleteCall struct { 8465 s *Service 8466 name string 8467 urlParams_ gensupport.URLParams 8468 ctx_ context.Context 8469 header_ http.Header 8470} 8471 8472// Delete: Deletes a DeidentifyTemplate. 8473// See https://cloud.google.com/dlp/docs/creating-templates-deid to 8474// learn 8475// more. 8476func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { 8477 c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8478 c.name = name 8479 return c 8480} 8481 8482// Fields allows partial responses to be retrieved. See 8483// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8484// for more information. 8485func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { 8486 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8487 return c 8488} 8489 8490// Context sets the context to be used in this call's Do method. Any 8491// pending HTTP request will be aborted if the provided context is 8492// canceled. 8493func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { 8494 c.ctx_ = ctx 8495 return c 8496} 8497 8498// Header returns an http.Header that can be modified by the caller to 8499// add HTTP headers to the request. 8500func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { 8501 if c.header_ == nil { 8502 c.header_ = make(http.Header) 8503 } 8504 return c.header_ 8505} 8506 8507func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 8508 reqHeaders := make(http.Header) 8509 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8510 for k, v := range c.header_ { 8511 reqHeaders[k] = v 8512 } 8513 reqHeaders.Set("User-Agent", c.s.userAgent()) 8514 var body io.Reader = nil 8515 c.urlParams_.Set("alt", alt) 8516 c.urlParams_.Set("prettyPrint", "false") 8517 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8518 urls += "?" + c.urlParams_.Encode() 8519 req, err := http.NewRequest("DELETE", urls, body) 8520 if err != nil { 8521 return nil, err 8522 } 8523 req.Header = reqHeaders 8524 googleapi.Expand(req.URL, map[string]string{ 8525 "name": c.name, 8526 }) 8527 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8528} 8529 8530// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. 8531// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8532// non-2xx status code is an error. Response headers are in either 8533// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8534// returned at all) in error.(*googleapi.Error).Header. Use 8535// googleapi.IsNotModified to check whether the returned error was 8536// because http.StatusNotModified was returned. 8537func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8538 gensupport.SetOptions(c.urlParams_, opts...) 8539 res, err := c.doRequest("json") 8540 if res != nil && res.StatusCode == http.StatusNotModified { 8541 if res.Body != nil { 8542 res.Body.Close() 8543 } 8544 return nil, &googleapi.Error{ 8545 Code: res.StatusCode, 8546 Header: res.Header, 8547 } 8548 } 8549 if err != nil { 8550 return nil, err 8551 } 8552 defer googleapi.CloseBody(res) 8553 if err := googleapi.CheckResponse(res); err != nil { 8554 return nil, err 8555 } 8556 ret := &GoogleProtobufEmpty{ 8557 ServerResponse: googleapi.ServerResponse{ 8558 Header: res.Header, 8559 HTTPStatusCode: res.StatusCode, 8560 }, 8561 } 8562 target := &ret 8563 if err := gensupport.DecodeResponse(target, res); err != nil { 8564 return nil, err 8565 } 8566 return ret, nil 8567 // { 8568 // "description": "Deletes a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 8569 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8570 // "httpMethod": "DELETE", 8571 // "id": "dlp.organizations.deidentifyTemplates.delete", 8572 // "parameterOrder": [ 8573 // "name" 8574 // ], 8575 // "parameters": { 8576 // "name": { 8577 // "description": "Required. Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 8578 // "location": "path", 8579 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8580 // "required": true, 8581 // "type": "string" 8582 // } 8583 // }, 8584 // "path": "v2/{+name}", 8585 // "response": { 8586 // "$ref": "GoogleProtobufEmpty" 8587 // }, 8588 // "scopes": [ 8589 // "https://www.googleapis.com/auth/cloud-platform" 8590 // ] 8591 // } 8592 8593} 8594 8595// method id "dlp.organizations.deidentifyTemplates.get": 8596 8597type OrganizationsDeidentifyTemplatesGetCall struct { 8598 s *Service 8599 name string 8600 urlParams_ gensupport.URLParams 8601 ifNoneMatch_ string 8602 ctx_ context.Context 8603 header_ http.Header 8604} 8605 8606// Get: Gets a DeidentifyTemplate. 8607// See https://cloud.google.com/dlp/docs/creating-templates-deid to 8608// learn 8609// more. 8610func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { 8611 c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8612 c.name = name 8613 return c 8614} 8615 8616// Fields allows partial responses to be retrieved. See 8617// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8618// for more information. 8619func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { 8620 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8621 return c 8622} 8623 8624// IfNoneMatch sets the optional parameter which makes the operation 8625// fail if the object's ETag matches the given value. This is useful for 8626// getting updates only after the object has changed since the last 8627// request. Use googleapi.IsNotModified to check whether the response 8628// error from Do is the result of In-None-Match. 8629func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { 8630 c.ifNoneMatch_ = entityTag 8631 return c 8632} 8633 8634// Context sets the context to be used in this call's Do method. Any 8635// pending HTTP request will be aborted if the provided context is 8636// canceled. 8637func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { 8638 c.ctx_ = ctx 8639 return c 8640} 8641 8642// Header returns an http.Header that can be modified by the caller to 8643// add HTTP headers to the request. 8644func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { 8645 if c.header_ == nil { 8646 c.header_ = make(http.Header) 8647 } 8648 return c.header_ 8649} 8650 8651func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 8652 reqHeaders := make(http.Header) 8653 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8654 for k, v := range c.header_ { 8655 reqHeaders[k] = v 8656 } 8657 reqHeaders.Set("User-Agent", c.s.userAgent()) 8658 if c.ifNoneMatch_ != "" { 8659 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8660 } 8661 var body io.Reader = nil 8662 c.urlParams_.Set("alt", alt) 8663 c.urlParams_.Set("prettyPrint", "false") 8664 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8665 urls += "?" + c.urlParams_.Encode() 8666 req, err := http.NewRequest("GET", urls, body) 8667 if err != nil { 8668 return nil, err 8669 } 8670 req.Header = reqHeaders 8671 googleapi.Expand(req.URL, map[string]string{ 8672 "name": c.name, 8673 }) 8674 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8675} 8676 8677// Do executes the "dlp.organizations.deidentifyTemplates.get" call. 8678// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8679// non-nil. Any non-2xx status code is an error. Response headers are in 8680// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8681// (if a response was returned at all) in 8682// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8683// whether the returned error was because http.StatusNotModified was 8684// returned. 8685func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8686 gensupport.SetOptions(c.urlParams_, opts...) 8687 res, err := c.doRequest("json") 8688 if res != nil && res.StatusCode == http.StatusNotModified { 8689 if res.Body != nil { 8690 res.Body.Close() 8691 } 8692 return nil, &googleapi.Error{ 8693 Code: res.StatusCode, 8694 Header: res.Header, 8695 } 8696 } 8697 if err != nil { 8698 return nil, err 8699 } 8700 defer googleapi.CloseBody(res) 8701 if err := googleapi.CheckResponse(res); err != nil { 8702 return nil, err 8703 } 8704 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8705 ServerResponse: googleapi.ServerResponse{ 8706 Header: res.Header, 8707 HTTPStatusCode: res.StatusCode, 8708 }, 8709 } 8710 target := &ret 8711 if err := gensupport.DecodeResponse(target, res); err != nil { 8712 return nil, err 8713 } 8714 return ret, nil 8715 // { 8716 // "description": "Gets a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 8717 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8718 // "httpMethod": "GET", 8719 // "id": "dlp.organizations.deidentifyTemplates.get", 8720 // "parameterOrder": [ 8721 // "name" 8722 // ], 8723 // "parameters": { 8724 // "name": { 8725 // "description": "Required. Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 8726 // "location": "path", 8727 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8728 // "required": true, 8729 // "type": "string" 8730 // } 8731 // }, 8732 // "path": "v2/{+name}", 8733 // "response": { 8734 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8735 // }, 8736 // "scopes": [ 8737 // "https://www.googleapis.com/auth/cloud-platform" 8738 // ] 8739 // } 8740 8741} 8742 8743// method id "dlp.organizations.deidentifyTemplates.list": 8744 8745type OrganizationsDeidentifyTemplatesListCall struct { 8746 s *Service 8747 parent string 8748 urlParams_ gensupport.URLParams 8749 ifNoneMatch_ string 8750 ctx_ context.Context 8751 header_ http.Header 8752} 8753 8754// List: Lists DeidentifyTemplates. 8755// See https://cloud.google.com/dlp/docs/creating-templates-deid to 8756// learn 8757// more. 8758func (r *OrganizationsDeidentifyTemplatesService) List(parent string) *OrganizationsDeidentifyTemplatesListCall { 8759 c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8760 c.parent = parent 8761 return c 8762} 8763 8764// OrderBy sets the optional parameter "orderBy": Optional comma 8765// separated list of fields to order by, 8766// followed by `asc` or `desc` postfix. This list is 8767// case-insensitive, 8768// default sorting order is ascending, redundant space characters 8769// are 8770// insignificant. 8771// 8772// Example: `name asc,update_time, create_time desc` 8773// 8774// Supported fields are: 8775// 8776// - `create_time`: corresponds to time the template was created. 8777// - `update_time`: corresponds to time the template was last updated. 8778// - `name`: corresponds to template's name. 8779// - `display_name`: corresponds to template's display name. 8780func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { 8781 c.urlParams_.Set("orderBy", orderBy) 8782 return c 8783} 8784 8785// PageSize sets the optional parameter "pageSize": Optional size of the 8786// page, can be limited by server. If zero server returns 8787// a page of max size 100. 8788func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { 8789 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8790 return c 8791} 8792 8793// PageToken sets the optional parameter "pageToken": Optional page 8794// token to continue retrieval. Comes from previous call 8795// to `ListDeidentifyTemplates`. 8796func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { 8797 c.urlParams_.Set("pageToken", pageToken) 8798 return c 8799} 8800 8801// Fields allows partial responses to be retrieved. See 8802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8803// for more information. 8804func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { 8805 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8806 return c 8807} 8808 8809// IfNoneMatch sets the optional parameter which makes the operation 8810// fail if the object's ETag matches the given value. This is useful for 8811// getting updates only after the object has changed since the last 8812// request. Use googleapi.IsNotModified to check whether the response 8813// error from Do is the result of In-None-Match. 8814func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { 8815 c.ifNoneMatch_ = entityTag 8816 return c 8817} 8818 8819// Context sets the context to be used in this call's Do method. Any 8820// pending HTTP request will be aborted if the provided context is 8821// canceled. 8822func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { 8823 c.ctx_ = ctx 8824 return c 8825} 8826 8827// Header returns an http.Header that can be modified by the caller to 8828// add HTTP headers to the request. 8829func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { 8830 if c.header_ == nil { 8831 c.header_ = make(http.Header) 8832 } 8833 return c.header_ 8834} 8835 8836func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 8837 reqHeaders := make(http.Header) 8838 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 8839 for k, v := range c.header_ { 8840 reqHeaders[k] = v 8841 } 8842 reqHeaders.Set("User-Agent", c.s.userAgent()) 8843 if c.ifNoneMatch_ != "" { 8844 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8845 } 8846 var body io.Reader = nil 8847 c.urlParams_.Set("alt", alt) 8848 c.urlParams_.Set("prettyPrint", "false") 8849 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 8850 urls += "?" + c.urlParams_.Encode() 8851 req, err := http.NewRequest("GET", urls, body) 8852 if err != nil { 8853 return nil, err 8854 } 8855 req.Header = reqHeaders 8856 googleapi.Expand(req.URL, map[string]string{ 8857 "parent": c.parent, 8858 }) 8859 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8860} 8861 8862// Do executes the "dlp.organizations.deidentifyTemplates.list" call. 8863// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 8864// error will be non-nil. Any non-2xx status code is an error. Response 8865// headers are in either 8866// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 8867// er or (if a response was returned at all) in 8868// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8869// whether the returned error was because http.StatusNotModified was 8870// returned. 8871func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 8872 gensupport.SetOptions(c.urlParams_, opts...) 8873 res, err := c.doRequest("json") 8874 if res != nil && res.StatusCode == http.StatusNotModified { 8875 if res.Body != nil { 8876 res.Body.Close() 8877 } 8878 return nil, &googleapi.Error{ 8879 Code: res.StatusCode, 8880 Header: res.Header, 8881 } 8882 } 8883 if err != nil { 8884 return nil, err 8885 } 8886 defer googleapi.CloseBody(res) 8887 if err := googleapi.CheckResponse(res); err != nil { 8888 return nil, err 8889 } 8890 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 8891 ServerResponse: googleapi.ServerResponse{ 8892 Header: res.Header, 8893 HTTPStatusCode: res.StatusCode, 8894 }, 8895 } 8896 target := &ret 8897 if err := gensupport.DecodeResponse(target, res); err != nil { 8898 return nil, err 8899 } 8900 return ret, nil 8901 // { 8902 // "description": "Lists DeidentifyTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 8903 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 8904 // "httpMethod": "GET", 8905 // "id": "dlp.organizations.deidentifyTemplates.list", 8906 // "parameterOrder": [ 8907 // "parent" 8908 // ], 8909 // "parameters": { 8910 // "orderBy": { 8911 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the template was created.\n- `update_time`: corresponds to time the template was last updated.\n- `name`: corresponds to template's name.\n- `display_name`: corresponds to template's display name.", 8912 // "location": "query", 8913 // "type": "string" 8914 // }, 8915 // "pageSize": { 8916 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 8917 // "format": "int32", 8918 // "location": "query", 8919 // "type": "integer" 8920 // }, 8921 // "pageToken": { 8922 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", 8923 // "location": "query", 8924 // "type": "string" 8925 // }, 8926 // "parent": { 8927 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 8928 // "location": "path", 8929 // "pattern": "^organizations/[^/]+$", 8930 // "required": true, 8931 // "type": "string" 8932 // } 8933 // }, 8934 // "path": "v2/{+parent}/deidentifyTemplates", 8935 // "response": { 8936 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 8937 // }, 8938 // "scopes": [ 8939 // "https://www.googleapis.com/auth/cloud-platform" 8940 // ] 8941 // } 8942 8943} 8944 8945// Pages invokes f for each page of results. 8946// A non-nil error returned from f will halt the iteration. 8947// The provided context supersedes any context provided to the Context method. 8948func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 8949 c.ctx_ = ctx 8950 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8951 for { 8952 x, err := c.Do() 8953 if err != nil { 8954 return err 8955 } 8956 if err := f(x); err != nil { 8957 return err 8958 } 8959 if x.NextPageToken == "" { 8960 return nil 8961 } 8962 c.PageToken(x.NextPageToken) 8963 } 8964} 8965 8966// method id "dlp.organizations.deidentifyTemplates.patch": 8967 8968type OrganizationsDeidentifyTemplatesPatchCall struct { 8969 s *Service 8970 name string 8971 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 8972 urlParams_ gensupport.URLParams 8973 ctx_ context.Context 8974 header_ http.Header 8975} 8976 8977// Patch: Updates the DeidentifyTemplate. 8978// See https://cloud.google.com/dlp/docs/creating-templates-deid to 8979// learn 8980// more. 8981func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { 8982 c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8983 c.name = name 8984 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 8985 return c 8986} 8987 8988// Fields allows partial responses to be retrieved. See 8989// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8990// for more information. 8991func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { 8992 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8993 return c 8994} 8995 8996// Context sets the context to be used in this call's Do method. Any 8997// pending HTTP request will be aborted if the provided context is 8998// canceled. 8999func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { 9000 c.ctx_ = ctx 9001 return c 9002} 9003 9004// Header returns an http.Header that can be modified by the caller to 9005// add HTTP headers to the request. 9006func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { 9007 if c.header_ == nil { 9008 c.header_ = make(http.Header) 9009 } 9010 return c.header_ 9011} 9012 9013func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9014 reqHeaders := make(http.Header) 9015 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9016 for k, v := range c.header_ { 9017 reqHeaders[k] = v 9018 } 9019 reqHeaders.Set("User-Agent", c.s.userAgent()) 9020 var body io.Reader = nil 9021 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 9022 if err != nil { 9023 return nil, err 9024 } 9025 reqHeaders.Set("Content-Type", "application/json") 9026 c.urlParams_.Set("alt", alt) 9027 c.urlParams_.Set("prettyPrint", "false") 9028 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9029 urls += "?" + c.urlParams_.Encode() 9030 req, err := http.NewRequest("PATCH", urls, body) 9031 if err != nil { 9032 return nil, err 9033 } 9034 req.Header = reqHeaders 9035 googleapi.Expand(req.URL, map[string]string{ 9036 "name": c.name, 9037 }) 9038 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9039} 9040 9041// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. 9042// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 9043// non-nil. Any non-2xx status code is an error. Response headers are in 9044// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 9045// (if a response was returned at all) in 9046// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9047// whether the returned error was because http.StatusNotModified was 9048// returned. 9049func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 9050 gensupport.SetOptions(c.urlParams_, opts...) 9051 res, err := c.doRequest("json") 9052 if res != nil && res.StatusCode == http.StatusNotModified { 9053 if res.Body != nil { 9054 res.Body.Close() 9055 } 9056 return nil, &googleapi.Error{ 9057 Code: res.StatusCode, 9058 Header: res.Header, 9059 } 9060 } 9061 if err != nil { 9062 return nil, err 9063 } 9064 defer googleapi.CloseBody(res) 9065 if err := googleapi.CheckResponse(res); err != nil { 9066 return nil, err 9067 } 9068 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 9069 ServerResponse: googleapi.ServerResponse{ 9070 Header: res.Header, 9071 HTTPStatusCode: res.StatusCode, 9072 }, 9073 } 9074 target := &ret 9075 if err := gensupport.DecodeResponse(target, res); err != nil { 9076 return nil, err 9077 } 9078 return ret, nil 9079 // { 9080 // "description": "Updates the DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 9081 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 9082 // "httpMethod": "PATCH", 9083 // "id": "dlp.organizations.deidentifyTemplates.patch", 9084 // "parameterOrder": [ 9085 // "name" 9086 // ], 9087 // "parameters": { 9088 // "name": { 9089 // "description": "Required. Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 9090 // "location": "path", 9091 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 9092 // "required": true, 9093 // "type": "string" 9094 // } 9095 // }, 9096 // "path": "v2/{+name}", 9097 // "request": { 9098 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 9099 // }, 9100 // "response": { 9101 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 9102 // }, 9103 // "scopes": [ 9104 // "https://www.googleapis.com/auth/cloud-platform" 9105 // ] 9106 // } 9107 9108} 9109 9110// method id "dlp.organizations.inspectTemplates.create": 9111 9112type OrganizationsInspectTemplatesCreateCall struct { 9113 s *Service 9114 parent string 9115 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 9116 urlParams_ gensupport.URLParams 9117 ctx_ context.Context 9118 header_ http.Header 9119} 9120 9121// Create: Creates an InspectTemplate for re-using frequently used 9122// configuration 9123// for inspecting content, images, and storage. 9124// See https://cloud.google.com/dlp/docs/creating-templates to learn 9125// more. 9126func (r *OrganizationsInspectTemplatesService) Create(parent string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { 9127 c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9128 c.parent = parent 9129 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 9130 return c 9131} 9132 9133// Fields allows partial responses to be retrieved. See 9134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9135// for more information. 9136func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { 9137 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9138 return c 9139} 9140 9141// Context sets the context to be used in this call's Do method. Any 9142// pending HTTP request will be aborted if the provided context is 9143// canceled. 9144func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { 9145 c.ctx_ = ctx 9146 return c 9147} 9148 9149// Header returns an http.Header that can be modified by the caller to 9150// add HTTP headers to the request. 9151func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { 9152 if c.header_ == nil { 9153 c.header_ = make(http.Header) 9154 } 9155 return c.header_ 9156} 9157 9158func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 9159 reqHeaders := make(http.Header) 9160 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9161 for k, v := range c.header_ { 9162 reqHeaders[k] = v 9163 } 9164 reqHeaders.Set("User-Agent", c.s.userAgent()) 9165 var body io.Reader = nil 9166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 9167 if err != nil { 9168 return nil, err 9169 } 9170 reqHeaders.Set("Content-Type", "application/json") 9171 c.urlParams_.Set("alt", alt) 9172 c.urlParams_.Set("prettyPrint", "false") 9173 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9174 urls += "?" + c.urlParams_.Encode() 9175 req, err := http.NewRequest("POST", urls, body) 9176 if err != nil { 9177 return nil, err 9178 } 9179 req.Header = reqHeaders 9180 googleapi.Expand(req.URL, map[string]string{ 9181 "parent": c.parent, 9182 }) 9183 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9184} 9185 9186// Do executes the "dlp.organizations.inspectTemplates.create" call. 9187// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9188// non-nil. Any non-2xx status code is an error. Response headers are in 9189// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9190// (if a response was returned at all) in 9191// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9192// whether the returned error was because http.StatusNotModified was 9193// returned. 9194func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9195 gensupport.SetOptions(c.urlParams_, opts...) 9196 res, err := c.doRequest("json") 9197 if res != nil && res.StatusCode == http.StatusNotModified { 9198 if res.Body != nil { 9199 res.Body.Close() 9200 } 9201 return nil, &googleapi.Error{ 9202 Code: res.StatusCode, 9203 Header: res.Header, 9204 } 9205 } 9206 if err != nil { 9207 return nil, err 9208 } 9209 defer googleapi.CloseBody(res) 9210 if err := googleapi.CheckResponse(res); err != nil { 9211 return nil, err 9212 } 9213 ret := &GooglePrivacyDlpV2InspectTemplate{ 9214 ServerResponse: googleapi.ServerResponse{ 9215 Header: res.Header, 9216 HTTPStatusCode: res.StatusCode, 9217 }, 9218 } 9219 target := &ret 9220 if err := gensupport.DecodeResponse(target, res); err != nil { 9221 return nil, err 9222 } 9223 return ret, nil 9224 // { 9225 // "description": "Creates an InspectTemplate for re-using frequently used configuration\nfor inspecting content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9226 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9227 // "httpMethod": "POST", 9228 // "id": "dlp.organizations.inspectTemplates.create", 9229 // "parameterOrder": [ 9230 // "parent" 9231 // ], 9232 // "parameters": { 9233 // "parent": { 9234 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 9235 // "location": "path", 9236 // "pattern": "^organizations/[^/]+$", 9237 // "required": true, 9238 // "type": "string" 9239 // } 9240 // }, 9241 // "path": "v2/{+parent}/inspectTemplates", 9242 // "request": { 9243 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 9244 // }, 9245 // "response": { 9246 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9247 // }, 9248 // "scopes": [ 9249 // "https://www.googleapis.com/auth/cloud-platform" 9250 // ] 9251 // } 9252 9253} 9254 9255// method id "dlp.organizations.inspectTemplates.delete": 9256 9257type OrganizationsInspectTemplatesDeleteCall struct { 9258 s *Service 9259 name string 9260 urlParams_ gensupport.URLParams 9261 ctx_ context.Context 9262 header_ http.Header 9263} 9264 9265// Delete: Deletes an InspectTemplate. 9266// See https://cloud.google.com/dlp/docs/creating-templates to learn 9267// more. 9268func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { 9269 c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9270 c.name = name 9271 return c 9272} 9273 9274// Fields allows partial responses to be retrieved. See 9275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9276// for more information. 9277func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { 9278 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9279 return c 9280} 9281 9282// Context sets the context to be used in this call's Do method. Any 9283// pending HTTP request will be aborted if the provided context is 9284// canceled. 9285func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { 9286 c.ctx_ = ctx 9287 return c 9288} 9289 9290// Header returns an http.Header that can be modified by the caller to 9291// add HTTP headers to the request. 9292func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { 9293 if c.header_ == nil { 9294 c.header_ = make(http.Header) 9295 } 9296 return c.header_ 9297} 9298 9299func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 9300 reqHeaders := make(http.Header) 9301 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9302 for k, v := range c.header_ { 9303 reqHeaders[k] = v 9304 } 9305 reqHeaders.Set("User-Agent", c.s.userAgent()) 9306 var body io.Reader = nil 9307 c.urlParams_.Set("alt", alt) 9308 c.urlParams_.Set("prettyPrint", "false") 9309 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9310 urls += "?" + c.urlParams_.Encode() 9311 req, err := http.NewRequest("DELETE", urls, body) 9312 if err != nil { 9313 return nil, err 9314 } 9315 req.Header = reqHeaders 9316 googleapi.Expand(req.URL, map[string]string{ 9317 "name": c.name, 9318 }) 9319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9320} 9321 9322// Do executes the "dlp.organizations.inspectTemplates.delete" call. 9323// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9324// non-2xx status code is an error. Response headers are in either 9325// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9326// returned at all) in error.(*googleapi.Error).Header. Use 9327// googleapi.IsNotModified to check whether the returned error was 9328// because http.StatusNotModified was returned. 9329func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9330 gensupport.SetOptions(c.urlParams_, opts...) 9331 res, err := c.doRequest("json") 9332 if res != nil && res.StatusCode == http.StatusNotModified { 9333 if res.Body != nil { 9334 res.Body.Close() 9335 } 9336 return nil, &googleapi.Error{ 9337 Code: res.StatusCode, 9338 Header: res.Header, 9339 } 9340 } 9341 if err != nil { 9342 return nil, err 9343 } 9344 defer googleapi.CloseBody(res) 9345 if err := googleapi.CheckResponse(res); err != nil { 9346 return nil, err 9347 } 9348 ret := &GoogleProtobufEmpty{ 9349 ServerResponse: googleapi.ServerResponse{ 9350 Header: res.Header, 9351 HTTPStatusCode: res.StatusCode, 9352 }, 9353 } 9354 target := &ret 9355 if err := gensupport.DecodeResponse(target, res); err != nil { 9356 return nil, err 9357 } 9358 return ret, nil 9359 // { 9360 // "description": "Deletes an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9361 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9362 // "httpMethod": "DELETE", 9363 // "id": "dlp.organizations.inspectTemplates.delete", 9364 // "parameterOrder": [ 9365 // "name" 9366 // ], 9367 // "parameters": { 9368 // "name": { 9369 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 9370 // "location": "path", 9371 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9372 // "required": true, 9373 // "type": "string" 9374 // } 9375 // }, 9376 // "path": "v2/{+name}", 9377 // "response": { 9378 // "$ref": "GoogleProtobufEmpty" 9379 // }, 9380 // "scopes": [ 9381 // "https://www.googleapis.com/auth/cloud-platform" 9382 // ] 9383 // } 9384 9385} 9386 9387// method id "dlp.organizations.inspectTemplates.get": 9388 9389type OrganizationsInspectTemplatesGetCall struct { 9390 s *Service 9391 name string 9392 urlParams_ gensupport.URLParams 9393 ifNoneMatch_ string 9394 ctx_ context.Context 9395 header_ http.Header 9396} 9397 9398// Get: Gets an InspectTemplate. 9399// See https://cloud.google.com/dlp/docs/creating-templates to learn 9400// more. 9401func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { 9402 c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9403 c.name = name 9404 return c 9405} 9406 9407// Fields allows partial responses to be retrieved. See 9408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9409// for more information. 9410func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { 9411 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9412 return c 9413} 9414 9415// IfNoneMatch sets the optional parameter which makes the operation 9416// fail if the object's ETag matches the given value. This is useful for 9417// getting updates only after the object has changed since the last 9418// request. Use googleapi.IsNotModified to check whether the response 9419// error from Do is the result of In-None-Match. 9420func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { 9421 c.ifNoneMatch_ = entityTag 9422 return c 9423} 9424 9425// Context sets the context to be used in this call's Do method. Any 9426// pending HTTP request will be aborted if the provided context is 9427// canceled. 9428func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { 9429 c.ctx_ = ctx 9430 return c 9431} 9432 9433// Header returns an http.Header that can be modified by the caller to 9434// add HTTP headers to the request. 9435func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { 9436 if c.header_ == nil { 9437 c.header_ = make(http.Header) 9438 } 9439 return c.header_ 9440} 9441 9442func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 9443 reqHeaders := make(http.Header) 9444 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9445 for k, v := range c.header_ { 9446 reqHeaders[k] = v 9447 } 9448 reqHeaders.Set("User-Agent", c.s.userAgent()) 9449 if c.ifNoneMatch_ != "" { 9450 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9451 } 9452 var body io.Reader = nil 9453 c.urlParams_.Set("alt", alt) 9454 c.urlParams_.Set("prettyPrint", "false") 9455 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9456 urls += "?" + c.urlParams_.Encode() 9457 req, err := http.NewRequest("GET", urls, body) 9458 if err != nil { 9459 return nil, err 9460 } 9461 req.Header = reqHeaders 9462 googleapi.Expand(req.URL, map[string]string{ 9463 "name": c.name, 9464 }) 9465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9466} 9467 9468// Do executes the "dlp.organizations.inspectTemplates.get" call. 9469// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9470// non-nil. Any non-2xx status code is an error. Response headers are in 9471// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9472// (if a response was returned at all) in 9473// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9474// whether the returned error was because http.StatusNotModified was 9475// returned. 9476func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9477 gensupport.SetOptions(c.urlParams_, opts...) 9478 res, err := c.doRequest("json") 9479 if res != nil && res.StatusCode == http.StatusNotModified { 9480 if res.Body != nil { 9481 res.Body.Close() 9482 } 9483 return nil, &googleapi.Error{ 9484 Code: res.StatusCode, 9485 Header: res.Header, 9486 } 9487 } 9488 if err != nil { 9489 return nil, err 9490 } 9491 defer googleapi.CloseBody(res) 9492 if err := googleapi.CheckResponse(res); err != nil { 9493 return nil, err 9494 } 9495 ret := &GooglePrivacyDlpV2InspectTemplate{ 9496 ServerResponse: googleapi.ServerResponse{ 9497 Header: res.Header, 9498 HTTPStatusCode: res.StatusCode, 9499 }, 9500 } 9501 target := &ret 9502 if err := gensupport.DecodeResponse(target, res); err != nil { 9503 return nil, err 9504 } 9505 return ret, nil 9506 // { 9507 // "description": "Gets an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9508 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9509 // "httpMethod": "GET", 9510 // "id": "dlp.organizations.inspectTemplates.get", 9511 // "parameterOrder": [ 9512 // "name" 9513 // ], 9514 // "parameters": { 9515 // "name": { 9516 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 9517 // "location": "path", 9518 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9519 // "required": true, 9520 // "type": "string" 9521 // } 9522 // }, 9523 // "path": "v2/{+name}", 9524 // "response": { 9525 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9526 // }, 9527 // "scopes": [ 9528 // "https://www.googleapis.com/auth/cloud-platform" 9529 // ] 9530 // } 9531 9532} 9533 9534// method id "dlp.organizations.inspectTemplates.list": 9535 9536type OrganizationsInspectTemplatesListCall struct { 9537 s *Service 9538 parent string 9539 urlParams_ gensupport.URLParams 9540 ifNoneMatch_ string 9541 ctx_ context.Context 9542 header_ http.Header 9543} 9544 9545// List: Lists InspectTemplates. 9546// See https://cloud.google.com/dlp/docs/creating-templates to learn 9547// more. 9548func (r *OrganizationsInspectTemplatesService) List(parent string) *OrganizationsInspectTemplatesListCall { 9549 c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9550 c.parent = parent 9551 return c 9552} 9553 9554// OrderBy sets the optional parameter "orderBy": Optional comma 9555// separated list of fields to order by, 9556// followed by `asc` or `desc` postfix. This list is 9557// case-insensitive, 9558// default sorting order is ascending, redundant space characters 9559// are 9560// insignificant. 9561// 9562// Example: `name asc,update_time, create_time desc` 9563// 9564// Supported fields are: 9565// 9566// - `create_time`: corresponds to time the template was created. 9567// - `update_time`: corresponds to time the template was last updated. 9568// - `name`: corresponds to template's name. 9569// - `display_name`: corresponds to template's display name. 9570func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { 9571 c.urlParams_.Set("orderBy", orderBy) 9572 return c 9573} 9574 9575// PageSize sets the optional parameter "pageSize": Optional size of the 9576// page, can be limited by server. If zero server returns 9577// a page of max size 100. 9578func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { 9579 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9580 return c 9581} 9582 9583// PageToken sets the optional parameter "pageToken": Optional page 9584// token to continue retrieval. Comes from previous call 9585// to `ListInspectTemplates`. 9586func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { 9587 c.urlParams_.Set("pageToken", pageToken) 9588 return c 9589} 9590 9591// Fields allows partial responses to be retrieved. See 9592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9593// for more information. 9594func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { 9595 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9596 return c 9597} 9598 9599// IfNoneMatch sets the optional parameter which makes the operation 9600// fail if the object's ETag matches the given value. This is useful for 9601// getting updates only after the object has changed since the last 9602// request. Use googleapi.IsNotModified to check whether the response 9603// error from Do is the result of In-None-Match. 9604func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { 9605 c.ifNoneMatch_ = entityTag 9606 return c 9607} 9608 9609// Context sets the context to be used in this call's Do method. Any 9610// pending HTTP request will be aborted if the provided context is 9611// canceled. 9612func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { 9613 c.ctx_ = ctx 9614 return c 9615} 9616 9617// Header returns an http.Header that can be modified by the caller to 9618// add HTTP headers to the request. 9619func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { 9620 if c.header_ == nil { 9621 c.header_ = make(http.Header) 9622 } 9623 return c.header_ 9624} 9625 9626func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9627 reqHeaders := make(http.Header) 9628 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9629 for k, v := range c.header_ { 9630 reqHeaders[k] = v 9631 } 9632 reqHeaders.Set("User-Agent", c.s.userAgent()) 9633 if c.ifNoneMatch_ != "" { 9634 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9635 } 9636 var body io.Reader = nil 9637 c.urlParams_.Set("alt", alt) 9638 c.urlParams_.Set("prettyPrint", "false") 9639 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9640 urls += "?" + c.urlParams_.Encode() 9641 req, err := http.NewRequest("GET", urls, body) 9642 if err != nil { 9643 return nil, err 9644 } 9645 req.Header = reqHeaders 9646 googleapi.Expand(req.URL, map[string]string{ 9647 "parent": c.parent, 9648 }) 9649 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9650} 9651 9652// Do executes the "dlp.organizations.inspectTemplates.list" call. 9653// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 9654// error will be non-nil. Any non-2xx status code is an error. Response 9655// headers are in either 9656// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 9657// or (if a response was returned at all) in 9658// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9659// whether the returned error was because http.StatusNotModified was 9660// returned. 9661func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 9662 gensupport.SetOptions(c.urlParams_, opts...) 9663 res, err := c.doRequest("json") 9664 if res != nil && res.StatusCode == http.StatusNotModified { 9665 if res.Body != nil { 9666 res.Body.Close() 9667 } 9668 return nil, &googleapi.Error{ 9669 Code: res.StatusCode, 9670 Header: res.Header, 9671 } 9672 } 9673 if err != nil { 9674 return nil, err 9675 } 9676 defer googleapi.CloseBody(res) 9677 if err := googleapi.CheckResponse(res); err != nil { 9678 return nil, err 9679 } 9680 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 9681 ServerResponse: googleapi.ServerResponse{ 9682 Header: res.Header, 9683 HTTPStatusCode: res.StatusCode, 9684 }, 9685 } 9686 target := &ret 9687 if err := gensupport.DecodeResponse(target, res); err != nil { 9688 return nil, err 9689 } 9690 return ret, nil 9691 // { 9692 // "description": "Lists InspectTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9693 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9694 // "httpMethod": "GET", 9695 // "id": "dlp.organizations.inspectTemplates.list", 9696 // "parameterOrder": [ 9697 // "parent" 9698 // ], 9699 // "parameters": { 9700 // "orderBy": { 9701 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the template was created.\n- `update_time`: corresponds to time the template was last updated.\n- `name`: corresponds to template's name.\n- `display_name`: corresponds to template's display name.", 9702 // "location": "query", 9703 // "type": "string" 9704 // }, 9705 // "pageSize": { 9706 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 9707 // "format": "int32", 9708 // "location": "query", 9709 // "type": "integer" 9710 // }, 9711 // "pageToken": { 9712 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", 9713 // "location": "query", 9714 // "type": "string" 9715 // }, 9716 // "parent": { 9717 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 9718 // "location": "path", 9719 // "pattern": "^organizations/[^/]+$", 9720 // "required": true, 9721 // "type": "string" 9722 // } 9723 // }, 9724 // "path": "v2/{+parent}/inspectTemplates", 9725 // "response": { 9726 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 9727 // }, 9728 // "scopes": [ 9729 // "https://www.googleapis.com/auth/cloud-platform" 9730 // ] 9731 // } 9732 9733} 9734 9735// Pages invokes f for each page of results. 9736// A non-nil error returned from f will halt the iteration. 9737// The provided context supersedes any context provided to the Context method. 9738func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 9739 c.ctx_ = ctx 9740 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9741 for { 9742 x, err := c.Do() 9743 if err != nil { 9744 return err 9745 } 9746 if err := f(x); err != nil { 9747 return err 9748 } 9749 if x.NextPageToken == "" { 9750 return nil 9751 } 9752 c.PageToken(x.NextPageToken) 9753 } 9754} 9755 9756// method id "dlp.organizations.inspectTemplates.patch": 9757 9758type OrganizationsInspectTemplatesPatchCall struct { 9759 s *Service 9760 name string 9761 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 9762 urlParams_ gensupport.URLParams 9763 ctx_ context.Context 9764 header_ http.Header 9765} 9766 9767// Patch: Updates the InspectTemplate. 9768// See https://cloud.google.com/dlp/docs/creating-templates to learn 9769// more. 9770func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { 9771 c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9772 c.name = name 9773 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 9774 return c 9775} 9776 9777// Fields allows partial responses to be retrieved. See 9778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9779// for more information. 9780func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { 9781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9782 return c 9783} 9784 9785// Context sets the context to be used in this call's Do method. Any 9786// pending HTTP request will be aborted if the provided context is 9787// canceled. 9788func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { 9789 c.ctx_ = ctx 9790 return c 9791} 9792 9793// Header returns an http.Header that can be modified by the caller to 9794// add HTTP headers to the request. 9795func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { 9796 if c.header_ == nil { 9797 c.header_ = make(http.Header) 9798 } 9799 return c.header_ 9800} 9801 9802func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9803 reqHeaders := make(http.Header) 9804 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9805 for k, v := range c.header_ { 9806 reqHeaders[k] = v 9807 } 9808 reqHeaders.Set("User-Agent", c.s.userAgent()) 9809 var body io.Reader = nil 9810 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 9811 if err != nil { 9812 return nil, err 9813 } 9814 reqHeaders.Set("Content-Type", "application/json") 9815 c.urlParams_.Set("alt", alt) 9816 c.urlParams_.Set("prettyPrint", "false") 9817 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9818 urls += "?" + c.urlParams_.Encode() 9819 req, err := http.NewRequest("PATCH", urls, body) 9820 if err != nil { 9821 return nil, err 9822 } 9823 req.Header = reqHeaders 9824 googleapi.Expand(req.URL, map[string]string{ 9825 "name": c.name, 9826 }) 9827 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9828} 9829 9830// Do executes the "dlp.organizations.inspectTemplates.patch" call. 9831// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9832// non-nil. Any non-2xx status code is an error. Response headers are in 9833// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9834// (if a response was returned at all) in 9835// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9836// whether the returned error was because http.StatusNotModified was 9837// returned. 9838func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9839 gensupport.SetOptions(c.urlParams_, opts...) 9840 res, err := c.doRequest("json") 9841 if res != nil && res.StatusCode == http.StatusNotModified { 9842 if res.Body != nil { 9843 res.Body.Close() 9844 } 9845 return nil, &googleapi.Error{ 9846 Code: res.StatusCode, 9847 Header: res.Header, 9848 } 9849 } 9850 if err != nil { 9851 return nil, err 9852 } 9853 defer googleapi.CloseBody(res) 9854 if err := googleapi.CheckResponse(res); err != nil { 9855 return nil, err 9856 } 9857 ret := &GooglePrivacyDlpV2InspectTemplate{ 9858 ServerResponse: googleapi.ServerResponse{ 9859 Header: res.Header, 9860 HTTPStatusCode: res.StatusCode, 9861 }, 9862 } 9863 target := &ret 9864 if err := gensupport.DecodeResponse(target, res); err != nil { 9865 return nil, err 9866 } 9867 return ret, nil 9868 // { 9869 // "description": "Updates the InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9870 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9871 // "httpMethod": "PATCH", 9872 // "id": "dlp.organizations.inspectTemplates.patch", 9873 // "parameterOrder": [ 9874 // "name" 9875 // ], 9876 // "parameters": { 9877 // "name": { 9878 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 9879 // "location": "path", 9880 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9881 // "required": true, 9882 // "type": "string" 9883 // } 9884 // }, 9885 // "path": "v2/{+name}", 9886 // "request": { 9887 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 9888 // }, 9889 // "response": { 9890 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9891 // }, 9892 // "scopes": [ 9893 // "https://www.googleapis.com/auth/cloud-platform" 9894 // ] 9895 // } 9896 9897} 9898 9899// method id "dlp.organizations.storedInfoTypes.create": 9900 9901type OrganizationsStoredInfoTypesCreateCall struct { 9902 s *Service 9903 parent string 9904 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 9905 urlParams_ gensupport.URLParams 9906 ctx_ context.Context 9907 header_ http.Header 9908} 9909 9910// Create: Creates a pre-built stored infoType to be used for 9911// inspection. 9912// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 9913// to 9914// learn more. 9915func (r *OrganizationsStoredInfoTypesService) Create(parent string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { 9916 c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9917 c.parent = parent 9918 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 9919 return c 9920} 9921 9922// Fields allows partial responses to be retrieved. See 9923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9924// for more information. 9925func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { 9926 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9927 return c 9928} 9929 9930// Context sets the context to be used in this call's Do method. Any 9931// pending HTTP request will be aborted if the provided context is 9932// canceled. 9933func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { 9934 c.ctx_ = ctx 9935 return c 9936} 9937 9938// Header returns an http.Header that can be modified by the caller to 9939// add HTTP headers to the request. 9940func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { 9941 if c.header_ == nil { 9942 c.header_ = make(http.Header) 9943 } 9944 return c.header_ 9945} 9946 9947func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 9948 reqHeaders := make(http.Header) 9949 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 9950 for k, v := range c.header_ { 9951 reqHeaders[k] = v 9952 } 9953 reqHeaders.Set("User-Agent", c.s.userAgent()) 9954 var body io.Reader = nil 9955 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 9956 if err != nil { 9957 return nil, err 9958 } 9959 reqHeaders.Set("Content-Type", "application/json") 9960 c.urlParams_.Set("alt", alt) 9961 c.urlParams_.Set("prettyPrint", "false") 9962 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 9963 urls += "?" + c.urlParams_.Encode() 9964 req, err := http.NewRequest("POST", urls, body) 9965 if err != nil { 9966 return nil, err 9967 } 9968 req.Header = reqHeaders 9969 googleapi.Expand(req.URL, map[string]string{ 9970 "parent": c.parent, 9971 }) 9972 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9973} 9974 9975// Do executes the "dlp.organizations.storedInfoTypes.create" call. 9976// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 9977// non-nil. Any non-2xx status code is an error. Response headers are in 9978// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 9979// a response was returned at all) in error.(*googleapi.Error).Header. 9980// Use googleapi.IsNotModified to check whether the returned error was 9981// because http.StatusNotModified was returned. 9982func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 9983 gensupport.SetOptions(c.urlParams_, opts...) 9984 res, err := c.doRequest("json") 9985 if res != nil && res.StatusCode == http.StatusNotModified { 9986 if res.Body != nil { 9987 res.Body.Close() 9988 } 9989 return nil, &googleapi.Error{ 9990 Code: res.StatusCode, 9991 Header: res.Header, 9992 } 9993 } 9994 if err != nil { 9995 return nil, err 9996 } 9997 defer googleapi.CloseBody(res) 9998 if err := googleapi.CheckResponse(res); err != nil { 9999 return nil, err 10000 } 10001 ret := &GooglePrivacyDlpV2StoredInfoType{ 10002 ServerResponse: googleapi.ServerResponse{ 10003 Header: res.Header, 10004 HTTPStatusCode: res.StatusCode, 10005 }, 10006 } 10007 target := &ret 10008 if err := gensupport.DecodeResponse(target, res); err != nil { 10009 return nil, err 10010 } 10011 return ret, nil 10012 // { 10013 // "description": "Creates a pre-built stored infoType to be used for inspection.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 10014 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 10015 // "httpMethod": "POST", 10016 // "id": "dlp.organizations.storedInfoTypes.create", 10017 // "parameterOrder": [ 10018 // "parent" 10019 // ], 10020 // "parameters": { 10021 // "parent": { 10022 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 10023 // "location": "path", 10024 // "pattern": "^organizations/[^/]+$", 10025 // "required": true, 10026 // "type": "string" 10027 // } 10028 // }, 10029 // "path": "v2/{+parent}/storedInfoTypes", 10030 // "request": { 10031 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 10032 // }, 10033 // "response": { 10034 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 10035 // }, 10036 // "scopes": [ 10037 // "https://www.googleapis.com/auth/cloud-platform" 10038 // ] 10039 // } 10040 10041} 10042 10043// method id "dlp.organizations.storedInfoTypes.delete": 10044 10045type OrganizationsStoredInfoTypesDeleteCall struct { 10046 s *Service 10047 name string 10048 urlParams_ gensupport.URLParams 10049 ctx_ context.Context 10050 header_ http.Header 10051} 10052 10053// Delete: Deletes a stored infoType. 10054// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 10055// to 10056// learn more. 10057func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { 10058 c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10059 c.name = name 10060 return c 10061} 10062 10063// Fields allows partial responses to be retrieved. See 10064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10065// for more information. 10066func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { 10067 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10068 return c 10069} 10070 10071// Context sets the context to be used in this call's Do method. Any 10072// pending HTTP request will be aborted if the provided context is 10073// canceled. 10074func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { 10075 c.ctx_ = ctx 10076 return c 10077} 10078 10079// Header returns an http.Header that can be modified by the caller to 10080// add HTTP headers to the request. 10081func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { 10082 if c.header_ == nil { 10083 c.header_ = make(http.Header) 10084 } 10085 return c.header_ 10086} 10087 10088func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 10089 reqHeaders := make(http.Header) 10090 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10091 for k, v := range c.header_ { 10092 reqHeaders[k] = v 10093 } 10094 reqHeaders.Set("User-Agent", c.s.userAgent()) 10095 var body io.Reader = nil 10096 c.urlParams_.Set("alt", alt) 10097 c.urlParams_.Set("prettyPrint", "false") 10098 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10099 urls += "?" + c.urlParams_.Encode() 10100 req, err := http.NewRequest("DELETE", urls, body) 10101 if err != nil { 10102 return nil, err 10103 } 10104 req.Header = reqHeaders 10105 googleapi.Expand(req.URL, map[string]string{ 10106 "name": c.name, 10107 }) 10108 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10109} 10110 10111// Do executes the "dlp.organizations.storedInfoTypes.delete" call. 10112// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10113// non-2xx status code is an error. Response headers are in either 10114// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10115// returned at all) in error.(*googleapi.Error).Header. Use 10116// googleapi.IsNotModified to check whether the returned error was 10117// because http.StatusNotModified was returned. 10118func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10119 gensupport.SetOptions(c.urlParams_, opts...) 10120 res, err := c.doRequest("json") 10121 if res != nil && res.StatusCode == http.StatusNotModified { 10122 if res.Body != nil { 10123 res.Body.Close() 10124 } 10125 return nil, &googleapi.Error{ 10126 Code: res.StatusCode, 10127 Header: res.Header, 10128 } 10129 } 10130 if err != nil { 10131 return nil, err 10132 } 10133 defer googleapi.CloseBody(res) 10134 if err := googleapi.CheckResponse(res); err != nil { 10135 return nil, err 10136 } 10137 ret := &GoogleProtobufEmpty{ 10138 ServerResponse: googleapi.ServerResponse{ 10139 Header: res.Header, 10140 HTTPStatusCode: res.StatusCode, 10141 }, 10142 } 10143 target := &ret 10144 if err := gensupport.DecodeResponse(target, res); err != nil { 10145 return nil, err 10146 } 10147 return ret, nil 10148 // { 10149 // "description": "Deletes a stored infoType.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 10150 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 10151 // "httpMethod": "DELETE", 10152 // "id": "dlp.organizations.storedInfoTypes.delete", 10153 // "parameterOrder": [ 10154 // "name" 10155 // ], 10156 // "parameters": { 10157 // "name": { 10158 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 10159 // "location": "path", 10160 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 10161 // "required": true, 10162 // "type": "string" 10163 // } 10164 // }, 10165 // "path": "v2/{+name}", 10166 // "response": { 10167 // "$ref": "GoogleProtobufEmpty" 10168 // }, 10169 // "scopes": [ 10170 // "https://www.googleapis.com/auth/cloud-platform" 10171 // ] 10172 // } 10173 10174} 10175 10176// method id "dlp.organizations.storedInfoTypes.get": 10177 10178type OrganizationsStoredInfoTypesGetCall struct { 10179 s *Service 10180 name string 10181 urlParams_ gensupport.URLParams 10182 ifNoneMatch_ string 10183 ctx_ context.Context 10184 header_ http.Header 10185} 10186 10187// Get: Gets a stored infoType. 10188// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 10189// to 10190// learn more. 10191func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { 10192 c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10193 c.name = name 10194 return c 10195} 10196 10197// Fields allows partial responses to be retrieved. See 10198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10199// for more information. 10200func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { 10201 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10202 return c 10203} 10204 10205// IfNoneMatch sets the optional parameter which makes the operation 10206// fail if the object's ETag matches the given value. This is useful for 10207// getting updates only after the object has changed since the last 10208// request. Use googleapi.IsNotModified to check whether the response 10209// error from Do is the result of In-None-Match. 10210func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { 10211 c.ifNoneMatch_ = entityTag 10212 return c 10213} 10214 10215// Context sets the context to be used in this call's Do method. Any 10216// pending HTTP request will be aborted if the provided context is 10217// canceled. 10218func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { 10219 c.ctx_ = ctx 10220 return c 10221} 10222 10223// Header returns an http.Header that can be modified by the caller to 10224// add HTTP headers to the request. 10225func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { 10226 if c.header_ == nil { 10227 c.header_ = make(http.Header) 10228 } 10229 return c.header_ 10230} 10231 10232func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 10233 reqHeaders := make(http.Header) 10234 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10235 for k, v := range c.header_ { 10236 reqHeaders[k] = v 10237 } 10238 reqHeaders.Set("User-Agent", c.s.userAgent()) 10239 if c.ifNoneMatch_ != "" { 10240 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10241 } 10242 var body io.Reader = nil 10243 c.urlParams_.Set("alt", alt) 10244 c.urlParams_.Set("prettyPrint", "false") 10245 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10246 urls += "?" + c.urlParams_.Encode() 10247 req, err := http.NewRequest("GET", urls, body) 10248 if err != nil { 10249 return nil, err 10250 } 10251 req.Header = reqHeaders 10252 googleapi.Expand(req.URL, map[string]string{ 10253 "name": c.name, 10254 }) 10255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10256} 10257 10258// Do executes the "dlp.organizations.storedInfoTypes.get" call. 10259// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 10260// non-nil. Any non-2xx status code is an error. Response headers are in 10261// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 10262// a response was returned at all) in error.(*googleapi.Error).Header. 10263// Use googleapi.IsNotModified to check whether the returned error was 10264// because http.StatusNotModified was returned. 10265func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 10266 gensupport.SetOptions(c.urlParams_, opts...) 10267 res, err := c.doRequest("json") 10268 if res != nil && res.StatusCode == http.StatusNotModified { 10269 if res.Body != nil { 10270 res.Body.Close() 10271 } 10272 return nil, &googleapi.Error{ 10273 Code: res.StatusCode, 10274 Header: res.Header, 10275 } 10276 } 10277 if err != nil { 10278 return nil, err 10279 } 10280 defer googleapi.CloseBody(res) 10281 if err := googleapi.CheckResponse(res); err != nil { 10282 return nil, err 10283 } 10284 ret := &GooglePrivacyDlpV2StoredInfoType{ 10285 ServerResponse: googleapi.ServerResponse{ 10286 Header: res.Header, 10287 HTTPStatusCode: res.StatusCode, 10288 }, 10289 } 10290 target := &ret 10291 if err := gensupport.DecodeResponse(target, res); err != nil { 10292 return nil, err 10293 } 10294 return ret, nil 10295 // { 10296 // "description": "Gets a stored infoType.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 10297 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 10298 // "httpMethod": "GET", 10299 // "id": "dlp.organizations.storedInfoTypes.get", 10300 // "parameterOrder": [ 10301 // "name" 10302 // ], 10303 // "parameters": { 10304 // "name": { 10305 // "description": "Required. Resource name of the organization and storedInfoType to be read, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 10306 // "location": "path", 10307 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 10308 // "required": true, 10309 // "type": "string" 10310 // } 10311 // }, 10312 // "path": "v2/{+name}", 10313 // "response": { 10314 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 10315 // }, 10316 // "scopes": [ 10317 // "https://www.googleapis.com/auth/cloud-platform" 10318 // ] 10319 // } 10320 10321} 10322 10323// method id "dlp.organizations.storedInfoTypes.list": 10324 10325type OrganizationsStoredInfoTypesListCall struct { 10326 s *Service 10327 parent string 10328 urlParams_ gensupport.URLParams 10329 ifNoneMatch_ string 10330 ctx_ context.Context 10331 header_ http.Header 10332} 10333 10334// List: Lists stored infoTypes. 10335// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 10336// to 10337// learn more. 10338func (r *OrganizationsStoredInfoTypesService) List(parent string) *OrganizationsStoredInfoTypesListCall { 10339 c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10340 c.parent = parent 10341 return c 10342} 10343 10344// OrderBy sets the optional parameter "orderBy": Optional comma 10345// separated list of fields to order by, 10346// followed by `asc` or `desc` postfix. This list is 10347// case-insensitive, 10348// default sorting order is ascending, redundant space characters 10349// are 10350// insignificant. 10351// 10352// Example: `name asc, display_name, create_time desc` 10353// 10354// Supported fields are: 10355// 10356// - `create_time`: corresponds to time the most recent version of 10357// the 10358// resource was created. 10359// - `state`: corresponds to the state of the resource. 10360// - `name`: corresponds to resource name. 10361// - `display_name`: corresponds to info type's display name. 10362func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { 10363 c.urlParams_.Set("orderBy", orderBy) 10364 return c 10365} 10366 10367// PageSize sets the optional parameter "pageSize": Optional size of the 10368// page, can be limited by server. If zero server returns 10369// a page of max size 100. 10370func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { 10371 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10372 return c 10373} 10374 10375// PageToken sets the optional parameter "pageToken": Optional page 10376// token to continue retrieval. Comes from previous call 10377// to `ListStoredInfoTypes`. 10378func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { 10379 c.urlParams_.Set("pageToken", pageToken) 10380 return c 10381} 10382 10383// Fields allows partial responses to be retrieved. See 10384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10385// for more information. 10386func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { 10387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10388 return c 10389} 10390 10391// IfNoneMatch sets the optional parameter which makes the operation 10392// fail if the object's ETag matches the given value. This is useful for 10393// getting updates only after the object has changed since the last 10394// request. Use googleapi.IsNotModified to check whether the response 10395// error from Do is the result of In-None-Match. 10396func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { 10397 c.ifNoneMatch_ = entityTag 10398 return c 10399} 10400 10401// Context sets the context to be used in this call's Do method. Any 10402// pending HTTP request will be aborted if the provided context is 10403// canceled. 10404func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { 10405 c.ctx_ = ctx 10406 return c 10407} 10408 10409// Header returns an http.Header that can be modified by the caller to 10410// add HTTP headers to the request. 10411func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { 10412 if c.header_ == nil { 10413 c.header_ = make(http.Header) 10414 } 10415 return c.header_ 10416} 10417 10418func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 10419 reqHeaders := make(http.Header) 10420 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10421 for k, v := range c.header_ { 10422 reqHeaders[k] = v 10423 } 10424 reqHeaders.Set("User-Agent", c.s.userAgent()) 10425 if c.ifNoneMatch_ != "" { 10426 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10427 } 10428 var body io.Reader = nil 10429 c.urlParams_.Set("alt", alt) 10430 c.urlParams_.Set("prettyPrint", "false") 10431 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 10432 urls += "?" + c.urlParams_.Encode() 10433 req, err := http.NewRequest("GET", urls, body) 10434 if err != nil { 10435 return nil, err 10436 } 10437 req.Header = reqHeaders 10438 googleapi.Expand(req.URL, map[string]string{ 10439 "parent": c.parent, 10440 }) 10441 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10442} 10443 10444// Do executes the "dlp.organizations.storedInfoTypes.list" call. 10445// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 10446// error will be non-nil. Any non-2xx status code is an error. Response 10447// headers are in either 10448// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 10449// or (if a response was returned at all) in 10450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10451// whether the returned error was because http.StatusNotModified was 10452// returned. 10453func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 10454 gensupport.SetOptions(c.urlParams_, opts...) 10455 res, err := c.doRequest("json") 10456 if res != nil && res.StatusCode == http.StatusNotModified { 10457 if res.Body != nil { 10458 res.Body.Close() 10459 } 10460 return nil, &googleapi.Error{ 10461 Code: res.StatusCode, 10462 Header: res.Header, 10463 } 10464 } 10465 if err != nil { 10466 return nil, err 10467 } 10468 defer googleapi.CloseBody(res) 10469 if err := googleapi.CheckResponse(res); err != nil { 10470 return nil, err 10471 } 10472 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 10473 ServerResponse: googleapi.ServerResponse{ 10474 Header: res.Header, 10475 HTTPStatusCode: res.StatusCode, 10476 }, 10477 } 10478 target := &ret 10479 if err := gensupport.DecodeResponse(target, res); err != nil { 10480 return nil, err 10481 } 10482 return ret, nil 10483 // { 10484 // "description": "Lists stored infoTypes.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 10485 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 10486 // "httpMethod": "GET", 10487 // "id": "dlp.organizations.storedInfoTypes.list", 10488 // "parameterOrder": [ 10489 // "parent" 10490 // ], 10491 // "parameters": { 10492 // "orderBy": { 10493 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc, display_name, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the most recent version of the\nresource was created.\n- `state`: corresponds to the state of the resource.\n- `name`: corresponds to resource name.\n- `display_name`: corresponds to info type's display name.", 10494 // "location": "query", 10495 // "type": "string" 10496 // }, 10497 // "pageSize": { 10498 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 10499 // "format": "int32", 10500 // "location": "query", 10501 // "type": "integer" 10502 // }, 10503 // "pageToken": { 10504 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListStoredInfoTypes`.", 10505 // "location": "query", 10506 // "type": "string" 10507 // }, 10508 // "parent": { 10509 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 10510 // "location": "path", 10511 // "pattern": "^organizations/[^/]+$", 10512 // "required": true, 10513 // "type": "string" 10514 // } 10515 // }, 10516 // "path": "v2/{+parent}/storedInfoTypes", 10517 // "response": { 10518 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 10519 // }, 10520 // "scopes": [ 10521 // "https://www.googleapis.com/auth/cloud-platform" 10522 // ] 10523 // } 10524 10525} 10526 10527// Pages invokes f for each page of results. 10528// A non-nil error returned from f will halt the iteration. 10529// The provided context supersedes any context provided to the Context method. 10530func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 10531 c.ctx_ = ctx 10532 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10533 for { 10534 x, err := c.Do() 10535 if err != nil { 10536 return err 10537 } 10538 if err := f(x); err != nil { 10539 return err 10540 } 10541 if x.NextPageToken == "" { 10542 return nil 10543 } 10544 c.PageToken(x.NextPageToken) 10545 } 10546} 10547 10548// method id "dlp.organizations.storedInfoTypes.patch": 10549 10550type OrganizationsStoredInfoTypesPatchCall struct { 10551 s *Service 10552 name string 10553 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 10554 urlParams_ gensupport.URLParams 10555 ctx_ context.Context 10556 header_ http.Header 10557} 10558 10559// Patch: Updates the stored infoType by creating a new version. The 10560// existing version 10561// will continue to be used until the new version is ready. 10562// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 10563// to 10564// learn more. 10565func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { 10566 c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10567 c.name = name 10568 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 10569 return c 10570} 10571 10572// Fields allows partial responses to be retrieved. See 10573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10574// for more information. 10575func (c *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { 10576 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10577 return c 10578} 10579 10580// Context sets the context to be used in this call's Do method. Any 10581// pending HTTP request will be aborted if the provided context is 10582// canceled. 10583func (c *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { 10584 c.ctx_ = ctx 10585 return c 10586} 10587 10588// Header returns an http.Header that can be modified by the caller to 10589// add HTTP headers to the request. 10590func (c *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { 10591 if c.header_ == nil { 10592 c.header_ = make(http.Header) 10593 } 10594 return c.header_ 10595} 10596 10597func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 10598 reqHeaders := make(http.Header) 10599 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10600 for k, v := range c.header_ { 10601 reqHeaders[k] = v 10602 } 10603 reqHeaders.Set("User-Agent", c.s.userAgent()) 10604 var body io.Reader = nil 10605 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 10606 if err != nil { 10607 return nil, err 10608 } 10609 reqHeaders.Set("Content-Type", "application/json") 10610 c.urlParams_.Set("alt", alt) 10611 c.urlParams_.Set("prettyPrint", "false") 10612 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10613 urls += "?" + c.urlParams_.Encode() 10614 req, err := http.NewRequest("PATCH", urls, body) 10615 if err != nil { 10616 return nil, err 10617 } 10618 req.Header = reqHeaders 10619 googleapi.Expand(req.URL, map[string]string{ 10620 "name": c.name, 10621 }) 10622 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10623} 10624 10625// Do executes the "dlp.organizations.storedInfoTypes.patch" call. 10626// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 10627// non-nil. Any non-2xx status code is an error. Response headers are in 10628// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 10629// a response was returned at all) in error.(*googleapi.Error).Header. 10630// Use googleapi.IsNotModified to check whether the returned error was 10631// because http.StatusNotModified was returned. 10632func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 10633 gensupport.SetOptions(c.urlParams_, opts...) 10634 res, err := c.doRequest("json") 10635 if res != nil && res.StatusCode == http.StatusNotModified { 10636 if res.Body != nil { 10637 res.Body.Close() 10638 } 10639 return nil, &googleapi.Error{ 10640 Code: res.StatusCode, 10641 Header: res.Header, 10642 } 10643 } 10644 if err != nil { 10645 return nil, err 10646 } 10647 defer googleapi.CloseBody(res) 10648 if err := googleapi.CheckResponse(res); err != nil { 10649 return nil, err 10650 } 10651 ret := &GooglePrivacyDlpV2StoredInfoType{ 10652 ServerResponse: googleapi.ServerResponse{ 10653 Header: res.Header, 10654 HTTPStatusCode: res.StatusCode, 10655 }, 10656 } 10657 target := &ret 10658 if err := gensupport.DecodeResponse(target, res); err != nil { 10659 return nil, err 10660 } 10661 return ret, nil 10662 // { 10663 // "description": "Updates the stored infoType by creating a new version. The existing version\nwill continue to be used until the new version is ready.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 10664 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 10665 // "httpMethod": "PATCH", 10666 // "id": "dlp.organizations.storedInfoTypes.patch", 10667 // "parameterOrder": [ 10668 // "name" 10669 // ], 10670 // "parameters": { 10671 // "name": { 10672 // "description": "Required. Resource name of organization and storedInfoType to be updated, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 10673 // "location": "path", 10674 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 10675 // "required": true, 10676 // "type": "string" 10677 // } 10678 // }, 10679 // "path": "v2/{+name}", 10680 // "request": { 10681 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 10682 // }, 10683 // "response": { 10684 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 10685 // }, 10686 // "scopes": [ 10687 // "https://www.googleapis.com/auth/cloud-platform" 10688 // ] 10689 // } 10690 10691} 10692 10693// method id "dlp.projects.content.deidentify": 10694 10695type ProjectsContentDeidentifyCall struct { 10696 s *Service 10697 parent string 10698 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 10699 urlParams_ gensupport.URLParams 10700 ctx_ context.Context 10701 header_ http.Header 10702} 10703 10704// Deidentify: De-identifies potentially sensitive info from a 10705// ContentItem. 10706// This method has limits on input size and output size. 10707// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data 10708// to 10709// learn more. 10710// 10711// When no InfoTypes or CustomInfoTypes are specified in this request, 10712// the 10713// system will automatically choose what detectors to run. By default 10714// this may 10715// be all types, but may change over time as detectors are updated. 10716func (r *ProjectsContentService) Deidentify(parent string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { 10717 c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10718 c.parent = parent 10719 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 10720 return c 10721} 10722 10723// Fields allows partial responses to be retrieved. See 10724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10725// for more information. 10726func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { 10727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10728 return c 10729} 10730 10731// Context sets the context to be used in this call's Do method. Any 10732// pending HTTP request will be aborted if the provided context is 10733// canceled. 10734func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { 10735 c.ctx_ = ctx 10736 return c 10737} 10738 10739// Header returns an http.Header that can be modified by the caller to 10740// add HTTP headers to the request. 10741func (c *ProjectsContentDeidentifyCall) Header() http.Header { 10742 if c.header_ == nil { 10743 c.header_ = make(http.Header) 10744 } 10745 return c.header_ 10746} 10747 10748func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 10749 reqHeaders := make(http.Header) 10750 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10751 for k, v := range c.header_ { 10752 reqHeaders[k] = v 10753 } 10754 reqHeaders.Set("User-Agent", c.s.userAgent()) 10755 var body io.Reader = nil 10756 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 10757 if err != nil { 10758 return nil, err 10759 } 10760 reqHeaders.Set("Content-Type", "application/json") 10761 c.urlParams_.Set("alt", alt) 10762 c.urlParams_.Set("prettyPrint", "false") 10763 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 10764 urls += "?" + c.urlParams_.Encode() 10765 req, err := http.NewRequest("POST", urls, body) 10766 if err != nil { 10767 return nil, err 10768 } 10769 req.Header = reqHeaders 10770 googleapi.Expand(req.URL, map[string]string{ 10771 "parent": c.parent, 10772 }) 10773 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10774} 10775 10776// Do executes the "dlp.projects.content.deidentify" call. 10777// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 10778// will be non-nil. Any non-2xx status code is an error. Response 10779// headers are in either 10780// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 10781// (if a response was returned at all) in 10782// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10783// whether the returned error was because http.StatusNotModified was 10784// returned. 10785func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 10786 gensupport.SetOptions(c.urlParams_, opts...) 10787 res, err := c.doRequest("json") 10788 if res != nil && res.StatusCode == http.StatusNotModified { 10789 if res.Body != nil { 10790 res.Body.Close() 10791 } 10792 return nil, &googleapi.Error{ 10793 Code: res.StatusCode, 10794 Header: res.Header, 10795 } 10796 } 10797 if err != nil { 10798 return nil, err 10799 } 10800 defer googleapi.CloseBody(res) 10801 if err := googleapi.CheckResponse(res); err != nil { 10802 return nil, err 10803 } 10804 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 10805 ServerResponse: googleapi.ServerResponse{ 10806 Header: res.Header, 10807 HTTPStatusCode: res.StatusCode, 10808 }, 10809 } 10810 target := &ret 10811 if err := gensupport.DecodeResponse(target, res); err != nil { 10812 return nil, err 10813 } 10814 return ret, nil 10815 // { 10816 // "description": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\nSee https://cloud.google.com/dlp/docs/deidentify-sensitive-data to\nlearn more.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.", 10817 // "flatPath": "v2/projects/{projectsId}/content:deidentify", 10818 // "httpMethod": "POST", 10819 // "id": "dlp.projects.content.deidentify", 10820 // "parameterOrder": [ 10821 // "parent" 10822 // ], 10823 // "parameters": { 10824 // "parent": { 10825 // "description": "The parent resource name, for example projects/my-project-id.", 10826 // "location": "path", 10827 // "pattern": "^projects/[^/]+$", 10828 // "required": true, 10829 // "type": "string" 10830 // } 10831 // }, 10832 // "path": "v2/{+parent}/content:deidentify", 10833 // "request": { 10834 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 10835 // }, 10836 // "response": { 10837 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 10838 // }, 10839 // "scopes": [ 10840 // "https://www.googleapis.com/auth/cloud-platform" 10841 // ] 10842 // } 10843 10844} 10845 10846// method id "dlp.projects.content.inspect": 10847 10848type ProjectsContentInspectCall struct { 10849 s *Service 10850 parent string 10851 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 10852 urlParams_ gensupport.URLParams 10853 ctx_ context.Context 10854 header_ http.Header 10855} 10856 10857// Inspect: Finds potentially sensitive info in content. 10858// This method has limits on input size, processing time, and output 10859// size. 10860// 10861// When no InfoTypes or CustomInfoTypes are specified in this request, 10862// the 10863// system will automatically choose what detectors to run. By default 10864// this may 10865// be all types, but may change over time as detectors are updated. 10866// 10867// For how to guides, see 10868// https://cloud.google.com/dlp/docs/inspecting-images 10869// and https://cloud.google.com/dlp/docs/inspecting-text, 10870func (r *ProjectsContentService) Inspect(parent string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { 10871 c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10872 c.parent = parent 10873 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 10874 return c 10875} 10876 10877// Fields allows partial responses to be retrieved. See 10878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10879// for more information. 10880func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { 10881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10882 return c 10883} 10884 10885// Context sets the context to be used in this call's Do method. Any 10886// pending HTTP request will be aborted if the provided context is 10887// canceled. 10888func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { 10889 c.ctx_ = ctx 10890 return c 10891} 10892 10893// Header returns an http.Header that can be modified by the caller to 10894// add HTTP headers to the request. 10895func (c *ProjectsContentInspectCall) Header() http.Header { 10896 if c.header_ == nil { 10897 c.header_ = make(http.Header) 10898 } 10899 return c.header_ 10900} 10901 10902func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { 10903 reqHeaders := make(http.Header) 10904 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10905 for k, v := range c.header_ { 10906 reqHeaders[k] = v 10907 } 10908 reqHeaders.Set("User-Agent", c.s.userAgent()) 10909 var body io.Reader = nil 10910 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 10911 if err != nil { 10912 return nil, err 10913 } 10914 reqHeaders.Set("Content-Type", "application/json") 10915 c.urlParams_.Set("alt", alt) 10916 c.urlParams_.Set("prettyPrint", "false") 10917 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 10918 urls += "?" + c.urlParams_.Encode() 10919 req, err := http.NewRequest("POST", urls, body) 10920 if err != nil { 10921 return nil, err 10922 } 10923 req.Header = reqHeaders 10924 googleapi.Expand(req.URL, map[string]string{ 10925 "parent": c.parent, 10926 }) 10927 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10928} 10929 10930// Do executes the "dlp.projects.content.inspect" call. 10931// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 10932// will be non-nil. Any non-2xx status code is an error. Response 10933// headers are in either 10934// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 10935// (if a response was returned at all) in 10936// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10937// whether the returned error was because http.StatusNotModified was 10938// returned. 10939func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 10940 gensupport.SetOptions(c.urlParams_, opts...) 10941 res, err := c.doRequest("json") 10942 if res != nil && res.StatusCode == http.StatusNotModified { 10943 if res.Body != nil { 10944 res.Body.Close() 10945 } 10946 return nil, &googleapi.Error{ 10947 Code: res.StatusCode, 10948 Header: res.Header, 10949 } 10950 } 10951 if err != nil { 10952 return nil, err 10953 } 10954 defer googleapi.CloseBody(res) 10955 if err := googleapi.CheckResponse(res); err != nil { 10956 return nil, err 10957 } 10958 ret := &GooglePrivacyDlpV2InspectContentResponse{ 10959 ServerResponse: googleapi.ServerResponse{ 10960 Header: res.Header, 10961 HTTPStatusCode: res.StatusCode, 10962 }, 10963 } 10964 target := &ret 10965 if err := gensupport.DecodeResponse(target, res); err != nil { 10966 return nil, err 10967 } 10968 return ret, nil 10969 // { 10970 // "description": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.\n\nFor how to guides, see https://cloud.google.com/dlp/docs/inspecting-images\nand https://cloud.google.com/dlp/docs/inspecting-text,", 10971 // "flatPath": "v2/projects/{projectsId}/content:inspect", 10972 // "httpMethod": "POST", 10973 // "id": "dlp.projects.content.inspect", 10974 // "parameterOrder": [ 10975 // "parent" 10976 // ], 10977 // "parameters": { 10978 // "parent": { 10979 // "description": "The parent resource name, for example projects/my-project-id.", 10980 // "location": "path", 10981 // "pattern": "^projects/[^/]+$", 10982 // "required": true, 10983 // "type": "string" 10984 // } 10985 // }, 10986 // "path": "v2/{+parent}/content:inspect", 10987 // "request": { 10988 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 10989 // }, 10990 // "response": { 10991 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 10992 // }, 10993 // "scopes": [ 10994 // "https://www.googleapis.com/auth/cloud-platform" 10995 // ] 10996 // } 10997 10998} 10999 11000// method id "dlp.projects.content.reidentify": 11001 11002type ProjectsContentReidentifyCall struct { 11003 s *Service 11004 parent string 11005 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 11006 urlParams_ gensupport.URLParams 11007 ctx_ context.Context 11008 header_ http.Header 11009} 11010 11011// Reidentify: Re-identifies content that has been 11012// de-identified. 11013// See 11014// https://cloud.google.com/dlp/docs/pseudonymization# 11015// re-identification_in_free_text_code_example 11016// to learn more. 11017func (r *ProjectsContentService) Reidentify(parent string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { 11018 c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11019 c.parent = parent 11020 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 11021 return c 11022} 11023 11024// Fields allows partial responses to be retrieved. See 11025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11026// for more information. 11027func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { 11028 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11029 return c 11030} 11031 11032// Context sets the context to be used in this call's Do method. Any 11033// pending HTTP request will be aborted if the provided context is 11034// canceled. 11035func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { 11036 c.ctx_ = ctx 11037 return c 11038} 11039 11040// Header returns an http.Header that can be modified by the caller to 11041// add HTTP headers to the request. 11042func (c *ProjectsContentReidentifyCall) Header() http.Header { 11043 if c.header_ == nil { 11044 c.header_ = make(http.Header) 11045 } 11046 return c.header_ 11047} 11048 11049func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 11050 reqHeaders := make(http.Header) 11051 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11052 for k, v := range c.header_ { 11053 reqHeaders[k] = v 11054 } 11055 reqHeaders.Set("User-Agent", c.s.userAgent()) 11056 var body io.Reader = nil 11057 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 11058 if err != nil { 11059 return nil, err 11060 } 11061 reqHeaders.Set("Content-Type", "application/json") 11062 c.urlParams_.Set("alt", alt) 11063 c.urlParams_.Set("prettyPrint", "false") 11064 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 11065 urls += "?" + c.urlParams_.Encode() 11066 req, err := http.NewRequest("POST", urls, body) 11067 if err != nil { 11068 return nil, err 11069 } 11070 req.Header = reqHeaders 11071 googleapi.Expand(req.URL, map[string]string{ 11072 "parent": c.parent, 11073 }) 11074 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11075} 11076 11077// Do executes the "dlp.projects.content.reidentify" call. 11078// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 11079// will be non-nil. Any non-2xx status code is an error. Response 11080// headers are in either 11081// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 11082// (if a response was returned at all) in 11083// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11084// whether the returned error was because http.StatusNotModified was 11085// returned. 11086func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 11087 gensupport.SetOptions(c.urlParams_, opts...) 11088 res, err := c.doRequest("json") 11089 if res != nil && res.StatusCode == http.StatusNotModified { 11090 if res.Body != nil { 11091 res.Body.Close() 11092 } 11093 return nil, &googleapi.Error{ 11094 Code: res.StatusCode, 11095 Header: res.Header, 11096 } 11097 } 11098 if err != nil { 11099 return nil, err 11100 } 11101 defer googleapi.CloseBody(res) 11102 if err := googleapi.CheckResponse(res); err != nil { 11103 return nil, err 11104 } 11105 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 11106 ServerResponse: googleapi.ServerResponse{ 11107 Header: res.Header, 11108 HTTPStatusCode: res.StatusCode, 11109 }, 11110 } 11111 target := &ret 11112 if err := gensupport.DecodeResponse(target, res); err != nil { 11113 return nil, err 11114 } 11115 return ret, nil 11116 // { 11117 // "description": "Re-identifies content that has been de-identified.\nSee\nhttps://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example\nto learn more.", 11118 // "flatPath": "v2/projects/{projectsId}/content:reidentify", 11119 // "httpMethod": "POST", 11120 // "id": "dlp.projects.content.reidentify", 11121 // "parameterOrder": [ 11122 // "parent" 11123 // ], 11124 // "parameters": { 11125 // "parent": { 11126 // "description": "Required. The parent resource name.", 11127 // "location": "path", 11128 // "pattern": "^projects/[^/]+$", 11129 // "required": true, 11130 // "type": "string" 11131 // } 11132 // }, 11133 // "path": "v2/{+parent}/content:reidentify", 11134 // "request": { 11135 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 11136 // }, 11137 // "response": { 11138 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 11139 // }, 11140 // "scopes": [ 11141 // "https://www.googleapis.com/auth/cloud-platform" 11142 // ] 11143 // } 11144 11145} 11146 11147// method id "dlp.projects.deidentifyTemplates.create": 11148 11149type ProjectsDeidentifyTemplatesCreateCall struct { 11150 s *Service 11151 parent string 11152 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 11153 urlParams_ gensupport.URLParams 11154 ctx_ context.Context 11155 header_ http.Header 11156} 11157 11158// Create: Creates a DeidentifyTemplate for re-using frequently used 11159// configuration 11160// for de-identifying content, images, and storage. 11161// See https://cloud.google.com/dlp/docs/creating-templates-deid to 11162// learn 11163// more. 11164func (r *ProjectsDeidentifyTemplatesService) Create(parent string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { 11165 c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11166 c.parent = parent 11167 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 11168 return c 11169} 11170 11171// Fields allows partial responses to be retrieved. See 11172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11173// for more information. 11174func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { 11175 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11176 return c 11177} 11178 11179// Context sets the context to be used in this call's Do method. Any 11180// pending HTTP request will be aborted if the provided context is 11181// canceled. 11182func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { 11183 c.ctx_ = ctx 11184 return c 11185} 11186 11187// Header returns an http.Header that can be modified by the caller to 11188// add HTTP headers to the request. 11189func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { 11190 if c.header_ == nil { 11191 c.header_ = make(http.Header) 11192 } 11193 return c.header_ 11194} 11195 11196func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 11197 reqHeaders := make(http.Header) 11198 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11199 for k, v := range c.header_ { 11200 reqHeaders[k] = v 11201 } 11202 reqHeaders.Set("User-Agent", c.s.userAgent()) 11203 var body io.Reader = nil 11204 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 11205 if err != nil { 11206 return nil, err 11207 } 11208 reqHeaders.Set("Content-Type", "application/json") 11209 c.urlParams_.Set("alt", alt) 11210 c.urlParams_.Set("prettyPrint", "false") 11211 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 11212 urls += "?" + c.urlParams_.Encode() 11213 req, err := http.NewRequest("POST", urls, body) 11214 if err != nil { 11215 return nil, err 11216 } 11217 req.Header = reqHeaders 11218 googleapi.Expand(req.URL, map[string]string{ 11219 "parent": c.parent, 11220 }) 11221 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11222} 11223 11224// Do executes the "dlp.projects.deidentifyTemplates.create" call. 11225// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 11226// non-nil. Any non-2xx status code is an error. Response headers are in 11227// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 11228// (if a response was returned at all) in 11229// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11230// whether the returned error was because http.StatusNotModified was 11231// returned. 11232func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 11233 gensupport.SetOptions(c.urlParams_, opts...) 11234 res, err := c.doRequest("json") 11235 if res != nil && res.StatusCode == http.StatusNotModified { 11236 if res.Body != nil { 11237 res.Body.Close() 11238 } 11239 return nil, &googleapi.Error{ 11240 Code: res.StatusCode, 11241 Header: res.Header, 11242 } 11243 } 11244 if err != nil { 11245 return nil, err 11246 } 11247 defer googleapi.CloseBody(res) 11248 if err := googleapi.CheckResponse(res); err != nil { 11249 return nil, err 11250 } 11251 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 11252 ServerResponse: googleapi.ServerResponse{ 11253 Header: res.Header, 11254 HTTPStatusCode: res.StatusCode, 11255 }, 11256 } 11257 target := &ret 11258 if err := gensupport.DecodeResponse(target, res); err != nil { 11259 return nil, err 11260 } 11261 return ret, nil 11262 // { 11263 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration\nfor de-identifying content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 11264 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 11265 // "httpMethod": "POST", 11266 // "id": "dlp.projects.deidentifyTemplates.create", 11267 // "parameterOrder": [ 11268 // "parent" 11269 // ], 11270 // "parameters": { 11271 // "parent": { 11272 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 11273 // "location": "path", 11274 // "pattern": "^projects/[^/]+$", 11275 // "required": true, 11276 // "type": "string" 11277 // } 11278 // }, 11279 // "path": "v2/{+parent}/deidentifyTemplates", 11280 // "request": { 11281 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 11282 // }, 11283 // "response": { 11284 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 11285 // }, 11286 // "scopes": [ 11287 // "https://www.googleapis.com/auth/cloud-platform" 11288 // ] 11289 // } 11290 11291} 11292 11293// method id "dlp.projects.deidentifyTemplates.delete": 11294 11295type ProjectsDeidentifyTemplatesDeleteCall struct { 11296 s *Service 11297 name string 11298 urlParams_ gensupport.URLParams 11299 ctx_ context.Context 11300 header_ http.Header 11301} 11302 11303// Delete: Deletes a DeidentifyTemplate. 11304// See https://cloud.google.com/dlp/docs/creating-templates-deid to 11305// learn 11306// more. 11307func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { 11308 c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11309 c.name = name 11310 return c 11311} 11312 11313// Fields allows partial responses to be retrieved. See 11314// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11315// for more information. 11316func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { 11317 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11318 return c 11319} 11320 11321// Context sets the context to be used in this call's Do method. Any 11322// pending HTTP request will be aborted if the provided context is 11323// canceled. 11324func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { 11325 c.ctx_ = ctx 11326 return c 11327} 11328 11329// Header returns an http.Header that can be modified by the caller to 11330// add HTTP headers to the request. 11331func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { 11332 if c.header_ == nil { 11333 c.header_ = make(http.Header) 11334 } 11335 return c.header_ 11336} 11337 11338func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 11339 reqHeaders := make(http.Header) 11340 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11341 for k, v := range c.header_ { 11342 reqHeaders[k] = v 11343 } 11344 reqHeaders.Set("User-Agent", c.s.userAgent()) 11345 var body io.Reader = nil 11346 c.urlParams_.Set("alt", alt) 11347 c.urlParams_.Set("prettyPrint", "false") 11348 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11349 urls += "?" + c.urlParams_.Encode() 11350 req, err := http.NewRequest("DELETE", urls, body) 11351 if err != nil { 11352 return nil, err 11353 } 11354 req.Header = reqHeaders 11355 googleapi.Expand(req.URL, map[string]string{ 11356 "name": c.name, 11357 }) 11358 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11359} 11360 11361// Do executes the "dlp.projects.deidentifyTemplates.delete" call. 11362// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11363// non-2xx status code is an error. Response headers are in either 11364// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11365// returned at all) in error.(*googleapi.Error).Header. Use 11366// googleapi.IsNotModified to check whether the returned error was 11367// because http.StatusNotModified was returned. 11368func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11369 gensupport.SetOptions(c.urlParams_, opts...) 11370 res, err := c.doRequest("json") 11371 if res != nil && res.StatusCode == http.StatusNotModified { 11372 if res.Body != nil { 11373 res.Body.Close() 11374 } 11375 return nil, &googleapi.Error{ 11376 Code: res.StatusCode, 11377 Header: res.Header, 11378 } 11379 } 11380 if err != nil { 11381 return nil, err 11382 } 11383 defer googleapi.CloseBody(res) 11384 if err := googleapi.CheckResponse(res); err != nil { 11385 return nil, err 11386 } 11387 ret := &GoogleProtobufEmpty{ 11388 ServerResponse: googleapi.ServerResponse{ 11389 Header: res.Header, 11390 HTTPStatusCode: res.StatusCode, 11391 }, 11392 } 11393 target := &ret 11394 if err := gensupport.DecodeResponse(target, res); err != nil { 11395 return nil, err 11396 } 11397 return ret, nil 11398 // { 11399 // "description": "Deletes a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 11400 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 11401 // "httpMethod": "DELETE", 11402 // "id": "dlp.projects.deidentifyTemplates.delete", 11403 // "parameterOrder": [ 11404 // "name" 11405 // ], 11406 // "parameters": { 11407 // "name": { 11408 // "description": "Required. Resource name of the organization and deidentify template to be deleted,\nfor example `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 11409 // "location": "path", 11410 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 11411 // "required": true, 11412 // "type": "string" 11413 // } 11414 // }, 11415 // "path": "v2/{+name}", 11416 // "response": { 11417 // "$ref": "GoogleProtobufEmpty" 11418 // }, 11419 // "scopes": [ 11420 // "https://www.googleapis.com/auth/cloud-platform" 11421 // ] 11422 // } 11423 11424} 11425 11426// method id "dlp.projects.deidentifyTemplates.get": 11427 11428type ProjectsDeidentifyTemplatesGetCall struct { 11429 s *Service 11430 name string 11431 urlParams_ gensupport.URLParams 11432 ifNoneMatch_ string 11433 ctx_ context.Context 11434 header_ http.Header 11435} 11436 11437// Get: Gets a DeidentifyTemplate. 11438// See https://cloud.google.com/dlp/docs/creating-templates-deid to 11439// learn 11440// more. 11441func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { 11442 c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11443 c.name = name 11444 return c 11445} 11446 11447// Fields allows partial responses to be retrieved. See 11448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11449// for more information. 11450func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { 11451 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11452 return c 11453} 11454 11455// IfNoneMatch sets the optional parameter which makes the operation 11456// fail if the object's ETag matches the given value. This is useful for 11457// getting updates only after the object has changed since the last 11458// request. Use googleapi.IsNotModified to check whether the response 11459// error from Do is the result of In-None-Match. 11460func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { 11461 c.ifNoneMatch_ = entityTag 11462 return c 11463} 11464 11465// Context sets the context to be used in this call's Do method. Any 11466// pending HTTP request will be aborted if the provided context is 11467// canceled. 11468func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { 11469 c.ctx_ = ctx 11470 return c 11471} 11472 11473// Header returns an http.Header that can be modified by the caller to 11474// add HTTP headers to the request. 11475func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { 11476 if c.header_ == nil { 11477 c.header_ = make(http.Header) 11478 } 11479 return c.header_ 11480} 11481 11482func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 11483 reqHeaders := make(http.Header) 11484 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11485 for k, v := range c.header_ { 11486 reqHeaders[k] = v 11487 } 11488 reqHeaders.Set("User-Agent", c.s.userAgent()) 11489 if c.ifNoneMatch_ != "" { 11490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11491 } 11492 var body io.Reader = nil 11493 c.urlParams_.Set("alt", alt) 11494 c.urlParams_.Set("prettyPrint", "false") 11495 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11496 urls += "?" + c.urlParams_.Encode() 11497 req, err := http.NewRequest("GET", urls, body) 11498 if err != nil { 11499 return nil, err 11500 } 11501 req.Header = reqHeaders 11502 googleapi.Expand(req.URL, map[string]string{ 11503 "name": c.name, 11504 }) 11505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11506} 11507 11508// Do executes the "dlp.projects.deidentifyTemplates.get" call. 11509// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 11510// non-nil. Any non-2xx status code is an error. Response headers are in 11511// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 11512// (if a response was returned at all) in 11513// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11514// whether the returned error was because http.StatusNotModified was 11515// returned. 11516func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 11517 gensupport.SetOptions(c.urlParams_, opts...) 11518 res, err := c.doRequest("json") 11519 if res != nil && res.StatusCode == http.StatusNotModified { 11520 if res.Body != nil { 11521 res.Body.Close() 11522 } 11523 return nil, &googleapi.Error{ 11524 Code: res.StatusCode, 11525 Header: res.Header, 11526 } 11527 } 11528 if err != nil { 11529 return nil, err 11530 } 11531 defer googleapi.CloseBody(res) 11532 if err := googleapi.CheckResponse(res); err != nil { 11533 return nil, err 11534 } 11535 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 11536 ServerResponse: googleapi.ServerResponse{ 11537 Header: res.Header, 11538 HTTPStatusCode: res.StatusCode, 11539 }, 11540 } 11541 target := &ret 11542 if err := gensupport.DecodeResponse(target, res); err != nil { 11543 return nil, err 11544 } 11545 return ret, nil 11546 // { 11547 // "description": "Gets a DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 11548 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 11549 // "httpMethod": "GET", 11550 // "id": "dlp.projects.deidentifyTemplates.get", 11551 // "parameterOrder": [ 11552 // "name" 11553 // ], 11554 // "parameters": { 11555 // "name": { 11556 // "description": "Required. Resource name of the organization and deidentify template to be read, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 11557 // "location": "path", 11558 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 11559 // "required": true, 11560 // "type": "string" 11561 // } 11562 // }, 11563 // "path": "v2/{+name}", 11564 // "response": { 11565 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 11566 // }, 11567 // "scopes": [ 11568 // "https://www.googleapis.com/auth/cloud-platform" 11569 // ] 11570 // } 11571 11572} 11573 11574// method id "dlp.projects.deidentifyTemplates.list": 11575 11576type ProjectsDeidentifyTemplatesListCall struct { 11577 s *Service 11578 parent string 11579 urlParams_ gensupport.URLParams 11580 ifNoneMatch_ string 11581 ctx_ context.Context 11582 header_ http.Header 11583} 11584 11585// List: Lists DeidentifyTemplates. 11586// See https://cloud.google.com/dlp/docs/creating-templates-deid to 11587// learn 11588// more. 11589func (r *ProjectsDeidentifyTemplatesService) List(parent string) *ProjectsDeidentifyTemplatesListCall { 11590 c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11591 c.parent = parent 11592 return c 11593} 11594 11595// OrderBy sets the optional parameter "orderBy": Optional comma 11596// separated list of fields to order by, 11597// followed by `asc` or `desc` postfix. This list is 11598// case-insensitive, 11599// default sorting order is ascending, redundant space characters 11600// are 11601// insignificant. 11602// 11603// Example: `name asc,update_time, create_time desc` 11604// 11605// Supported fields are: 11606// 11607// - `create_time`: corresponds to time the template was created. 11608// - `update_time`: corresponds to time the template was last updated. 11609// - `name`: corresponds to template's name. 11610// - `display_name`: corresponds to template's display name. 11611func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { 11612 c.urlParams_.Set("orderBy", orderBy) 11613 return c 11614} 11615 11616// PageSize sets the optional parameter "pageSize": Optional size of the 11617// page, can be limited by server. If zero server returns 11618// a page of max size 100. 11619func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { 11620 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11621 return c 11622} 11623 11624// PageToken sets the optional parameter "pageToken": Optional page 11625// token to continue retrieval. Comes from previous call 11626// to `ListDeidentifyTemplates`. 11627func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { 11628 c.urlParams_.Set("pageToken", pageToken) 11629 return c 11630} 11631 11632// Fields allows partial responses to be retrieved. See 11633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11634// for more information. 11635func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { 11636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11637 return c 11638} 11639 11640// IfNoneMatch sets the optional parameter which makes the operation 11641// fail if the object's ETag matches the given value. This is useful for 11642// getting updates only after the object has changed since the last 11643// request. Use googleapi.IsNotModified to check whether the response 11644// error from Do is the result of In-None-Match. 11645func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { 11646 c.ifNoneMatch_ = entityTag 11647 return c 11648} 11649 11650// Context sets the context to be used in this call's Do method. Any 11651// pending HTTP request will be aborted if the provided context is 11652// canceled. 11653func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { 11654 c.ctx_ = ctx 11655 return c 11656} 11657 11658// Header returns an http.Header that can be modified by the caller to 11659// add HTTP headers to the request. 11660func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { 11661 if c.header_ == nil { 11662 c.header_ = make(http.Header) 11663 } 11664 return c.header_ 11665} 11666 11667func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 11668 reqHeaders := make(http.Header) 11669 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11670 for k, v := range c.header_ { 11671 reqHeaders[k] = v 11672 } 11673 reqHeaders.Set("User-Agent", c.s.userAgent()) 11674 if c.ifNoneMatch_ != "" { 11675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11676 } 11677 var body io.Reader = nil 11678 c.urlParams_.Set("alt", alt) 11679 c.urlParams_.Set("prettyPrint", "false") 11680 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 11681 urls += "?" + c.urlParams_.Encode() 11682 req, err := http.NewRequest("GET", urls, body) 11683 if err != nil { 11684 return nil, err 11685 } 11686 req.Header = reqHeaders 11687 googleapi.Expand(req.URL, map[string]string{ 11688 "parent": c.parent, 11689 }) 11690 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11691} 11692 11693// Do executes the "dlp.projects.deidentifyTemplates.list" call. 11694// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 11695// error will be non-nil. Any non-2xx status code is an error. Response 11696// headers are in either 11697// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 11698// er or (if a response was returned at all) in 11699// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11700// whether the returned error was because http.StatusNotModified was 11701// returned. 11702func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 11703 gensupport.SetOptions(c.urlParams_, opts...) 11704 res, err := c.doRequest("json") 11705 if res != nil && res.StatusCode == http.StatusNotModified { 11706 if res.Body != nil { 11707 res.Body.Close() 11708 } 11709 return nil, &googleapi.Error{ 11710 Code: res.StatusCode, 11711 Header: res.Header, 11712 } 11713 } 11714 if err != nil { 11715 return nil, err 11716 } 11717 defer googleapi.CloseBody(res) 11718 if err := googleapi.CheckResponse(res); err != nil { 11719 return nil, err 11720 } 11721 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 11722 ServerResponse: googleapi.ServerResponse{ 11723 Header: res.Header, 11724 HTTPStatusCode: res.StatusCode, 11725 }, 11726 } 11727 target := &ret 11728 if err := gensupport.DecodeResponse(target, res); err != nil { 11729 return nil, err 11730 } 11731 return ret, nil 11732 // { 11733 // "description": "Lists DeidentifyTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 11734 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 11735 // "httpMethod": "GET", 11736 // "id": "dlp.projects.deidentifyTemplates.list", 11737 // "parameterOrder": [ 11738 // "parent" 11739 // ], 11740 // "parameters": { 11741 // "orderBy": { 11742 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the template was created.\n- `update_time`: corresponds to time the template was last updated.\n- `name`: corresponds to template's name.\n- `display_name`: corresponds to template's display name.", 11743 // "location": "query", 11744 // "type": "string" 11745 // }, 11746 // "pageSize": { 11747 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 11748 // "format": "int32", 11749 // "location": "query", 11750 // "type": "integer" 11751 // }, 11752 // "pageToken": { 11753 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListDeidentifyTemplates`.", 11754 // "location": "query", 11755 // "type": "string" 11756 // }, 11757 // "parent": { 11758 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 11759 // "location": "path", 11760 // "pattern": "^projects/[^/]+$", 11761 // "required": true, 11762 // "type": "string" 11763 // } 11764 // }, 11765 // "path": "v2/{+parent}/deidentifyTemplates", 11766 // "response": { 11767 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 11768 // }, 11769 // "scopes": [ 11770 // "https://www.googleapis.com/auth/cloud-platform" 11771 // ] 11772 // } 11773 11774} 11775 11776// Pages invokes f for each page of results. 11777// A non-nil error returned from f will halt the iteration. 11778// The provided context supersedes any context provided to the Context method. 11779func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 11780 c.ctx_ = ctx 11781 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11782 for { 11783 x, err := c.Do() 11784 if err != nil { 11785 return err 11786 } 11787 if err := f(x); err != nil { 11788 return err 11789 } 11790 if x.NextPageToken == "" { 11791 return nil 11792 } 11793 c.PageToken(x.NextPageToken) 11794 } 11795} 11796 11797// method id "dlp.projects.deidentifyTemplates.patch": 11798 11799type ProjectsDeidentifyTemplatesPatchCall struct { 11800 s *Service 11801 name string 11802 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 11803 urlParams_ gensupport.URLParams 11804 ctx_ context.Context 11805 header_ http.Header 11806} 11807 11808// Patch: Updates the DeidentifyTemplate. 11809// See https://cloud.google.com/dlp/docs/creating-templates-deid to 11810// learn 11811// more. 11812func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { 11813 c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11814 c.name = name 11815 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 11816 return c 11817} 11818 11819// Fields allows partial responses to be retrieved. See 11820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11821// for more information. 11822func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { 11823 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11824 return c 11825} 11826 11827// Context sets the context to be used in this call's Do method. Any 11828// pending HTTP request will be aborted if the provided context is 11829// canceled. 11830func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { 11831 c.ctx_ = ctx 11832 return c 11833} 11834 11835// Header returns an http.Header that can be modified by the caller to 11836// add HTTP headers to the request. 11837func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { 11838 if c.header_ == nil { 11839 c.header_ = make(http.Header) 11840 } 11841 return c.header_ 11842} 11843 11844func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 11845 reqHeaders := make(http.Header) 11846 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11847 for k, v := range c.header_ { 11848 reqHeaders[k] = v 11849 } 11850 reqHeaders.Set("User-Agent", c.s.userAgent()) 11851 var body io.Reader = nil 11852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 11853 if err != nil { 11854 return nil, err 11855 } 11856 reqHeaders.Set("Content-Type", "application/json") 11857 c.urlParams_.Set("alt", alt) 11858 c.urlParams_.Set("prettyPrint", "false") 11859 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11860 urls += "?" + c.urlParams_.Encode() 11861 req, err := http.NewRequest("PATCH", urls, body) 11862 if err != nil { 11863 return nil, err 11864 } 11865 req.Header = reqHeaders 11866 googleapi.Expand(req.URL, map[string]string{ 11867 "name": c.name, 11868 }) 11869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11870} 11871 11872// Do executes the "dlp.projects.deidentifyTemplates.patch" call. 11873// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 11874// non-nil. Any non-2xx status code is an error. Response headers are in 11875// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 11876// (if a response was returned at all) in 11877// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11878// whether the returned error was because http.StatusNotModified was 11879// returned. 11880func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 11881 gensupport.SetOptions(c.urlParams_, opts...) 11882 res, err := c.doRequest("json") 11883 if res != nil && res.StatusCode == http.StatusNotModified { 11884 if res.Body != nil { 11885 res.Body.Close() 11886 } 11887 return nil, &googleapi.Error{ 11888 Code: res.StatusCode, 11889 Header: res.Header, 11890 } 11891 } 11892 if err != nil { 11893 return nil, err 11894 } 11895 defer googleapi.CloseBody(res) 11896 if err := googleapi.CheckResponse(res); err != nil { 11897 return nil, err 11898 } 11899 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 11900 ServerResponse: googleapi.ServerResponse{ 11901 Header: res.Header, 11902 HTTPStatusCode: res.StatusCode, 11903 }, 11904 } 11905 target := &ret 11906 if err := gensupport.DecodeResponse(target, res); err != nil { 11907 return nil, err 11908 } 11909 return ret, nil 11910 // { 11911 // "description": "Updates the DeidentifyTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates-deid to learn\nmore.", 11912 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 11913 // "httpMethod": "PATCH", 11914 // "id": "dlp.projects.deidentifyTemplates.patch", 11915 // "parameterOrder": [ 11916 // "name" 11917 // ], 11918 // "parameters": { 11919 // "name": { 11920 // "description": "Required. Resource name of organization and deidentify template to be updated, for\nexample `organizations/433245324/deidentifyTemplates/432452342` or\nprojects/project-id/deidentifyTemplates/432452342.", 11921 // "location": "path", 11922 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 11923 // "required": true, 11924 // "type": "string" 11925 // } 11926 // }, 11927 // "path": "v2/{+name}", 11928 // "request": { 11929 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 11930 // }, 11931 // "response": { 11932 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 11933 // }, 11934 // "scopes": [ 11935 // "https://www.googleapis.com/auth/cloud-platform" 11936 // ] 11937 // } 11938 11939} 11940 11941// method id "dlp.projects.dlpJobs.cancel": 11942 11943type ProjectsDlpJobsCancelCall struct { 11944 s *Service 11945 name string 11946 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 11947 urlParams_ gensupport.URLParams 11948 ctx_ context.Context 11949 header_ http.Header 11950} 11951 11952// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 11953// The server 11954// makes a best effort to cancel the DlpJob, but success is 11955// not 11956// guaranteed. 11957// See https://cloud.google.com/dlp/docs/inspecting-storage 11958// and 11959// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 11960// more. 11961func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { 11962 c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11963 c.name = name 11964 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 11965 return c 11966} 11967 11968// Fields allows partial responses to be retrieved. See 11969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11970// for more information. 11971func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { 11972 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11973 return c 11974} 11975 11976// Context sets the context to be used in this call's Do method. Any 11977// pending HTTP request will be aborted if the provided context is 11978// canceled. 11979func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { 11980 c.ctx_ = ctx 11981 return c 11982} 11983 11984// Header returns an http.Header that can be modified by the caller to 11985// add HTTP headers to the request. 11986func (c *ProjectsDlpJobsCancelCall) Header() http.Header { 11987 if c.header_ == nil { 11988 c.header_ = make(http.Header) 11989 } 11990 return c.header_ 11991} 11992 11993func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 11994 reqHeaders := make(http.Header) 11995 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11996 for k, v := range c.header_ { 11997 reqHeaders[k] = v 11998 } 11999 reqHeaders.Set("User-Agent", c.s.userAgent()) 12000 var body io.Reader = nil 12001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 12002 if err != nil { 12003 return nil, err 12004 } 12005 reqHeaders.Set("Content-Type", "application/json") 12006 c.urlParams_.Set("alt", alt) 12007 c.urlParams_.Set("prettyPrint", "false") 12008 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 12009 urls += "?" + c.urlParams_.Encode() 12010 req, err := http.NewRequest("POST", urls, body) 12011 if err != nil { 12012 return nil, err 12013 } 12014 req.Header = reqHeaders 12015 googleapi.Expand(req.URL, map[string]string{ 12016 "name": c.name, 12017 }) 12018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12019} 12020 12021// Do executes the "dlp.projects.dlpJobs.cancel" call. 12022// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12023// non-2xx status code is an error. Response headers are in either 12024// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12025// returned at all) in error.(*googleapi.Error).Header. Use 12026// googleapi.IsNotModified to check whether the returned error was 12027// because http.StatusNotModified was returned. 12028func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12029 gensupport.SetOptions(c.urlParams_, opts...) 12030 res, err := c.doRequest("json") 12031 if res != nil && res.StatusCode == http.StatusNotModified { 12032 if res.Body != nil { 12033 res.Body.Close() 12034 } 12035 return nil, &googleapi.Error{ 12036 Code: res.StatusCode, 12037 Header: res.Header, 12038 } 12039 } 12040 if err != nil { 12041 return nil, err 12042 } 12043 defer googleapi.CloseBody(res) 12044 if err := googleapi.CheckResponse(res); err != nil { 12045 return nil, err 12046 } 12047 ret := &GoogleProtobufEmpty{ 12048 ServerResponse: googleapi.ServerResponse{ 12049 Header: res.Header, 12050 HTTPStatusCode: res.StatusCode, 12051 }, 12052 } 12053 target := &ret 12054 if err := gensupport.DecodeResponse(target, res); err != nil { 12055 return nil, err 12056 } 12057 return ret, nil 12058 // { 12059 // "description": "Starts asynchronous cancellation on a long-running DlpJob. The server\nmakes a best effort to cancel the DlpJob, but success is not\nguaranteed.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 12060 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", 12061 // "httpMethod": "POST", 12062 // "id": "dlp.projects.dlpJobs.cancel", 12063 // "parameterOrder": [ 12064 // "name" 12065 // ], 12066 // "parameters": { 12067 // "name": { 12068 // "description": "Required. The name of the DlpJob resource to be cancelled.", 12069 // "location": "path", 12070 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 12071 // "required": true, 12072 // "type": "string" 12073 // } 12074 // }, 12075 // "path": "v2/{+name}:cancel", 12076 // "request": { 12077 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 12078 // }, 12079 // "response": { 12080 // "$ref": "GoogleProtobufEmpty" 12081 // }, 12082 // "scopes": [ 12083 // "https://www.googleapis.com/auth/cloud-platform" 12084 // ] 12085 // } 12086 12087} 12088 12089// method id "dlp.projects.dlpJobs.create": 12090 12091type ProjectsDlpJobsCreateCall struct { 12092 s *Service 12093 parent string 12094 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 12095 urlParams_ gensupport.URLParams 12096 ctx_ context.Context 12097 header_ http.Header 12098} 12099 12100// Create: Creates a new job to inspect storage or calculate risk 12101// metrics. 12102// See https://cloud.google.com/dlp/docs/inspecting-storage 12103// and 12104// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 12105// more. 12106// 12107// When no InfoTypes or CustomInfoTypes are specified in inspect jobs, 12108// the 12109// system will automatically choose what detectors to run. By default 12110// this may 12111// be all types, but may change over time as detectors are updated. 12112func (r *ProjectsDlpJobsService) Create(parent string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { 12113 c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12114 c.parent = parent 12115 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 12116 return c 12117} 12118 12119// Fields allows partial responses to be retrieved. See 12120// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12121// for more information. 12122func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { 12123 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12124 return c 12125} 12126 12127// Context sets the context to be used in this call's Do method. Any 12128// pending HTTP request will be aborted if the provided context is 12129// canceled. 12130func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { 12131 c.ctx_ = ctx 12132 return c 12133} 12134 12135// Header returns an http.Header that can be modified by the caller to 12136// add HTTP headers to the request. 12137func (c *ProjectsDlpJobsCreateCall) Header() http.Header { 12138 if c.header_ == nil { 12139 c.header_ = make(http.Header) 12140 } 12141 return c.header_ 12142} 12143 12144func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 12145 reqHeaders := make(http.Header) 12146 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12147 for k, v := range c.header_ { 12148 reqHeaders[k] = v 12149 } 12150 reqHeaders.Set("User-Agent", c.s.userAgent()) 12151 var body io.Reader = nil 12152 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 12153 if err != nil { 12154 return nil, err 12155 } 12156 reqHeaders.Set("Content-Type", "application/json") 12157 c.urlParams_.Set("alt", alt) 12158 c.urlParams_.Set("prettyPrint", "false") 12159 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 12160 urls += "?" + c.urlParams_.Encode() 12161 req, err := http.NewRequest("POST", urls, body) 12162 if err != nil { 12163 return nil, err 12164 } 12165 req.Header = reqHeaders 12166 googleapi.Expand(req.URL, map[string]string{ 12167 "parent": c.parent, 12168 }) 12169 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12170} 12171 12172// Do executes the "dlp.projects.dlpJobs.create" call. 12173// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 12174// Any non-2xx status code is an error. Response headers are in either 12175// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 12176// returned at all) in error.(*googleapi.Error).Header. Use 12177// googleapi.IsNotModified to check whether the returned error was 12178// because http.StatusNotModified was returned. 12179func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 12180 gensupport.SetOptions(c.urlParams_, opts...) 12181 res, err := c.doRequest("json") 12182 if res != nil && res.StatusCode == http.StatusNotModified { 12183 if res.Body != nil { 12184 res.Body.Close() 12185 } 12186 return nil, &googleapi.Error{ 12187 Code: res.StatusCode, 12188 Header: res.Header, 12189 } 12190 } 12191 if err != nil { 12192 return nil, err 12193 } 12194 defer googleapi.CloseBody(res) 12195 if err := googleapi.CheckResponse(res); err != nil { 12196 return nil, err 12197 } 12198 ret := &GooglePrivacyDlpV2DlpJob{ 12199 ServerResponse: googleapi.ServerResponse{ 12200 Header: res.Header, 12201 HTTPStatusCode: res.StatusCode, 12202 }, 12203 } 12204 target := &ret 12205 if err := gensupport.DecodeResponse(target, res); err != nil { 12206 return nil, err 12207 } 12208 return ret, nil 12209 // { 12210 // "description": "Creates a new job to inspect storage or calculate risk metrics.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.\n\nWhen no InfoTypes or CustomInfoTypes are specified in inspect jobs, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.", 12211 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 12212 // "httpMethod": "POST", 12213 // "id": "dlp.projects.dlpJobs.create", 12214 // "parameterOrder": [ 12215 // "parent" 12216 // ], 12217 // "parameters": { 12218 // "parent": { 12219 // "description": "Required. The parent resource name, for example projects/my-project-id.", 12220 // "location": "path", 12221 // "pattern": "^projects/[^/]+$", 12222 // "required": true, 12223 // "type": "string" 12224 // } 12225 // }, 12226 // "path": "v2/{+parent}/dlpJobs", 12227 // "request": { 12228 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 12229 // }, 12230 // "response": { 12231 // "$ref": "GooglePrivacyDlpV2DlpJob" 12232 // }, 12233 // "scopes": [ 12234 // "https://www.googleapis.com/auth/cloud-platform" 12235 // ] 12236 // } 12237 12238} 12239 12240// method id "dlp.projects.dlpJobs.delete": 12241 12242type ProjectsDlpJobsDeleteCall struct { 12243 s *Service 12244 name string 12245 urlParams_ gensupport.URLParams 12246 ctx_ context.Context 12247 header_ http.Header 12248} 12249 12250// Delete: Deletes a long-running DlpJob. This method indicates that the 12251// client is 12252// no longer interested in the DlpJob result. The job will be cancelled 12253// if 12254// possible. 12255// See https://cloud.google.com/dlp/docs/inspecting-storage 12256// and 12257// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 12258// more. 12259func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { 12260 c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12261 c.name = name 12262 return c 12263} 12264 12265// Fields allows partial responses to be retrieved. See 12266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12267// for more information. 12268func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { 12269 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12270 return c 12271} 12272 12273// Context sets the context to be used in this call's Do method. Any 12274// pending HTTP request will be aborted if the provided context is 12275// canceled. 12276func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { 12277 c.ctx_ = ctx 12278 return c 12279} 12280 12281// Header returns an http.Header that can be modified by the caller to 12282// add HTTP headers to the request. 12283func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { 12284 if c.header_ == nil { 12285 c.header_ = make(http.Header) 12286 } 12287 return c.header_ 12288} 12289 12290func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 12291 reqHeaders := make(http.Header) 12292 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12293 for k, v := range c.header_ { 12294 reqHeaders[k] = v 12295 } 12296 reqHeaders.Set("User-Agent", c.s.userAgent()) 12297 var body io.Reader = nil 12298 c.urlParams_.Set("alt", alt) 12299 c.urlParams_.Set("prettyPrint", "false") 12300 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12301 urls += "?" + c.urlParams_.Encode() 12302 req, err := http.NewRequest("DELETE", urls, body) 12303 if err != nil { 12304 return nil, err 12305 } 12306 req.Header = reqHeaders 12307 googleapi.Expand(req.URL, map[string]string{ 12308 "name": c.name, 12309 }) 12310 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12311} 12312 12313// Do executes the "dlp.projects.dlpJobs.delete" call. 12314// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12315// non-2xx status code is an error. Response headers are in either 12316// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12317// returned at all) in error.(*googleapi.Error).Header. Use 12318// googleapi.IsNotModified to check whether the returned error was 12319// because http.StatusNotModified was returned. 12320func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12321 gensupport.SetOptions(c.urlParams_, opts...) 12322 res, err := c.doRequest("json") 12323 if res != nil && res.StatusCode == http.StatusNotModified { 12324 if res.Body != nil { 12325 res.Body.Close() 12326 } 12327 return nil, &googleapi.Error{ 12328 Code: res.StatusCode, 12329 Header: res.Header, 12330 } 12331 } 12332 if err != nil { 12333 return nil, err 12334 } 12335 defer googleapi.CloseBody(res) 12336 if err := googleapi.CheckResponse(res); err != nil { 12337 return nil, err 12338 } 12339 ret := &GoogleProtobufEmpty{ 12340 ServerResponse: googleapi.ServerResponse{ 12341 Header: res.Header, 12342 HTTPStatusCode: res.StatusCode, 12343 }, 12344 } 12345 target := &ret 12346 if err := gensupport.DecodeResponse(target, res); err != nil { 12347 return nil, err 12348 } 12349 return ret, nil 12350 // { 12351 // "description": "Deletes a long-running DlpJob. This method indicates that the client is\nno longer interested in the DlpJob result. The job will be cancelled if\npossible.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 12352 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 12353 // "httpMethod": "DELETE", 12354 // "id": "dlp.projects.dlpJobs.delete", 12355 // "parameterOrder": [ 12356 // "name" 12357 // ], 12358 // "parameters": { 12359 // "name": { 12360 // "description": "Required. The name of the DlpJob resource to be deleted.", 12361 // "location": "path", 12362 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 12363 // "required": true, 12364 // "type": "string" 12365 // } 12366 // }, 12367 // "path": "v2/{+name}", 12368 // "response": { 12369 // "$ref": "GoogleProtobufEmpty" 12370 // }, 12371 // "scopes": [ 12372 // "https://www.googleapis.com/auth/cloud-platform" 12373 // ] 12374 // } 12375 12376} 12377 12378// method id "dlp.projects.dlpJobs.get": 12379 12380type ProjectsDlpJobsGetCall struct { 12381 s *Service 12382 name string 12383 urlParams_ gensupport.URLParams 12384 ifNoneMatch_ string 12385 ctx_ context.Context 12386 header_ http.Header 12387} 12388 12389// Get: Gets the latest state of a long-running DlpJob. 12390// See https://cloud.google.com/dlp/docs/inspecting-storage 12391// and 12392// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 12393// more. 12394func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { 12395 c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12396 c.name = name 12397 return c 12398} 12399 12400// Fields allows partial responses to be retrieved. See 12401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12402// for more information. 12403func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { 12404 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12405 return c 12406} 12407 12408// IfNoneMatch sets the optional parameter which makes the operation 12409// fail if the object's ETag matches the given value. This is useful for 12410// getting updates only after the object has changed since the last 12411// request. Use googleapi.IsNotModified to check whether the response 12412// error from Do is the result of In-None-Match. 12413func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { 12414 c.ifNoneMatch_ = entityTag 12415 return c 12416} 12417 12418// Context sets the context to be used in this call's Do method. Any 12419// pending HTTP request will be aborted if the provided context is 12420// canceled. 12421func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { 12422 c.ctx_ = ctx 12423 return c 12424} 12425 12426// Header returns an http.Header that can be modified by the caller to 12427// add HTTP headers to the request. 12428func (c *ProjectsDlpJobsGetCall) Header() http.Header { 12429 if c.header_ == nil { 12430 c.header_ = make(http.Header) 12431 } 12432 return c.header_ 12433} 12434 12435func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 12436 reqHeaders := make(http.Header) 12437 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12438 for k, v := range c.header_ { 12439 reqHeaders[k] = v 12440 } 12441 reqHeaders.Set("User-Agent", c.s.userAgent()) 12442 if c.ifNoneMatch_ != "" { 12443 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12444 } 12445 var body io.Reader = nil 12446 c.urlParams_.Set("alt", alt) 12447 c.urlParams_.Set("prettyPrint", "false") 12448 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12449 urls += "?" + c.urlParams_.Encode() 12450 req, err := http.NewRequest("GET", urls, body) 12451 if err != nil { 12452 return nil, err 12453 } 12454 req.Header = reqHeaders 12455 googleapi.Expand(req.URL, map[string]string{ 12456 "name": c.name, 12457 }) 12458 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12459} 12460 12461// Do executes the "dlp.projects.dlpJobs.get" call. 12462// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 12463// Any non-2xx status code is an error. Response headers are in either 12464// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 12465// returned at all) in error.(*googleapi.Error).Header. Use 12466// googleapi.IsNotModified to check whether the returned error was 12467// because http.StatusNotModified was returned. 12468func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 12469 gensupport.SetOptions(c.urlParams_, opts...) 12470 res, err := c.doRequest("json") 12471 if res != nil && res.StatusCode == http.StatusNotModified { 12472 if res.Body != nil { 12473 res.Body.Close() 12474 } 12475 return nil, &googleapi.Error{ 12476 Code: res.StatusCode, 12477 Header: res.Header, 12478 } 12479 } 12480 if err != nil { 12481 return nil, err 12482 } 12483 defer googleapi.CloseBody(res) 12484 if err := googleapi.CheckResponse(res); err != nil { 12485 return nil, err 12486 } 12487 ret := &GooglePrivacyDlpV2DlpJob{ 12488 ServerResponse: googleapi.ServerResponse{ 12489 Header: res.Header, 12490 HTTPStatusCode: res.StatusCode, 12491 }, 12492 } 12493 target := &ret 12494 if err := gensupport.DecodeResponse(target, res); err != nil { 12495 return nil, err 12496 } 12497 return ret, nil 12498 // { 12499 // "description": "Gets the latest state of a long-running DlpJob.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 12500 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 12501 // "httpMethod": "GET", 12502 // "id": "dlp.projects.dlpJobs.get", 12503 // "parameterOrder": [ 12504 // "name" 12505 // ], 12506 // "parameters": { 12507 // "name": { 12508 // "description": "Required. The name of the DlpJob resource.", 12509 // "location": "path", 12510 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 12511 // "required": true, 12512 // "type": "string" 12513 // } 12514 // }, 12515 // "path": "v2/{+name}", 12516 // "response": { 12517 // "$ref": "GooglePrivacyDlpV2DlpJob" 12518 // }, 12519 // "scopes": [ 12520 // "https://www.googleapis.com/auth/cloud-platform" 12521 // ] 12522 // } 12523 12524} 12525 12526// method id "dlp.projects.dlpJobs.list": 12527 12528type ProjectsDlpJobsListCall struct { 12529 s *Service 12530 parent string 12531 urlParams_ gensupport.URLParams 12532 ifNoneMatch_ string 12533 ctx_ context.Context 12534 header_ http.Header 12535} 12536 12537// List: Lists DlpJobs that match the specified filter in the 12538// request. 12539// See https://cloud.google.com/dlp/docs/inspecting-storage 12540// and 12541// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 12542// more. 12543func (r *ProjectsDlpJobsService) List(parent string) *ProjectsDlpJobsListCall { 12544 c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12545 c.parent = parent 12546 return c 12547} 12548 12549// Filter sets the optional parameter "filter": Allows 12550// filtering. 12551// 12552// Supported syntax: 12553// 12554// * Filter expressions are made up of one or more restrictions. 12555// * Restrictions can be combined by `AND` or `OR` logical operators. 12556// A 12557// sequence of restrictions implicitly uses `AND`. 12558// * A restriction has the form of `<field> <operator> <value>`. 12559// * Supported fields/values for inspect jobs: 12560// - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED 12561// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY 12562// - `trigger_name` - The resource name of the trigger that created 12563// job. 12564// - 'end_time` - Corresponds to time the job finished. 12565// - 'start_time` - Corresponds to time the job finished. 12566// * Supported fields for risk analysis jobs: 12567// - `state` - RUNNING|CANCELED|FINISHED|FAILED 12568// - 'end_time` - Corresponds to time the job finished. 12569// - 'start_time` - Corresponds to time the job finished. 12570// * The operator must be `=` or `!=`. 12571// 12572// Examples: 12573// 12574// * inspected_storage = cloud_storage AND state = done 12575// * inspected_storage = cloud_storage OR inspected_storage = bigquery 12576// * inspected_storage = cloud_storage AND (state = done OR state = 12577// canceled) 12578// * end_time > \"2017-12-12T00:00:00+00:00\" 12579// 12580// The length of this field should be no more than 500 characters. 12581func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { 12582 c.urlParams_.Set("filter", filter) 12583 return c 12584} 12585 12586// OrderBy sets the optional parameter "orderBy": Optional comma 12587// separated list of fields to order by, 12588// followed by `asc` or `desc` postfix. This list is 12589// case-insensitive, 12590// default sorting order is ascending, redundant space characters 12591// are 12592// insignificant. 12593// 12594// Example: `name asc, end_time asc, create_time desc` 12595// 12596// Supported fields are: 12597// 12598// - `create_time`: corresponds to time the job was created. 12599// - `end_time`: corresponds to time the job ended. 12600// - `name`: corresponds to job's name. 12601// - `state`: corresponds to `state` 12602func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { 12603 c.urlParams_.Set("orderBy", orderBy) 12604 return c 12605} 12606 12607// PageSize sets the optional parameter "pageSize": The standard list 12608// page size. 12609func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { 12610 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12611 return c 12612} 12613 12614// PageToken sets the optional parameter "pageToken": The standard list 12615// page token. 12616func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { 12617 c.urlParams_.Set("pageToken", pageToken) 12618 return c 12619} 12620 12621// Type sets the optional parameter "type": The type of job. Defaults to 12622// `DlpJobType.INSPECT` 12623// 12624// Possible values: 12625// "DLP_JOB_TYPE_UNSPECIFIED" 12626// "INSPECT_JOB" 12627// "RISK_ANALYSIS_JOB" 12628func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { 12629 c.urlParams_.Set("type", type_) 12630 return c 12631} 12632 12633// Fields allows partial responses to be retrieved. See 12634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12635// for more information. 12636func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { 12637 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12638 return c 12639} 12640 12641// IfNoneMatch sets the optional parameter which makes the operation 12642// fail if the object's ETag matches the given value. This is useful for 12643// getting updates only after the object has changed since the last 12644// request. Use googleapi.IsNotModified to check whether the response 12645// error from Do is the result of In-None-Match. 12646func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { 12647 c.ifNoneMatch_ = entityTag 12648 return c 12649} 12650 12651// Context sets the context to be used in this call's Do method. Any 12652// pending HTTP request will be aborted if the provided context is 12653// canceled. 12654func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { 12655 c.ctx_ = ctx 12656 return c 12657} 12658 12659// Header returns an http.Header that can be modified by the caller to 12660// add HTTP headers to the request. 12661func (c *ProjectsDlpJobsListCall) Header() http.Header { 12662 if c.header_ == nil { 12663 c.header_ = make(http.Header) 12664 } 12665 return c.header_ 12666} 12667 12668func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 12669 reqHeaders := make(http.Header) 12670 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12671 for k, v := range c.header_ { 12672 reqHeaders[k] = v 12673 } 12674 reqHeaders.Set("User-Agent", c.s.userAgent()) 12675 if c.ifNoneMatch_ != "" { 12676 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12677 } 12678 var body io.Reader = nil 12679 c.urlParams_.Set("alt", alt) 12680 c.urlParams_.Set("prettyPrint", "false") 12681 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 12682 urls += "?" + c.urlParams_.Encode() 12683 req, err := http.NewRequest("GET", urls, body) 12684 if err != nil { 12685 return nil, err 12686 } 12687 req.Header = reqHeaders 12688 googleapi.Expand(req.URL, map[string]string{ 12689 "parent": c.parent, 12690 }) 12691 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12692} 12693 12694// Do executes the "dlp.projects.dlpJobs.list" call. 12695// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 12696// be non-nil. Any non-2xx status code is an error. Response headers are 12697// in either 12698// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 12699// response was returned at all) in error.(*googleapi.Error).Header. Use 12700// googleapi.IsNotModified to check whether the returned error was 12701// because http.StatusNotModified was returned. 12702func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 12703 gensupport.SetOptions(c.urlParams_, opts...) 12704 res, err := c.doRequest("json") 12705 if res != nil && res.StatusCode == http.StatusNotModified { 12706 if res.Body != nil { 12707 res.Body.Close() 12708 } 12709 return nil, &googleapi.Error{ 12710 Code: res.StatusCode, 12711 Header: res.Header, 12712 } 12713 } 12714 if err != nil { 12715 return nil, err 12716 } 12717 defer googleapi.CloseBody(res) 12718 if err := googleapi.CheckResponse(res); err != nil { 12719 return nil, err 12720 } 12721 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 12722 ServerResponse: googleapi.ServerResponse{ 12723 Header: res.Header, 12724 HTTPStatusCode: res.StatusCode, 12725 }, 12726 } 12727 target := &ret 12728 if err := gensupport.DecodeResponse(target, res); err != nil { 12729 return nil, err 12730 } 12731 return ret, nil 12732 // { 12733 // "description": "Lists DlpJobs that match the specified filter in the request.\nSee https://cloud.google.com/dlp/docs/inspecting-storage and\nhttps://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 12734 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 12735 // "httpMethod": "GET", 12736 // "id": "dlp.projects.dlpJobs.list", 12737 // "parameterOrder": [ 12738 // "parent" 12739 // ], 12740 // "parameters": { 12741 // "filter": { 12742 // "description": "Optional. Allows filtering.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `\u003cfield\u003e \u003coperator\u003e \u003cvalue\u003e`.\n* Supported fields/values for inspect jobs:\n - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED\n - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY\n - `trigger_name` - The resource name of the trigger that created job.\n - 'end_time` - Corresponds to time the job finished.\n - 'start_time` - Corresponds to time the job finished.\n* Supported fields for risk analysis jobs:\n - `state` - RUNNING|CANCELED|FINISHED|FAILED\n - 'end_time` - Corresponds to time the job finished.\n - 'start_time` - Corresponds to time the job finished.\n* The operator must be `=` or `!=`.\n\nExamples:\n\n* inspected_storage = cloud_storage AND state = done\n* inspected_storage = cloud_storage OR inspected_storage = bigquery\n* inspected_storage = cloud_storage AND (state = done OR state = canceled)\n* end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\"\n\nThe length of this field should be no more than 500 characters.", 12743 // "location": "query", 12744 // "type": "string" 12745 // }, 12746 // "orderBy": { 12747 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc, end_time asc, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the job was created.\n- `end_time`: corresponds to time the job ended.\n- `name`: corresponds to job's name.\n- `state`: corresponds to `state`", 12748 // "location": "query", 12749 // "type": "string" 12750 // }, 12751 // "pageSize": { 12752 // "description": "The standard list page size.", 12753 // "format": "int32", 12754 // "location": "query", 12755 // "type": "integer" 12756 // }, 12757 // "pageToken": { 12758 // "description": "The standard list page token.", 12759 // "location": "query", 12760 // "type": "string" 12761 // }, 12762 // "parent": { 12763 // "description": "Required. The parent resource name, for example projects/my-project-id.", 12764 // "location": "path", 12765 // "pattern": "^projects/[^/]+$", 12766 // "required": true, 12767 // "type": "string" 12768 // }, 12769 // "type": { 12770 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 12771 // "enum": [ 12772 // "DLP_JOB_TYPE_UNSPECIFIED", 12773 // "INSPECT_JOB", 12774 // "RISK_ANALYSIS_JOB" 12775 // ], 12776 // "location": "query", 12777 // "type": "string" 12778 // } 12779 // }, 12780 // "path": "v2/{+parent}/dlpJobs", 12781 // "response": { 12782 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 12783 // }, 12784 // "scopes": [ 12785 // "https://www.googleapis.com/auth/cloud-platform" 12786 // ] 12787 // } 12788 12789} 12790 12791// Pages invokes f for each page of results. 12792// A non-nil error returned from f will halt the iteration. 12793// The provided context supersedes any context provided to the Context method. 12794func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 12795 c.ctx_ = ctx 12796 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12797 for { 12798 x, err := c.Do() 12799 if err != nil { 12800 return err 12801 } 12802 if err := f(x); err != nil { 12803 return err 12804 } 12805 if x.NextPageToken == "" { 12806 return nil 12807 } 12808 c.PageToken(x.NextPageToken) 12809 } 12810} 12811 12812// method id "dlp.projects.image.redact": 12813 12814type ProjectsImageRedactCall struct { 12815 s *Service 12816 parent string 12817 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 12818 urlParams_ gensupport.URLParams 12819 ctx_ context.Context 12820 header_ http.Header 12821} 12822 12823// Redact: Redacts potentially sensitive info from an image. 12824// This method has limits on input size, processing time, and output 12825// size. 12826// See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images 12827// to 12828// learn more. 12829// 12830// When no InfoTypes or CustomInfoTypes are specified in this request, 12831// the 12832// system will automatically choose what detectors to run. By default 12833// this may 12834// be all types, but may change over time as detectors are updated. 12835func (r *ProjectsImageService) Redact(parent string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { 12836 c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12837 c.parent = parent 12838 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 12839 return c 12840} 12841 12842// Fields allows partial responses to be retrieved. See 12843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12844// for more information. 12845func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { 12846 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12847 return c 12848} 12849 12850// Context sets the context to be used in this call's Do method. Any 12851// pending HTTP request will be aborted if the provided context is 12852// canceled. 12853func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { 12854 c.ctx_ = ctx 12855 return c 12856} 12857 12858// Header returns an http.Header that can be modified by the caller to 12859// add HTTP headers to the request. 12860func (c *ProjectsImageRedactCall) Header() http.Header { 12861 if c.header_ == nil { 12862 c.header_ = make(http.Header) 12863 } 12864 return c.header_ 12865} 12866 12867func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { 12868 reqHeaders := make(http.Header) 12869 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12870 for k, v := range c.header_ { 12871 reqHeaders[k] = v 12872 } 12873 reqHeaders.Set("User-Agent", c.s.userAgent()) 12874 var body io.Reader = nil 12875 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 12876 if err != nil { 12877 return nil, err 12878 } 12879 reqHeaders.Set("Content-Type", "application/json") 12880 c.urlParams_.Set("alt", alt) 12881 c.urlParams_.Set("prettyPrint", "false") 12882 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 12883 urls += "?" + c.urlParams_.Encode() 12884 req, err := http.NewRequest("POST", urls, body) 12885 if err != nil { 12886 return nil, err 12887 } 12888 req.Header = reqHeaders 12889 googleapi.Expand(req.URL, map[string]string{ 12890 "parent": c.parent, 12891 }) 12892 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12893} 12894 12895// Do executes the "dlp.projects.image.redact" call. 12896// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 12897// be non-nil. Any non-2xx status code is an error. Response headers are 12898// in either 12899// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 12900// response was returned at all) in error.(*googleapi.Error).Header. Use 12901// googleapi.IsNotModified to check whether the returned error was 12902// because http.StatusNotModified was returned. 12903func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 12904 gensupport.SetOptions(c.urlParams_, opts...) 12905 res, err := c.doRequest("json") 12906 if res != nil && res.StatusCode == http.StatusNotModified { 12907 if res.Body != nil { 12908 res.Body.Close() 12909 } 12910 return nil, &googleapi.Error{ 12911 Code: res.StatusCode, 12912 Header: res.Header, 12913 } 12914 } 12915 if err != nil { 12916 return nil, err 12917 } 12918 defer googleapi.CloseBody(res) 12919 if err := googleapi.CheckResponse(res); err != nil { 12920 return nil, err 12921 } 12922 ret := &GooglePrivacyDlpV2RedactImageResponse{ 12923 ServerResponse: googleapi.ServerResponse{ 12924 Header: res.Header, 12925 HTTPStatusCode: res.StatusCode, 12926 }, 12927 } 12928 target := &ret 12929 if err := gensupport.DecodeResponse(target, res); err != nil { 12930 return nil, err 12931 } 12932 return ret, nil 12933 // { 12934 // "description": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\nSee https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to\nlearn more.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.", 12935 // "flatPath": "v2/projects/{projectsId}/image:redact", 12936 // "httpMethod": "POST", 12937 // "id": "dlp.projects.image.redact", 12938 // "parameterOrder": [ 12939 // "parent" 12940 // ], 12941 // "parameters": { 12942 // "parent": { 12943 // "description": "The parent resource name, for example projects/my-project-id.", 12944 // "location": "path", 12945 // "pattern": "^projects/[^/]+$", 12946 // "required": true, 12947 // "type": "string" 12948 // } 12949 // }, 12950 // "path": "v2/{+parent}/image:redact", 12951 // "request": { 12952 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 12953 // }, 12954 // "response": { 12955 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 12956 // }, 12957 // "scopes": [ 12958 // "https://www.googleapis.com/auth/cloud-platform" 12959 // ] 12960 // } 12961 12962} 12963 12964// method id "dlp.projects.inspectTemplates.create": 12965 12966type ProjectsInspectTemplatesCreateCall struct { 12967 s *Service 12968 parent string 12969 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 12970 urlParams_ gensupport.URLParams 12971 ctx_ context.Context 12972 header_ http.Header 12973} 12974 12975// Create: Creates an InspectTemplate for re-using frequently used 12976// configuration 12977// for inspecting content, images, and storage. 12978// See https://cloud.google.com/dlp/docs/creating-templates to learn 12979// more. 12980func (r *ProjectsInspectTemplatesService) Create(parent string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { 12981 c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12982 c.parent = parent 12983 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 12984 return c 12985} 12986 12987// Fields allows partial responses to be retrieved. See 12988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12989// for more information. 12990func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { 12991 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12992 return c 12993} 12994 12995// Context sets the context to be used in this call's Do method. Any 12996// pending HTTP request will be aborted if the provided context is 12997// canceled. 12998func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { 12999 c.ctx_ = ctx 13000 return c 13001} 13002 13003// Header returns an http.Header that can be modified by the caller to 13004// add HTTP headers to the request. 13005func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { 13006 if c.header_ == nil { 13007 c.header_ = make(http.Header) 13008 } 13009 return c.header_ 13010} 13011 13012func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 13013 reqHeaders := make(http.Header) 13014 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13015 for k, v := range c.header_ { 13016 reqHeaders[k] = v 13017 } 13018 reqHeaders.Set("User-Agent", c.s.userAgent()) 13019 var body io.Reader = nil 13020 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 13021 if err != nil { 13022 return nil, err 13023 } 13024 reqHeaders.Set("Content-Type", "application/json") 13025 c.urlParams_.Set("alt", alt) 13026 c.urlParams_.Set("prettyPrint", "false") 13027 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 13028 urls += "?" + c.urlParams_.Encode() 13029 req, err := http.NewRequest("POST", urls, body) 13030 if err != nil { 13031 return nil, err 13032 } 13033 req.Header = reqHeaders 13034 googleapi.Expand(req.URL, map[string]string{ 13035 "parent": c.parent, 13036 }) 13037 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13038} 13039 13040// Do executes the "dlp.projects.inspectTemplates.create" call. 13041// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 13042// non-nil. Any non-2xx status code is an error. Response headers are in 13043// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 13044// (if a response was returned at all) in 13045// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13046// whether the returned error was because http.StatusNotModified was 13047// returned. 13048func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 13049 gensupport.SetOptions(c.urlParams_, opts...) 13050 res, err := c.doRequest("json") 13051 if res != nil && res.StatusCode == http.StatusNotModified { 13052 if res.Body != nil { 13053 res.Body.Close() 13054 } 13055 return nil, &googleapi.Error{ 13056 Code: res.StatusCode, 13057 Header: res.Header, 13058 } 13059 } 13060 if err != nil { 13061 return nil, err 13062 } 13063 defer googleapi.CloseBody(res) 13064 if err := googleapi.CheckResponse(res); err != nil { 13065 return nil, err 13066 } 13067 ret := &GooglePrivacyDlpV2InspectTemplate{ 13068 ServerResponse: googleapi.ServerResponse{ 13069 Header: res.Header, 13070 HTTPStatusCode: res.StatusCode, 13071 }, 13072 } 13073 target := &ret 13074 if err := gensupport.DecodeResponse(target, res); err != nil { 13075 return nil, err 13076 } 13077 return ret, nil 13078 // { 13079 // "description": "Creates an InspectTemplate for re-using frequently used configuration\nfor inspecting content, images, and storage.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 13080 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 13081 // "httpMethod": "POST", 13082 // "id": "dlp.projects.inspectTemplates.create", 13083 // "parameterOrder": [ 13084 // "parent" 13085 // ], 13086 // "parameters": { 13087 // "parent": { 13088 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 13089 // "location": "path", 13090 // "pattern": "^projects/[^/]+$", 13091 // "required": true, 13092 // "type": "string" 13093 // } 13094 // }, 13095 // "path": "v2/{+parent}/inspectTemplates", 13096 // "request": { 13097 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 13098 // }, 13099 // "response": { 13100 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 13101 // }, 13102 // "scopes": [ 13103 // "https://www.googleapis.com/auth/cloud-platform" 13104 // ] 13105 // } 13106 13107} 13108 13109// method id "dlp.projects.inspectTemplates.delete": 13110 13111type ProjectsInspectTemplatesDeleteCall struct { 13112 s *Service 13113 name string 13114 urlParams_ gensupport.URLParams 13115 ctx_ context.Context 13116 header_ http.Header 13117} 13118 13119// Delete: Deletes an InspectTemplate. 13120// See https://cloud.google.com/dlp/docs/creating-templates to learn 13121// more. 13122func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { 13123 c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13124 c.name = name 13125 return c 13126} 13127 13128// Fields allows partial responses to be retrieved. See 13129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13130// for more information. 13131func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { 13132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13133 return c 13134} 13135 13136// Context sets the context to be used in this call's Do method. Any 13137// pending HTTP request will be aborted if the provided context is 13138// canceled. 13139func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { 13140 c.ctx_ = ctx 13141 return c 13142} 13143 13144// Header returns an http.Header that can be modified by the caller to 13145// add HTTP headers to the request. 13146func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { 13147 if c.header_ == nil { 13148 c.header_ = make(http.Header) 13149 } 13150 return c.header_ 13151} 13152 13153func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 13154 reqHeaders := make(http.Header) 13155 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13156 for k, v := range c.header_ { 13157 reqHeaders[k] = v 13158 } 13159 reqHeaders.Set("User-Agent", c.s.userAgent()) 13160 var body io.Reader = nil 13161 c.urlParams_.Set("alt", alt) 13162 c.urlParams_.Set("prettyPrint", "false") 13163 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13164 urls += "?" + c.urlParams_.Encode() 13165 req, err := http.NewRequest("DELETE", urls, body) 13166 if err != nil { 13167 return nil, err 13168 } 13169 req.Header = reqHeaders 13170 googleapi.Expand(req.URL, map[string]string{ 13171 "name": c.name, 13172 }) 13173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13174} 13175 13176// Do executes the "dlp.projects.inspectTemplates.delete" call. 13177// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13178// non-2xx status code is an error. Response headers are in either 13179// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13180// returned at all) in error.(*googleapi.Error).Header. Use 13181// googleapi.IsNotModified to check whether the returned error was 13182// because http.StatusNotModified was returned. 13183func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13184 gensupport.SetOptions(c.urlParams_, opts...) 13185 res, err := c.doRequest("json") 13186 if res != nil && res.StatusCode == http.StatusNotModified { 13187 if res.Body != nil { 13188 res.Body.Close() 13189 } 13190 return nil, &googleapi.Error{ 13191 Code: res.StatusCode, 13192 Header: res.Header, 13193 } 13194 } 13195 if err != nil { 13196 return nil, err 13197 } 13198 defer googleapi.CloseBody(res) 13199 if err := googleapi.CheckResponse(res); err != nil { 13200 return nil, err 13201 } 13202 ret := &GoogleProtobufEmpty{ 13203 ServerResponse: googleapi.ServerResponse{ 13204 Header: res.Header, 13205 HTTPStatusCode: res.StatusCode, 13206 }, 13207 } 13208 target := &ret 13209 if err := gensupport.DecodeResponse(target, res); err != nil { 13210 return nil, err 13211 } 13212 return ret, nil 13213 // { 13214 // "description": "Deletes an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 13215 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 13216 // "httpMethod": "DELETE", 13217 // "id": "dlp.projects.inspectTemplates.delete", 13218 // "parameterOrder": [ 13219 // "name" 13220 // ], 13221 // "parameters": { 13222 // "name": { 13223 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 13224 // "location": "path", 13225 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 13226 // "required": true, 13227 // "type": "string" 13228 // } 13229 // }, 13230 // "path": "v2/{+name}", 13231 // "response": { 13232 // "$ref": "GoogleProtobufEmpty" 13233 // }, 13234 // "scopes": [ 13235 // "https://www.googleapis.com/auth/cloud-platform" 13236 // ] 13237 // } 13238 13239} 13240 13241// method id "dlp.projects.inspectTemplates.get": 13242 13243type ProjectsInspectTemplatesGetCall struct { 13244 s *Service 13245 name string 13246 urlParams_ gensupport.URLParams 13247 ifNoneMatch_ string 13248 ctx_ context.Context 13249 header_ http.Header 13250} 13251 13252// Get: Gets an InspectTemplate. 13253// See https://cloud.google.com/dlp/docs/creating-templates to learn 13254// more. 13255func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { 13256 c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13257 c.name = name 13258 return c 13259} 13260 13261// Fields allows partial responses to be retrieved. See 13262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13263// for more information. 13264func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { 13265 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13266 return c 13267} 13268 13269// IfNoneMatch sets the optional parameter which makes the operation 13270// fail if the object's ETag matches the given value. This is useful for 13271// getting updates only after the object has changed since the last 13272// request. Use googleapi.IsNotModified to check whether the response 13273// error from Do is the result of In-None-Match. 13274func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { 13275 c.ifNoneMatch_ = entityTag 13276 return c 13277} 13278 13279// Context sets the context to be used in this call's Do method. Any 13280// pending HTTP request will be aborted if the provided context is 13281// canceled. 13282func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { 13283 c.ctx_ = ctx 13284 return c 13285} 13286 13287// Header returns an http.Header that can be modified by the caller to 13288// add HTTP headers to the request. 13289func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { 13290 if c.header_ == nil { 13291 c.header_ = make(http.Header) 13292 } 13293 return c.header_ 13294} 13295 13296func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 13297 reqHeaders := make(http.Header) 13298 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13299 for k, v := range c.header_ { 13300 reqHeaders[k] = v 13301 } 13302 reqHeaders.Set("User-Agent", c.s.userAgent()) 13303 if c.ifNoneMatch_ != "" { 13304 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13305 } 13306 var body io.Reader = nil 13307 c.urlParams_.Set("alt", alt) 13308 c.urlParams_.Set("prettyPrint", "false") 13309 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13310 urls += "?" + c.urlParams_.Encode() 13311 req, err := http.NewRequest("GET", urls, body) 13312 if err != nil { 13313 return nil, err 13314 } 13315 req.Header = reqHeaders 13316 googleapi.Expand(req.URL, map[string]string{ 13317 "name": c.name, 13318 }) 13319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13320} 13321 13322// Do executes the "dlp.projects.inspectTemplates.get" call. 13323// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 13324// non-nil. Any non-2xx status code is an error. Response headers are in 13325// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 13326// (if a response was returned at all) in 13327// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13328// whether the returned error was because http.StatusNotModified was 13329// returned. 13330func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 13331 gensupport.SetOptions(c.urlParams_, opts...) 13332 res, err := c.doRequest("json") 13333 if res != nil && res.StatusCode == http.StatusNotModified { 13334 if res.Body != nil { 13335 res.Body.Close() 13336 } 13337 return nil, &googleapi.Error{ 13338 Code: res.StatusCode, 13339 Header: res.Header, 13340 } 13341 } 13342 if err != nil { 13343 return nil, err 13344 } 13345 defer googleapi.CloseBody(res) 13346 if err := googleapi.CheckResponse(res); err != nil { 13347 return nil, err 13348 } 13349 ret := &GooglePrivacyDlpV2InspectTemplate{ 13350 ServerResponse: googleapi.ServerResponse{ 13351 Header: res.Header, 13352 HTTPStatusCode: res.StatusCode, 13353 }, 13354 } 13355 target := &ret 13356 if err := gensupport.DecodeResponse(target, res); err != nil { 13357 return nil, err 13358 } 13359 return ret, nil 13360 // { 13361 // "description": "Gets an InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 13362 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 13363 // "httpMethod": "GET", 13364 // "id": "dlp.projects.inspectTemplates.get", 13365 // "parameterOrder": [ 13366 // "name" 13367 // ], 13368 // "parameters": { 13369 // "name": { 13370 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 13371 // "location": "path", 13372 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 13373 // "required": true, 13374 // "type": "string" 13375 // } 13376 // }, 13377 // "path": "v2/{+name}", 13378 // "response": { 13379 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 13380 // }, 13381 // "scopes": [ 13382 // "https://www.googleapis.com/auth/cloud-platform" 13383 // ] 13384 // } 13385 13386} 13387 13388// method id "dlp.projects.inspectTemplates.list": 13389 13390type ProjectsInspectTemplatesListCall struct { 13391 s *Service 13392 parent string 13393 urlParams_ gensupport.URLParams 13394 ifNoneMatch_ string 13395 ctx_ context.Context 13396 header_ http.Header 13397} 13398 13399// List: Lists InspectTemplates. 13400// See https://cloud.google.com/dlp/docs/creating-templates to learn 13401// more. 13402func (r *ProjectsInspectTemplatesService) List(parent string) *ProjectsInspectTemplatesListCall { 13403 c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13404 c.parent = parent 13405 return c 13406} 13407 13408// OrderBy sets the optional parameter "orderBy": Optional comma 13409// separated list of fields to order by, 13410// followed by `asc` or `desc` postfix. This list is 13411// case-insensitive, 13412// default sorting order is ascending, redundant space characters 13413// are 13414// insignificant. 13415// 13416// Example: `name asc,update_time, create_time desc` 13417// 13418// Supported fields are: 13419// 13420// - `create_time`: corresponds to time the template was created. 13421// - `update_time`: corresponds to time the template was last updated. 13422// - `name`: corresponds to template's name. 13423// - `display_name`: corresponds to template's display name. 13424func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { 13425 c.urlParams_.Set("orderBy", orderBy) 13426 return c 13427} 13428 13429// PageSize sets the optional parameter "pageSize": Optional size of the 13430// page, can be limited by server. If zero server returns 13431// a page of max size 100. 13432func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { 13433 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13434 return c 13435} 13436 13437// PageToken sets the optional parameter "pageToken": Optional page 13438// token to continue retrieval. Comes from previous call 13439// to `ListInspectTemplates`. 13440func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { 13441 c.urlParams_.Set("pageToken", pageToken) 13442 return c 13443} 13444 13445// Fields allows partial responses to be retrieved. See 13446// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13447// for more information. 13448func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { 13449 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13450 return c 13451} 13452 13453// IfNoneMatch sets the optional parameter which makes the operation 13454// fail if the object's ETag matches the given value. This is useful for 13455// getting updates only after the object has changed since the last 13456// request. Use googleapi.IsNotModified to check whether the response 13457// error from Do is the result of In-None-Match. 13458func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { 13459 c.ifNoneMatch_ = entityTag 13460 return c 13461} 13462 13463// Context sets the context to be used in this call's Do method. Any 13464// pending HTTP request will be aborted if the provided context is 13465// canceled. 13466func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { 13467 c.ctx_ = ctx 13468 return c 13469} 13470 13471// Header returns an http.Header that can be modified by the caller to 13472// add HTTP headers to the request. 13473func (c *ProjectsInspectTemplatesListCall) Header() http.Header { 13474 if c.header_ == nil { 13475 c.header_ = make(http.Header) 13476 } 13477 return c.header_ 13478} 13479 13480func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 13481 reqHeaders := make(http.Header) 13482 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13483 for k, v := range c.header_ { 13484 reqHeaders[k] = v 13485 } 13486 reqHeaders.Set("User-Agent", c.s.userAgent()) 13487 if c.ifNoneMatch_ != "" { 13488 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13489 } 13490 var body io.Reader = nil 13491 c.urlParams_.Set("alt", alt) 13492 c.urlParams_.Set("prettyPrint", "false") 13493 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 13494 urls += "?" + c.urlParams_.Encode() 13495 req, err := http.NewRequest("GET", urls, body) 13496 if err != nil { 13497 return nil, err 13498 } 13499 req.Header = reqHeaders 13500 googleapi.Expand(req.URL, map[string]string{ 13501 "parent": c.parent, 13502 }) 13503 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13504} 13505 13506// Do executes the "dlp.projects.inspectTemplates.list" call. 13507// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 13508// error will be non-nil. Any non-2xx status code is an error. Response 13509// headers are in either 13510// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 13511// or (if a response was returned at all) in 13512// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13513// whether the returned error was because http.StatusNotModified was 13514// returned. 13515func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 13516 gensupport.SetOptions(c.urlParams_, opts...) 13517 res, err := c.doRequest("json") 13518 if res != nil && res.StatusCode == http.StatusNotModified { 13519 if res.Body != nil { 13520 res.Body.Close() 13521 } 13522 return nil, &googleapi.Error{ 13523 Code: res.StatusCode, 13524 Header: res.Header, 13525 } 13526 } 13527 if err != nil { 13528 return nil, err 13529 } 13530 defer googleapi.CloseBody(res) 13531 if err := googleapi.CheckResponse(res); err != nil { 13532 return nil, err 13533 } 13534 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 13535 ServerResponse: googleapi.ServerResponse{ 13536 Header: res.Header, 13537 HTTPStatusCode: res.StatusCode, 13538 }, 13539 } 13540 target := &ret 13541 if err := gensupport.DecodeResponse(target, res); err != nil { 13542 return nil, err 13543 } 13544 return ret, nil 13545 // { 13546 // "description": "Lists InspectTemplates.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 13547 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 13548 // "httpMethod": "GET", 13549 // "id": "dlp.projects.inspectTemplates.list", 13550 // "parameterOrder": [ 13551 // "parent" 13552 // ], 13553 // "parameters": { 13554 // "orderBy": { 13555 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the template was created.\n- `update_time`: corresponds to time the template was last updated.\n- `name`: corresponds to template's name.\n- `display_name`: corresponds to template's display name.", 13556 // "location": "query", 13557 // "type": "string" 13558 // }, 13559 // "pageSize": { 13560 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 13561 // "format": "int32", 13562 // "location": "query", 13563 // "type": "integer" 13564 // }, 13565 // "pageToken": { 13566 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListInspectTemplates`.", 13567 // "location": "query", 13568 // "type": "string" 13569 // }, 13570 // "parent": { 13571 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 13572 // "location": "path", 13573 // "pattern": "^projects/[^/]+$", 13574 // "required": true, 13575 // "type": "string" 13576 // } 13577 // }, 13578 // "path": "v2/{+parent}/inspectTemplates", 13579 // "response": { 13580 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 13581 // }, 13582 // "scopes": [ 13583 // "https://www.googleapis.com/auth/cloud-platform" 13584 // ] 13585 // } 13586 13587} 13588 13589// Pages invokes f for each page of results. 13590// A non-nil error returned from f will halt the iteration. 13591// The provided context supersedes any context provided to the Context method. 13592func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 13593 c.ctx_ = ctx 13594 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13595 for { 13596 x, err := c.Do() 13597 if err != nil { 13598 return err 13599 } 13600 if err := f(x); err != nil { 13601 return err 13602 } 13603 if x.NextPageToken == "" { 13604 return nil 13605 } 13606 c.PageToken(x.NextPageToken) 13607 } 13608} 13609 13610// method id "dlp.projects.inspectTemplates.patch": 13611 13612type ProjectsInspectTemplatesPatchCall struct { 13613 s *Service 13614 name string 13615 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 13616 urlParams_ gensupport.URLParams 13617 ctx_ context.Context 13618 header_ http.Header 13619} 13620 13621// Patch: Updates the InspectTemplate. 13622// See https://cloud.google.com/dlp/docs/creating-templates to learn 13623// more. 13624func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { 13625 c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13626 c.name = name 13627 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 13628 return c 13629} 13630 13631// Fields allows partial responses to be retrieved. See 13632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13633// for more information. 13634func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { 13635 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13636 return c 13637} 13638 13639// Context sets the context to be used in this call's Do method. Any 13640// pending HTTP request will be aborted if the provided context is 13641// canceled. 13642func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { 13643 c.ctx_ = ctx 13644 return c 13645} 13646 13647// Header returns an http.Header that can be modified by the caller to 13648// add HTTP headers to the request. 13649func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { 13650 if c.header_ == nil { 13651 c.header_ = make(http.Header) 13652 } 13653 return c.header_ 13654} 13655 13656func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 13657 reqHeaders := make(http.Header) 13658 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13659 for k, v := range c.header_ { 13660 reqHeaders[k] = v 13661 } 13662 reqHeaders.Set("User-Agent", c.s.userAgent()) 13663 var body io.Reader = nil 13664 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 13665 if err != nil { 13666 return nil, err 13667 } 13668 reqHeaders.Set("Content-Type", "application/json") 13669 c.urlParams_.Set("alt", alt) 13670 c.urlParams_.Set("prettyPrint", "false") 13671 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13672 urls += "?" + c.urlParams_.Encode() 13673 req, err := http.NewRequest("PATCH", urls, body) 13674 if err != nil { 13675 return nil, err 13676 } 13677 req.Header = reqHeaders 13678 googleapi.Expand(req.URL, map[string]string{ 13679 "name": c.name, 13680 }) 13681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13682} 13683 13684// Do executes the "dlp.projects.inspectTemplates.patch" call. 13685// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 13686// non-nil. Any non-2xx status code is an error. Response headers are in 13687// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 13688// (if a response was returned at all) in 13689// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13690// whether the returned error was because http.StatusNotModified was 13691// returned. 13692func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 13693 gensupport.SetOptions(c.urlParams_, opts...) 13694 res, err := c.doRequest("json") 13695 if res != nil && res.StatusCode == http.StatusNotModified { 13696 if res.Body != nil { 13697 res.Body.Close() 13698 } 13699 return nil, &googleapi.Error{ 13700 Code: res.StatusCode, 13701 Header: res.Header, 13702 } 13703 } 13704 if err != nil { 13705 return nil, err 13706 } 13707 defer googleapi.CloseBody(res) 13708 if err := googleapi.CheckResponse(res); err != nil { 13709 return nil, err 13710 } 13711 ret := &GooglePrivacyDlpV2InspectTemplate{ 13712 ServerResponse: googleapi.ServerResponse{ 13713 Header: res.Header, 13714 HTTPStatusCode: res.StatusCode, 13715 }, 13716 } 13717 target := &ret 13718 if err := gensupport.DecodeResponse(target, res); err != nil { 13719 return nil, err 13720 } 13721 return ret, nil 13722 // { 13723 // "description": "Updates the InspectTemplate.\nSee https://cloud.google.com/dlp/docs/creating-templates to learn more.", 13724 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 13725 // "httpMethod": "PATCH", 13726 // "id": "dlp.projects.inspectTemplates.patch", 13727 // "parameterOrder": [ 13728 // "name" 13729 // ], 13730 // "parameters": { 13731 // "name": { 13732 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for\nexample `organizations/433245324/inspectTemplates/432452342` or\nprojects/project-id/inspectTemplates/432452342.", 13733 // "location": "path", 13734 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 13735 // "required": true, 13736 // "type": "string" 13737 // } 13738 // }, 13739 // "path": "v2/{+name}", 13740 // "request": { 13741 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 13742 // }, 13743 // "response": { 13744 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 13745 // }, 13746 // "scopes": [ 13747 // "https://www.googleapis.com/auth/cloud-platform" 13748 // ] 13749 // } 13750 13751} 13752 13753// method id "dlp.projects.jobTriggers.activate": 13754 13755type ProjectsJobTriggersActivateCall struct { 13756 s *Service 13757 name string 13758 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 13759 urlParams_ gensupport.URLParams 13760 ctx_ context.Context 13761 header_ http.Header 13762} 13763 13764// Activate: Activate a job trigger. Causes the immediate execute of a 13765// trigger 13766// instead of waiting on the trigger event to occur. 13767func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { 13768 c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13769 c.name = name 13770 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 13771 return c 13772} 13773 13774// Fields allows partial responses to be retrieved. See 13775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13776// for more information. 13777func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { 13778 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13779 return c 13780} 13781 13782// Context sets the context to be used in this call's Do method. Any 13783// pending HTTP request will be aborted if the provided context is 13784// canceled. 13785func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { 13786 c.ctx_ = ctx 13787 return c 13788} 13789 13790// Header returns an http.Header that can be modified by the caller to 13791// add HTTP headers to the request. 13792func (c *ProjectsJobTriggersActivateCall) Header() http.Header { 13793 if c.header_ == nil { 13794 c.header_ = make(http.Header) 13795 } 13796 return c.header_ 13797} 13798 13799func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 13800 reqHeaders := make(http.Header) 13801 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13802 for k, v := range c.header_ { 13803 reqHeaders[k] = v 13804 } 13805 reqHeaders.Set("User-Agent", c.s.userAgent()) 13806 var body io.Reader = nil 13807 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 13808 if err != nil { 13809 return nil, err 13810 } 13811 reqHeaders.Set("Content-Type", "application/json") 13812 c.urlParams_.Set("alt", alt) 13813 c.urlParams_.Set("prettyPrint", "false") 13814 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 13815 urls += "?" + c.urlParams_.Encode() 13816 req, err := http.NewRequest("POST", urls, body) 13817 if err != nil { 13818 return nil, err 13819 } 13820 req.Header = reqHeaders 13821 googleapi.Expand(req.URL, map[string]string{ 13822 "name": c.name, 13823 }) 13824 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13825} 13826 13827// Do executes the "dlp.projects.jobTriggers.activate" call. 13828// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 13829// Any non-2xx status code is an error. Response headers are in either 13830// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 13831// returned at all) in error.(*googleapi.Error).Header. Use 13832// googleapi.IsNotModified to check whether the returned error was 13833// because http.StatusNotModified was returned. 13834func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 13835 gensupport.SetOptions(c.urlParams_, opts...) 13836 res, err := c.doRequest("json") 13837 if res != nil && res.StatusCode == http.StatusNotModified { 13838 if res.Body != nil { 13839 res.Body.Close() 13840 } 13841 return nil, &googleapi.Error{ 13842 Code: res.StatusCode, 13843 Header: res.Header, 13844 } 13845 } 13846 if err != nil { 13847 return nil, err 13848 } 13849 defer googleapi.CloseBody(res) 13850 if err := googleapi.CheckResponse(res); err != nil { 13851 return nil, err 13852 } 13853 ret := &GooglePrivacyDlpV2DlpJob{ 13854 ServerResponse: googleapi.ServerResponse{ 13855 Header: res.Header, 13856 HTTPStatusCode: res.StatusCode, 13857 }, 13858 } 13859 target := &ret 13860 if err := gensupport.DecodeResponse(target, res); err != nil { 13861 return nil, err 13862 } 13863 return ret, nil 13864 // { 13865 // "description": "Activate a job trigger. Causes the immediate execute of a trigger\ninstead of waiting on the trigger event to occur.", 13866 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", 13867 // "httpMethod": "POST", 13868 // "id": "dlp.projects.jobTriggers.activate", 13869 // "parameterOrder": [ 13870 // "name" 13871 // ], 13872 // "parameters": { 13873 // "name": { 13874 // "description": "Required. Resource name of the trigger to activate, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", 13875 // "location": "path", 13876 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 13877 // "required": true, 13878 // "type": "string" 13879 // } 13880 // }, 13881 // "path": "v2/{+name}:activate", 13882 // "request": { 13883 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 13884 // }, 13885 // "response": { 13886 // "$ref": "GooglePrivacyDlpV2DlpJob" 13887 // }, 13888 // "scopes": [ 13889 // "https://www.googleapis.com/auth/cloud-platform" 13890 // ] 13891 // } 13892 13893} 13894 13895// method id "dlp.projects.jobTriggers.create": 13896 13897type ProjectsJobTriggersCreateCall struct { 13898 s *Service 13899 parent string 13900 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 13901 urlParams_ gensupport.URLParams 13902 ctx_ context.Context 13903 header_ http.Header 13904} 13905 13906// Create: Creates a job trigger to run DLP actions such as scanning 13907// storage for 13908// sensitive information on a set schedule. 13909// See https://cloud.google.com/dlp/docs/creating-job-triggers to learn 13910// more. 13911func (r *ProjectsJobTriggersService) Create(parent string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { 13912 c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13913 c.parent = parent 13914 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 13915 return c 13916} 13917 13918// Fields allows partial responses to be retrieved. See 13919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13920// for more information. 13921func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { 13922 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13923 return c 13924} 13925 13926// Context sets the context to be used in this call's Do method. Any 13927// pending HTTP request will be aborted if the provided context is 13928// canceled. 13929func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { 13930 c.ctx_ = ctx 13931 return c 13932} 13933 13934// Header returns an http.Header that can be modified by the caller to 13935// add HTTP headers to the request. 13936func (c *ProjectsJobTriggersCreateCall) Header() http.Header { 13937 if c.header_ == nil { 13938 c.header_ = make(http.Header) 13939 } 13940 return c.header_ 13941} 13942 13943func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 13944 reqHeaders := make(http.Header) 13945 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13946 for k, v := range c.header_ { 13947 reqHeaders[k] = v 13948 } 13949 reqHeaders.Set("User-Agent", c.s.userAgent()) 13950 var body io.Reader = nil 13951 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 13952 if err != nil { 13953 return nil, err 13954 } 13955 reqHeaders.Set("Content-Type", "application/json") 13956 c.urlParams_.Set("alt", alt) 13957 c.urlParams_.Set("prettyPrint", "false") 13958 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 13959 urls += "?" + c.urlParams_.Encode() 13960 req, err := http.NewRequest("POST", urls, body) 13961 if err != nil { 13962 return nil, err 13963 } 13964 req.Header = reqHeaders 13965 googleapi.Expand(req.URL, map[string]string{ 13966 "parent": c.parent, 13967 }) 13968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13969} 13970 13971// Do executes the "dlp.projects.jobTriggers.create" call. 13972// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 13973// non-nil. Any non-2xx status code is an error. Response headers are in 13974// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 13975// response was returned at all) in error.(*googleapi.Error).Header. Use 13976// googleapi.IsNotModified to check whether the returned error was 13977// because http.StatusNotModified was returned. 13978func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 13979 gensupport.SetOptions(c.urlParams_, opts...) 13980 res, err := c.doRequest("json") 13981 if res != nil && res.StatusCode == http.StatusNotModified { 13982 if res.Body != nil { 13983 res.Body.Close() 13984 } 13985 return nil, &googleapi.Error{ 13986 Code: res.StatusCode, 13987 Header: res.Header, 13988 } 13989 } 13990 if err != nil { 13991 return nil, err 13992 } 13993 defer googleapi.CloseBody(res) 13994 if err := googleapi.CheckResponse(res); err != nil { 13995 return nil, err 13996 } 13997 ret := &GooglePrivacyDlpV2JobTrigger{ 13998 ServerResponse: googleapi.ServerResponse{ 13999 Header: res.Header, 14000 HTTPStatusCode: res.StatusCode, 14001 }, 14002 } 14003 target := &ret 14004 if err := gensupport.DecodeResponse(target, res); err != nil { 14005 return nil, err 14006 } 14007 return ret, nil 14008 // { 14009 // "description": "Creates a job trigger to run DLP actions such as scanning storage for\nsensitive information on a set schedule.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 14010 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 14011 // "httpMethod": "POST", 14012 // "id": "dlp.projects.jobTriggers.create", 14013 // "parameterOrder": [ 14014 // "parent" 14015 // ], 14016 // "parameters": { 14017 // "parent": { 14018 // "description": "Required. The parent resource name, for example projects/my-project-id.", 14019 // "location": "path", 14020 // "pattern": "^projects/[^/]+$", 14021 // "required": true, 14022 // "type": "string" 14023 // } 14024 // }, 14025 // "path": "v2/{+parent}/jobTriggers", 14026 // "request": { 14027 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 14028 // }, 14029 // "response": { 14030 // "$ref": "GooglePrivacyDlpV2JobTrigger" 14031 // }, 14032 // "scopes": [ 14033 // "https://www.googleapis.com/auth/cloud-platform" 14034 // ] 14035 // } 14036 14037} 14038 14039// method id "dlp.projects.jobTriggers.delete": 14040 14041type ProjectsJobTriggersDeleteCall struct { 14042 s *Service 14043 name string 14044 urlParams_ gensupport.URLParams 14045 ctx_ context.Context 14046 header_ http.Header 14047} 14048 14049// Delete: Deletes a job trigger. 14050// See https://cloud.google.com/dlp/docs/creating-job-triggers to learn 14051// more. 14052func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { 14053 c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14054 c.name = name 14055 return c 14056} 14057 14058// Fields allows partial responses to be retrieved. See 14059// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14060// for more information. 14061func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { 14062 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14063 return c 14064} 14065 14066// Context sets the context to be used in this call's Do method. Any 14067// pending HTTP request will be aborted if the provided context is 14068// canceled. 14069func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { 14070 c.ctx_ = ctx 14071 return c 14072} 14073 14074// Header returns an http.Header that can be modified by the caller to 14075// add HTTP headers to the request. 14076func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { 14077 if c.header_ == nil { 14078 c.header_ = make(http.Header) 14079 } 14080 return c.header_ 14081} 14082 14083func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 14084 reqHeaders := make(http.Header) 14085 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14086 for k, v := range c.header_ { 14087 reqHeaders[k] = v 14088 } 14089 reqHeaders.Set("User-Agent", c.s.userAgent()) 14090 var body io.Reader = nil 14091 c.urlParams_.Set("alt", alt) 14092 c.urlParams_.Set("prettyPrint", "false") 14093 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14094 urls += "?" + c.urlParams_.Encode() 14095 req, err := http.NewRequest("DELETE", urls, body) 14096 if err != nil { 14097 return nil, err 14098 } 14099 req.Header = reqHeaders 14100 googleapi.Expand(req.URL, map[string]string{ 14101 "name": c.name, 14102 }) 14103 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14104} 14105 14106// Do executes the "dlp.projects.jobTriggers.delete" call. 14107// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14108// non-2xx status code is an error. Response headers are in either 14109// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14110// returned at all) in error.(*googleapi.Error).Header. Use 14111// googleapi.IsNotModified to check whether the returned error was 14112// because http.StatusNotModified was returned. 14113func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14114 gensupport.SetOptions(c.urlParams_, opts...) 14115 res, err := c.doRequest("json") 14116 if res != nil && res.StatusCode == http.StatusNotModified { 14117 if res.Body != nil { 14118 res.Body.Close() 14119 } 14120 return nil, &googleapi.Error{ 14121 Code: res.StatusCode, 14122 Header: res.Header, 14123 } 14124 } 14125 if err != nil { 14126 return nil, err 14127 } 14128 defer googleapi.CloseBody(res) 14129 if err := googleapi.CheckResponse(res); err != nil { 14130 return nil, err 14131 } 14132 ret := &GoogleProtobufEmpty{ 14133 ServerResponse: googleapi.ServerResponse{ 14134 Header: res.Header, 14135 HTTPStatusCode: res.StatusCode, 14136 }, 14137 } 14138 target := &ret 14139 if err := gensupport.DecodeResponse(target, res); err != nil { 14140 return nil, err 14141 } 14142 return ret, nil 14143 // { 14144 // "description": "Deletes a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 14145 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 14146 // "httpMethod": "DELETE", 14147 // "id": "dlp.projects.jobTriggers.delete", 14148 // "parameterOrder": [ 14149 // "name" 14150 // ], 14151 // "parameters": { 14152 // "name": { 14153 // "description": "Required. Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", 14154 // "location": "path", 14155 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 14156 // "required": true, 14157 // "type": "string" 14158 // } 14159 // }, 14160 // "path": "v2/{+name}", 14161 // "response": { 14162 // "$ref": "GoogleProtobufEmpty" 14163 // }, 14164 // "scopes": [ 14165 // "https://www.googleapis.com/auth/cloud-platform" 14166 // ] 14167 // } 14168 14169} 14170 14171// method id "dlp.projects.jobTriggers.get": 14172 14173type ProjectsJobTriggersGetCall struct { 14174 s *Service 14175 name string 14176 urlParams_ gensupport.URLParams 14177 ifNoneMatch_ string 14178 ctx_ context.Context 14179 header_ http.Header 14180} 14181 14182// Get: Gets a job trigger. 14183// See https://cloud.google.com/dlp/docs/creating-job-triggers to learn 14184// more. 14185func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { 14186 c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14187 c.name = name 14188 return c 14189} 14190 14191// Fields allows partial responses to be retrieved. See 14192// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14193// for more information. 14194func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { 14195 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14196 return c 14197} 14198 14199// IfNoneMatch sets the optional parameter which makes the operation 14200// fail if the object's ETag matches the given value. This is useful for 14201// getting updates only after the object has changed since the last 14202// request. Use googleapi.IsNotModified to check whether the response 14203// error from Do is the result of In-None-Match. 14204func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { 14205 c.ifNoneMatch_ = entityTag 14206 return c 14207} 14208 14209// Context sets the context to be used in this call's Do method. Any 14210// pending HTTP request will be aborted if the provided context is 14211// canceled. 14212func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { 14213 c.ctx_ = ctx 14214 return c 14215} 14216 14217// Header returns an http.Header that can be modified by the caller to 14218// add HTTP headers to the request. 14219func (c *ProjectsJobTriggersGetCall) Header() http.Header { 14220 if c.header_ == nil { 14221 c.header_ = make(http.Header) 14222 } 14223 return c.header_ 14224} 14225 14226func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 14227 reqHeaders := make(http.Header) 14228 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14229 for k, v := range c.header_ { 14230 reqHeaders[k] = v 14231 } 14232 reqHeaders.Set("User-Agent", c.s.userAgent()) 14233 if c.ifNoneMatch_ != "" { 14234 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14235 } 14236 var body io.Reader = nil 14237 c.urlParams_.Set("alt", alt) 14238 c.urlParams_.Set("prettyPrint", "false") 14239 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14240 urls += "?" + c.urlParams_.Encode() 14241 req, err := http.NewRequest("GET", urls, body) 14242 if err != nil { 14243 return nil, err 14244 } 14245 req.Header = reqHeaders 14246 googleapi.Expand(req.URL, map[string]string{ 14247 "name": c.name, 14248 }) 14249 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14250} 14251 14252// Do executes the "dlp.projects.jobTriggers.get" call. 14253// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 14254// non-nil. Any non-2xx status code is an error. Response headers are in 14255// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 14256// response was returned at all) in error.(*googleapi.Error).Header. Use 14257// googleapi.IsNotModified to check whether the returned error was 14258// because http.StatusNotModified was returned. 14259func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 14260 gensupport.SetOptions(c.urlParams_, opts...) 14261 res, err := c.doRequest("json") 14262 if res != nil && res.StatusCode == http.StatusNotModified { 14263 if res.Body != nil { 14264 res.Body.Close() 14265 } 14266 return nil, &googleapi.Error{ 14267 Code: res.StatusCode, 14268 Header: res.Header, 14269 } 14270 } 14271 if err != nil { 14272 return nil, err 14273 } 14274 defer googleapi.CloseBody(res) 14275 if err := googleapi.CheckResponse(res); err != nil { 14276 return nil, err 14277 } 14278 ret := &GooglePrivacyDlpV2JobTrigger{ 14279 ServerResponse: googleapi.ServerResponse{ 14280 Header: res.Header, 14281 HTTPStatusCode: res.StatusCode, 14282 }, 14283 } 14284 target := &ret 14285 if err := gensupport.DecodeResponse(target, res); err != nil { 14286 return nil, err 14287 } 14288 return ret, nil 14289 // { 14290 // "description": "Gets a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 14291 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 14292 // "httpMethod": "GET", 14293 // "id": "dlp.projects.jobTriggers.get", 14294 // "parameterOrder": [ 14295 // "name" 14296 // ], 14297 // "parameters": { 14298 // "name": { 14299 // "description": "Required. Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", 14300 // "location": "path", 14301 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 14302 // "required": true, 14303 // "type": "string" 14304 // } 14305 // }, 14306 // "path": "v2/{+name}", 14307 // "response": { 14308 // "$ref": "GooglePrivacyDlpV2JobTrigger" 14309 // }, 14310 // "scopes": [ 14311 // "https://www.googleapis.com/auth/cloud-platform" 14312 // ] 14313 // } 14314 14315} 14316 14317// method id "dlp.projects.jobTriggers.list": 14318 14319type ProjectsJobTriggersListCall struct { 14320 s *Service 14321 parent string 14322 urlParams_ gensupport.URLParams 14323 ifNoneMatch_ string 14324 ctx_ context.Context 14325 header_ http.Header 14326} 14327 14328// List: Lists job triggers. 14329// See https://cloud.google.com/dlp/docs/creating-job-triggers to learn 14330// more. 14331func (r *ProjectsJobTriggersService) List(parent string) *ProjectsJobTriggersListCall { 14332 c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14333 c.parent = parent 14334 return c 14335} 14336 14337// Filter sets the optional parameter "filter": Allows 14338// filtering. 14339// 14340// Supported syntax: 14341// 14342// * Filter expressions are made up of one or more restrictions. 14343// * Restrictions can be combined by `AND` or `OR` logical operators. 14344// A 14345// sequence of restrictions implicitly uses `AND`. 14346// * A restriction has the form of `<field> <operator> <value>`. 14347// * Supported fields/values for inspect jobs: 14348// - `status` - HEALTHY|PAUSED|CANCELLED 14349// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY 14350// - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by 14351// quotation marks. Nanoseconds are ignored. 14352// - 'error_count' - Number of errors that have occurred while 14353// running. 14354// * The operator must be `=` or `!=` for status and 14355// inspected_storage. 14356// 14357// Examples: 14358// 14359// * inspected_storage = cloud_storage AND status = HEALTHY 14360// * inspected_storage = cloud_storage OR inspected_storage = bigquery 14361// * inspected_storage = cloud_storage AND (state = PAUSED OR state = 14362// HEALTHY) 14363// * last_run_time > \"2017-12-12T00:00:00+00:00\" 14364// 14365// The length of this field should be no more than 500 characters. 14366func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { 14367 c.urlParams_.Set("filter", filter) 14368 return c 14369} 14370 14371// OrderBy sets the optional parameter "orderBy": Optional comma 14372// separated list of triggeredJob fields to order by, 14373// followed by `asc` or `desc` postfix. This list is 14374// case-insensitive, 14375// default sorting order is ascending, redundant space characters 14376// are 14377// insignificant. 14378// 14379// Example: `name asc,update_time, create_time desc` 14380// 14381// Supported fields are: 14382// 14383// - `create_time`: corresponds to time the JobTrigger was created. 14384// - `update_time`: corresponds to time the JobTrigger was last 14385// updated. 14386// - `last_run_time`: corresponds to the last time the JobTrigger ran. 14387// - `name`: corresponds to JobTrigger's name. 14388// - `display_name`: corresponds to JobTrigger's display name. 14389// - `status`: corresponds to JobTrigger's status. 14390func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { 14391 c.urlParams_.Set("orderBy", orderBy) 14392 return c 14393} 14394 14395// PageSize sets the optional parameter "pageSize": Optional size of the 14396// page, can be limited by a server. 14397func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { 14398 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14399 return c 14400} 14401 14402// PageToken sets the optional parameter "pageToken": Optional page 14403// token to continue retrieval. Comes from previous call 14404// to ListJobTriggers. `order_by` field must not 14405// change for subsequent calls. 14406func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { 14407 c.urlParams_.Set("pageToken", pageToken) 14408 return c 14409} 14410 14411// Fields allows partial responses to be retrieved. See 14412// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14413// for more information. 14414func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { 14415 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14416 return c 14417} 14418 14419// IfNoneMatch sets the optional parameter which makes the operation 14420// fail if the object's ETag matches the given value. This is useful for 14421// getting updates only after the object has changed since the last 14422// request. Use googleapi.IsNotModified to check whether the response 14423// error from Do is the result of In-None-Match. 14424func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { 14425 c.ifNoneMatch_ = entityTag 14426 return c 14427} 14428 14429// Context sets the context to be used in this call's Do method. Any 14430// pending HTTP request will be aborted if the provided context is 14431// canceled. 14432func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { 14433 c.ctx_ = ctx 14434 return c 14435} 14436 14437// Header returns an http.Header that can be modified by the caller to 14438// add HTTP headers to the request. 14439func (c *ProjectsJobTriggersListCall) Header() http.Header { 14440 if c.header_ == nil { 14441 c.header_ = make(http.Header) 14442 } 14443 return c.header_ 14444} 14445 14446func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 14447 reqHeaders := make(http.Header) 14448 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14449 for k, v := range c.header_ { 14450 reqHeaders[k] = v 14451 } 14452 reqHeaders.Set("User-Agent", c.s.userAgent()) 14453 if c.ifNoneMatch_ != "" { 14454 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14455 } 14456 var body io.Reader = nil 14457 c.urlParams_.Set("alt", alt) 14458 c.urlParams_.Set("prettyPrint", "false") 14459 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 14460 urls += "?" + c.urlParams_.Encode() 14461 req, err := http.NewRequest("GET", urls, body) 14462 if err != nil { 14463 return nil, err 14464 } 14465 req.Header = reqHeaders 14466 googleapi.Expand(req.URL, map[string]string{ 14467 "parent": c.parent, 14468 }) 14469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14470} 14471 14472// Do executes the "dlp.projects.jobTriggers.list" call. 14473// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 14474// will be non-nil. Any non-2xx status code is an error. Response 14475// headers are in either 14476// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 14477// (if a response was returned at all) in 14478// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14479// whether the returned error was because http.StatusNotModified was 14480// returned. 14481func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 14482 gensupport.SetOptions(c.urlParams_, opts...) 14483 res, err := c.doRequest("json") 14484 if res != nil && res.StatusCode == http.StatusNotModified { 14485 if res.Body != nil { 14486 res.Body.Close() 14487 } 14488 return nil, &googleapi.Error{ 14489 Code: res.StatusCode, 14490 Header: res.Header, 14491 } 14492 } 14493 if err != nil { 14494 return nil, err 14495 } 14496 defer googleapi.CloseBody(res) 14497 if err := googleapi.CheckResponse(res); err != nil { 14498 return nil, err 14499 } 14500 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 14501 ServerResponse: googleapi.ServerResponse{ 14502 Header: res.Header, 14503 HTTPStatusCode: res.StatusCode, 14504 }, 14505 } 14506 target := &ret 14507 if err := gensupport.DecodeResponse(target, res); err != nil { 14508 return nil, err 14509 } 14510 return ret, nil 14511 // { 14512 // "description": "Lists job triggers.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 14513 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 14514 // "httpMethod": "GET", 14515 // "id": "dlp.projects.jobTriggers.list", 14516 // "parameterOrder": [ 14517 // "parent" 14518 // ], 14519 // "parameters": { 14520 // "filter": { 14521 // "description": "Optional. Allows filtering.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `\u003cfield\u003e \u003coperator\u003e \u003cvalue\u003e`.\n* Supported fields/values for inspect jobs:\n - `status` - HEALTHY|PAUSED|CANCELLED\n - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY\n - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by\n quotation marks. Nanoseconds are ignored.\n - 'error_count' - Number of errors that have occurred while running.\n* The operator must be `=` or `!=` for status and inspected_storage.\n\nExamples:\n\n* inspected_storage = cloud_storage AND status = HEALTHY\n* inspected_storage = cloud_storage OR inspected_storage = bigquery\n* inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)\n* last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\"\n\nThe length of this field should be no more than 500 characters.", 14522 // "location": "query", 14523 // "type": "string" 14524 // }, 14525 // "orderBy": { 14526 // "description": "Optional comma separated list of triggeredJob fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc,update_time, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the JobTrigger was created.\n- `update_time`: corresponds to time the JobTrigger was last updated.\n- `last_run_time`: corresponds to the last time the JobTrigger ran.\n- `name`: corresponds to JobTrigger's name.\n- `display_name`: corresponds to JobTrigger's display name.\n- `status`: corresponds to JobTrigger's status.", 14527 // "location": "query", 14528 // "type": "string" 14529 // }, 14530 // "pageSize": { 14531 // "description": "Optional size of the page, can be limited by a server.", 14532 // "format": "int32", 14533 // "location": "query", 14534 // "type": "integer" 14535 // }, 14536 // "pageToken": { 14537 // "description": "Optional page token to continue retrieval. Comes from previous call\nto ListJobTriggers. `order_by` field must not\nchange for subsequent calls.", 14538 // "location": "query", 14539 // "type": "string" 14540 // }, 14541 // "parent": { 14542 // "description": "Required. The parent resource name, for example `projects/my-project-id`.", 14543 // "location": "path", 14544 // "pattern": "^projects/[^/]+$", 14545 // "required": true, 14546 // "type": "string" 14547 // } 14548 // }, 14549 // "path": "v2/{+parent}/jobTriggers", 14550 // "response": { 14551 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 14552 // }, 14553 // "scopes": [ 14554 // "https://www.googleapis.com/auth/cloud-platform" 14555 // ] 14556 // } 14557 14558} 14559 14560// Pages invokes f for each page of results. 14561// A non-nil error returned from f will halt the iteration. 14562// The provided context supersedes any context provided to the Context method. 14563func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 14564 c.ctx_ = ctx 14565 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14566 for { 14567 x, err := c.Do() 14568 if err != nil { 14569 return err 14570 } 14571 if err := f(x); err != nil { 14572 return err 14573 } 14574 if x.NextPageToken == "" { 14575 return nil 14576 } 14577 c.PageToken(x.NextPageToken) 14578 } 14579} 14580 14581// method id "dlp.projects.jobTriggers.patch": 14582 14583type ProjectsJobTriggersPatchCall struct { 14584 s *Service 14585 name string 14586 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 14587 urlParams_ gensupport.URLParams 14588 ctx_ context.Context 14589 header_ http.Header 14590} 14591 14592// Patch: Updates a job trigger. 14593// See https://cloud.google.com/dlp/docs/creating-job-triggers to learn 14594// more. 14595func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { 14596 c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14597 c.name = name 14598 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 14599 return c 14600} 14601 14602// Fields allows partial responses to be retrieved. See 14603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14604// for more information. 14605func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { 14606 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14607 return c 14608} 14609 14610// Context sets the context to be used in this call's Do method. Any 14611// pending HTTP request will be aborted if the provided context is 14612// canceled. 14613func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { 14614 c.ctx_ = ctx 14615 return c 14616} 14617 14618// Header returns an http.Header that can be modified by the caller to 14619// add HTTP headers to the request. 14620func (c *ProjectsJobTriggersPatchCall) Header() http.Header { 14621 if c.header_ == nil { 14622 c.header_ = make(http.Header) 14623 } 14624 return c.header_ 14625} 14626 14627func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 14628 reqHeaders := make(http.Header) 14629 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14630 for k, v := range c.header_ { 14631 reqHeaders[k] = v 14632 } 14633 reqHeaders.Set("User-Agent", c.s.userAgent()) 14634 var body io.Reader = nil 14635 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 14636 if err != nil { 14637 return nil, err 14638 } 14639 reqHeaders.Set("Content-Type", "application/json") 14640 c.urlParams_.Set("alt", alt) 14641 c.urlParams_.Set("prettyPrint", "false") 14642 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14643 urls += "?" + c.urlParams_.Encode() 14644 req, err := http.NewRequest("PATCH", urls, body) 14645 if err != nil { 14646 return nil, err 14647 } 14648 req.Header = reqHeaders 14649 googleapi.Expand(req.URL, map[string]string{ 14650 "name": c.name, 14651 }) 14652 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14653} 14654 14655// Do executes the "dlp.projects.jobTriggers.patch" call. 14656// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 14657// non-nil. Any non-2xx status code is an error. Response headers are in 14658// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 14659// response was returned at all) in error.(*googleapi.Error).Header. Use 14660// googleapi.IsNotModified to check whether the returned error was 14661// because http.StatusNotModified was returned. 14662func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 14663 gensupport.SetOptions(c.urlParams_, opts...) 14664 res, err := c.doRequest("json") 14665 if res != nil && res.StatusCode == http.StatusNotModified { 14666 if res.Body != nil { 14667 res.Body.Close() 14668 } 14669 return nil, &googleapi.Error{ 14670 Code: res.StatusCode, 14671 Header: res.Header, 14672 } 14673 } 14674 if err != nil { 14675 return nil, err 14676 } 14677 defer googleapi.CloseBody(res) 14678 if err := googleapi.CheckResponse(res); err != nil { 14679 return nil, err 14680 } 14681 ret := &GooglePrivacyDlpV2JobTrigger{ 14682 ServerResponse: googleapi.ServerResponse{ 14683 Header: res.Header, 14684 HTTPStatusCode: res.StatusCode, 14685 }, 14686 } 14687 target := &ret 14688 if err := gensupport.DecodeResponse(target, res); err != nil { 14689 return nil, err 14690 } 14691 return ret, nil 14692 // { 14693 // "description": "Updates a job trigger.\nSee https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 14694 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 14695 // "httpMethod": "PATCH", 14696 // "id": "dlp.projects.jobTriggers.patch", 14697 // "parameterOrder": [ 14698 // "name" 14699 // ], 14700 // "parameters": { 14701 // "name": { 14702 // "description": "Required. Resource name of the project and the triggeredJob, for example\n`projects/dlp-test-project/jobTriggers/53234423`.", 14703 // "location": "path", 14704 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 14705 // "required": true, 14706 // "type": "string" 14707 // } 14708 // }, 14709 // "path": "v2/{+name}", 14710 // "request": { 14711 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 14712 // }, 14713 // "response": { 14714 // "$ref": "GooglePrivacyDlpV2JobTrigger" 14715 // }, 14716 // "scopes": [ 14717 // "https://www.googleapis.com/auth/cloud-platform" 14718 // ] 14719 // } 14720 14721} 14722 14723// method id "dlp.projects.locations.content.deidentify": 14724 14725type ProjectsLocationsContentDeidentifyCall struct { 14726 s *Service 14727 parent string 14728 location string 14729 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 14730 urlParams_ gensupport.URLParams 14731 ctx_ context.Context 14732 header_ http.Header 14733} 14734 14735// Deidentify: De-identifies potentially sensitive info from a 14736// ContentItem. 14737// This method has limits on input size and output size. 14738// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data 14739// to 14740// learn more. 14741// 14742// When no InfoTypes or CustomInfoTypes are specified in this request, 14743// the 14744// system will automatically choose what detectors to run. By default 14745// this may 14746// be all types, but may change over time as detectors are updated. 14747func (r *ProjectsLocationsContentService) Deidentify(parent string, location string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { 14748 c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14749 c.parent = parent 14750 c.location = location 14751 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 14752 return c 14753} 14754 14755// Fields allows partial responses to be retrieved. See 14756// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14757// for more information. 14758func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { 14759 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14760 return c 14761} 14762 14763// Context sets the context to be used in this call's Do method. Any 14764// pending HTTP request will be aborted if the provided context is 14765// canceled. 14766func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { 14767 c.ctx_ = ctx 14768 return c 14769} 14770 14771// Header returns an http.Header that can be modified by the caller to 14772// add HTTP headers to the request. 14773func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { 14774 if c.header_ == nil { 14775 c.header_ = make(http.Header) 14776 } 14777 return c.header_ 14778} 14779 14780func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 14781 reqHeaders := make(http.Header) 14782 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14783 for k, v := range c.header_ { 14784 reqHeaders[k] = v 14785 } 14786 reqHeaders.Set("User-Agent", c.s.userAgent()) 14787 var body io.Reader = nil 14788 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 14789 if err != nil { 14790 return nil, err 14791 } 14792 reqHeaders.Set("Content-Type", "application/json") 14793 c.urlParams_.Set("alt", alt) 14794 c.urlParams_.Set("prettyPrint", "false") 14795 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locations/{location}/content:deidentify") 14796 urls += "?" + c.urlParams_.Encode() 14797 req, err := http.NewRequest("POST", urls, body) 14798 if err != nil { 14799 return nil, err 14800 } 14801 req.Header = reqHeaders 14802 googleapi.Expand(req.URL, map[string]string{ 14803 "parent": c.parent, 14804 "location": c.location, 14805 }) 14806 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14807} 14808 14809// Do executes the "dlp.projects.locations.content.deidentify" call. 14810// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 14811// will be non-nil. Any non-2xx status code is an error. Response 14812// headers are in either 14813// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 14814// (if a response was returned at all) in 14815// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14816// whether the returned error was because http.StatusNotModified was 14817// returned. 14818func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 14819 gensupport.SetOptions(c.urlParams_, opts...) 14820 res, err := c.doRequest("json") 14821 if res != nil && res.StatusCode == http.StatusNotModified { 14822 if res.Body != nil { 14823 res.Body.Close() 14824 } 14825 return nil, &googleapi.Error{ 14826 Code: res.StatusCode, 14827 Header: res.Header, 14828 } 14829 } 14830 if err != nil { 14831 return nil, err 14832 } 14833 defer googleapi.CloseBody(res) 14834 if err := googleapi.CheckResponse(res); err != nil { 14835 return nil, err 14836 } 14837 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 14838 ServerResponse: googleapi.ServerResponse{ 14839 Header: res.Header, 14840 HTTPStatusCode: res.StatusCode, 14841 }, 14842 } 14843 target := &ret 14844 if err := gensupport.DecodeResponse(target, res); err != nil { 14845 return nil, err 14846 } 14847 return ret, nil 14848 // { 14849 // "description": "De-identifies potentially sensitive info from a ContentItem.\nThis method has limits on input size and output size.\nSee https://cloud.google.com/dlp/docs/deidentify-sensitive-data to\nlearn more.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.", 14850 // "flatPath": "v2/projects/{projectsId}/locations/{location}/content:deidentify", 14851 // "httpMethod": "POST", 14852 // "id": "dlp.projects.locations.content.deidentify", 14853 // "parameterOrder": [ 14854 // "parent", 14855 // "location" 14856 // ], 14857 // "parameters": { 14858 // "location": { 14859 // "description": "The geographic location to process de-identification. Reserved for future\nextensions.", 14860 // "location": "path", 14861 // "required": true, 14862 // "type": "string" 14863 // }, 14864 // "parent": { 14865 // "description": "The parent resource name, for example projects/my-project-id.", 14866 // "location": "path", 14867 // "pattern": "^projects/[^/]+$", 14868 // "required": true, 14869 // "type": "string" 14870 // } 14871 // }, 14872 // "path": "v2/{+parent}/locations/{location}/content:deidentify", 14873 // "request": { 14874 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 14875 // }, 14876 // "response": { 14877 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 14878 // }, 14879 // "scopes": [ 14880 // "https://www.googleapis.com/auth/cloud-platform" 14881 // ] 14882 // } 14883 14884} 14885 14886// method id "dlp.projects.locations.content.inspect": 14887 14888type ProjectsLocationsContentInspectCall struct { 14889 s *Service 14890 parent string 14891 location string 14892 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 14893 urlParams_ gensupport.URLParams 14894 ctx_ context.Context 14895 header_ http.Header 14896} 14897 14898// Inspect: Finds potentially sensitive info in content. 14899// This method has limits on input size, processing time, and output 14900// size. 14901// 14902// When no InfoTypes or CustomInfoTypes are specified in this request, 14903// the 14904// system will automatically choose what detectors to run. By default 14905// this may 14906// be all types, but may change over time as detectors are updated. 14907// 14908// For how to guides, see 14909// https://cloud.google.com/dlp/docs/inspecting-images 14910// and https://cloud.google.com/dlp/docs/inspecting-text, 14911func (r *ProjectsLocationsContentService) Inspect(parent string, location string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { 14912 c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14913 c.parent = parent 14914 c.location = location 14915 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 14916 return c 14917} 14918 14919// Fields allows partial responses to be retrieved. See 14920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14921// for more information. 14922func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { 14923 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14924 return c 14925} 14926 14927// Context sets the context to be used in this call's Do method. Any 14928// pending HTTP request will be aborted if the provided context is 14929// canceled. 14930func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { 14931 c.ctx_ = ctx 14932 return c 14933} 14934 14935// Header returns an http.Header that can be modified by the caller to 14936// add HTTP headers to the request. 14937func (c *ProjectsLocationsContentInspectCall) Header() http.Header { 14938 if c.header_ == nil { 14939 c.header_ = make(http.Header) 14940 } 14941 return c.header_ 14942} 14943 14944func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { 14945 reqHeaders := make(http.Header) 14946 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 14947 for k, v := range c.header_ { 14948 reqHeaders[k] = v 14949 } 14950 reqHeaders.Set("User-Agent", c.s.userAgent()) 14951 var body io.Reader = nil 14952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 14953 if err != nil { 14954 return nil, err 14955 } 14956 reqHeaders.Set("Content-Type", "application/json") 14957 c.urlParams_.Set("alt", alt) 14958 c.urlParams_.Set("prettyPrint", "false") 14959 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locations/{location}/content:inspect") 14960 urls += "?" + c.urlParams_.Encode() 14961 req, err := http.NewRequest("POST", urls, body) 14962 if err != nil { 14963 return nil, err 14964 } 14965 req.Header = reqHeaders 14966 googleapi.Expand(req.URL, map[string]string{ 14967 "parent": c.parent, 14968 "location": c.location, 14969 }) 14970 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14971} 14972 14973// Do executes the "dlp.projects.locations.content.inspect" call. 14974// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 14975// will be non-nil. Any non-2xx status code is an error. Response 14976// headers are in either 14977// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 14978// (if a response was returned at all) in 14979// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14980// whether the returned error was because http.StatusNotModified was 14981// returned. 14982func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 14983 gensupport.SetOptions(c.urlParams_, opts...) 14984 res, err := c.doRequest("json") 14985 if res != nil && res.StatusCode == http.StatusNotModified { 14986 if res.Body != nil { 14987 res.Body.Close() 14988 } 14989 return nil, &googleapi.Error{ 14990 Code: res.StatusCode, 14991 Header: res.Header, 14992 } 14993 } 14994 if err != nil { 14995 return nil, err 14996 } 14997 defer googleapi.CloseBody(res) 14998 if err := googleapi.CheckResponse(res); err != nil { 14999 return nil, err 15000 } 15001 ret := &GooglePrivacyDlpV2InspectContentResponse{ 15002 ServerResponse: googleapi.ServerResponse{ 15003 Header: res.Header, 15004 HTTPStatusCode: res.StatusCode, 15005 }, 15006 } 15007 target := &ret 15008 if err := gensupport.DecodeResponse(target, res); err != nil { 15009 return nil, err 15010 } 15011 return ret, nil 15012 // { 15013 // "description": "Finds potentially sensitive info in content.\nThis method has limits on input size, processing time, and output size.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.\n\nFor how to guides, see https://cloud.google.com/dlp/docs/inspecting-images\nand https://cloud.google.com/dlp/docs/inspecting-text,", 15014 // "flatPath": "v2/projects/{projectsId}/locations/{location}/content:inspect", 15015 // "httpMethod": "POST", 15016 // "id": "dlp.projects.locations.content.inspect", 15017 // "parameterOrder": [ 15018 // "parent", 15019 // "location" 15020 // ], 15021 // "parameters": { 15022 // "location": { 15023 // "description": "The geographic location to process content inspection. Reserved for future\nextensions.", 15024 // "location": "path", 15025 // "required": true, 15026 // "type": "string" 15027 // }, 15028 // "parent": { 15029 // "description": "The parent resource name, for example projects/my-project-id.", 15030 // "location": "path", 15031 // "pattern": "^projects/[^/]+$", 15032 // "required": true, 15033 // "type": "string" 15034 // } 15035 // }, 15036 // "path": "v2/{+parent}/locations/{location}/content:inspect", 15037 // "request": { 15038 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 15039 // }, 15040 // "response": { 15041 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 15042 // }, 15043 // "scopes": [ 15044 // "https://www.googleapis.com/auth/cloud-platform" 15045 // ] 15046 // } 15047 15048} 15049 15050// method id "dlp.projects.locations.content.reidentify": 15051 15052type ProjectsLocationsContentReidentifyCall struct { 15053 s *Service 15054 parent string 15055 location string 15056 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 15057 urlParams_ gensupport.URLParams 15058 ctx_ context.Context 15059 header_ http.Header 15060} 15061 15062// Reidentify: Re-identifies content that has been 15063// de-identified. 15064// See 15065// https://cloud.google.com/dlp/docs/pseudonymization# 15066// re-identification_in_free_text_code_example 15067// to learn more. 15068func (r *ProjectsLocationsContentService) Reidentify(parent string, location string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { 15069 c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15070 c.parent = parent 15071 c.location = location 15072 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 15073 return c 15074} 15075 15076// Fields allows partial responses to be retrieved. See 15077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15078// for more information. 15079func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { 15080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15081 return c 15082} 15083 15084// Context sets the context to be used in this call's Do method. Any 15085// pending HTTP request will be aborted if the provided context is 15086// canceled. 15087func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { 15088 c.ctx_ = ctx 15089 return c 15090} 15091 15092// Header returns an http.Header that can be modified by the caller to 15093// add HTTP headers to the request. 15094func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { 15095 if c.header_ == nil { 15096 c.header_ = make(http.Header) 15097 } 15098 return c.header_ 15099} 15100 15101func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 15102 reqHeaders := make(http.Header) 15103 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15104 for k, v := range c.header_ { 15105 reqHeaders[k] = v 15106 } 15107 reqHeaders.Set("User-Agent", c.s.userAgent()) 15108 var body io.Reader = nil 15109 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 15110 if err != nil { 15111 return nil, err 15112 } 15113 reqHeaders.Set("Content-Type", "application/json") 15114 c.urlParams_.Set("alt", alt) 15115 c.urlParams_.Set("prettyPrint", "false") 15116 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locations/{location}/content:reidentify") 15117 urls += "?" + c.urlParams_.Encode() 15118 req, err := http.NewRequest("POST", urls, body) 15119 if err != nil { 15120 return nil, err 15121 } 15122 req.Header = reqHeaders 15123 googleapi.Expand(req.URL, map[string]string{ 15124 "parent": c.parent, 15125 "location": c.location, 15126 }) 15127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15128} 15129 15130// Do executes the "dlp.projects.locations.content.reidentify" call. 15131// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 15132// will be non-nil. Any non-2xx status code is an error. Response 15133// headers are in either 15134// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 15135// (if a response was returned at all) in 15136// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15137// whether the returned error was because http.StatusNotModified was 15138// returned. 15139func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 15140 gensupport.SetOptions(c.urlParams_, opts...) 15141 res, err := c.doRequest("json") 15142 if res != nil && res.StatusCode == http.StatusNotModified { 15143 if res.Body != nil { 15144 res.Body.Close() 15145 } 15146 return nil, &googleapi.Error{ 15147 Code: res.StatusCode, 15148 Header: res.Header, 15149 } 15150 } 15151 if err != nil { 15152 return nil, err 15153 } 15154 defer googleapi.CloseBody(res) 15155 if err := googleapi.CheckResponse(res); err != nil { 15156 return nil, err 15157 } 15158 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 15159 ServerResponse: googleapi.ServerResponse{ 15160 Header: res.Header, 15161 HTTPStatusCode: res.StatusCode, 15162 }, 15163 } 15164 target := &ret 15165 if err := gensupport.DecodeResponse(target, res); err != nil { 15166 return nil, err 15167 } 15168 return ret, nil 15169 // { 15170 // "description": "Re-identifies content that has been de-identified.\nSee\nhttps://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example\nto learn more.", 15171 // "flatPath": "v2/projects/{projectsId}/locations/{location}/content:reidentify", 15172 // "httpMethod": "POST", 15173 // "id": "dlp.projects.locations.content.reidentify", 15174 // "parameterOrder": [ 15175 // "parent", 15176 // "location" 15177 // ], 15178 // "parameters": { 15179 // "location": { 15180 // "description": "The geographic location to process content reidentification. Reserved for\nfuture extensions.", 15181 // "location": "path", 15182 // "required": true, 15183 // "type": "string" 15184 // }, 15185 // "parent": { 15186 // "description": "Required. The parent resource name.", 15187 // "location": "path", 15188 // "pattern": "^projects/[^/]+$", 15189 // "required": true, 15190 // "type": "string" 15191 // } 15192 // }, 15193 // "path": "v2/{+parent}/locations/{location}/content:reidentify", 15194 // "request": { 15195 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 15196 // }, 15197 // "response": { 15198 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 15199 // }, 15200 // "scopes": [ 15201 // "https://www.googleapis.com/auth/cloud-platform" 15202 // ] 15203 // } 15204 15205} 15206 15207// method id "dlp.projects.locations.image.redact": 15208 15209type ProjectsLocationsImageRedactCall struct { 15210 s *Service 15211 parent string 15212 location string 15213 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 15214 urlParams_ gensupport.URLParams 15215 ctx_ context.Context 15216 header_ http.Header 15217} 15218 15219// Redact: Redacts potentially sensitive info from an image. 15220// This method has limits on input size, processing time, and output 15221// size. 15222// See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images 15223// to 15224// learn more. 15225// 15226// When no InfoTypes or CustomInfoTypes are specified in this request, 15227// the 15228// system will automatically choose what detectors to run. By default 15229// this may 15230// be all types, but may change over time as detectors are updated. 15231func (r *ProjectsLocationsImageService) Redact(parent string, location string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { 15232 c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15233 c.parent = parent 15234 c.location = location 15235 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 15236 return c 15237} 15238 15239// Fields allows partial responses to be retrieved. See 15240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15241// for more information. 15242func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { 15243 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15244 return c 15245} 15246 15247// Context sets the context to be used in this call's Do method. Any 15248// pending HTTP request will be aborted if the provided context is 15249// canceled. 15250func (c *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { 15251 c.ctx_ = ctx 15252 return c 15253} 15254 15255// Header returns an http.Header that can be modified by the caller to 15256// add HTTP headers to the request. 15257func (c *ProjectsLocationsImageRedactCall) Header() http.Header { 15258 if c.header_ == nil { 15259 c.header_ = make(http.Header) 15260 } 15261 return c.header_ 15262} 15263 15264func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response, error) { 15265 reqHeaders := make(http.Header) 15266 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15267 for k, v := range c.header_ { 15268 reqHeaders[k] = v 15269 } 15270 reqHeaders.Set("User-Agent", c.s.userAgent()) 15271 var body io.Reader = nil 15272 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 15273 if err != nil { 15274 return nil, err 15275 } 15276 reqHeaders.Set("Content-Type", "application/json") 15277 c.urlParams_.Set("alt", alt) 15278 c.urlParams_.Set("prettyPrint", "false") 15279 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/locations/{location}/image:redact") 15280 urls += "?" + c.urlParams_.Encode() 15281 req, err := http.NewRequest("POST", urls, body) 15282 if err != nil { 15283 return nil, err 15284 } 15285 req.Header = reqHeaders 15286 googleapi.Expand(req.URL, map[string]string{ 15287 "parent": c.parent, 15288 "location": c.location, 15289 }) 15290 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15291} 15292 15293// Do executes the "dlp.projects.locations.image.redact" call. 15294// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 15295// be non-nil. Any non-2xx status code is an error. Response headers are 15296// in either 15297// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 15298// response was returned at all) in error.(*googleapi.Error).Header. Use 15299// googleapi.IsNotModified to check whether the returned error was 15300// because http.StatusNotModified was returned. 15301func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 15302 gensupport.SetOptions(c.urlParams_, opts...) 15303 res, err := c.doRequest("json") 15304 if res != nil && res.StatusCode == http.StatusNotModified { 15305 if res.Body != nil { 15306 res.Body.Close() 15307 } 15308 return nil, &googleapi.Error{ 15309 Code: res.StatusCode, 15310 Header: res.Header, 15311 } 15312 } 15313 if err != nil { 15314 return nil, err 15315 } 15316 defer googleapi.CloseBody(res) 15317 if err := googleapi.CheckResponse(res); err != nil { 15318 return nil, err 15319 } 15320 ret := &GooglePrivacyDlpV2RedactImageResponse{ 15321 ServerResponse: googleapi.ServerResponse{ 15322 Header: res.Header, 15323 HTTPStatusCode: res.StatusCode, 15324 }, 15325 } 15326 target := &ret 15327 if err := gensupport.DecodeResponse(target, res); err != nil { 15328 return nil, err 15329 } 15330 return ret, nil 15331 // { 15332 // "description": "Redacts potentially sensitive info from an image.\nThis method has limits on input size, processing time, and output size.\nSee https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to\nlearn more.\n\nWhen no InfoTypes or CustomInfoTypes are specified in this request, the\nsystem will automatically choose what detectors to run. By default this may\nbe all types, but may change over time as detectors are updated.", 15333 // "flatPath": "v2/projects/{projectsId}/locations/{location}/image:redact", 15334 // "httpMethod": "POST", 15335 // "id": "dlp.projects.locations.image.redact", 15336 // "parameterOrder": [ 15337 // "parent", 15338 // "location" 15339 // ], 15340 // "parameters": { 15341 // "location": { 15342 // "description": "The geographic location to process the request. Reserved for future\nextensions.", 15343 // "location": "path", 15344 // "required": true, 15345 // "type": "string" 15346 // }, 15347 // "parent": { 15348 // "description": "The parent resource name, for example projects/my-project-id.", 15349 // "location": "path", 15350 // "pattern": "^projects/[^/]+$", 15351 // "required": true, 15352 // "type": "string" 15353 // } 15354 // }, 15355 // "path": "v2/{+parent}/locations/{location}/image:redact", 15356 // "request": { 15357 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 15358 // }, 15359 // "response": { 15360 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 15361 // }, 15362 // "scopes": [ 15363 // "https://www.googleapis.com/auth/cloud-platform" 15364 // ] 15365 // } 15366 15367} 15368 15369// method id "dlp.projects.storedInfoTypes.create": 15370 15371type ProjectsStoredInfoTypesCreateCall struct { 15372 s *Service 15373 parent string 15374 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 15375 urlParams_ gensupport.URLParams 15376 ctx_ context.Context 15377 header_ http.Header 15378} 15379 15380// Create: Creates a pre-built stored infoType to be used for 15381// inspection. 15382// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 15383// to 15384// learn more. 15385func (r *ProjectsStoredInfoTypesService) Create(parent string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsStoredInfoTypesCreateCall { 15386 c := &ProjectsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15387 c.parent = parent 15388 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 15389 return c 15390} 15391 15392// Fields allows partial responses to be retrieved. See 15393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15394// for more information. 15395func (c *ProjectsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesCreateCall { 15396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15397 return c 15398} 15399 15400// Context sets the context to be used in this call's Do method. Any 15401// pending HTTP request will be aborted if the provided context is 15402// canceled. 15403func (c *ProjectsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsStoredInfoTypesCreateCall { 15404 c.ctx_ = ctx 15405 return c 15406} 15407 15408// Header returns an http.Header that can be modified by the caller to 15409// add HTTP headers to the request. 15410func (c *ProjectsStoredInfoTypesCreateCall) Header() http.Header { 15411 if c.header_ == nil { 15412 c.header_ = make(http.Header) 15413 } 15414 return c.header_ 15415} 15416 15417func (c *ProjectsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 15418 reqHeaders := make(http.Header) 15419 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15420 for k, v := range c.header_ { 15421 reqHeaders[k] = v 15422 } 15423 reqHeaders.Set("User-Agent", c.s.userAgent()) 15424 var body io.Reader = nil 15425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 15426 if err != nil { 15427 return nil, err 15428 } 15429 reqHeaders.Set("Content-Type", "application/json") 15430 c.urlParams_.Set("alt", alt) 15431 c.urlParams_.Set("prettyPrint", "false") 15432 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 15433 urls += "?" + c.urlParams_.Encode() 15434 req, err := http.NewRequest("POST", urls, body) 15435 if err != nil { 15436 return nil, err 15437 } 15438 req.Header = reqHeaders 15439 googleapi.Expand(req.URL, map[string]string{ 15440 "parent": c.parent, 15441 }) 15442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15443} 15444 15445// Do executes the "dlp.projects.storedInfoTypes.create" call. 15446// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 15447// non-nil. Any non-2xx status code is an error. Response headers are in 15448// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 15449// a response was returned at all) in error.(*googleapi.Error).Header. 15450// Use googleapi.IsNotModified to check whether the returned error was 15451// because http.StatusNotModified was returned. 15452func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 15453 gensupport.SetOptions(c.urlParams_, opts...) 15454 res, err := c.doRequest("json") 15455 if res != nil && res.StatusCode == http.StatusNotModified { 15456 if res.Body != nil { 15457 res.Body.Close() 15458 } 15459 return nil, &googleapi.Error{ 15460 Code: res.StatusCode, 15461 Header: res.Header, 15462 } 15463 } 15464 if err != nil { 15465 return nil, err 15466 } 15467 defer googleapi.CloseBody(res) 15468 if err := googleapi.CheckResponse(res); err != nil { 15469 return nil, err 15470 } 15471 ret := &GooglePrivacyDlpV2StoredInfoType{ 15472 ServerResponse: googleapi.ServerResponse{ 15473 Header: res.Header, 15474 HTTPStatusCode: res.StatusCode, 15475 }, 15476 } 15477 target := &ret 15478 if err := gensupport.DecodeResponse(target, res); err != nil { 15479 return nil, err 15480 } 15481 return ret, nil 15482 // { 15483 // "description": "Creates a pre-built stored infoType to be used for inspection.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 15484 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 15485 // "httpMethod": "POST", 15486 // "id": "dlp.projects.storedInfoTypes.create", 15487 // "parameterOrder": [ 15488 // "parent" 15489 // ], 15490 // "parameters": { 15491 // "parent": { 15492 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 15493 // "location": "path", 15494 // "pattern": "^projects/[^/]+$", 15495 // "required": true, 15496 // "type": "string" 15497 // } 15498 // }, 15499 // "path": "v2/{+parent}/storedInfoTypes", 15500 // "request": { 15501 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 15502 // }, 15503 // "response": { 15504 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 15505 // }, 15506 // "scopes": [ 15507 // "https://www.googleapis.com/auth/cloud-platform" 15508 // ] 15509 // } 15510 15511} 15512 15513// method id "dlp.projects.storedInfoTypes.delete": 15514 15515type ProjectsStoredInfoTypesDeleteCall struct { 15516 s *Service 15517 name string 15518 urlParams_ gensupport.URLParams 15519 ctx_ context.Context 15520 header_ http.Header 15521} 15522 15523// Delete: Deletes a stored infoType. 15524// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 15525// to 15526// learn more. 15527func (r *ProjectsStoredInfoTypesService) Delete(name string) *ProjectsStoredInfoTypesDeleteCall { 15528 c := &ProjectsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15529 c.name = name 15530 return c 15531} 15532 15533// Fields allows partial responses to be retrieved. See 15534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15535// for more information. 15536func (c *ProjectsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesDeleteCall { 15537 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15538 return c 15539} 15540 15541// Context sets the context to be used in this call's Do method. Any 15542// pending HTTP request will be aborted if the provided context is 15543// canceled. 15544func (c *ProjectsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsStoredInfoTypesDeleteCall { 15545 c.ctx_ = ctx 15546 return c 15547} 15548 15549// Header returns an http.Header that can be modified by the caller to 15550// add HTTP headers to the request. 15551func (c *ProjectsStoredInfoTypesDeleteCall) Header() http.Header { 15552 if c.header_ == nil { 15553 c.header_ = make(http.Header) 15554 } 15555 return c.header_ 15556} 15557 15558func (c *ProjectsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 15559 reqHeaders := make(http.Header) 15560 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15561 for k, v := range c.header_ { 15562 reqHeaders[k] = v 15563 } 15564 reqHeaders.Set("User-Agent", c.s.userAgent()) 15565 var body io.Reader = nil 15566 c.urlParams_.Set("alt", alt) 15567 c.urlParams_.Set("prettyPrint", "false") 15568 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15569 urls += "?" + c.urlParams_.Encode() 15570 req, err := http.NewRequest("DELETE", urls, body) 15571 if err != nil { 15572 return nil, err 15573 } 15574 req.Header = reqHeaders 15575 googleapi.Expand(req.URL, map[string]string{ 15576 "name": c.name, 15577 }) 15578 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15579} 15580 15581// Do executes the "dlp.projects.storedInfoTypes.delete" call. 15582// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15583// non-2xx status code is an error. Response headers are in either 15584// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15585// returned at all) in error.(*googleapi.Error).Header. Use 15586// googleapi.IsNotModified to check whether the returned error was 15587// because http.StatusNotModified was returned. 15588func (c *ProjectsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15589 gensupport.SetOptions(c.urlParams_, opts...) 15590 res, err := c.doRequest("json") 15591 if res != nil && res.StatusCode == http.StatusNotModified { 15592 if res.Body != nil { 15593 res.Body.Close() 15594 } 15595 return nil, &googleapi.Error{ 15596 Code: res.StatusCode, 15597 Header: res.Header, 15598 } 15599 } 15600 if err != nil { 15601 return nil, err 15602 } 15603 defer googleapi.CloseBody(res) 15604 if err := googleapi.CheckResponse(res); err != nil { 15605 return nil, err 15606 } 15607 ret := &GoogleProtobufEmpty{ 15608 ServerResponse: googleapi.ServerResponse{ 15609 Header: res.Header, 15610 HTTPStatusCode: res.StatusCode, 15611 }, 15612 } 15613 target := &ret 15614 if err := gensupport.DecodeResponse(target, res); err != nil { 15615 return nil, err 15616 } 15617 return ret, nil 15618 // { 15619 // "description": "Deletes a stored infoType.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 15620 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 15621 // "httpMethod": "DELETE", 15622 // "id": "dlp.projects.storedInfoTypes.delete", 15623 // "parameterOrder": [ 15624 // "name" 15625 // ], 15626 // "parameters": { 15627 // "name": { 15628 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 15629 // "location": "path", 15630 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 15631 // "required": true, 15632 // "type": "string" 15633 // } 15634 // }, 15635 // "path": "v2/{+name}", 15636 // "response": { 15637 // "$ref": "GoogleProtobufEmpty" 15638 // }, 15639 // "scopes": [ 15640 // "https://www.googleapis.com/auth/cloud-platform" 15641 // ] 15642 // } 15643 15644} 15645 15646// method id "dlp.projects.storedInfoTypes.get": 15647 15648type ProjectsStoredInfoTypesGetCall struct { 15649 s *Service 15650 name string 15651 urlParams_ gensupport.URLParams 15652 ifNoneMatch_ string 15653 ctx_ context.Context 15654 header_ http.Header 15655} 15656 15657// Get: Gets a stored infoType. 15658// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 15659// to 15660// learn more. 15661func (r *ProjectsStoredInfoTypesService) Get(name string) *ProjectsStoredInfoTypesGetCall { 15662 c := &ProjectsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15663 c.name = name 15664 return c 15665} 15666 15667// Fields allows partial responses to be retrieved. See 15668// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15669// for more information. 15670func (c *ProjectsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesGetCall { 15671 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15672 return c 15673} 15674 15675// IfNoneMatch sets the optional parameter which makes the operation 15676// fail if the object's ETag matches the given value. This is useful for 15677// getting updates only after the object has changed since the last 15678// request. Use googleapi.IsNotModified to check whether the response 15679// error from Do is the result of In-None-Match. 15680func (c *ProjectsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesGetCall { 15681 c.ifNoneMatch_ = entityTag 15682 return c 15683} 15684 15685// Context sets the context to be used in this call's Do method. Any 15686// pending HTTP request will be aborted if the provided context is 15687// canceled. 15688func (c *ProjectsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsStoredInfoTypesGetCall { 15689 c.ctx_ = ctx 15690 return c 15691} 15692 15693// Header returns an http.Header that can be modified by the caller to 15694// add HTTP headers to the request. 15695func (c *ProjectsStoredInfoTypesGetCall) Header() http.Header { 15696 if c.header_ == nil { 15697 c.header_ = make(http.Header) 15698 } 15699 return c.header_ 15700} 15701 15702func (c *ProjectsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 15703 reqHeaders := make(http.Header) 15704 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15705 for k, v := range c.header_ { 15706 reqHeaders[k] = v 15707 } 15708 reqHeaders.Set("User-Agent", c.s.userAgent()) 15709 if c.ifNoneMatch_ != "" { 15710 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15711 } 15712 var body io.Reader = nil 15713 c.urlParams_.Set("alt", alt) 15714 c.urlParams_.Set("prettyPrint", "false") 15715 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15716 urls += "?" + c.urlParams_.Encode() 15717 req, err := http.NewRequest("GET", urls, body) 15718 if err != nil { 15719 return nil, err 15720 } 15721 req.Header = reqHeaders 15722 googleapi.Expand(req.URL, map[string]string{ 15723 "name": c.name, 15724 }) 15725 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15726} 15727 15728// Do executes the "dlp.projects.storedInfoTypes.get" call. 15729// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 15730// non-nil. Any non-2xx status code is an error. Response headers are in 15731// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 15732// a response was returned at all) in error.(*googleapi.Error).Header. 15733// Use googleapi.IsNotModified to check whether the returned error was 15734// because http.StatusNotModified was returned. 15735func (c *ProjectsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 15736 gensupport.SetOptions(c.urlParams_, opts...) 15737 res, err := c.doRequest("json") 15738 if res != nil && res.StatusCode == http.StatusNotModified { 15739 if res.Body != nil { 15740 res.Body.Close() 15741 } 15742 return nil, &googleapi.Error{ 15743 Code: res.StatusCode, 15744 Header: res.Header, 15745 } 15746 } 15747 if err != nil { 15748 return nil, err 15749 } 15750 defer googleapi.CloseBody(res) 15751 if err := googleapi.CheckResponse(res); err != nil { 15752 return nil, err 15753 } 15754 ret := &GooglePrivacyDlpV2StoredInfoType{ 15755 ServerResponse: googleapi.ServerResponse{ 15756 Header: res.Header, 15757 HTTPStatusCode: res.StatusCode, 15758 }, 15759 } 15760 target := &ret 15761 if err := gensupport.DecodeResponse(target, res); err != nil { 15762 return nil, err 15763 } 15764 return ret, nil 15765 // { 15766 // "description": "Gets a stored infoType.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 15767 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 15768 // "httpMethod": "GET", 15769 // "id": "dlp.projects.storedInfoTypes.get", 15770 // "parameterOrder": [ 15771 // "name" 15772 // ], 15773 // "parameters": { 15774 // "name": { 15775 // "description": "Required. Resource name of the organization and storedInfoType to be read, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 15776 // "location": "path", 15777 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 15778 // "required": true, 15779 // "type": "string" 15780 // } 15781 // }, 15782 // "path": "v2/{+name}", 15783 // "response": { 15784 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 15785 // }, 15786 // "scopes": [ 15787 // "https://www.googleapis.com/auth/cloud-platform" 15788 // ] 15789 // } 15790 15791} 15792 15793// method id "dlp.projects.storedInfoTypes.list": 15794 15795type ProjectsStoredInfoTypesListCall struct { 15796 s *Service 15797 parent string 15798 urlParams_ gensupport.URLParams 15799 ifNoneMatch_ string 15800 ctx_ context.Context 15801 header_ http.Header 15802} 15803 15804// List: Lists stored infoTypes. 15805// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 15806// to 15807// learn more. 15808func (r *ProjectsStoredInfoTypesService) List(parent string) *ProjectsStoredInfoTypesListCall { 15809 c := &ProjectsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15810 c.parent = parent 15811 return c 15812} 15813 15814// OrderBy sets the optional parameter "orderBy": Optional comma 15815// separated list of fields to order by, 15816// followed by `asc` or `desc` postfix. This list is 15817// case-insensitive, 15818// default sorting order is ascending, redundant space characters 15819// are 15820// insignificant. 15821// 15822// Example: `name asc, display_name, create_time desc` 15823// 15824// Supported fields are: 15825// 15826// - `create_time`: corresponds to time the most recent version of 15827// the 15828// resource was created. 15829// - `state`: corresponds to the state of the resource. 15830// - `name`: corresponds to resource name. 15831// - `display_name`: corresponds to info type's display name. 15832func (c *ProjectsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsStoredInfoTypesListCall { 15833 c.urlParams_.Set("orderBy", orderBy) 15834 return c 15835} 15836 15837// PageSize sets the optional parameter "pageSize": Optional size of the 15838// page, can be limited by server. If zero server returns 15839// a page of max size 100. 15840func (c *ProjectsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsStoredInfoTypesListCall { 15841 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15842 return c 15843} 15844 15845// PageToken sets the optional parameter "pageToken": Optional page 15846// token to continue retrieval. Comes from previous call 15847// to `ListStoredInfoTypes`. 15848func (c *ProjectsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsStoredInfoTypesListCall { 15849 c.urlParams_.Set("pageToken", pageToken) 15850 return c 15851} 15852 15853// Fields allows partial responses to be retrieved. See 15854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15855// for more information. 15856func (c *ProjectsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesListCall { 15857 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15858 return c 15859} 15860 15861// IfNoneMatch sets the optional parameter which makes the operation 15862// fail if the object's ETag matches the given value. This is useful for 15863// getting updates only after the object has changed since the last 15864// request. Use googleapi.IsNotModified to check whether the response 15865// error from Do is the result of In-None-Match. 15866func (c *ProjectsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesListCall { 15867 c.ifNoneMatch_ = entityTag 15868 return c 15869} 15870 15871// Context sets the context to be used in this call's Do method. Any 15872// pending HTTP request will be aborted if the provided context is 15873// canceled. 15874func (c *ProjectsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsStoredInfoTypesListCall { 15875 c.ctx_ = ctx 15876 return c 15877} 15878 15879// Header returns an http.Header that can be modified by the caller to 15880// add HTTP headers to the request. 15881func (c *ProjectsStoredInfoTypesListCall) Header() http.Header { 15882 if c.header_ == nil { 15883 c.header_ = make(http.Header) 15884 } 15885 return c.header_ 15886} 15887 15888func (c *ProjectsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 15889 reqHeaders := make(http.Header) 15890 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 15891 for k, v := range c.header_ { 15892 reqHeaders[k] = v 15893 } 15894 reqHeaders.Set("User-Agent", c.s.userAgent()) 15895 if c.ifNoneMatch_ != "" { 15896 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15897 } 15898 var body io.Reader = nil 15899 c.urlParams_.Set("alt", alt) 15900 c.urlParams_.Set("prettyPrint", "false") 15901 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 15902 urls += "?" + c.urlParams_.Encode() 15903 req, err := http.NewRequest("GET", urls, body) 15904 if err != nil { 15905 return nil, err 15906 } 15907 req.Header = reqHeaders 15908 googleapi.Expand(req.URL, map[string]string{ 15909 "parent": c.parent, 15910 }) 15911 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15912} 15913 15914// Do executes the "dlp.projects.storedInfoTypes.list" call. 15915// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 15916// error will be non-nil. Any non-2xx status code is an error. Response 15917// headers are in either 15918// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 15919// or (if a response was returned at all) in 15920// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15921// whether the returned error was because http.StatusNotModified was 15922// returned. 15923func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 15924 gensupport.SetOptions(c.urlParams_, opts...) 15925 res, err := c.doRequest("json") 15926 if res != nil && res.StatusCode == http.StatusNotModified { 15927 if res.Body != nil { 15928 res.Body.Close() 15929 } 15930 return nil, &googleapi.Error{ 15931 Code: res.StatusCode, 15932 Header: res.Header, 15933 } 15934 } 15935 if err != nil { 15936 return nil, err 15937 } 15938 defer googleapi.CloseBody(res) 15939 if err := googleapi.CheckResponse(res); err != nil { 15940 return nil, err 15941 } 15942 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 15943 ServerResponse: googleapi.ServerResponse{ 15944 Header: res.Header, 15945 HTTPStatusCode: res.StatusCode, 15946 }, 15947 } 15948 target := &ret 15949 if err := gensupport.DecodeResponse(target, res); err != nil { 15950 return nil, err 15951 } 15952 return ret, nil 15953 // { 15954 // "description": "Lists stored infoTypes.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 15955 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 15956 // "httpMethod": "GET", 15957 // "id": "dlp.projects.storedInfoTypes.list", 15958 // "parameterOrder": [ 15959 // "parent" 15960 // ], 15961 // "parameters": { 15962 // "orderBy": { 15963 // "description": "Optional comma separated list of fields to order by,\nfollowed by `asc` or `desc` postfix. This list is case-insensitive,\ndefault sorting order is ascending, redundant space characters are\ninsignificant.\n\nExample: `name asc, display_name, create_time desc`\n\nSupported fields are:\n\n- `create_time`: corresponds to time the most recent version of the\nresource was created.\n- `state`: corresponds to the state of the resource.\n- `name`: corresponds to resource name.\n- `display_name`: corresponds to info type's display name.", 15964 // "location": "query", 15965 // "type": "string" 15966 // }, 15967 // "pageSize": { 15968 // "description": "Optional size of the page, can be limited by server. If zero server returns\na page of max size 100.", 15969 // "format": "int32", 15970 // "location": "query", 15971 // "type": "integer" 15972 // }, 15973 // "pageToken": { 15974 // "description": "Optional page token to continue retrieval. Comes from previous call\nto `ListStoredInfoTypes`.", 15975 // "location": "query", 15976 // "type": "string" 15977 // }, 15978 // "parent": { 15979 // "description": "Required. The parent resource name, for example projects/my-project-id or\norganizations/my-org-id.", 15980 // "location": "path", 15981 // "pattern": "^projects/[^/]+$", 15982 // "required": true, 15983 // "type": "string" 15984 // } 15985 // }, 15986 // "path": "v2/{+parent}/storedInfoTypes", 15987 // "response": { 15988 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 15989 // }, 15990 // "scopes": [ 15991 // "https://www.googleapis.com/auth/cloud-platform" 15992 // ] 15993 // } 15994 15995} 15996 15997// Pages invokes f for each page of results. 15998// A non-nil error returned from f will halt the iteration. 15999// The provided context supersedes any context provided to the Context method. 16000func (c *ProjectsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 16001 c.ctx_ = ctx 16002 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16003 for { 16004 x, err := c.Do() 16005 if err != nil { 16006 return err 16007 } 16008 if err := f(x); err != nil { 16009 return err 16010 } 16011 if x.NextPageToken == "" { 16012 return nil 16013 } 16014 c.PageToken(x.NextPageToken) 16015 } 16016} 16017 16018// method id "dlp.projects.storedInfoTypes.patch": 16019 16020type ProjectsStoredInfoTypesPatchCall struct { 16021 s *Service 16022 name string 16023 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 16024 urlParams_ gensupport.URLParams 16025 ctx_ context.Context 16026 header_ http.Header 16027} 16028 16029// Patch: Updates the stored infoType by creating a new version. The 16030// existing version 16031// will continue to be used until the new version is ready. 16032// See https://cloud.google.com/dlp/docs/creating-stored-infotypes 16033// to 16034// learn more. 16035func (r *ProjectsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsStoredInfoTypesPatchCall { 16036 c := &ProjectsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16037 c.name = name 16038 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 16039 return c 16040} 16041 16042// Fields allows partial responses to be retrieved. See 16043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16044// for more information. 16045func (c *ProjectsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesPatchCall { 16046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16047 return c 16048} 16049 16050// Context sets the context to be used in this call's Do method. Any 16051// pending HTTP request will be aborted if the provided context is 16052// canceled. 16053func (c *ProjectsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsStoredInfoTypesPatchCall { 16054 c.ctx_ = ctx 16055 return c 16056} 16057 16058// Header returns an http.Header that can be modified by the caller to 16059// add HTTP headers to the request. 16060func (c *ProjectsStoredInfoTypesPatchCall) Header() http.Header { 16061 if c.header_ == nil { 16062 c.header_ = make(http.Header) 16063 } 16064 return c.header_ 16065} 16066 16067func (c *ProjectsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 16068 reqHeaders := make(http.Header) 16069 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 16070 for k, v := range c.header_ { 16071 reqHeaders[k] = v 16072 } 16073 reqHeaders.Set("User-Agent", c.s.userAgent()) 16074 var body io.Reader = nil 16075 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 16076 if err != nil { 16077 return nil, err 16078 } 16079 reqHeaders.Set("Content-Type", "application/json") 16080 c.urlParams_.Set("alt", alt) 16081 c.urlParams_.Set("prettyPrint", "false") 16082 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16083 urls += "?" + c.urlParams_.Encode() 16084 req, err := http.NewRequest("PATCH", urls, body) 16085 if err != nil { 16086 return nil, err 16087 } 16088 req.Header = reqHeaders 16089 googleapi.Expand(req.URL, map[string]string{ 16090 "name": c.name, 16091 }) 16092 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16093} 16094 16095// Do executes the "dlp.projects.storedInfoTypes.patch" call. 16096// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 16097// non-nil. Any non-2xx status code is an error. Response headers are in 16098// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 16099// a response was returned at all) in error.(*googleapi.Error).Header. 16100// Use googleapi.IsNotModified to check whether the returned error was 16101// because http.StatusNotModified was returned. 16102func (c *ProjectsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 16103 gensupport.SetOptions(c.urlParams_, opts...) 16104 res, err := c.doRequest("json") 16105 if res != nil && res.StatusCode == http.StatusNotModified { 16106 if res.Body != nil { 16107 res.Body.Close() 16108 } 16109 return nil, &googleapi.Error{ 16110 Code: res.StatusCode, 16111 Header: res.Header, 16112 } 16113 } 16114 if err != nil { 16115 return nil, err 16116 } 16117 defer googleapi.CloseBody(res) 16118 if err := googleapi.CheckResponse(res); err != nil { 16119 return nil, err 16120 } 16121 ret := &GooglePrivacyDlpV2StoredInfoType{ 16122 ServerResponse: googleapi.ServerResponse{ 16123 Header: res.Header, 16124 HTTPStatusCode: res.StatusCode, 16125 }, 16126 } 16127 target := &ret 16128 if err := gensupport.DecodeResponse(target, res); err != nil { 16129 return nil, err 16130 } 16131 return ret, nil 16132 // { 16133 // "description": "Updates the stored infoType by creating a new version. The existing version\nwill continue to be used until the new version is ready.\nSee https://cloud.google.com/dlp/docs/creating-stored-infotypes to\nlearn more.", 16134 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 16135 // "httpMethod": "PATCH", 16136 // "id": "dlp.projects.storedInfoTypes.patch", 16137 // "parameterOrder": [ 16138 // "name" 16139 // ], 16140 // "parameters": { 16141 // "name": { 16142 // "description": "Required. Resource name of organization and storedInfoType to be updated, for\nexample `organizations/433245324/storedInfoTypes/432452342` or\nprojects/project-id/storedInfoTypes/432452342.", 16143 // "location": "path", 16144 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 16145 // "required": true, 16146 // "type": "string" 16147 // } 16148 // }, 16149 // "path": "v2/{+name}", 16150 // "request": { 16151 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 16152 // }, 16153 // "response": { 16154 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 16155 // }, 16156 // "scopes": [ 16157 // "https://www.googleapis.com/auth/cloud-platform" 16158 // ] 16159 // } 16160 16161} 16162