1// Copyright 2020 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 internaloption "google.golang.org/api/option/internaloption" 58 htransport "google.golang.org/api/transport/http" 59) 60 61// Always reference these packages, just in case the auto-generated code 62// below doesn't. 63var _ = bytes.NewBuffer 64var _ = strconv.Itoa 65var _ = fmt.Sprintf 66var _ = json.NewDecoder 67var _ = io.Copy 68var _ = url.Parse 69var _ = gensupport.MarshalJSON 70var _ = googleapi.Version 71var _ = errors.New 72var _ = strings.Replace 73var _ = context.Canceled 74var _ = internaloption.WithDefaultEndpoint 75 76const apiId = "dlp:v2" 77const apiName = "dlp" 78const apiVersion = "v2" 79const basePath = "https://dlp.googleapis.com/" 80const mtlsBasePath = "https://dlp.mtls.googleapis.com/" 81 82// OAuth2 scopes used by this API. 83const ( 84 // View and manage your data across Google Cloud Platform services 85 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 86) 87 88// NewService creates a new Service. 89func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 90 scopesOption := option.WithScopes( 91 "https://www.googleapis.com/auth/cloud-platform", 92 ) 93 // NOTE: prepend, so we don't override user-specified scopes. 94 opts = append([]option.ClientOption{scopesOption}, opts...) 95 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 96 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 97 client, endpoint, err := htransport.NewClient(ctx, opts...) 98 if err != nil { 99 return nil, err 100 } 101 s, err := New(client) 102 if err != nil { 103 return nil, err 104 } 105 if endpoint != "" { 106 s.BasePath = endpoint 107 } 108 return s, nil 109} 110 111// New creates a new Service. It uses the provided http.Client for requests. 112// 113// Deprecated: please use NewService instead. 114// To provide a custom HTTP client, use option.WithHTTPClient. 115// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 116func New(client *http.Client) (*Service, error) { 117 if client == nil { 118 return nil, errors.New("client is nil") 119 } 120 s := &Service{client: client, BasePath: basePath} 121 s.InfoTypes = NewInfoTypesService(s) 122 s.Locations = NewLocationsService(s) 123 s.Organizations = NewOrganizationsService(s) 124 s.Projects = NewProjectsService(s) 125 return s, nil 126} 127 128type Service struct { 129 client *http.Client 130 BasePath string // API endpoint base URL 131 UserAgent string // optional additional User-Agent fragment 132 133 InfoTypes *InfoTypesService 134 135 Locations *LocationsService 136 137 Organizations *OrganizationsService 138 139 Projects *ProjectsService 140} 141 142func (s *Service) userAgent() string { 143 if s.UserAgent == "" { 144 return googleapi.UserAgent 145 } 146 return googleapi.UserAgent + " " + s.UserAgent 147} 148 149func NewInfoTypesService(s *Service) *InfoTypesService { 150 rs := &InfoTypesService{s: s} 151 return rs 152} 153 154type InfoTypesService struct { 155 s *Service 156} 157 158func NewLocationsService(s *Service) *LocationsService { 159 rs := &LocationsService{s: s} 160 rs.InfoTypes = NewLocationsInfoTypesService(s) 161 return rs 162} 163 164type LocationsService struct { 165 s *Service 166 167 InfoTypes *LocationsInfoTypesService 168} 169 170func NewLocationsInfoTypesService(s *Service) *LocationsInfoTypesService { 171 rs := &LocationsInfoTypesService{s: s} 172 return rs 173} 174 175type LocationsInfoTypesService struct { 176 s *Service 177} 178 179func NewOrganizationsService(s *Service) *OrganizationsService { 180 rs := &OrganizationsService{s: s} 181 rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s) 182 rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s) 183 rs.Locations = NewOrganizationsLocationsService(s) 184 rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s) 185 return rs 186} 187 188type OrganizationsService struct { 189 s *Service 190 191 DeidentifyTemplates *OrganizationsDeidentifyTemplatesService 192 193 InspectTemplates *OrganizationsInspectTemplatesService 194 195 Locations *OrganizationsLocationsService 196 197 StoredInfoTypes *OrganizationsStoredInfoTypesService 198} 199 200func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService { 201 rs := &OrganizationsDeidentifyTemplatesService{s: s} 202 return rs 203} 204 205type OrganizationsDeidentifyTemplatesService struct { 206 s *Service 207} 208 209func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService { 210 rs := &OrganizationsInspectTemplatesService{s: s} 211 return rs 212} 213 214type OrganizationsInspectTemplatesService struct { 215 s *Service 216} 217 218func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { 219 rs := &OrganizationsLocationsService{s: s} 220 rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) 221 rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s) 222 rs.StoredInfoTypes = NewOrganizationsLocationsStoredInfoTypesService(s) 223 return rs 224} 225 226type OrganizationsLocationsService struct { 227 s *Service 228 229 DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService 230 231 InspectTemplates *OrganizationsLocationsInspectTemplatesService 232 233 StoredInfoTypes *OrganizationsLocationsStoredInfoTypesService 234} 235 236func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService { 237 rs := &OrganizationsLocationsDeidentifyTemplatesService{s: s} 238 return rs 239} 240 241type OrganizationsLocationsDeidentifyTemplatesService struct { 242 s *Service 243} 244 245func NewOrganizationsLocationsInspectTemplatesService(s *Service) *OrganizationsLocationsInspectTemplatesService { 246 rs := &OrganizationsLocationsInspectTemplatesService{s: s} 247 return rs 248} 249 250type OrganizationsLocationsInspectTemplatesService struct { 251 s *Service 252} 253 254func NewOrganizationsLocationsStoredInfoTypesService(s *Service) *OrganizationsLocationsStoredInfoTypesService { 255 rs := &OrganizationsLocationsStoredInfoTypesService{s: s} 256 return rs 257} 258 259type OrganizationsLocationsStoredInfoTypesService struct { 260 s *Service 261} 262 263func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService { 264 rs := &OrganizationsStoredInfoTypesService{s: s} 265 return rs 266} 267 268type OrganizationsStoredInfoTypesService struct { 269 s *Service 270} 271 272func NewProjectsService(s *Service) *ProjectsService { 273 rs := &ProjectsService{s: s} 274 rs.Content = NewProjectsContentService(s) 275 rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s) 276 rs.DlpJobs = NewProjectsDlpJobsService(s) 277 rs.Image = NewProjectsImageService(s) 278 rs.InspectTemplates = NewProjectsInspectTemplatesService(s) 279 rs.JobTriggers = NewProjectsJobTriggersService(s) 280 rs.Locations = NewProjectsLocationsService(s) 281 rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s) 282 return rs 283} 284 285type ProjectsService struct { 286 s *Service 287 288 Content *ProjectsContentService 289 290 DeidentifyTemplates *ProjectsDeidentifyTemplatesService 291 292 DlpJobs *ProjectsDlpJobsService 293 294 Image *ProjectsImageService 295 296 InspectTemplates *ProjectsInspectTemplatesService 297 298 JobTriggers *ProjectsJobTriggersService 299 300 Locations *ProjectsLocationsService 301 302 StoredInfoTypes *ProjectsStoredInfoTypesService 303} 304 305func NewProjectsContentService(s *Service) *ProjectsContentService { 306 rs := &ProjectsContentService{s: s} 307 return rs 308} 309 310type ProjectsContentService struct { 311 s *Service 312} 313 314func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService { 315 rs := &ProjectsDeidentifyTemplatesService{s: s} 316 return rs 317} 318 319type ProjectsDeidentifyTemplatesService struct { 320 s *Service 321} 322 323func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService { 324 rs := &ProjectsDlpJobsService{s: s} 325 return rs 326} 327 328type ProjectsDlpJobsService struct { 329 s *Service 330} 331 332func NewProjectsImageService(s *Service) *ProjectsImageService { 333 rs := &ProjectsImageService{s: s} 334 return rs 335} 336 337type ProjectsImageService struct { 338 s *Service 339} 340 341func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService { 342 rs := &ProjectsInspectTemplatesService{s: s} 343 return rs 344} 345 346type ProjectsInspectTemplatesService struct { 347 s *Service 348} 349 350func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService { 351 rs := &ProjectsJobTriggersService{s: s} 352 return rs 353} 354 355type ProjectsJobTriggersService struct { 356 s *Service 357} 358 359func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 360 rs := &ProjectsLocationsService{s: s} 361 rs.Content = NewProjectsLocationsContentService(s) 362 rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) 363 rs.DlpJobs = NewProjectsLocationsDlpJobsService(s) 364 rs.Image = NewProjectsLocationsImageService(s) 365 rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s) 366 rs.JobTriggers = NewProjectsLocationsJobTriggersService(s) 367 rs.StoredInfoTypes = NewProjectsLocationsStoredInfoTypesService(s) 368 return rs 369} 370 371type ProjectsLocationsService struct { 372 s *Service 373 374 Content *ProjectsLocationsContentService 375 376 DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService 377 378 DlpJobs *ProjectsLocationsDlpJobsService 379 380 Image *ProjectsLocationsImageService 381 382 InspectTemplates *ProjectsLocationsInspectTemplatesService 383 384 JobTriggers *ProjectsLocationsJobTriggersService 385 386 StoredInfoTypes *ProjectsLocationsStoredInfoTypesService 387} 388 389func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { 390 rs := &ProjectsLocationsContentService{s: s} 391 return rs 392} 393 394type ProjectsLocationsContentService struct { 395 s *Service 396} 397 398func NewProjectsLocationsDeidentifyTemplatesService(s *Service) *ProjectsLocationsDeidentifyTemplatesService { 399 rs := &ProjectsLocationsDeidentifyTemplatesService{s: s} 400 return rs 401} 402 403type ProjectsLocationsDeidentifyTemplatesService struct { 404 s *Service 405} 406 407func NewProjectsLocationsDlpJobsService(s *Service) *ProjectsLocationsDlpJobsService { 408 rs := &ProjectsLocationsDlpJobsService{s: s} 409 return rs 410} 411 412type ProjectsLocationsDlpJobsService struct { 413 s *Service 414} 415 416func NewProjectsLocationsImageService(s *Service) *ProjectsLocationsImageService { 417 rs := &ProjectsLocationsImageService{s: s} 418 return rs 419} 420 421type ProjectsLocationsImageService struct { 422 s *Service 423} 424 425func NewProjectsLocationsInspectTemplatesService(s *Service) *ProjectsLocationsInspectTemplatesService { 426 rs := &ProjectsLocationsInspectTemplatesService{s: s} 427 return rs 428} 429 430type ProjectsLocationsInspectTemplatesService struct { 431 s *Service 432} 433 434func NewProjectsLocationsJobTriggersService(s *Service) *ProjectsLocationsJobTriggersService { 435 rs := &ProjectsLocationsJobTriggersService{s: s} 436 return rs 437} 438 439type ProjectsLocationsJobTriggersService struct { 440 s *Service 441} 442 443func NewProjectsLocationsStoredInfoTypesService(s *Service) *ProjectsLocationsStoredInfoTypesService { 444 rs := &ProjectsLocationsStoredInfoTypesService{s: s} 445 return rs 446} 447 448type ProjectsLocationsStoredInfoTypesService struct { 449 s *Service 450} 451 452func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService { 453 rs := &ProjectsStoredInfoTypesService{s: s} 454 return rs 455} 456 457type ProjectsStoredInfoTypesService struct { 458 s *Service 459} 460 461// GooglePrivacyDlpV2Action: A task to execute on the completion of a 462// job. See https://cloud.google.com/dlp/docs/concepts-actions to learn 463// more. 464type GooglePrivacyDlpV2Action struct { 465 // JobNotificationEmails: Enable email notification for project owners 466 // and editors on job's completion/failure. 467 JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` 468 469 // PubSub: Publish a notification to a pubsub topic. 470 PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"` 471 472 // PublishFindingsToCloudDataCatalog: Publish findings to Cloud Datahub. 473 PublishFindingsToCloudDataCatalog *GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog `json:"publishFindingsToCloudDataCatalog,omitempty"` 474 475 // PublishSummaryToCscc: Publish summary to Cloud Security Command 476 // Center (Alpha). 477 PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"` 478 479 // PublishToStackdriver: Enable Stackdriver metric 480 // dlp.googleapis.com/finding_count. 481 PublishToStackdriver *GooglePrivacyDlpV2PublishToStackdriver `json:"publishToStackdriver,omitempty"` 482 483 // SaveFindings: Save resulting findings in a provided location. 484 SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"` 485 486 // ForceSendFields is a list of field names (e.g. 487 // "JobNotificationEmails") to unconditionally include in API requests. 488 // By default, fields with empty values are omitted from API requests. 489 // However, any non-pointer, non-interface field appearing in 490 // ForceSendFields will be sent to the server regardless of whether the 491 // field is empty or not. This may be used to include empty fields in 492 // Patch requests. 493 ForceSendFields []string `json:"-"` 494 495 // NullFields is a list of field names (e.g. "JobNotificationEmails") to 496 // include in API requests with the JSON null value. By default, fields 497 // with empty values are omitted from API requests. However, any field 498 // with an empty value appearing in NullFields will be sent to the 499 // server as null. It is an error if a field in this list has a 500 // non-empty value. This may be used to include null fields in Patch 501 // requests. 502 NullFields []string `json:"-"` 503} 504 505func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) { 506 type NoMethod GooglePrivacyDlpV2Action 507 raw := NoMethod(*s) 508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 509} 510 511// GooglePrivacyDlpV2ActivateJobTriggerRequest: Request message for 512// ActivateJobTrigger. 513type GooglePrivacyDlpV2ActivateJobTriggerRequest struct { 514} 515 516// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk 517// analysis operation request. 518type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct { 519 // CategoricalStatsResult: Categorical stats result 520 CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` 521 522 // DeltaPresenceEstimationResult: Delta-presence result 523 DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"` 524 525 // KAnonymityResult: K-anonymity result 526 KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"` 527 528 // KMapEstimationResult: K-map result 529 KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"` 530 531 // LDiversityResult: L-divesity result 532 LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"` 533 534 // NumericalStatsResult: Numerical stats result 535 NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"` 536 537 // RequestedOptions: The configuration used for this job. 538 RequestedOptions *GooglePrivacyDlpV2RequestedRiskAnalysisOptions `json:"requestedOptions,omitempty"` 539 540 // RequestedPrivacyMetric: Privacy metric to compute. 541 RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` 542 543 // RequestedSourceTable: Input dataset to compute metrics over. 544 RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"` 545 546 // ForceSendFields is a list of field names (e.g. 547 // "CategoricalStatsResult") to unconditionally include in API requests. 548 // By default, fields with empty values are omitted from API requests. 549 // However, any non-pointer, non-interface field appearing in 550 // ForceSendFields will be sent to the server regardless of whether the 551 // field is empty or not. This may be used to include empty fields in 552 // Patch requests. 553 ForceSendFields []string `json:"-"` 554 555 // NullFields is a list of field names (e.g. "CategoricalStatsResult") 556 // to include in API requests with the JSON null value. By default, 557 // fields with empty values are omitted from API requests. However, any 558 // field with an empty value appearing in NullFields will be sent to the 559 // server as null. It is an error if a field in this list has a 560 // non-empty value. This may be used to include null fields in Patch 561 // requests. 562 NullFields []string `json:"-"` 563} 564 565func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) { 566 type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails 567 raw := NoMethod(*s) 568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 569} 570 571// GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains 572// statistical information on the relative frequency of different 573// quasi-identifiers values. It has one or several quasi-identifiers 574// columns, and one column that indicates the relative frequency of each 575// quasi-identifier tuple. If a tuple is present in the data but not in 576// the auxiliary table, the corresponding relative frequency is assumed 577// to be zero (and thus, the tuple is highly reidentifiable). 578type GooglePrivacyDlpV2AuxiliaryTable struct { 579 // QuasiIds: Required. Quasi-identifier columns. 580 QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"` 581 582 // RelativeFrequency: Required. The relative frequency column must 583 // contain a floating-point number between 0 and 1 (inclusive). Null 584 // values are assumed to be zero. 585 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 586 587 // Table: Required. Auxiliary table location. 588 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 589 590 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 591 // unconditionally include in API requests. By default, fields with 592 // empty values are omitted from API requests. However, any non-pointer, 593 // non-interface field appearing in ForceSendFields will be sent to the 594 // server regardless of whether the field is empty or not. This may be 595 // used to include empty fields in Patch requests. 596 ForceSendFields []string `json:"-"` 597 598 // NullFields is a list of field names (e.g. "QuasiIds") to include in 599 // API requests with the JSON null value. By default, fields with empty 600 // values are omitted from API requests. However, any field with an 601 // empty value appearing in NullFields will be sent to the server as 602 // null. It is an error if a field in this list has a non-empty value. 603 // This may be used to include null fields in Patch requests. 604 NullFields []string `json:"-"` 605} 606 607func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) { 608 type NoMethod GooglePrivacyDlpV2AuxiliaryTable 609 raw := NoMethod(*s) 610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 611} 612 613// GooglePrivacyDlpV2BigQueryField: Message defining a field of a 614// BigQuery table. 615type GooglePrivacyDlpV2BigQueryField struct { 616 // Field: Designated field in the BigQuery table. 617 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 618 619 // Table: Source table of the field. 620 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 621 622 // ForceSendFields is a list of field names (e.g. "Field") to 623 // unconditionally include in API requests. By default, fields with 624 // empty values are omitted from API requests. However, any non-pointer, 625 // non-interface field appearing in ForceSendFields will be sent to the 626 // server regardless of whether the field is empty or not. This may be 627 // used to include empty fields in Patch requests. 628 ForceSendFields []string `json:"-"` 629 630 // NullFields is a list of field names (e.g. "Field") to include in API 631 // requests with the JSON null value. By default, fields with empty 632 // values are omitted from API requests. However, any field with an 633 // empty value appearing in NullFields will be sent to the server as 634 // null. It is an error if a field in this list has a non-empty value. 635 // This may be used to include null fields in Patch requests. 636 NullFields []string `json:"-"` 637} 638 639func (s *GooglePrivacyDlpV2BigQueryField) MarshalJSON() ([]byte, error) { 640 type NoMethod GooglePrivacyDlpV2BigQueryField 641 raw := NoMethod(*s) 642 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 643} 644 645// GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in 646// BigQuery table. 647type GooglePrivacyDlpV2BigQueryKey struct { 648 // RowNumber: Row number inferred at the time the table was scanned. 649 // This value is nondeterministic, cannot be queried, and may be null 650 // for inspection jobs. To locate findings within a table, specify 651 // `inspect_job.storage_config.big_query_options.identifying_fields` in 652 // `CreateDlpJobRequest`. 653 RowNumber int64 `json:"rowNumber,omitempty,string"` 654 655 // TableReference: Complete BigQuery table reference. 656 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 657 658 // ForceSendFields is a list of field names (e.g. "RowNumber") to 659 // unconditionally include in API requests. By default, fields with 660 // empty values are omitted from API requests. However, any non-pointer, 661 // non-interface field appearing in ForceSendFields will be sent to the 662 // server regardless of whether the field is empty or not. This may be 663 // used to include empty fields in Patch requests. 664 ForceSendFields []string `json:"-"` 665 666 // NullFields is a list of field names (e.g. "RowNumber") to include in 667 // API requests with the JSON null value. By default, fields with empty 668 // values are omitted from API requests. However, any field with an 669 // empty value appearing in NullFields will be sent to the server as 670 // null. It is an error if a field in this list has a non-empty value. 671 // This may be used to include null fields in Patch requests. 672 NullFields []string `json:"-"` 673} 674 675func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) { 676 type NoMethod GooglePrivacyDlpV2BigQueryKey 677 raw := NoMethod(*s) 678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 679} 680 681// GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table 682// and row identifiers. 683type GooglePrivacyDlpV2BigQueryOptions struct { 684 // ExcludedFields: References to fields excluded from scanning. This 685 // allows you to skip inspection of entire columns which you know have 686 // no findings. 687 ExcludedFields []*GooglePrivacyDlpV2FieldId `json:"excludedFields,omitempty"` 688 689 // IdentifyingFields: Table fields that may uniquely identify a row 690 // within the table. When `actions.saveFindings.outputConfig.table` is 691 // specified, the values of columns specified here are available in the 692 // output table under 693 // `location.content_locations.record_location.record_key.id_values`. 694 // Nested fields such as `person.birthdate.year` are allowed. 695 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 696 697 // RowsLimit: Max number of rows to scan. If the table has more rows 698 // than this value, the rest of the rows are omitted. If not set, or if 699 // set to 0, all rows will be scanned. Only one of rows_limit and 700 // rows_limit_percent can be specified. Cannot be used in conjunction 701 // with TimespanConfig. 702 RowsLimit int64 `json:"rowsLimit,omitempty,string"` 703 704 // RowsLimitPercent: Max percentage of rows to scan. The rest are 705 // omitted. The number of rows scanned is rounded down. Must be between 706 // 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. 707 // Only one of rows_limit and rows_limit_percent can be specified. 708 // Cannot be used in conjunction with TimespanConfig. 709 RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"` 710 711 // Possible values: 712 // "SAMPLE_METHOD_UNSPECIFIED" 713 // "TOP" - Scan groups of rows in the order BigQuery provides 714 // (default). Multiple groups of rows may be scanned in parallel, so 715 // results may not appear in the same order the rows are read. 716 // "RANDOM_START" - Randomly pick groups of rows to scan. 717 SampleMethod string `json:"sampleMethod,omitempty"` 718 719 // TableReference: Complete BigQuery table reference. 720 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 721 722 // ForceSendFields is a list of field names (e.g. "ExcludedFields") to 723 // unconditionally include in API requests. By default, fields with 724 // empty values are omitted from API requests. However, any non-pointer, 725 // non-interface field appearing in ForceSendFields will be sent to the 726 // server regardless of whether the field is empty or not. This may be 727 // used to include empty fields in Patch requests. 728 ForceSendFields []string `json:"-"` 729 730 // NullFields is a list of field names (e.g. "ExcludedFields") to 731 // include in API requests with the JSON null value. By default, fields 732 // with empty values are omitted from API requests. However, any field 733 // with an empty value appearing in NullFields will be sent to the 734 // server as null. It is an error if a field in this list has a 735 // non-empty value. This may be used to include null fields in Patch 736 // requests. 737 NullFields []string `json:"-"` 738} 739 740func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) { 741 type NoMethod GooglePrivacyDlpV2BigQueryOptions 742 raw := NoMethod(*s) 743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 744} 745 746// GooglePrivacyDlpV2BigQueryTable: Message defining the location of a 747// BigQuery table. A table is uniquely identified by its project_id, 748// dataset_id, and table_name. Within a query a table is often 749// referenced with a string in the format of: `:.` or `..`. 750type GooglePrivacyDlpV2BigQueryTable struct { 751 // DatasetId: Dataset ID of the table. 752 DatasetId string `json:"datasetId,omitempty"` 753 754 // ProjectId: The Google Cloud Platform project ID of the project 755 // containing the table. If omitted, project ID is inferred from the API 756 // call. 757 ProjectId string `json:"projectId,omitempty"` 758 759 // TableId: Name of the table. 760 TableId string `json:"tableId,omitempty"` 761 762 // ForceSendFields is a list of field names (e.g. "DatasetId") to 763 // unconditionally include in API requests. By default, fields with 764 // empty values are omitted from API requests. However, any non-pointer, 765 // non-interface field appearing in ForceSendFields will be sent to the 766 // server regardless of whether the field is empty or not. This may be 767 // used to include empty fields in Patch requests. 768 ForceSendFields []string `json:"-"` 769 770 // NullFields is a list of field names (e.g. "DatasetId") to include in 771 // API requests with the JSON null value. By default, fields with empty 772 // values are omitted from API requests. However, any field with an 773 // empty value appearing in NullFields will be sent to the server as 774 // null. It is an error if a field in this list has a non-empty value. 775 // This may be used to include null fields in Patch requests. 776 NullFields []string `json:"-"` 777} 778 779func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) { 780 type NoMethod GooglePrivacyDlpV2BigQueryTable 781 raw := NoMethod(*s) 782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 783} 784 785// GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected 786// text within an image. 787type GooglePrivacyDlpV2BoundingBox struct { 788 // Height: Height of the bounding box in pixels. 789 Height int64 `json:"height,omitempty"` 790 791 // Left: Left coordinate of the bounding box. (0,0) is upper left. 792 Left int64 `json:"left,omitempty"` 793 794 // Top: Top coordinate of the bounding box. (0,0) is upper left. 795 Top int64 `json:"top,omitempty"` 796 797 // Width: Width of the bounding box in pixels. 798 Width int64 `json:"width,omitempty"` 799 800 // ForceSendFields is a list of field names (e.g. "Height") to 801 // unconditionally include in API requests. By default, fields with 802 // empty values are omitted from API requests. However, any non-pointer, 803 // non-interface field appearing in ForceSendFields will be sent to the 804 // server regardless of whether the field is empty or not. This may be 805 // used to include empty fields in Patch requests. 806 ForceSendFields []string `json:"-"` 807 808 // NullFields is a list of field names (e.g. "Height") to include in API 809 // requests with the JSON null value. By default, fields with empty 810 // values are omitted from API requests. However, any field with an 811 // empty value appearing in NullFields will be sent to the server as 812 // null. It is an error if a field in this list has a non-empty value. 813 // This may be used to include null fields in Patch requests. 814 NullFields []string `json:"-"` 815} 816 817func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) { 818 type NoMethod GooglePrivacyDlpV2BoundingBox 819 raw := NoMethod(*s) 820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 821} 822 823// GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along 824// with replacement values. 825type GooglePrivacyDlpV2Bucket struct { 826 // Max: Upper bound of the range, exclusive; type must match min. 827 Max *GooglePrivacyDlpV2Value `json:"max,omitempty"` 828 829 // Min: Lower bound of the range, inclusive. Type should be the same as 830 // max if used. 831 Min *GooglePrivacyDlpV2Value `json:"min,omitempty"` 832 833 // ReplacementValue: Required. Replacement value for this bucket. 834 ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"` 835 836 // ForceSendFields is a list of field names (e.g. "Max") to 837 // unconditionally include in API requests. By default, fields with 838 // empty values are omitted from API requests. However, any non-pointer, 839 // non-interface field appearing in ForceSendFields will be sent to the 840 // server regardless of whether the field is empty or not. This may be 841 // used to include empty fields in Patch requests. 842 ForceSendFields []string `json:"-"` 843 844 // NullFields is a list of field names (e.g. "Max") to include in API 845 // requests with the JSON null value. By default, fields with empty 846 // values are omitted from API requests. However, any field with an 847 // empty value appearing in NullFields will be sent to the server as 848 // null. It is an error if a field in this list has a non-empty value. 849 // This may be used to include null fields in Patch requests. 850 NullFields []string `json:"-"` 851} 852 853func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) { 854 type NoMethod GooglePrivacyDlpV2Bucket 855 raw := NoMethod(*s) 856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 857} 858 859// GooglePrivacyDlpV2BucketingConfig: Generalization function that 860// buckets values based on ranges. The ranges and replacement values are 861// dynamically provided by the user for custom behavior, such as 1-30 -> 862// LOW 31-65 -> MEDIUM 66-100 -> HIGH This can be used on data of type: 863// number, long, string, timestamp. If the bound `Value` type differs 864// from the type of data being transformed, we will first attempt 865// converting the type of the data to be transformed to match the type 866// of the bound before comparing. See 867// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 868type GooglePrivacyDlpV2BucketingConfig struct { 869 // Buckets: Set of buckets. Ranges must be non-overlapping. 870 Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"` 871 872 // ForceSendFields is a list of field names (e.g. "Buckets") to 873 // unconditionally include in API requests. By default, fields with 874 // empty values are omitted from API requests. However, any non-pointer, 875 // non-interface field appearing in ForceSendFields will be sent to the 876 // server regardless of whether the field is empty or not. This may be 877 // used to include empty fields in Patch requests. 878 ForceSendFields []string `json:"-"` 879 880 // NullFields is a list of field names (e.g. "Buckets") to include in 881 // API requests with the JSON null value. By default, fields with empty 882 // values are omitted from API requests. However, any field with an 883 // empty value appearing in NullFields will be sent to the server as 884 // null. It is an error if a field in this list has a non-empty value. 885 // This may be used to include null fields in Patch requests. 886 NullFields []string `json:"-"` 887} 888 889func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) { 890 type NoMethod GooglePrivacyDlpV2BucketingConfig 891 raw := NoMethod(*s) 892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 893} 894 895// GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or 896// redact. 897type GooglePrivacyDlpV2ByteContentItem struct { 898 // Data: Content data to inspect or redact. 899 Data string `json:"data,omitempty"` 900 901 // Type: The type of data stored in the bytes string. Default will be 902 // TEXT_UTF8. 903 // 904 // Possible values: 905 // "BYTES_TYPE_UNSPECIFIED" - Unused 906 // "IMAGE" - Any image type. 907 // "IMAGE_JPEG" - jpeg 908 // "IMAGE_BMP" - bmp 909 // "IMAGE_PNG" - png 910 // "IMAGE_SVG" - svg 911 // "TEXT_UTF8" - plain text 912 // "WORD_DOCUMENT" - docx, docm, dotx, dotm 913 // "PDF" - pdf 914 // "AVRO" - avro 915 // "CSV" - csv 916 // "TSV" - tsv 917 Type string `json:"type,omitempty"` 918 919 // ForceSendFields is a list of field names (e.g. "Data") to 920 // unconditionally include in API requests. By default, fields with 921 // empty values are omitted from API requests. However, any non-pointer, 922 // non-interface field appearing in ForceSendFields will be sent to the 923 // server regardless of whether the field is empty or not. This may be 924 // used to include empty fields in Patch requests. 925 ForceSendFields []string `json:"-"` 926 927 // NullFields is a list of field names (e.g. "Data") to include in API 928 // requests with the JSON null value. By default, fields with empty 929 // values are omitted from API requests. However, any field with an 930 // empty value appearing in NullFields will be sent to the server as 931 // null. It is an error if a field in this list has a non-empty value. 932 // This may be used to include null fields in Patch requests. 933 NullFields []string `json:"-"` 934} 935 936func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) { 937 type NoMethod GooglePrivacyDlpV2ByteContentItem 938 raw := NoMethod(*s) 939 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 940} 941 942// GooglePrivacyDlpV2CancelDlpJobRequest: The request message for 943// canceling a DLP job. 944type GooglePrivacyDlpV2CancelDlpJobRequest struct { 945} 946 947// GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats 948// over an individual column, including number of distinct values and 949// value count distribution. 950type GooglePrivacyDlpV2CategoricalStatsConfig struct { 951 // Field: Field to compute categorical stats on. All column types are 952 // supported except for arrays and structs. However, it may be more 953 // informative to use NumericalStats when the field type is supported, 954 // depending on the data. 955 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 956 957 // ForceSendFields is a list of field names (e.g. "Field") to 958 // unconditionally include in API requests. By default, fields with 959 // empty values are omitted from API requests. However, any non-pointer, 960 // non-interface field appearing in ForceSendFields will be sent to the 961 // server regardless of whether the field is empty or not. This may be 962 // used to include empty fields in Patch requests. 963 ForceSendFields []string `json:"-"` 964 965 // NullFields is a list of field names (e.g. "Field") to include in API 966 // requests with the JSON null value. By default, fields with empty 967 // values are omitted from API requests. However, any field with an 968 // empty value appearing in NullFields will be sent to the server as 969 // null. It is an error if a field in this list has a non-empty value. 970 // This may be used to include null fields in Patch requests. 971 NullFields []string `json:"-"` 972} 973 974func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) { 975 type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig 976 raw := NoMethod(*s) 977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 978} 979 980// GooglePrivacyDlpV2CategoricalStatsHistogramBucket: Histogram of value 981// frequencies in the column. 982type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct { 983 // BucketSize: Total number of values in this bucket. 984 BucketSize int64 `json:"bucketSize,omitempty,string"` 985 986 // BucketValueCount: Total number of distinct values in this bucket. 987 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 988 989 // BucketValues: Sample of value frequencies in this bucket. The total 990 // number of values returned per bucket is capped at 20. 991 BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"` 992 993 // ValueFrequencyLowerBound: Lower bound on the value frequency of the 994 // values in this bucket. 995 ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` 996 997 // ValueFrequencyUpperBound: Upper bound on the value frequency of the 998 // values in this bucket. 999 ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` 1000 1001 // ForceSendFields is a list of field names (e.g. "BucketSize") to 1002 // unconditionally include in API requests. By default, fields with 1003 // empty values are omitted from API requests. However, any non-pointer, 1004 // non-interface field appearing in ForceSendFields will be sent to the 1005 // server regardless of whether the field is empty or not. This may be 1006 // used to include empty fields in Patch requests. 1007 ForceSendFields []string `json:"-"` 1008 1009 // NullFields is a list of field names (e.g. "BucketSize") to include in 1010 // API requests with the JSON null value. By default, fields with empty 1011 // values are omitted from API requests. However, any field with an 1012 // empty value appearing in NullFields will be sent to the server as 1013 // null. It is an error if a field in this list has a non-empty value. 1014 // This may be used to include null fields in Patch requests. 1015 NullFields []string `json:"-"` 1016} 1017 1018func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { 1019 type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket 1020 raw := NoMethod(*s) 1021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1022} 1023 1024// GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical 1025// stats computation. 1026type GooglePrivacyDlpV2CategoricalStatsResult struct { 1027 // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the 1028 // column. 1029 ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` 1030 1031 // ForceSendFields is a list of field names (e.g. 1032 // "ValueFrequencyHistogramBuckets") to unconditionally include in API 1033 // requests. By default, fields with empty values are omitted from API 1034 // requests. However, any non-pointer, non-interface field appearing in 1035 // ForceSendFields will be sent to the server regardless of whether the 1036 // field is empty or not. This may be used to include empty fields in 1037 // Patch requests. 1038 ForceSendFields []string `json:"-"` 1039 1040 // NullFields is a list of field names (e.g. 1041 // "ValueFrequencyHistogramBuckets") to include in API requests with the 1042 // JSON null value. By default, fields with empty values are omitted 1043 // from API requests. However, any field with an empty value appearing 1044 // in NullFields will be sent to the server as null. It is an error if a 1045 // field in this list has a non-empty value. This may be used to include 1046 // null fields in Patch requests. 1047 NullFields []string `json:"-"` 1048} 1049 1050func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) { 1051 type NoMethod GooglePrivacyDlpV2CategoricalStatsResult 1052 raw := NoMethod(*s) 1053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1054} 1055 1056// GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by 1057// replacing a given number of characters with a fixed character. 1058// Masking can start from the beginning or end of the string. This can 1059// be used on data of any type (numbers, longs, and so on) and when 1060// de-identifying structured data we'll attempt to preserve the original 1061// data's type. (This allows you to take a long like 123 and modify it 1062// to a string like **3. 1063type GooglePrivacyDlpV2CharacterMaskConfig struct { 1064 // CharactersToIgnore: When masking a string, items in this list will be 1065 // skipped when replacing characters. For example, if the input string 1066 // is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 1067 // characters with `*`, Cloud DLP returns `***-**5-5555`. 1068 CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"` 1069 1070 // MaskingCharacter: Character to use to mask the sensitive values—for 1071 // example, `*` for an alphabetic string such as a name, or `0` for a 1072 // numeric string such as ZIP code or credit card number. This string 1073 // must have a length of 1. If not supplied, this value defaults to `*` 1074 // for strings, and `0` for digits. 1075 MaskingCharacter string `json:"maskingCharacter,omitempty"` 1076 1077 // NumberToMask: Number of characters to mask. If not set, all matching 1078 // chars will be masked. Skipped characters do not count towards this 1079 // tally. 1080 NumberToMask int64 `json:"numberToMask,omitempty"` 1081 1082 // ReverseOrder: Mask characters in reverse order. For example, if 1083 // `masking_character` is `0`, `number_to_mask` is `14`, and 1084 // `reverse_order` is `false`, then the input string 1085 // `1234-5678-9012-3456` is masked as `00000000000000-3456`. If 1086 // `masking_character` is `*`, `number_to_mask` is `3`, and 1087 // `reverse_order` is `true`, then the string `12345` is masked as 1088 // `12***`. 1089 ReverseOrder bool `json:"reverseOrder,omitempty"` 1090 1091 // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") 1092 // to unconditionally include in API requests. By default, fields with 1093 // empty values are omitted from API requests. However, any non-pointer, 1094 // non-interface field appearing in ForceSendFields will be sent to the 1095 // server regardless of whether the field is empty or not. This may be 1096 // used to include empty fields in Patch requests. 1097 ForceSendFields []string `json:"-"` 1098 1099 // NullFields is a list of field names (e.g. "CharactersToIgnore") to 1100 // include in API requests with the JSON null value. By default, fields 1101 // with empty values are omitted from API requests. However, any field 1102 // with an empty value appearing in NullFields will be sent to the 1103 // server as null. It is an error if a field in this list has a 1104 // non-empty value. This may be used to include null fields in Patch 1105 // requests. 1106 NullFields []string `json:"-"` 1107} 1108 1109func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) { 1110 type NoMethod GooglePrivacyDlpV2CharacterMaskConfig 1111 raw := NoMethod(*s) 1112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1113} 1114 1115// GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing 1116// deidentification of a value. These will be left alone and skipped. 1117type GooglePrivacyDlpV2CharsToIgnore struct { 1118 // CharactersToSkip: Characters to not transform when masking. 1119 CharactersToSkip string `json:"charactersToSkip,omitempty"` 1120 1121 // CommonCharactersToIgnore: Common characters to not transform when 1122 // masking. Useful to avoid removing punctuation. 1123 // 1124 // Possible values: 1125 // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" - Unused. 1126 // "NUMERIC" - 0-9 1127 // "ALPHA_UPPER_CASE" - A-Z 1128 // "ALPHA_LOWER_CASE" - a-z 1129 // "PUNCTUATION" - US Punctuation, one of 1130 // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ 1131 // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] 1132 CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` 1133 1134 // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to 1135 // unconditionally include in API requests. By default, fields with 1136 // empty values are omitted from API requests. However, any non-pointer, 1137 // non-interface field appearing in ForceSendFields will be sent to the 1138 // server regardless of whether the field is empty or not. This may be 1139 // used to include empty fields in Patch requests. 1140 ForceSendFields []string `json:"-"` 1141 1142 // NullFields is a list of field names (e.g. "CharactersToSkip") to 1143 // include in API requests with the JSON null value. By default, fields 1144 // with empty values are omitted from API requests. However, any field 1145 // with an empty value appearing in NullFields will be sent to the 1146 // server as null. It is an error if a field in this list has a 1147 // non-empty value. This may be used to include null fields in Patch 1148 // requests. 1149 NullFields []string `json:"-"` 1150} 1151 1152func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) { 1153 type NoMethod GooglePrivacyDlpV2CharsToIgnore 1154 raw := NoMethod(*s) 1155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1156} 1157 1158// GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of 1159// files in Cloud Storage. 1160type GooglePrivacyDlpV2CloudStorageFileSet struct { 1161 // Url: The url, in the format `gs:///`. Trailing wildcard in the path 1162 // is allowed. 1163 Url string `json:"url,omitempty"` 1164 1165 // ForceSendFields is a list of field names (e.g. "Url") to 1166 // unconditionally include in API requests. By default, fields with 1167 // empty values are omitted from API requests. However, any non-pointer, 1168 // non-interface field appearing in ForceSendFields will be sent to the 1169 // server regardless of whether the field is empty or not. This may be 1170 // used to include empty fields in Patch requests. 1171 ForceSendFields []string `json:"-"` 1172 1173 // NullFields is a list of field names (e.g. "Url") to include in API 1174 // requests with the JSON null value. By default, fields with empty 1175 // values are omitted from API requests. However, any field with an 1176 // empty value appearing in NullFields will be sent to the server as 1177 // null. It is an error if a field in this list has a non-empty value. 1178 // This may be used to include null fields in Patch requests. 1179 NullFields []string `json:"-"` 1180} 1181 1182func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) { 1183 type NoMethod GooglePrivacyDlpV2CloudStorageFileSet 1184 raw := NoMethod(*s) 1185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1186} 1187 1188// GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a 1189// set of files within a Google Cloud Storage bucket. 1190type GooglePrivacyDlpV2CloudStorageOptions struct { 1191 // BytesLimitPerFile: Max number of bytes to scan from a file. If a 1192 // scanned file's size is bigger than this value then the rest of the 1193 // bytes are omitted. Only one of bytes_limit_per_file and 1194 // bytes_limit_per_file_percent can be specified. 1195 BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` 1196 1197 // BytesLimitPerFilePercent: Max percentage of bytes to scan from a 1198 // file. The rest are omitted. The number of bytes scanned is rounded 1199 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1200 // limit. Defaults to 0. Only one of bytes_limit_per_file and 1201 // bytes_limit_per_file_percent can be specified. 1202 BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"` 1203 1204 // FileSet: The set of one or more files to scan. 1205 FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"` 1206 1207 // FileTypes: List of file type groups to include in the scan. If empty, 1208 // all files are scanned and available data format processors are 1209 // applied. In addition, the binary content of the selected files is 1210 // always scanned as well. Images are scanned only as binary if the 1211 // specified region does not support image inspection and no file_types 1212 // were specified. Image inspection is restricted to 'global', 'us', 1213 // 'asia', and 'europe'. 1214 // 1215 // Possible values: 1216 // "FILE_TYPE_UNSPECIFIED" - Includes all files. 1217 // "BINARY_FILE" - Includes all file extensions not covered by another 1218 // entry. Binary scanning attempts to convert the content of the file to 1219 // utf_8 to scan the file. If you wish to avoid this fall back, specify 1220 // one or more of the other FileType's in your storage scan. 1221 // "TEXT_FILE" - Included file extensions: asc, brf, c, cc, cpp, csv, 1222 // cxx, c++, cs, css, dart, eml, go, h, hh, hpp, hxx, h++, hs, html, 1223 // htm, shtml, shtm, xhtml, lhs, ini, java, js, json, ocaml, md, mkd, 1224 // markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, rb, rbw, rs, 1225 // rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml, xml, xsl, 1226 // xsd, yml, yaml. 1227 // "IMAGE" - Included file extensions: bmp, gif, jpg, jpeg, jpe, png. 1228 // bytes_limit_per_file has no effect on image files. Image inspection 1229 // is restricted to 'global', 'us', 'asia', and 'europe'. 1230 // "WORD" - Word files >30 MB will be scanned as binary files. 1231 // Included file extensions: docx, dotx, docm, dotm 1232 // "PDF" - PDF files >30 MB will be scanned as binary files. Included 1233 // file extensions: pdf 1234 // "AVRO" - Included file extensions: avro 1235 // "CSV" - Included file extensions: csv 1236 // "TSV" - Included file extensions: tsv 1237 FileTypes []string `json:"fileTypes,omitempty"` 1238 1239 // FilesLimitPercent: Limits the number of files to scan to this 1240 // percentage of the input FileSet. Number of files scanned is rounded 1241 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1242 // limit. Defaults to 0. 1243 FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"` 1244 1245 // Possible values: 1246 // "SAMPLE_METHOD_UNSPECIFIED" 1247 // "TOP" - Scan from the top (default). 1248 // "RANDOM_START" - For each file larger than bytes_limit_per_file, 1249 // randomly pick the offset to start scanning. The scanned bytes are 1250 // contiguous. 1251 SampleMethod string `json:"sampleMethod,omitempty"` 1252 1253 // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile") 1254 // to unconditionally include in API requests. By default, fields with 1255 // empty values are omitted from API requests. However, any non-pointer, 1256 // non-interface field appearing in ForceSendFields will be sent to the 1257 // server regardless of whether the field is empty or not. This may be 1258 // used to include empty fields in Patch requests. 1259 ForceSendFields []string `json:"-"` 1260 1261 // NullFields is a list of field names (e.g. "BytesLimitPerFile") to 1262 // include in API requests with the JSON null value. By default, fields 1263 // with empty values are omitted from API requests. However, any field 1264 // with an empty value appearing in NullFields will be sent to the 1265 // server as null. It is an error if a field in this list has a 1266 // non-empty value. This may be used to include null fields in Patch 1267 // requests. 1268 NullFields []string `json:"-"` 1269} 1270 1271func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) { 1272 type NoMethod GooglePrivacyDlpV2CloudStorageOptions 1273 raw := NoMethod(*s) 1274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1275} 1276 1277// GooglePrivacyDlpV2CloudStoragePath: Message representing a single 1278// file or path in Cloud Storage. 1279type GooglePrivacyDlpV2CloudStoragePath struct { 1280 // Path: A url representing a file or path (no wildcards) in Cloud 1281 // Storage. Example: gs://[BUCKET_NAME]/dictionary.txt 1282 Path string `json:"path,omitempty"` 1283 1284 // ForceSendFields is a list of field names (e.g. "Path") to 1285 // unconditionally include in API requests. By default, fields with 1286 // empty values are omitted from API requests. However, any non-pointer, 1287 // non-interface field appearing in ForceSendFields will be sent to the 1288 // server regardless of whether the field is empty or not. This may be 1289 // used to include empty fields in Patch requests. 1290 ForceSendFields []string `json:"-"` 1291 1292 // NullFields is a list of field names (e.g. "Path") to include in API 1293 // requests with the JSON null value. By default, fields with empty 1294 // values are omitted from API requests. However, any field with an 1295 // empty value appearing in NullFields will be sent to the server as 1296 // null. It is an error if a field in this list has a non-empty value. 1297 // This may be used to include null fields in Patch requests. 1298 NullFields []string `json:"-"` 1299} 1300 1301func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) { 1302 type NoMethod GooglePrivacyDlpV2CloudStoragePath 1303 raw := NoMethod(*s) 1304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1305} 1306 1307// GooglePrivacyDlpV2CloudStorageRegexFileSet: Message representing a 1308// set of files in a Cloud Storage bucket. Regular expressions are used 1309// to allow fine-grained control over which files in the bucket to 1310// include. Included files are those that match at least one item in 1311// `include_regex` and do not match any items in `exclude_regex`. Note 1312// that a file that matches items from both lists will _not_ be 1313// included. For a match to occur, the entire file path (i.e., 1314// everything in the url after the bucket name) must match the regular 1315// expression. For example, given the input `{bucket_name: "mybucket", 1316// include_regex: ["directory1/.*"], exclude_regex: 1317// ["directory1/excluded.*"]}`: * `gs://mybucket/directory1/myfile` will 1318// be included * `gs://mybucket/directory1/directory2/myfile` will be 1319// included (`.*` matches across `/`) * 1320// `gs://mybucket/directory0/directory1/myfile` will _not_ be included 1321// (the full path doesn't match any items in `include_regex`) * 1322// `gs://mybucket/directory1/excludedfile` will _not_ be included (the 1323// path matches an item in `exclude_regex`) If `include_regex` is left 1324// empty, it will match all files by default (this is equivalent to 1325// setting `include_regex: [".*"]`). Some other common use cases: * 1326// `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include 1327// all files in `mybucket` except for .pdf files * `{bucket_name: 1328// "mybucket", include_regex: ["directory/[^/]+"]}` will include all 1329// files directly under `gs://mybucket/directory/`, without matching 1330// across `/` 1331type GooglePrivacyDlpV2CloudStorageRegexFileSet struct { 1332 // BucketName: The name of a Cloud Storage bucket. Required. 1333 BucketName string `json:"bucketName,omitempty"` 1334 1335 // ExcludeRegex: A list of regular expressions matching file paths to 1336 // exclude. All files in the bucket that match at least one of these 1337 // regular expressions will be excluded from the scan. Regular 1338 // expressions use RE2 1339 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1340 // found under the google/re2 repository on GitHub. 1341 ExcludeRegex []string `json:"excludeRegex,omitempty"` 1342 1343 // IncludeRegex: A list of regular expressions matching file paths to 1344 // include. All files in the bucket that match at least one of these 1345 // regular expressions will be included in the set of files, except for 1346 // those that also match an item in `exclude_regex`. Leaving this field 1347 // empty will match all files by default (this is equivalent to 1348 // including `.*` in the list). Regular expressions use RE2 1349 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1350 // found under the google/re2 repository on GitHub. 1351 IncludeRegex []string `json:"includeRegex,omitempty"` 1352 1353 // ForceSendFields is a list of field names (e.g. "BucketName") to 1354 // unconditionally include in API requests. By default, fields with 1355 // empty values are omitted from API requests. However, any non-pointer, 1356 // non-interface field appearing in ForceSendFields will be sent to the 1357 // server regardless of whether the field is empty or not. This may be 1358 // used to include empty fields in Patch requests. 1359 ForceSendFields []string `json:"-"` 1360 1361 // NullFields is a list of field names (e.g. "BucketName") to include in 1362 // API requests with the JSON null value. By default, fields with empty 1363 // values are omitted from API requests. However, any field with an 1364 // empty value appearing in NullFields will be sent to the server as 1365 // null. It is an error if a field in this list has a non-empty value. 1366 // This may be used to include null fields in Patch requests. 1367 NullFields []string `json:"-"` 1368} 1369 1370func (s *GooglePrivacyDlpV2CloudStorageRegexFileSet) MarshalJSON() ([]byte, error) { 1371 type NoMethod GooglePrivacyDlpV2CloudStorageRegexFileSet 1372 raw := NoMethod(*s) 1373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1374} 1375 1376// GooglePrivacyDlpV2Color: Represents a color in the RGB color space. 1377type GooglePrivacyDlpV2Color struct { 1378 // Blue: The amount of blue in the color as a value in the interval [0, 1379 // 1]. 1380 Blue float64 `json:"blue,omitempty"` 1381 1382 // Green: The amount of green in the color as a value in the interval 1383 // [0, 1]. 1384 Green float64 `json:"green,omitempty"` 1385 1386 // Red: The amount of red in the color as a value in the interval [0, 1387 // 1]. 1388 Red float64 `json:"red,omitempty"` 1389 1390 // ForceSendFields is a list of field names (e.g. "Blue") to 1391 // unconditionally include in API requests. By default, fields with 1392 // empty values are omitted from API requests. However, any non-pointer, 1393 // non-interface field appearing in ForceSendFields will be sent to the 1394 // server regardless of whether the field is empty or not. This may be 1395 // used to include empty fields in Patch requests. 1396 ForceSendFields []string `json:"-"` 1397 1398 // NullFields is a list of field names (e.g. "Blue") to include in API 1399 // requests with the JSON null value. By default, fields with empty 1400 // values are omitted from API requests. However, any field with an 1401 // empty value appearing in NullFields will be sent to the server as 1402 // null. It is an error if a field in this list has a non-empty value. 1403 // This may be used to include null fields in Patch requests. 1404 NullFields []string `json:"-"` 1405} 1406 1407func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) { 1408 type NoMethod GooglePrivacyDlpV2Color 1409 raw := NoMethod(*s) 1410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1411} 1412 1413func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error { 1414 type NoMethod GooglePrivacyDlpV2Color 1415 var s1 struct { 1416 Blue gensupport.JSONFloat64 `json:"blue"` 1417 Green gensupport.JSONFloat64 `json:"green"` 1418 Red gensupport.JSONFloat64 `json:"red"` 1419 *NoMethod 1420 } 1421 s1.NoMethod = (*NoMethod)(s) 1422 if err := json.Unmarshal(data, &s1); err != nil { 1423 return err 1424 } 1425 s.Blue = float64(s1.Blue) 1426 s.Green = float64(s1.Green) 1427 s.Red = float64(s1.Red) 1428 return nil 1429} 1430 1431// GooglePrivacyDlpV2Condition: The field type of `value` and `field` do 1432// not need to match to be considered equal, but not all comparisons are 1433// possible. EQUAL_TO and NOT_EQUAL_TO attempt to compare even with 1434// incompatible types, but all other comparisons are invalid with 1435// incompatible types. A `value` of type: - `string` can be compared 1436// against all other types - `boolean` can only be compared against 1437// other booleans - `integer` can be compared against doubles or a 1438// string if the string value can be parsed as an integer. - `double` 1439// can be compared against integers or a string if the string can be 1440// parsed as a double. - `Timestamp` can be compared against strings in 1441// RFC 3339 date string format. - `TimeOfDay` can be compared against 1442// timestamps and strings in the format of 'HH:mm:ss'. If we fail to 1443// compare do to type mismatch, a warning will be given and the 1444// condition will evaluate to false. 1445type GooglePrivacyDlpV2Condition struct { 1446 // Field: Required. Field within the record this condition is evaluated 1447 // against. 1448 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 1449 1450 // Operator: Required. Operator used to compare the field or infoType to 1451 // the value. 1452 // 1453 // Possible values: 1454 // "RELATIONAL_OPERATOR_UNSPECIFIED" - Unused 1455 // "EQUAL_TO" - Equal. Attempts to match even with incompatible types. 1456 // "NOT_EQUAL_TO" - Not equal to. Attempts to match even with 1457 // incompatible types. 1458 // "GREATER_THAN" - Greater than. 1459 // "LESS_THAN" - Less than. 1460 // "GREATER_THAN_OR_EQUALS" - Greater than or equals. 1461 // "LESS_THAN_OR_EQUALS" - Less than or equals. 1462 // "EXISTS" - Exists 1463 Operator string `json:"operator,omitempty"` 1464 1465 // Value: Value to compare against. [Mandatory, except for `EXISTS` 1466 // tests.] 1467 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 1468 1469 // ForceSendFields is a list of field names (e.g. "Field") to 1470 // unconditionally include in API requests. By default, fields with 1471 // empty values are omitted from API requests. However, any non-pointer, 1472 // non-interface field appearing in ForceSendFields will be sent to the 1473 // server regardless of whether the field is empty or not. This may be 1474 // used to include empty fields in Patch requests. 1475 ForceSendFields []string `json:"-"` 1476 1477 // NullFields is a list of field names (e.g. "Field") to include in API 1478 // requests with the JSON null value. By default, fields with empty 1479 // values are omitted from API requests. However, any field with an 1480 // empty value appearing in NullFields will be sent to the server as 1481 // null. It is an error if a field in this list has a non-empty value. 1482 // This may be used to include null fields in Patch requests. 1483 NullFields []string `json:"-"` 1484} 1485 1486func (s *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) { 1487 type NoMethod GooglePrivacyDlpV2Condition 1488 raw := NoMethod(*s) 1489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1490} 1491 1492// GooglePrivacyDlpV2Conditions: A collection of conditions. 1493type GooglePrivacyDlpV2Conditions struct { 1494 // Conditions: A collection of conditions. 1495 Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"` 1496 1497 // ForceSendFields is a list of field names (e.g. "Conditions") to 1498 // unconditionally include in API requests. By default, fields with 1499 // empty values are omitted from API requests. However, any non-pointer, 1500 // non-interface field appearing in ForceSendFields will be sent to the 1501 // server regardless of whether the field is empty or not. This may be 1502 // used to include empty fields in Patch requests. 1503 ForceSendFields []string `json:"-"` 1504 1505 // NullFields is a list of field names (e.g. "Conditions") to include in 1506 // API requests with the JSON null value. By default, fields with empty 1507 // values are omitted from API requests. However, any field with an 1508 // empty value appearing in NullFields will be sent to the server as 1509 // null. It is an error if a field in this list has a non-empty value. 1510 // This may be used to include null fields in Patch requests. 1511 NullFields []string `json:"-"` 1512} 1513 1514func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { 1515 type NoMethod GooglePrivacyDlpV2Conditions 1516 raw := NoMethod(*s) 1517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1518} 1519 1520// GooglePrivacyDlpV2Container: Represents a container that may contain 1521// DLP findings. Examples of a container include a file, table, or 1522// database record. 1523type GooglePrivacyDlpV2Container struct { 1524 // FullPath: A string representation of the full container name. 1525 // Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud 1526 // Storage: 'gs://Bucket/folders/filename.txt' 1527 FullPath string `json:"fullPath,omitempty"` 1528 1529 // ProjectId: Project where the finding was found. Can be different from 1530 // the project that owns the finding. 1531 ProjectId string `json:"projectId,omitempty"` 1532 1533 // RelativePath: The rest of the path after the root. Examples: - For 1534 // BigQuery table `project_id:dataset_id.table_id`, the relative path is 1535 // `table_id` - Google Cloud Storage file 1536 // `gs://bucket/folder/filename.txt`, the relative path is 1537 // `folder/filename.txt` 1538 RelativePath string `json:"relativePath,omitempty"` 1539 1540 // RootPath: The root of the container. Examples: - For BigQuery table 1541 // `project_id:dataset_id.table_id`, the root is `dataset_id` - For 1542 // Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root 1543 // is `gs://bucket` 1544 RootPath string `json:"rootPath,omitempty"` 1545 1546 // Type: Container type, for example BigQuery or Google Cloud Storage. 1547 Type string `json:"type,omitempty"` 1548 1549 // UpdateTime: Findings container modification timestamp, if applicable. 1550 // For Google Cloud Storage contains last file modification timestamp. 1551 // For BigQuery table contains last_modified_time property. For 1552 // Datastore - not populated. 1553 UpdateTime string `json:"updateTime,omitempty"` 1554 1555 // Version: Findings container version, if available ("generation" for 1556 // Google Cloud Storage). 1557 Version string `json:"version,omitempty"` 1558 1559 // ForceSendFields is a list of field names (e.g. "FullPath") to 1560 // unconditionally include in API requests. By default, fields with 1561 // empty values are omitted from API requests. However, any non-pointer, 1562 // non-interface field appearing in ForceSendFields will be sent to the 1563 // server regardless of whether the field is empty or not. This may be 1564 // used to include empty fields in Patch requests. 1565 ForceSendFields []string `json:"-"` 1566 1567 // NullFields is a list of field names (e.g. "FullPath") to include in 1568 // API requests with the JSON null value. By default, fields with empty 1569 // values are omitted from API requests. However, any field with an 1570 // empty value appearing in NullFields will be sent to the server as 1571 // null. It is an error if a field in this list has a non-empty value. 1572 // This may be used to include null fields in Patch requests. 1573 NullFields []string `json:"-"` 1574} 1575 1576func (s *GooglePrivacyDlpV2Container) MarshalJSON() ([]byte, error) { 1577 type NoMethod GooglePrivacyDlpV2Container 1578 raw := NoMethod(*s) 1579 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1580} 1581 1582// GooglePrivacyDlpV2ContentItem: Container structure for the content to 1583// inspect. 1584type GooglePrivacyDlpV2ContentItem struct { 1585 // ByteItem: Content data to inspect or redact. Replaces `type` and 1586 // `data`. 1587 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 1588 1589 // Table: Structured content for inspection. See 1590 // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 1591 // to learn more. 1592 Table *GooglePrivacyDlpV2Table `json:"table,omitempty"` 1593 1594 // Value: String data to inspect or redact. 1595 Value string `json:"value,omitempty"` 1596 1597 // ForceSendFields is a list of field names (e.g. "ByteItem") to 1598 // unconditionally include in API requests. By default, fields with 1599 // empty values are omitted from API requests. However, any non-pointer, 1600 // non-interface field appearing in ForceSendFields will be sent to the 1601 // server regardless of whether the field is empty or not. This may be 1602 // used to include empty fields in Patch requests. 1603 ForceSendFields []string `json:"-"` 1604 1605 // NullFields is a list of field names (e.g. "ByteItem") to include in 1606 // API requests with the JSON null value. By default, fields with empty 1607 // values are omitted from API requests. However, any field with an 1608 // empty value appearing in NullFields will be sent to the server as 1609 // null. It is an error if a field in this list has a non-empty value. 1610 // This may be used to include null fields in Patch requests. 1611 NullFields []string `json:"-"` 1612} 1613 1614func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) { 1615 type NoMethod GooglePrivacyDlpV2ContentItem 1616 raw := NoMethod(*s) 1617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1618} 1619 1620// GooglePrivacyDlpV2ContentLocation: Precise location of the finding 1621// within a document, record, image, or metadata container. 1622type GooglePrivacyDlpV2ContentLocation struct { 1623 // ContainerName: Name of the container where the finding is located. 1624 // The top level name is the source file name or table name. Names of 1625 // some common storage containers are formatted as follows: * BigQuery 1626 // tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: 1627 // `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested 1628 // names could be absent if the embedded object has no string identifier 1629 // (for an example an image contained within a document). 1630 ContainerName string `json:"containerName,omitempty"` 1631 1632 // ContainerTimestamp: Findings container modification timestamp, if 1633 // applicable. For Google Cloud Storage contains last file modification 1634 // timestamp. For BigQuery table contains last_modified_time property. 1635 // For Datastore - not populated. 1636 ContainerTimestamp string `json:"containerTimestamp,omitempty"` 1637 1638 // ContainerVersion: Findings container version, if available 1639 // ("generation" for Google Cloud Storage). 1640 ContainerVersion string `json:"containerVersion,omitempty"` 1641 1642 // DocumentLocation: Location data for document files. 1643 DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"` 1644 1645 // ImageLocation: Location within an image's pixels. 1646 ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"` 1647 1648 // MetadataLocation: Location within the metadata for inspected content. 1649 MetadataLocation *GooglePrivacyDlpV2MetadataLocation `json:"metadataLocation,omitempty"` 1650 1651 // RecordLocation: Location within a row or record of a database table. 1652 RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"` 1653 1654 // ForceSendFields is a list of field names (e.g. "ContainerName") to 1655 // unconditionally include in API requests. By default, fields with 1656 // empty values are omitted from API requests. However, any non-pointer, 1657 // non-interface field appearing in ForceSendFields will be sent to the 1658 // server regardless of whether the field is empty or not. This may be 1659 // used to include empty fields in Patch requests. 1660 ForceSendFields []string `json:"-"` 1661 1662 // NullFields is a list of field names (e.g. "ContainerName") to include 1663 // in API requests with the JSON null value. By default, fields with 1664 // empty values are omitted from API requests. However, any field with 1665 // an empty value appearing in NullFields will be sent to the server as 1666 // null. It is an error if a field in this list has a non-empty value. 1667 // This may be used to include null fields in Patch requests. 1668 NullFields []string `json:"-"` 1669} 1670 1671func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) { 1672 type NoMethod GooglePrivacyDlpV2ContentLocation 1673 raw := NoMethod(*s) 1674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1675} 1676 1677// GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message 1678// for CreateDeidentifyTemplate. 1679type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct { 1680 // DeidentifyTemplate: Required. The DeidentifyTemplate to create. 1681 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 1682 1683 // LocationId: Deprecated. This field has no effect. 1684 LocationId string `json:"locationId,omitempty"` 1685 1686 // TemplateId: The template id can contain uppercase and lowercase 1687 // letters, numbers, and hyphens; that is, it must match the regular 1688 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1689 // Can be empty to allow the system to generate one. 1690 TemplateId string `json:"templateId,omitempty"` 1691 1692 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 1693 // to unconditionally include in API requests. By default, fields with 1694 // empty values are omitted from API requests. However, any non-pointer, 1695 // non-interface field appearing in ForceSendFields will be sent to the 1696 // server regardless of whether the field is empty or not. This may be 1697 // used to include empty fields in Patch requests. 1698 ForceSendFields []string `json:"-"` 1699 1700 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 1701 // include in API requests with the JSON null value. By default, fields 1702 // with empty values are omitted from API requests. However, any field 1703 // with an empty value appearing in NullFields will be sent to the 1704 // server as null. It is an error if a field in this list has a 1705 // non-empty value. This may be used to include null fields in Patch 1706 // requests. 1707 NullFields []string `json:"-"` 1708} 1709 1710func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 1711 type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 1712 raw := NoMethod(*s) 1713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1714} 1715 1716// GooglePrivacyDlpV2CreateDlpJobRequest: Request message for 1717// CreateDlpJobRequest. Used to initiate long running jobs such as 1718// calculating risk metrics or inspecting Google Cloud Storage. 1719type GooglePrivacyDlpV2CreateDlpJobRequest struct { 1720 // InspectJob: Set to control what and how to inspect. 1721 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 1722 1723 // JobId: The job id can contain uppercase and lowercase letters, 1724 // numbers, and hyphens; that is, it must match the regular expression: 1725 // `[a-zA-Z\d-_]+`. The maximum length is 100 characters. Can be empty 1726 // to allow the system to generate one. 1727 JobId string `json:"jobId,omitempty"` 1728 1729 // LocationId: Deprecated. This field has no effect. 1730 LocationId string `json:"locationId,omitempty"` 1731 1732 // RiskJob: Set to choose what metric to calculate. 1733 RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"` 1734 1735 // ForceSendFields is a list of field names (e.g. "InspectJob") to 1736 // unconditionally include in API requests. By default, fields with 1737 // empty values are omitted from API requests. However, any non-pointer, 1738 // non-interface field appearing in ForceSendFields will be sent to the 1739 // server regardless of whether the field is empty or not. This may be 1740 // used to include empty fields in Patch requests. 1741 ForceSendFields []string `json:"-"` 1742 1743 // NullFields is a list of field names (e.g. "InspectJob") to include in 1744 // API requests with the JSON null value. By default, fields with empty 1745 // values are omitted from API requests. However, any field with an 1746 // empty value appearing in NullFields will be sent to the server as 1747 // null. It is an error if a field in this list has a non-empty value. 1748 // This may be used to include null fields in Patch requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) { 1753 type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758// GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for 1759// CreateInspectTemplate. 1760type GooglePrivacyDlpV2CreateInspectTemplateRequest struct { 1761 // InspectTemplate: Required. The InspectTemplate to create. 1762 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 1763 1764 // LocationId: Deprecated. This field has no effect. 1765 LocationId string `json:"locationId,omitempty"` 1766 1767 // TemplateId: The template id can contain uppercase and lowercase 1768 // letters, numbers, and hyphens; that is, it must match the regular 1769 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1770 // Can be empty to allow the system to generate one. 1771 TemplateId string `json:"templateId,omitempty"` 1772 1773 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 1774 // unconditionally include in API requests. By default, fields with 1775 // empty values are omitted from API requests. However, any non-pointer, 1776 // non-interface field appearing in ForceSendFields will be sent to the 1777 // server regardless of whether the field is empty or not. This may be 1778 // used to include empty fields in Patch requests. 1779 ForceSendFields []string `json:"-"` 1780 1781 // NullFields is a list of field names (e.g. "InspectTemplate") to 1782 // include in API requests with the JSON null value. By default, fields 1783 // with empty values are omitted from API requests. However, any field 1784 // with an empty value appearing in NullFields will be sent to the 1785 // server as null. It is an error if a field in this list has a 1786 // non-empty value. This may be used to include null fields in Patch 1787 // requests. 1788 NullFields []string `json:"-"` 1789} 1790 1791func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 1792 type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest 1793 raw := NoMethod(*s) 1794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1795} 1796 1797// GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for 1798// CreateJobTrigger. 1799type GooglePrivacyDlpV2CreateJobTriggerRequest struct { 1800 // JobTrigger: Required. The JobTrigger to create. 1801 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 1802 1803 // LocationId: Deprecated. This field has no effect. 1804 LocationId string `json:"locationId,omitempty"` 1805 1806 // TriggerId: The trigger id can contain uppercase and lowercase 1807 // letters, numbers, and hyphens; that is, it must match the regular 1808 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1809 // Can be empty to allow the system to generate one. 1810 TriggerId string `json:"triggerId,omitempty"` 1811 1812 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 1813 // unconditionally include in API requests. By default, fields with 1814 // empty values are omitted from API requests. However, any non-pointer, 1815 // non-interface field appearing in ForceSendFields will be sent to the 1816 // server regardless of whether the field is empty or not. This may be 1817 // used to include empty fields in Patch requests. 1818 ForceSendFields []string `json:"-"` 1819 1820 // NullFields is a list of field names (e.g. "JobTrigger") to include in 1821 // API requests with the JSON null value. By default, fields with empty 1822 // values are omitted from API requests. However, any field with an 1823 // empty value appearing in NullFields will be sent to the server as 1824 // null. It is an error if a field in this list has a non-empty value. 1825 // This may be used to include null fields in Patch requests. 1826 NullFields []string `json:"-"` 1827} 1828 1829func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) { 1830 type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest 1831 raw := NoMethod(*s) 1832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1833} 1834 1835// GooglePrivacyDlpV2CreateStoredInfoTypeRequest: Request message for 1836// CreateStoredInfoType. 1837type GooglePrivacyDlpV2CreateStoredInfoTypeRequest struct { 1838 // Config: Required. Configuration of the storedInfoType to create. 1839 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 1840 1841 // LocationId: Deprecated. This field has no effect. 1842 LocationId string `json:"locationId,omitempty"` 1843 1844 // StoredInfoTypeId: The storedInfoType ID can contain uppercase and 1845 // lowercase letters, numbers, and hyphens; that is, it must match the 1846 // regular expression: `[a-zA-Z\d-_]+`. The maximum length is 100 1847 // characters. Can be empty to allow the system to generate one. 1848 StoredInfoTypeId string `json:"storedInfoTypeId,omitempty"` 1849 1850 // ForceSendFields is a list of field names (e.g. "Config") to 1851 // unconditionally include in API requests. By default, fields with 1852 // empty values are omitted from API requests. However, any non-pointer, 1853 // non-interface field appearing in ForceSendFields will be sent to the 1854 // server regardless of whether the field is empty or not. This may be 1855 // used to include empty fields in Patch requests. 1856 ForceSendFields []string `json:"-"` 1857 1858 // NullFields is a list of field names (e.g. "Config") to include in API 1859 // requests with the JSON null value. By default, fields with empty 1860 // values are omitted from API requests. However, any field with an 1861 // empty value appearing in NullFields will be sent to the server as 1862 // null. It is an error if a field in this list has a non-empty value. 1863 // This may be used to include null fields in Patch requests. 1864 NullFields []string `json:"-"` 1865} 1866 1867func (s *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 1868 type NoMethod GooglePrivacyDlpV2CreateStoredInfoTypeRequest 1869 raw := NoMethod(*s) 1870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1871} 1872 1873// GooglePrivacyDlpV2CryptoDeterministicConfig: Pseudonymization method 1874// that generates deterministic encryption for the given input. Outputs 1875// a base64 encoded representation of the encrypted output. Uses AES-SIV 1876// based on the RFC https://tools.ietf.org/html/rfc5297. 1877type GooglePrivacyDlpV2CryptoDeterministicConfig struct { 1878 // Context: A context may be used for higher security and maintaining 1879 // referential integrity such that the same identifier in two different 1880 // contexts will be given a distinct surrogate. The context is appended 1881 // to plaintext value being encrypted. On decryption the provided 1882 // context is validated against the value used during encryption. If a 1883 // context was provided during encryption, same context must be provided 1884 // during decryption as well. If the context is not set, plaintext would 1885 // be used as is for encryption. If the context is set but: 1. there is 1886 // no record present when transforming a given value or 2. the field is 1887 // not present when transforming a given value, plaintext would be used 1888 // as is for encryption. Note that case (1) is expected when an 1889 // `InfoTypeTransformation` is applied to both structured and 1890 // non-structured `ContentItem`s. 1891 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 1892 1893 // CryptoKey: The key used by the encryption function. 1894 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1895 1896 // SurrogateInfoType: The custom info type to annotate the surrogate 1897 // with. This annotation will be applied to the surrogate by prefixing 1898 // it with the name of the custom info type followed by the number of 1899 // characters comprising the surrogate. The following scheme defines the 1900 // format: {info type name}({surrogate character count}):{surrogate} For 1901 // example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 1902 // the surrogate is 'abc', the full replacement value will be: 1903 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 1904 // when inspecting content using the custom info type 'Surrogate'. This 1905 // facilitates reversal of the surrogate when it occurs in free text. 1906 // Note: For record transformations where the entire cell in a table is 1907 // being transformed, surrogates are not mandatory. Surrogates are used 1908 // to denote the location of the token and are necessary for 1909 // re-identification in free form text. In order for inspection to work 1910 // properly, the name of this info type must not occur naturally 1911 // anywhere in your data; otherwise, inspection may either - reverse a 1912 // surrogate that does not correspond to an actual identifier - be 1913 // unable to parse the surrogate and result in an error Therefore, 1914 // choose your custom info type name carefully after considering what 1915 // your data looks like. One way to select a name that has a high chance 1916 // of yielding reliable detection is to include one or more unicode 1917 // characters that are highly improbable to exist in your data. For 1918 // example, assuming your data is entered from a regular ASCII keyboard, 1919 // the symbol with the hex code point 29DD might be used like so: 1920 // ⧝MY_TOKEN_TYPE. 1921 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 1922 1923 // ForceSendFields is a list of field names (e.g. "Context") to 1924 // unconditionally include in API requests. By default, fields with 1925 // empty values are omitted from API requests. However, any non-pointer, 1926 // non-interface field appearing in ForceSendFields will be sent to the 1927 // server regardless of whether the field is empty or not. This may be 1928 // used to include empty fields in Patch requests. 1929 ForceSendFields []string `json:"-"` 1930 1931 // NullFields is a list of field names (e.g. "Context") to include in 1932 // API requests with the JSON null value. By default, fields with empty 1933 // values are omitted from API requests. However, any field with an 1934 // empty value appearing in NullFields will be sent to the server as 1935 // null. It is an error if a field in this list has a non-empty value. 1936 // This may be used to include null fields in Patch requests. 1937 NullFields []string `json:"-"` 1938} 1939 1940func (s *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, error) { 1941 type NoMethod GooglePrivacyDlpV2CryptoDeterministicConfig 1942 raw := NoMethod(*s) 1943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1944} 1945 1946// GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that 1947// generates surrogates via cryptographic hashing. Uses SHA-256. The key 1948// size must be either 32 or 64 bytes. Outputs a base64 encoded 1949// representation of the hashed output (for example, 1950// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string 1951// and integer values can be hashed. See 1952// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 1953type GooglePrivacyDlpV2CryptoHashConfig struct { 1954 // CryptoKey: The key used by the hash function. 1955 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1956 1957 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 1958 // unconditionally include in API requests. By default, fields with 1959 // empty values are omitted from API requests. However, any non-pointer, 1960 // non-interface field appearing in ForceSendFields will be sent to the 1961 // server regardless of whether the field is empty or not. This may be 1962 // used to include empty fields in Patch requests. 1963 ForceSendFields []string `json:"-"` 1964 1965 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1966 // API requests with the JSON null value. By default, fields with empty 1967 // values are omitted from API requests. However, any field with an 1968 // empty value appearing in NullFields will be sent to the server as 1969 // null. It is an error if a field in this list has a non-empty value. 1970 // This may be used to include null fields in Patch requests. 1971 NullFields []string `json:"-"` 1972} 1973 1974func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) { 1975 type NoMethod GooglePrivacyDlpV2CryptoHashConfig 1976 raw := NoMethod(*s) 1977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1978} 1979 1980// GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as 1981// opposed to a key encryption key (KEK) stored by KMS). When using KMS 1982// to wrap/unwrap DEKs, be sure to set an appropriate IAM policy on the 1983// KMS CryptoKey (KEK) to ensure an attacker cannot unwrap the data 1984// crypto key. 1985type GooglePrivacyDlpV2CryptoKey struct { 1986 // KmsWrapped: Kms wrapped key 1987 KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` 1988 1989 // Transient: Transient crypto key 1990 Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"` 1991 1992 // Unwrapped: Unwrapped crypto key 1993 Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"` 1994 1995 // ForceSendFields is a list of field names (e.g. "KmsWrapped") to 1996 // unconditionally include in API requests. By default, fields with 1997 // empty values are omitted from API requests. However, any non-pointer, 1998 // non-interface field appearing in ForceSendFields will be sent to the 1999 // server regardless of whether the field is empty or not. This may be 2000 // used to include empty fields in Patch requests. 2001 ForceSendFields []string `json:"-"` 2002 2003 // NullFields is a list of field names (e.g. "KmsWrapped") to include in 2004 // API requests with the JSON null value. By default, fields with empty 2005 // values are omitted from API requests. However, any field with an 2006 // empty value appearing in NullFields will be sent to the server as 2007 // null. It is an error if a field in this list has a non-empty value. 2008 // This may be used to include null fields in Patch requests. 2009 NullFields []string `json:"-"` 2010} 2011 2012func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) { 2013 type NoMethod GooglePrivacyDlpV2CryptoKey 2014 raw := NoMethod(*s) 2015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2016} 2017 2018// GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier 2019// with a surrogate using Format Preserving Encryption (FPE) with the 2020// FFX mode of operation; however when used in the `ReidentifyContent` 2021// API method, it serves the opposite function by reversing the 2022// surrogate back into the original identifier. The identifier must be 2023// encoded as ASCII. For a given crypto key and context, the same 2024// identifier will be replaced with the same surrogate. Identifiers must 2025// be at least two characters long. In the case that the identifier is 2026// the empty string, it will be skipped. See 2027// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 2028// Note: We recommend using CryptoDeterministicConfig for all use cases 2029// which do not require preserving the input alphabet space and size, 2030// plus warrant referential integrity. 2031type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { 2032 // CommonAlphabet: Common alphabets. 2033 // 2034 // Possible values: 2035 // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - Unused. 2036 // "NUMERIC" - `[0-9]` (radix of 10) 2037 // "HEXADECIMAL" - `[0-9A-F]` (radix of 16) 2038 // "UPPER_CASE_ALPHA_NUMERIC" - `[0-9A-Z]` (radix of 36) 2039 // "ALPHA_NUMERIC" - `[0-9A-Za-z]` (radix of 62) 2040 CommonAlphabet string `json:"commonAlphabet,omitempty"` 2041 2042 // Context: The 'tweak', a context may be used for higher security since 2043 // the same identifier in two different contexts won't be given the same 2044 // surrogate. If the context is not set, a default tweak will be used. 2045 // If the context is set but: 1. there is no record present when 2046 // transforming a given value or 1. the field is not present when 2047 // transforming a given value, a default tweak will be used. Note that 2048 // case (1) is expected when an `InfoTypeTransformation` is applied to 2049 // both structured and non-structured `ContentItem`s. Currently, the 2050 // referenced field may be of value type integer or string. The tweak is 2051 // constructed as a sequence of bytes in big endian byte order such 2052 // that: - a 64 bit integer is encoded followed by a single byte of 2053 // value 1 - a string is encoded in UTF-8 format followed by a single 2054 // byte of value 2 2055 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2056 2057 // CryptoKey: Required. The key used by the encryption algorithm. 2058 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2059 2060 // CustomAlphabet: This is supported by mapping these to the 2061 // alphanumeric characters that the FFX mode natively supports. This 2062 // happens before/after encryption/decryption. Each character listed 2063 // must appear only once. Number of characters must be in the range [2, 2064 // 95]. This must be encoded as ASCII. The order of characters does not 2065 // matter. The full list of allowed characters is: 2066 // 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 2067 // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ 2068 CustomAlphabet string `json:"customAlphabet,omitempty"` 2069 2070 // Radix: The native way to select the alphabet. Must be in the range 2071 // [2, 95]. 2072 Radix int64 `json:"radix,omitempty"` 2073 2074 // SurrogateInfoType: The custom infoType to annotate the surrogate 2075 // with. This annotation will be applied to the surrogate by prefixing 2076 // it with the name of the custom infoType followed by the number of 2077 // characters comprising the surrogate. The following scheme defines the 2078 // format: info_type_name(surrogate_character_count):surrogate For 2079 // example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and 2080 // the surrogate is 'abc', the full replacement value will be: 2081 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 2082 // when inspecting content using the custom infoType 2083 // [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/ 2084 // InspectConfig#surrogatetype). This facilitates reversal of the 2085 // surrogate when it occurs in free text. In order for inspection to 2086 // work properly, the name of this infoType must not occur naturally 2087 // anywhere in your data; otherwise, inspection may find a surrogate 2088 // that does not correspond to an actual identifier. Therefore, choose 2089 // your custom infoType name carefully after considering what your data 2090 // looks like. One way to select a name that has a high chance of 2091 // yielding reliable detection is to include one or more unicode 2092 // characters that are highly improbable to exist in your data. For 2093 // example, assuming your data is entered from a regular ASCII keyboard, 2094 // the symbol with the hex code point 29DD might be used like so: 2095 // ⧝MY_TOKEN_TYPE 2096 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 2097 2098 // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to 2099 // unconditionally include in API requests. By default, fields with 2100 // empty values are omitted from API requests. However, any non-pointer, 2101 // non-interface field appearing in ForceSendFields will be sent to the 2102 // server regardless of whether the field is empty or not. This may be 2103 // used to include empty fields in Patch requests. 2104 ForceSendFields []string `json:"-"` 2105 2106 // NullFields is a list of field names (e.g. "CommonAlphabet") to 2107 // include in API requests with the JSON null value. By default, fields 2108 // with empty values are omitted from API requests. However, any field 2109 // with an empty value appearing in NullFields will be sent to the 2110 // server as null. It is an error if a field in this list has a 2111 // non-empty value. This may be used to include null fields in Patch 2112 // requests. 2113 NullFields []string `json:"-"` 2114} 2115 2116func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { 2117 type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig 2118 raw := NoMethod(*s) 2119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2120} 2121 2122// GooglePrivacyDlpV2CustomInfoType: Custom information type provided by 2123// the user. Used to find domain-specific sensitive information 2124// configurable to the data in question. 2125type GooglePrivacyDlpV2CustomInfoType struct { 2126 // DetectionRules: Set of detection rules to apply to all findings of 2127 // this CustomInfoType. Rules are applied in order that they are 2128 // specified. Not supported for the `surrogate_type` CustomInfoType. 2129 DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"` 2130 2131 // Dictionary: A list of phrases to detect as a CustomInfoType. 2132 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 2133 2134 // ExclusionType: If set to EXCLUSION_TYPE_EXCLUDE this infoType will 2135 // not cause a finding to be returned. It still can be used for rules 2136 // matching. 2137 // 2138 // Possible values: 2139 // "EXCLUSION_TYPE_UNSPECIFIED" - A finding of this custom info type 2140 // will not be excluded from results. 2141 // "EXCLUSION_TYPE_EXCLUDE" - A finding of this custom info type will 2142 // be excluded from final results, but can still affect rule execution. 2143 ExclusionType string `json:"exclusionType,omitempty"` 2144 2145 // InfoType: CustomInfoType can either be a new infoType, or an 2146 // extension of built-in infoType, when the name matches one of existing 2147 // infoTypes and that infoType is specified in 2148 // `InspectContent.info_types` field. Specifying the latter adds 2149 // findings to the one detected by the system. If built-in info type is 2150 // not specified in `InspectContent.info_types` list then the name is 2151 // treated as a custom info type. 2152 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 2153 2154 // Likelihood: Likelihood to return for this CustomInfoType. This base 2155 // value can be altered by a detection rule if the finding meets the 2156 // criteria specified by the rule. Defaults to `VERY_LIKELY` if not 2157 // specified. 2158 // 2159 // Possible values: 2160 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 2161 // "VERY_UNLIKELY" - Few matching elements. 2162 // "UNLIKELY" 2163 // "POSSIBLE" - Some matching elements. 2164 // "LIKELY" 2165 // "VERY_LIKELY" - Many matching elements. 2166 Likelihood string `json:"likelihood,omitempty"` 2167 2168 // Regex: Regular expression based CustomInfoType. 2169 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 2170 2171 // StoredType: Load an existing `StoredInfoType` resource for use in 2172 // `InspectDataSource`. Not currently supported in `InspectContent`. 2173 StoredType *GooglePrivacyDlpV2StoredType `json:"storedType,omitempty"` 2174 2175 // SurrogateType: Message for detecting output from deidentification 2176 // transformations that support reversing. 2177 SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"` 2178 2179 // ForceSendFields is a list of field names (e.g. "DetectionRules") to 2180 // unconditionally include in API requests. By default, fields with 2181 // empty values are omitted from API requests. However, any non-pointer, 2182 // non-interface field appearing in ForceSendFields will be sent to the 2183 // server regardless of whether the field is empty or not. This may be 2184 // used to include empty fields in Patch requests. 2185 ForceSendFields []string `json:"-"` 2186 2187 // NullFields is a list of field names (e.g. "DetectionRules") to 2188 // include in API requests with the JSON null value. By default, fields 2189 // with empty values are omitted from API requests. However, any field 2190 // with an empty value appearing in NullFields will be sent to the 2191 // server as null. It is an error if a field in this list has a 2192 // non-empty value. This may be used to include null fields in Patch 2193 // requests. 2194 NullFields []string `json:"-"` 2195} 2196 2197func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) { 2198 type NoMethod GooglePrivacyDlpV2CustomInfoType 2199 raw := NoMethod(*s) 2200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2201} 2202 2203// GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud 2204// Datastore. 2205type GooglePrivacyDlpV2DatastoreKey struct { 2206 // EntityKey: Datastore entity key. 2207 EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"` 2208 2209 // ForceSendFields is a list of field names (e.g. "EntityKey") to 2210 // unconditionally include in API requests. By default, fields with 2211 // empty values are omitted from API requests. However, any non-pointer, 2212 // non-interface field appearing in ForceSendFields will be sent to the 2213 // server regardless of whether the field is empty or not. This may be 2214 // used to include empty fields in Patch requests. 2215 ForceSendFields []string `json:"-"` 2216 2217 // NullFields is a list of field names (e.g. "EntityKey") to include in 2218 // API requests with the JSON null value. By default, fields with empty 2219 // values are omitted from API requests. However, any field with an 2220 // empty value appearing in NullFields will be sent to the server as 2221 // null. It is an error if a field in this list has a non-empty value. 2222 // This may be used to include null fields in Patch requests. 2223 NullFields []string `json:"-"` 2224} 2225 2226func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) { 2227 type NoMethod GooglePrivacyDlpV2DatastoreKey 2228 raw := NoMethod(*s) 2229 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2230} 2231 2232// GooglePrivacyDlpV2DatastoreOptions: Options defining a data set 2233// within Google Cloud Datastore. 2234type GooglePrivacyDlpV2DatastoreOptions struct { 2235 // Kind: The kind to process. 2236 Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"` 2237 2238 // PartitionId: A partition ID identifies a grouping of entities. The 2239 // grouping is always by project and namespace, however the namespace ID 2240 // may be empty. 2241 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 2242 2243 // ForceSendFields is a list of field names (e.g. "Kind") to 2244 // unconditionally include in API requests. By default, fields with 2245 // empty values are omitted from API requests. However, any non-pointer, 2246 // non-interface field appearing in ForceSendFields will be sent to the 2247 // server regardless of whether the field is empty or not. This may be 2248 // used to include empty fields in Patch requests. 2249 ForceSendFields []string `json:"-"` 2250 2251 // NullFields is a list of field names (e.g. "Kind") to include in API 2252 // requests with the JSON null value. By default, fields with empty 2253 // values are omitted from API requests. However, any field with an 2254 // empty value appearing in NullFields will be sent to the server as 2255 // null. It is an error if a field in this list has a non-empty value. 2256 // This may be used to include null fields in Patch requests. 2257 NullFields []string `json:"-"` 2258} 2259 2260func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) { 2261 type NoMethod GooglePrivacyDlpV2DatastoreOptions 2262 raw := NoMethod(*s) 2263 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2264} 2265 2266// GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of 2267// days, with option to be consistent for the same context. See 2268// https://cloud.google.com/dlp/docs/concepts-date-shifting to learn 2269// more. 2270type GooglePrivacyDlpV2DateShiftConfig struct { 2271 // Context: Points to the field that contains the context, for example, 2272 // an entity id. If set, must also set cryptoKey. If set, shift will be 2273 // consistent for the given context. 2274 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2275 2276 // CryptoKey: Causes the shift to be computed based on this key and the 2277 // context. This results in the same shift for the same context and 2278 // crypto_key. If set, must also set context. Can only be applied to 2279 // table items. 2280 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2281 2282 // LowerBoundDays: Required. For example, -5 means shift date to at most 2283 // 5 days back in the past. 2284 LowerBoundDays int64 `json:"lowerBoundDays,omitempty"` 2285 2286 // UpperBoundDays: Required. Range of shift in days. Actual shift will 2287 // be selected at random within this range (inclusive ends). Negative 2288 // means shift to earlier in time. Must not be more than 365250 days 2289 // (1000 years) each direction. For example, 3 means shift date to at 2290 // most 3 days into the future. 2291 UpperBoundDays int64 `json:"upperBoundDays,omitempty"` 2292 2293 // ForceSendFields is a list of field names (e.g. "Context") to 2294 // unconditionally include in API requests. By default, fields with 2295 // empty values are omitted from API requests. However, any non-pointer, 2296 // non-interface field appearing in ForceSendFields will be sent to the 2297 // server regardless of whether the field is empty or not. This may be 2298 // used to include empty fields in Patch requests. 2299 ForceSendFields []string `json:"-"` 2300 2301 // NullFields is a list of field names (e.g. "Context") to include in 2302 // API requests with the JSON null value. By default, fields with empty 2303 // values are omitted from API requests. However, any field with an 2304 // empty value appearing in NullFields will be sent to the server as 2305 // null. It is an error if a field in this list has a non-empty value. 2306 // This may be used to include null fields in Patch requests. 2307 NullFields []string `json:"-"` 2308} 2309 2310func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) { 2311 type NoMethod GooglePrivacyDlpV2DateShiftConfig 2312 raw := NoMethod(*s) 2313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2314} 2315 2316// GooglePrivacyDlpV2DateTime: Message for a date time object. e.g. 2317// 2018-01-01, 5th August. 2318type GooglePrivacyDlpV2DateTime struct { 2319 // Date: One or more of the following must be set. Must be a valid date 2320 // or time value. 2321 Date *GoogleTypeDate `json:"date,omitempty"` 2322 2323 // DayOfWeek: Day of week 2324 // 2325 // Possible values: 2326 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 2327 // "MONDAY" - Monday 2328 // "TUESDAY" - Tuesday 2329 // "WEDNESDAY" - Wednesday 2330 // "THURSDAY" - Thursday 2331 // "FRIDAY" - Friday 2332 // "SATURDAY" - Saturday 2333 // "SUNDAY" - Sunday 2334 DayOfWeek string `json:"dayOfWeek,omitempty"` 2335 2336 // Time: Time of day 2337 Time *GoogleTypeTimeOfDay `json:"time,omitempty"` 2338 2339 // TimeZone: Time zone 2340 TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"` 2341 2342 // ForceSendFields is a list of field names (e.g. "Date") to 2343 // unconditionally include in API requests. By default, fields with 2344 // empty values are omitted from API requests. However, any non-pointer, 2345 // non-interface field appearing in ForceSendFields will be sent to the 2346 // server regardless of whether the field is empty or not. This may be 2347 // used to include empty fields in Patch requests. 2348 ForceSendFields []string `json:"-"` 2349 2350 // NullFields is a list of field names (e.g. "Date") to include in API 2351 // requests with the JSON null value. By default, fields with empty 2352 // values are omitted from API requests. However, any field with an 2353 // empty value appearing in NullFields will be sent to the server as 2354 // null. It is an error if a field in this list has a non-empty value. 2355 // This may be used to include null fields in Patch requests. 2356 NullFields []string `json:"-"` 2357} 2358 2359func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) { 2360 type NoMethod GooglePrivacyDlpV2DateTime 2361 raw := NoMethod(*s) 2362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2363} 2364 2365// GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls 2366// how the data will change. 2367type GooglePrivacyDlpV2DeidentifyConfig struct { 2368 // InfoTypeTransformations: Treat the dataset as free-form text and 2369 // apply the same free text transformation everywhere. 2370 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 2371 2372 // RecordTransformations: Treat the dataset as structured. 2373 // Transformations can be applied to specific locations within 2374 // structured datasets, such as transforming a column within a table. 2375 RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"` 2376 2377 // TransformationErrorHandling: Mode for handling transformation errors. 2378 // If left unspecified, the default mode is 2379 // `TransformationErrorHandling.ThrowError`. 2380 TransformationErrorHandling *GooglePrivacyDlpV2TransformationErrorHandling `json:"transformationErrorHandling,omitempty"` 2381 2382 // ForceSendFields is a list of field names (e.g. 2383 // "InfoTypeTransformations") to unconditionally include in API 2384 // requests. By default, fields with empty values are omitted from API 2385 // requests. However, any non-pointer, non-interface field appearing in 2386 // ForceSendFields will be sent to the server regardless of whether the 2387 // field is empty or not. This may be used to include empty fields in 2388 // Patch requests. 2389 ForceSendFields []string `json:"-"` 2390 2391 // NullFields is a list of field names (e.g. "InfoTypeTransformations") 2392 // to include in API requests with the JSON null value. By default, 2393 // fields with empty values are omitted from API requests. However, any 2394 // field with an empty value appearing in NullFields will be sent to the 2395 // server as null. It is an error if a field in this list has a 2396 // non-empty value. This may be used to include null fields in Patch 2397 // requests. 2398 NullFields []string `json:"-"` 2399} 2400 2401func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) { 2402 type NoMethod GooglePrivacyDlpV2DeidentifyConfig 2403 raw := NoMethod(*s) 2404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2405} 2406 2407// GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a 2408// list of items. 2409type GooglePrivacyDlpV2DeidentifyContentRequest struct { 2410 // DeidentifyConfig: Configuration for the de-identification of the 2411 // content item. Items specified here will override the template 2412 // referenced by the deidentify_template_name argument. 2413 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2414 2415 // DeidentifyTemplateName: Template to use. Any configuration directly 2416 // specified in deidentify_config will override those set in the 2417 // template. Singular fields that are set in this request will replace 2418 // their corresponding fields in the template. Repeated fields are 2419 // appended. Singular sub-messages and groups are recursively merged. 2420 DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"` 2421 2422 // InspectConfig: Configuration for the inspector. Items specified here 2423 // will override the template referenced by the inspect_template_name 2424 // argument. 2425 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 2426 2427 // InspectTemplateName: Template to use. Any configuration directly 2428 // specified in inspect_config will override those set in the template. 2429 // Singular fields that are set in this request will replace their 2430 // corresponding fields in the template. Repeated fields are appended. 2431 // Singular sub-messages and groups are recursively merged. 2432 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 2433 2434 // Item: The item to de-identify. Will be treated as text. 2435 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2436 2437 // LocationId: Deprecated. This field has no effect. 2438 LocationId string `json:"locationId,omitempty"` 2439 2440 // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to 2441 // unconditionally include in API requests. By default, fields with 2442 // empty values are omitted from API requests. However, any non-pointer, 2443 // non-interface field appearing in ForceSendFields will be sent to the 2444 // server regardless of whether the field is empty or not. This may be 2445 // used to include empty fields in Patch requests. 2446 ForceSendFields []string `json:"-"` 2447 2448 // NullFields is a list of field names (e.g. "DeidentifyConfig") to 2449 // include in API requests with the JSON null value. By default, fields 2450 // with empty values are omitted from API requests. However, any field 2451 // with an empty value appearing in NullFields will be sent to the 2452 // server as null. It is an error if a field in this list has a 2453 // non-empty value. This may be used to include null fields in Patch 2454 // requests. 2455 NullFields []string `json:"-"` 2456} 2457 2458func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) { 2459 type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest 2460 raw := NoMethod(*s) 2461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2462} 2463 2464// GooglePrivacyDlpV2DeidentifyContentResponse: Results of 2465// de-identifying a ContentItem. 2466type GooglePrivacyDlpV2DeidentifyContentResponse struct { 2467 // Item: The de-identified item. 2468 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2469 2470 // Overview: An overview of the changes that were made on the `item`. 2471 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 2472 2473 // ServerResponse contains the HTTP response code and headers from the 2474 // server. 2475 googleapi.ServerResponse `json:"-"` 2476 2477 // ForceSendFields is a list of field names (e.g. "Item") to 2478 // unconditionally include in API requests. By default, fields with 2479 // empty values are omitted from API requests. However, any non-pointer, 2480 // non-interface field appearing in ForceSendFields will be sent to the 2481 // server regardless of whether the field is empty or not. This may be 2482 // used to include empty fields in Patch requests. 2483 ForceSendFields []string `json:"-"` 2484 2485 // NullFields is a list of field names (e.g. "Item") to include in API 2486 // requests with the JSON null value. By default, fields with empty 2487 // values are omitted from API requests. However, any field with an 2488 // empty value appearing in NullFields will be sent to the server as 2489 // null. It is an error if a field in this list has a non-empty value. 2490 // This may be used to include null fields in Patch requests. 2491 NullFields []string `json:"-"` 2492} 2493 2494func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) { 2495 type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse 2496 raw := NoMethod(*s) 2497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2498} 2499 2500// GooglePrivacyDlpV2DeidentifyTemplate: DeidentifyTemplates contains 2501// instructions on how to de-identify content. See 2502// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 2503type GooglePrivacyDlpV2DeidentifyTemplate struct { 2504 // CreateTime: Output only. The creation timestamp of an 2505 // inspectTemplate. 2506 CreateTime string `json:"createTime,omitempty"` 2507 2508 // DeidentifyConfig: ///////////// // The core content of the template 2509 // // /////////////// 2510 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2511 2512 // Description: Short description (max 256 chars). 2513 Description string `json:"description,omitempty"` 2514 2515 // DisplayName: Display name (max 256 chars). 2516 DisplayName string `json:"displayName,omitempty"` 2517 2518 // Name: Output only. The template name. The template will have one of 2519 // the following formats: 2520 // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 2521 // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 2522 Name string `json:"name,omitempty"` 2523 2524 // UpdateTime: Output only. The last update timestamp of an 2525 // inspectTemplate. 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 figure out that 2557// one given individual appears in a de-identified dataset. Similarly to 2558// the k-map metric, we cannot compute δ-presence exactly without 2559// knowing the attack dataset, so we use a statistical model instead. 2560type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct { 2561 // AuxiliaryTables: Several auxiliary tables can be used in the 2562 // analysis. Each custom_tag used to tag a quasi-identifiers field must 2563 // appear in exactly one field of one auxiliary table. 2564 AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"` 2565 2566 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 2567 // fields can have the same tag. 2568 QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"` 2569 2570 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 2571 // modeling. Set if no column is tagged with a region-specific InfoType 2572 // (like US_ZIP_5) or a region code. 2573 RegionCode string `json:"regionCode,omitempty"` 2574 2575 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 2576 // unconditionally include in API requests. By default, fields with 2577 // empty values are omitted from API requests. However, any non-pointer, 2578 // non-interface field appearing in ForceSendFields will be sent to the 2579 // server regardless of whether the field is empty or not. This may be 2580 // used to include empty fields in Patch requests. 2581 ForceSendFields []string `json:"-"` 2582 2583 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 2584 // include in API requests with the JSON null value. By default, fields 2585 // with empty values are omitted from API requests. However, any field 2586 // with an empty value appearing in NullFields will be sent to the 2587 // server as null. It is an error if a field in this list has a 2588 // non-empty value. This may be used to include null fields in Patch 2589 // requests. 2590 NullFields []string `json:"-"` 2591} 2592 2593func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) { 2594 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig 2595 raw := NoMethod(*s) 2596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2597} 2598 2599// GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A 2600// DeltaPresenceEstimationHistogramBucket message with the following 2601// values: min_probability: 0.1 max_probability: 0.2 frequency: 42 means 2602// that there are 42 records for which δ is in [0.1, 0.2). An important 2603// particular case is when min_probability = max_probability = 1: then, 2604// every individual who shares this quasi-identifier combination is in 2605// the dataset. 2606type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct { 2607 // BucketSize: Number of records within these probability bounds. 2608 BucketSize int64 `json:"bucketSize,omitempty,string"` 2609 2610 // BucketValueCount: Total number of distinct quasi-identifier tuple 2611 // values in this bucket. 2612 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 2613 2614 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 2615 // The total number of classes returned per bucket is capped at 20. 2616 BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"` 2617 2618 // MaxProbability: Always greater than or equal to min_probability. 2619 MaxProbability float64 `json:"maxProbability,omitempty"` 2620 2621 // MinProbability: Between 0 and 1. 2622 MinProbability float64 `json:"minProbability,omitempty"` 2623 2624 // ForceSendFields is a list of field names (e.g. "BucketSize") to 2625 // unconditionally include in API requests. By default, fields with 2626 // empty values are omitted from API requests. However, any non-pointer, 2627 // non-interface field appearing in ForceSendFields will be sent to the 2628 // server regardless of whether the field is empty or not. This may be 2629 // used to include empty fields in Patch requests. 2630 ForceSendFields []string `json:"-"` 2631 2632 // NullFields is a list of field names (e.g. "BucketSize") to include in 2633 // API requests with the JSON null value. By default, fields with empty 2634 // values are omitted from API requests. However, any field with an 2635 // empty value appearing in NullFields will be sent to the server as 2636 // null. It is an error if a field in this list has a non-empty value. 2637 // This may be used to include null fields in Patch requests. 2638 NullFields []string `json:"-"` 2639} 2640 2641func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 2642 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2643 raw := NoMethod(*s) 2644 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2645} 2646 2647func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error { 2648 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2649 var s1 struct { 2650 MaxProbability gensupport.JSONFloat64 `json:"maxProbability"` 2651 MinProbability gensupport.JSONFloat64 `json:"minProbability"` 2652 *NoMethod 2653 } 2654 s1.NoMethod = (*NoMethod)(s) 2655 if err := json.Unmarshal(data, &s1); err != nil { 2656 return err 2657 } 2658 s.MaxProbability = float64(s1.MaxProbability) 2659 s.MinProbability = float64(s1.MinProbability) 2660 return nil 2661} 2662 2663// GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of 2664// values for the quasi-identifier columns. 2665type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct { 2666 // EstimatedProbability: The estimated probability that a given 2667 // individual sharing these quasi-identifier values is in the dataset. 2668 // This value, typically called δ, is the ratio between the number of 2669 // records in the dataset with these quasi-identifier values, and the 2670 // total number of individuals (inside *and* outside the dataset) with 2671 // these quasi-identifier values. For example, if there are 15 2672 // individuals in the dataset who share the same quasi-identifier 2673 // values, and an estimated 100 people in the entire population with 2674 // these values, then δ is 0.15. 2675 EstimatedProbability float64 `json:"estimatedProbability,omitempty"` 2676 2677 // QuasiIdsValues: The quasi-identifier values. 2678 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 2679 2680 // ForceSendFields is a list of field names (e.g. 2681 // "EstimatedProbability") to unconditionally include in API requests. 2682 // By default, fields with empty values are omitted from API requests. 2683 // However, any non-pointer, non-interface field appearing in 2684 // ForceSendFields will be sent to the server regardless of whether the 2685 // field is empty or not. This may be used to include empty fields in 2686 // Patch requests. 2687 ForceSendFields []string `json:"-"` 2688 2689 // NullFields is a list of field names (e.g. "EstimatedProbability") to 2690 // include in API requests with the JSON null value. By default, fields 2691 // with empty values are omitted from API requests. However, any field 2692 // with an empty value appearing in NullFields will be sent to the 2693 // server as null. It is an error if a field in this list has a 2694 // non-empty value. This may be used to include null fields in Patch 2695 // requests. 2696 NullFields []string `json:"-"` 2697} 2698 2699func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 2700 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2701 raw := NoMethod(*s) 2702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2703} 2704 2705func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error { 2706 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2707 var s1 struct { 2708 EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"` 2709 *NoMethod 2710 } 2711 s1.NoMethod = (*NoMethod)(s) 2712 if err := json.Unmarshal(data, &s1); err != nil { 2713 return err 2714 } 2715 s.EstimatedProbability = float64(s1.EstimatedProbability) 2716 return nil 2717} 2718 2719// GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the 2720// δ-presence computation. Note that these results are an estimation, 2721// not exact values. 2722type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct { 2723 // DeltaPresenceEstimationHistogram: The intervals [min_probability, 2724 // max_probability) do not overlap. If a value doesn't correspond to any 2725 // such interval, the associated frequency is zero. For example, the 2726 // following records: {min_probability: 0, max_probability: 0.1, 2727 // frequency: 17} {min_probability: 0.2, max_probability: 0.3, 2728 // frequency: 42} {min_probability: 0.3, max_probability: 0.4, 2729 // frequency: 99} mean that there are no record with an estimated 2730 // probability in [0.1, 0.2) nor larger or equal to 0.4. 2731 DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"` 2732 2733 // ForceSendFields is a list of field names (e.g. 2734 // "DeltaPresenceEstimationHistogram") to unconditionally include in API 2735 // requests. By default, fields with empty values are omitted from API 2736 // requests. However, any non-pointer, non-interface field appearing in 2737 // ForceSendFields will be sent to the server regardless of whether the 2738 // field is empty or not. This may be used to include empty fields in 2739 // Patch requests. 2740 ForceSendFields []string `json:"-"` 2741 2742 // NullFields is a list of field names (e.g. 2743 // "DeltaPresenceEstimationHistogram") to include in API requests with 2744 // the JSON null value. By default, fields with empty values are omitted 2745 // from API requests. However, any field with an empty value appearing 2746 // in NullFields will be sent to the server as null. It is an error if a 2747 // field in this list has a non-empty value. This may be used to include 2748 // null fields in Patch requests. 2749 NullFields []string `json:"-"` 2750} 2751 2752func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) { 2753 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult 2754 raw := NoMethod(*s) 2755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2756} 2757 2758// GooglePrivacyDlpV2DetectionRule: Deprecated; use `InspectionRuleSet` 2759// instead. Rule for modifying a `CustomInfoType` to alter behavior 2760// under certain circumstances, depending on the specific details of the 2761// rule. Not supported for the `surrogate_type` custom infoType. 2762type GooglePrivacyDlpV2DetectionRule struct { 2763 // HotwordRule: Hotword-based detection rule. 2764 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 2765 2766 // ForceSendFields is a list of field names (e.g. "HotwordRule") to 2767 // unconditionally include in API requests. By default, fields with 2768 // empty values are omitted from API requests. However, any non-pointer, 2769 // non-interface field appearing in ForceSendFields will be sent to the 2770 // server regardless of whether the field is empty or not. This may be 2771 // used to include empty fields in Patch requests. 2772 ForceSendFields []string `json:"-"` 2773 2774 // NullFields is a list of field names (e.g. "HotwordRule") to include 2775 // in API requests with the JSON null value. By default, fields with 2776 // empty values are omitted from API requests. However, any field with 2777 // an empty value appearing in NullFields will be sent to the server as 2778 // null. It is an error if a field in this list has a non-empty value. 2779 // This may be used to include null fields in Patch requests. 2780 NullFields []string `json:"-"` 2781} 2782 2783func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) { 2784 type NoMethod GooglePrivacyDlpV2DetectionRule 2785 raw := NoMethod(*s) 2786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2787} 2788 2789// GooglePrivacyDlpV2Dictionary: Custom information type based on a 2790// dictionary of words or phrases. This can be used to match sensitive 2791// information specific to the data, such as a list of employee IDs or 2792// job titles. Dictionary words are case-insensitive and all characters 2793// other than letters and digits in the unicode [Basic Multilingual 2794// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multili 2795// ngual_Plane) will be replaced with whitespace when scanning for 2796// matches, so the dictionary phrase "Sam Johnson" will match all three 2797// phrases "sam johnson", "Sam, Johnson", and "Sam (Johnson)". 2798// Additionally, the characters surrounding any match must be of a 2799// different type than the adjacent characters within the word, so 2800// letters must be next to non-letters and digits next to non-digits. 2801// For example, the dictionary word "jen" will match the first three 2802// letters of the text "jen123" but will return no matches for 2803// "jennifer". Dictionary words containing a large number of characters 2804// that are not letters or digits may result in unexpected findings 2805// because such characters are treated as whitespace. The 2806// [limits](https://cloud.google.com/dlp/limits) page contains details 2807// about the size limits of dictionaries. For dictionaries that do not 2808// fit within these constraints, consider using 2809// `LargeCustomDictionaryConfig` in the `StoredInfoType` API. 2810type GooglePrivacyDlpV2Dictionary struct { 2811 // CloudStoragePath: Newline-delimited file of words in Cloud Storage. 2812 // Only a single file is accepted. 2813 CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"` 2814 2815 // WordList: List of words or phrases to search for. 2816 WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` 2817 2818 // ForceSendFields is a list of field names (e.g. "CloudStoragePath") to 2819 // unconditionally include in API requests. By default, fields with 2820 // empty values are omitted from API requests. However, any non-pointer, 2821 // non-interface field appearing in ForceSendFields will be sent to the 2822 // server regardless of whether the field is empty or not. This may be 2823 // used to include empty fields in Patch requests. 2824 ForceSendFields []string `json:"-"` 2825 2826 // NullFields is a list of field names (e.g. "CloudStoragePath") to 2827 // include in API requests with the JSON null value. By default, fields 2828 // with empty values are omitted from API requests. However, any field 2829 // with an empty value appearing in NullFields will be sent to the 2830 // server as null. It is an error if a field in this list has a 2831 // non-empty value. This may be used to include null fields in Patch 2832 // requests. 2833 NullFields []string `json:"-"` 2834} 2835 2836func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) { 2837 type NoMethod GooglePrivacyDlpV2Dictionary 2838 raw := NoMethod(*s) 2839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2840} 2841 2842// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP 2843// job. 2844type GooglePrivacyDlpV2DlpJob struct { 2845 // CreateTime: Time when the job was created. 2846 CreateTime string `json:"createTime,omitempty"` 2847 2848 // EndTime: Time when the job finished. 2849 EndTime string `json:"endTime,omitempty"` 2850 2851 // Errors: A stream of errors encountered running the job. 2852 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 2853 2854 // InspectDetails: Results from inspecting a data source. 2855 InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` 2856 2857 // JobTriggerName: If created by a job trigger, the resource name of the 2858 // trigger that instantiated the job. 2859 JobTriggerName string `json:"jobTriggerName,omitempty"` 2860 2861 // Name: The server-assigned name. 2862 Name string `json:"name,omitempty"` 2863 2864 // RiskDetails: Results from analyzing risk of a data source. 2865 RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` 2866 2867 // StartTime: Time when the job started. 2868 StartTime string `json:"startTime,omitempty"` 2869 2870 // State: State of a job. 2871 // 2872 // Possible values: 2873 // "JOB_STATE_UNSPECIFIED" - Unused. 2874 // "PENDING" - The job has not yet started. 2875 // "RUNNING" - The job is currently running. Once a job has finished 2876 // it will transition to FAILED or DONE. 2877 // "DONE" - The job is no longer running. 2878 // "CANCELED" - The job was canceled before it could complete. 2879 // "FAILED" - The job had an error and did not complete. 2880 // "ACTIVE" - The job is currently accepting findings via 2881 // hybridInspect. A hybrid job in ACTIVE state may continue to have 2882 // findings added to it through calling of hybridInspect. After the job 2883 // has finished no more calls to hybridInspect may be made. ACTIVE jobs 2884 // can transition to DONE. 2885 State string `json:"state,omitempty"` 2886 2887 // Type: The type of job. 2888 // 2889 // Possible values: 2890 // "DLP_JOB_TYPE_UNSPECIFIED" - Unused 2891 // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 2892 // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 2893 Type string `json:"type,omitempty"` 2894 2895 // ServerResponse contains the HTTP response code and headers from the 2896 // server. 2897 googleapi.ServerResponse `json:"-"` 2898 2899 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2900 // unconditionally include in API requests. By default, fields with 2901 // empty values are omitted from API requests. However, any non-pointer, 2902 // non-interface field appearing in ForceSendFields will be sent to the 2903 // server regardless of whether the field is empty or not. This may be 2904 // used to include empty fields in Patch requests. 2905 ForceSendFields []string `json:"-"` 2906 2907 // NullFields is a list of field names (e.g. "CreateTime") to include in 2908 // API requests with the JSON null value. By default, fields with empty 2909 // values are omitted from API requests. However, any field with an 2910 // empty value appearing in NullFields will be sent to the server as 2911 // null. It is an error if a field in this list has a non-empty value. 2912 // This may be used to include null fields in Patch requests. 2913 NullFields []string `json:"-"` 2914} 2915 2916func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { 2917 type NoMethod GooglePrivacyDlpV2DlpJob 2918 raw := NoMethod(*s) 2919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2920} 2921 2922// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a 2923// document. 2924type GooglePrivacyDlpV2DocumentLocation struct { 2925 // FileOffset: Offset of the line, from the beginning of the file, where 2926 // the finding is located. 2927 FileOffset int64 `json:"fileOffset,omitempty,string"` 2928 2929 // ForceSendFields is a list of field names (e.g. "FileOffset") to 2930 // unconditionally include in API requests. By default, fields with 2931 // empty values are omitted from API requests. However, any non-pointer, 2932 // non-interface field appearing in ForceSendFields will be sent to the 2933 // server regardless of whether the field is empty or not. This may be 2934 // used to include empty fields in Patch requests. 2935 ForceSendFields []string `json:"-"` 2936 2937 // NullFields is a list of field names (e.g. "FileOffset") to include in 2938 // API requests with the JSON null value. By default, fields with empty 2939 // values are omitted from API requests. However, any field with an 2940 // empty value appearing in NullFields will be sent to the server as 2941 // null. It is an error if a field in this list has a non-empty value. 2942 // This may be used to include null fields in Patch requests. 2943 NullFields []string `json:"-"` 2944} 2945 2946func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { 2947 type NoMethod GooglePrivacyDlpV2DocumentLocation 2948 raw := NoMethod(*s) 2949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2950} 2951 2952// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set 2953// of fields that correspond to a single person. For example, in medical 2954// records the `EntityId` might be a patient identifier, or for 2955// financial records it might be an account identifier. This message is 2956// used when generalizations or analysis must take into account that 2957// multiple rows correspond to the same entity. 2958type GooglePrivacyDlpV2EntityId struct { 2959 // Field: Composite key indicating which field contains the entity 2960 // identifier. 2961 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 2962 2963 // ForceSendFields is a list of field names (e.g. "Field") to 2964 // unconditionally include in API requests. By default, fields with 2965 // empty values are omitted from API requests. However, any non-pointer, 2966 // non-interface field appearing in ForceSendFields will be sent to the 2967 // server regardless of whether the field is empty or not. This may be 2968 // used to include empty fields in Patch requests. 2969 ForceSendFields []string `json:"-"` 2970 2971 // NullFields is a list of field names (e.g. "Field") to include in API 2972 // requests with the JSON null value. By default, fields with empty 2973 // values are omitted from API requests. However, any field with an 2974 // empty value appearing in NullFields will be sent to the server as 2975 // null. It is an error if a field in this list has a non-empty value. 2976 // This may be used to include null fields in Patch requests. 2977 NullFields []string `json:"-"` 2978} 2979 2980func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { 2981 type NoMethod GooglePrivacyDlpV2EntityId 2982 raw := NoMethod(*s) 2983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2984} 2985 2986// GooglePrivacyDlpV2Error: Details information about an error 2987// encountered during job execution or the results of an unsuccessful 2988// activation of the JobTrigger. 2989type GooglePrivacyDlpV2Error struct { 2990 // Details: Detailed error codes and messages. 2991 Details *GoogleRpcStatus `json:"details,omitempty"` 2992 2993 // Timestamps: The times the error occurred. 2994 Timestamps []string `json:"timestamps,omitempty"` 2995 2996 // ForceSendFields is a list of field names (e.g. "Details") to 2997 // unconditionally include in API requests. By default, fields with 2998 // empty values are omitted from API requests. However, any non-pointer, 2999 // non-interface field appearing in ForceSendFields will be sent to the 3000 // server regardless of whether the field is empty or not. This may be 3001 // used to include empty fields in Patch requests. 3002 ForceSendFields []string `json:"-"` 3003 3004 // NullFields is a list of field names (e.g. "Details") to include in 3005 // API requests with the JSON null value. By default, fields with empty 3006 // values are omitted from API requests. However, any field with an 3007 // empty value appearing in NullFields will be sent to the server as 3008 // null. It is an error if a field in this list has a non-empty value. 3009 // This may be used to include null fields in Patch requests. 3010 NullFields []string `json:"-"` 3011} 3012 3013func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { 3014 type NoMethod GooglePrivacyDlpV2Error 3015 raw := NoMethod(*s) 3016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3017} 3018 3019// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes. 3020type GooglePrivacyDlpV2ExcludeInfoTypes struct { 3021 // InfoTypes: InfoType list in ExclusionRule rule drops a finding when 3022 // it overlaps or contained within with a finding of an infoType from 3023 // this list. For example, for `InspectionRuleSet.info_types` containing 3024 // "PHONE_NUMBER" and `exclusion_rule` containing 3025 // `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number 3026 // findings are dropped if they overlap with EMAIL_ADDRESS finding. That 3027 // leads to "555-222-2222@example.org" to generate only a single 3028 // finding, namely email address. 3029 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3030 3031 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3032 // unconditionally include in API requests. By default, fields with 3033 // empty values are omitted from API requests. However, any non-pointer, 3034 // non-interface field appearing in ForceSendFields will be sent to the 3035 // server regardless of whether the field is empty or not. This may be 3036 // used to include empty fields in Patch requests. 3037 ForceSendFields []string `json:"-"` 3038 3039 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3040 // API requests with the JSON null value. By default, fields with empty 3041 // values are omitted from API requests. However, any field with an 3042 // empty value appearing in NullFields will be sent to the server as 3043 // null. It is an error if a field in this list has a non-empty value. 3044 // This may be used to include null fields in Patch requests. 3045 NullFields []string `json:"-"` 3046} 3047 3048func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { 3049 type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes 3050 raw := NoMethod(*s) 3051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3052} 3053 3054// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions 3055// when findings of infoTypes specified in `InspectionRuleSet` are 3056// removed from results. 3057type GooglePrivacyDlpV2ExclusionRule struct { 3058 // Dictionary: Dictionary which defines the rule. 3059 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 3060 3061 // ExcludeInfoTypes: Set of infoTypes for which findings would affect 3062 // this rule. 3063 ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` 3064 3065 // MatchingType: How the rule is applied, see MatchingType documentation 3066 // for details. 3067 // 3068 // Possible values: 3069 // "MATCHING_TYPE_UNSPECIFIED" - Invalid. 3070 // "MATCHING_TYPE_FULL_MATCH" - Full match. - Dictionary: join of 3071 // Dictionary results matched complete finding quote - Regex: all regex 3072 // matches fill a finding quote start to end - Exclude info type: 3073 // completely inside affecting info types findings 3074 // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. - Dictionary: at 3075 // least one of the tokens in the finding matches - Regex: substring of 3076 // the finding matches - Exclude info type: intersects with affecting 3077 // info types findings 3078 // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. - Dictionary: no 3079 // tokens in the finding match the dictionary - Regex: finding doesn't 3080 // match the regex - Exclude info type: no intersection with affecting 3081 // info types findings 3082 MatchingType string `json:"matchingType,omitempty"` 3083 3084 // Regex: Regular expression which defines the rule. 3085 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 3086 3087 // ForceSendFields is a list of field names (e.g. "Dictionary") to 3088 // unconditionally include in API requests. By default, fields with 3089 // empty values are omitted from API requests. However, any non-pointer, 3090 // non-interface field appearing in ForceSendFields will be sent to the 3091 // server regardless of whether the field is empty or not. This may be 3092 // used to include empty fields in Patch requests. 3093 ForceSendFields []string `json:"-"` 3094 3095 // NullFields is a list of field names (e.g. "Dictionary") to include in 3096 // API requests with the JSON null value. By default, fields with empty 3097 // values are omitted from API requests. However, any field with an 3098 // empty value appearing in NullFields will be sent to the server as 3099 // null. It is an error if a field in this list has a non-empty value. 3100 // This may be used to include null fields in Patch requests. 3101 NullFields []string `json:"-"` 3102} 3103 3104func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { 3105 type NoMethod GooglePrivacyDlpV2ExclusionRule 3106 raw := NoMethod(*s) 3107 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3108} 3109 3110// GooglePrivacyDlpV2Expressions: An expression, consisting or an 3111// operator and conditions. 3112type GooglePrivacyDlpV2Expressions struct { 3113 // Conditions: Conditions to apply to the expression. 3114 Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` 3115 3116 // LogicalOperator: The operator to apply to the result of conditions. 3117 // Default and currently only supported value is `AND`. 3118 // 3119 // Possible values: 3120 // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused 3121 // "AND" - Conditional AND 3122 LogicalOperator string `json:"logicalOperator,omitempty"` 3123 3124 // ForceSendFields is a list of field names (e.g. "Conditions") to 3125 // unconditionally include in API requests. By default, fields with 3126 // empty values are omitted from API requests. However, any non-pointer, 3127 // non-interface field appearing in ForceSendFields will be sent to the 3128 // server regardless of whether the field is empty or not. This may be 3129 // used to include empty fields in Patch requests. 3130 ForceSendFields []string `json:"-"` 3131 3132 // NullFields is a list of field names (e.g. "Conditions") to include in 3133 // API requests with the JSON null value. By default, fields with empty 3134 // values are omitted from API requests. However, any field with an 3135 // empty value appearing in NullFields will be sent to the server as 3136 // null. It is an error if a field in this list has a non-empty value. 3137 // This may be used to include null fields in Patch requests. 3138 NullFields []string `json:"-"` 3139} 3140 3141func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { 3142 type NoMethod GooglePrivacyDlpV2Expressions 3143 raw := NoMethod(*s) 3144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3145} 3146 3147// GooglePrivacyDlpV2FieldId: General identifier of a data field in a 3148// storage service. 3149type GooglePrivacyDlpV2FieldId struct { 3150 // Name: Name describing the field. 3151 Name string `json:"name,omitempty"` 3152 3153 // ForceSendFields is a list of field names (e.g. "Name") to 3154 // unconditionally include in API requests. By default, fields with 3155 // empty values are omitted from API requests. However, any non-pointer, 3156 // non-interface field appearing in ForceSendFields will be sent to the 3157 // server regardless of whether the field is empty or not. This may be 3158 // used to include empty fields in Patch requests. 3159 ForceSendFields []string `json:"-"` 3160 3161 // NullFields is a list of field names (e.g. "Name") to include in API 3162 // requests with the JSON null value. By default, fields with empty 3163 // values are omitted from API requests. However, any field with an 3164 // empty value appearing in NullFields will be sent to the server as 3165 // null. It is an error if a field in this list has a non-empty value. 3166 // This may be used to include null fields in Patch requests. 3167 NullFields []string `json:"-"` 3168} 3169 3170func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { 3171 type NoMethod GooglePrivacyDlpV2FieldId 3172 raw := NoMethod(*s) 3173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3174} 3175 3176// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to 3177// the field. 3178type GooglePrivacyDlpV2FieldTransformation struct { 3179 // Condition: Only apply the transformation if the condition evaluates 3180 // to true for the given `RecordCondition`. The conditions are allowed 3181 // to reference fields that are not used in the actual transformation. 3182 // Example Use Cases: - Apply a different bucket transformation to an 3183 // age column if the zip code column for the same record is within a 3184 // specific range. - Redact a field if the date of birth field is 3185 // greater than 85. 3186 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 3187 3188 // Fields: Required. Input field(s) to apply the transformation to. 3189 Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` 3190 3191 // InfoTypeTransformations: Treat the contents of the field as free 3192 // text, and selectively transform content that matches an `InfoType`. 3193 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 3194 3195 // PrimitiveTransformation: Apply the transformation to the entire 3196 // field. 3197 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3198 3199 // ForceSendFields is a list of field names (e.g. "Condition") to 3200 // unconditionally include in API requests. By default, fields with 3201 // empty values are omitted from API requests. However, any non-pointer, 3202 // non-interface field appearing in ForceSendFields will be sent to the 3203 // server regardless of whether the field is empty or not. This may be 3204 // used to include empty fields in Patch requests. 3205 ForceSendFields []string `json:"-"` 3206 3207 // NullFields is a list of field names (e.g. "Condition") to include in 3208 // API requests with the JSON null value. By default, fields with empty 3209 // values are omitted from API requests. However, any field with an 3210 // empty value appearing in NullFields will be sent to the server as 3211 // null. It is an error if a field in this list has a non-empty value. 3212 // This may be used to include null fields in Patch requests. 3213 NullFields []string `json:"-"` 3214} 3215 3216func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { 3217 type NoMethod GooglePrivacyDlpV2FieldTransformation 3218 raw := NoMethod(*s) 3219 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3220} 3221 3222// GooglePrivacyDlpV2FileSet: Set of files to scan. 3223type GooglePrivacyDlpV2FileSet struct { 3224 // RegexFileSet: The regex-filtered set of files to scan. Exactly one of 3225 // `url` or `regex_file_set` must be set. 3226 RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` 3227 3228 // Url: The Cloud Storage url of the file(s) to scan, in the format 3229 // `gs:///`. Trailing wildcard in the path is allowed. If the url ends 3230 // in a trailing slash, the bucket or directory represented by the url 3231 // will be scanned non-recursively (content in sub-directories will not 3232 // be scanned). This means that `gs://mybucket/` is equivalent to 3233 // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to 3234 // `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` 3235 // must be set. 3236 Url string `json:"url,omitempty"` 3237 3238 // ForceSendFields is a list of field names (e.g. "RegexFileSet") to 3239 // unconditionally include in API requests. By default, fields with 3240 // empty values are omitted from API requests. However, any non-pointer, 3241 // non-interface field appearing in ForceSendFields will be sent to the 3242 // server regardless of whether the field is empty or not. This may be 3243 // used to include empty fields in Patch requests. 3244 ForceSendFields []string `json:"-"` 3245 3246 // NullFields is a list of field names (e.g. "RegexFileSet") to include 3247 // in API requests with the JSON null value. By default, fields with 3248 // empty values are omitted from API requests. However, any field with 3249 // an empty value appearing in NullFields will be sent to the server as 3250 // null. It is an error if a field in this list has a non-empty value. 3251 // This may be used to include null fields in Patch requests. 3252 NullFields []string `json:"-"` 3253} 3254 3255func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { 3256 type NoMethod GooglePrivacyDlpV2FileSet 3257 raw := NoMethod(*s) 3258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3259} 3260 3261// GooglePrivacyDlpV2Finding: Represents a piece of potentially 3262// sensitive content. 3263type GooglePrivacyDlpV2Finding struct { 3264 // CreateTime: Timestamp when finding was detected. 3265 CreateTime string `json:"createTime,omitempty"` 3266 3267 // FindingId: The unique finding id. 3268 FindingId string `json:"findingId,omitempty"` 3269 3270 // InfoType: The type of content that might have been found. Provided if 3271 // `excluded_types` is false. 3272 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3273 3274 // JobCreateTime: Time the job started that produced this finding. 3275 JobCreateTime string `json:"jobCreateTime,omitempty"` 3276 3277 // JobName: The job that stored the finding. 3278 JobName string `json:"jobName,omitempty"` 3279 3280 // Labels: The labels associated with this `Finding`. Label keys must be 3281 // between 1 and 63 characters long and must conform to the following 3282 // regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must 3283 // be between 0 and 63 characters long and must conform to the regular 3284 // expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels 3285 // can be associated with a given finding. Examples: * "environment" : 3286 // "production" * "pipeline" : "etl" 3287 Labels map[string]string `json:"labels,omitempty"` 3288 3289 // Likelihood: Confidence of how likely it is that the `info_type` is 3290 // correct. 3291 // 3292 // Possible values: 3293 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 3294 // "VERY_UNLIKELY" - Few matching elements. 3295 // "UNLIKELY" 3296 // "POSSIBLE" - Some matching elements. 3297 // "LIKELY" 3298 // "VERY_LIKELY" - Many matching elements. 3299 Likelihood string `json:"likelihood,omitempty"` 3300 3301 // Location: Where the content was found. 3302 Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` 3303 3304 // Name: Resource name in format 3305 // projects/{project}/locations/{location}/findings/{finding} Populated 3306 // only when viewing persisted findings. 3307 Name string `json:"name,omitempty"` 3308 3309 // Quote: The content that was found. Even if the content is not 3310 // textual, it may be converted to a textual representation here. 3311 // Provided if `include_quote` is true and the finding is less than or 3312 // equal to 4096 bytes long. If the finding exceeds 4096 bytes in 3313 // length, the quote may be omitted. 3314 Quote string `json:"quote,omitempty"` 3315 3316 // QuoteInfo: Contains data parsed from quotes. Only populated if 3317 // include_quote was set to true and a supported infoType was requested. 3318 // Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. 3319 QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` 3320 3321 // ResourceName: The job that stored the finding. 3322 ResourceName string `json:"resourceName,omitempty"` 3323 3324 // TriggerName: Job trigger name, if applicable, for this finding. 3325 TriggerName string `json:"triggerName,omitempty"` 3326 3327 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3328 // unconditionally include in API requests. By default, fields with 3329 // empty values are omitted from API requests. However, any non-pointer, 3330 // non-interface field appearing in ForceSendFields will be sent to the 3331 // server regardless of whether the field is empty or not. This may be 3332 // used to include empty fields in Patch requests. 3333 ForceSendFields []string `json:"-"` 3334 3335 // NullFields is a list of field names (e.g. "CreateTime") to include in 3336 // API requests with the JSON null value. By default, fields with empty 3337 // values are omitted from API requests. However, any field with an 3338 // empty value appearing in NullFields will be sent to the server as 3339 // null. It is an error if a field in this list has a non-empty value. 3340 // This may be used to include null fields in Patch requests. 3341 NullFields []string `json:"-"` 3342} 3343 3344func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { 3345 type NoMethod GooglePrivacyDlpV2Finding 3346 raw := NoMethod(*s) 3347 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3348} 3349 3350// GooglePrivacyDlpV2FindingLimits: Configuration to control the number 3351// of findings returned. 3352type GooglePrivacyDlpV2FindingLimits struct { 3353 // MaxFindingsPerInfoType: Configuration of findings limit given for 3354 // specified infoTypes. 3355 MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` 3356 3357 // MaxFindingsPerItem: Max number of findings that will be returned for 3358 // each item scanned. When set within `InspectJobConfig`, the maximum 3359 // returned is 2000 regardless if this is set higher. When set within 3360 // `InspectContentRequest`, this field is ignored. 3361 MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` 3362 3363 // MaxFindingsPerRequest: Max number of findings that will be returned 3364 // per request/job. When set within `InspectContentRequest`, the maximum 3365 // returned is 2000 regardless if this is set higher. 3366 MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` 3367 3368 // ForceSendFields is a list of field names (e.g. 3369 // "MaxFindingsPerInfoType") to unconditionally include in API requests. 3370 // By default, fields with empty values are omitted from API requests. 3371 // However, any non-pointer, non-interface field appearing in 3372 // ForceSendFields will be sent to the server regardless of whether the 3373 // field is empty or not. This may be used to include empty fields in 3374 // Patch requests. 3375 ForceSendFields []string `json:"-"` 3376 3377 // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") 3378 // to include in API requests with the JSON null value. By default, 3379 // fields with empty values are omitted from API requests. However, any 3380 // field with an empty value appearing in NullFields will be sent to the 3381 // server as null. It is an error if a field in this list has a 3382 // non-empty value. This may be used to include null fields in Patch 3383 // requests. 3384 NullFields []string `json:"-"` 3385} 3386 3387func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { 3388 type NoMethod GooglePrivacyDlpV2FindingLimits 3389 raw := NoMethod(*s) 3390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3391} 3392 3393// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for 3394// finishing a DLP hybrid job. 3395type GooglePrivacyDlpV2FinishDlpJobRequest struct { 3396} 3397 3398// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on 3399// fixed size ranges. The Bucketing transformation can provide all of 3400// this functionality, but requires more configuration. This message is 3401// provided as a convenience to the user for simple bucketing 3402// strategies. The transformed value will be a hyphenated string of 3403// {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound 3404// = 20 all values that are within this bucket will be replaced with 3405// "10-20". This can be used on data of type: double, long. If the bound 3406// Value type differs from the type of data being transformed, we will 3407// first attempt converting the type of the data to be transformed to 3408// match the type of the bound before comparing. See 3409// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 3410type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { 3411 // BucketSize: Required. Size of each bucket (except for minimum and 3412 // maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and 3413 // `bucket_size` = 10, then the following buckets would be used: -10, 3414 // 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. 3415 // Precision up to 2 decimals works. 3416 BucketSize float64 `json:"bucketSize,omitempty"` 3417 3418 // LowerBound: Required. Lower bound value of buckets. All values less 3419 // than `lower_bound` are grouped together into a single bucket; for 3420 // example if `lower_bound` = 10, then all values less than 10 are 3421 // replaced with the value "-10". 3422 LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` 3423 3424 // UpperBound: Required. Upper bound value of buckets. All values 3425 // greater than upper_bound are grouped together into a single bucket; 3426 // for example if `upper_bound` = 89, then all values greater than 89 3427 // are replaced with the value "89+". 3428 UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` 3429 3430 // ForceSendFields is a list of field names (e.g. "BucketSize") to 3431 // unconditionally include in API requests. By default, fields with 3432 // empty values are omitted from API requests. However, any non-pointer, 3433 // non-interface field appearing in ForceSendFields will be sent to the 3434 // server regardless of whether the field is empty or not. This may be 3435 // used to include empty fields in Patch requests. 3436 ForceSendFields []string `json:"-"` 3437 3438 // NullFields is a list of field names (e.g. "BucketSize") to include in 3439 // API requests with the JSON null value. By default, fields with empty 3440 // values are omitted from API requests. However, any field with an 3441 // empty value appearing in NullFields will be sent to the server as 3442 // null. It is an error if a field in this list has a non-empty value. 3443 // This may be used to include null fields in Patch requests. 3444 NullFields []string `json:"-"` 3445} 3446 3447func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { 3448 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3449 raw := NoMethod(*s) 3450 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3451} 3452 3453func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { 3454 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3455 var s1 struct { 3456 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 3457 *NoMethod 3458 } 3459 s1.NoMethod = (*NoMethod)(s) 3460 if err := json.Unmarshal(data, &s1); err != nil { 3461 return err 3462 } 3463 s.BucketSize = float64(s1.BucketSize) 3464 return nil 3465} 3466 3467// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood 3468// of findings within a certain proximity of hotwords. 3469type GooglePrivacyDlpV2HotwordRule struct { 3470 // HotwordRegex: Regular expression pattern defining what qualifies as a 3471 // hotword. 3472 HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` 3473 3474 // LikelihoodAdjustment: Likelihood adjustment to apply to all matching 3475 // findings. 3476 LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` 3477 3478 // Proximity: Proximity of the finding within which the entire hotword 3479 // must reside. The total length of the window cannot exceed 1000 3480 // characters. Note that the finding itself will be included in the 3481 // window, so that hotwords may be used to match substrings of the 3482 // finding itself. For example, the certainty of a phone number regex 3483 // "\(\d{3}\) \d{3}-\d{4}" could be adjusted upwards if the area code is 3484 // known to be the local area code of a company office using the hotword 3485 // regex "\(xxx\)", where "xxx" is the area code in question. 3486 Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` 3487 3488 // ForceSendFields is a list of field names (e.g. "HotwordRegex") to 3489 // unconditionally include in API requests. By default, fields with 3490 // empty values are omitted from API requests. However, any non-pointer, 3491 // non-interface field appearing in ForceSendFields will be sent to the 3492 // server regardless of whether the field is empty or not. This may be 3493 // used to include empty fields in Patch requests. 3494 ForceSendFields []string `json:"-"` 3495 3496 // NullFields is a list of field names (e.g. "HotwordRegex") to include 3497 // in API requests with the JSON null value. By default, fields with 3498 // empty values are omitted from API requests. However, any field with 3499 // an empty value appearing in NullFields will be sent to the server as 3500 // null. It is an error if a field in this list has a non-empty value. 3501 // This may be used to include null fields in Patch requests. 3502 NullFields []string `json:"-"` 3503} 3504 3505func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { 3506 type NoMethod GooglePrivacyDlpV2HotwordRule 3507 raw := NoMethod(*s) 3508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3509} 3510 3511// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to 3512// inspect. Will be stored temporarily during processing. 3513type GooglePrivacyDlpV2HybridContentItem struct { 3514 // FindingDetails: Supplementary information that will be added to each 3515 // finding. 3516 FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"` 3517 3518 // Item: The item to inspect. 3519 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 3520 3521 // ForceSendFields is a list of field names (e.g. "FindingDetails") to 3522 // unconditionally include in API requests. By default, fields with 3523 // empty values are omitted from API requests. However, any non-pointer, 3524 // non-interface field appearing in ForceSendFields will be sent to the 3525 // server regardless of whether the field is empty or not. This may be 3526 // used to include empty fields in Patch requests. 3527 ForceSendFields []string `json:"-"` 3528 3529 // NullFields is a list of field names (e.g. "FindingDetails") to 3530 // include in API requests with the JSON null value. By default, fields 3531 // with empty values are omitted from API requests. However, any field 3532 // with an empty value appearing in NullFields will be sent to the 3533 // server as null. It is an error if a field in this list has a 3534 // non-empty value. This may be used to include null fields in Patch 3535 // requests. 3536 NullFields []string `json:"-"` 3537} 3538 3539func (s *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) { 3540 type NoMethod GooglePrivacyDlpV2HybridContentItem 3541 raw := NoMethod(*s) 3542 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3543} 3544 3545// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate 3546// additional data with each finding. 3547type GooglePrivacyDlpV2HybridFindingDetails struct { 3548 // ContainerDetails: Details about the container where the content being 3549 // inspected is from. 3550 ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"` 3551 3552 // FileOffset: Offset in bytes of the line, from the beginning of the 3553 // file, where the finding is located. Populate if the item being 3554 // scanned is only part of a bigger item, such as a shard of a file and 3555 // you want to track the absolute position of the finding. 3556 FileOffset int64 `json:"fileOffset,omitempty,string"` 3557 3558 // Labels: Labels to represent user provided metadata about the data 3559 // being inspected. If configured by the job, some key values may be 3560 // required. The labels associated with `Finding`'s produced by hybrid 3561 // inspection. Label keys must be between 1 and 63 characters long and 3562 // must conform to the following regular expression: 3563 // `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3564 // characters long and must conform to the regular expression 3565 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3566 // associated with a given finding. Examples: * "environment" : 3567 // "production" * "pipeline" : "etl" 3568 Labels map[string]string `json:"labels,omitempty"` 3569 3570 // RowOffset: Offset of the row for tables. Populate if the row(s) being 3571 // scanned are part of a bigger dataset and you want to keep track of 3572 // their absolute position. 3573 RowOffset int64 `json:"rowOffset,omitempty,string"` 3574 3575 // TableOptions: If the container is a table, additional information to 3576 // make findings meaningful such as the columns that are primary keys. 3577 // If not known ahead of time, can also be set within each inspect 3578 // hybrid call and the two will be merged. Note that identifying_fields 3579 // will only be stored to BigQuery, and only if the BigQuery action has 3580 // been included. 3581 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3582 3583 // ForceSendFields is a list of field names (e.g. "ContainerDetails") to 3584 // unconditionally include in API requests. By default, fields with 3585 // empty values are omitted from API requests. However, any non-pointer, 3586 // non-interface field appearing in ForceSendFields will be sent to the 3587 // server regardless of whether the field is empty or not. This may be 3588 // used to include empty fields in Patch requests. 3589 ForceSendFields []string `json:"-"` 3590 3591 // NullFields is a list of field names (e.g. "ContainerDetails") to 3592 // include in API requests with the JSON null value. By default, fields 3593 // with empty values are omitted from API requests. However, any field 3594 // with an empty value appearing in NullFields will be sent to the 3595 // server as null. It is an error if a field in this list has a 3596 // non-empty value. This may be used to include null fields in Patch 3597 // requests. 3598 NullFields []string `json:"-"` 3599} 3600 3601func (s *GooglePrivacyDlpV2HybridFindingDetails) MarshalJSON() ([]byte, error) { 3602 type NoMethod GooglePrivacyDlpV2HybridFindingDetails 3603 raw := NoMethod(*s) 3604 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3605} 3606 3607// GooglePrivacyDlpV2HybridInspectDlpJobRequest: Request to search for 3608// potentially sensitive info in a custom location. 3609type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { 3610 // HybridItem: The item to inspect. 3611 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3612 3613 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3614 // unconditionally include in API requests. By default, fields with 3615 // empty values are omitted from API requests. However, any non-pointer, 3616 // non-interface field appearing in ForceSendFields will be sent to the 3617 // server regardless of whether the field is empty or not. This may be 3618 // used to include empty fields in Patch requests. 3619 ForceSendFields []string `json:"-"` 3620 3621 // NullFields is a list of field names (e.g. "HybridItem") to include in 3622 // API requests with the JSON null value. By default, fields with empty 3623 // values are omitted from API requests. However, any field with an 3624 // empty value appearing in NullFields will be sent to the server as 3625 // null. It is an error if a field in this list has a non-empty value. 3626 // This may be used to include null fields in Patch requests. 3627 NullFields []string `json:"-"` 3628} 3629 3630func (s *GooglePrivacyDlpV2HybridInspectDlpJobRequest) MarshalJSON() ([]byte, error) { 3631 type NoMethod GooglePrivacyDlpV2HybridInspectDlpJobRequest 3632 raw := NoMethod(*s) 3633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3634} 3635 3636// GooglePrivacyDlpV2HybridInspectJobTriggerRequest: Request to search 3637// for potentially sensitive info in a custom location. 3638type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { 3639 // HybridItem: The item to inspect. 3640 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3641 3642 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3643 // unconditionally include in API requests. By default, fields with 3644 // empty values are omitted from API requests. However, any non-pointer, 3645 // non-interface field appearing in ForceSendFields will be sent to the 3646 // server regardless of whether the field is empty or not. This may be 3647 // used to include empty fields in Patch requests. 3648 ForceSendFields []string `json:"-"` 3649 3650 // NullFields is a list of field names (e.g. "HybridItem") to include in 3651 // API requests with the JSON null value. By default, fields with empty 3652 // values are omitted from API requests. However, any field with an 3653 // empty value appearing in NullFields will be sent to the server as 3654 // null. It is an error if a field in this list has a non-empty value. 3655 // This may be used to include null fields in Patch requests. 3656 NullFields []string `json:"-"` 3657} 3658 3659func (s *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) MarshalJSON() ([]byte, error) { 3660 type NoMethod GooglePrivacyDlpV2HybridInspectJobTriggerRequest 3661 raw := NoMethod(*s) 3662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3663} 3664 3665// GooglePrivacyDlpV2HybridInspectResponse: Quota exceeded errors will 3666// be thrown once quota has been met. 3667type GooglePrivacyDlpV2HybridInspectResponse struct { 3668 // ServerResponse contains the HTTP response code and headers from the 3669 // server. 3670 googleapi.ServerResponse `json:"-"` 3671} 3672 3673// GooglePrivacyDlpV2HybridInspectStatistics: Statistics related to 3674// processing hybrid inspect requests. 3675type GooglePrivacyDlpV2HybridInspectStatistics struct { 3676 // AbortedCount: The number of hybrid inspection requests aborted 3677 // because the job ran out of quota or was ended before they could be 3678 // processed. 3679 AbortedCount int64 `json:"abortedCount,omitempty,string"` 3680 3681 // PendingCount: The number of hybrid requests currently being 3682 // processed. Only populated when called via method `getDlpJob`. A burst 3683 // of traffic may cause hybrid inspect requests to be enqueued. 3684 // Processing will take place as quickly as possible, but resource 3685 // limitations may impact how long a request is enqueued for. 3686 PendingCount int64 `json:"pendingCount,omitempty,string"` 3687 3688 // ProcessedCount: The number of hybrid inspection requests processed 3689 // within this job. 3690 ProcessedCount int64 `json:"processedCount,omitempty,string"` 3691 3692 // ForceSendFields is a list of field names (e.g. "AbortedCount") to 3693 // unconditionally include in API requests. By default, fields with 3694 // empty values are omitted from API requests. However, any non-pointer, 3695 // non-interface field appearing in ForceSendFields will be sent to the 3696 // server regardless of whether the field is empty or not. This may be 3697 // used to include empty fields in Patch requests. 3698 ForceSendFields []string `json:"-"` 3699 3700 // NullFields is a list of field names (e.g. "AbortedCount") to include 3701 // in API requests with the JSON null value. By default, fields with 3702 // empty values are omitted from API requests. However, any field with 3703 // an empty value appearing in NullFields will be sent to the server as 3704 // null. It is an error if a field in this list has a non-empty value. 3705 // This may be used to include null fields in Patch requests. 3706 NullFields []string `json:"-"` 3707} 3708 3709func (s *GooglePrivacyDlpV2HybridInspectStatistics) MarshalJSON() ([]byte, error) { 3710 type NoMethod GooglePrivacyDlpV2HybridInspectStatistics 3711 raw := NoMethod(*s) 3712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3713} 3714 3715// GooglePrivacyDlpV2HybridOptions: Configuration to control jobs where 3716// the content being inspected is outside of Google Cloud Platform. 3717type GooglePrivacyDlpV2HybridOptions struct { 3718 // Description: A short description of where the data is coming from. 3719 // Will be stored once in the job. 256 max length. 3720 Description string `json:"description,omitempty"` 3721 3722 // Labels: To organize findings, these labels will be added to each 3723 // finding. Label keys must be between 1 and 63 characters long and must 3724 // conform to the following regular expression: 3725 // `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3726 // characters long and must conform to the regular expression 3727 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3728 // associated with a given finding. Examples: * "environment" : 3729 // "production" * "pipeline" : "etl" 3730 Labels map[string]string `json:"labels,omitempty"` 3731 3732 // RequiredFindingLabelKeys: These are labels that each inspection 3733 // request must include within their 'finding_labels' map. Request may 3734 // contain others, but any missing one of these will be rejected. Label 3735 // keys must be between 1 and 63 characters long and must conform to the 3736 // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more 3737 // than 10 keys can be required. 3738 RequiredFindingLabelKeys []string `json:"requiredFindingLabelKeys,omitempty"` 3739 3740 // TableOptions: If the container is a table, additional information to 3741 // make findings meaningful such as the columns that are primary keys. 3742 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3743 3744 // ForceSendFields is a list of field names (e.g. "Description") to 3745 // unconditionally include in API requests. By default, fields with 3746 // empty values are omitted from API requests. However, any non-pointer, 3747 // non-interface field appearing in ForceSendFields will be sent to the 3748 // server regardless of whether the field is empty or not. This may be 3749 // used to include empty fields in Patch requests. 3750 ForceSendFields []string `json:"-"` 3751 3752 // NullFields is a list of field names (e.g. "Description") to include 3753 // in API requests with the JSON null value. By default, fields with 3754 // empty values are omitted from API requests. However, any field with 3755 // an empty value appearing in NullFields will be sent to the server as 3756 // null. It is an error if a field in this list has a non-empty value. 3757 // This may be used to include null fields in Patch requests. 3758 NullFields []string `json:"-"` 3759} 3760 3761func (s *GooglePrivacyDlpV2HybridOptions) MarshalJSON() ([]byte, error) { 3762 type NoMethod GooglePrivacyDlpV2HybridOptions 3763 raw := NoMethod(*s) 3764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3765} 3766 3767// GooglePrivacyDlpV2ImageLocation: Location of the finding within an 3768// image. 3769type GooglePrivacyDlpV2ImageLocation struct { 3770 // BoundingBoxes: Bounding boxes locating the pixels within the image 3771 // containing the finding. 3772 BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` 3773 3774 // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to 3775 // unconditionally include in API requests. By default, fields with 3776 // empty values are omitted from API requests. However, any non-pointer, 3777 // non-interface field appearing in ForceSendFields will be sent to the 3778 // server regardless of whether the field is empty or not. This may be 3779 // used to include empty fields in Patch requests. 3780 ForceSendFields []string `json:"-"` 3781 3782 // NullFields is a list of field names (e.g. "BoundingBoxes") to include 3783 // in API requests with the JSON null value. By default, fields with 3784 // empty values are omitted from API requests. However, any field with 3785 // an empty value appearing in NullFields will be sent to the server as 3786 // null. It is an error if a field in this list has a non-empty value. 3787 // This may be used to include null fields in Patch requests. 3788 NullFields []string `json:"-"` 3789} 3790 3791func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { 3792 type NoMethod GooglePrivacyDlpV2ImageLocation 3793 raw := NoMethod(*s) 3794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3795} 3796 3797// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining 3798// how redaction of images should occur. 3799type GooglePrivacyDlpV2ImageRedactionConfig struct { 3800 // InfoType: Only one per info_type should be provided per request. If 3801 // not specified, and redact_all_text is false, the DLP API will redact 3802 // all text that it matches against all info_types that are found, but 3803 // not specified in another ImageRedactionConfig. 3804 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3805 3806 // RedactAllText: If true, all text found in the image, regardless 3807 // whether it matches an info_type, is redacted. Only one should be 3808 // provided. 3809 RedactAllText bool `json:"redactAllText,omitempty"` 3810 3811 // RedactionColor: The color to use when redacting content from an 3812 // image. If not specified, the default is black. 3813 RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` 3814 3815 // ForceSendFields is a list of field names (e.g. "InfoType") to 3816 // unconditionally include in API requests. By default, fields with 3817 // empty values are omitted from API requests. However, any non-pointer, 3818 // non-interface field appearing in ForceSendFields will be sent to the 3819 // server regardless of whether the field is empty or not. This may be 3820 // used to include empty fields in Patch requests. 3821 ForceSendFields []string `json:"-"` 3822 3823 // NullFields is a list of field names (e.g. "InfoType") to include in 3824 // API requests with the JSON null value. By default, fields with empty 3825 // values are omitted from API requests. However, any field with an 3826 // empty value appearing in NullFields will be sent to the server as 3827 // null. It is an error if a field in this list has a non-empty value. 3828 // This may be used to include null fields in Patch requests. 3829 NullFields []string `json:"-"` 3830} 3831 3832func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { 3833 type NoMethod GooglePrivacyDlpV2ImageRedactionConfig 3834 raw := NoMethod(*s) 3835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3836} 3837 3838// GooglePrivacyDlpV2InfoType: Type of information detected by the API. 3839type GooglePrivacyDlpV2InfoType struct { 3840 // Name: Name of the information type. Either a name of your choosing 3841 // when creating a CustomInfoType, or one of the names listed at 3842 // https://cloud.google.com/dlp/docs/infotypes-reference when specifying 3843 // a built-in type. When sending Cloud DLP results to Data Catalog, 3844 // infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. 3845 Name string `json:"name,omitempty"` 3846 3847 // ForceSendFields is a list of field names (e.g. "Name") to 3848 // unconditionally include in API requests. By default, fields with 3849 // empty values are omitted from API requests. However, any non-pointer, 3850 // non-interface field appearing in ForceSendFields will be sent to the 3851 // server regardless of whether the field is empty or not. This may be 3852 // used to include empty fields in Patch requests. 3853 ForceSendFields []string `json:"-"` 3854 3855 // NullFields is a list of field names (e.g. "Name") to include in API 3856 // requests with the JSON null value. By default, fields with empty 3857 // values are omitted from API requests. However, any field with an 3858 // empty value appearing in NullFields will be sent to the server as 3859 // null. It is an error if a field in this list has a non-empty value. 3860 // This may be used to include null fields in Patch requests. 3861 NullFields []string `json:"-"` 3862} 3863 3864func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { 3865 type NoMethod GooglePrivacyDlpV2InfoType 3866 raw := NoMethod(*s) 3867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3868} 3869 3870// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. 3871type GooglePrivacyDlpV2InfoTypeDescription struct { 3872 // Description: Description of the infotype. Translated when language is 3873 // provided in the request. 3874 Description string `json:"description,omitempty"` 3875 3876 // DisplayName: Human readable form of the infoType name. 3877 DisplayName string `json:"displayName,omitempty"` 3878 3879 // Name: Internal name of the infoType. 3880 Name string `json:"name,omitempty"` 3881 3882 // SupportedBy: Which parts of the API supports this InfoType. 3883 // 3884 // Possible values: 3885 // "ENUM_TYPE_UNSPECIFIED" - Unused. 3886 // "INSPECT" - Supported by the inspect operations. 3887 // "RISK_ANALYSIS" - Supported by the risk analysis operations. 3888 SupportedBy []string `json:"supportedBy,omitempty"` 3889 3890 // ForceSendFields is a list of field names (e.g. "Description") to 3891 // unconditionally include in API requests. By default, fields with 3892 // empty values are omitted from API requests. However, any non-pointer, 3893 // non-interface field appearing in ForceSendFields will be sent to the 3894 // server regardless of whether the field is empty or not. This may be 3895 // used to include empty fields in Patch requests. 3896 ForceSendFields []string `json:"-"` 3897 3898 // NullFields is a list of field names (e.g. "Description") to include 3899 // in API requests with the JSON null value. By default, fields with 3900 // empty values are omitted from API requests. However, any field with 3901 // an empty value appearing in NullFields will be sent to the server as 3902 // null. It is an error if a field in this list has a non-empty value. 3903 // This may be used to include null fields in Patch requests. 3904 NullFields []string `json:"-"` 3905} 3906 3907func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { 3908 type NoMethod GooglePrivacyDlpV2InfoTypeDescription 3909 raw := NoMethod(*s) 3910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3911} 3912 3913// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per 3914// infoType, per content item or long running DlpJob. 3915type GooglePrivacyDlpV2InfoTypeLimit struct { 3916 // InfoType: Type of information the findings limit applies to. Only one 3917 // limit per info_type should be provided. If InfoTypeLimit does not 3918 // have an info_type, the DLP API applies the limit against all 3919 // info_types that are found but not specified in another InfoTypeLimit. 3920 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3921 3922 // MaxFindings: Max findings limit for the given infoType. 3923 MaxFindings int64 `json:"maxFindings,omitempty"` 3924 3925 // ForceSendFields is a list of field names (e.g. "InfoType") to 3926 // unconditionally include in API requests. By default, fields with 3927 // empty values are omitted from API requests. However, any non-pointer, 3928 // non-interface field appearing in ForceSendFields will be sent to the 3929 // server regardless of whether the field is empty or not. This may be 3930 // used to include empty fields in Patch requests. 3931 ForceSendFields []string `json:"-"` 3932 3933 // NullFields is a list of field names (e.g. "InfoType") to include in 3934 // API requests with the JSON null value. By default, fields with empty 3935 // values are omitted from API requests. However, any field with an 3936 // empty value appearing in NullFields will be sent to the server as 3937 // null. It is an error if a field in this list has a non-empty value. 3938 // This may be used to include null fields in Patch requests. 3939 NullFields []string `json:"-"` 3940} 3941 3942func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { 3943 type NoMethod GooglePrivacyDlpV2InfoTypeLimit 3944 raw := NoMethod(*s) 3945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3946} 3947 3948// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific 3949// InfoType. 3950type GooglePrivacyDlpV2InfoTypeStats struct { 3951 // Count: Number of findings for this infoType. 3952 Count int64 `json:"count,omitempty,string"` 3953 3954 // InfoType: The type of finding this stat is for. 3955 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3956 3957 // ForceSendFields is a list of field names (e.g. "Count") to 3958 // unconditionally include in API requests. By default, fields with 3959 // empty values are omitted from API requests. However, any non-pointer, 3960 // non-interface field appearing in ForceSendFields will be sent to the 3961 // server regardless of whether the field is empty or not. This may be 3962 // used to include empty fields in Patch requests. 3963 ForceSendFields []string `json:"-"` 3964 3965 // NullFields is a list of field names (e.g. "Count") to include in API 3966 // requests with the JSON null value. By default, fields with empty 3967 // values are omitted from API requests. However, any field with an 3968 // empty value appearing in NullFields will be sent to the server as 3969 // null. It is an error if a field in this list has a non-empty value. 3970 // This may be used to include null fields in Patch requests. 3971 NullFields []string `json:"-"` 3972} 3973 3974func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { 3975 type NoMethod GooglePrivacyDlpV2InfoTypeStats 3976 raw := NoMethod(*s) 3977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3978} 3979 3980// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply 3981// to text that is identified as a specific info_type. 3982type GooglePrivacyDlpV2InfoTypeTransformation struct { 3983 // InfoTypes: InfoTypes to apply the transformation to. An empty list 3984 // will cause this transformation to apply to all findings that 3985 // correspond to infoTypes that were requested in `InspectConfig`. 3986 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3987 3988 // PrimitiveTransformation: Required. Primitive transformation to apply 3989 // to the infoType. 3990 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3991 3992 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3993 // unconditionally include in API requests. By default, fields with 3994 // empty values are omitted from API requests. However, any non-pointer, 3995 // non-interface field appearing in ForceSendFields will be sent to the 3996 // server regardless of whether the field is empty or not. This may be 3997 // used to include empty fields in Patch requests. 3998 ForceSendFields []string `json:"-"` 3999 4000 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4001 // API requests with the JSON null value. By default, fields with empty 4002 // values are omitted from API requests. However, any field with an 4003 // empty value appearing in NullFields will be sent to the server as 4004 // null. It is an error if a field in this list has a non-empty value. 4005 // This may be used to include null fields in Patch requests. 4006 NullFields []string `json:"-"` 4007} 4008 4009func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { 4010 type NoMethod GooglePrivacyDlpV2InfoTypeTransformation 4011 raw := NoMethod(*s) 4012 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4013} 4014 4015// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation 4016// that will scan unstructured text and apply various 4017// `PrimitiveTransformation`s to each finding, where the transformation 4018// is applied to only values that were identified as a specific 4019// info_type. 4020type GooglePrivacyDlpV2InfoTypeTransformations struct { 4021 // Transformations: Required. Transformation for each infoType. Cannot 4022 // specify more than one for a given infoType. 4023 Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` 4024 4025 // ForceSendFields is a list of field names (e.g. "Transformations") to 4026 // unconditionally include in API requests. By default, fields with 4027 // empty values are omitted from API requests. However, any non-pointer, 4028 // non-interface field appearing in ForceSendFields will be sent to the 4029 // server regardless of whether the field is empty or not. This may be 4030 // used to include empty fields in Patch requests. 4031 ForceSendFields []string `json:"-"` 4032 4033 // NullFields is a list of field names (e.g. "Transformations") to 4034 // include in API requests with the JSON null value. By default, fields 4035 // with empty values are omitted from API requests. However, any field 4036 // with an empty value appearing in NullFields will be sent to the 4037 // server as null. It is an error if a field in this list has a 4038 // non-empty value. This may be used to include null fields in Patch 4039 // requests. 4040 NullFields []string `json:"-"` 4041} 4042 4043func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { 4044 type NoMethod GooglePrivacyDlpV2InfoTypeTransformations 4045 raw := NoMethod(*s) 4046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4047} 4048 4049// GooglePrivacyDlpV2InspectConfig: Configuration description of the 4050// scanning process. When used with redactContent only info_types and 4051// min_likelihood are currently used. 4052type GooglePrivacyDlpV2InspectConfig struct { 4053 // ContentOptions: List of options defining data content to scan. If 4054 // empty, text, images, and other content will be included. 4055 // 4056 // Possible values: 4057 // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data 4058 // stream. 4059 // "CONTENT_TEXT" - Text content within the data, excluding any 4060 // metadata. 4061 // "CONTENT_IMAGE" - Images found in the data. 4062 ContentOptions []string `json:"contentOptions,omitempty"` 4063 4064 // CustomInfoTypes: CustomInfoTypes provided by the user. See 4065 // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn 4066 // more. 4067 CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` 4068 4069 // ExcludeInfoTypes: When true, excludes type information of the 4070 // findings. 4071 ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` 4072 4073 // IncludeQuote: When true, a contextual quote from the data that 4074 // triggered a finding is included in the response; see Finding.quote. 4075 IncludeQuote bool `json:"includeQuote,omitempty"` 4076 4077 // InfoTypes: Restricts what info_types to look for. The values must 4078 // correspond to InfoType values returned by ListInfoTypes or listed at 4079 // https://cloud.google.com/dlp/docs/infotypes-reference. When no 4080 // InfoTypes or CustomInfoTypes are specified in a request, the system 4081 // may automatically choose what detectors to run. By default this may 4082 // be all types, but may change over time as detectors are updated. If 4083 // you need precise control and predictability as to what detectors are 4084 // run you should specify specific InfoTypes listed in the reference, 4085 // otherwise a default list will be used, which may change over time. 4086 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4087 4088 // Limits: Configuration to control the number of findings returned. 4089 Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` 4090 4091 // MinLikelihood: Only returns findings equal or above this threshold. 4092 // The default is POSSIBLE. See 4093 // https://cloud.google.com/dlp/docs/likelihood to learn more. 4094 // 4095 // Possible values: 4096 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 4097 // "VERY_UNLIKELY" - Few matching elements. 4098 // "UNLIKELY" 4099 // "POSSIBLE" - Some matching elements. 4100 // "LIKELY" 4101 // "VERY_LIKELY" - Many matching elements. 4102 MinLikelihood string `json:"minLikelihood,omitempty"` 4103 4104 // RuleSet: Set of rules to apply to the findings for this 4105 // InspectConfig. Exclusion rules, contained in the set are executed in 4106 // the end, other rules are executed in the order they are specified for 4107 // each info type. 4108 RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` 4109 4110 // ForceSendFields is a list of field names (e.g. "ContentOptions") to 4111 // unconditionally include in API requests. By default, fields with 4112 // empty values are omitted from API requests. However, any non-pointer, 4113 // non-interface field appearing in ForceSendFields will be sent to the 4114 // server regardless of whether the field is empty or not. This may be 4115 // used to include empty fields in Patch requests. 4116 ForceSendFields []string `json:"-"` 4117 4118 // NullFields is a list of field names (e.g. "ContentOptions") to 4119 // include in API requests with the JSON null value. By default, fields 4120 // with empty values are omitted from API requests. However, any field 4121 // with an empty value appearing in NullFields will be sent to the 4122 // server as null. It is an error if a field in this list has a 4123 // non-empty value. This may be used to include null fields in Patch 4124 // requests. 4125 NullFields []string `json:"-"` 4126} 4127 4128func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { 4129 type NoMethod GooglePrivacyDlpV2InspectConfig 4130 raw := NoMethod(*s) 4131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4132} 4133 4134// GooglePrivacyDlpV2InspectContentRequest: Request to search for 4135// potentially sensitive info in a ContentItem. 4136type GooglePrivacyDlpV2InspectContentRequest struct { 4137 // InspectConfig: Configuration for the inspector. What specified here 4138 // will override the template referenced by the inspect_template_name 4139 // argument. 4140 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4141 4142 // InspectTemplateName: Template to use. Any configuration directly 4143 // specified in inspect_config will override those set in the template. 4144 // Singular fields that are set in this request will replace their 4145 // corresponding fields in the template. Repeated fields are appended. 4146 // Singular sub-messages and groups are recursively merged. 4147 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4148 4149 // Item: The item to inspect. 4150 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 4151 4152 // LocationId: Deprecated. This field has no effect. 4153 LocationId string `json:"locationId,omitempty"` 4154 4155 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 4156 // unconditionally include in API requests. By default, fields with 4157 // empty values are omitted from API requests. However, any non-pointer, 4158 // non-interface field appearing in ForceSendFields will be sent to the 4159 // server regardless of whether the field is empty or not. This may be 4160 // used to include empty fields in Patch requests. 4161 ForceSendFields []string `json:"-"` 4162 4163 // NullFields is a list of field names (e.g. "InspectConfig") to include 4164 // in API requests with the JSON null value. By default, fields with 4165 // empty values are omitted from API requests. However, any field with 4166 // an empty value appearing in NullFields will be sent to the server as 4167 // null. It is an error if a field in this list has a non-empty value. 4168 // This may be used to include null fields in Patch requests. 4169 NullFields []string `json:"-"` 4170} 4171 4172func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { 4173 type NoMethod GooglePrivacyDlpV2InspectContentRequest 4174 raw := NoMethod(*s) 4175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4176} 4177 4178// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an 4179// item. 4180type GooglePrivacyDlpV2InspectContentResponse struct { 4181 // Result: The findings. 4182 Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` 4183 4184 // ServerResponse contains the HTTP response code and headers from the 4185 // server. 4186 googleapi.ServerResponse `json:"-"` 4187 4188 // ForceSendFields is a list of field names (e.g. "Result") to 4189 // unconditionally include in API requests. By default, fields with 4190 // empty values are omitted from API requests. However, any non-pointer, 4191 // non-interface field appearing in ForceSendFields will be sent to the 4192 // server regardless of whether the field is empty or not. This may be 4193 // used to include empty fields in Patch requests. 4194 ForceSendFields []string `json:"-"` 4195 4196 // NullFields is a list of field names (e.g. "Result") to include in API 4197 // requests with the JSON null value. By default, fields with empty 4198 // values are omitted from API requests. However, any field with an 4199 // empty value appearing in NullFields will be sent to the server as 4200 // null. It is an error if a field in this list has a non-empty value. 4201 // This may be used to include null fields in Patch requests. 4202 NullFields []string `json:"-"` 4203} 4204 4205func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { 4206 type NoMethod GooglePrivacyDlpV2InspectContentResponse 4207 raw := NoMethod(*s) 4208 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4209} 4210 4211// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect 4212// DataSource job. 4213type GooglePrivacyDlpV2InspectDataSourceDetails struct { 4214 // RequestedOptions: The configuration used for this job. 4215 RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` 4216 4217 // Result: A summary of the outcome of this inspect job. 4218 Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` 4219 4220 // ForceSendFields is a list of field names (e.g. "RequestedOptions") to 4221 // unconditionally include in API requests. By default, fields with 4222 // empty values are omitted from API requests. However, any non-pointer, 4223 // non-interface field appearing in ForceSendFields will be sent to the 4224 // server regardless of whether the field is empty or not. This may be 4225 // used to include empty fields in Patch requests. 4226 ForceSendFields []string `json:"-"` 4227 4228 // NullFields is a list of field names (e.g. "RequestedOptions") to 4229 // include in API requests with the JSON null value. By default, fields 4230 // with empty values are omitted from API requests. However, any field 4231 // with an empty value appearing in NullFields will be sent to the 4232 // server as null. It is an error if a field in this list has a 4233 // non-empty value. This may be used to include null fields in Patch 4234 // requests. 4235 NullFields []string `json:"-"` 4236} 4237 4238func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { 4239 type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails 4240 raw := NoMethod(*s) 4241 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4242} 4243 4244// GooglePrivacyDlpV2InspectJobConfig: Controls what and how to inspect 4245// for findings. 4246type GooglePrivacyDlpV2InspectJobConfig struct { 4247 // Actions: Actions to execute at the completion of the job. 4248 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 4249 4250 // InspectConfig: How and what to scan for. 4251 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4252 4253 // InspectTemplateName: If provided, will be used as the default for all 4254 // values in InspectConfig. `inspect_config` will be merged into the 4255 // values persisted as part of the template. 4256 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4257 4258 // StorageConfig: The data to scan. 4259 StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` 4260 4261 // ForceSendFields is a list of field names (e.g. "Actions") to 4262 // unconditionally include in API requests. By default, fields with 4263 // empty values are omitted from API requests. However, any non-pointer, 4264 // non-interface field appearing in ForceSendFields will be sent to the 4265 // server regardless of whether the field is empty or not. This may be 4266 // used to include empty fields in Patch requests. 4267 ForceSendFields []string `json:"-"` 4268 4269 // NullFields is a list of field names (e.g. "Actions") to include in 4270 // API requests with the JSON null value. By default, fields with empty 4271 // values are omitted from API requests. However, any field with an 4272 // empty value appearing in NullFields will be sent to the server as 4273 // null. It is an error if a field in this list has a non-empty value. 4274 // This may be used to include null fields in Patch requests. 4275 NullFields []string `json:"-"` 4276} 4277 4278func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { 4279 type NoMethod GooglePrivacyDlpV2InspectJobConfig 4280 raw := NoMethod(*s) 4281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4282} 4283 4284// GooglePrivacyDlpV2InspectResult: All the findings for a single 4285// scanned item. 4286type GooglePrivacyDlpV2InspectResult struct { 4287 // Findings: List of findings for an item. 4288 Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` 4289 4290 // FindingsTruncated: If true, then this item might have more findings 4291 // than were returned, and the findings returned are an arbitrary subset 4292 // of all findings. The findings list might be truncated because the 4293 // input items were too large, or because the server reached the maximum 4294 // amount of resources allowed for a single API call. For best results, 4295 // divide the input into smaller batches. 4296 FindingsTruncated bool `json:"findingsTruncated,omitempty"` 4297 4298 // ForceSendFields is a list of field names (e.g. "Findings") to 4299 // unconditionally include in API requests. By default, fields with 4300 // empty values are omitted from API requests. However, any non-pointer, 4301 // non-interface field appearing in ForceSendFields will be sent to the 4302 // server regardless of whether the field is empty or not. This may be 4303 // used to include empty fields in Patch requests. 4304 ForceSendFields []string `json:"-"` 4305 4306 // NullFields is a list of field names (e.g. "Findings") to include in 4307 // API requests with the JSON null value. By default, fields with empty 4308 // values are omitted from API requests. However, any field with an 4309 // empty value appearing in NullFields will be sent to the server as 4310 // null. It is an error if a field in this list has a non-empty value. 4311 // This may be used to include null fields in Patch requests. 4312 NullFields []string `json:"-"` 4313} 4314 4315func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { 4316 type NoMethod GooglePrivacyDlpV2InspectResult 4317 raw := NoMethod(*s) 4318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4319} 4320 4321// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a 4322// configuration (set of types of sensitive data to be detected) to be 4323// used anywhere you otherwise would normally specify InspectConfig. See 4324// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 4325type GooglePrivacyDlpV2InspectTemplate struct { 4326 // CreateTime: Output only. The creation timestamp of an 4327 // inspectTemplate. 4328 CreateTime string `json:"createTime,omitempty"` 4329 4330 // Description: Short description (max 256 chars). 4331 Description string `json:"description,omitempty"` 4332 4333 // DisplayName: Display name (max 256 chars). 4334 DisplayName string `json:"displayName,omitempty"` 4335 4336 // InspectConfig: The core content of the template. Configuration of the 4337 // scanning process. 4338 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4339 4340 // Name: Output only. The template name. The template will have one of 4341 // the following formats: 4342 // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR 4343 // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; 4344 Name string `json:"name,omitempty"` 4345 4346 // UpdateTime: Output only. The last update timestamp of an 4347 // inspectTemplate. 4348 UpdateTime string `json:"updateTime,omitempty"` 4349 4350 // ServerResponse contains the HTTP response code and headers from the 4351 // server. 4352 googleapi.ServerResponse `json:"-"` 4353 4354 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4355 // unconditionally include in API requests. By default, fields with 4356 // empty values are omitted from API requests. However, any non-pointer, 4357 // non-interface field appearing in ForceSendFields will be sent to the 4358 // server regardless of whether the field is empty or not. This may be 4359 // used to include empty fields in Patch requests. 4360 ForceSendFields []string `json:"-"` 4361 4362 // NullFields is a list of field names (e.g. "CreateTime") to include in 4363 // API requests with the JSON null value. By default, fields with empty 4364 // values are omitted from API requests. However, any field with an 4365 // empty value appearing in NullFields will be sent to the server as 4366 // null. It is an error if a field in this list has a non-empty value. 4367 // This may be used to include null fields in Patch requests. 4368 NullFields []string `json:"-"` 4369} 4370 4371func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { 4372 type NoMethod GooglePrivacyDlpV2InspectTemplate 4373 raw := NoMethod(*s) 4374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4375} 4376 4377// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be 4378// applied to infoTypes, specified in `InspectionRuleSet`. 4379type GooglePrivacyDlpV2InspectionRule struct { 4380 // ExclusionRule: Exclusion rule. 4381 ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` 4382 4383 // HotwordRule: Hotword-based detection rule. 4384 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 4385 4386 // ForceSendFields is a list of field names (e.g. "ExclusionRule") to 4387 // unconditionally include in API requests. By default, fields with 4388 // empty values are omitted from API requests. However, any non-pointer, 4389 // non-interface field appearing in ForceSendFields will be sent to the 4390 // server regardless of whether the field is empty or not. This may be 4391 // used to include empty fields in Patch requests. 4392 ForceSendFields []string `json:"-"` 4393 4394 // NullFields is a list of field names (e.g. "ExclusionRule") to include 4395 // in API requests with the JSON null value. By default, fields with 4396 // empty values are omitted from API requests. However, any field with 4397 // an empty value appearing in NullFields will be sent to the server as 4398 // null. It is an error if a field in this list has a non-empty value. 4399 // This may be used to include null fields in Patch requests. 4400 NullFields []string `json:"-"` 4401} 4402 4403func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { 4404 type NoMethod GooglePrivacyDlpV2InspectionRule 4405 raw := NoMethod(*s) 4406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4407} 4408 4409// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of 4410// infoTypes to alter behavior under certain circumstances, depending on 4411// the specific details of the rules within the set. 4412type GooglePrivacyDlpV2InspectionRuleSet struct { 4413 // InfoTypes: List of infoTypes this rule set is applied to. 4414 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4415 4416 // Rules: Set of rules to be applied to infoTypes. The rules are applied 4417 // in order. 4418 Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` 4419 4420 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 4421 // unconditionally include in API requests. By default, fields with 4422 // empty values are omitted from API requests. However, any non-pointer, 4423 // non-interface field appearing in ForceSendFields will be sent to the 4424 // server regardless of whether the field is empty or not. This may be 4425 // used to include empty fields in Patch requests. 4426 ForceSendFields []string `json:"-"` 4427 4428 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4429 // API requests with the JSON null value. By default, fields with empty 4430 // values are omitted from API requests. However, any field with an 4431 // empty value appearing in NullFields will be sent to the server as 4432 // null. It is an error if a field in this list has a non-empty value. 4433 // This may be used to include null fields in Patch requests. 4434 NullFields []string `json:"-"` 4435} 4436 4437func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { 4438 type NoMethod GooglePrivacyDlpV2InspectionRuleSet 4439 raw := NoMethod(*s) 4440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4441} 4442 4443// GooglePrivacyDlpV2JobNotificationEmails: Enable email notification to 4444// project owners and editors on jobs's completion/failure. 4445type GooglePrivacyDlpV2JobNotificationEmails struct { 4446} 4447 4448// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp 4449// api calls on a repeating basis. See 4450// https://cloud.google.com/dlp/docs/concepts-job-triggers to learn 4451// more. 4452type GooglePrivacyDlpV2JobTrigger struct { 4453 // CreateTime: Output only. The creation timestamp of a triggeredJob. 4454 CreateTime string `json:"createTime,omitempty"` 4455 4456 // Description: User provided description (max 256 chars) 4457 Description string `json:"description,omitempty"` 4458 4459 // DisplayName: Display name (max 100 chars) 4460 DisplayName string `json:"displayName,omitempty"` 4461 4462 // Errors: Output only. A stream of errors encountered when the trigger 4463 // was activated. Repeated errors may result in the JobTrigger 4464 // automatically being paused. Will return the last 100 errors. Whenever 4465 // the JobTrigger is modified this list will be cleared. 4466 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 4467 4468 // InspectJob: For inspect jobs, a snapshot of the configuration. 4469 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 4470 4471 // LastRunTime: Output only. The timestamp of the last time this trigger 4472 // executed. 4473 LastRunTime string `json:"lastRunTime,omitempty"` 4474 4475 // Name: Unique resource name for the triggeredJob, assigned by the 4476 // service when the triggeredJob is created, for example 4477 // `projects/dlp-test-project/jobTriggers/53234423`. 4478 Name string `json:"name,omitempty"` 4479 4480 // Status: Required. A status for this trigger. 4481 // 4482 // Possible values: 4483 // "STATUS_UNSPECIFIED" - Unused. 4484 // "HEALTHY" - Trigger is healthy. 4485 // "PAUSED" - Trigger is temporarily paused. 4486 // "CANCELLED" - Trigger is cancelled and can not be resumed. 4487 Status string `json:"status,omitempty"` 4488 4489 // Triggers: A list of triggers which will be OR'ed together. Only one 4490 // in the list needs to trigger for a job to be started. The list may 4491 // contain only a single Schedule trigger and must have at least one 4492 // object. 4493 Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` 4494 4495 // UpdateTime: Output only. The last update timestamp of a triggeredJob. 4496 UpdateTime string `json:"updateTime,omitempty"` 4497 4498 // ServerResponse contains the HTTP response code and headers from the 4499 // server. 4500 googleapi.ServerResponse `json:"-"` 4501 4502 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4503 // unconditionally include in API requests. By default, fields with 4504 // empty values are omitted from API requests. However, any non-pointer, 4505 // non-interface field appearing in ForceSendFields will be sent to the 4506 // server regardless of whether the field is empty or not. This may be 4507 // used to include empty fields in Patch requests. 4508 ForceSendFields []string `json:"-"` 4509 4510 // NullFields is a list of field names (e.g. "CreateTime") to include in 4511 // API requests with the JSON null value. By default, fields with empty 4512 // values are omitted from API requests. However, any field with an 4513 // empty value appearing in NullFields will be sent to the server as 4514 // null. It is an error if a field in this list has a non-empty value. 4515 // This may be used to include null fields in Patch requests. 4516 NullFields []string `json:"-"` 4517} 4518 4519func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { 4520 type NoMethod GooglePrivacyDlpV2JobTrigger 4521 raw := NoMethod(*s) 4522 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4523} 4524 4525// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for 4526// analysis of reidentification risk. 4527type GooglePrivacyDlpV2KAnonymityConfig struct { 4528 // EntityId: Message indicating that multiple rows might be associated 4529 // to a single individual. If the same entity_id is associated to 4530 // multiple quasi-identifier tuples over distinct rows, we consider the 4531 // entire collection of tuples as the composite quasi-identifier. This 4532 // collection is a multiset: the order in which the different tuples 4533 // appear in the dataset is ignored, but their frequency is taken into 4534 // account. Important note: a maximum of 1000 rows can be associated to 4535 // a single entity ID. If more rows are associated with the same entity 4536 // ID, some might be ignored. 4537 EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` 4538 4539 // QuasiIds: Set of fields to compute k-anonymity over. When multiple 4540 // fields are specified, they are considered a single composite key. 4541 // Structs and repeated data types are not supported; however, nested 4542 // fields are supported so long as they are not structs themselves or 4543 // nested within a repeated field. 4544 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4545 4546 // ForceSendFields is a list of field names (e.g. "EntityId") to 4547 // unconditionally include in API requests. By default, fields with 4548 // empty values are omitted from API requests. However, any non-pointer, 4549 // non-interface field appearing in ForceSendFields will be sent to the 4550 // server regardless of whether the field is empty or not. This may be 4551 // used to include empty fields in Patch requests. 4552 ForceSendFields []string `json:"-"` 4553 4554 // NullFields is a list of field names (e.g. "EntityId") to include in 4555 // API requests with the JSON null value. By default, fields with empty 4556 // values are omitted from API requests. However, any field with an 4557 // empty value appearing in NullFields will be sent to the server as 4558 // null. It is an error if a field in this list has a non-empty value. 4559 // This may be used to include null fields in Patch requests. 4560 NullFields []string `json:"-"` 4561} 4562 4563func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { 4564 type NoMethod GooglePrivacyDlpV2KAnonymityConfig 4565 raw := NoMethod(*s) 4566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4567} 4568 4569// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' 4570// values that share the same ldiversity value 4571type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { 4572 // EquivalenceClassSize: Size of the equivalence class, for example 4573 // number of rows with the above set of values. 4574 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4575 4576 // QuasiIdsValues: Set of values defining the equivalence class. One 4577 // value per quasi-identifier column in the original KAnonymity metric 4578 // message. The order is always the same as the original request. 4579 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4580 4581 // ForceSendFields is a list of field names (e.g. 4582 // "EquivalenceClassSize") to unconditionally include in API requests. 4583 // By default, fields with empty values are omitted from API requests. 4584 // However, any non-pointer, non-interface field appearing in 4585 // ForceSendFields will be sent to the server regardless of whether the 4586 // field is empty or not. This may be used to include empty fields in 4587 // Patch requests. 4588 ForceSendFields []string `json:"-"` 4589 4590 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 4591 // include in API requests with the JSON null value. By default, fields 4592 // with empty values are omitted from API requests. However, any field 4593 // with an empty value appearing in NullFields will be sent to the 4594 // server as null. It is an error if a field in this list has a 4595 // non-empty value. This may be used to include null fields in Patch 4596 // requests. 4597 NullFields []string `json:"-"` 4598} 4599 4600func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { 4601 type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass 4602 raw := NoMethod(*s) 4603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4604} 4605 4606// GooglePrivacyDlpV2KAnonymityHistogramBucket: Histogram of k-anonymity 4607// equivalence classes. 4608type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { 4609 // BucketSize: Total number of equivalence classes in this bucket. 4610 BucketSize int64 `json:"bucketSize,omitempty,string"` 4611 4612 // BucketValueCount: Total number of distinct equivalence classes in 4613 // this bucket. 4614 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4615 4616 // BucketValues: Sample of equivalence classes in this bucket. The total 4617 // number of classes returned per bucket is capped at 20. 4618 BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` 4619 4620 // EquivalenceClassSizeLowerBound: Lower bound on the size of the 4621 // equivalence classes in this bucket. 4622 EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` 4623 4624 // EquivalenceClassSizeUpperBound: Upper bound on the size of the 4625 // equivalence classes in this bucket. 4626 EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` 4627 4628 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4629 // unconditionally include in API requests. By default, fields with 4630 // empty values are omitted from API requests. However, any non-pointer, 4631 // non-interface field appearing in ForceSendFields will be sent to the 4632 // server regardless of whether the field is empty or not. This may be 4633 // used to include empty fields in Patch requests. 4634 ForceSendFields []string `json:"-"` 4635 4636 // NullFields is a list of field names (e.g. "BucketSize") to include in 4637 // API requests with the JSON null value. By default, fields with empty 4638 // values are omitted from API requests. However, any field with an 4639 // empty value appearing in NullFields will be sent to the server as 4640 // null. It is an error if a field in this list has a non-empty value. 4641 // This may be used to include null fields in Patch requests. 4642 NullFields []string `json:"-"` 4643} 4644 4645func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { 4646 type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket 4647 raw := NoMethod(*s) 4648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4649} 4650 4651// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity 4652// computation. 4653type GooglePrivacyDlpV2KAnonymityResult struct { 4654 // EquivalenceClassHistogramBuckets: Histogram of k-anonymity 4655 // equivalence classes. 4656 EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` 4657 4658 // ForceSendFields is a list of field names (e.g. 4659 // "EquivalenceClassHistogramBuckets") to unconditionally include in API 4660 // requests. By default, fields with empty values are omitted from API 4661 // requests. However, any non-pointer, non-interface field appearing in 4662 // ForceSendFields will be sent to the server regardless of whether the 4663 // field is empty or not. This may be used to include empty fields in 4664 // Patch requests. 4665 ForceSendFields []string `json:"-"` 4666 4667 // NullFields is a list of field names (e.g. 4668 // "EquivalenceClassHistogramBuckets") to include in API requests with 4669 // the JSON null value. By default, fields with empty values are omitted 4670 // from API requests. However, any field with an empty value appearing 4671 // in NullFields will be sent to the server as null. It is an error if a 4672 // field in this list has a non-empty value. This may be used to include 4673 // null fields in Patch requests. 4674 NullFields []string `json:"-"` 4675} 4676 4677func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { 4678 type NoMethod GooglePrivacyDlpV2KAnonymityResult 4679 raw := NoMethod(*s) 4680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4681} 4682 4683// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. 4684// This corresponds to a risk model similar to what is called 4685// "journalist risk" in the literature, except the attack dataset is 4686// statistically modeled instead of being perfectly known. This can be 4687// done using publicly available data (like the US Census), or using a 4688// custom statistical model (indicated as one or several BigQuery 4689// tables), or by extrapolating from the distribution of values in the 4690// input dataset. 4691type GooglePrivacyDlpV2KMapEstimationConfig struct { 4692 // AuxiliaryTables: Several auxiliary tables can be used in the 4693 // analysis. Each custom_tag used to tag a quasi-identifiers column must 4694 // appear in exactly one column of one auxiliary table. 4695 AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` 4696 4697 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 4698 // columns can have the same tag. 4699 QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` 4700 4701 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 4702 // modeling. Set if no column is tagged with a region-specific InfoType 4703 // (like US_ZIP_5) or a region code. 4704 RegionCode string `json:"regionCode,omitempty"` 4705 4706 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 4707 // unconditionally include in API requests. By default, fields with 4708 // empty values are omitted from API requests. However, any non-pointer, 4709 // non-interface field appearing in ForceSendFields will be sent to the 4710 // server regardless of whether the field is empty or not. This may be 4711 // used to include empty fields in Patch requests. 4712 ForceSendFields []string `json:"-"` 4713 4714 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 4715 // include in API requests with the JSON null value. By default, fields 4716 // with empty values are omitted from API requests. However, any field 4717 // with an empty value appearing in NullFields will be sent to the 4718 // server as null. It is an error if a field in this list has a 4719 // non-empty value. This may be used to include null fields in Patch 4720 // requests. 4721 NullFields []string `json:"-"` 4722} 4723 4724func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { 4725 type NoMethod GooglePrivacyDlpV2KMapEstimationConfig 4726 raw := NoMethod(*s) 4727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4728} 4729 4730// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A 4731// KMapEstimationHistogramBucket message with the following values: 4732// min_anonymity: 3 max_anonymity: 5 frequency: 42 means that there are 4733// 42 records whose quasi-identifier values correspond to 3, 4 or 5 4734// people in the overlying population. An important particular case is 4735// when min_anonymity = max_anonymity = 1: the frequency field then 4736// corresponds to the number of uniquely identifiable records. 4737type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { 4738 // BucketSize: Number of records within these anonymity bounds. 4739 BucketSize int64 `json:"bucketSize,omitempty,string"` 4740 4741 // BucketValueCount: Total number of distinct quasi-identifier tuple 4742 // values in this bucket. 4743 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4744 4745 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 4746 // The total number of classes returned per bucket is capped at 20. 4747 BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` 4748 4749 // MaxAnonymity: Always greater than or equal to min_anonymity. 4750 MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` 4751 4752 // MinAnonymity: Always positive. 4753 MinAnonymity int64 `json:"minAnonymity,omitempty,string"` 4754 4755 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4756 // unconditionally include in API requests. By default, fields with 4757 // empty values are omitted from API requests. However, any non-pointer, 4758 // non-interface field appearing in ForceSendFields will be sent to the 4759 // server regardless of whether the field is empty or not. This may be 4760 // used to include empty fields in Patch requests. 4761 ForceSendFields []string `json:"-"` 4762 4763 // NullFields is a list of field names (e.g. "BucketSize") to include in 4764 // API requests with the JSON null value. By default, fields with empty 4765 // values are omitted from API requests. However, any field with an 4766 // empty value appearing in NullFields will be sent to the server as 4767 // null. It is an error if a field in this list has a non-empty value. 4768 // This may be used to include null fields in Patch requests. 4769 NullFields []string `json:"-"` 4770} 4771 4772func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 4773 type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket 4774 raw := NoMethod(*s) 4775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4776} 4777 4778// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for 4779// the quasi-identifier columns. 4780type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { 4781 // EstimatedAnonymity: The estimated anonymity for these 4782 // quasi-identifier values. 4783 EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` 4784 4785 // QuasiIdsValues: The quasi-identifier values. 4786 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4787 4788 // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") 4789 // to unconditionally include in API requests. By default, fields with 4790 // empty values are omitted from API requests. However, any non-pointer, 4791 // non-interface field appearing in ForceSendFields will be sent to the 4792 // server regardless of whether the field is empty or not. This may be 4793 // used to include empty fields in Patch requests. 4794 ForceSendFields []string `json:"-"` 4795 4796 // NullFields is a list of field names (e.g. "EstimatedAnonymity") to 4797 // include in API requests with the JSON null value. By default, fields 4798 // with empty values are omitted from API requests. However, any field 4799 // with an empty value appearing in NullFields will be sent to the 4800 // server as null. It is an error if a field in this list has a 4801 // non-empty value. This may be used to include null fields in Patch 4802 // requests. 4803 NullFields []string `json:"-"` 4804} 4805 4806func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 4807 type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues 4808 raw := NoMethod(*s) 4809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4810} 4811 4812// GooglePrivacyDlpV2KMapEstimationResult: Result of the 4813// reidentifiability analysis. Note that these results are an 4814// estimation, not exact values. 4815type GooglePrivacyDlpV2KMapEstimationResult struct { 4816 // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] 4817 // do not overlap. If a value doesn't correspond to any such interval, 4818 // the associated frequency is zero. For example, the following records: 4819 // {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: 4820 // 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: 4821 // 10, frequency: 99} mean that there are no record with an estimated 4822 // anonymity of 4, 5, or larger than 10. 4823 KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` 4824 4825 // ForceSendFields is a list of field names (e.g. 4826 // "KMapEstimationHistogram") to unconditionally include in API 4827 // requests. By default, fields with empty values are omitted from API 4828 // requests. However, any non-pointer, non-interface field appearing in 4829 // ForceSendFields will be sent to the server regardless of whether the 4830 // field is empty or not. This may be used to include empty fields in 4831 // Patch requests. 4832 ForceSendFields []string `json:"-"` 4833 4834 // NullFields is a list of field names (e.g. "KMapEstimationHistogram") 4835 // to include in API requests with the JSON null value. By default, 4836 // fields with empty values are omitted from API requests. However, any 4837 // field with an empty value appearing in NullFields will be sent to the 4838 // server as null. It is an error if a field in this list has a 4839 // non-empty value. This may be used to include null fields in Patch 4840 // requests. 4841 NullFields []string `json:"-"` 4842} 4843 4844func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { 4845 type NoMethod GooglePrivacyDlpV2KMapEstimationResult 4846 raw := NoMethod(*s) 4847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4848} 4849 4850// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. If 4851// a key's partition ID or any of its path kinds or names are 4852// reserved/read-only, the key is reserved/read-only. A 4853// reserved/read-only key is forbidden in certain documented contexts. 4854type GooglePrivacyDlpV2Key struct { 4855 // PartitionId: Entities are partitioned into subsets, currently 4856 // identified by a project ID and namespace ID. Queries are scoped to a 4857 // single partition. 4858 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 4859 4860 // Path: The entity path. An entity path consists of one or more 4861 // elements composed of a kind and a string or numerical identifier, 4862 // which identify entities. The first element identifies a _root 4863 // entity_, the second element identifies a _child_ of the root entity, 4864 // the third element identifies a child of the second entity, and so 4865 // forth. The entities identified by all prefixes of the path are called 4866 // the element's _ancestors_. A path can never be empty, and a path can 4867 // have at most 100 elements. 4868 Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` 4869 4870 // ForceSendFields is a list of field names (e.g. "PartitionId") to 4871 // unconditionally include in API requests. By default, fields with 4872 // empty values are omitted from API requests. However, any non-pointer, 4873 // non-interface field appearing in ForceSendFields will be sent to the 4874 // server regardless of whether the field is empty or not. This may be 4875 // used to include empty fields in Patch requests. 4876 ForceSendFields []string `json:"-"` 4877 4878 // NullFields is a list of field names (e.g. "PartitionId") to include 4879 // in API requests with the JSON null value. By default, fields with 4880 // empty values are omitted from API requests. However, any field with 4881 // an empty value appearing in NullFields will be sent to the server as 4882 // null. It is an error if a field in this list has a non-empty value. 4883 // This may be used to include null fields in Patch requests. 4884 NullFields []string `json:"-"` 4885} 4886 4887func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { 4888 type NoMethod GooglePrivacyDlpV2Key 4889 raw := NoMethod(*s) 4890 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4891} 4892 4893// GooglePrivacyDlpV2KindExpression: A representation of a Datastore 4894// kind. 4895type GooglePrivacyDlpV2KindExpression struct { 4896 // Name: The name of the kind. 4897 Name string `json:"name,omitempty"` 4898 4899 // ForceSendFields is a list of field names (e.g. "Name") to 4900 // unconditionally include in API requests. By default, fields with 4901 // empty values are omitted from API requests. However, any non-pointer, 4902 // non-interface field appearing in ForceSendFields will be sent to the 4903 // server regardless of whether the field is empty or not. This may be 4904 // used to include empty fields in Patch requests. 4905 ForceSendFields []string `json:"-"` 4906 4907 // NullFields is a list of field names (e.g. "Name") to include in API 4908 // requests with the JSON null value. By default, fields with empty 4909 // values are omitted from API requests. However, any field with an 4910 // empty value appearing in NullFields will be sent to the server as 4911 // null. It is an error if a field in this list has a non-empty value. 4912 // This may be used to include null fields in Patch requests. 4913 NullFields []string `json:"-"` 4914} 4915 4916func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { 4917 type NoMethod GooglePrivacyDlpV2KindExpression 4918 raw := NoMethod(*s) 4919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4920} 4921 4922// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing 4923// data crypto key wrapped by KMS. The wrapped key must be a 128/192/256 4924// bit key. Authorization requires the following IAM permissions when 4925// sending a request to perform a crypto transformation using a 4926// kms-wrapped crypto key: dlp.kms.encrypt 4927type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { 4928 // CryptoKeyName: Required. The resource name of the KMS CryptoKey to 4929 // use for unwrapping. 4930 CryptoKeyName string `json:"cryptoKeyName,omitempty"` 4931 4932 // WrappedKey: Required. The wrapped data crypto key. 4933 WrappedKey string `json:"wrappedKey,omitempty"` 4934 4935 // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to 4936 // unconditionally include in API requests. By default, fields with 4937 // empty values are omitted from API requests. However, any non-pointer, 4938 // non-interface field appearing in ForceSendFields will be sent to the 4939 // server regardless of whether the field is empty or not. This may be 4940 // used to include empty fields in Patch requests. 4941 ForceSendFields []string `json:"-"` 4942 4943 // NullFields is a list of field names (e.g. "CryptoKeyName") to include 4944 // in API requests with the JSON null value. By default, fields with 4945 // empty values are omitted from API requests. However, any field with 4946 // an empty value appearing in NullFields will be sent to the server as 4947 // null. It is an error if a field in this list has a non-empty value. 4948 // This may be used to include null fields in Patch requests. 4949 NullFields []string `json:"-"` 4950} 4951 4952func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { 4953 type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey 4954 raw := NoMethod(*s) 4955 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4956} 4957 4958// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for 4959// analysis of reidentification risk. 4960type GooglePrivacyDlpV2LDiversityConfig struct { 4961 // QuasiIds: Set of quasi-identifiers indicating how equivalence classes 4962 // are defined for the l-diversity computation. When multiple fields are 4963 // specified, they are considered a single composite key. 4964 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4965 4966 // SensitiveAttribute: Sensitive field for computing the l-value. 4967 SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` 4968 4969 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 4970 // unconditionally include in API requests. By default, fields with 4971 // empty values are omitted from API requests. However, any non-pointer, 4972 // non-interface field appearing in ForceSendFields will be sent to the 4973 // server regardless of whether the field is empty or not. This may be 4974 // used to include empty fields in Patch requests. 4975 ForceSendFields []string `json:"-"` 4976 4977 // NullFields is a list of field names (e.g. "QuasiIds") to include in 4978 // API requests with the JSON null value. By default, fields with empty 4979 // values are omitted from API requests. However, any field with an 4980 // empty value appearing in NullFields will be sent to the server as 4981 // null. It is an error if a field in this list has a non-empty value. 4982 // This may be used to include null fields in Patch requests. 4983 NullFields []string `json:"-"` 4984} 4985 4986func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { 4987 type NoMethod GooglePrivacyDlpV2LDiversityConfig 4988 raw := NoMethod(*s) 4989 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4990} 4991 4992// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' 4993// values that share the same ldiversity value. 4994type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { 4995 // EquivalenceClassSize: Size of the k-anonymity equivalence class. 4996 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4997 4998 // NumDistinctSensitiveValues: Number of distinct sensitive values in 4999 // this equivalence class. 5000 NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` 5001 5002 // QuasiIdsValues: Quasi-identifier values defining the k-anonymity 5003 // equivalence class. The order is always the same as the original 5004 // request. 5005 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 5006 5007 // TopSensitiveValues: Estimated frequencies of top sensitive values. 5008 TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` 5009 5010 // ForceSendFields is a list of field names (e.g. 5011 // "EquivalenceClassSize") to unconditionally include in API requests. 5012 // By default, fields with empty values are omitted from API requests. 5013 // However, any non-pointer, non-interface field appearing in 5014 // ForceSendFields will be sent to the server regardless of whether the 5015 // field is empty or not. This may be used to include empty fields in 5016 // Patch requests. 5017 ForceSendFields []string `json:"-"` 5018 5019 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 5020 // include in API requests with the JSON null value. By default, fields 5021 // with empty values are omitted from API requests. However, any field 5022 // with an empty value appearing in NullFields will be sent to the 5023 // server as null. It is an error if a field in this list has a 5024 // non-empty value. This may be used to include null fields in Patch 5025 // requests. 5026 NullFields []string `json:"-"` 5027} 5028 5029func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { 5030 type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass 5031 raw := NoMethod(*s) 5032 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5033} 5034 5035// GooglePrivacyDlpV2LDiversityHistogramBucket: Histogram of l-diversity 5036// equivalence class sensitive value frequencies. 5037type GooglePrivacyDlpV2LDiversityHistogramBucket struct { 5038 // BucketSize: Total number of equivalence classes in this bucket. 5039 BucketSize int64 `json:"bucketSize,omitempty,string"` 5040 5041 // BucketValueCount: Total number of distinct equivalence classes in 5042 // this bucket. 5043 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 5044 5045 // BucketValues: Sample of equivalence classes in this bucket. The total 5046 // number of classes returned per bucket is capped at 20. 5047 BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` 5048 5049 // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value 5050 // frequencies of the equivalence classes in this bucket. 5051 SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` 5052 5053 // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value 5054 // frequencies of the equivalence classes in this bucket. 5055 SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` 5056 5057 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5058 // unconditionally include in API requests. By default, fields with 5059 // empty values are omitted from API requests. However, any non-pointer, 5060 // non-interface field appearing in ForceSendFields will be sent to the 5061 // server regardless of whether the field is empty or not. This may be 5062 // used to include empty fields in Patch requests. 5063 ForceSendFields []string `json:"-"` 5064 5065 // NullFields is a list of field names (e.g. "BucketSize") to include in 5066 // API requests with the JSON null value. By default, fields with empty 5067 // values are omitted from API requests. However, any field with an 5068 // empty value appearing in NullFields will be sent to the server as 5069 // null. It is an error if a field in this list has a non-empty value. 5070 // This may be used to include null fields in Patch requests. 5071 NullFields []string `json:"-"` 5072} 5073 5074func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { 5075 type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket 5076 raw := NoMethod(*s) 5077 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5078} 5079 5080// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity 5081// computation. 5082type GooglePrivacyDlpV2LDiversityResult struct { 5083 // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity 5084 // equivalence class sensitive value frequencies. 5085 SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` 5086 5087 // ForceSendFields is a list of field names (e.g. 5088 // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include 5089 // in API requests. By default, fields with empty values are omitted 5090 // from API requests. However, any non-pointer, non-interface field 5091 // appearing in ForceSendFields will be sent to the server regardless of 5092 // whether the field is empty or not. This may be used to include empty 5093 // fields in Patch requests. 5094 ForceSendFields []string `json:"-"` 5095 5096 // NullFields is a list of field names (e.g. 5097 // "SensitiveValueFrequencyHistogramBuckets") to include in API requests 5098 // with the JSON null value. By default, fields with empty values are 5099 // omitted from API requests. However, any field with an empty value 5100 // appearing in NullFields will be sent to the server as null. It is an 5101 // error if a field in this list has a non-empty value. This may be used 5102 // to include null fields in Patch requests. 5103 NullFields []string `json:"-"` 5104} 5105 5106func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { 5107 type NoMethod GooglePrivacyDlpV2LDiversityResult 5108 raw := NoMethod(*s) 5109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5110} 5111 5112// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a 5113// custom dictionary created from a data source of any size up to the 5114// maximum size defined in the 5115// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of 5116// dictionary creation are stored in the specified Google Cloud Storage 5117// location. Consider using `CustomInfoType.Dictionary` for smaller 5118// dictionaries that satisfy the size requirements. 5119type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { 5120 // BigQueryField: Field in a BigQuery table where each cell represents a 5121 // dictionary phrase. 5122 BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` 5123 5124 // CloudStorageFileSet: Set of files containing newline-delimited lists 5125 // of dictionary phrases. 5126 CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` 5127 5128 // OutputPath: Location to store dictionary artifacts in Google Cloud 5129 // Storage. These files will only be accessible by project owners and 5130 // the DLP API. If any of these artifacts are modified, the dictionary 5131 // is considered invalid and can no longer be used. 5132 OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` 5133 5134 // ForceSendFields is a list of field names (e.g. "BigQueryField") to 5135 // unconditionally include in API requests. By default, fields with 5136 // empty values are omitted from API requests. However, any non-pointer, 5137 // non-interface field appearing in ForceSendFields will be sent to the 5138 // server regardless of whether the field is empty or not. This may be 5139 // used to include empty fields in Patch requests. 5140 ForceSendFields []string `json:"-"` 5141 5142 // NullFields is a list of field names (e.g. "BigQueryField") to include 5143 // in API requests with the JSON null value. By default, fields with 5144 // empty values are omitted from API requests. However, any field with 5145 // an empty value appearing in NullFields will be sent to the server as 5146 // null. It is an error if a field in this list has a non-empty value. 5147 // This may be used to include null fields in Patch requests. 5148 NullFields []string `json:"-"` 5149} 5150 5151func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { 5152 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig 5153 raw := NoMethod(*s) 5154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5155} 5156 5157// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a 5158// custom dictionary. 5159type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { 5160 // ApproxNumPhrases: Approximate number of distinct phrases in the 5161 // dictionary. 5162 ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` 5163 5164 // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to 5165 // unconditionally include in API requests. By default, fields with 5166 // empty values are omitted from API requests. However, any non-pointer, 5167 // non-interface field appearing in ForceSendFields will be sent to the 5168 // server regardless of whether the field is empty or not. This may be 5169 // used to include empty fields in Patch requests. 5170 ForceSendFields []string `json:"-"` 5171 5172 // NullFields is a list of field names (e.g. "ApproxNumPhrases") to 5173 // include in API requests with the JSON null value. By default, fields 5174 // with empty values are omitted from API requests. However, any field 5175 // with an empty value appearing in NullFields will be sent to the 5176 // server as null. It is an error if a field in this list has a 5177 // non-empty value. This may be used to include null fields in Patch 5178 // requests. 5179 NullFields []string `json:"-"` 5180} 5181 5182func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { 5183 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats 5184 raw := NoMethod(*s) 5185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5186} 5187 5188// GooglePrivacyDlpV2LeaveUntransformed: Skips the data without 5189// modifying it if the requested transformation would cause an error. 5190// For example, if a `DateShift` transformation were applied an an IP 5191// address, this mode would leave the IP address unchanged in the 5192// response. 5193type GooglePrivacyDlpV2LeaveUntransformed struct { 5194} 5195 5196// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an 5197// adjustment to the likelihood of a finding as part of a detection 5198// rule. 5199type GooglePrivacyDlpV2LikelihoodAdjustment struct { 5200 // FixedLikelihood: Set the likelihood of a finding to a fixed value. 5201 // 5202 // Possible values: 5203 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 5204 // "VERY_UNLIKELY" - Few matching elements. 5205 // "UNLIKELY" 5206 // "POSSIBLE" - Some matching elements. 5207 // "LIKELY" 5208 // "VERY_LIKELY" - Many matching elements. 5209 FixedLikelihood string `json:"fixedLikelihood,omitempty"` 5210 5211 // RelativeLikelihood: Increase or decrease the likelihood by the 5212 // specified number of levels. For example, if a finding would be 5213 // `POSSIBLE` without the detection rule and `relative_likelihood` is 1, 5214 // then it is upgraded to `LIKELY`, while a value of -1 would downgrade 5215 // it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or 5216 // exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an 5217 // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in 5218 // a final likelihood of `LIKELY`. 5219 RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` 5220 5221 // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to 5222 // unconditionally include in API requests. By default, fields with 5223 // empty values are omitted from API requests. However, any non-pointer, 5224 // non-interface field appearing in ForceSendFields will be sent to the 5225 // server regardless of whether the field is empty or not. This may be 5226 // used to include empty fields in Patch requests. 5227 ForceSendFields []string `json:"-"` 5228 5229 // NullFields is a list of field names (e.g. "FixedLikelihood") to 5230 // include in API requests with the JSON null value. By default, fields 5231 // with empty values are omitted from API requests. However, any field 5232 // with an empty value appearing in NullFields will be sent to the 5233 // server as null. It is an error if a field in this list has a 5234 // non-empty value. This may be used to include null fields in Patch 5235 // requests. 5236 NullFields []string `json:"-"` 5237} 5238 5239func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { 5240 type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment 5241 raw := NoMethod(*s) 5242 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5243} 5244 5245// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message 5246// for ListDeidentifyTemplates. 5247type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { 5248 // DeidentifyTemplates: List of deidentify templates, up to page_size in 5249 // ListDeidentifyTemplatesRequest. 5250 DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` 5251 5252 // NextPageToken: If the next page is available then the next page token 5253 // to be used in following ListDeidentifyTemplates request. 5254 NextPageToken string `json:"nextPageToken,omitempty"` 5255 5256 // ServerResponse contains the HTTP response code and headers from the 5257 // server. 5258 googleapi.ServerResponse `json:"-"` 5259 5260 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") 5261 // to unconditionally include in API requests. By default, fields with 5262 // empty values are omitted from API requests. However, any non-pointer, 5263 // non-interface field appearing in ForceSendFields will be sent to the 5264 // server regardless of whether the field is empty or not. This may be 5265 // used to include empty fields in Patch requests. 5266 ForceSendFields []string `json:"-"` 5267 5268 // NullFields is a list of field names (e.g. "DeidentifyTemplates") to 5269 // include in API requests with the JSON null value. By default, fields 5270 // with empty values are omitted from API requests. However, any field 5271 // with an empty value appearing in NullFields will be sent to the 5272 // server as null. It is an error if a field in this list has a 5273 // non-empty value. This may be used to include null fields in Patch 5274 // requests. 5275 NullFields []string `json:"-"` 5276} 5277 5278func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { 5279 type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse 5280 raw := NoMethod(*s) 5281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5282} 5283 5284// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for 5285// listing DLP jobs. 5286type GooglePrivacyDlpV2ListDlpJobsResponse struct { 5287 // Jobs: A list of DlpJobs that matches the specified filter in the 5288 // request. 5289 Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` 5290 5291 // NextPageToken: The standard List next-page token. 5292 NextPageToken string `json:"nextPageToken,omitempty"` 5293 5294 // ServerResponse contains the HTTP response code and headers from the 5295 // server. 5296 googleapi.ServerResponse `json:"-"` 5297 5298 // ForceSendFields is a list of field names (e.g. "Jobs") to 5299 // unconditionally include in API requests. By default, fields with 5300 // empty values are omitted from API requests. However, any non-pointer, 5301 // non-interface field appearing in ForceSendFields will be sent to the 5302 // server regardless of whether the field is empty or not. This may be 5303 // used to include empty fields in Patch requests. 5304 ForceSendFields []string `json:"-"` 5305 5306 // NullFields is a list of field names (e.g. "Jobs") to include in API 5307 // requests with the JSON null value. By default, fields with empty 5308 // values are omitted from API requests. However, any field with an 5309 // empty value appearing in NullFields will be sent to the server as 5310 // null. It is an error if a field in this list has a non-empty value. 5311 // This may be used to include null fields in Patch requests. 5312 NullFields []string `json:"-"` 5313} 5314 5315func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { 5316 type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse 5317 raw := NoMethod(*s) 5318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5319} 5320 5321// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the 5322// ListInfoTypes request. 5323type GooglePrivacyDlpV2ListInfoTypesResponse struct { 5324 // InfoTypes: Set of sensitive infoTypes. 5325 InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` 5326 5327 // ServerResponse contains the HTTP response code and headers from the 5328 // server. 5329 googleapi.ServerResponse `json:"-"` 5330 5331 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 5332 // unconditionally include in API requests. By default, fields with 5333 // empty values are omitted from API requests. However, any non-pointer, 5334 // non-interface field appearing in ForceSendFields will be sent to the 5335 // server regardless of whether the field is empty or not. This may be 5336 // used to include empty fields in Patch requests. 5337 ForceSendFields []string `json:"-"` 5338 5339 // NullFields is a list of field names (e.g. "InfoTypes") to include in 5340 // API requests with the JSON null value. By default, fields with empty 5341 // values are omitted from API requests. However, any field with an 5342 // empty value appearing in NullFields will be sent to the server as 5343 // null. It is an error if a field in this list has a non-empty value. 5344 // This may be used to include null fields in Patch requests. 5345 NullFields []string `json:"-"` 5346} 5347 5348func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { 5349 type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse 5350 raw := NoMethod(*s) 5351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5352} 5353 5354// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for 5355// ListInspectTemplates. 5356type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { 5357 // InspectTemplates: List of inspectTemplates, up to page_size in 5358 // ListInspectTemplatesRequest. 5359 InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` 5360 5361 // NextPageToken: If the next page is available then the next page token 5362 // to be used in following ListInspectTemplates request. 5363 NextPageToken string `json:"nextPageToken,omitempty"` 5364 5365 // ServerResponse contains the HTTP response code and headers from the 5366 // server. 5367 googleapi.ServerResponse `json:"-"` 5368 5369 // ForceSendFields is a list of field names (e.g. "InspectTemplates") to 5370 // unconditionally include in API requests. By default, fields with 5371 // empty values are omitted from API requests. However, any non-pointer, 5372 // non-interface field appearing in ForceSendFields will be sent to the 5373 // server regardless of whether the field is empty or not. This may be 5374 // used to include empty fields in Patch requests. 5375 ForceSendFields []string `json:"-"` 5376 5377 // NullFields is a list of field names (e.g. "InspectTemplates") to 5378 // include in API requests with the JSON null value. By default, fields 5379 // with empty values are omitted from API requests. However, any field 5380 // with an empty value appearing in NullFields will be sent to the 5381 // server as null. It is an error if a field in this list has a 5382 // non-empty value. This may be used to include null fields in Patch 5383 // requests. 5384 NullFields []string `json:"-"` 5385} 5386 5387func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { 5388 type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse 5389 raw := NoMethod(*s) 5390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5391} 5392 5393// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for 5394// ListJobTriggers. 5395type GooglePrivacyDlpV2ListJobTriggersResponse struct { 5396 // JobTriggers: List of triggeredJobs, up to page_size in 5397 // ListJobTriggersRequest. 5398 JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` 5399 5400 // NextPageToken: If the next page is available then the next page token 5401 // to be used in following ListJobTriggers request. 5402 NextPageToken string `json:"nextPageToken,omitempty"` 5403 5404 // ServerResponse contains the HTTP response code and headers from the 5405 // server. 5406 googleapi.ServerResponse `json:"-"` 5407 5408 // ForceSendFields is a list of field names (e.g. "JobTriggers") to 5409 // unconditionally include in API requests. By default, fields with 5410 // empty values are omitted from API requests. However, any non-pointer, 5411 // non-interface field appearing in ForceSendFields will be sent to the 5412 // server regardless of whether the field is empty or not. This may be 5413 // used to include empty fields in Patch requests. 5414 ForceSendFields []string `json:"-"` 5415 5416 // NullFields is a list of field names (e.g. "JobTriggers") to include 5417 // in API requests with the JSON null value. By default, fields with 5418 // empty values are omitted from API requests. However, any field with 5419 // an empty value appearing in NullFields will be sent to the server as 5420 // null. It is an error if a field in this list has a non-empty value. 5421 // This may be used to include null fields in Patch requests. 5422 NullFields []string `json:"-"` 5423} 5424 5425func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { 5426 type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse 5427 raw := NoMethod(*s) 5428 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5429} 5430 5431// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for 5432// ListStoredInfoTypes. 5433type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { 5434 // NextPageToken: If the next page is available then the next page token 5435 // to be used in following ListStoredInfoTypes request. 5436 NextPageToken string `json:"nextPageToken,omitempty"` 5437 5438 // StoredInfoTypes: List of storedInfoTypes, up to page_size in 5439 // ListStoredInfoTypesRequest. 5440 StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` 5441 5442 // ServerResponse contains the HTTP response code and headers from the 5443 // server. 5444 googleapi.ServerResponse `json:"-"` 5445 5446 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5447 // unconditionally include in API requests. By default, fields with 5448 // empty values are omitted from API requests. However, any non-pointer, 5449 // non-interface field appearing in ForceSendFields will be sent to the 5450 // server regardless of whether the field is empty or not. This may be 5451 // used to include empty fields in Patch requests. 5452 ForceSendFields []string `json:"-"` 5453 5454 // NullFields is a list of field names (e.g. "NextPageToken") to include 5455 // in API requests with the JSON null value. By default, fields with 5456 // empty values are omitted from API requests. However, any field with 5457 // an empty value appearing in NullFields will be sent to the server as 5458 // null. It is an error if a field in this list has a non-empty value. 5459 // This may be used to include null fields in Patch requests. 5460 NullFields []string `json:"-"` 5461} 5462 5463func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { 5464 type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse 5465 raw := NoMethod(*s) 5466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5467} 5468 5469// GooglePrivacyDlpV2Location: Specifies the location of the finding. 5470type GooglePrivacyDlpV2Location struct { 5471 // ByteRange: Zero-based byte offsets delimiting the finding. These are 5472 // relative to the finding's containing element. Note that when the 5473 // content is not textual, this references the UTF-8 encoded textual 5474 // representation of the content. Omitted if content is an image. 5475 ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` 5476 5477 // CodepointRange: Unicode character offsets delimiting the finding. 5478 // These are relative to the finding's containing element. Provided when 5479 // the content is text. 5480 CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` 5481 5482 // Container: Information about the container where this finding 5483 // occurred, if available. 5484 Container *GooglePrivacyDlpV2Container `json:"container,omitempty"` 5485 5486 // ContentLocations: List of nested objects pointing to the precise 5487 // location of the finding within the file or record. 5488 ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` 5489 5490 // ForceSendFields is a list of field names (e.g. "ByteRange") to 5491 // unconditionally include in API requests. By default, fields with 5492 // empty values are omitted from API requests. However, any non-pointer, 5493 // non-interface field appearing in ForceSendFields will be sent to the 5494 // server regardless of whether the field is empty or not. This may be 5495 // used to include empty fields in Patch requests. 5496 ForceSendFields []string `json:"-"` 5497 5498 // NullFields is a list of field names (e.g. "ByteRange") to include in 5499 // API requests with the JSON null value. By default, fields with empty 5500 // values are omitted from API requests. However, any field with an 5501 // empty value appearing in NullFields will be sent to the server as 5502 // null. It is an error if a field in this list has a non-empty value. 5503 // This may be used to include null fields in Patch requests. 5504 NullFields []string `json:"-"` 5505} 5506 5507func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { 5508 type NoMethod GooglePrivacyDlpV2Location 5509 raw := NoMethod(*s) 5510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5511} 5512 5513// GooglePrivacyDlpV2Manual: Job trigger option for hybrid jobs. Jobs 5514// must be manually created and finished. 5515type GooglePrivacyDlpV2Manual struct { 5516} 5517 5518// GooglePrivacyDlpV2MetadataLocation: Metadata Location 5519type GooglePrivacyDlpV2MetadataLocation struct { 5520 // StorageLabel: Storage metadata. 5521 StorageLabel *GooglePrivacyDlpV2StorageMetadataLabel `json:"storageLabel,omitempty"` 5522 5523 // Type: Type of metadata containing the finding. 5524 // 5525 // Possible values: 5526 // "METADATATYPE_UNSPECIFIED" - Unused 5527 // "STORAGE_METADATA" - General file metadata provided by Cloud 5528 // Storage. 5529 Type string `json:"type,omitempty"` 5530 5531 // ForceSendFields is a list of field names (e.g. "StorageLabel") to 5532 // unconditionally include in API requests. By default, fields with 5533 // empty values are omitted from API requests. However, any non-pointer, 5534 // non-interface field appearing in ForceSendFields will be sent to the 5535 // server regardless of whether the field is empty or not. This may be 5536 // used to include empty fields in Patch requests. 5537 ForceSendFields []string `json:"-"` 5538 5539 // NullFields is a list of field names (e.g. "StorageLabel") to include 5540 // in API requests with the JSON null value. By default, fields with 5541 // empty values are omitted from API requests. However, any field with 5542 // an empty value appearing in NullFields will be sent to the server as 5543 // null. It is an error if a field in this list has a non-empty value. 5544 // This may be used to include null fields in Patch requests. 5545 NullFields []string `json:"-"` 5546} 5547 5548func (s *GooglePrivacyDlpV2MetadataLocation) MarshalJSON() ([]byte, error) { 5549 type NoMethod GooglePrivacyDlpV2MetadataLocation 5550 raw := NoMethod(*s) 5551 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5552} 5553 5554// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over 5555// an individual column, including min, max, and quantiles. 5556type GooglePrivacyDlpV2NumericalStatsConfig struct { 5557 // Field: Field to compute numerical stats on. Supported types are 5558 // integer, float, date, datetime, timestamp, time. 5559 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5560 5561 // ForceSendFields is a list of field names (e.g. "Field") to 5562 // unconditionally include in API requests. By default, fields with 5563 // empty values are omitted from API requests. However, any non-pointer, 5564 // non-interface field appearing in ForceSendFields will be sent to the 5565 // server regardless of whether the field is empty or not. This may be 5566 // used to include empty fields in Patch requests. 5567 ForceSendFields []string `json:"-"` 5568 5569 // NullFields is a list of field names (e.g. "Field") to include in API 5570 // requests with the JSON null value. By default, fields with empty 5571 // values are omitted from API requests. However, any field with an 5572 // empty value appearing in NullFields will be sent to the server as 5573 // null. It is an error if a field in this list has a non-empty value. 5574 // This may be used to include null fields in Patch requests. 5575 NullFields []string `json:"-"` 5576} 5577 5578func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { 5579 type NoMethod GooglePrivacyDlpV2NumericalStatsConfig 5580 raw := NoMethod(*s) 5581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5582} 5583 5584// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats 5585// computation. 5586type GooglePrivacyDlpV2NumericalStatsResult struct { 5587 // MaxValue: Maximum value appearing in the column. 5588 MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` 5589 5590 // MinValue: Minimum value appearing in the column. 5591 MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` 5592 5593 // QuantileValues: List of 99 values that partition the set of field 5594 // values into 100 equal sized buckets. 5595 QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` 5596 5597 // ForceSendFields is a list of field names (e.g. "MaxValue") to 5598 // unconditionally include in API requests. By default, fields with 5599 // empty values are omitted from API requests. However, any non-pointer, 5600 // non-interface field appearing in ForceSendFields will be sent to the 5601 // server regardless of whether the field is empty or not. This may be 5602 // used to include empty fields in Patch requests. 5603 ForceSendFields []string `json:"-"` 5604 5605 // NullFields is a list of field names (e.g. "MaxValue") to include in 5606 // API requests with the JSON null value. By default, fields with empty 5607 // values are omitted from API requests. However, any field with an 5608 // empty value appearing in NullFields will be sent to the server as 5609 // null. It is an error if a field in this list has a non-empty value. 5610 // This may be used to include null fields in Patch requests. 5611 NullFields []string `json:"-"` 5612} 5613 5614func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { 5615 type NoMethod GooglePrivacyDlpV2NumericalStatsResult 5616 raw := NoMethod(*s) 5617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5618} 5619 5620// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing 5621// output. 5622type GooglePrivacyDlpV2OutputStorageConfig struct { 5623 // OutputSchema: Schema used for writing the findings for Inspect jobs. 5624 // This field is only used for Inspect and must be unspecified for Risk 5625 // jobs. Columns are derived from the `Finding` object. If appending to 5626 // an existing table, any columns from the predefined schema that are 5627 // missing will be added. No columns in the existing table will be 5628 // deleted. If unspecified, then all available columns will be used for 5629 // a new table or an (existing) table with no schema, and no changes 5630 // will be made to an existing table that has a schema. Only for use 5631 // with external storage. 5632 // 5633 // Possible values: 5634 // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. 5635 // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, 5636 // `certainty`, and `timestamp`. 5637 // "GCS_COLUMNS" - Schema tailored to findings from scanning Google 5638 // Cloud Storage. 5639 // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning 5640 // Google Datastore. 5641 // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning 5642 // Google BigQuery. 5643 // "ALL_COLUMNS" - Schema containing all columns. 5644 OutputSchema string `json:"outputSchema,omitempty"` 5645 5646 // Table: Store findings in an existing table or a new table in an 5647 // existing dataset. If table_id is not set a new one will be generated 5648 // for you with the following format: 5649 // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used 5650 // for generating the date details. For Inspect, each column in an 5651 // existing output table must have the same name, type, and mode of a 5652 // field in the `Finding` object. For Risk, an existing output table 5653 // should be the output of a previous Risk analysis job run on the same 5654 // source table, with the same privacy metric and quasi-identifiers. 5655 // Risk jobs that analyze the same table but compute a different privacy 5656 // metric, or use different sets of quasi-identifiers, cannot store 5657 // their results in the same table. 5658 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 5659 5660 // ForceSendFields is a list of field names (e.g. "OutputSchema") to 5661 // unconditionally include in API requests. By default, fields with 5662 // empty values are omitted from API requests. However, any non-pointer, 5663 // non-interface field appearing in ForceSendFields will be sent to the 5664 // server regardless of whether the field is empty or not. This may be 5665 // used to include empty fields in Patch requests. 5666 ForceSendFields []string `json:"-"` 5667 5668 // NullFields is a list of field names (e.g. "OutputSchema") to include 5669 // in API requests with the JSON null value. By default, fields with 5670 // empty values are omitted from API requests. However, any field with 5671 // an empty value appearing in NullFields will be sent to the server as 5672 // null. It is an error if a field in this list has a non-empty value. 5673 // This may be used to include null fields in Patch requests. 5674 NullFields []string `json:"-"` 5675} 5676 5677func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { 5678 type NoMethod GooglePrivacyDlpV2OutputStorageConfig 5679 raw := NoMethod(*s) 5680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5681} 5682 5683// GooglePrivacyDlpV2PartitionId: Datastore partition ID. A partition ID 5684// identifies a grouping of entities. The grouping is always by project 5685// and namespace, however the namespace ID may be empty. A partition ID 5686// contains several dimensions: project ID and namespace ID. 5687type GooglePrivacyDlpV2PartitionId struct { 5688 // NamespaceId: If not empty, the ID of the namespace to which the 5689 // entities belong. 5690 NamespaceId string `json:"namespaceId,omitempty"` 5691 5692 // ProjectId: The ID of the project to which the entities belong. 5693 ProjectId string `json:"projectId,omitempty"` 5694 5695 // ForceSendFields is a list of field names (e.g. "NamespaceId") to 5696 // unconditionally include in API requests. By default, fields with 5697 // empty values are omitted from API requests. However, any non-pointer, 5698 // non-interface field appearing in ForceSendFields will be sent to the 5699 // server regardless of whether the field is empty or not. This may be 5700 // used to include empty fields in Patch requests. 5701 ForceSendFields []string `json:"-"` 5702 5703 // NullFields is a list of field names (e.g. "NamespaceId") to include 5704 // in API requests with the JSON null value. By default, fields with 5705 // empty values are omitted from API requests. However, any field with 5706 // an empty value appearing in NullFields will be sent to the server as 5707 // null. It is an error if a field in this list has a non-empty value. 5708 // This may be used to include null fields in Patch requests. 5709 NullFields []string `json:"-"` 5710} 5711 5712func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { 5713 type NoMethod GooglePrivacyDlpV2PartitionId 5714 raw := NoMethod(*s) 5715 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5716} 5717 5718// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to 5719// construct a key path. If either name or ID is set, the element is 5720// complete. If neither is set, the element is incomplete. 5721type GooglePrivacyDlpV2PathElement struct { 5722 // Id: The auto-allocated ID of the entity. Never equal to zero. Values 5723 // less than zero are discouraged and may not be supported in the 5724 // future. 5725 Id int64 `json:"id,omitempty,string"` 5726 5727 // Kind: The kind of the entity. A kind matching regex `__.*__` is 5728 // reserved/read-only. A kind must not contain more than 1500 bytes when 5729 // UTF-8 encoded. Cannot be "". 5730 Kind string `json:"kind,omitempty"` 5731 5732 // Name: The name of the entity. A name matching regex `__.*__` is 5733 // reserved/read-only. A name must not be more than 1500 bytes when 5734 // UTF-8 encoded. Cannot be "". 5735 Name string `json:"name,omitempty"` 5736 5737 // ForceSendFields is a list of field names (e.g. "Id") to 5738 // unconditionally include in API requests. By default, fields with 5739 // empty values are omitted from API requests. However, any non-pointer, 5740 // non-interface field appearing in ForceSendFields will be sent to the 5741 // server regardless of whether the field is empty or not. This may be 5742 // used to include empty fields in Patch requests. 5743 ForceSendFields []string `json:"-"` 5744 5745 // NullFields is a list of field names (e.g. "Id") to include in API 5746 // requests with the JSON null value. By default, fields with empty 5747 // values are omitted from API requests. However, any field with an 5748 // empty value appearing in NullFields will be sent to the server as 5749 // null. It is an error if a field in this list has a non-empty value. 5750 // This may be used to include null fields in Patch requests. 5751 NullFields []string `json:"-"` 5752} 5753 5754func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { 5755 type NoMethod GooglePrivacyDlpV2PathElement 5756 raw := NoMethod(*s) 5757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5758} 5759 5760// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a 5761// value. 5762type GooglePrivacyDlpV2PrimitiveTransformation struct { 5763 // BucketingConfig: Bucketing 5764 BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` 5765 5766 // CharacterMaskConfig: Mask 5767 CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 5768 5769 // CryptoDeterministicConfig: Deterministic Crypto 5770 CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` 5771 5772 // CryptoHashConfig: Crypto 5773 CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 5774 5775 // CryptoReplaceFfxFpeConfig: Ffx-Fpe 5776 CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` 5777 5778 // DateShiftConfig: Date Shift 5779 DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` 5780 5781 // FixedSizeBucketingConfig: Fixed size bucketing 5782 FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` 5783 5784 // RedactConfig: Redact 5785 RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` 5786 5787 // ReplaceConfig: Replace 5788 ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` 5789 5790 // ReplaceWithInfoTypeConfig: Replace with infotype 5791 ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 5792 5793 // TimePartConfig: Time extraction 5794 TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` 5795 5796 // ForceSendFields is a list of field names (e.g. "BucketingConfig") to 5797 // unconditionally include in API requests. By default, fields with 5798 // empty values are omitted from API requests. However, any non-pointer, 5799 // non-interface field appearing in ForceSendFields will be sent to the 5800 // server regardless of whether the field is empty or not. This may be 5801 // used to include empty fields in Patch requests. 5802 ForceSendFields []string `json:"-"` 5803 5804 // NullFields is a list of field names (e.g. "BucketingConfig") to 5805 // include in API requests with the JSON null value. By default, fields 5806 // with empty values are omitted from API requests. However, any field 5807 // with an empty value appearing in NullFields will be sent to the 5808 // server as null. It is an error if a field in this list has a 5809 // non-empty value. This may be used to include null fields in Patch 5810 // requests. 5811 NullFields []string `json:"-"` 5812} 5813 5814func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { 5815 type NoMethod GooglePrivacyDlpV2PrimitiveTransformation 5816 raw := NoMethod(*s) 5817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5818} 5819 5820// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for 5821// reidentification risk analysis. 5822type GooglePrivacyDlpV2PrivacyMetric struct { 5823 // CategoricalStatsConfig: Categorical stats 5824 CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` 5825 5826 // DeltaPresenceEstimationConfig: delta-presence 5827 DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` 5828 5829 // KAnonymityConfig: K-anonymity 5830 KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` 5831 5832 // KMapEstimationConfig: k-map 5833 KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` 5834 5835 // LDiversityConfig: l-diversity 5836 LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` 5837 5838 // NumericalStatsConfig: Numerical stats 5839 NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` 5840 5841 // ForceSendFields is a list of field names (e.g. 5842 // "CategoricalStatsConfig") to unconditionally include in API requests. 5843 // By default, fields with empty values are omitted from API requests. 5844 // However, any non-pointer, non-interface field appearing in 5845 // ForceSendFields will be sent to the server regardless of whether the 5846 // field is empty or not. This may be used to include empty fields in 5847 // Patch requests. 5848 ForceSendFields []string `json:"-"` 5849 5850 // NullFields is a list of field names (e.g. "CategoricalStatsConfig") 5851 // to include in API requests with the JSON null value. By default, 5852 // fields with empty values are omitted from API requests. However, any 5853 // field with an empty value appearing in NullFields will be sent to the 5854 // server as null. It is an error if a field in this list has a 5855 // non-empty value. This may be used to include null fields in Patch 5856 // requests. 5857 NullFields []string `json:"-"` 5858} 5859 5860func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { 5861 type NoMethod GooglePrivacyDlpV2PrivacyMetric 5862 raw := NoMethod(*s) 5863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5864} 5865 5866// GooglePrivacyDlpV2Proximity: Message for specifying a window around a 5867// finding to apply a detection rule. 5868type GooglePrivacyDlpV2Proximity struct { 5869 // WindowAfter: Number of characters after the finding to consider. 5870 WindowAfter int64 `json:"windowAfter,omitempty"` 5871 5872 // WindowBefore: Number of characters before the finding to consider. 5873 WindowBefore int64 `json:"windowBefore,omitempty"` 5874 5875 // ForceSendFields is a list of field names (e.g. "WindowAfter") to 5876 // unconditionally include in API requests. By default, fields with 5877 // empty values are omitted from API requests. However, any non-pointer, 5878 // non-interface field appearing in ForceSendFields will be sent to the 5879 // server regardless of whether the field is empty or not. This may be 5880 // used to include empty fields in Patch requests. 5881 ForceSendFields []string `json:"-"` 5882 5883 // NullFields is a list of field names (e.g. "WindowAfter") to include 5884 // in API requests with the JSON null value. By default, fields with 5885 // empty values are omitted from API requests. However, any field with 5886 // an empty value appearing in NullFields will be sent to the server as 5887 // null. It is an error if a field in this list has a non-empty value. 5888 // This may be used to include null fields in Patch requests. 5889 NullFields []string `json:"-"` 5890} 5891 5892func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { 5893 type NoMethod GooglePrivacyDlpV2Proximity 5894 raw := NoMethod(*s) 5895 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5896} 5897 5898// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings 5899// of a DlpJob to Cloud Data Catalog. Labels summarizing the results of 5900// the DlpJob will be applied to the entry for the resource scanned in 5901// Cloud Data Catalog. Any labels previously written by another DlpJob 5902// will be deleted. InfoType naming patterns are strictly enforced when 5903// using this feature. Note that the findings will be persisted in Cloud 5904// Data Catalog storage and are governed by Data Catalog 5905// service-specific policy, see 5906// https://cloud.google.com/terms/service-terms Only a single instance 5907// of this action can be specified and only allowed if all resources 5908// being scanned are BigQuery tables. Compatible with: Inspect 5909type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { 5910} 5911 5912// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of 5913// a DlpJob to the Cloud Security Command Center (CSCC Alpha). This 5914// action is only available for projects which are parts of an 5915// organization and whitelisted for the alpha Cloud Security Command 5916// Center. The action will publish count of finding instances and their 5917// info types. The summary of findings will be persisted in CSCC and are 5918// governed by CSCC service-specific policy, see 5919// https://cloud.google.com/terms/service-terms Only a single instance 5920// of this action can be specified. Compatible with: Inspect 5921type GooglePrivacyDlpV2PublishSummaryToCscc struct { 5922} 5923 5924// GooglePrivacyDlpV2PublishToPubSub: Publish a message into given 5925// Pub/Sub topic when DlpJob has completed. The message contains a 5926// single field, `DlpJobName`, which is equal to the finished job's 5927// [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/pr 5928// ojects.dlpJobs#DlpJob). Compatible with: Inspect, Risk 5929type GooglePrivacyDlpV2PublishToPubSub struct { 5930 // Topic: Cloud Pub/Sub topic to send notifications to. The topic must 5931 // have given publishing access rights to the DLP API service account 5932 // executing the long running DlpJob sending the notifications. Format 5933 // is projects/{project}/topics/{topic}. 5934 Topic string `json:"topic,omitempty"` 5935 5936 // ForceSendFields is a list of field names (e.g. "Topic") to 5937 // unconditionally include in API requests. By default, fields with 5938 // empty values are omitted from API requests. However, any non-pointer, 5939 // non-interface field appearing in ForceSendFields will be sent to the 5940 // server regardless of whether the field is empty or not. This may be 5941 // used to include empty fields in Patch requests. 5942 ForceSendFields []string `json:"-"` 5943 5944 // NullFields is a list of field names (e.g. "Topic") to include in API 5945 // requests with the JSON null value. By default, fields with empty 5946 // values are omitted from API requests. However, any field with an 5947 // empty value appearing in NullFields will be sent to the server as 5948 // null. It is an error if a field in this list has a non-empty value. 5949 // This may be used to include null fields in Patch requests. 5950 NullFields []string `json:"-"` 5951} 5952 5953func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { 5954 type NoMethod GooglePrivacyDlpV2PublishToPubSub 5955 raw := NoMethod(*s) 5956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5957} 5958 5959// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric 5960// dlp.googleapis.com/finding_count. This will publish a metric to stack 5961// driver on each infotype requested and how many findings were found 5962// for it. CustomDetectors will be bucketed as 'Custom' under the 5963// Stackdriver label 'info_type'. 5964type GooglePrivacyDlpV2PublishToStackdriver struct { 5965} 5966 5967// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. 5968type GooglePrivacyDlpV2QuasiId struct { 5969 // CustomTag: A column can be tagged with a custom tag. In this case, 5970 // the user must indicate an auxiliary table that contains statistical 5971 // information on the possible values of this column (below). 5972 CustomTag string `json:"customTag,omitempty"` 5973 5974 // Field: Required. Identifies the column. 5975 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5976 5977 // Inferred: If no semantic tag is indicated, we infer the statistical 5978 // model from the distribution of values in the input data 5979 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 5980 5981 // InfoType: A column can be tagged with a InfoType to use the relevant 5982 // public dataset as a statistical model of population, if available. We 5983 // currently support US ZIP codes, region codes, ages and genders. To 5984 // programmatically obtain the list of supported InfoTypes, use 5985 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 5986 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 5987 5988 // ForceSendFields is a list of field names (e.g. "CustomTag") to 5989 // unconditionally include in API requests. By default, fields with 5990 // empty values are omitted from API requests. However, any non-pointer, 5991 // non-interface field appearing in ForceSendFields will be sent to the 5992 // server regardless of whether the field is empty or not. This may be 5993 // used to include empty fields in Patch requests. 5994 ForceSendFields []string `json:"-"` 5995 5996 // NullFields is a list of field names (e.g. "CustomTag") to include in 5997 // API requests with the JSON null value. By default, fields with empty 5998 // values are omitted from API requests. However, any field with an 5999 // empty value appearing in NullFields will be sent to the server as 6000 // null. It is an error if a field in this list has a non-empty value. 6001 // This may be used to include null fields in Patch requests. 6002 NullFields []string `json:"-"` 6003} 6004 6005func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { 6006 type NoMethod GooglePrivacyDlpV2QuasiId 6007 raw := NoMethod(*s) 6008 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6009} 6010 6011// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a 6012// custom_tag, used to know which column in the data corresponds to 6013// which column in the statistical model. 6014type GooglePrivacyDlpV2QuasiIdField struct { 6015 // CustomTag: A auxiliary field. 6016 CustomTag string `json:"customTag,omitempty"` 6017 6018 // Field: Identifies the column. 6019 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6020 6021 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6022 // unconditionally include in API requests. By default, fields with 6023 // empty values are omitted from API requests. However, any non-pointer, 6024 // non-interface field appearing in ForceSendFields will be sent to the 6025 // server regardless of whether the field is empty or not. This may be 6026 // used to include empty fields in Patch requests. 6027 ForceSendFields []string `json:"-"` 6028 6029 // NullFields is a list of field names (e.g. "CustomTag") to include in 6030 // API requests with the JSON null value. By default, fields with empty 6031 // values are omitted from API requests. However, any field with an 6032 // empty value appearing in NullFields will be sent to the server as 6033 // null. It is an error if a field in this list has a non-empty value. 6034 // This may be used to include null fields in Patch requests. 6035 NullFields []string `json:"-"` 6036} 6037 6038func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { 6039 type NoMethod GooglePrivacyDlpV2QuasiIdField 6040 raw := NoMethod(*s) 6041 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6042} 6043 6044// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has 6045// a custom_tag, used to know which column in the data corresponds to 6046// which column in the statistical model. 6047type GooglePrivacyDlpV2QuasiIdentifierField struct { 6048 // CustomTag: A column can be tagged with a custom tag. In this case, 6049 // the user must indicate an auxiliary table that contains statistical 6050 // information on the possible values of this column (below). 6051 CustomTag string `json:"customTag,omitempty"` 6052 6053 // Field: Identifies the column. 6054 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6055 6056 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6057 // unconditionally include in API requests. By default, fields with 6058 // empty values are omitted from API requests. However, any non-pointer, 6059 // non-interface field appearing in ForceSendFields will be sent to the 6060 // server regardless of whether the field is empty or not. This may be 6061 // used to include empty fields in Patch requests. 6062 ForceSendFields []string `json:"-"` 6063 6064 // NullFields is a list of field names (e.g. "CustomTag") to include in 6065 // API requests with the JSON null value. By default, fields with empty 6066 // values are omitted from API requests. However, any field with an 6067 // empty value appearing in NullFields will be sent to the server as 6068 // null. It is an error if a field in this list has a non-empty value. 6069 // This may be used to include null fields in Patch requests. 6070 NullFields []string `json:"-"` 6071} 6072 6073func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { 6074 type NoMethod GooglePrivacyDlpV2QuasiIdentifierField 6075 raw := NoMethod(*s) 6076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6077} 6078 6079// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details 6080// parsed from quote. 6081type GooglePrivacyDlpV2QuoteInfo struct { 6082 // DateTime: The date time indicated by the quote. 6083 DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` 6084 6085 // ForceSendFields is a list of field names (e.g. "DateTime") to 6086 // unconditionally include in API requests. By default, fields with 6087 // empty values are omitted from API requests. However, any non-pointer, 6088 // non-interface field appearing in ForceSendFields will be sent to the 6089 // server regardless of whether the field is empty or not. This may be 6090 // used to include empty fields in Patch requests. 6091 ForceSendFields []string `json:"-"` 6092 6093 // NullFields is a list of field names (e.g. "DateTime") to include in 6094 // API requests with the JSON null value. By default, fields with empty 6095 // values are omitted from API requests. However, any field with an 6096 // empty value appearing in NullFields will be sent to the server as 6097 // null. It is an error if a field in this list has a non-empty value. 6098 // This may be used to include null fields in Patch requests. 6099 NullFields []string `json:"-"` 6100} 6101 6102func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { 6103 type NoMethod GooglePrivacyDlpV2QuoteInfo 6104 raw := NoMethod(*s) 6105 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6106} 6107 6108// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) 6109type GooglePrivacyDlpV2Range struct { 6110 // End: Index of the last character of the range (exclusive). 6111 End int64 `json:"end,omitempty,string"` 6112 6113 // Start: Index of the first character of the range (inclusive). 6114 Start int64 `json:"start,omitempty,string"` 6115 6116 // ForceSendFields is a list of field names (e.g. "End") to 6117 // unconditionally include in API requests. By default, fields with 6118 // empty values are omitted from API requests. However, any non-pointer, 6119 // non-interface field appearing in ForceSendFields will be sent to the 6120 // server regardless of whether the field is empty or not. This may be 6121 // used to include empty fields in Patch requests. 6122 ForceSendFields []string `json:"-"` 6123 6124 // NullFields is a list of field names (e.g. "End") to include in API 6125 // requests with the JSON null value. By default, fields with empty 6126 // values are omitted from API requests. However, any field with an 6127 // empty value appearing in NullFields will be sent to the server as 6128 // null. It is an error if a field in this list has a non-empty value. 6129 // This may be used to include null fields in Patch requests. 6130 NullFields []string `json:"-"` 6131} 6132 6133func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { 6134 type NoMethod GooglePrivacyDlpV2Range 6135 raw := NoMethod(*s) 6136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6137} 6138 6139// GooglePrivacyDlpV2RecordCondition: A condition for determining 6140// whether a transformation should be applied to a field. 6141type GooglePrivacyDlpV2RecordCondition struct { 6142 // Expressions: An expression. 6143 Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` 6144 6145 // ForceSendFields is a list of field names (e.g. "Expressions") to 6146 // unconditionally include in API requests. By default, fields with 6147 // empty values are omitted from API requests. However, any non-pointer, 6148 // non-interface field appearing in ForceSendFields will be sent to the 6149 // server regardless of whether the field is empty or not. This may be 6150 // used to include empty fields in Patch requests. 6151 ForceSendFields []string `json:"-"` 6152 6153 // NullFields is a list of field names (e.g. "Expressions") to include 6154 // in API requests with the JSON null value. By default, fields with 6155 // empty values are omitted from API requests. However, any field with 6156 // an empty value appearing in NullFields will be sent to the server as 6157 // null. It is an error if a field in this list has a non-empty value. 6158 // This may be used to include null fields in Patch requests. 6159 NullFields []string `json:"-"` 6160} 6161 6162func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { 6163 type NoMethod GooglePrivacyDlpV2RecordCondition 6164 raw := NoMethod(*s) 6165 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6166} 6167 6168// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a 6169// record that contains a finding. 6170type GooglePrivacyDlpV2RecordKey struct { 6171 BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` 6172 6173 DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` 6174 6175 // IdValues: Values of identifying columns in the given row. Order of 6176 // values matches the order of `identifying_fields` specified in the 6177 // scanning request. 6178 IdValues []string `json:"idValues,omitempty"` 6179 6180 // ForceSendFields is a list of field names (e.g. "BigQueryKey") to 6181 // unconditionally include in API requests. By default, fields with 6182 // empty values are omitted from API requests. However, any non-pointer, 6183 // non-interface field appearing in ForceSendFields will be sent to the 6184 // server regardless of whether the field is empty or not. This may be 6185 // used to include empty fields in Patch requests. 6186 ForceSendFields []string `json:"-"` 6187 6188 // NullFields is a list of field names (e.g. "BigQueryKey") to include 6189 // in API requests with the JSON null value. By default, fields with 6190 // empty values are omitted from API requests. However, any field with 6191 // an empty value appearing in NullFields will be sent to the server as 6192 // null. It is an error if a field in this list has a non-empty value. 6193 // This may be used to include null fields in Patch requests. 6194 NullFields []string `json:"-"` 6195} 6196 6197func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { 6198 type NoMethod GooglePrivacyDlpV2RecordKey 6199 raw := NoMethod(*s) 6200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6201} 6202 6203// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row 6204// or record. 6205type GooglePrivacyDlpV2RecordLocation struct { 6206 // FieldId: Field id of the field containing the finding. 6207 FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` 6208 6209 // RecordKey: Key of the finding. 6210 RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` 6211 6212 // TableLocation: Location within a `ContentItem.Table`. 6213 TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` 6214 6215 // ForceSendFields is a list of field names (e.g. "FieldId") to 6216 // unconditionally include in API requests. By default, fields with 6217 // empty values are omitted from API requests. However, any non-pointer, 6218 // non-interface field appearing in ForceSendFields will be sent to the 6219 // server regardless of whether the field is empty or not. This may be 6220 // used to include empty fields in Patch requests. 6221 ForceSendFields []string `json:"-"` 6222 6223 // NullFields is a list of field names (e.g. "FieldId") to include in 6224 // API requests with the JSON null value. By default, fields with empty 6225 // values are omitted from API requests. However, any field with an 6226 // empty value appearing in NullFields will be sent to the server as 6227 // null. It is an error if a field in this list has a non-empty value. 6228 // This may be used to include null fields in Patch requests. 6229 NullFields []string `json:"-"` 6230} 6231 6232func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { 6233 type NoMethod GooglePrivacyDlpV2RecordLocation 6234 raw := NoMethod(*s) 6235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6236} 6237 6238// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress 6239// records whose suppression conditions evaluate to true. 6240type GooglePrivacyDlpV2RecordSuppression struct { 6241 // Condition: A condition that when it evaluates to true will result in 6242 // the record being evaluated to be suppressed from the transformed 6243 // content. 6244 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 6245 6246 // ForceSendFields is a list of field names (e.g. "Condition") to 6247 // unconditionally include in API requests. By default, fields with 6248 // empty values are omitted from API requests. However, any non-pointer, 6249 // non-interface field appearing in ForceSendFields will be sent to the 6250 // server regardless of whether the field is empty or not. This may be 6251 // used to include empty fields in Patch requests. 6252 ForceSendFields []string `json:"-"` 6253 6254 // NullFields is a list of field names (e.g. "Condition") to include in 6255 // API requests with the JSON null value. By default, fields with empty 6256 // values are omitted from API requests. However, any field with an 6257 // empty value appearing in NullFields will be sent to the server as 6258 // null. It is an error if a field in this list has a non-empty value. 6259 // This may be used to include null fields in Patch requests. 6260 NullFields []string `json:"-"` 6261} 6262 6263func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { 6264 type NoMethod GooglePrivacyDlpV2RecordSuppression 6265 raw := NoMethod(*s) 6266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6267} 6268 6269// GooglePrivacyDlpV2RecordTransformations: A type of transformation 6270// that is applied over structured data such as a table. 6271type GooglePrivacyDlpV2RecordTransformations struct { 6272 // FieldTransformations: Transform the record by applying various field 6273 // transformations. 6274 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 6275 6276 // RecordSuppressions: Configuration defining which records get 6277 // suppressed entirely. Records that match any suppression rule are 6278 // omitted from the output. 6279 RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` 6280 6281 // ForceSendFields is a list of field names (e.g. 6282 // "FieldTransformations") to unconditionally include in API requests. 6283 // By default, fields with empty values are omitted from API requests. 6284 // However, any non-pointer, non-interface field appearing in 6285 // ForceSendFields will be sent to the server regardless of whether the 6286 // field is empty or not. This may be used to include empty fields in 6287 // Patch requests. 6288 ForceSendFields []string `json:"-"` 6289 6290 // NullFields is a list of field names (e.g. "FieldTransformations") to 6291 // include in API requests with the JSON null value. By default, fields 6292 // with empty values are omitted from API requests. However, any field 6293 // with an empty value appearing in NullFields will be sent to the 6294 // server as null. It is an error if a field in this list has a 6295 // non-empty value. This may be used to include null fields in Patch 6296 // requests. 6297 NullFields []string `json:"-"` 6298} 6299 6300func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { 6301 type NoMethod GooglePrivacyDlpV2RecordTransformations 6302 raw := NoMethod(*s) 6303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6304} 6305 6306// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if 6307// used with an `InfoTypeTransformation` transforming PHONE_NUMBER, and 6308// input 'My phone number is 206-555-0123', the output would be 'My 6309// phone number is '. 6310type GooglePrivacyDlpV2RedactConfig struct { 6311} 6312 6313// GooglePrivacyDlpV2RedactImageRequest: Request to search for 6314// potentially sensitive info in an image and redact it by covering it 6315// with a colored rectangle. 6316type GooglePrivacyDlpV2RedactImageRequest struct { 6317 // ByteItem: The content must be PNG, JPEG, SVG or BMP. 6318 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 6319 6320 // ImageRedactionConfigs: The configuration for specifying what content 6321 // to redact from images. 6322 ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` 6323 6324 // IncludeFindings: Whether the response should include findings along 6325 // with the redacted image. 6326 IncludeFindings bool `json:"includeFindings,omitempty"` 6327 6328 // InspectConfig: Configuration for the inspector. 6329 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6330 6331 // LocationId: Deprecated. This field has no effect. 6332 LocationId string `json:"locationId,omitempty"` 6333 6334 // ForceSendFields is a list of field names (e.g. "ByteItem") to 6335 // unconditionally include in API requests. By default, fields with 6336 // empty values are omitted from API requests. However, any non-pointer, 6337 // non-interface field appearing in ForceSendFields will be sent to the 6338 // server regardless of whether the field is empty or not. This may be 6339 // used to include empty fields in Patch requests. 6340 ForceSendFields []string `json:"-"` 6341 6342 // NullFields is a list of field names (e.g. "ByteItem") to include in 6343 // API requests with the JSON null value. By default, fields with empty 6344 // values are omitted from API requests. However, any field with an 6345 // empty value appearing in NullFields will be sent to the server as 6346 // null. It is an error if a field in this list has a non-empty value. 6347 // This may be used to include null fields in Patch requests. 6348 NullFields []string `json:"-"` 6349} 6350 6351func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { 6352 type NoMethod GooglePrivacyDlpV2RedactImageRequest 6353 raw := NoMethod(*s) 6354 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6355} 6356 6357// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. 6358type GooglePrivacyDlpV2RedactImageResponse struct { 6359 // ExtractedText: If an image was being inspected and the 6360 // InspectConfig's include_quote was set to true, then this field will 6361 // include all text, if any, that was found in the image. 6362 ExtractedText string `json:"extractedText,omitempty"` 6363 6364 // InspectResult: The findings. Populated when include_findings in the 6365 // request is true. 6366 InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` 6367 6368 // RedactedImage: The redacted image. The type will be the same as the 6369 // original image. 6370 RedactedImage string `json:"redactedImage,omitempty"` 6371 6372 // ServerResponse contains the HTTP response code and headers from the 6373 // server. 6374 googleapi.ServerResponse `json:"-"` 6375 6376 // ForceSendFields is a list of field names (e.g. "ExtractedText") to 6377 // unconditionally include in API requests. By default, fields with 6378 // empty values are omitted from API requests. However, any non-pointer, 6379 // non-interface field appearing in ForceSendFields will be sent to the 6380 // server regardless of whether the field is empty or not. This may be 6381 // used to include empty fields in Patch requests. 6382 ForceSendFields []string `json:"-"` 6383 6384 // NullFields is a list of field names (e.g. "ExtractedText") to include 6385 // in API requests with the JSON null value. By default, fields with 6386 // empty values are omitted from API requests. However, any field with 6387 // an empty value appearing in NullFields will be sent to the server as 6388 // null. It is an error if a field in this list has a non-empty value. 6389 // This may be used to include null fields in Patch requests. 6390 NullFields []string `json:"-"` 6391} 6392 6393func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { 6394 type NoMethod GooglePrivacyDlpV2RedactImageResponse 6395 raw := NoMethod(*s) 6396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6397} 6398 6399// GooglePrivacyDlpV2Regex: Message defining a custom regular 6400// expression. 6401type GooglePrivacyDlpV2Regex struct { 6402 // GroupIndexes: The index of the submatch to extract as findings. When 6403 // not specified, the entire match is returned. No more than 3 may be 6404 // included. 6405 GroupIndexes []int64 `json:"groupIndexes,omitempty"` 6406 6407 // Pattern: Pattern defining the regular expression. Its syntax 6408 // (https://github.com/google/re2/wiki/Syntax) can be found under the 6409 // google/re2 repository on GitHub. 6410 Pattern string `json:"pattern,omitempty"` 6411 6412 // ForceSendFields is a list of field names (e.g. "GroupIndexes") to 6413 // unconditionally include in API requests. By default, fields with 6414 // empty values are omitted from API requests. However, any non-pointer, 6415 // non-interface field appearing in ForceSendFields will be sent to the 6416 // server regardless of whether the field is empty or not. This may be 6417 // used to include empty fields in Patch requests. 6418 ForceSendFields []string `json:"-"` 6419 6420 // NullFields is a list of field names (e.g. "GroupIndexes") to include 6421 // in API requests with the JSON null value. By default, fields with 6422 // empty values are omitted from API requests. However, any field with 6423 // an empty value appearing in NullFields will be sent to the server as 6424 // null. It is an error if a field in this list has a non-empty value. 6425 // This may be used to include null fields in Patch requests. 6426 NullFields []string `json:"-"` 6427} 6428 6429func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { 6430 type NoMethod GooglePrivacyDlpV2Regex 6431 raw := NoMethod(*s) 6432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6433} 6434 6435// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an 6436// item. 6437type GooglePrivacyDlpV2ReidentifyContentRequest struct { 6438 // InspectConfig: Configuration for the inspector. 6439 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6440 6441 // InspectTemplateName: Template to use. Any configuration directly 6442 // specified in `inspect_config` will override those set in the 6443 // template. Singular fields that are set in this request will replace 6444 // their corresponding fields in the template. Repeated fields are 6445 // appended. Singular sub-messages and groups are recursively merged. 6446 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 6447 6448 // Item: The item to re-identify. Will be treated as text. 6449 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6450 6451 // LocationId: Deprecated. This field has no effect. 6452 LocationId string `json:"locationId,omitempty"` 6453 6454 // ReidentifyConfig: Configuration for the re-identification of the 6455 // content item. This field shares the same proto message type that is 6456 // used for de-identification, however its usage here is for the 6457 // reversal of the previous de-identification. Re-identification is 6458 // performed by examining the transformations used to de-identify the 6459 // items and executing the reverse. This requires that only reversible 6460 // transformations be provided here. The reversible transformations are: 6461 // - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig` 6462 ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` 6463 6464 // ReidentifyTemplateName: Template to use. References an instance of 6465 // `DeidentifyTemplate`. Any configuration directly specified in 6466 // `reidentify_config` or `inspect_config` will override those set in 6467 // the template. The `DeidentifyTemplate` used must include only 6468 // reversible transformations. Singular fields that are set in this 6469 // request will replace their corresponding fields in the template. 6470 // Repeated fields are appended. Singular sub-messages and groups are 6471 // recursively merged. 6472 ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` 6473 6474 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 6475 // unconditionally include in API requests. By default, fields with 6476 // empty values are omitted from API requests. However, any non-pointer, 6477 // non-interface field appearing in ForceSendFields will be sent to the 6478 // server regardless of whether the field is empty or not. This may be 6479 // used to include empty fields in Patch requests. 6480 ForceSendFields []string `json:"-"` 6481 6482 // NullFields is a list of field names (e.g. "InspectConfig") to include 6483 // in API requests with the JSON null value. By default, fields with 6484 // empty values are omitted from API requests. However, any field with 6485 // an empty value appearing in NullFields will be sent to the server as 6486 // null. It is an error if a field in this list has a non-empty value. 6487 // This may be used to include null fields in Patch requests. 6488 NullFields []string `json:"-"` 6489} 6490 6491func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { 6492 type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest 6493 raw := NoMethod(*s) 6494 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6495} 6496 6497// GooglePrivacyDlpV2ReidentifyContentResponse: Results of 6498// re-identifying a item. 6499type GooglePrivacyDlpV2ReidentifyContentResponse struct { 6500 // Item: The re-identified item. 6501 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6502 6503 // Overview: An overview of the changes that were made to the `item`. 6504 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 6505 6506 // ServerResponse contains the HTTP response code and headers from the 6507 // server. 6508 googleapi.ServerResponse `json:"-"` 6509 6510 // ForceSendFields is a list of field names (e.g. "Item") to 6511 // unconditionally include in API requests. By default, fields with 6512 // empty values are omitted from API requests. However, any non-pointer, 6513 // non-interface field appearing in ForceSendFields will be sent to the 6514 // server regardless of whether the field is empty or not. This may be 6515 // used to include empty fields in Patch requests. 6516 ForceSendFields []string `json:"-"` 6517 6518 // NullFields is a list of field names (e.g. "Item") to include in API 6519 // requests with the JSON null value. By default, fields with empty 6520 // values are omitted from API requests. However, any field with an 6521 // empty value appearing in NullFields will be sent to the server as 6522 // null. It is an error if a field in this list has a non-empty value. 6523 // This may be used to include null fields in Patch requests. 6524 NullFields []string `json:"-"` 6525} 6526 6527func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { 6528 type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse 6529 raw := NoMethod(*s) 6530 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6531} 6532 6533// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a 6534// given `Value`. 6535type GooglePrivacyDlpV2ReplaceValueConfig struct { 6536 // NewValue: Value to replace it with. 6537 NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` 6538 6539 // ForceSendFields is a list of field names (e.g. "NewValue") to 6540 // unconditionally include in API requests. By default, fields with 6541 // empty values are omitted from API requests. However, any non-pointer, 6542 // non-interface field appearing in ForceSendFields will be sent to the 6543 // server regardless of whether the field is empty or not. This may be 6544 // used to include empty fields in Patch requests. 6545 ForceSendFields []string `json:"-"` 6546 6547 // NullFields is a list of field names (e.g. "NewValue") to include in 6548 // API requests with the JSON null value. By default, fields with empty 6549 // values are omitted from API requests. However, any field with an 6550 // empty value appearing in NullFields will be sent to the server as 6551 // null. It is an error if a field in this list has a non-empty value. 6552 // This may be used to include null fields in Patch requests. 6553 NullFields []string `json:"-"` 6554} 6555 6556func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { 6557 type NoMethod GooglePrivacyDlpV2ReplaceValueConfig 6558 raw := NoMethod(*s) 6559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6560} 6561 6562// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching 6563// finding with the name of the info_type. 6564type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { 6565} 6566 6567// GooglePrivacyDlpV2RequestedOptions: Snapshot of the inspection 6568// configuration. 6569type GooglePrivacyDlpV2RequestedOptions struct { 6570 // JobConfig: Inspect config. 6571 JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` 6572 6573 // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot 6574 // of its state at the time of this run. 6575 SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` 6576 6577 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6578 // unconditionally include in API requests. By default, fields with 6579 // empty values are omitted from API requests. However, any non-pointer, 6580 // non-interface field appearing in ForceSendFields will be sent to the 6581 // server regardless of whether the field is empty or not. This may be 6582 // used to include empty fields in Patch requests. 6583 ForceSendFields []string `json:"-"` 6584 6585 // NullFields is a list of field names (e.g. "JobConfig") to include in 6586 // API requests with the JSON null value. By default, fields with empty 6587 // values are omitted from API requests. However, any field with an 6588 // empty value appearing in NullFields will be sent to the server as 6589 // null. It is an error if a field in this list has a non-empty value. 6590 // This may be used to include null fields in Patch requests. 6591 NullFields []string `json:"-"` 6592} 6593 6594func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { 6595 type NoMethod GooglePrivacyDlpV2RequestedOptions 6596 raw := NoMethod(*s) 6597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6598} 6599 6600// GooglePrivacyDlpV2RequestedRiskAnalysisOptions: Risk analysis 6601// options. 6602type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { 6603 // JobConfig: The job config for the risk job. 6604 JobConfig *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` 6605 6606 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6607 // unconditionally include in API requests. By default, fields with 6608 // empty values are omitted from API requests. However, any non-pointer, 6609 // non-interface field appearing in ForceSendFields will be sent to the 6610 // server regardless of whether the field is empty or not. This may be 6611 // used to include empty fields in Patch requests. 6612 ForceSendFields []string `json:"-"` 6613 6614 // NullFields is a list of field names (e.g. "JobConfig") to include in 6615 // API requests with the JSON null value. By default, fields with empty 6616 // values are omitted from API requests. However, any field with an 6617 // empty value appearing in NullFields will be sent to the server as 6618 // null. It is an error if a field in this list has a non-empty value. 6619 // This may be used to include null fields in Patch requests. 6620 NullFields []string `json:"-"` 6621} 6622 6623func (s *GooglePrivacyDlpV2RequestedRiskAnalysisOptions) MarshalJSON() ([]byte, error) { 6624 type NoMethod GooglePrivacyDlpV2RequestedRiskAnalysisOptions 6625 raw := NoMethod(*s) 6626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6627} 6628 6629// GooglePrivacyDlpV2Result: All result fields mentioned below are 6630// updated while the job is processing. 6631type GooglePrivacyDlpV2Result struct { 6632 // HybridStats: Statistics related to the processing of hybrid inspect. 6633 // Early access feature is in a pre-release state and might change or 6634 // have limited support. For more information, see 6635 // https://cloud.google.com/products#product-launch-stages. 6636 HybridStats *GooglePrivacyDlpV2HybridInspectStatistics `json:"hybridStats,omitempty"` 6637 6638 // InfoTypeStats: Statistics of how many instances of each info type 6639 // were found during inspect job. 6640 InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` 6641 6642 // ProcessedBytes: Total size in bytes that were processed. 6643 ProcessedBytes int64 `json:"processedBytes,omitempty,string"` 6644 6645 // TotalEstimatedBytes: Estimate of the number of bytes to process. 6646 TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` 6647 6648 // ForceSendFields is a list of field names (e.g. "HybridStats") to 6649 // unconditionally include in API requests. By default, fields with 6650 // empty values are omitted from API requests. However, any non-pointer, 6651 // non-interface field appearing in ForceSendFields will be sent to the 6652 // server regardless of whether the field is empty or not. This may be 6653 // used to include empty fields in Patch requests. 6654 ForceSendFields []string `json:"-"` 6655 6656 // NullFields is a list of field names (e.g. "HybridStats") to include 6657 // in API requests with the JSON null value. By default, fields with 6658 // empty values are omitted from API requests. However, any field with 6659 // an empty value appearing in NullFields will be sent to the server as 6660 // null. It is an error if a field in this list has a non-empty value. 6661 // This may be used to include null fields in Patch requests. 6662 NullFields []string `json:"-"` 6663} 6664 6665func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { 6666 type NoMethod GooglePrivacyDlpV2Result 6667 raw := NoMethod(*s) 6668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6669} 6670 6671// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk 6672// analysis job. See 6673// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn 6674// more. 6675type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { 6676 // Actions: Actions to execute at the completion of the job. Are 6677 // executed in the order provided. 6678 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 6679 6680 // PrivacyMetric: Privacy metric to compute. 6681 PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` 6682 6683 // SourceTable: Input dataset to compute metrics over. 6684 SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` 6685 6686 // ForceSendFields is a list of field names (e.g. "Actions") to 6687 // unconditionally include in API requests. By default, fields with 6688 // empty values are omitted from API requests. However, any non-pointer, 6689 // non-interface field appearing in ForceSendFields will be sent to the 6690 // server regardless of whether the field is empty or not. This may be 6691 // used to include empty fields in Patch requests. 6692 ForceSendFields []string `json:"-"` 6693 6694 // NullFields is a list of field names (e.g. "Actions") to include in 6695 // API requests with the JSON null value. By default, fields with empty 6696 // values are omitted from API requests. However, any field with an 6697 // empty value appearing in NullFields will be sent to the server as 6698 // null. It is an error if a field in this list has a non-empty value. 6699 // This may be used to include null fields in Patch requests. 6700 NullFields []string `json:"-"` 6701} 6702 6703func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { 6704 type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig 6705 raw := NoMethod(*s) 6706 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6707} 6708 6709// GooglePrivacyDlpV2Row: Values of the row. 6710type GooglePrivacyDlpV2Row struct { 6711 // Values: Individual cells. 6712 Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` 6713 6714 // ForceSendFields is a list of field names (e.g. "Values") to 6715 // unconditionally include in API requests. By default, fields with 6716 // empty values are omitted from API requests. However, any non-pointer, 6717 // non-interface field appearing in ForceSendFields will be sent to the 6718 // server regardless of whether the field is empty or not. This may be 6719 // used to include empty fields in Patch requests. 6720 ForceSendFields []string `json:"-"` 6721 6722 // NullFields is a list of field names (e.g. "Values") to include in API 6723 // requests with the JSON null value. By default, fields with empty 6724 // values are omitted from API requests. However, any field with an 6725 // empty value appearing in NullFields will be sent to the server as 6726 // null. It is an error if a field in this list has a non-empty value. 6727 // This may be used to include null fields in Patch requests. 6728 NullFields []string `json:"-"` 6729} 6730 6731func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { 6732 type NoMethod GooglePrivacyDlpV2Row 6733 raw := NoMethod(*s) 6734 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6735} 6736 6737// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be 6738// persisted to the specified OutputStorageConfig. Only a single 6739// instance of this action can be specified. Compatible with: Inspect, 6740// Risk 6741type GooglePrivacyDlpV2SaveFindings struct { 6742 // OutputConfig: Location to store findings outside of DLP. 6743 OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` 6744 6745 // ForceSendFields is a list of field names (e.g. "OutputConfig") to 6746 // unconditionally include in API requests. By default, fields with 6747 // empty values are omitted from API requests. However, any non-pointer, 6748 // non-interface field appearing in ForceSendFields will be sent to the 6749 // server regardless of whether the field is empty or not. This may be 6750 // used to include empty fields in Patch requests. 6751 ForceSendFields []string `json:"-"` 6752 6753 // NullFields is a list of field names (e.g. "OutputConfig") to include 6754 // in API requests with the JSON null value. By default, fields with 6755 // empty values are omitted from API requests. However, any field with 6756 // an empty value appearing in NullFields will be sent to the server as 6757 // null. It is an error if a field in this list has a non-empty value. 6758 // This may be used to include null fields in Patch requests. 6759 NullFields []string `json:"-"` 6760} 6761 6762func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { 6763 type NoMethod GooglePrivacyDlpV2SaveFindings 6764 raw := NoMethod(*s) 6765 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6766} 6767 6768// GooglePrivacyDlpV2Schedule: Schedule for triggeredJobs. 6769type GooglePrivacyDlpV2Schedule struct { 6770 // RecurrencePeriodDuration: With this option a job is started a regular 6771 // periodic basis. For example: every day (86400 seconds). A scheduled 6772 // start time will be skipped if the previous execution has not ended 6773 // when its scheduled time occurs. This value must be set to a time 6774 // duration greater than or equal to 1 day and can be no longer than 60 6775 // days. 6776 RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` 6777 6778 // ForceSendFields is a list of field names (e.g. 6779 // "RecurrencePeriodDuration") to unconditionally include in API 6780 // requests. By default, fields with empty values are omitted from API 6781 // requests. However, any non-pointer, non-interface field appearing in 6782 // ForceSendFields will be sent to the server regardless of whether the 6783 // field is empty or not. This may be used to include empty fields in 6784 // Patch requests. 6785 ForceSendFields []string `json:"-"` 6786 6787 // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") 6788 // to include in API requests with the JSON null value. By default, 6789 // fields with empty values are omitted from API requests. However, any 6790 // field with an empty value appearing in NullFields will be sent to the 6791 // server as null. It is an error if a field in this list has a 6792 // non-empty value. This may be used to include null fields in Patch 6793 // requests. 6794 NullFields []string `json:"-"` 6795} 6796 6797func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { 6798 type NoMethod GooglePrivacyDlpV2Schedule 6799 raw := NoMethod(*s) 6800 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6801} 6802 6803// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing 6804// statistical information on the relative frequency of different 6805// quasi-identifiers values. It has one or several quasi-identifiers 6806// columns, and one column that indicates the relative frequency of each 6807// quasi-identifier tuple. If a tuple is present in the data but not in 6808// the auxiliary table, the corresponding relative frequency is assumed 6809// to be zero (and thus, the tuple is highly reidentifiable). 6810type GooglePrivacyDlpV2StatisticalTable struct { 6811 // QuasiIds: Required. Quasi-identifier columns. 6812 QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` 6813 6814 // RelativeFrequency: Required. The relative frequency column must 6815 // contain a floating-point number between 0 and 1 (inclusive). Null 6816 // values are assumed to be zero. 6817 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 6818 6819 // Table: Required. Auxiliary table location. 6820 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 6821 6822 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 6823 // unconditionally include in API requests. By default, fields with 6824 // empty values are omitted from API requests. However, any non-pointer, 6825 // non-interface field appearing in ForceSendFields will be sent to the 6826 // server regardless of whether the field is empty or not. This may be 6827 // used to include empty fields in Patch requests. 6828 ForceSendFields []string `json:"-"` 6829 6830 // NullFields is a list of field names (e.g. "QuasiIds") to include in 6831 // API requests with the JSON null value. By default, fields with empty 6832 // values are omitted from API requests. However, any field with an 6833 // empty value appearing in NullFields will be sent to the server as 6834 // null. It is an error if a field in this list has a non-empty value. 6835 // This may be used to include null fields in Patch requests. 6836 NullFields []string `json:"-"` 6837} 6838 6839func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { 6840 type NoMethod GooglePrivacyDlpV2StatisticalTable 6841 raw := NoMethod(*s) 6842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6843} 6844 6845// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud 6846// storage type. 6847type GooglePrivacyDlpV2StorageConfig struct { 6848 // BigQueryOptions: BigQuery options. 6849 BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` 6850 6851 // CloudStorageOptions: Google Cloud Storage options. 6852 CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` 6853 6854 // DatastoreOptions: Google Cloud Datastore options. 6855 DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` 6856 6857 // HybridOptions: Hybrid inspection options. Early access feature is in 6858 // a pre-release state and might change or have limited support. For 6859 // more information, see 6860 // https://cloud.google.com/products#product-launch-stages. 6861 HybridOptions *GooglePrivacyDlpV2HybridOptions `json:"hybridOptions,omitempty"` 6862 6863 TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` 6864 6865 // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to 6866 // unconditionally include in API requests. By default, fields with 6867 // empty values are omitted from API requests. However, any non-pointer, 6868 // non-interface field appearing in ForceSendFields will be sent to the 6869 // server regardless of whether the field is empty or not. This may be 6870 // used to include empty fields in Patch requests. 6871 ForceSendFields []string `json:"-"` 6872 6873 // NullFields is a list of field names (e.g. "BigQueryOptions") to 6874 // include in API requests with the JSON null value. By default, fields 6875 // with empty values are omitted from API requests. However, any field 6876 // with an empty value appearing in NullFields will be sent to the 6877 // server as null. It is an error if a field in this list has a 6878 // non-empty value. This may be used to include null fields in Patch 6879 // requests. 6880 NullFields []string `json:"-"` 6881} 6882 6883func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { 6884 type NoMethod GooglePrivacyDlpV2StorageConfig 6885 raw := NoMethod(*s) 6886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6887} 6888 6889// GooglePrivacyDlpV2StorageMetadataLabel: Storage metadata label to 6890// indicate which metadata entry contains findings. 6891type GooglePrivacyDlpV2StorageMetadataLabel struct { 6892 Key string `json:"key,omitempty"` 6893 6894 // ForceSendFields is a list of field names (e.g. "Key") to 6895 // unconditionally include in API requests. By default, fields with 6896 // empty values are omitted from API requests. However, any non-pointer, 6897 // non-interface field appearing in ForceSendFields will be sent to the 6898 // server regardless of whether the field is empty or not. This may be 6899 // used to include empty fields in Patch requests. 6900 ForceSendFields []string `json:"-"` 6901 6902 // NullFields is a list of field names (e.g. "Key") to include in API 6903 // requests with the JSON null value. By default, fields with empty 6904 // values are omitted from API requests. However, any field with an 6905 // empty value appearing in NullFields will be sent to the server as 6906 // null. It is an error if a field in this list has a non-empty value. 6907 // This may be used to include null fields in Patch requests. 6908 NullFields []string `json:"-"` 6909} 6910 6911func (s *GooglePrivacyDlpV2StorageMetadataLabel) MarshalJSON() ([]byte, error) { 6912 type NoMethod GooglePrivacyDlpV2StorageMetadataLabel 6913 raw := NoMethod(*s) 6914 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6915} 6916 6917// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message 6918// that contains information about the current version and any pending 6919// updates. 6920type GooglePrivacyDlpV2StoredInfoType struct { 6921 // CurrentVersion: Current version of the stored info type. 6922 CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` 6923 6924 // Name: Resource name. 6925 Name string `json:"name,omitempty"` 6926 6927 // PendingVersions: Pending versions of the stored info type. Empty if 6928 // no versions are pending. 6929 PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` 6930 6931 // ServerResponse contains the HTTP response code and headers from the 6932 // server. 6933 googleapi.ServerResponse `json:"-"` 6934 6935 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to 6936 // unconditionally include in API requests. By default, fields with 6937 // empty values are omitted from API requests. However, any non-pointer, 6938 // non-interface field appearing in ForceSendFields will be sent to the 6939 // server regardless of whether the field is empty or not. This may be 6940 // used to include empty fields in Patch requests. 6941 ForceSendFields []string `json:"-"` 6942 6943 // NullFields is a list of field names (e.g. "CurrentVersion") to 6944 // include in API requests with the JSON null value. By default, fields 6945 // with empty values are omitted from API requests. However, any field 6946 // with an empty value appearing in NullFields will be sent to the 6947 // server as null. It is an error if a field in this list has a 6948 // non-empty value. This may be used to include null fields in Patch 6949 // requests. 6950 NullFields []string `json:"-"` 6951} 6952 6953func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { 6954 type NoMethod GooglePrivacyDlpV2StoredInfoType 6955 raw := NoMethod(*s) 6956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6957} 6958 6959// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for stored 6960// infoTypes. All fields and subfield are provided by the user. For more 6961// information, see 6962// https://cloud.google.com/dlp/docs/creating-custom-infotypes. 6963type GooglePrivacyDlpV2StoredInfoTypeConfig struct { 6964 // Description: Description of the StoredInfoType (max 256 characters). 6965 Description string `json:"description,omitempty"` 6966 6967 // Dictionary: Store dictionary-based CustomInfoType. 6968 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 6969 6970 // DisplayName: Display name of the StoredInfoType (max 256 characters). 6971 DisplayName string `json:"displayName,omitempty"` 6972 6973 // LargeCustomDictionary: StoredInfoType where findings are defined by a 6974 // dictionary of phrases. 6975 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` 6976 6977 // Regex: Store regular expression-based StoredInfoType. 6978 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 6979 6980 // ForceSendFields is a list of field names (e.g. "Description") to 6981 // unconditionally include in API requests. By default, fields with 6982 // empty values are omitted from API requests. However, any non-pointer, 6983 // non-interface field appearing in ForceSendFields will be sent to the 6984 // server regardless of whether the field is empty or not. This may be 6985 // used to include empty fields in Patch requests. 6986 ForceSendFields []string `json:"-"` 6987 6988 // NullFields is a list of field names (e.g. "Description") to include 6989 // in API requests with the JSON null value. By default, fields with 6990 // empty values are omitted from API requests. However, any field with 6991 // an empty value appearing in NullFields will be sent to the server as 6992 // null. It is an error if a field in this list has a non-empty value. 6993 // This may be used to include null fields in Patch requests. 6994 NullFields []string `json:"-"` 6995} 6996 6997func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { 6998 type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig 6999 raw := NoMethod(*s) 7000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7001} 7002 7003// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a 7004// StoredInfoType. 7005type GooglePrivacyDlpV2StoredInfoTypeStats struct { 7006 // LargeCustomDictionary: StoredInfoType where findings are defined by a 7007 // dictionary of phrases. 7008 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` 7009 7010 // ForceSendFields is a list of field names (e.g. 7011 // "LargeCustomDictionary") to unconditionally include in API requests. 7012 // By default, fields with empty values are omitted from API requests. 7013 // However, any non-pointer, non-interface field appearing in 7014 // ForceSendFields will be sent to the server regardless of whether the 7015 // field is empty or not. This may be used to include empty fields in 7016 // Patch requests. 7017 ForceSendFields []string `json:"-"` 7018 7019 // NullFields is a list of field names (e.g. "LargeCustomDictionary") to 7020 // include in API requests with the JSON null value. By default, fields 7021 // with empty values are omitted from API requests. However, any field 7022 // with an empty value appearing in NullFields will be sent to the 7023 // server as null. It is an error if a field in this list has a 7024 // non-empty value. This may be used to include null fields in Patch 7025 // requests. 7026 NullFields []string `json:"-"` 7027} 7028 7029func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { 7030 type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats 7031 raw := NoMethod(*s) 7032 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7033} 7034 7035// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, 7036// including the configuration used to build it, create timestamp, and 7037// current state. 7038type GooglePrivacyDlpV2StoredInfoTypeVersion struct { 7039 // Config: StoredInfoType configuration. 7040 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7041 7042 // CreateTime: Create timestamp of the version. Read-only, determined by 7043 // the system when the version is created. 7044 CreateTime string `json:"createTime,omitempty"` 7045 7046 // Errors: Errors that occurred when creating this storedInfoType 7047 // version, or anomalies detected in the storedInfoType data that render 7048 // it unusable. Only the five most recent errors will be displayed, with 7049 // the most recent error appearing first. For example, some of the data 7050 // for stored custom dictionaries is put in the user's Google Cloud 7051 // Storage bucket, and if this data is modified or deleted by the user 7052 // or another system, the dictionary becomes invalid. If any errors 7053 // occur, fix the problem indicated by the error message and use the 7054 // UpdateStoredInfoType API method to create another version of the 7055 // storedInfoType to continue using it, reusing the same `config` if it 7056 // was not the source of the error. 7057 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 7058 7059 // State: Stored info type version state. Read-only, updated by the 7060 // system during dictionary creation. 7061 // 7062 // Possible values: 7063 // "STORED_INFO_TYPE_STATE_UNSPECIFIED" - Unused 7064 // "PENDING" - StoredInfoType version is being created. 7065 // "READY" - StoredInfoType version is ready for use. 7066 // "FAILED" - StoredInfoType creation failed. All relevant error 7067 // messages are returned in the `StoredInfoTypeVersion` message. 7068 // "INVALID" - StoredInfoType is no longer valid because artifacts 7069 // stored in user-controlled storage were modified. To fix an invalid 7070 // StoredInfoType, use the `UpdateStoredInfoType` method to create a new 7071 // version. 7072 State string `json:"state,omitempty"` 7073 7074 // Stats: Statistics about this storedInfoType version. 7075 Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` 7076 7077 // ForceSendFields is a list of field names (e.g. "Config") to 7078 // unconditionally include in API requests. By default, fields with 7079 // empty values are omitted from API requests. However, any non-pointer, 7080 // non-interface field appearing in ForceSendFields will be sent to the 7081 // server regardless of whether the field is empty or not. This may be 7082 // used to include empty fields in Patch requests. 7083 ForceSendFields []string `json:"-"` 7084 7085 // NullFields is a list of field names (e.g. "Config") to include in API 7086 // requests with the JSON null value. By default, fields with empty 7087 // values are omitted from API requests. However, any field with an 7088 // empty value appearing in NullFields will be sent to the server as 7089 // null. It is an error if a field in this list has a non-empty value. 7090 // This may be used to include null fields in Patch requests. 7091 NullFields []string `json:"-"` 7092} 7093 7094func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { 7095 type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion 7096 raw := NoMethod(*s) 7097 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7098} 7099 7100// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use 7101// with scanning. 7102type GooglePrivacyDlpV2StoredType struct { 7103 // CreateTime: Timestamp indicating when the version of the 7104 // `StoredInfoType` used for inspection was created. Output-only field, 7105 // populated by the system. 7106 CreateTime string `json:"createTime,omitempty"` 7107 7108 // Name: Resource name of the requested `StoredInfoType`, for example 7109 // `organizations/433245324/storedInfoTypes/432452342` or 7110 // `projects/project-id/storedInfoTypes/432452342`. 7111 Name string `json:"name,omitempty"` 7112 7113 // ForceSendFields is a list of field names (e.g. "CreateTime") to 7114 // unconditionally include in API requests. By default, fields with 7115 // empty values are omitted from API requests. However, any non-pointer, 7116 // non-interface field appearing in ForceSendFields will be sent to the 7117 // server regardless of whether the field is empty or not. This may be 7118 // used to include empty fields in Patch requests. 7119 ForceSendFields []string `json:"-"` 7120 7121 // NullFields is a list of field names (e.g. "CreateTime") to include in 7122 // API requests with the JSON null value. By default, fields with empty 7123 // values are omitted from API requests. However, any field with an 7124 // empty value appearing in NullFields will be sent to the server as 7125 // null. It is an error if a field in this list has a non-empty value. 7126 // This may be used to include null fields in Patch requests. 7127 NullFields []string `json:"-"` 7128} 7129 7130func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { 7131 type NoMethod GooglePrivacyDlpV2StoredType 7132 raw := NoMethod(*s) 7133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7134} 7135 7136// GooglePrivacyDlpV2SummaryResult: A collection that informs the user 7137// the number of times a particular `TransformationResultCode` and error 7138// details occurred. 7139type GooglePrivacyDlpV2SummaryResult struct { 7140 // Code: Outcome of the transformation. 7141 // 7142 // Possible values: 7143 // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - Unused 7144 // "SUCCESS" - Transformation completed without an error. 7145 // "ERROR" - Transformation had an error. 7146 Code string `json:"code,omitempty"` 7147 7148 // Count: Number of transformations counted by this result. 7149 Count int64 `json:"count,omitempty,string"` 7150 7151 // Details: A place for warnings or errors to show up if a 7152 // transformation didn't work as expected. 7153 Details string `json:"details,omitempty"` 7154 7155 // ForceSendFields is a list of field names (e.g. "Code") to 7156 // unconditionally include in API requests. By default, fields with 7157 // empty values are omitted from API requests. However, any non-pointer, 7158 // non-interface field appearing in ForceSendFields will be sent to the 7159 // server regardless of whether the field is empty or not. This may be 7160 // used to include empty fields in Patch requests. 7161 ForceSendFields []string `json:"-"` 7162 7163 // NullFields is a list of field names (e.g. "Code") to include in API 7164 // requests with the JSON null value. By default, fields with empty 7165 // values are omitted from API requests. However, any field with an 7166 // empty value appearing in NullFields will be sent to the server as 7167 // null. It is an error if a field in this list has a non-empty value. 7168 // This may be used to include null fields in Patch requests. 7169 NullFields []string `json:"-"` 7170} 7171 7172func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { 7173 type NoMethod GooglePrivacyDlpV2SummaryResult 7174 raw := NoMethod(*s) 7175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7176} 7177 7178// GooglePrivacyDlpV2SurrogateType: Message for detecting output from 7179// deidentification transformations such as 7180// [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/refere 7181// nce/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfi 7182// g). These types of transformations are those that perform 7183// pseudonymization, thereby producing a "surrogate" as output. This 7184// should be used in conjunction with a field on the transformation such 7185// as `surrogate_info_type`. This CustomInfoType does not support the 7186// use of `detection_rules`. 7187type GooglePrivacyDlpV2SurrogateType struct { 7188} 7189 7190// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 7191// `Value`s per request allowed. See 7192// https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 7193// to learn more. 7194type GooglePrivacyDlpV2Table struct { 7195 // Headers: Headers of the table. 7196 Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` 7197 7198 // Rows: Rows of the table. 7199 Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` 7200 7201 // ForceSendFields is a list of field names (e.g. "Headers") to 7202 // unconditionally include in API requests. By default, fields with 7203 // empty values are omitted from API requests. However, any non-pointer, 7204 // non-interface field appearing in ForceSendFields will be sent to the 7205 // server regardless of whether the field is empty or not. This may be 7206 // used to include empty fields in Patch requests. 7207 ForceSendFields []string `json:"-"` 7208 7209 // NullFields is a list of field names (e.g. "Headers") to include in 7210 // API requests with the JSON null value. By default, fields with empty 7211 // values are omitted from API requests. However, any field with an 7212 // empty value appearing in NullFields will be sent to the server as 7213 // null. It is an error if a field in this list has a non-empty value. 7214 // This may be used to include null fields in Patch requests. 7215 NullFields []string `json:"-"` 7216} 7217 7218func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { 7219 type NoMethod GooglePrivacyDlpV2Table 7220 raw := NoMethod(*s) 7221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7222} 7223 7224// GooglePrivacyDlpV2TableLocation: Location of a finding within a 7225// table. 7226type GooglePrivacyDlpV2TableLocation struct { 7227 // RowIndex: The zero-based index of the row where the finding is 7228 // located. Only populated for resources that have a natural ordering, 7229 // not BigQuery. In BigQuery, to identify the row a finding came from, 7230 // populate BigQueryOptions.identifying_fields with your primary key 7231 // column names and when you store the findings the value of those 7232 // columns will be stored inside of Finding. 7233 RowIndex int64 `json:"rowIndex,omitempty,string"` 7234 7235 // ForceSendFields is a list of field names (e.g. "RowIndex") to 7236 // unconditionally include in API requests. By default, fields with 7237 // empty values are omitted from API requests. However, any non-pointer, 7238 // non-interface field appearing in ForceSendFields will be sent to the 7239 // server regardless of whether the field is empty or not. This may be 7240 // used to include empty fields in Patch requests. 7241 ForceSendFields []string `json:"-"` 7242 7243 // NullFields is a list of field names (e.g. "RowIndex") to include in 7244 // API requests with the JSON null value. By default, fields with empty 7245 // values are omitted from API requests. However, any field with an 7246 // empty value appearing in NullFields will be sent to the server as 7247 // null. It is an error if a field in this list has a non-empty value. 7248 // This may be used to include null fields in Patch requests. 7249 NullFields []string `json:"-"` 7250} 7251 7252func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { 7253 type NoMethod GooglePrivacyDlpV2TableLocation 7254 raw := NoMethod(*s) 7255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7256} 7257 7258// GooglePrivacyDlpV2TableOptions: Instructions regarding the table 7259// content being inspected. 7260type GooglePrivacyDlpV2TableOptions struct { 7261 // IdentifyingFields: The columns that are the primary keys for table 7262 // objects included in ContentItem. A copy of this cell's value will 7263 // stored alongside alongside each finding so that the finding can be 7264 // traced to the specific row it came from. No more than 3 may be 7265 // provided. 7266 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 7267 7268 // ForceSendFields is a list of field names (e.g. "IdentifyingFields") 7269 // to unconditionally include in API requests. By default, fields with 7270 // empty values are omitted from API requests. However, any non-pointer, 7271 // non-interface field appearing in ForceSendFields will be sent to the 7272 // server regardless of whether the field is empty or not. This may be 7273 // used to include empty fields in Patch requests. 7274 ForceSendFields []string `json:"-"` 7275 7276 // NullFields is a list of field names (e.g. "IdentifyingFields") to 7277 // include in API requests with the JSON null value. By default, fields 7278 // with empty values are omitted from API requests. However, any field 7279 // with an empty value appearing in NullFields will be sent to the 7280 // server as null. It is an error if a field in this list has a 7281 // non-empty value. This may be used to include null fields in Patch 7282 // requests. 7283 NullFields []string `json:"-"` 7284} 7285 7286func (s *GooglePrivacyDlpV2TableOptions) MarshalJSON() ([]byte, error) { 7287 type NoMethod GooglePrivacyDlpV2TableOptions 7288 raw := NoMethod(*s) 7289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7290} 7291 7292// GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. 7293type GooglePrivacyDlpV2TaggedField struct { 7294 // CustomTag: A column can be tagged with a custom tag. In this case, 7295 // the user must indicate an auxiliary table that contains statistical 7296 // information on the possible values of this column (below). 7297 CustomTag string `json:"customTag,omitempty"` 7298 7299 // Field: Required. Identifies the column. 7300 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7301 7302 // Inferred: If no semantic tag is indicated, we infer the statistical 7303 // model from the distribution of values in the input data 7304 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 7305 7306 // InfoType: A column can be tagged with a InfoType to use the relevant 7307 // public dataset as a statistical model of population, if available. We 7308 // currently support US ZIP codes, region codes, ages and genders. To 7309 // programmatically obtain the list of supported InfoTypes, use 7310 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 7311 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7312 7313 // ForceSendFields is a list of field names (e.g. "CustomTag") to 7314 // unconditionally include in API requests. By default, fields with 7315 // empty values are omitted from API requests. However, any non-pointer, 7316 // non-interface field appearing in ForceSendFields will be sent to the 7317 // server regardless of whether the field is empty or not. This may be 7318 // used to include empty fields in Patch requests. 7319 ForceSendFields []string `json:"-"` 7320 7321 // NullFields is a list of field names (e.g. "CustomTag") to include in 7322 // API requests with the JSON null value. By default, fields with empty 7323 // values are omitted from API requests. However, any field with an 7324 // empty value appearing in NullFields will be sent to the server as 7325 // null. It is an error if a field in this list has a non-empty value. 7326 // This may be used to include null fields in Patch requests. 7327 NullFields []string `json:"-"` 7328} 7329 7330func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { 7331 type NoMethod GooglePrivacyDlpV2TaggedField 7332 raw := NoMethod(*s) 7333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7334} 7335 7336// GooglePrivacyDlpV2ThrowError: Throw an error and fail the request 7337// when a transformation error occurs. 7338type GooglePrivacyDlpV2ThrowError struct { 7339} 7340 7341// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, 7342// and `TimeOfDay`, extract or preserve a portion of the value. 7343type GooglePrivacyDlpV2TimePartConfig struct { 7344 // PartToExtract: The part of the time to keep. 7345 // 7346 // Possible values: 7347 // "TIME_PART_UNSPECIFIED" - Unused 7348 // "YEAR" - [0-9999] 7349 // "MONTH" - [1-12] 7350 // "DAY_OF_MONTH" - [1-31] 7351 // "DAY_OF_WEEK" - [1-7] 7352 // "WEEK_OF_YEAR" - [1-53] 7353 // "HOUR_OF_DAY" - [0-23] 7354 PartToExtract string `json:"partToExtract,omitempty"` 7355 7356 // ForceSendFields is a list of field names (e.g. "PartToExtract") to 7357 // unconditionally include in API requests. By default, fields with 7358 // empty values are omitted from API requests. However, any non-pointer, 7359 // non-interface field appearing in ForceSendFields will be sent to the 7360 // server regardless of whether the field is empty or not. This may be 7361 // used to include empty fields in Patch requests. 7362 ForceSendFields []string `json:"-"` 7363 7364 // NullFields is a list of field names (e.g. "PartToExtract") to include 7365 // in API requests with the JSON null value. By default, fields with 7366 // empty values are omitted from API requests. However, any field with 7367 // an empty value appearing in NullFields will be sent to the server as 7368 // null. It is an error if a field in this list has a non-empty value. 7369 // This may be used to include null fields in Patch requests. 7370 NullFields []string `json:"-"` 7371} 7372 7373func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { 7374 type NoMethod GooglePrivacyDlpV2TimePartConfig 7375 raw := NoMethod(*s) 7376 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7377} 7378 7379// GooglePrivacyDlpV2TimeZone: Time zone of the date time object. 7380type GooglePrivacyDlpV2TimeZone struct { 7381 // OffsetMinutes: Set only if the offset can be determined. Positive for 7382 // time ahead of UTC. E.g. For "UTC-9", this value is -540. 7383 OffsetMinutes int64 `json:"offsetMinutes,omitempty"` 7384 7385 // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to 7386 // unconditionally include in API requests. By default, fields with 7387 // empty values are omitted from API requests. However, any non-pointer, 7388 // non-interface field appearing in ForceSendFields will be sent to the 7389 // server regardless of whether the field is empty or not. This may be 7390 // used to include empty fields in Patch requests. 7391 ForceSendFields []string `json:"-"` 7392 7393 // NullFields is a list of field names (e.g. "OffsetMinutes") to include 7394 // in API requests with the JSON null value. By default, fields with 7395 // empty values are omitted from API requests. However, any field with 7396 // an empty value appearing in NullFields will be sent to the server as 7397 // null. It is an error if a field in this list has a non-empty value. 7398 // This may be used to include null fields in Patch requests. 7399 NullFields []string `json:"-"` 7400} 7401 7402func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { 7403 type NoMethod GooglePrivacyDlpV2TimeZone 7404 raw := NoMethod(*s) 7405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7406} 7407 7408// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of 7409// the items to include in scanning. Currently only supported when 7410// inspecting Google Cloud Storage and BigQuery. 7411type GooglePrivacyDlpV2TimespanConfig struct { 7412 // EnableAutoPopulationOfTimespanConfig: When the job is started by a 7413 // JobTrigger we will automatically figure out a valid start_time to 7414 // avoid scanning files that have not been modified since the last time 7415 // the JobTrigger executed. This will be based on the time of the 7416 // execution of the last run of the JobTrigger. 7417 EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` 7418 7419 // EndTime: Exclude files, tables, or rows newer than this value. If not 7420 // set, no upper time limit is applied. 7421 EndTime string `json:"endTime,omitempty"` 7422 7423 // StartTime: Exclude files, tables, or rows older than this value. If 7424 // not set, no lower time limit is applied. 7425 StartTime string `json:"startTime,omitempty"` 7426 7427 // TimestampField: Specification of the field containing the timestamp 7428 // of scanned items. Used for data sources like Datastore and BigQuery. 7429 // For BigQuery: If this value is not specified and the table was 7430 // modified between the given start and end times, the entire table will 7431 // be scanned. If this value is specified, then rows are filtered based 7432 // on the given start and end times. Rows with a `NULL` value in the 7433 // provided BigQuery column are skipped. Valid data types of the 7434 // provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and 7435 // `DATETIME`. For Datastore: If this value is specified, then entities 7436 // are filtered based on the given start and end times. If an entity 7437 // does not contain the provided timestamp property or contains empty or 7438 // invalid values, then it is included. Valid data types of the provided 7439 // timestamp property are: `TIMESTAMP`. 7440 TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` 7441 7442 // ForceSendFields is a list of field names (e.g. 7443 // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in 7444 // API requests. By default, fields with empty values are omitted from 7445 // API requests. However, any non-pointer, non-interface field appearing 7446 // in ForceSendFields will be sent to the server regardless of whether 7447 // the field is empty or not. This may be used to include empty fields 7448 // in Patch requests. 7449 ForceSendFields []string `json:"-"` 7450 7451 // NullFields is a list of field names (e.g. 7452 // "EnableAutoPopulationOfTimespanConfig") to include in API requests 7453 // with the JSON null value. By default, fields with empty values are 7454 // omitted from API requests. However, any field with an empty value 7455 // appearing in NullFields will be sent to the server as null. It is an 7456 // error if a field in this list has a non-empty value. This may be used 7457 // to include null fields in Patch requests. 7458 NullFields []string `json:"-"` 7459} 7460 7461func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { 7462 type NoMethod GooglePrivacyDlpV2TimespanConfig 7463 raw := NoMethod(*s) 7464 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7465} 7466 7467// GooglePrivacyDlpV2TransformationErrorHandling: How to handle 7468// transformation errors during de-identification. A transformation 7469// error occurs when the requested transformation is incompatible with 7470// the data. For example, trying to de-identify an IP address using a 7471// `DateShift` transformation would result in a transformation error, 7472// since date info cannot be extracted from an IP address. Information 7473// about any incompatible transformations, and how they were handled, is 7474// returned in the response as part of the `TransformationOverviews`. 7475type GooglePrivacyDlpV2TransformationErrorHandling struct { 7476 // LeaveUntransformed: Ignore errors 7477 LeaveUntransformed *GooglePrivacyDlpV2LeaveUntransformed `json:"leaveUntransformed,omitempty"` 7478 7479 // ThrowError: Throw an error 7480 ThrowError *GooglePrivacyDlpV2ThrowError `json:"throwError,omitempty"` 7481 7482 // ForceSendFields is a list of field names (e.g. "LeaveUntransformed") 7483 // to unconditionally include in API requests. By default, fields with 7484 // empty values are omitted from API requests. However, any non-pointer, 7485 // non-interface field appearing in ForceSendFields will be sent to the 7486 // server regardless of whether the field is empty or not. This may be 7487 // used to include empty fields in Patch requests. 7488 ForceSendFields []string `json:"-"` 7489 7490 // NullFields is a list of field names (e.g. "LeaveUntransformed") to 7491 // include in API requests with the JSON null value. By default, fields 7492 // with empty values are omitted from API requests. However, any field 7493 // with an empty value appearing in NullFields will be sent to the 7494 // server as null. It is an error if a field in this list has a 7495 // non-empty value. This may be used to include null fields in Patch 7496 // requests. 7497 NullFields []string `json:"-"` 7498} 7499 7500func (s *GooglePrivacyDlpV2TransformationErrorHandling) MarshalJSON() ([]byte, error) { 7501 type NoMethod GooglePrivacyDlpV2TransformationErrorHandling 7502 raw := NoMethod(*s) 7503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7504} 7505 7506// GooglePrivacyDlpV2TransformationOverview: Overview of the 7507// modifications that occurred. 7508type GooglePrivacyDlpV2TransformationOverview struct { 7509 // TransformationSummaries: Transformations applied to the dataset. 7510 TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` 7511 7512 // TransformedBytes: Total size in bytes that were transformed in some 7513 // way. 7514 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7515 7516 // ForceSendFields is a list of field names (e.g. 7517 // "TransformationSummaries") to unconditionally include in API 7518 // requests. By default, fields with empty values are omitted from API 7519 // requests. However, any non-pointer, non-interface field appearing in 7520 // ForceSendFields will be sent to the server regardless of whether the 7521 // field is empty or not. This may be used to include empty fields in 7522 // Patch requests. 7523 ForceSendFields []string `json:"-"` 7524 7525 // NullFields is a list of field names (e.g. "TransformationSummaries") 7526 // to include in API requests with the JSON null value. By default, 7527 // fields with empty values are omitted from API requests. However, any 7528 // field with an empty value appearing in NullFields will be sent to the 7529 // server as null. It is an error if a field in this list has a 7530 // non-empty value. This may be used to include null fields in Patch 7531 // requests. 7532 NullFields []string `json:"-"` 7533} 7534 7535func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { 7536 type NoMethod GooglePrivacyDlpV2TransformationOverview 7537 raw := NoMethod(*s) 7538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7539} 7540 7541// GooglePrivacyDlpV2TransformationSummary: Summary of a single 7542// transformation. Only one of 'transformation', 'field_transformation', 7543// or 'record_suppress' will be set. 7544type GooglePrivacyDlpV2TransformationSummary struct { 7545 // Field: Set if the transformation was limited to a specific FieldId. 7546 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7547 7548 // FieldTransformations: The field transformation that was applied. If 7549 // multiple field transformations are requested for a single field, this 7550 // list will contain all of them; otherwise, only one is supplied. 7551 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 7552 7553 // InfoType: Set if the transformation was limited to a specific 7554 // InfoType. 7555 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7556 7557 // RecordSuppress: The specific suppression option these stats apply to. 7558 RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` 7559 7560 // Results: Collection of all transformations that took place or had an 7561 // error. 7562 Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` 7563 7564 // Transformation: The specific transformation these stats apply to. 7565 Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` 7566 7567 // TransformedBytes: Total size in bytes that were transformed in some 7568 // way. 7569 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7570 7571 // ForceSendFields is a list of field names (e.g. "Field") to 7572 // unconditionally include in API requests. By default, fields with 7573 // empty values are omitted from API requests. However, any non-pointer, 7574 // non-interface field appearing in ForceSendFields will be sent to the 7575 // server regardless of whether the field is empty or not. This may be 7576 // used to include empty fields in Patch requests. 7577 ForceSendFields []string `json:"-"` 7578 7579 // NullFields is a list of field names (e.g. "Field") to include in API 7580 // requests with the JSON null value. By default, fields with empty 7581 // values are omitted from API requests. However, any field with an 7582 // empty value appearing in NullFields will be sent to the server as 7583 // null. It is an error if a field in this list has a non-empty value. 7584 // This may be used to include null fields in Patch requests. 7585 NullFields []string `json:"-"` 7586} 7587 7588func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { 7589 type NoMethod GooglePrivacyDlpV2TransformationSummary 7590 raw := NoMethod(*s) 7591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7592} 7593 7594// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data 7595// crypto key generated. It will be discarded after the request 7596// finishes. 7597type GooglePrivacyDlpV2TransientCryptoKey struct { 7598 // Name: Required. Name of the key. This is an arbitrary string used to 7599 // differentiate different keys. A unique key is generated per name: two 7600 // separate `TransientCryptoKey` protos share the same generated key if 7601 // their names are the same. When the data crypto key is generated, this 7602 // name is not used in any way (repeating the api call will result in a 7603 // different key being generated). 7604 Name string `json:"name,omitempty"` 7605 7606 // ForceSendFields is a list of field names (e.g. "Name") to 7607 // unconditionally include in API requests. By default, fields with 7608 // empty values are omitted from API requests. However, any non-pointer, 7609 // non-interface field appearing in ForceSendFields will be sent to the 7610 // server regardless of whether the field is empty or not. This may be 7611 // used to include empty fields in Patch requests. 7612 ForceSendFields []string `json:"-"` 7613 7614 // NullFields is a list of field names (e.g. "Name") to include in API 7615 // requests with the JSON null value. By default, fields with empty 7616 // values are omitted from API requests. However, any field with an 7617 // empty value appearing in NullFields will be sent to the server as 7618 // null. It is an error if a field in this list has a non-empty value. 7619 // This may be used to include null fields in Patch requests. 7620 NullFields []string `json:"-"` 7621} 7622 7623func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { 7624 type NoMethod GooglePrivacyDlpV2TransientCryptoKey 7625 raw := NoMethod(*s) 7626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7627} 7628 7629// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to 7630// be started. 7631type GooglePrivacyDlpV2Trigger struct { 7632 // Manual: For use with hybrid jobs. Jobs must be manually created and 7633 // finished. Early access feature is in a pre-release state and might 7634 // change or have limited support. For more information, see 7635 // https://cloud.google.com/products#product-launch-stages. 7636 Manual *GooglePrivacyDlpV2Manual `json:"manual,omitempty"` 7637 7638 // Schedule: Create a job on a repeating basis based on the elapse of 7639 // time. 7640 Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` 7641 7642 // ForceSendFields is a list of field names (e.g. "Manual") to 7643 // unconditionally include in API requests. By default, fields with 7644 // empty values are omitted from API requests. However, any non-pointer, 7645 // non-interface field appearing in ForceSendFields will be sent to the 7646 // server regardless of whether the field is empty or not. This may be 7647 // used to include empty fields in Patch requests. 7648 ForceSendFields []string `json:"-"` 7649 7650 // NullFields is a list of field names (e.g. "Manual") to include in API 7651 // requests with the JSON null value. By default, fields with empty 7652 // values are omitted from API requests. However, any field with an 7653 // empty value appearing in NullFields will be sent to the server as 7654 // null. It is an error if a field in this list has a non-empty value. 7655 // This may be used to include null fields in Patch requests. 7656 NullFields []string `json:"-"` 7657} 7658 7659func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { 7660 type NoMethod GooglePrivacyDlpV2Trigger 7661 raw := NoMethod(*s) 7662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7663} 7664 7665// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to 7666// security risks due to accidentally leaking the key. Choose another 7667// type of key if possible. 7668type GooglePrivacyDlpV2UnwrappedCryptoKey struct { 7669 // Key: Required. A 128/192/256 bit key. 7670 Key string `json:"key,omitempty"` 7671 7672 // ForceSendFields is a list of field names (e.g. "Key") to 7673 // unconditionally include in API requests. By default, fields with 7674 // empty values are omitted from API requests. However, any non-pointer, 7675 // non-interface field appearing in ForceSendFields will be sent to the 7676 // server regardless of whether the field is empty or not. This may be 7677 // used to include empty fields in Patch requests. 7678 ForceSendFields []string `json:"-"` 7679 7680 // NullFields is a list of field names (e.g. "Key") to include in API 7681 // requests with the JSON null value. By default, fields with empty 7682 // values are omitted from API requests. However, any field with an 7683 // empty value appearing in NullFields will be sent to the server as 7684 // null. It is an error if a field in this list has a non-empty value. 7685 // This may be used to include null fields in Patch requests. 7686 NullFields []string `json:"-"` 7687} 7688 7689func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { 7690 type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey 7691 raw := NoMethod(*s) 7692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7693} 7694 7695// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message 7696// for UpdateDeidentifyTemplate. 7697type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { 7698 // DeidentifyTemplate: New DeidentifyTemplate value. 7699 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 7700 7701 // UpdateMask: Mask to control which fields get updated. 7702 UpdateMask string `json:"updateMask,omitempty"` 7703 7704 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 7705 // to unconditionally include in API requests. By default, fields with 7706 // empty values are omitted from API requests. However, any non-pointer, 7707 // non-interface field appearing in ForceSendFields will be sent to the 7708 // server regardless of whether the field is empty or not. This may be 7709 // used to include empty fields in Patch requests. 7710 ForceSendFields []string `json:"-"` 7711 7712 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 7713 // include in API requests with the JSON null value. By default, fields 7714 // with empty values are omitted from API requests. However, any field 7715 // with an empty value appearing in NullFields will be sent to the 7716 // server as null. It is an error if a field in this list has a 7717 // non-empty value. This may be used to include null fields in Patch 7718 // requests. 7719 NullFields []string `json:"-"` 7720} 7721 7722func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 7723 type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 7724 raw := NoMethod(*s) 7725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7726} 7727 7728// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for 7729// UpdateInspectTemplate. 7730type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { 7731 // InspectTemplate: New InspectTemplate value. 7732 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 7733 7734 // UpdateMask: Mask to control which fields get updated. 7735 UpdateMask string `json:"updateMask,omitempty"` 7736 7737 // ForceSendFields is a list of field names (e.g. "InspectTemplate") 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. "InspectTemplate") to 7746 // include in API requests with the JSON null value. By default, fields 7747 // with empty values are omitted from API requests. However, any field 7748 // with an empty value appearing in NullFields will be sent to the 7749 // server as null. It is an error if a field in this list has a 7750 // non-empty value. This may be used to include null fields in Patch 7751 // requests. 7752 NullFields []string `json:"-"` 7753} 7754 7755func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 7756 type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest 7757 raw := NoMethod(*s) 7758 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7759} 7760 7761// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for 7762// UpdateJobTrigger. 7763type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { 7764 // JobTrigger: New JobTrigger value. 7765 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 7766 7767 // UpdateMask: Mask to control which fields get updated. 7768 UpdateMask string `json:"updateMask,omitempty"` 7769 7770 // ForceSendFields is a list of field names (e.g. "JobTrigger") 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. "JobTrigger") to include in 7779 // API 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 *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { 7788 type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest 7789 raw := NoMethod(*s) 7790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7791} 7792 7793// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for 7794// UpdateStoredInfoType. 7795type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { 7796 // Config: Updated configuration for the storedInfoType. If not 7797 // provided, a new version of the storedInfoType will be created with 7798 // the existing configuration. 7799 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7800 7801 // UpdateMask: Mask to control which fields get updated. 7802 UpdateMask string `json:"updateMask,omitempty"` 7803 7804 // ForceSendFields is a list of field names (e.g. "Config") to 7805 // unconditionally include in API requests. By default, fields with 7806 // empty values are omitted from API requests. However, any non-pointer, 7807 // non-interface field appearing in ForceSendFields will be sent to the 7808 // server regardless of whether the field is empty or not. This may be 7809 // used to include empty fields in Patch requests. 7810 ForceSendFields []string `json:"-"` 7811 7812 // NullFields is a list of field names (e.g. "Config") to include in API 7813 // requests with the JSON null value. By default, fields with empty 7814 // values are omitted from API requests. However, any field with an 7815 // empty value appearing in NullFields will be sent to the server as 7816 // null. It is an error if a field in this list has a non-empty value. 7817 // This may be used to include null fields in Patch requests. 7818 NullFields []string `json:"-"` 7819} 7820 7821func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 7822 type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 7823 raw := NoMethod(*s) 7824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7825} 7826 7827// GooglePrivacyDlpV2Value: Set of primitive values supported by the 7828// system. Note that for the purposes of inspection or transformation, 7829// the number of bytes considered to comprise a 'Value' is based on its 7830// representation as a UTF-8 encoded string. For example, if 7831// 'integer_value' is set to 123456789, the number of bytes would be 7832// counted as 9, even though an int64 only holds up to 8 bytes of data. 7833type GooglePrivacyDlpV2Value struct { 7834 // BooleanValue: boolean 7835 BooleanValue bool `json:"booleanValue,omitempty"` 7836 7837 // DateValue: date 7838 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 7839 7840 // DayOfWeekValue: day of week 7841 // 7842 // Possible values: 7843 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 7844 // "MONDAY" - Monday 7845 // "TUESDAY" - Tuesday 7846 // "WEDNESDAY" - Wednesday 7847 // "THURSDAY" - Thursday 7848 // "FRIDAY" - Friday 7849 // "SATURDAY" - Saturday 7850 // "SUNDAY" - Sunday 7851 DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` 7852 7853 // FloatValue: float 7854 FloatValue float64 `json:"floatValue,omitempty"` 7855 7856 // IntegerValue: integer 7857 IntegerValue int64 `json:"integerValue,omitempty,string"` 7858 7859 // StringValue: string 7860 StringValue string `json:"stringValue,omitempty"` 7861 7862 // TimeValue: time of day 7863 TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` 7864 7865 // TimestampValue: timestamp 7866 TimestampValue string `json:"timestampValue,omitempty"` 7867 7868 // ForceSendFields is a list of field names (e.g. "BooleanValue") to 7869 // unconditionally include in API requests. By default, fields with 7870 // empty values are omitted from API requests. However, any non-pointer, 7871 // non-interface field appearing in ForceSendFields will be sent to the 7872 // server regardless of whether the field is empty or not. This may be 7873 // used to include empty fields in Patch requests. 7874 ForceSendFields []string `json:"-"` 7875 7876 // NullFields is a list of field names (e.g. "BooleanValue") to include 7877 // in API requests with the JSON null value. By default, fields with 7878 // empty values are omitted from API requests. However, any field with 7879 // an empty value appearing in NullFields will be sent to the server as 7880 // null. It is an error if a field in this list has a non-empty value. 7881 // This may be used to include null fields in Patch requests. 7882 NullFields []string `json:"-"` 7883} 7884 7885func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { 7886 type NoMethod GooglePrivacyDlpV2Value 7887 raw := NoMethod(*s) 7888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7889} 7890 7891func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { 7892 type NoMethod GooglePrivacyDlpV2Value 7893 var s1 struct { 7894 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 7895 *NoMethod 7896 } 7897 s1.NoMethod = (*NoMethod)(s) 7898 if err := json.Unmarshal(data, &s1); err != nil { 7899 return err 7900 } 7901 s.FloatValue = float64(s1.FloatValue) 7902 return nil 7903} 7904 7905// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its 7906// frequency. 7907type GooglePrivacyDlpV2ValueFrequency struct { 7908 // Count: How many times the value is contained in the field. 7909 Count int64 `json:"count,omitempty,string"` 7910 7911 // Value: A value contained in the field in question. 7912 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 7913 7914 // ForceSendFields is a list of field names (e.g. "Count") to 7915 // unconditionally include in API requests. By default, fields with 7916 // empty values are omitted from API requests. However, any non-pointer, 7917 // non-interface field appearing in ForceSendFields will be sent to the 7918 // server regardless of whether the field is empty or not. This may be 7919 // used to include empty fields in Patch requests. 7920 ForceSendFields []string `json:"-"` 7921 7922 // NullFields is a list of field names (e.g. "Count") to include in API 7923 // requests with the JSON null value. By default, fields with empty 7924 // values are omitted from API requests. However, any field with an 7925 // empty value appearing in NullFields will be sent to the server as 7926 // null. It is an error if a field in this list has a non-empty value. 7927 // This may be used to include null fields in Patch requests. 7928 NullFields []string `json:"-"` 7929} 7930 7931func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { 7932 type NoMethod GooglePrivacyDlpV2ValueFrequency 7933 raw := NoMethod(*s) 7934 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7935} 7936 7937// GooglePrivacyDlpV2WordList: Message defining a list of words or 7938// phrases to search for in the data. 7939type GooglePrivacyDlpV2WordList struct { 7940 // Words: Words or phrases defining the dictionary. The dictionary must 7941 // contain at least one phrase and every phrase must contain at least 2 7942 // characters that are letters or digits. [required] 7943 Words []string `json:"words,omitempty"` 7944 7945 // ForceSendFields is a list of field names (e.g. "Words") to 7946 // unconditionally include in API requests. By default, fields with 7947 // empty values are omitted from API requests. However, any non-pointer, 7948 // non-interface field appearing in ForceSendFields will be sent to the 7949 // server regardless of whether the field is empty or not. This may be 7950 // used to include empty fields in Patch requests. 7951 ForceSendFields []string `json:"-"` 7952 7953 // NullFields is a list of field names (e.g. "Words") to include in API 7954 // requests with the JSON null value. By default, fields with empty 7955 // values are omitted from API requests. However, any field with an 7956 // empty value appearing in NullFields will be sent to the server as 7957 // null. It is an error if a field in this list has a non-empty value. 7958 // This may be used to include null fields in Patch requests. 7959 NullFields []string `json:"-"` 7960} 7961 7962func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { 7963 type NoMethod GooglePrivacyDlpV2WordList 7964 raw := NoMethod(*s) 7965 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7966} 7967 7968// GoogleProtobufEmpty: A generic empty message that you can re-use to 7969// avoid defining duplicated empty messages in your APIs. A typical 7970// example is to use it as the request or the response type of an API 7971// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) 7972// returns (google.protobuf.Empty); } The JSON representation for 7973// `Empty` is empty JSON object `{}`. 7974type GoogleProtobufEmpty struct { 7975 // ServerResponse contains the HTTP response code and headers from the 7976 // server. 7977 googleapi.ServerResponse `json:"-"` 7978} 7979 7980// GoogleRpcStatus: The `Status` type defines a logical error model that 7981// is suitable for different programming environments, including REST 7982// APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). 7983// Each `Status` message contains three pieces of data: error code, 7984// error message, and error details. You can find out more about this 7985// error model and how to work with it in the [API Design 7986// Guide](https://cloud.google.com/apis/design/errors). 7987type GoogleRpcStatus struct { 7988 // Code: The status code, which should be an enum value of 7989 // google.rpc.Code. 7990 Code int64 `json:"code,omitempty"` 7991 7992 // Details: A list of messages that carry the error details. There is a 7993 // common set of message types for APIs to use. 7994 Details []googleapi.RawMessage `json:"details,omitempty"` 7995 7996 // Message: A developer-facing error message, which should be in 7997 // English. Any user-facing error message should be localized and sent 7998 // in the google.rpc.Status.details field, or localized by the client. 7999 Message string `json:"message,omitempty"` 8000 8001 // ForceSendFields is a list of field names (e.g. "Code") to 8002 // unconditionally include in API requests. By default, fields with 8003 // empty values are omitted from API requests. However, any non-pointer, 8004 // non-interface field appearing in ForceSendFields will be sent to the 8005 // server regardless of whether the field is empty or not. This may be 8006 // used to include empty fields in Patch requests. 8007 ForceSendFields []string `json:"-"` 8008 8009 // NullFields is a list of field names (e.g. "Code") to include in API 8010 // requests with the JSON null value. By default, fields with empty 8011 // values are omitted from API requests. However, any field with an 8012 // empty value appearing in NullFields will be sent to the server as 8013 // null. It is an error if a field in this list has a non-empty value. 8014 // This may be used to include null fields in Patch requests. 8015 NullFields []string `json:"-"` 8016} 8017 8018func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 8019 type NoMethod GoogleRpcStatus 8020 raw := NoMethod(*s) 8021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8022} 8023 8024// GoogleTypeDate: Represents a whole or partial calendar date, such as 8025// a birthday. The time of day and time zone are either specified 8026// elsewhere or are insignificant. The date is relative to the Gregorian 8027// Calendar. This can represent one of the following: * A full date, 8028// with non-zero year, month, and day values * A month and day value, 8029// with a zero year, such as an anniversary * A year on its own, with 8030// zero month and day values * A year and month value, with a zero day, 8031// such as a credit card expiration date Related types are 8032// google.type.TimeOfDay and `google.protobuf.Timestamp`. 8033type GoogleTypeDate struct { 8034 // Day: Day of a month. Must be from 1 to 31 and valid for the year and 8035 // month, or 0 to specify a year by itself or a year and month where the 8036 // day isn't significant. 8037 Day int64 `json:"day,omitempty"` 8038 8039 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year 8040 // without a month and day. 8041 Month int64 `json:"month,omitempty"` 8042 8043 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a 8044 // date without a year. 8045 Year int64 `json:"year,omitempty"` 8046 8047 // ForceSendFields is a list of field names (e.g. "Day") to 8048 // unconditionally include in API requests. By default, fields with 8049 // empty values are omitted from API requests. However, any non-pointer, 8050 // non-interface field appearing in ForceSendFields will be sent to the 8051 // server regardless of whether the field is empty or not. This may be 8052 // used to include empty fields in Patch requests. 8053 ForceSendFields []string `json:"-"` 8054 8055 // NullFields is a list of field names (e.g. "Day") to include in API 8056 // requests with the JSON null value. By default, fields with empty 8057 // values are omitted from API requests. However, any field with an 8058 // empty value appearing in NullFields will be sent to the server as 8059 // null. It is an error if a field in this list has a non-empty value. 8060 // This may be used to include null fields in Patch requests. 8061 NullFields []string `json:"-"` 8062} 8063 8064func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 8065 type NoMethod GoogleTypeDate 8066 raw := NoMethod(*s) 8067 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8068} 8069 8070// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone 8071// are either not significant or are specified elsewhere. An API may 8072// choose to allow leap seconds. Related types are google.type.Date and 8073// `google.protobuf.Timestamp`. 8074type GoogleTypeTimeOfDay struct { 8075 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 8076 // may choose to allow the value "24:00:00" for scenarios like business 8077 // closing time. 8078 Hours int64 `json:"hours,omitempty"` 8079 8080 // Minutes: Minutes of hour of day. Must be from 0 to 59. 8081 Minutes int64 `json:"minutes,omitempty"` 8082 8083 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 8084 // 999,999,999. 8085 Nanos int64 `json:"nanos,omitempty"` 8086 8087 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 8088 // 59. An API may allow the value 60 if it allows leap-seconds. 8089 Seconds int64 `json:"seconds,omitempty"` 8090 8091 // ForceSendFields is a list of field names (e.g. "Hours") to 8092 // unconditionally include in API requests. By default, fields with 8093 // empty values are omitted from API requests. However, any non-pointer, 8094 // non-interface field appearing in ForceSendFields will be sent to the 8095 // server regardless of whether the field is empty or not. This may be 8096 // used to include empty fields in Patch requests. 8097 ForceSendFields []string `json:"-"` 8098 8099 // NullFields is a list of field names (e.g. "Hours") to include in API 8100 // requests with the JSON null value. By default, fields with empty 8101 // values are omitted from API requests. However, any field with an 8102 // empty value appearing in NullFields will be sent to the server as 8103 // null. It is an error if a field in this list has a non-empty value. 8104 // This may be used to include null fields in Patch requests. 8105 NullFields []string `json:"-"` 8106} 8107 8108func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { 8109 type NoMethod GoogleTypeTimeOfDay 8110 raw := NoMethod(*s) 8111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8112} 8113 8114// method id "dlp.infoTypes.list": 8115 8116type InfoTypesListCall struct { 8117 s *Service 8118 urlParams_ gensupport.URLParams 8119 ifNoneMatch_ string 8120 ctx_ context.Context 8121 header_ http.Header 8122} 8123 8124// List: Returns a list of the sensitive information types that the DLP 8125// API supports. See 8126// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8127func (r *InfoTypesService) List() *InfoTypesListCall { 8128 c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8129 return c 8130} 8131 8132// Filter sets the optional parameter "filter": filter to only return 8133// infoTypes supported by certain parts of the API. Defaults to 8134// supported_by=INSPECT. 8135func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { 8136 c.urlParams_.Set("filter", filter) 8137 return c 8138} 8139 8140// LanguageCode sets the optional parameter "languageCode": BCP-47 8141// language code for localized infoType friendly names. If omitted, or 8142// if localized strings are not available, en-US strings will be 8143// returned. 8144func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { 8145 c.urlParams_.Set("languageCode", languageCode) 8146 return c 8147} 8148 8149// LocationId sets the optional parameter "locationId": Deprecated. This 8150// field has no effect. 8151func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { 8152 c.urlParams_.Set("locationId", locationId) 8153 return c 8154} 8155 8156// Parent sets the optional parameter "parent": The parent resource 8157// name. The format of this value is as follows: locations/ LOCATION_ID 8158func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { 8159 c.urlParams_.Set("parent", parent) 8160 return c 8161} 8162 8163// Fields allows partial responses to be retrieved. See 8164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8165// for more information. 8166func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { 8167 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8168 return c 8169} 8170 8171// IfNoneMatch sets the optional parameter which makes the operation 8172// fail if the object's ETag matches the given value. This is useful for 8173// getting updates only after the object has changed since the last 8174// request. Use googleapi.IsNotModified to check whether the response 8175// error from Do is the result of In-None-Match. 8176func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { 8177 c.ifNoneMatch_ = entityTag 8178 return c 8179} 8180 8181// Context sets the context to be used in this call's Do method. Any 8182// pending HTTP request will be aborted if the provided context is 8183// canceled. 8184func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { 8185 c.ctx_ = ctx 8186 return c 8187} 8188 8189// Header returns an http.Header that can be modified by the caller to 8190// add HTTP headers to the request. 8191func (c *InfoTypesListCall) Header() http.Header { 8192 if c.header_ == nil { 8193 c.header_ = make(http.Header) 8194 } 8195 return c.header_ 8196} 8197 8198func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8199 reqHeaders := make(http.Header) 8200 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8201 for k, v := range c.header_ { 8202 reqHeaders[k] = v 8203 } 8204 reqHeaders.Set("User-Agent", c.s.userAgent()) 8205 if c.ifNoneMatch_ != "" { 8206 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8207 } 8208 var body io.Reader = nil 8209 c.urlParams_.Set("alt", alt) 8210 c.urlParams_.Set("prettyPrint", "false") 8211 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") 8212 urls += "?" + c.urlParams_.Encode() 8213 req, err := http.NewRequest("GET", urls, body) 8214 if err != nil { 8215 return nil, err 8216 } 8217 req.Header = reqHeaders 8218 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8219} 8220 8221// Do executes the "dlp.infoTypes.list" call. 8222// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8223// be non-nil. Any non-2xx status code is an error. Response headers are 8224// in either 8225// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8226// a response was returned at all) in error.(*googleapi.Error).Header. 8227// Use googleapi.IsNotModified to check whether the returned error was 8228// because http.StatusNotModified was returned. 8229func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8230 gensupport.SetOptions(c.urlParams_, opts...) 8231 res, err := c.doRequest("json") 8232 if res != nil && res.StatusCode == http.StatusNotModified { 8233 if res.Body != nil { 8234 res.Body.Close() 8235 } 8236 return nil, &googleapi.Error{ 8237 Code: res.StatusCode, 8238 Header: res.Header, 8239 } 8240 } 8241 if err != nil { 8242 return nil, err 8243 } 8244 defer googleapi.CloseBody(res) 8245 if err := googleapi.CheckResponse(res); err != nil { 8246 return nil, err 8247 } 8248 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8249 ServerResponse: googleapi.ServerResponse{ 8250 Header: res.Header, 8251 HTTPStatusCode: res.StatusCode, 8252 }, 8253 } 8254 target := &ret 8255 if err := gensupport.DecodeResponse(target, res); err != nil { 8256 return nil, err 8257 } 8258 return ret, nil 8259 // { 8260 // "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", 8261 // "flatPath": "v2/infoTypes", 8262 // "httpMethod": "GET", 8263 // "id": "dlp.infoTypes.list", 8264 // "parameterOrder": [], 8265 // "parameters": { 8266 // "filter": { 8267 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8268 // "location": "query", 8269 // "type": "string" 8270 // }, 8271 // "languageCode": { 8272 // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", 8273 // "location": "query", 8274 // "type": "string" 8275 // }, 8276 // "locationId": { 8277 // "description": "Deprecated. This field has no effect.", 8278 // "location": "query", 8279 // "type": "string" 8280 // }, 8281 // "parent": { 8282 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8283 // "location": "query", 8284 // "type": "string" 8285 // } 8286 // }, 8287 // "path": "v2/infoTypes", 8288 // "response": { 8289 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8290 // }, 8291 // "scopes": [ 8292 // "https://www.googleapis.com/auth/cloud-platform" 8293 // ] 8294 // } 8295 8296} 8297 8298// method id "dlp.locations.infoTypes.list": 8299 8300type LocationsInfoTypesListCall struct { 8301 s *Service 8302 parent string 8303 urlParams_ gensupport.URLParams 8304 ifNoneMatch_ string 8305 ctx_ context.Context 8306 header_ http.Header 8307} 8308 8309// List: Returns a list of the sensitive information types that the DLP 8310// API supports. See 8311// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8312func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { 8313 c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8314 c.parent = parent 8315 return c 8316} 8317 8318// Filter sets the optional parameter "filter": filter to only return 8319// infoTypes supported by certain parts of the API. Defaults to 8320// supported_by=INSPECT. 8321func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { 8322 c.urlParams_.Set("filter", filter) 8323 return c 8324} 8325 8326// LanguageCode sets the optional parameter "languageCode": BCP-47 8327// language code for localized infoType friendly names. If omitted, or 8328// if localized strings are not available, en-US strings will be 8329// returned. 8330func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { 8331 c.urlParams_.Set("languageCode", languageCode) 8332 return c 8333} 8334 8335// LocationId sets the optional parameter "locationId": Deprecated. This 8336// field has no effect. 8337func (c *LocationsInfoTypesListCall) LocationId(locationId string) *LocationsInfoTypesListCall { 8338 c.urlParams_.Set("locationId", locationId) 8339 return c 8340} 8341 8342// Fields allows partial responses to be retrieved. See 8343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8344// for more information. 8345func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { 8346 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8347 return c 8348} 8349 8350// IfNoneMatch sets the optional parameter which makes the operation 8351// fail if the object's ETag matches the given value. This is useful for 8352// getting updates only after the object has changed since the last 8353// request. Use googleapi.IsNotModified to check whether the response 8354// error from Do is the result of In-None-Match. 8355func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { 8356 c.ifNoneMatch_ = entityTag 8357 return c 8358} 8359 8360// Context sets the context to be used in this call's Do method. Any 8361// pending HTTP request will be aborted if the provided context is 8362// canceled. 8363func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { 8364 c.ctx_ = ctx 8365 return c 8366} 8367 8368// Header returns an http.Header that can be modified by the caller to 8369// add HTTP headers to the request. 8370func (c *LocationsInfoTypesListCall) Header() http.Header { 8371 if c.header_ == nil { 8372 c.header_ = make(http.Header) 8373 } 8374 return c.header_ 8375} 8376 8377func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8378 reqHeaders := make(http.Header) 8379 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8380 for k, v := range c.header_ { 8381 reqHeaders[k] = v 8382 } 8383 reqHeaders.Set("User-Agent", c.s.userAgent()) 8384 if c.ifNoneMatch_ != "" { 8385 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8386 } 8387 var body io.Reader = nil 8388 c.urlParams_.Set("alt", alt) 8389 c.urlParams_.Set("prettyPrint", "false") 8390 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/infoTypes") 8391 urls += "?" + c.urlParams_.Encode() 8392 req, err := http.NewRequest("GET", urls, body) 8393 if err != nil { 8394 return nil, err 8395 } 8396 req.Header = reqHeaders 8397 googleapi.Expand(req.URL, map[string]string{ 8398 "parent": c.parent, 8399 }) 8400 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8401} 8402 8403// Do executes the "dlp.locations.infoTypes.list" call. 8404// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8405// be non-nil. Any non-2xx status code is an error. Response headers are 8406// in either 8407// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8408// a response was returned at all) in error.(*googleapi.Error).Header. 8409// Use googleapi.IsNotModified to check whether the returned error was 8410// because http.StatusNotModified was returned. 8411func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8412 gensupport.SetOptions(c.urlParams_, opts...) 8413 res, err := c.doRequest("json") 8414 if res != nil && res.StatusCode == http.StatusNotModified { 8415 if res.Body != nil { 8416 res.Body.Close() 8417 } 8418 return nil, &googleapi.Error{ 8419 Code: res.StatusCode, 8420 Header: res.Header, 8421 } 8422 } 8423 if err != nil { 8424 return nil, err 8425 } 8426 defer googleapi.CloseBody(res) 8427 if err := googleapi.CheckResponse(res); err != nil { 8428 return nil, err 8429 } 8430 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8431 ServerResponse: googleapi.ServerResponse{ 8432 Header: res.Header, 8433 HTTPStatusCode: res.StatusCode, 8434 }, 8435 } 8436 target := &ret 8437 if err := gensupport.DecodeResponse(target, res); err != nil { 8438 return nil, err 8439 } 8440 return ret, nil 8441 // { 8442 // "description": "Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", 8443 // "flatPath": "v2/locations/{locationsId}/infoTypes", 8444 // "httpMethod": "GET", 8445 // "id": "dlp.locations.infoTypes.list", 8446 // "parameterOrder": [ 8447 // "parent" 8448 // ], 8449 // "parameters": { 8450 // "filter": { 8451 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8452 // "location": "query", 8453 // "type": "string" 8454 // }, 8455 // "languageCode": { 8456 // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", 8457 // "location": "query", 8458 // "type": "string" 8459 // }, 8460 // "locationId": { 8461 // "description": "Deprecated. This field has no effect.", 8462 // "location": "query", 8463 // "type": "string" 8464 // }, 8465 // "parent": { 8466 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8467 // "location": "path", 8468 // "pattern": "^locations/[^/]+$", 8469 // "required": true, 8470 // "type": "string" 8471 // } 8472 // }, 8473 // "path": "v2/{+parent}/infoTypes", 8474 // "response": { 8475 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8476 // }, 8477 // "scopes": [ 8478 // "https://www.googleapis.com/auth/cloud-platform" 8479 // ] 8480 // } 8481 8482} 8483 8484// method id "dlp.organizations.deidentifyTemplates.create": 8485 8486type OrganizationsDeidentifyTemplatesCreateCall struct { 8487 s *Service 8488 parentid string 8489 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 8490 urlParams_ gensupport.URLParams 8491 ctx_ context.Context 8492 header_ http.Header 8493} 8494 8495// Create: Creates a DeidentifyTemplate for re-using frequently used 8496// configuration for de-identifying content, images, and storage. See 8497// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8498// more. 8499func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { 8500 c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8501 c.parentid = parentid 8502 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 8503 return c 8504} 8505 8506// Fields allows partial responses to be retrieved. See 8507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8508// for more information. 8509func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { 8510 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8511 return c 8512} 8513 8514// Context sets the context to be used in this call's Do method. Any 8515// pending HTTP request will be aborted if the provided context is 8516// canceled. 8517func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { 8518 c.ctx_ = ctx 8519 return c 8520} 8521 8522// Header returns an http.Header that can be modified by the caller to 8523// add HTTP headers to the request. 8524func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { 8525 if c.header_ == nil { 8526 c.header_ = make(http.Header) 8527 } 8528 return c.header_ 8529} 8530 8531func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 8532 reqHeaders := make(http.Header) 8533 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8534 for k, v := range c.header_ { 8535 reqHeaders[k] = v 8536 } 8537 reqHeaders.Set("User-Agent", c.s.userAgent()) 8538 var body io.Reader = nil 8539 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 8540 if err != nil { 8541 return nil, err 8542 } 8543 reqHeaders.Set("Content-Type", "application/json") 8544 c.urlParams_.Set("alt", alt) 8545 c.urlParams_.Set("prettyPrint", "false") 8546 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 8547 urls += "?" + c.urlParams_.Encode() 8548 req, err := http.NewRequest("POST", urls, body) 8549 if err != nil { 8550 return nil, err 8551 } 8552 req.Header = reqHeaders 8553 googleapi.Expand(req.URL, map[string]string{ 8554 "parent": c.parentid, 8555 }) 8556 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8557} 8558 8559// Do executes the "dlp.organizations.deidentifyTemplates.create" call. 8560// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8561// non-nil. Any non-2xx status code is an error. Response headers are in 8562// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8563// (if a response was returned at all) in 8564// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8565// whether the returned error was because http.StatusNotModified was 8566// returned. 8567func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8568 gensupport.SetOptions(c.urlParams_, opts...) 8569 res, err := c.doRequest("json") 8570 if res != nil && res.StatusCode == http.StatusNotModified { 8571 if res.Body != nil { 8572 res.Body.Close() 8573 } 8574 return nil, &googleapi.Error{ 8575 Code: res.StatusCode, 8576 Header: res.Header, 8577 } 8578 } 8579 if err != nil { 8580 return nil, err 8581 } 8582 defer googleapi.CloseBody(res) 8583 if err := googleapi.CheckResponse(res); err != nil { 8584 return nil, err 8585 } 8586 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8587 ServerResponse: googleapi.ServerResponse{ 8588 Header: res.Header, 8589 HTTPStatusCode: res.StatusCode, 8590 }, 8591 } 8592 target := &ret 8593 if err := gensupport.DecodeResponse(target, res); err != nil { 8594 return nil, err 8595 } 8596 return ret, nil 8597 // { 8598 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8599 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 8600 // "httpMethod": "POST", 8601 // "id": "dlp.organizations.deidentifyTemplates.create", 8602 // "parameterOrder": [ 8603 // "parent" 8604 // ], 8605 // "parameters": { 8606 // "parent": { 8607 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 8608 // "location": "path", 8609 // "pattern": "^organizations/[^/]+$", 8610 // "required": true, 8611 // "type": "string" 8612 // } 8613 // }, 8614 // "path": "v2/{+parent}/deidentifyTemplates", 8615 // "request": { 8616 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 8617 // }, 8618 // "response": { 8619 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8620 // }, 8621 // "scopes": [ 8622 // "https://www.googleapis.com/auth/cloud-platform" 8623 // ] 8624 // } 8625 8626} 8627 8628// method id "dlp.organizations.deidentifyTemplates.delete": 8629 8630type OrganizationsDeidentifyTemplatesDeleteCall struct { 8631 s *Service 8632 name string 8633 urlParams_ gensupport.URLParams 8634 ctx_ context.Context 8635 header_ http.Header 8636} 8637 8638// Delete: Deletes a DeidentifyTemplate. See 8639// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8640// more. 8641func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { 8642 c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8643 c.name = name 8644 return c 8645} 8646 8647// Fields allows partial responses to be retrieved. See 8648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8649// for more information. 8650func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { 8651 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8652 return c 8653} 8654 8655// Context sets the context to be used in this call's Do method. Any 8656// pending HTTP request will be aborted if the provided context is 8657// canceled. 8658func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { 8659 c.ctx_ = ctx 8660 return c 8661} 8662 8663// Header returns an http.Header that can be modified by the caller to 8664// add HTTP headers to the request. 8665func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { 8666 if c.header_ == nil { 8667 c.header_ = make(http.Header) 8668 } 8669 return c.header_ 8670} 8671 8672func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 8673 reqHeaders := make(http.Header) 8674 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8675 for k, v := range c.header_ { 8676 reqHeaders[k] = v 8677 } 8678 reqHeaders.Set("User-Agent", c.s.userAgent()) 8679 var body io.Reader = nil 8680 c.urlParams_.Set("alt", alt) 8681 c.urlParams_.Set("prettyPrint", "false") 8682 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8683 urls += "?" + c.urlParams_.Encode() 8684 req, err := http.NewRequest("DELETE", urls, body) 8685 if err != nil { 8686 return nil, err 8687 } 8688 req.Header = reqHeaders 8689 googleapi.Expand(req.URL, map[string]string{ 8690 "name": c.name, 8691 }) 8692 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8693} 8694 8695// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. 8696// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8697// non-2xx status code is an error. Response headers are in either 8698// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8699// returned at all) in error.(*googleapi.Error).Header. Use 8700// googleapi.IsNotModified to check whether the returned error was 8701// because http.StatusNotModified was returned. 8702func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8703 gensupport.SetOptions(c.urlParams_, opts...) 8704 res, err := c.doRequest("json") 8705 if res != nil && res.StatusCode == http.StatusNotModified { 8706 if res.Body != nil { 8707 res.Body.Close() 8708 } 8709 return nil, &googleapi.Error{ 8710 Code: res.StatusCode, 8711 Header: res.Header, 8712 } 8713 } 8714 if err != nil { 8715 return nil, err 8716 } 8717 defer googleapi.CloseBody(res) 8718 if err := googleapi.CheckResponse(res); err != nil { 8719 return nil, err 8720 } 8721 ret := &GoogleProtobufEmpty{ 8722 ServerResponse: googleapi.ServerResponse{ 8723 Header: res.Header, 8724 HTTPStatusCode: res.StatusCode, 8725 }, 8726 } 8727 target := &ret 8728 if err := gensupport.DecodeResponse(target, res); err != nil { 8729 return nil, err 8730 } 8731 return ret, nil 8732 // { 8733 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8734 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8735 // "httpMethod": "DELETE", 8736 // "id": "dlp.organizations.deidentifyTemplates.delete", 8737 // "parameterOrder": [ 8738 // "name" 8739 // ], 8740 // "parameters": { 8741 // "name": { 8742 // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 8743 // "location": "path", 8744 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8745 // "required": true, 8746 // "type": "string" 8747 // } 8748 // }, 8749 // "path": "v2/{+name}", 8750 // "response": { 8751 // "$ref": "GoogleProtobufEmpty" 8752 // }, 8753 // "scopes": [ 8754 // "https://www.googleapis.com/auth/cloud-platform" 8755 // ] 8756 // } 8757 8758} 8759 8760// method id "dlp.organizations.deidentifyTemplates.get": 8761 8762type OrganizationsDeidentifyTemplatesGetCall struct { 8763 s *Service 8764 name string 8765 urlParams_ gensupport.URLParams 8766 ifNoneMatch_ string 8767 ctx_ context.Context 8768 header_ http.Header 8769} 8770 8771// Get: Gets a DeidentifyTemplate. See 8772// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8773// more. 8774func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { 8775 c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8776 c.name = name 8777 return c 8778} 8779 8780// Fields allows partial responses to be retrieved. See 8781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8782// for more information. 8783func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { 8784 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8785 return c 8786} 8787 8788// IfNoneMatch sets the optional parameter which makes the operation 8789// fail if the object's ETag matches the given value. This is useful for 8790// getting updates only after the object has changed since the last 8791// request. Use googleapi.IsNotModified to check whether the response 8792// error from Do is the result of In-None-Match. 8793func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { 8794 c.ifNoneMatch_ = entityTag 8795 return c 8796} 8797 8798// Context sets the context to be used in this call's Do method. Any 8799// pending HTTP request will be aborted if the provided context is 8800// canceled. 8801func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { 8802 c.ctx_ = ctx 8803 return c 8804} 8805 8806// Header returns an http.Header that can be modified by the caller to 8807// add HTTP headers to the request. 8808func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { 8809 if c.header_ == nil { 8810 c.header_ = make(http.Header) 8811 } 8812 return c.header_ 8813} 8814 8815func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 8816 reqHeaders := make(http.Header) 8817 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8818 for k, v := range c.header_ { 8819 reqHeaders[k] = v 8820 } 8821 reqHeaders.Set("User-Agent", c.s.userAgent()) 8822 if c.ifNoneMatch_ != "" { 8823 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8824 } 8825 var body io.Reader = nil 8826 c.urlParams_.Set("alt", alt) 8827 c.urlParams_.Set("prettyPrint", "false") 8828 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8829 urls += "?" + c.urlParams_.Encode() 8830 req, err := http.NewRequest("GET", urls, body) 8831 if err != nil { 8832 return nil, err 8833 } 8834 req.Header = reqHeaders 8835 googleapi.Expand(req.URL, map[string]string{ 8836 "name": c.name, 8837 }) 8838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8839} 8840 8841// Do executes the "dlp.organizations.deidentifyTemplates.get" call. 8842// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8843// non-nil. Any non-2xx status code is an error. Response headers are in 8844// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8845// (if a response was returned at all) in 8846// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8847// whether the returned error was because http.StatusNotModified was 8848// returned. 8849func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8850 gensupport.SetOptions(c.urlParams_, opts...) 8851 res, err := c.doRequest("json") 8852 if res != nil && res.StatusCode == http.StatusNotModified { 8853 if res.Body != nil { 8854 res.Body.Close() 8855 } 8856 return nil, &googleapi.Error{ 8857 Code: res.StatusCode, 8858 Header: res.Header, 8859 } 8860 } 8861 if err != nil { 8862 return nil, err 8863 } 8864 defer googleapi.CloseBody(res) 8865 if err := googleapi.CheckResponse(res); err != nil { 8866 return nil, err 8867 } 8868 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8869 ServerResponse: googleapi.ServerResponse{ 8870 Header: res.Header, 8871 HTTPStatusCode: res.StatusCode, 8872 }, 8873 } 8874 target := &ret 8875 if err := gensupport.DecodeResponse(target, res); err != nil { 8876 return nil, err 8877 } 8878 return ret, nil 8879 // { 8880 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8881 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8882 // "httpMethod": "GET", 8883 // "id": "dlp.organizations.deidentifyTemplates.get", 8884 // "parameterOrder": [ 8885 // "name" 8886 // ], 8887 // "parameters": { 8888 // "name": { 8889 // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 8890 // "location": "path", 8891 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8892 // "required": true, 8893 // "type": "string" 8894 // } 8895 // }, 8896 // "path": "v2/{+name}", 8897 // "response": { 8898 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8899 // }, 8900 // "scopes": [ 8901 // "https://www.googleapis.com/auth/cloud-platform" 8902 // ] 8903 // } 8904 8905} 8906 8907// method id "dlp.organizations.deidentifyTemplates.list": 8908 8909type OrganizationsDeidentifyTemplatesListCall struct { 8910 s *Service 8911 parentid string 8912 urlParams_ gensupport.URLParams 8913 ifNoneMatch_ string 8914 ctx_ context.Context 8915 header_ http.Header 8916} 8917 8918// List: Lists DeidentifyTemplates. See 8919// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8920// more. 8921func (r *OrganizationsDeidentifyTemplatesService) List(parentid string) *OrganizationsDeidentifyTemplatesListCall { 8922 c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8923 c.parentid = parentid 8924 return c 8925} 8926 8927// LocationId sets the optional parameter "locationId": Deprecated. This 8928// field has no effect. 8929func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsDeidentifyTemplatesListCall { 8930 c.urlParams_.Set("locationId", locationId) 8931 return c 8932} 8933 8934// OrderBy sets the optional parameter "orderBy": Comma separated list 8935// of fields to order by, followed by `asc` or `desc` postfix. This list 8936// is case-insensitive, default sorting order is ascending, redundant 8937// space characters are insignificant. Example: `name asc,update_time, 8938// create_time desc` Supported fields are: - `create_time`: corresponds 8939// to time the template was created. - `update_time`: corresponds to 8940// time the template was last updated. - `name`: corresponds to 8941// template's name. - `display_name`: corresponds to template's display 8942// name. 8943func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { 8944 c.urlParams_.Set("orderBy", orderBy) 8945 return c 8946} 8947 8948// PageSize sets the optional parameter "pageSize": Size of the page, 8949// can be limited by server. If zero server returns a page of max size 8950// 100. 8951func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { 8952 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8953 return c 8954} 8955 8956// PageToken sets the optional parameter "pageToken": Page token to 8957// continue retrieval. Comes from previous call to 8958// `ListDeidentifyTemplates`. 8959func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { 8960 c.urlParams_.Set("pageToken", pageToken) 8961 return c 8962} 8963 8964// Fields allows partial responses to be retrieved. See 8965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8966// for more information. 8967func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { 8968 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8969 return c 8970} 8971 8972// IfNoneMatch sets the optional parameter which makes the operation 8973// fail if the object's ETag matches the given value. This is useful for 8974// getting updates only after the object has changed since the last 8975// request. Use googleapi.IsNotModified to check whether the response 8976// error from Do is the result of In-None-Match. 8977func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { 8978 c.ifNoneMatch_ = entityTag 8979 return c 8980} 8981 8982// Context sets the context to be used in this call's Do method. Any 8983// pending HTTP request will be aborted if the provided context is 8984// canceled. 8985func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { 8986 c.ctx_ = ctx 8987 return c 8988} 8989 8990// Header returns an http.Header that can be modified by the caller to 8991// add HTTP headers to the request. 8992func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { 8993 if c.header_ == nil { 8994 c.header_ = make(http.Header) 8995 } 8996 return c.header_ 8997} 8998 8999func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9000 reqHeaders := make(http.Header) 9001 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9002 for k, v := range c.header_ { 9003 reqHeaders[k] = v 9004 } 9005 reqHeaders.Set("User-Agent", c.s.userAgent()) 9006 if c.ifNoneMatch_ != "" { 9007 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9008 } 9009 var body io.Reader = nil 9010 c.urlParams_.Set("alt", alt) 9011 c.urlParams_.Set("prettyPrint", "false") 9012 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 9013 urls += "?" + c.urlParams_.Encode() 9014 req, err := http.NewRequest("GET", urls, body) 9015 if err != nil { 9016 return nil, err 9017 } 9018 req.Header = reqHeaders 9019 googleapi.Expand(req.URL, map[string]string{ 9020 "parent": c.parentid, 9021 }) 9022 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9023} 9024 9025// Do executes the "dlp.organizations.deidentifyTemplates.list" call. 9026// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 9027// error will be non-nil. Any non-2xx status code is an error. Response 9028// headers are in either 9029// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 9030// er or (if a response was returned at all) in 9031// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9032// whether the returned error was because http.StatusNotModified was 9033// returned. 9034func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 9035 gensupport.SetOptions(c.urlParams_, opts...) 9036 res, err := c.doRequest("json") 9037 if res != nil && res.StatusCode == http.StatusNotModified { 9038 if res.Body != nil { 9039 res.Body.Close() 9040 } 9041 return nil, &googleapi.Error{ 9042 Code: res.StatusCode, 9043 Header: res.Header, 9044 } 9045 } 9046 if err != nil { 9047 return nil, err 9048 } 9049 defer googleapi.CloseBody(res) 9050 if err := googleapi.CheckResponse(res); err != nil { 9051 return nil, err 9052 } 9053 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 9054 ServerResponse: googleapi.ServerResponse{ 9055 Header: res.Header, 9056 HTTPStatusCode: res.StatusCode, 9057 }, 9058 } 9059 target := &ret 9060 if err := gensupport.DecodeResponse(target, res); err != nil { 9061 return nil, err 9062 } 9063 return ret, nil 9064 // { 9065 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9066 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 9067 // "httpMethod": "GET", 9068 // "id": "dlp.organizations.deidentifyTemplates.list", 9069 // "parameterOrder": [ 9070 // "parent" 9071 // ], 9072 // "parameters": { 9073 // "locationId": { 9074 // "description": "Deprecated. This field has no effect.", 9075 // "location": "query", 9076 // "type": "string" 9077 // }, 9078 // "orderBy": { 9079 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 9080 // "location": "query", 9081 // "type": "string" 9082 // }, 9083 // "pageSize": { 9084 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 9085 // "format": "int32", 9086 // "location": "query", 9087 // "type": "integer" 9088 // }, 9089 // "pageToken": { 9090 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 9091 // "location": "query", 9092 // "type": "string" 9093 // }, 9094 // "parent": { 9095 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 9096 // "location": "path", 9097 // "pattern": "^organizations/[^/]+$", 9098 // "required": true, 9099 // "type": "string" 9100 // } 9101 // }, 9102 // "path": "v2/{+parent}/deidentifyTemplates", 9103 // "response": { 9104 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 9105 // }, 9106 // "scopes": [ 9107 // "https://www.googleapis.com/auth/cloud-platform" 9108 // ] 9109 // } 9110 9111} 9112 9113// Pages invokes f for each page of results. 9114// A non-nil error returned from f will halt the iteration. 9115// The provided context supersedes any context provided to the Context method. 9116func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 9117 c.ctx_ = ctx 9118 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9119 for { 9120 x, err := c.Do() 9121 if err != nil { 9122 return err 9123 } 9124 if err := f(x); err != nil { 9125 return err 9126 } 9127 if x.NextPageToken == "" { 9128 return nil 9129 } 9130 c.PageToken(x.NextPageToken) 9131 } 9132} 9133 9134// method id "dlp.organizations.deidentifyTemplates.patch": 9135 9136type OrganizationsDeidentifyTemplatesPatchCall struct { 9137 s *Service 9138 name string 9139 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 9140 urlParams_ gensupport.URLParams 9141 ctx_ context.Context 9142 header_ http.Header 9143} 9144 9145// Patch: Updates the DeidentifyTemplate. See 9146// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 9147// more. 9148func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { 9149 c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9150 c.name = name 9151 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 9152 return c 9153} 9154 9155// Fields allows partial responses to be retrieved. See 9156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9157// for more information. 9158func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { 9159 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9160 return c 9161} 9162 9163// Context sets the context to be used in this call's Do method. Any 9164// pending HTTP request will be aborted if the provided context is 9165// canceled. 9166func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { 9167 c.ctx_ = ctx 9168 return c 9169} 9170 9171// Header returns an http.Header that can be modified by the caller to 9172// add HTTP headers to the request. 9173func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { 9174 if c.header_ == nil { 9175 c.header_ = make(http.Header) 9176 } 9177 return c.header_ 9178} 9179 9180func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9181 reqHeaders := make(http.Header) 9182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9183 for k, v := range c.header_ { 9184 reqHeaders[k] = v 9185 } 9186 reqHeaders.Set("User-Agent", c.s.userAgent()) 9187 var body io.Reader = nil 9188 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 9189 if err != nil { 9190 return nil, err 9191 } 9192 reqHeaders.Set("Content-Type", "application/json") 9193 c.urlParams_.Set("alt", alt) 9194 c.urlParams_.Set("prettyPrint", "false") 9195 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9196 urls += "?" + c.urlParams_.Encode() 9197 req, err := http.NewRequest("PATCH", urls, body) 9198 if err != nil { 9199 return nil, err 9200 } 9201 req.Header = reqHeaders 9202 googleapi.Expand(req.URL, map[string]string{ 9203 "name": c.name, 9204 }) 9205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9206} 9207 9208// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. 9209// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 9210// non-nil. Any non-2xx status code is an error. Response headers are in 9211// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 9212// (if a response was returned at all) in 9213// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9214// whether the returned error was because http.StatusNotModified was 9215// returned. 9216func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 9217 gensupport.SetOptions(c.urlParams_, opts...) 9218 res, err := c.doRequest("json") 9219 if res != nil && res.StatusCode == http.StatusNotModified { 9220 if res.Body != nil { 9221 res.Body.Close() 9222 } 9223 return nil, &googleapi.Error{ 9224 Code: res.StatusCode, 9225 Header: res.Header, 9226 } 9227 } 9228 if err != nil { 9229 return nil, err 9230 } 9231 defer googleapi.CloseBody(res) 9232 if err := googleapi.CheckResponse(res); err != nil { 9233 return nil, err 9234 } 9235 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 9236 ServerResponse: googleapi.ServerResponse{ 9237 Header: res.Header, 9238 HTTPStatusCode: res.StatusCode, 9239 }, 9240 } 9241 target := &ret 9242 if err := gensupport.DecodeResponse(target, res); err != nil { 9243 return nil, err 9244 } 9245 return ret, nil 9246 // { 9247 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9248 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 9249 // "httpMethod": "PATCH", 9250 // "id": "dlp.organizations.deidentifyTemplates.patch", 9251 // "parameterOrder": [ 9252 // "name" 9253 // ], 9254 // "parameters": { 9255 // "name": { 9256 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 9257 // "location": "path", 9258 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 9259 // "required": true, 9260 // "type": "string" 9261 // } 9262 // }, 9263 // "path": "v2/{+name}", 9264 // "request": { 9265 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 9266 // }, 9267 // "response": { 9268 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 9269 // }, 9270 // "scopes": [ 9271 // "https://www.googleapis.com/auth/cloud-platform" 9272 // ] 9273 // } 9274 9275} 9276 9277// method id "dlp.organizations.inspectTemplates.create": 9278 9279type OrganizationsInspectTemplatesCreateCall struct { 9280 s *Service 9281 parentid string 9282 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 9283 urlParams_ gensupport.URLParams 9284 ctx_ context.Context 9285 header_ http.Header 9286} 9287 9288// Create: Creates an InspectTemplate for re-using frequently used 9289// configuration for inspecting content, images, and storage. See 9290// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9291func (r *OrganizationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { 9292 c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9293 c.parentid = parentid 9294 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 9295 return c 9296} 9297 9298// Fields allows partial responses to be retrieved. See 9299// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9300// for more information. 9301func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { 9302 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9303 return c 9304} 9305 9306// Context sets the context to be used in this call's Do method. Any 9307// pending HTTP request will be aborted if the provided context is 9308// canceled. 9309func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { 9310 c.ctx_ = ctx 9311 return c 9312} 9313 9314// Header returns an http.Header that can be modified by the caller to 9315// add HTTP headers to the request. 9316func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { 9317 if c.header_ == nil { 9318 c.header_ = make(http.Header) 9319 } 9320 return c.header_ 9321} 9322 9323func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 9324 reqHeaders := make(http.Header) 9325 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9326 for k, v := range c.header_ { 9327 reqHeaders[k] = v 9328 } 9329 reqHeaders.Set("User-Agent", c.s.userAgent()) 9330 var body io.Reader = nil 9331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 9332 if err != nil { 9333 return nil, err 9334 } 9335 reqHeaders.Set("Content-Type", "application/json") 9336 c.urlParams_.Set("alt", alt) 9337 c.urlParams_.Set("prettyPrint", "false") 9338 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9339 urls += "?" + c.urlParams_.Encode() 9340 req, err := http.NewRequest("POST", urls, body) 9341 if err != nil { 9342 return nil, err 9343 } 9344 req.Header = reqHeaders 9345 googleapi.Expand(req.URL, map[string]string{ 9346 "parent": c.parentid, 9347 }) 9348 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9349} 9350 9351// Do executes the "dlp.organizations.inspectTemplates.create" call. 9352// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9353// non-nil. Any non-2xx status code is an error. Response headers are in 9354// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9355// (if a response was returned at all) in 9356// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9357// whether the returned error was because http.StatusNotModified was 9358// returned. 9359func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9360 gensupport.SetOptions(c.urlParams_, opts...) 9361 res, err := c.doRequest("json") 9362 if res != nil && res.StatusCode == http.StatusNotModified { 9363 if res.Body != nil { 9364 res.Body.Close() 9365 } 9366 return nil, &googleapi.Error{ 9367 Code: res.StatusCode, 9368 Header: res.Header, 9369 } 9370 } 9371 if err != nil { 9372 return nil, err 9373 } 9374 defer googleapi.CloseBody(res) 9375 if err := googleapi.CheckResponse(res); err != nil { 9376 return nil, err 9377 } 9378 ret := &GooglePrivacyDlpV2InspectTemplate{ 9379 ServerResponse: googleapi.ServerResponse{ 9380 Header: res.Header, 9381 HTTPStatusCode: res.StatusCode, 9382 }, 9383 } 9384 target := &ret 9385 if err := gensupport.DecodeResponse(target, res); err != nil { 9386 return nil, err 9387 } 9388 return ret, nil 9389 // { 9390 // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9391 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9392 // "httpMethod": "POST", 9393 // "id": "dlp.organizations.inspectTemplates.create", 9394 // "parameterOrder": [ 9395 // "parent" 9396 // ], 9397 // "parameters": { 9398 // "parent": { 9399 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 9400 // "location": "path", 9401 // "pattern": "^organizations/[^/]+$", 9402 // "required": true, 9403 // "type": "string" 9404 // } 9405 // }, 9406 // "path": "v2/{+parent}/inspectTemplates", 9407 // "request": { 9408 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 9409 // }, 9410 // "response": { 9411 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9412 // }, 9413 // "scopes": [ 9414 // "https://www.googleapis.com/auth/cloud-platform" 9415 // ] 9416 // } 9417 9418} 9419 9420// method id "dlp.organizations.inspectTemplates.delete": 9421 9422type OrganizationsInspectTemplatesDeleteCall struct { 9423 s *Service 9424 name string 9425 urlParams_ gensupport.URLParams 9426 ctx_ context.Context 9427 header_ http.Header 9428} 9429 9430// Delete: Deletes an InspectTemplate. See 9431// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9432func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { 9433 c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9434 c.name = name 9435 return c 9436} 9437 9438// Fields allows partial responses to be retrieved. See 9439// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9440// for more information. 9441func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { 9442 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9443 return c 9444} 9445 9446// Context sets the context to be used in this call's Do method. Any 9447// pending HTTP request will be aborted if the provided context is 9448// canceled. 9449func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { 9450 c.ctx_ = ctx 9451 return c 9452} 9453 9454// Header returns an http.Header that can be modified by the caller to 9455// add HTTP headers to the request. 9456func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { 9457 if c.header_ == nil { 9458 c.header_ = make(http.Header) 9459 } 9460 return c.header_ 9461} 9462 9463func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 9464 reqHeaders := make(http.Header) 9465 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9466 for k, v := range c.header_ { 9467 reqHeaders[k] = v 9468 } 9469 reqHeaders.Set("User-Agent", c.s.userAgent()) 9470 var body io.Reader = nil 9471 c.urlParams_.Set("alt", alt) 9472 c.urlParams_.Set("prettyPrint", "false") 9473 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9474 urls += "?" + c.urlParams_.Encode() 9475 req, err := http.NewRequest("DELETE", urls, body) 9476 if err != nil { 9477 return nil, err 9478 } 9479 req.Header = reqHeaders 9480 googleapi.Expand(req.URL, map[string]string{ 9481 "name": c.name, 9482 }) 9483 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9484} 9485 9486// Do executes the "dlp.organizations.inspectTemplates.delete" call. 9487// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9488// non-2xx status code is an error. Response headers are in either 9489// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9490// returned at all) in error.(*googleapi.Error).Header. Use 9491// googleapi.IsNotModified to check whether the returned error was 9492// because http.StatusNotModified was returned. 9493func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9494 gensupport.SetOptions(c.urlParams_, opts...) 9495 res, err := c.doRequest("json") 9496 if res != nil && res.StatusCode == http.StatusNotModified { 9497 if res.Body != nil { 9498 res.Body.Close() 9499 } 9500 return nil, &googleapi.Error{ 9501 Code: res.StatusCode, 9502 Header: res.Header, 9503 } 9504 } 9505 if err != nil { 9506 return nil, err 9507 } 9508 defer googleapi.CloseBody(res) 9509 if err := googleapi.CheckResponse(res); err != nil { 9510 return nil, err 9511 } 9512 ret := &GoogleProtobufEmpty{ 9513 ServerResponse: googleapi.ServerResponse{ 9514 Header: res.Header, 9515 HTTPStatusCode: res.StatusCode, 9516 }, 9517 } 9518 target := &ret 9519 if err := gensupport.DecodeResponse(target, res); err != nil { 9520 return nil, err 9521 } 9522 return ret, nil 9523 // { 9524 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9525 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9526 // "httpMethod": "DELETE", 9527 // "id": "dlp.organizations.inspectTemplates.delete", 9528 // "parameterOrder": [ 9529 // "name" 9530 // ], 9531 // "parameters": { 9532 // "name": { 9533 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9534 // "location": "path", 9535 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9536 // "required": true, 9537 // "type": "string" 9538 // } 9539 // }, 9540 // "path": "v2/{+name}", 9541 // "response": { 9542 // "$ref": "GoogleProtobufEmpty" 9543 // }, 9544 // "scopes": [ 9545 // "https://www.googleapis.com/auth/cloud-platform" 9546 // ] 9547 // } 9548 9549} 9550 9551// method id "dlp.organizations.inspectTemplates.get": 9552 9553type OrganizationsInspectTemplatesGetCall struct { 9554 s *Service 9555 name string 9556 urlParams_ gensupport.URLParams 9557 ifNoneMatch_ string 9558 ctx_ context.Context 9559 header_ http.Header 9560} 9561 9562// Get: Gets an InspectTemplate. See 9563// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9564func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { 9565 c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9566 c.name = name 9567 return c 9568} 9569 9570// Fields allows partial responses to be retrieved. See 9571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9572// for more information. 9573func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { 9574 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9575 return c 9576} 9577 9578// IfNoneMatch sets the optional parameter which makes the operation 9579// fail if the object's ETag matches the given value. This is useful for 9580// getting updates only after the object has changed since the last 9581// request. Use googleapi.IsNotModified to check whether the response 9582// error from Do is the result of In-None-Match. 9583func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { 9584 c.ifNoneMatch_ = entityTag 9585 return c 9586} 9587 9588// Context sets the context to be used in this call's Do method. Any 9589// pending HTTP request will be aborted if the provided context is 9590// canceled. 9591func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { 9592 c.ctx_ = ctx 9593 return c 9594} 9595 9596// Header returns an http.Header that can be modified by the caller to 9597// add HTTP headers to the request. 9598func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { 9599 if c.header_ == nil { 9600 c.header_ = make(http.Header) 9601 } 9602 return c.header_ 9603} 9604 9605func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 9606 reqHeaders := make(http.Header) 9607 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9608 for k, v := range c.header_ { 9609 reqHeaders[k] = v 9610 } 9611 reqHeaders.Set("User-Agent", c.s.userAgent()) 9612 if c.ifNoneMatch_ != "" { 9613 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9614 } 9615 var body io.Reader = nil 9616 c.urlParams_.Set("alt", alt) 9617 c.urlParams_.Set("prettyPrint", "false") 9618 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9619 urls += "?" + c.urlParams_.Encode() 9620 req, err := http.NewRequest("GET", urls, body) 9621 if err != nil { 9622 return nil, err 9623 } 9624 req.Header = reqHeaders 9625 googleapi.Expand(req.URL, map[string]string{ 9626 "name": c.name, 9627 }) 9628 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9629} 9630 9631// Do executes the "dlp.organizations.inspectTemplates.get" call. 9632// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9633// non-nil. Any non-2xx status code is an error. Response headers are in 9634// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9635// (if a response was returned at all) in 9636// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9637// whether the returned error was because http.StatusNotModified was 9638// returned. 9639func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9640 gensupport.SetOptions(c.urlParams_, opts...) 9641 res, err := c.doRequest("json") 9642 if res != nil && res.StatusCode == http.StatusNotModified { 9643 if res.Body != nil { 9644 res.Body.Close() 9645 } 9646 return nil, &googleapi.Error{ 9647 Code: res.StatusCode, 9648 Header: res.Header, 9649 } 9650 } 9651 if err != nil { 9652 return nil, err 9653 } 9654 defer googleapi.CloseBody(res) 9655 if err := googleapi.CheckResponse(res); err != nil { 9656 return nil, err 9657 } 9658 ret := &GooglePrivacyDlpV2InspectTemplate{ 9659 ServerResponse: googleapi.ServerResponse{ 9660 Header: res.Header, 9661 HTTPStatusCode: res.StatusCode, 9662 }, 9663 } 9664 target := &ret 9665 if err := gensupport.DecodeResponse(target, res); err != nil { 9666 return nil, err 9667 } 9668 return ret, nil 9669 // { 9670 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9671 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9672 // "httpMethod": "GET", 9673 // "id": "dlp.organizations.inspectTemplates.get", 9674 // "parameterOrder": [ 9675 // "name" 9676 // ], 9677 // "parameters": { 9678 // "name": { 9679 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9680 // "location": "path", 9681 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9682 // "required": true, 9683 // "type": "string" 9684 // } 9685 // }, 9686 // "path": "v2/{+name}", 9687 // "response": { 9688 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9689 // }, 9690 // "scopes": [ 9691 // "https://www.googleapis.com/auth/cloud-platform" 9692 // ] 9693 // } 9694 9695} 9696 9697// method id "dlp.organizations.inspectTemplates.list": 9698 9699type OrganizationsInspectTemplatesListCall struct { 9700 s *Service 9701 parentid string 9702 urlParams_ gensupport.URLParams 9703 ifNoneMatch_ string 9704 ctx_ context.Context 9705 header_ http.Header 9706} 9707 9708// List: Lists InspectTemplates. See 9709// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9710func (r *OrganizationsInspectTemplatesService) List(parentid string) *OrganizationsInspectTemplatesListCall { 9711 c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9712 c.parentid = parentid 9713 return c 9714} 9715 9716// LocationId sets the optional parameter "locationId": Deprecated. This 9717// field has no effect. 9718func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsInspectTemplatesListCall { 9719 c.urlParams_.Set("locationId", locationId) 9720 return c 9721} 9722 9723// OrderBy sets the optional parameter "orderBy": Comma separated list 9724// of fields to order by, followed by `asc` or `desc` postfix. This list 9725// is case-insensitive, default sorting order is ascending, redundant 9726// space characters are insignificant. Example: `name asc,update_time, 9727// create_time desc` Supported fields are: - `create_time`: corresponds 9728// to time the template was created. - `update_time`: corresponds to 9729// time the template was last updated. - `name`: corresponds to 9730// template's name. - `display_name`: corresponds to template's display 9731// name. 9732func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { 9733 c.urlParams_.Set("orderBy", orderBy) 9734 return c 9735} 9736 9737// PageSize sets the optional parameter "pageSize": Size of the page, 9738// can be limited by server. If zero server returns a page of max size 9739// 100. 9740func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { 9741 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9742 return c 9743} 9744 9745// PageToken sets the optional parameter "pageToken": Page token to 9746// continue retrieval. Comes from previous call to 9747// `ListInspectTemplates`. 9748func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { 9749 c.urlParams_.Set("pageToken", pageToken) 9750 return c 9751} 9752 9753// Fields allows partial responses to be retrieved. See 9754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9755// for more information. 9756func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { 9757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9758 return c 9759} 9760 9761// IfNoneMatch sets the optional parameter which makes the operation 9762// fail if the object's ETag matches the given value. This is useful for 9763// getting updates only after the object has changed since the last 9764// request. Use googleapi.IsNotModified to check whether the response 9765// error from Do is the result of In-None-Match. 9766func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { 9767 c.ifNoneMatch_ = entityTag 9768 return c 9769} 9770 9771// Context sets the context to be used in this call's Do method. Any 9772// pending HTTP request will be aborted if the provided context is 9773// canceled. 9774func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { 9775 c.ctx_ = ctx 9776 return c 9777} 9778 9779// Header returns an http.Header that can be modified by the caller to 9780// add HTTP headers to the request. 9781func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { 9782 if c.header_ == nil { 9783 c.header_ = make(http.Header) 9784 } 9785 return c.header_ 9786} 9787 9788func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9789 reqHeaders := make(http.Header) 9790 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9791 for k, v := range c.header_ { 9792 reqHeaders[k] = v 9793 } 9794 reqHeaders.Set("User-Agent", c.s.userAgent()) 9795 if c.ifNoneMatch_ != "" { 9796 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9797 } 9798 var body io.Reader = nil 9799 c.urlParams_.Set("alt", alt) 9800 c.urlParams_.Set("prettyPrint", "false") 9801 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9802 urls += "?" + c.urlParams_.Encode() 9803 req, err := http.NewRequest("GET", urls, body) 9804 if err != nil { 9805 return nil, err 9806 } 9807 req.Header = reqHeaders 9808 googleapi.Expand(req.URL, map[string]string{ 9809 "parent": c.parentid, 9810 }) 9811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9812} 9813 9814// Do executes the "dlp.organizations.inspectTemplates.list" call. 9815// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 9816// error will be non-nil. Any non-2xx status code is an error. Response 9817// headers are in either 9818// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 9819// or (if a response was returned at all) in 9820// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9821// whether the returned error was because http.StatusNotModified was 9822// returned. 9823func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 9824 gensupport.SetOptions(c.urlParams_, opts...) 9825 res, err := c.doRequest("json") 9826 if res != nil && res.StatusCode == http.StatusNotModified { 9827 if res.Body != nil { 9828 res.Body.Close() 9829 } 9830 return nil, &googleapi.Error{ 9831 Code: res.StatusCode, 9832 Header: res.Header, 9833 } 9834 } 9835 if err != nil { 9836 return nil, err 9837 } 9838 defer googleapi.CloseBody(res) 9839 if err := googleapi.CheckResponse(res); err != nil { 9840 return nil, err 9841 } 9842 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 9843 ServerResponse: googleapi.ServerResponse{ 9844 Header: res.Header, 9845 HTTPStatusCode: res.StatusCode, 9846 }, 9847 } 9848 target := &ret 9849 if err := gensupport.DecodeResponse(target, res); err != nil { 9850 return nil, err 9851 } 9852 return ret, nil 9853 // { 9854 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9855 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9856 // "httpMethod": "GET", 9857 // "id": "dlp.organizations.inspectTemplates.list", 9858 // "parameterOrder": [ 9859 // "parent" 9860 // ], 9861 // "parameters": { 9862 // "locationId": { 9863 // "description": "Deprecated. This field has no effect.", 9864 // "location": "query", 9865 // "type": "string" 9866 // }, 9867 // "orderBy": { 9868 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 9869 // "location": "query", 9870 // "type": "string" 9871 // }, 9872 // "pageSize": { 9873 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 9874 // "format": "int32", 9875 // "location": "query", 9876 // "type": "integer" 9877 // }, 9878 // "pageToken": { 9879 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 9880 // "location": "query", 9881 // "type": "string" 9882 // }, 9883 // "parent": { 9884 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 9885 // "location": "path", 9886 // "pattern": "^organizations/[^/]+$", 9887 // "required": true, 9888 // "type": "string" 9889 // } 9890 // }, 9891 // "path": "v2/{+parent}/inspectTemplates", 9892 // "response": { 9893 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 9894 // }, 9895 // "scopes": [ 9896 // "https://www.googleapis.com/auth/cloud-platform" 9897 // ] 9898 // } 9899 9900} 9901 9902// Pages invokes f for each page of results. 9903// A non-nil error returned from f will halt the iteration. 9904// The provided context supersedes any context provided to the Context method. 9905func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 9906 c.ctx_ = ctx 9907 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9908 for { 9909 x, err := c.Do() 9910 if err != nil { 9911 return err 9912 } 9913 if err := f(x); err != nil { 9914 return err 9915 } 9916 if x.NextPageToken == "" { 9917 return nil 9918 } 9919 c.PageToken(x.NextPageToken) 9920 } 9921} 9922 9923// method id "dlp.organizations.inspectTemplates.patch": 9924 9925type OrganizationsInspectTemplatesPatchCall struct { 9926 s *Service 9927 name string 9928 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 9929 urlParams_ gensupport.URLParams 9930 ctx_ context.Context 9931 header_ http.Header 9932} 9933 9934// Patch: Updates the InspectTemplate. See 9935// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9936func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { 9937 c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9938 c.name = name 9939 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 9940 return c 9941} 9942 9943// Fields allows partial responses to be retrieved. See 9944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9945// for more information. 9946func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { 9947 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9948 return c 9949} 9950 9951// Context sets the context to be used in this call's Do method. Any 9952// pending HTTP request will be aborted if the provided context is 9953// canceled. 9954func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { 9955 c.ctx_ = ctx 9956 return c 9957} 9958 9959// Header returns an http.Header that can be modified by the caller to 9960// add HTTP headers to the request. 9961func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { 9962 if c.header_ == nil { 9963 c.header_ = make(http.Header) 9964 } 9965 return c.header_ 9966} 9967 9968func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9969 reqHeaders := make(http.Header) 9970 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9971 for k, v := range c.header_ { 9972 reqHeaders[k] = v 9973 } 9974 reqHeaders.Set("User-Agent", c.s.userAgent()) 9975 var body io.Reader = nil 9976 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 9977 if err != nil { 9978 return nil, err 9979 } 9980 reqHeaders.Set("Content-Type", "application/json") 9981 c.urlParams_.Set("alt", alt) 9982 c.urlParams_.Set("prettyPrint", "false") 9983 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9984 urls += "?" + c.urlParams_.Encode() 9985 req, err := http.NewRequest("PATCH", urls, body) 9986 if err != nil { 9987 return nil, err 9988 } 9989 req.Header = reqHeaders 9990 googleapi.Expand(req.URL, map[string]string{ 9991 "name": c.name, 9992 }) 9993 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9994} 9995 9996// Do executes the "dlp.organizations.inspectTemplates.patch" call. 9997// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9998// non-nil. Any non-2xx status code is an error. Response headers are in 9999// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 10000// (if a response was returned at all) in 10001// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10002// whether the returned error was because http.StatusNotModified was 10003// returned. 10004func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 10005 gensupport.SetOptions(c.urlParams_, opts...) 10006 res, err := c.doRequest("json") 10007 if res != nil && res.StatusCode == http.StatusNotModified { 10008 if res.Body != nil { 10009 res.Body.Close() 10010 } 10011 return nil, &googleapi.Error{ 10012 Code: res.StatusCode, 10013 Header: res.Header, 10014 } 10015 } 10016 if err != nil { 10017 return nil, err 10018 } 10019 defer googleapi.CloseBody(res) 10020 if err := googleapi.CheckResponse(res); err != nil { 10021 return nil, err 10022 } 10023 ret := &GooglePrivacyDlpV2InspectTemplate{ 10024 ServerResponse: googleapi.ServerResponse{ 10025 Header: res.Header, 10026 HTTPStatusCode: res.StatusCode, 10027 }, 10028 } 10029 target := &ret 10030 if err := gensupport.DecodeResponse(target, res); err != nil { 10031 return nil, err 10032 } 10033 return ret, nil 10034 // { 10035 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 10036 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 10037 // "httpMethod": "PATCH", 10038 // "id": "dlp.organizations.inspectTemplates.patch", 10039 // "parameterOrder": [ 10040 // "name" 10041 // ], 10042 // "parameters": { 10043 // "name": { 10044 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 10045 // "location": "path", 10046 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 10047 // "required": true, 10048 // "type": "string" 10049 // } 10050 // }, 10051 // "path": "v2/{+name}", 10052 // "request": { 10053 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 10054 // }, 10055 // "response": { 10056 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 10057 // }, 10058 // "scopes": [ 10059 // "https://www.googleapis.com/auth/cloud-platform" 10060 // ] 10061 // } 10062 10063} 10064 10065// method id "dlp.organizations.locations.deidentifyTemplates.create": 10066 10067type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { 10068 s *Service 10069 parentid string 10070 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 10071 urlParams_ gensupport.URLParams 10072 ctx_ context.Context 10073 header_ http.Header 10074} 10075 10076// Create: Creates a DeidentifyTemplate for re-using frequently used 10077// configuration for de-identifying content, images, and storage. See 10078// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10079// more. 10080func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10081 c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10082 c.parentid = parentid 10083 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 10084 return c 10085} 10086 10087// Fields allows partial responses to be retrieved. See 10088// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10089// for more information. 10090func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10091 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10092 return c 10093} 10094 10095// Context sets the context to be used in this call's Do method. Any 10096// pending HTTP request will be aborted if the provided context is 10097// canceled. 10098func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10099 c.ctx_ = ctx 10100 return c 10101} 10102 10103// Header returns an http.Header that can be modified by the caller to 10104// add HTTP headers to the request. 10105func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 10106 if c.header_ == nil { 10107 c.header_ = make(http.Header) 10108 } 10109 return c.header_ 10110} 10111 10112func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 10113 reqHeaders := make(http.Header) 10114 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10115 for k, v := range c.header_ { 10116 reqHeaders[k] = v 10117 } 10118 reqHeaders.Set("User-Agent", c.s.userAgent()) 10119 var body io.Reader = nil 10120 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 10121 if err != nil { 10122 return nil, err 10123 } 10124 reqHeaders.Set("Content-Type", "application/json") 10125 c.urlParams_.Set("alt", alt) 10126 c.urlParams_.Set("prettyPrint", "false") 10127 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10128 urls += "?" + c.urlParams_.Encode() 10129 req, err := http.NewRequest("POST", urls, body) 10130 if err != nil { 10131 return nil, err 10132 } 10133 req.Header = reqHeaders 10134 googleapi.Expand(req.URL, map[string]string{ 10135 "parent": c.parentid, 10136 }) 10137 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10138} 10139 10140// Do executes the "dlp.organizations.locations.deidentifyTemplates.create" call. 10141// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10142// non-nil. Any non-2xx status code is an error. Response headers are in 10143// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10144// (if a response was returned at all) in 10145// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10146// whether the returned error was because http.StatusNotModified was 10147// returned. 10148func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10149 gensupport.SetOptions(c.urlParams_, opts...) 10150 res, err := c.doRequest("json") 10151 if res != nil && res.StatusCode == http.StatusNotModified { 10152 if res.Body != nil { 10153 res.Body.Close() 10154 } 10155 return nil, &googleapi.Error{ 10156 Code: res.StatusCode, 10157 Header: res.Header, 10158 } 10159 } 10160 if err != nil { 10161 return nil, err 10162 } 10163 defer googleapi.CloseBody(res) 10164 if err := googleapi.CheckResponse(res); err != nil { 10165 return nil, err 10166 } 10167 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10168 ServerResponse: googleapi.ServerResponse{ 10169 Header: res.Header, 10170 HTTPStatusCode: res.StatusCode, 10171 }, 10172 } 10173 target := &ret 10174 if err := gensupport.DecodeResponse(target, res); err != nil { 10175 return nil, err 10176 } 10177 return ret, nil 10178 // { 10179 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10180 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10181 // "httpMethod": "POST", 10182 // "id": "dlp.organizations.locations.deidentifyTemplates.create", 10183 // "parameterOrder": [ 10184 // "parent" 10185 // ], 10186 // "parameters": { 10187 // "parent": { 10188 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 10189 // "location": "path", 10190 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10191 // "required": true, 10192 // "type": "string" 10193 // } 10194 // }, 10195 // "path": "v2/{+parent}/deidentifyTemplates", 10196 // "request": { 10197 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 10198 // }, 10199 // "response": { 10200 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10201 // }, 10202 // "scopes": [ 10203 // "https://www.googleapis.com/auth/cloud-platform" 10204 // ] 10205 // } 10206 10207} 10208 10209// method id "dlp.organizations.locations.deidentifyTemplates.delete": 10210 10211type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { 10212 s *Service 10213 name string 10214 urlParams_ gensupport.URLParams 10215 ctx_ context.Context 10216 header_ http.Header 10217} 10218 10219// Delete: Deletes a DeidentifyTemplate. See 10220// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10221// more. 10222func (r *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10223 c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10224 c.name = name 10225 return c 10226} 10227 10228// Fields allows partial responses to be retrieved. See 10229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10230// for more information. 10231func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10232 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10233 return c 10234} 10235 10236// Context sets the context to be used in this call's Do method. Any 10237// pending HTTP request will be aborted if the provided context is 10238// canceled. 10239func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10240 c.ctx_ = ctx 10241 return c 10242} 10243 10244// Header returns an http.Header that can be modified by the caller to 10245// add HTTP headers to the request. 10246func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 10247 if c.header_ == nil { 10248 c.header_ = make(http.Header) 10249 } 10250 return c.header_ 10251} 10252 10253func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 10254 reqHeaders := make(http.Header) 10255 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10256 for k, v := range c.header_ { 10257 reqHeaders[k] = v 10258 } 10259 reqHeaders.Set("User-Agent", c.s.userAgent()) 10260 var body io.Reader = nil 10261 c.urlParams_.Set("alt", alt) 10262 c.urlParams_.Set("prettyPrint", "false") 10263 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10264 urls += "?" + c.urlParams_.Encode() 10265 req, err := http.NewRequest("DELETE", urls, body) 10266 if err != nil { 10267 return nil, err 10268 } 10269 req.Header = reqHeaders 10270 googleapi.Expand(req.URL, map[string]string{ 10271 "name": c.name, 10272 }) 10273 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10274} 10275 10276// Do executes the "dlp.organizations.locations.deidentifyTemplates.delete" call. 10277// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10278// non-2xx status code is an error. Response headers are in either 10279// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10280// returned at all) in error.(*googleapi.Error).Header. Use 10281// googleapi.IsNotModified to check whether the returned error was 10282// because http.StatusNotModified was returned. 10283func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10284 gensupport.SetOptions(c.urlParams_, opts...) 10285 res, err := c.doRequest("json") 10286 if res != nil && res.StatusCode == http.StatusNotModified { 10287 if res.Body != nil { 10288 res.Body.Close() 10289 } 10290 return nil, &googleapi.Error{ 10291 Code: res.StatusCode, 10292 Header: res.Header, 10293 } 10294 } 10295 if err != nil { 10296 return nil, err 10297 } 10298 defer googleapi.CloseBody(res) 10299 if err := googleapi.CheckResponse(res); err != nil { 10300 return nil, err 10301 } 10302 ret := &GoogleProtobufEmpty{ 10303 ServerResponse: googleapi.ServerResponse{ 10304 Header: res.Header, 10305 HTTPStatusCode: res.StatusCode, 10306 }, 10307 } 10308 target := &ret 10309 if err := gensupport.DecodeResponse(target, res); err != nil { 10310 return nil, err 10311 } 10312 return ret, nil 10313 // { 10314 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10315 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10316 // "httpMethod": "DELETE", 10317 // "id": "dlp.organizations.locations.deidentifyTemplates.delete", 10318 // "parameterOrder": [ 10319 // "name" 10320 // ], 10321 // "parameters": { 10322 // "name": { 10323 // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 10324 // "location": "path", 10325 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10326 // "required": true, 10327 // "type": "string" 10328 // } 10329 // }, 10330 // "path": "v2/{+name}", 10331 // "response": { 10332 // "$ref": "GoogleProtobufEmpty" 10333 // }, 10334 // "scopes": [ 10335 // "https://www.googleapis.com/auth/cloud-platform" 10336 // ] 10337 // } 10338 10339} 10340 10341// method id "dlp.organizations.locations.deidentifyTemplates.get": 10342 10343type OrganizationsLocationsDeidentifyTemplatesGetCall struct { 10344 s *Service 10345 name string 10346 urlParams_ gensupport.URLParams 10347 ifNoneMatch_ string 10348 ctx_ context.Context 10349 header_ http.Header 10350} 10351 10352// Get: Gets a DeidentifyTemplate. See 10353// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10354// more. 10355func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10356 c := &OrganizationsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10357 c.name = name 10358 return c 10359} 10360 10361// Fields allows partial responses to be retrieved. See 10362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10363// for more information. 10364func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10365 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10366 return c 10367} 10368 10369// IfNoneMatch sets the optional parameter which makes the operation 10370// fail if the object's ETag matches the given value. This is useful for 10371// getting updates only after the object has changed since the last 10372// request. Use googleapi.IsNotModified to check whether the response 10373// error from Do is the result of In-None-Match. 10374func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10375 c.ifNoneMatch_ = entityTag 10376 return c 10377} 10378 10379// Context sets the context to be used in this call's Do method. Any 10380// pending HTTP request will be aborted if the provided context is 10381// canceled. 10382func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10383 c.ctx_ = ctx 10384 return c 10385} 10386 10387// Header returns an http.Header that can be modified by the caller to 10388// add HTTP headers to the request. 10389func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 10390 if c.header_ == nil { 10391 c.header_ = make(http.Header) 10392 } 10393 return c.header_ 10394} 10395 10396func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 10397 reqHeaders := make(http.Header) 10398 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10399 for k, v := range c.header_ { 10400 reqHeaders[k] = v 10401 } 10402 reqHeaders.Set("User-Agent", c.s.userAgent()) 10403 if c.ifNoneMatch_ != "" { 10404 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10405 } 10406 var body io.Reader = nil 10407 c.urlParams_.Set("alt", alt) 10408 c.urlParams_.Set("prettyPrint", "false") 10409 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10410 urls += "?" + c.urlParams_.Encode() 10411 req, err := http.NewRequest("GET", urls, body) 10412 if err != nil { 10413 return nil, err 10414 } 10415 req.Header = reqHeaders 10416 googleapi.Expand(req.URL, map[string]string{ 10417 "name": c.name, 10418 }) 10419 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10420} 10421 10422// Do executes the "dlp.organizations.locations.deidentifyTemplates.get" call. 10423// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10424// non-nil. Any non-2xx status code is an error. Response headers are in 10425// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10426// (if a response was returned at all) in 10427// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10428// whether the returned error was because http.StatusNotModified was 10429// returned. 10430func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10431 gensupport.SetOptions(c.urlParams_, opts...) 10432 res, err := c.doRequest("json") 10433 if res != nil && res.StatusCode == http.StatusNotModified { 10434 if res.Body != nil { 10435 res.Body.Close() 10436 } 10437 return nil, &googleapi.Error{ 10438 Code: res.StatusCode, 10439 Header: res.Header, 10440 } 10441 } 10442 if err != nil { 10443 return nil, err 10444 } 10445 defer googleapi.CloseBody(res) 10446 if err := googleapi.CheckResponse(res); err != nil { 10447 return nil, err 10448 } 10449 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10450 ServerResponse: googleapi.ServerResponse{ 10451 Header: res.Header, 10452 HTTPStatusCode: res.StatusCode, 10453 }, 10454 } 10455 target := &ret 10456 if err := gensupport.DecodeResponse(target, res); err != nil { 10457 return nil, err 10458 } 10459 return ret, nil 10460 // { 10461 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10462 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10463 // "httpMethod": "GET", 10464 // "id": "dlp.organizations.locations.deidentifyTemplates.get", 10465 // "parameterOrder": [ 10466 // "name" 10467 // ], 10468 // "parameters": { 10469 // "name": { 10470 // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 10471 // "location": "path", 10472 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10473 // "required": true, 10474 // "type": "string" 10475 // } 10476 // }, 10477 // "path": "v2/{+name}", 10478 // "response": { 10479 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10480 // }, 10481 // "scopes": [ 10482 // "https://www.googleapis.com/auth/cloud-platform" 10483 // ] 10484 // } 10485 10486} 10487 10488// method id "dlp.organizations.locations.deidentifyTemplates.list": 10489 10490type OrganizationsLocationsDeidentifyTemplatesListCall struct { 10491 s *Service 10492 parentid string 10493 urlParams_ gensupport.URLParams 10494 ifNoneMatch_ string 10495 ctx_ context.Context 10496 header_ http.Header 10497} 10498 10499// List: Lists DeidentifyTemplates. See 10500// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10501// more. 10502func (r *OrganizationsLocationsDeidentifyTemplatesService) List(parentid string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10503 c := &OrganizationsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10504 c.parentid = parentid 10505 return c 10506} 10507 10508// LocationId sets the optional parameter "locationId": Deprecated. This 10509// field has no effect. 10510func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10511 c.urlParams_.Set("locationId", locationId) 10512 return c 10513} 10514 10515// OrderBy sets the optional parameter "orderBy": Comma separated list 10516// of fields to order by, followed by `asc` or `desc` postfix. This list 10517// is case-insensitive, default sorting order is ascending, redundant 10518// space characters are insignificant. Example: `name asc,update_time, 10519// create_time desc` Supported fields are: - `create_time`: corresponds 10520// to time the template was created. - `update_time`: corresponds to 10521// time the template was last updated. - `name`: corresponds to 10522// template's name. - `display_name`: corresponds to template's display 10523// name. 10524func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10525 c.urlParams_.Set("orderBy", orderBy) 10526 return c 10527} 10528 10529// PageSize sets the optional parameter "pageSize": Size of the page, 10530// can be limited by server. If zero server returns a page of max size 10531// 100. 10532func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { 10533 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10534 return c 10535} 10536 10537// PageToken sets the optional parameter "pageToken": Page token to 10538// continue retrieval. Comes from previous call to 10539// `ListDeidentifyTemplates`. 10540func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10541 c.urlParams_.Set("pageToken", pageToken) 10542 return c 10543} 10544 10545// Fields allows partial responses to be retrieved. See 10546// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10547// for more information. 10548func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { 10549 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10550 return c 10551} 10552 10553// IfNoneMatch sets the optional parameter which makes the operation 10554// fail if the object's ETag matches the given value. This is useful for 10555// getting updates only after the object has changed since the last 10556// request. Use googleapi.IsNotModified to check whether the response 10557// error from Do is the result of In-None-Match. 10558func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10559 c.ifNoneMatch_ = entityTag 10560 return c 10561} 10562 10563// Context sets the context to be used in this call's Do method. Any 10564// pending HTTP request will be aborted if the provided context is 10565// canceled. 10566func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { 10567 c.ctx_ = ctx 10568 return c 10569} 10570 10571// Header returns an http.Header that can be modified by the caller to 10572// add HTTP headers to the request. 10573func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { 10574 if c.header_ == nil { 10575 c.header_ = make(http.Header) 10576 } 10577 return c.header_ 10578} 10579 10580func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 10581 reqHeaders := make(http.Header) 10582 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10583 for k, v := range c.header_ { 10584 reqHeaders[k] = v 10585 } 10586 reqHeaders.Set("User-Agent", c.s.userAgent()) 10587 if c.ifNoneMatch_ != "" { 10588 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10589 } 10590 var body io.Reader = nil 10591 c.urlParams_.Set("alt", alt) 10592 c.urlParams_.Set("prettyPrint", "false") 10593 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10594 urls += "?" + c.urlParams_.Encode() 10595 req, err := http.NewRequest("GET", urls, body) 10596 if err != nil { 10597 return nil, err 10598 } 10599 req.Header = reqHeaders 10600 googleapi.Expand(req.URL, map[string]string{ 10601 "parent": c.parentid, 10602 }) 10603 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10604} 10605 10606// Do executes the "dlp.organizations.locations.deidentifyTemplates.list" call. 10607// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 10608// error will be non-nil. Any non-2xx status code is an error. Response 10609// headers are in either 10610// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 10611// er or (if a response was returned at all) in 10612// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10613// whether the returned error was because http.StatusNotModified was 10614// returned. 10615func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 10616 gensupport.SetOptions(c.urlParams_, opts...) 10617 res, err := c.doRequest("json") 10618 if res != nil && res.StatusCode == http.StatusNotModified { 10619 if res.Body != nil { 10620 res.Body.Close() 10621 } 10622 return nil, &googleapi.Error{ 10623 Code: res.StatusCode, 10624 Header: res.Header, 10625 } 10626 } 10627 if err != nil { 10628 return nil, err 10629 } 10630 defer googleapi.CloseBody(res) 10631 if err := googleapi.CheckResponse(res); err != nil { 10632 return nil, err 10633 } 10634 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 10635 ServerResponse: googleapi.ServerResponse{ 10636 Header: res.Header, 10637 HTTPStatusCode: res.StatusCode, 10638 }, 10639 } 10640 target := &ret 10641 if err := gensupport.DecodeResponse(target, res); err != nil { 10642 return nil, err 10643 } 10644 return ret, nil 10645 // { 10646 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10647 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10648 // "httpMethod": "GET", 10649 // "id": "dlp.organizations.locations.deidentifyTemplates.list", 10650 // "parameterOrder": [ 10651 // "parent" 10652 // ], 10653 // "parameters": { 10654 // "locationId": { 10655 // "description": "Deprecated. This field has no effect.", 10656 // "location": "query", 10657 // "type": "string" 10658 // }, 10659 // "orderBy": { 10660 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 10661 // "location": "query", 10662 // "type": "string" 10663 // }, 10664 // "pageSize": { 10665 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 10666 // "format": "int32", 10667 // "location": "query", 10668 // "type": "integer" 10669 // }, 10670 // "pageToken": { 10671 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 10672 // "location": "query", 10673 // "type": "string" 10674 // }, 10675 // "parent": { 10676 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 10677 // "location": "path", 10678 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10679 // "required": true, 10680 // "type": "string" 10681 // } 10682 // }, 10683 // "path": "v2/{+parent}/deidentifyTemplates", 10684 // "response": { 10685 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 10686 // }, 10687 // "scopes": [ 10688 // "https://www.googleapis.com/auth/cloud-platform" 10689 // ] 10690 // } 10691 10692} 10693 10694// Pages invokes f for each page of results. 10695// A non-nil error returned from f will halt the iteration. 10696// The provided context supersedes any context provided to the Context method. 10697func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 10698 c.ctx_ = ctx 10699 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10700 for { 10701 x, err := c.Do() 10702 if err != nil { 10703 return err 10704 } 10705 if err := f(x); err != nil { 10706 return err 10707 } 10708 if x.NextPageToken == "" { 10709 return nil 10710 } 10711 c.PageToken(x.NextPageToken) 10712 } 10713} 10714 10715// method id "dlp.organizations.locations.deidentifyTemplates.patch": 10716 10717type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { 10718 s *Service 10719 name string 10720 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 10721 urlParams_ gensupport.URLParams 10722 ctx_ context.Context 10723 header_ http.Header 10724} 10725 10726// Patch: Updates the DeidentifyTemplate. See 10727// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10728// more. 10729func (r *OrganizationsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10730 c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10731 c.name = name 10732 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 10733 return c 10734} 10735 10736// Fields allows partial responses to be retrieved. See 10737// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10738// for more information. 10739func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10740 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10741 return c 10742} 10743 10744// Context sets the context to be used in this call's Do method. Any 10745// pending HTTP request will be aborted if the provided context is 10746// canceled. 10747func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10748 c.ctx_ = ctx 10749 return c 10750} 10751 10752// Header returns an http.Header that can be modified by the caller to 10753// add HTTP headers to the request. 10754func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 10755 if c.header_ == nil { 10756 c.header_ = make(http.Header) 10757 } 10758 return c.header_ 10759} 10760 10761func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 10762 reqHeaders := make(http.Header) 10763 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10764 for k, v := range c.header_ { 10765 reqHeaders[k] = v 10766 } 10767 reqHeaders.Set("User-Agent", c.s.userAgent()) 10768 var body io.Reader = nil 10769 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 10770 if err != nil { 10771 return nil, err 10772 } 10773 reqHeaders.Set("Content-Type", "application/json") 10774 c.urlParams_.Set("alt", alt) 10775 c.urlParams_.Set("prettyPrint", "false") 10776 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10777 urls += "?" + c.urlParams_.Encode() 10778 req, err := http.NewRequest("PATCH", urls, body) 10779 if err != nil { 10780 return nil, err 10781 } 10782 req.Header = reqHeaders 10783 googleapi.Expand(req.URL, map[string]string{ 10784 "name": c.name, 10785 }) 10786 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10787} 10788 10789// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" call. 10790// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10791// non-nil. Any non-2xx status code is an error. Response headers are in 10792// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10793// (if a response was returned at all) in 10794// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10795// whether the returned error was because http.StatusNotModified was 10796// returned. 10797func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10798 gensupport.SetOptions(c.urlParams_, opts...) 10799 res, err := c.doRequest("json") 10800 if res != nil && res.StatusCode == http.StatusNotModified { 10801 if res.Body != nil { 10802 res.Body.Close() 10803 } 10804 return nil, &googleapi.Error{ 10805 Code: res.StatusCode, 10806 Header: res.Header, 10807 } 10808 } 10809 if err != nil { 10810 return nil, err 10811 } 10812 defer googleapi.CloseBody(res) 10813 if err := googleapi.CheckResponse(res); err != nil { 10814 return nil, err 10815 } 10816 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10817 ServerResponse: googleapi.ServerResponse{ 10818 Header: res.Header, 10819 HTTPStatusCode: res.StatusCode, 10820 }, 10821 } 10822 target := &ret 10823 if err := gensupport.DecodeResponse(target, res); err != nil { 10824 return nil, err 10825 } 10826 return ret, nil 10827 // { 10828 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10829 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10830 // "httpMethod": "PATCH", 10831 // "id": "dlp.organizations.locations.deidentifyTemplates.patch", 10832 // "parameterOrder": [ 10833 // "name" 10834 // ], 10835 // "parameters": { 10836 // "name": { 10837 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 10838 // "location": "path", 10839 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10840 // "required": true, 10841 // "type": "string" 10842 // } 10843 // }, 10844 // "path": "v2/{+name}", 10845 // "request": { 10846 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 10847 // }, 10848 // "response": { 10849 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10850 // }, 10851 // "scopes": [ 10852 // "https://www.googleapis.com/auth/cloud-platform" 10853 // ] 10854 // } 10855 10856} 10857 10858// method id "dlp.organizations.locations.inspectTemplates.create": 10859 10860type OrganizationsLocationsInspectTemplatesCreateCall struct { 10861 s *Service 10862 parentid string 10863 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 10864 urlParams_ gensupport.URLParams 10865 ctx_ context.Context 10866 header_ http.Header 10867} 10868 10869// Create: Creates an InspectTemplate for re-using frequently used 10870// configuration for inspecting content, images, and storage. See 10871// https://cloud.google.com/dlp/docs/creating-templates to learn more. 10872func (r *OrganizationsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesCreateCall { 10873 c := &OrganizationsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10874 c.parentid = parentid 10875 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 10876 return c 10877} 10878 10879// Fields allows partial responses to be retrieved. See 10880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10881// for more information. 10882func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { 10883 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10884 return c 10885} 10886 10887// Context sets the context to be used in this call's Do method. Any 10888// pending HTTP request will be aborted if the provided context is 10889// canceled. 10890func (c *OrganizationsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesCreateCall { 10891 c.ctx_ = ctx 10892 return c 10893} 10894 10895// Header returns an http.Header that can be modified by the caller to 10896// add HTTP headers to the request. 10897func (c *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { 10898 if c.header_ == nil { 10899 c.header_ = make(http.Header) 10900 } 10901 return c.header_ 10902} 10903 10904func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 10905 reqHeaders := make(http.Header) 10906 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10907 for k, v := range c.header_ { 10908 reqHeaders[k] = v 10909 } 10910 reqHeaders.Set("User-Agent", c.s.userAgent()) 10911 var body io.Reader = nil 10912 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 10913 if err != nil { 10914 return nil, err 10915 } 10916 reqHeaders.Set("Content-Type", "application/json") 10917 c.urlParams_.Set("alt", alt) 10918 c.urlParams_.Set("prettyPrint", "false") 10919 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 10920 urls += "?" + c.urlParams_.Encode() 10921 req, err := http.NewRequest("POST", urls, body) 10922 if err != nil { 10923 return nil, err 10924 } 10925 req.Header = reqHeaders 10926 googleapi.Expand(req.URL, map[string]string{ 10927 "parent": c.parentid, 10928 }) 10929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10930} 10931 10932// Do executes the "dlp.organizations.locations.inspectTemplates.create" call. 10933// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 10934// non-nil. Any non-2xx status code is an error. Response headers are in 10935// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 10936// (if a response was returned at all) in 10937// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10938// whether the returned error was because http.StatusNotModified was 10939// returned. 10940func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 10941 gensupport.SetOptions(c.urlParams_, opts...) 10942 res, err := c.doRequest("json") 10943 if res != nil && res.StatusCode == http.StatusNotModified { 10944 if res.Body != nil { 10945 res.Body.Close() 10946 } 10947 return nil, &googleapi.Error{ 10948 Code: res.StatusCode, 10949 Header: res.Header, 10950 } 10951 } 10952 if err != nil { 10953 return nil, err 10954 } 10955 defer googleapi.CloseBody(res) 10956 if err := googleapi.CheckResponse(res); err != nil { 10957 return nil, err 10958 } 10959 ret := &GooglePrivacyDlpV2InspectTemplate{ 10960 ServerResponse: googleapi.ServerResponse{ 10961 Header: res.Header, 10962 HTTPStatusCode: res.StatusCode, 10963 }, 10964 } 10965 target := &ret 10966 if err := gensupport.DecodeResponse(target, res); err != nil { 10967 return nil, err 10968 } 10969 return ret, nil 10970 // { 10971 // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 10972 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 10973 // "httpMethod": "POST", 10974 // "id": "dlp.organizations.locations.inspectTemplates.create", 10975 // "parameterOrder": [ 10976 // "parent" 10977 // ], 10978 // "parameters": { 10979 // "parent": { 10980 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 10981 // "location": "path", 10982 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10983 // "required": true, 10984 // "type": "string" 10985 // } 10986 // }, 10987 // "path": "v2/{+parent}/inspectTemplates", 10988 // "request": { 10989 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 10990 // }, 10991 // "response": { 10992 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 10993 // }, 10994 // "scopes": [ 10995 // "https://www.googleapis.com/auth/cloud-platform" 10996 // ] 10997 // } 10998 10999} 11000 11001// method id "dlp.organizations.locations.inspectTemplates.delete": 11002 11003type OrganizationsLocationsInspectTemplatesDeleteCall struct { 11004 s *Service 11005 name string 11006 urlParams_ gensupport.URLParams 11007 ctx_ context.Context 11008 header_ http.Header 11009} 11010 11011// Delete: Deletes an InspectTemplate. See 11012// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11013func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *OrganizationsLocationsInspectTemplatesDeleteCall { 11014 c := &OrganizationsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11015 c.name = name 11016 return c 11017} 11018 11019// Fields allows partial responses to be retrieved. See 11020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11021// for more information. 11022func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { 11023 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11024 return c 11025} 11026 11027// Context sets the context to be used in this call's Do method. Any 11028// pending HTTP request will be aborted if the provided context is 11029// canceled. 11030func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { 11031 c.ctx_ = ctx 11032 return c 11033} 11034 11035// Header returns an http.Header that can be modified by the caller to 11036// add HTTP headers to the request. 11037func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { 11038 if c.header_ == nil { 11039 c.header_ = make(http.Header) 11040 } 11041 return c.header_ 11042} 11043 11044func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 11045 reqHeaders := make(http.Header) 11046 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11047 for k, v := range c.header_ { 11048 reqHeaders[k] = v 11049 } 11050 reqHeaders.Set("User-Agent", c.s.userAgent()) 11051 var body io.Reader = nil 11052 c.urlParams_.Set("alt", alt) 11053 c.urlParams_.Set("prettyPrint", "false") 11054 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11055 urls += "?" + c.urlParams_.Encode() 11056 req, err := http.NewRequest("DELETE", urls, body) 11057 if err != nil { 11058 return nil, err 11059 } 11060 req.Header = reqHeaders 11061 googleapi.Expand(req.URL, map[string]string{ 11062 "name": c.name, 11063 }) 11064 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11065} 11066 11067// Do executes the "dlp.organizations.locations.inspectTemplates.delete" call. 11068// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11069// non-2xx status code is an error. Response headers are in either 11070// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11071// returned at all) in error.(*googleapi.Error).Header. Use 11072// googleapi.IsNotModified to check whether the returned error was 11073// because http.StatusNotModified was returned. 11074func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11075 gensupport.SetOptions(c.urlParams_, opts...) 11076 res, err := c.doRequest("json") 11077 if res != nil && res.StatusCode == http.StatusNotModified { 11078 if res.Body != nil { 11079 res.Body.Close() 11080 } 11081 return nil, &googleapi.Error{ 11082 Code: res.StatusCode, 11083 Header: res.Header, 11084 } 11085 } 11086 if err != nil { 11087 return nil, err 11088 } 11089 defer googleapi.CloseBody(res) 11090 if err := googleapi.CheckResponse(res); err != nil { 11091 return nil, err 11092 } 11093 ret := &GoogleProtobufEmpty{ 11094 ServerResponse: googleapi.ServerResponse{ 11095 Header: res.Header, 11096 HTTPStatusCode: res.StatusCode, 11097 }, 11098 } 11099 target := &ret 11100 if err := gensupport.DecodeResponse(target, res); err != nil { 11101 return nil, err 11102 } 11103 return ret, nil 11104 // { 11105 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11106 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11107 // "httpMethod": "DELETE", 11108 // "id": "dlp.organizations.locations.inspectTemplates.delete", 11109 // "parameterOrder": [ 11110 // "name" 11111 // ], 11112 // "parameters": { 11113 // "name": { 11114 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11115 // "location": "path", 11116 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11117 // "required": true, 11118 // "type": "string" 11119 // } 11120 // }, 11121 // "path": "v2/{+name}", 11122 // "response": { 11123 // "$ref": "GoogleProtobufEmpty" 11124 // }, 11125 // "scopes": [ 11126 // "https://www.googleapis.com/auth/cloud-platform" 11127 // ] 11128 // } 11129 11130} 11131 11132// method id "dlp.organizations.locations.inspectTemplates.get": 11133 11134type OrganizationsLocationsInspectTemplatesGetCall struct { 11135 s *Service 11136 name string 11137 urlParams_ gensupport.URLParams 11138 ifNoneMatch_ string 11139 ctx_ context.Context 11140 header_ http.Header 11141} 11142 11143// Get: Gets an InspectTemplate. See 11144// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11145func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { 11146 c := &OrganizationsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11147 c.name = name 11148 return c 11149} 11150 11151// Fields allows partial responses to be retrieved. See 11152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11153// for more information. 11154func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { 11155 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11156 return c 11157} 11158 11159// IfNoneMatch sets the optional parameter which makes the operation 11160// fail if the object's ETag matches the given value. This is useful for 11161// getting updates only after the object has changed since the last 11162// request. Use googleapi.IsNotModified to check whether the response 11163// error from Do is the result of In-None-Match. 11164func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { 11165 c.ifNoneMatch_ = entityTag 11166 return c 11167} 11168 11169// Context sets the context to be used in this call's Do method. Any 11170// pending HTTP request will be aborted if the provided context is 11171// canceled. 11172func (c *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { 11173 c.ctx_ = ctx 11174 return c 11175} 11176 11177// Header returns an http.Header that can be modified by the caller to 11178// add HTTP headers to the request. 11179func (c *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { 11180 if c.header_ == nil { 11181 c.header_ = make(http.Header) 11182 } 11183 return c.header_ 11184} 11185 11186func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 11187 reqHeaders := make(http.Header) 11188 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11189 for k, v := range c.header_ { 11190 reqHeaders[k] = v 11191 } 11192 reqHeaders.Set("User-Agent", c.s.userAgent()) 11193 if c.ifNoneMatch_ != "" { 11194 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11195 } 11196 var body io.Reader = nil 11197 c.urlParams_.Set("alt", alt) 11198 c.urlParams_.Set("prettyPrint", "false") 11199 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11200 urls += "?" + c.urlParams_.Encode() 11201 req, err := http.NewRequest("GET", urls, body) 11202 if err != nil { 11203 return nil, err 11204 } 11205 req.Header = reqHeaders 11206 googleapi.Expand(req.URL, map[string]string{ 11207 "name": c.name, 11208 }) 11209 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11210} 11211 11212// Do executes the "dlp.organizations.locations.inspectTemplates.get" call. 11213// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11214// non-nil. Any non-2xx status code is an error. Response headers are in 11215// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11216// (if a response was returned at all) in 11217// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11218// whether the returned error was because http.StatusNotModified was 11219// returned. 11220func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11221 gensupport.SetOptions(c.urlParams_, opts...) 11222 res, err := c.doRequest("json") 11223 if res != nil && res.StatusCode == http.StatusNotModified { 11224 if res.Body != nil { 11225 res.Body.Close() 11226 } 11227 return nil, &googleapi.Error{ 11228 Code: res.StatusCode, 11229 Header: res.Header, 11230 } 11231 } 11232 if err != nil { 11233 return nil, err 11234 } 11235 defer googleapi.CloseBody(res) 11236 if err := googleapi.CheckResponse(res); err != nil { 11237 return nil, err 11238 } 11239 ret := &GooglePrivacyDlpV2InspectTemplate{ 11240 ServerResponse: googleapi.ServerResponse{ 11241 Header: res.Header, 11242 HTTPStatusCode: res.StatusCode, 11243 }, 11244 } 11245 target := &ret 11246 if err := gensupport.DecodeResponse(target, res); err != nil { 11247 return nil, err 11248 } 11249 return ret, nil 11250 // { 11251 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11252 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11253 // "httpMethod": "GET", 11254 // "id": "dlp.organizations.locations.inspectTemplates.get", 11255 // "parameterOrder": [ 11256 // "name" 11257 // ], 11258 // "parameters": { 11259 // "name": { 11260 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11261 // "location": "path", 11262 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11263 // "required": true, 11264 // "type": "string" 11265 // } 11266 // }, 11267 // "path": "v2/{+name}", 11268 // "response": { 11269 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11270 // }, 11271 // "scopes": [ 11272 // "https://www.googleapis.com/auth/cloud-platform" 11273 // ] 11274 // } 11275 11276} 11277 11278// method id "dlp.organizations.locations.inspectTemplates.list": 11279 11280type OrganizationsLocationsInspectTemplatesListCall struct { 11281 s *Service 11282 parentid string 11283 urlParams_ gensupport.URLParams 11284 ifNoneMatch_ string 11285 ctx_ context.Context 11286 header_ http.Header 11287} 11288 11289// List: Lists InspectTemplates. See 11290// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11291func (r *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { 11292 c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11293 c.parentid = parentid 11294 return c 11295} 11296 11297// LocationId sets the optional parameter "locationId": Deprecated. This 11298// field has no effect. 11299func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsInspectTemplatesListCall { 11300 c.urlParams_.Set("locationId", locationId) 11301 return c 11302} 11303 11304// OrderBy sets the optional parameter "orderBy": Comma separated list 11305// of fields to order by, followed by `asc` or `desc` postfix. This list 11306// is case-insensitive, default sorting order is ascending, redundant 11307// space characters are insignificant. Example: `name asc,update_time, 11308// create_time desc` Supported fields are: - `create_time`: corresponds 11309// to time the template was created. - `update_time`: corresponds to 11310// time the template was last updated. - `name`: corresponds to 11311// template's name. - `display_name`: corresponds to template's display 11312// name. 11313func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { 11314 c.urlParams_.Set("orderBy", orderBy) 11315 return c 11316} 11317 11318// PageSize sets the optional parameter "pageSize": Size of the page, 11319// can be limited by server. If zero server returns a page of max size 11320// 100. 11321func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { 11322 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11323 return c 11324} 11325 11326// PageToken sets the optional parameter "pageToken": Page token to 11327// continue retrieval. Comes from previous call to 11328// `ListInspectTemplates`. 11329func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { 11330 c.urlParams_.Set("pageToken", pageToken) 11331 return c 11332} 11333 11334// Fields allows partial responses to be retrieved. See 11335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11336// for more information. 11337func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesListCall { 11338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11339 return c 11340} 11341 11342// IfNoneMatch sets the optional parameter which makes the operation 11343// fail if the object's ETag matches the given value. This is useful for 11344// getting updates only after the object has changed since the last 11345// request. Use googleapi.IsNotModified to check whether the response 11346// error from Do is the result of In-None-Match. 11347func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesListCall { 11348 c.ifNoneMatch_ = entityTag 11349 return c 11350} 11351 11352// Context sets the context to be used in this call's Do method. Any 11353// pending HTTP request will be aborted if the provided context is 11354// canceled. 11355func (c *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { 11356 c.ctx_ = ctx 11357 return c 11358} 11359 11360// Header returns an http.Header that can be modified by the caller to 11361// add HTTP headers to the request. 11362func (c *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { 11363 if c.header_ == nil { 11364 c.header_ = make(http.Header) 11365 } 11366 return c.header_ 11367} 11368 11369func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 11370 reqHeaders := make(http.Header) 11371 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11372 for k, v := range c.header_ { 11373 reqHeaders[k] = v 11374 } 11375 reqHeaders.Set("User-Agent", c.s.userAgent()) 11376 if c.ifNoneMatch_ != "" { 11377 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11378 } 11379 var body io.Reader = nil 11380 c.urlParams_.Set("alt", alt) 11381 c.urlParams_.Set("prettyPrint", "false") 11382 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 11383 urls += "?" + c.urlParams_.Encode() 11384 req, err := http.NewRequest("GET", urls, body) 11385 if err != nil { 11386 return nil, err 11387 } 11388 req.Header = reqHeaders 11389 googleapi.Expand(req.URL, map[string]string{ 11390 "parent": c.parentid, 11391 }) 11392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11393} 11394 11395// Do executes the "dlp.organizations.locations.inspectTemplates.list" call. 11396// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 11397// error will be non-nil. Any non-2xx status code is an error. Response 11398// headers are in either 11399// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 11400// or (if a response was returned at all) in 11401// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11402// whether the returned error was because http.StatusNotModified was 11403// returned. 11404func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 11405 gensupport.SetOptions(c.urlParams_, opts...) 11406 res, err := c.doRequest("json") 11407 if res != nil && res.StatusCode == http.StatusNotModified { 11408 if res.Body != nil { 11409 res.Body.Close() 11410 } 11411 return nil, &googleapi.Error{ 11412 Code: res.StatusCode, 11413 Header: res.Header, 11414 } 11415 } 11416 if err != nil { 11417 return nil, err 11418 } 11419 defer googleapi.CloseBody(res) 11420 if err := googleapi.CheckResponse(res); err != nil { 11421 return nil, err 11422 } 11423 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 11424 ServerResponse: googleapi.ServerResponse{ 11425 Header: res.Header, 11426 HTTPStatusCode: res.StatusCode, 11427 }, 11428 } 11429 target := &ret 11430 if err := gensupport.DecodeResponse(target, res); err != nil { 11431 return nil, err 11432 } 11433 return ret, nil 11434 // { 11435 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11436 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 11437 // "httpMethod": "GET", 11438 // "id": "dlp.organizations.locations.inspectTemplates.list", 11439 // "parameterOrder": [ 11440 // "parent" 11441 // ], 11442 // "parameters": { 11443 // "locationId": { 11444 // "description": "Deprecated. This field has no effect.", 11445 // "location": "query", 11446 // "type": "string" 11447 // }, 11448 // "orderBy": { 11449 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 11450 // "location": "query", 11451 // "type": "string" 11452 // }, 11453 // "pageSize": { 11454 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 11455 // "format": "int32", 11456 // "location": "query", 11457 // "type": "integer" 11458 // }, 11459 // "pageToken": { 11460 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 11461 // "location": "query", 11462 // "type": "string" 11463 // }, 11464 // "parent": { 11465 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 11466 // "location": "path", 11467 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11468 // "required": true, 11469 // "type": "string" 11470 // } 11471 // }, 11472 // "path": "v2/{+parent}/inspectTemplates", 11473 // "response": { 11474 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 11475 // }, 11476 // "scopes": [ 11477 // "https://www.googleapis.com/auth/cloud-platform" 11478 // ] 11479 // } 11480 11481} 11482 11483// Pages invokes f for each page of results. 11484// A non-nil error returned from f will halt the iteration. 11485// The provided context supersedes any context provided to the Context method. 11486func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 11487 c.ctx_ = ctx 11488 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11489 for { 11490 x, err := c.Do() 11491 if err != nil { 11492 return err 11493 } 11494 if err := f(x); err != nil { 11495 return err 11496 } 11497 if x.NextPageToken == "" { 11498 return nil 11499 } 11500 c.PageToken(x.NextPageToken) 11501 } 11502} 11503 11504// method id "dlp.organizations.locations.inspectTemplates.patch": 11505 11506type OrganizationsLocationsInspectTemplatesPatchCall struct { 11507 s *Service 11508 name string 11509 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 11510 urlParams_ gensupport.URLParams 11511 ctx_ context.Context 11512 header_ http.Header 11513} 11514 11515// Patch: Updates the InspectTemplate. See 11516// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11517func (r *OrganizationsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { 11518 c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11519 c.name = name 11520 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 11521 return c 11522} 11523 11524// Fields allows partial responses to be retrieved. See 11525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11526// for more information. 11527func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { 11528 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11529 return c 11530} 11531 11532// Context sets the context to be used in this call's Do method. Any 11533// pending HTTP request will be aborted if the provided context is 11534// canceled. 11535func (c *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { 11536 c.ctx_ = ctx 11537 return c 11538} 11539 11540// Header returns an http.Header that can be modified by the caller to 11541// add HTTP headers to the request. 11542func (c *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { 11543 if c.header_ == nil { 11544 c.header_ = make(http.Header) 11545 } 11546 return c.header_ 11547} 11548 11549func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 11550 reqHeaders := make(http.Header) 11551 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11552 for k, v := range c.header_ { 11553 reqHeaders[k] = v 11554 } 11555 reqHeaders.Set("User-Agent", c.s.userAgent()) 11556 var body io.Reader = nil 11557 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 11558 if err != nil { 11559 return nil, err 11560 } 11561 reqHeaders.Set("Content-Type", "application/json") 11562 c.urlParams_.Set("alt", alt) 11563 c.urlParams_.Set("prettyPrint", "false") 11564 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11565 urls += "?" + c.urlParams_.Encode() 11566 req, err := http.NewRequest("PATCH", urls, body) 11567 if err != nil { 11568 return nil, err 11569 } 11570 req.Header = reqHeaders 11571 googleapi.Expand(req.URL, map[string]string{ 11572 "name": c.name, 11573 }) 11574 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11575} 11576 11577// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. 11578// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11579// non-nil. Any non-2xx status code is an error. Response headers are in 11580// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11581// (if a response was returned at all) in 11582// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11583// whether the returned error was because http.StatusNotModified was 11584// returned. 11585func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11586 gensupport.SetOptions(c.urlParams_, opts...) 11587 res, err := c.doRequest("json") 11588 if res != nil && res.StatusCode == http.StatusNotModified { 11589 if res.Body != nil { 11590 res.Body.Close() 11591 } 11592 return nil, &googleapi.Error{ 11593 Code: res.StatusCode, 11594 Header: res.Header, 11595 } 11596 } 11597 if err != nil { 11598 return nil, err 11599 } 11600 defer googleapi.CloseBody(res) 11601 if err := googleapi.CheckResponse(res); err != nil { 11602 return nil, err 11603 } 11604 ret := &GooglePrivacyDlpV2InspectTemplate{ 11605 ServerResponse: googleapi.ServerResponse{ 11606 Header: res.Header, 11607 HTTPStatusCode: res.StatusCode, 11608 }, 11609 } 11610 target := &ret 11611 if err := gensupport.DecodeResponse(target, res); err != nil { 11612 return nil, err 11613 } 11614 return ret, nil 11615 // { 11616 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11617 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11618 // "httpMethod": "PATCH", 11619 // "id": "dlp.organizations.locations.inspectTemplates.patch", 11620 // "parameterOrder": [ 11621 // "name" 11622 // ], 11623 // "parameters": { 11624 // "name": { 11625 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11626 // "location": "path", 11627 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11628 // "required": true, 11629 // "type": "string" 11630 // } 11631 // }, 11632 // "path": "v2/{+name}", 11633 // "request": { 11634 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 11635 // }, 11636 // "response": { 11637 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11638 // }, 11639 // "scopes": [ 11640 // "https://www.googleapis.com/auth/cloud-platform" 11641 // ] 11642 // } 11643 11644} 11645 11646// method id "dlp.organizations.locations.storedInfoTypes.create": 11647 11648type OrganizationsLocationsStoredInfoTypesCreateCall struct { 11649 s *Service 11650 parentid string 11651 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 11652 urlParams_ gensupport.URLParams 11653 ctx_ context.Context 11654 header_ http.Header 11655} 11656 11657// Create: Creates a pre-built stored infoType to be used for 11658// inspection. See 11659// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11660// more. 11661func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { 11662 c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11663 c.parentid = parentid 11664 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 11665 return c 11666} 11667 11668// Fields allows partial responses to be retrieved. See 11669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11670// for more information. 11671func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { 11672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11673 return c 11674} 11675 11676// Context sets the context to be used in this call's Do method. Any 11677// pending HTTP request will be aborted if the provided context is 11678// canceled. 11679func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesCreateCall { 11680 c.ctx_ = ctx 11681 return c 11682} 11683 11684// Header returns an http.Header that can be modified by the caller to 11685// add HTTP headers to the request. 11686func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { 11687 if c.header_ == nil { 11688 c.header_ = make(http.Header) 11689 } 11690 return c.header_ 11691} 11692 11693func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 11694 reqHeaders := make(http.Header) 11695 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11696 for k, v := range c.header_ { 11697 reqHeaders[k] = v 11698 } 11699 reqHeaders.Set("User-Agent", c.s.userAgent()) 11700 var body io.Reader = nil 11701 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 11702 if err != nil { 11703 return nil, err 11704 } 11705 reqHeaders.Set("Content-Type", "application/json") 11706 c.urlParams_.Set("alt", alt) 11707 c.urlParams_.Set("prettyPrint", "false") 11708 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 11709 urls += "?" + c.urlParams_.Encode() 11710 req, err := http.NewRequest("POST", urls, body) 11711 if err != nil { 11712 return nil, err 11713 } 11714 req.Header = reqHeaders 11715 googleapi.Expand(req.URL, map[string]string{ 11716 "parent": c.parentid, 11717 }) 11718 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11719} 11720 11721// Do executes the "dlp.organizations.locations.storedInfoTypes.create" call. 11722// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 11723// non-nil. Any non-2xx status code is an error. Response headers are in 11724// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 11725// a response was returned at all) in error.(*googleapi.Error).Header. 11726// Use googleapi.IsNotModified to check whether the returned error was 11727// because http.StatusNotModified was returned. 11728func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 11729 gensupport.SetOptions(c.urlParams_, opts...) 11730 res, err := c.doRequest("json") 11731 if res != nil && res.StatusCode == http.StatusNotModified { 11732 if res.Body != nil { 11733 res.Body.Close() 11734 } 11735 return nil, &googleapi.Error{ 11736 Code: res.StatusCode, 11737 Header: res.Header, 11738 } 11739 } 11740 if err != nil { 11741 return nil, err 11742 } 11743 defer googleapi.CloseBody(res) 11744 if err := googleapi.CheckResponse(res); err != nil { 11745 return nil, err 11746 } 11747 ret := &GooglePrivacyDlpV2StoredInfoType{ 11748 ServerResponse: googleapi.ServerResponse{ 11749 Header: res.Header, 11750 HTTPStatusCode: res.StatusCode, 11751 }, 11752 } 11753 target := &ret 11754 if err := gensupport.DecodeResponse(target, res); err != nil { 11755 return nil, err 11756 } 11757 return ret, nil 11758 // { 11759 // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 11760 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 11761 // "httpMethod": "POST", 11762 // "id": "dlp.organizations.locations.storedInfoTypes.create", 11763 // "parameterOrder": [ 11764 // "parent" 11765 // ], 11766 // "parameters": { 11767 // "parent": { 11768 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 11769 // "location": "path", 11770 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11771 // "required": true, 11772 // "type": "string" 11773 // } 11774 // }, 11775 // "path": "v2/{+parent}/storedInfoTypes", 11776 // "request": { 11777 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 11778 // }, 11779 // "response": { 11780 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 11781 // }, 11782 // "scopes": [ 11783 // "https://www.googleapis.com/auth/cloud-platform" 11784 // ] 11785 // } 11786 11787} 11788 11789// method id "dlp.organizations.locations.storedInfoTypes.delete": 11790 11791type OrganizationsLocationsStoredInfoTypesDeleteCall struct { 11792 s *Service 11793 name string 11794 urlParams_ gensupport.URLParams 11795 ctx_ context.Context 11796 header_ http.Header 11797} 11798 11799// Delete: Deletes a stored infoType. See 11800// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11801// more. 11802func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11803 c := &OrganizationsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11804 c.name = name 11805 return c 11806} 11807 11808// Fields allows partial responses to be retrieved. See 11809// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11810// for more information. 11811func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11812 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11813 return c 11814} 11815 11816// Context sets the context to be used in this call's Do method. Any 11817// pending HTTP request will be aborted if the provided context is 11818// canceled. 11819func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11820 c.ctx_ = ctx 11821 return c 11822} 11823 11824// Header returns an http.Header that can be modified by the caller to 11825// add HTTP headers to the request. 11826func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 11827 if c.header_ == nil { 11828 c.header_ = make(http.Header) 11829 } 11830 return c.header_ 11831} 11832 11833func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 11834 reqHeaders := make(http.Header) 11835 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11836 for k, v := range c.header_ { 11837 reqHeaders[k] = v 11838 } 11839 reqHeaders.Set("User-Agent", c.s.userAgent()) 11840 var body io.Reader = nil 11841 c.urlParams_.Set("alt", alt) 11842 c.urlParams_.Set("prettyPrint", "false") 11843 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11844 urls += "?" + c.urlParams_.Encode() 11845 req, err := http.NewRequest("DELETE", urls, body) 11846 if err != nil { 11847 return nil, err 11848 } 11849 req.Header = reqHeaders 11850 googleapi.Expand(req.URL, map[string]string{ 11851 "name": c.name, 11852 }) 11853 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11854} 11855 11856// Do executes the "dlp.organizations.locations.storedInfoTypes.delete" call. 11857// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11858// non-2xx status code is an error. Response headers are in either 11859// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11860// returned at all) in error.(*googleapi.Error).Header. Use 11861// googleapi.IsNotModified to check whether the returned error was 11862// because http.StatusNotModified was returned. 11863func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11864 gensupport.SetOptions(c.urlParams_, opts...) 11865 res, err := c.doRequest("json") 11866 if res != nil && res.StatusCode == http.StatusNotModified { 11867 if res.Body != nil { 11868 res.Body.Close() 11869 } 11870 return nil, &googleapi.Error{ 11871 Code: res.StatusCode, 11872 Header: res.Header, 11873 } 11874 } 11875 if err != nil { 11876 return nil, err 11877 } 11878 defer googleapi.CloseBody(res) 11879 if err := googleapi.CheckResponse(res); err != nil { 11880 return nil, err 11881 } 11882 ret := &GoogleProtobufEmpty{ 11883 ServerResponse: googleapi.ServerResponse{ 11884 Header: res.Header, 11885 HTTPStatusCode: res.StatusCode, 11886 }, 11887 } 11888 target := &ret 11889 if err := gensupport.DecodeResponse(target, res); err != nil { 11890 return nil, err 11891 } 11892 return ret, nil 11893 // { 11894 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 11895 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 11896 // "httpMethod": "DELETE", 11897 // "id": "dlp.organizations.locations.storedInfoTypes.delete", 11898 // "parameterOrder": [ 11899 // "name" 11900 // ], 11901 // "parameters": { 11902 // "name": { 11903 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 11904 // "location": "path", 11905 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 11906 // "required": true, 11907 // "type": "string" 11908 // } 11909 // }, 11910 // "path": "v2/{+name}", 11911 // "response": { 11912 // "$ref": "GoogleProtobufEmpty" 11913 // }, 11914 // "scopes": [ 11915 // "https://www.googleapis.com/auth/cloud-platform" 11916 // ] 11917 // } 11918 11919} 11920 11921// method id "dlp.organizations.locations.storedInfoTypes.get": 11922 11923type OrganizationsLocationsStoredInfoTypesGetCall struct { 11924 s *Service 11925 name string 11926 urlParams_ gensupport.URLParams 11927 ifNoneMatch_ string 11928 ctx_ context.Context 11929 header_ http.Header 11930} 11931 11932// Get: Gets a stored infoType. See 11933// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11934// more. 11935func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { 11936 c := &OrganizationsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11937 c.name = name 11938 return c 11939} 11940 11941// Fields allows partial responses to be retrieved. See 11942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11943// for more information. 11944func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { 11945 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11946 return c 11947} 11948 11949// IfNoneMatch sets the optional parameter which makes the operation 11950// fail if the object's ETag matches the given value. This is useful for 11951// getting updates only after the object has changed since the last 11952// request. Use googleapi.IsNotModified to check whether the response 11953// error from Do is the result of In-None-Match. 11954func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { 11955 c.ifNoneMatch_ = entityTag 11956 return c 11957} 11958 11959// Context sets the context to be used in this call's Do method. Any 11960// pending HTTP request will be aborted if the provided context is 11961// canceled. 11962func (c *OrganizationsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesGetCall { 11963 c.ctx_ = ctx 11964 return c 11965} 11966 11967// Header returns an http.Header that can be modified by the caller to 11968// add HTTP headers to the request. 11969func (c *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { 11970 if c.header_ == nil { 11971 c.header_ = make(http.Header) 11972 } 11973 return c.header_ 11974} 11975 11976func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 11977 reqHeaders := make(http.Header) 11978 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11979 for k, v := range c.header_ { 11980 reqHeaders[k] = v 11981 } 11982 reqHeaders.Set("User-Agent", c.s.userAgent()) 11983 if c.ifNoneMatch_ != "" { 11984 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11985 } 11986 var body io.Reader = nil 11987 c.urlParams_.Set("alt", alt) 11988 c.urlParams_.Set("prettyPrint", "false") 11989 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11990 urls += "?" + c.urlParams_.Encode() 11991 req, err := http.NewRequest("GET", urls, body) 11992 if err != nil { 11993 return nil, err 11994 } 11995 req.Header = reqHeaders 11996 googleapi.Expand(req.URL, map[string]string{ 11997 "name": c.name, 11998 }) 11999 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12000} 12001 12002// Do executes the "dlp.organizations.locations.storedInfoTypes.get" call. 12003// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12004// non-nil. Any non-2xx status code is an error. Response headers are in 12005// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12006// a response was returned at all) in error.(*googleapi.Error).Header. 12007// Use googleapi.IsNotModified to check whether the returned error was 12008// because http.StatusNotModified was returned. 12009func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12010 gensupport.SetOptions(c.urlParams_, opts...) 12011 res, err := c.doRequest("json") 12012 if res != nil && res.StatusCode == http.StatusNotModified { 12013 if res.Body != nil { 12014 res.Body.Close() 12015 } 12016 return nil, &googleapi.Error{ 12017 Code: res.StatusCode, 12018 Header: res.Header, 12019 } 12020 } 12021 if err != nil { 12022 return nil, err 12023 } 12024 defer googleapi.CloseBody(res) 12025 if err := googleapi.CheckResponse(res); err != nil { 12026 return nil, err 12027 } 12028 ret := &GooglePrivacyDlpV2StoredInfoType{ 12029 ServerResponse: googleapi.ServerResponse{ 12030 Header: res.Header, 12031 HTTPStatusCode: res.StatusCode, 12032 }, 12033 } 12034 target := &ret 12035 if err := gensupport.DecodeResponse(target, res); err != nil { 12036 return nil, err 12037 } 12038 return ret, nil 12039 // { 12040 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12041 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 12042 // "httpMethod": "GET", 12043 // "id": "dlp.organizations.locations.storedInfoTypes.get", 12044 // "parameterOrder": [ 12045 // "name" 12046 // ], 12047 // "parameters": { 12048 // "name": { 12049 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12050 // "location": "path", 12051 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 12052 // "required": true, 12053 // "type": "string" 12054 // } 12055 // }, 12056 // "path": "v2/{+name}", 12057 // "response": { 12058 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12059 // }, 12060 // "scopes": [ 12061 // "https://www.googleapis.com/auth/cloud-platform" 12062 // ] 12063 // } 12064 12065} 12066 12067// method id "dlp.organizations.locations.storedInfoTypes.list": 12068 12069type OrganizationsLocationsStoredInfoTypesListCall struct { 12070 s *Service 12071 parentid string 12072 urlParams_ gensupport.URLParams 12073 ifNoneMatch_ string 12074 ctx_ context.Context 12075 header_ http.Header 12076} 12077 12078// List: Lists stored infoTypes. See 12079// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12080// more. 12081func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { 12082 c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12083 c.parentid = parentid 12084 return c 12085} 12086 12087// LocationId sets the optional parameter "locationId": Deprecated. This 12088// field has no effect. 12089func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsLocationsStoredInfoTypesListCall { 12090 c.urlParams_.Set("locationId", locationId) 12091 return c 12092} 12093 12094// OrderBy sets the optional parameter "orderBy": Comma separated list 12095// of fields to order by, followed by `asc` or `desc` postfix. This list 12096// is case-insensitive, default sorting order is ascending, redundant 12097// space characters are insignificant. Example: `name asc, display_name, 12098// create_time desc` Supported fields are: - `create_time`: corresponds 12099// to time the most recent version of the resource was created. - 12100// `state`: corresponds to the state of the resource. - `name`: 12101// corresponds to resource name. - `display_name`: corresponds to info 12102// type's display name. 12103func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsLocationsStoredInfoTypesListCall { 12104 c.urlParams_.Set("orderBy", orderBy) 12105 return c 12106} 12107 12108// PageSize sets the optional parameter "pageSize": Size of the page, 12109// can be limited by server. If zero server returns a page of max size 12110// 100. 12111func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { 12112 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12113 return c 12114} 12115 12116// PageToken sets the optional parameter "pageToken": Page token to 12117// continue retrieval. Comes from previous call to 12118// `ListStoredInfoTypes`. 12119func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { 12120 c.urlParams_.Set("pageToken", pageToken) 12121 return c 12122} 12123 12124// Fields allows partial responses to be retrieved. See 12125// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12126// for more information. 12127func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { 12128 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12129 return c 12130} 12131 12132// IfNoneMatch sets the optional parameter which makes the operation 12133// fail if the object's ETag matches the given value. This is useful for 12134// getting updates only after the object has changed since the last 12135// request. Use googleapi.IsNotModified to check whether the response 12136// error from Do is the result of In-None-Match. 12137func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { 12138 c.ifNoneMatch_ = entityTag 12139 return c 12140} 12141 12142// Context sets the context to be used in this call's Do method. Any 12143// pending HTTP request will be aborted if the provided context is 12144// canceled. 12145func (c *OrganizationsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesListCall { 12146 c.ctx_ = ctx 12147 return c 12148} 12149 12150// Header returns an http.Header that can be modified by the caller to 12151// add HTTP headers to the request. 12152func (c *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { 12153 if c.header_ == nil { 12154 c.header_ = make(http.Header) 12155 } 12156 return c.header_ 12157} 12158 12159func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 12160 reqHeaders := make(http.Header) 12161 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12162 for k, v := range c.header_ { 12163 reqHeaders[k] = v 12164 } 12165 reqHeaders.Set("User-Agent", c.s.userAgent()) 12166 if c.ifNoneMatch_ != "" { 12167 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12168 } 12169 var body io.Reader = nil 12170 c.urlParams_.Set("alt", alt) 12171 c.urlParams_.Set("prettyPrint", "false") 12172 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12173 urls += "?" + c.urlParams_.Encode() 12174 req, err := http.NewRequest("GET", urls, body) 12175 if err != nil { 12176 return nil, err 12177 } 12178 req.Header = reqHeaders 12179 googleapi.Expand(req.URL, map[string]string{ 12180 "parent": c.parentid, 12181 }) 12182 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12183} 12184 12185// Do executes the "dlp.organizations.locations.storedInfoTypes.list" call. 12186// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 12187// error will be non-nil. Any non-2xx status code is an error. Response 12188// headers are in either 12189// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 12190// or (if a response was returned at all) in 12191// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12192// whether the returned error was because http.StatusNotModified was 12193// returned. 12194func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 12195 gensupport.SetOptions(c.urlParams_, opts...) 12196 res, err := c.doRequest("json") 12197 if res != nil && res.StatusCode == http.StatusNotModified { 12198 if res.Body != nil { 12199 res.Body.Close() 12200 } 12201 return nil, &googleapi.Error{ 12202 Code: res.StatusCode, 12203 Header: res.Header, 12204 } 12205 } 12206 if err != nil { 12207 return nil, err 12208 } 12209 defer googleapi.CloseBody(res) 12210 if err := googleapi.CheckResponse(res); err != nil { 12211 return nil, err 12212 } 12213 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 12214 ServerResponse: googleapi.ServerResponse{ 12215 Header: res.Header, 12216 HTTPStatusCode: res.StatusCode, 12217 }, 12218 } 12219 target := &ret 12220 if err := gensupport.DecodeResponse(target, res); err != nil { 12221 return nil, err 12222 } 12223 return ret, nil 12224 // { 12225 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12226 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 12227 // "httpMethod": "GET", 12228 // "id": "dlp.organizations.locations.storedInfoTypes.list", 12229 // "parameterOrder": [ 12230 // "parent" 12231 // ], 12232 // "parameters": { 12233 // "locationId": { 12234 // "description": "Deprecated. This field has no effect.", 12235 // "location": "query", 12236 // "type": "string" 12237 // }, 12238 // "orderBy": { 12239 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", 12240 // "location": "query", 12241 // "type": "string" 12242 // }, 12243 // "pageSize": { 12244 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 12245 // "format": "int32", 12246 // "location": "query", 12247 // "type": "integer" 12248 // }, 12249 // "pageToken": { 12250 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 12251 // "location": "query", 12252 // "type": "string" 12253 // }, 12254 // "parent": { 12255 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 12256 // "location": "path", 12257 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 12258 // "required": true, 12259 // "type": "string" 12260 // } 12261 // }, 12262 // "path": "v2/{+parent}/storedInfoTypes", 12263 // "response": { 12264 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 12265 // }, 12266 // "scopes": [ 12267 // "https://www.googleapis.com/auth/cloud-platform" 12268 // ] 12269 // } 12270 12271} 12272 12273// Pages invokes f for each page of results. 12274// A non-nil error returned from f will halt the iteration. 12275// The provided context supersedes any context provided to the Context method. 12276func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 12277 c.ctx_ = ctx 12278 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12279 for { 12280 x, err := c.Do() 12281 if err != nil { 12282 return err 12283 } 12284 if err := f(x); err != nil { 12285 return err 12286 } 12287 if x.NextPageToken == "" { 12288 return nil 12289 } 12290 c.PageToken(x.NextPageToken) 12291 } 12292} 12293 12294// method id "dlp.organizations.locations.storedInfoTypes.patch": 12295 12296type OrganizationsLocationsStoredInfoTypesPatchCall struct { 12297 s *Service 12298 name string 12299 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 12300 urlParams_ gensupport.URLParams 12301 ctx_ context.Context 12302 header_ http.Header 12303} 12304 12305// Patch: Updates the stored infoType by creating a new version. The 12306// existing version will continue to be used until the new version is 12307// ready. See 12308// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12309// more. 12310func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { 12311 c := &OrganizationsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12312 c.name = name 12313 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 12314 return c 12315} 12316 12317// Fields allows partial responses to be retrieved. See 12318// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12319// for more information. 12320func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { 12321 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12322 return c 12323} 12324 12325// Context sets the context to be used in this call's Do method. Any 12326// pending HTTP request will be aborted if the provided context is 12327// canceled. 12328func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesPatchCall { 12329 c.ctx_ = ctx 12330 return c 12331} 12332 12333// Header returns an http.Header that can be modified by the caller to 12334// add HTTP headers to the request. 12335func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { 12336 if c.header_ == nil { 12337 c.header_ = make(http.Header) 12338 } 12339 return c.header_ 12340} 12341 12342func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 12343 reqHeaders := make(http.Header) 12344 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12345 for k, v := range c.header_ { 12346 reqHeaders[k] = v 12347 } 12348 reqHeaders.Set("User-Agent", c.s.userAgent()) 12349 var body io.Reader = nil 12350 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 12351 if err != nil { 12352 return nil, err 12353 } 12354 reqHeaders.Set("Content-Type", "application/json") 12355 c.urlParams_.Set("alt", alt) 12356 c.urlParams_.Set("prettyPrint", "false") 12357 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12358 urls += "?" + c.urlParams_.Encode() 12359 req, err := http.NewRequest("PATCH", urls, body) 12360 if err != nil { 12361 return nil, err 12362 } 12363 req.Header = reqHeaders 12364 googleapi.Expand(req.URL, map[string]string{ 12365 "name": c.name, 12366 }) 12367 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12368} 12369 12370// Do executes the "dlp.organizations.locations.storedInfoTypes.patch" call. 12371// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12372// non-nil. Any non-2xx status code is an error. Response headers are in 12373// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12374// a response was returned at all) in error.(*googleapi.Error).Header. 12375// Use googleapi.IsNotModified to check whether the returned error was 12376// because http.StatusNotModified was returned. 12377func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12378 gensupport.SetOptions(c.urlParams_, opts...) 12379 res, err := c.doRequest("json") 12380 if res != nil && res.StatusCode == http.StatusNotModified { 12381 if res.Body != nil { 12382 res.Body.Close() 12383 } 12384 return nil, &googleapi.Error{ 12385 Code: res.StatusCode, 12386 Header: res.Header, 12387 } 12388 } 12389 if err != nil { 12390 return nil, err 12391 } 12392 defer googleapi.CloseBody(res) 12393 if err := googleapi.CheckResponse(res); err != nil { 12394 return nil, err 12395 } 12396 ret := &GooglePrivacyDlpV2StoredInfoType{ 12397 ServerResponse: googleapi.ServerResponse{ 12398 Header: res.Header, 12399 HTTPStatusCode: res.StatusCode, 12400 }, 12401 } 12402 target := &ret 12403 if err := gensupport.DecodeResponse(target, res); err != nil { 12404 return nil, err 12405 } 12406 return ret, nil 12407 // { 12408 // "description": "Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12409 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 12410 // "httpMethod": "PATCH", 12411 // "id": "dlp.organizations.locations.storedInfoTypes.patch", 12412 // "parameterOrder": [ 12413 // "name" 12414 // ], 12415 // "parameters": { 12416 // "name": { 12417 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12418 // "location": "path", 12419 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 12420 // "required": true, 12421 // "type": "string" 12422 // } 12423 // }, 12424 // "path": "v2/{+name}", 12425 // "request": { 12426 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 12427 // }, 12428 // "response": { 12429 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12430 // }, 12431 // "scopes": [ 12432 // "https://www.googleapis.com/auth/cloud-platform" 12433 // ] 12434 // } 12435 12436} 12437 12438// method id "dlp.organizations.storedInfoTypes.create": 12439 12440type OrganizationsStoredInfoTypesCreateCall struct { 12441 s *Service 12442 parentid string 12443 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 12444 urlParams_ gensupport.URLParams 12445 ctx_ context.Context 12446 header_ http.Header 12447} 12448 12449// Create: Creates a pre-built stored infoType to be used for 12450// inspection. See 12451// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12452// more. 12453func (r *OrganizationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { 12454 c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12455 c.parentid = parentid 12456 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 12457 return c 12458} 12459 12460// Fields allows partial responses to be retrieved. See 12461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12462// for more information. 12463func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { 12464 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12465 return c 12466} 12467 12468// Context sets the context to be used in this call's Do method. Any 12469// pending HTTP request will be aborted if the provided context is 12470// canceled. 12471func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { 12472 c.ctx_ = ctx 12473 return c 12474} 12475 12476// Header returns an http.Header that can be modified by the caller to 12477// add HTTP headers to the request. 12478func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { 12479 if c.header_ == nil { 12480 c.header_ = make(http.Header) 12481 } 12482 return c.header_ 12483} 12484 12485func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 12486 reqHeaders := make(http.Header) 12487 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12488 for k, v := range c.header_ { 12489 reqHeaders[k] = v 12490 } 12491 reqHeaders.Set("User-Agent", c.s.userAgent()) 12492 var body io.Reader = nil 12493 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 12494 if err != nil { 12495 return nil, err 12496 } 12497 reqHeaders.Set("Content-Type", "application/json") 12498 c.urlParams_.Set("alt", alt) 12499 c.urlParams_.Set("prettyPrint", "false") 12500 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12501 urls += "?" + c.urlParams_.Encode() 12502 req, err := http.NewRequest("POST", urls, body) 12503 if err != nil { 12504 return nil, err 12505 } 12506 req.Header = reqHeaders 12507 googleapi.Expand(req.URL, map[string]string{ 12508 "parent": c.parentid, 12509 }) 12510 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12511} 12512 12513// Do executes the "dlp.organizations.storedInfoTypes.create" call. 12514// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12515// non-nil. Any non-2xx status code is an error. Response headers are in 12516// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12517// a response was returned at all) in error.(*googleapi.Error).Header. 12518// Use googleapi.IsNotModified to check whether the returned error was 12519// because http.StatusNotModified was returned. 12520func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12521 gensupport.SetOptions(c.urlParams_, opts...) 12522 res, err := c.doRequest("json") 12523 if res != nil && res.StatusCode == http.StatusNotModified { 12524 if res.Body != nil { 12525 res.Body.Close() 12526 } 12527 return nil, &googleapi.Error{ 12528 Code: res.StatusCode, 12529 Header: res.Header, 12530 } 12531 } 12532 if err != nil { 12533 return nil, err 12534 } 12535 defer googleapi.CloseBody(res) 12536 if err := googleapi.CheckResponse(res); err != nil { 12537 return nil, err 12538 } 12539 ret := &GooglePrivacyDlpV2StoredInfoType{ 12540 ServerResponse: googleapi.ServerResponse{ 12541 Header: res.Header, 12542 HTTPStatusCode: res.StatusCode, 12543 }, 12544 } 12545 target := &ret 12546 if err := gensupport.DecodeResponse(target, res); err != nil { 12547 return nil, err 12548 } 12549 return ret, nil 12550 // { 12551 // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12552 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 12553 // "httpMethod": "POST", 12554 // "id": "dlp.organizations.storedInfoTypes.create", 12555 // "parameterOrder": [ 12556 // "parent" 12557 // ], 12558 // "parameters": { 12559 // "parent": { 12560 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 12561 // "location": "path", 12562 // "pattern": "^organizations/[^/]+$", 12563 // "required": true, 12564 // "type": "string" 12565 // } 12566 // }, 12567 // "path": "v2/{+parent}/storedInfoTypes", 12568 // "request": { 12569 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 12570 // }, 12571 // "response": { 12572 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12573 // }, 12574 // "scopes": [ 12575 // "https://www.googleapis.com/auth/cloud-platform" 12576 // ] 12577 // } 12578 12579} 12580 12581// method id "dlp.organizations.storedInfoTypes.delete": 12582 12583type OrganizationsStoredInfoTypesDeleteCall struct { 12584 s *Service 12585 name string 12586 urlParams_ gensupport.URLParams 12587 ctx_ context.Context 12588 header_ http.Header 12589} 12590 12591// Delete: Deletes a stored infoType. See 12592// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12593// more. 12594func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { 12595 c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12596 c.name = name 12597 return c 12598} 12599 12600// Fields allows partial responses to be retrieved. See 12601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12602// for more information. 12603func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { 12604 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12605 return c 12606} 12607 12608// Context sets the context to be used in this call's Do method. Any 12609// pending HTTP request will be aborted if the provided context is 12610// canceled. 12611func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { 12612 c.ctx_ = ctx 12613 return c 12614} 12615 12616// Header returns an http.Header that can be modified by the caller to 12617// add HTTP headers to the request. 12618func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { 12619 if c.header_ == nil { 12620 c.header_ = make(http.Header) 12621 } 12622 return c.header_ 12623} 12624 12625func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 12626 reqHeaders := make(http.Header) 12627 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12628 for k, v := range c.header_ { 12629 reqHeaders[k] = v 12630 } 12631 reqHeaders.Set("User-Agent", c.s.userAgent()) 12632 var body io.Reader = nil 12633 c.urlParams_.Set("alt", alt) 12634 c.urlParams_.Set("prettyPrint", "false") 12635 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12636 urls += "?" + c.urlParams_.Encode() 12637 req, err := http.NewRequest("DELETE", urls, body) 12638 if err != nil { 12639 return nil, err 12640 } 12641 req.Header = reqHeaders 12642 googleapi.Expand(req.URL, map[string]string{ 12643 "name": c.name, 12644 }) 12645 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12646} 12647 12648// Do executes the "dlp.organizations.storedInfoTypes.delete" call. 12649// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12650// non-2xx status code is an error. Response headers are in either 12651// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12652// returned at all) in error.(*googleapi.Error).Header. Use 12653// googleapi.IsNotModified to check whether the returned error was 12654// because http.StatusNotModified was returned. 12655func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12656 gensupport.SetOptions(c.urlParams_, opts...) 12657 res, err := c.doRequest("json") 12658 if res != nil && res.StatusCode == http.StatusNotModified { 12659 if res.Body != nil { 12660 res.Body.Close() 12661 } 12662 return nil, &googleapi.Error{ 12663 Code: res.StatusCode, 12664 Header: res.Header, 12665 } 12666 } 12667 if err != nil { 12668 return nil, err 12669 } 12670 defer googleapi.CloseBody(res) 12671 if err := googleapi.CheckResponse(res); err != nil { 12672 return nil, err 12673 } 12674 ret := &GoogleProtobufEmpty{ 12675 ServerResponse: googleapi.ServerResponse{ 12676 Header: res.Header, 12677 HTTPStatusCode: res.StatusCode, 12678 }, 12679 } 12680 target := &ret 12681 if err := gensupport.DecodeResponse(target, res); err != nil { 12682 return nil, err 12683 } 12684 return ret, nil 12685 // { 12686 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12687 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 12688 // "httpMethod": "DELETE", 12689 // "id": "dlp.organizations.storedInfoTypes.delete", 12690 // "parameterOrder": [ 12691 // "name" 12692 // ], 12693 // "parameters": { 12694 // "name": { 12695 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12696 // "location": "path", 12697 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 12698 // "required": true, 12699 // "type": "string" 12700 // } 12701 // }, 12702 // "path": "v2/{+name}", 12703 // "response": { 12704 // "$ref": "GoogleProtobufEmpty" 12705 // }, 12706 // "scopes": [ 12707 // "https://www.googleapis.com/auth/cloud-platform" 12708 // ] 12709 // } 12710 12711} 12712 12713// method id "dlp.organizations.storedInfoTypes.get": 12714 12715type OrganizationsStoredInfoTypesGetCall struct { 12716 s *Service 12717 name string 12718 urlParams_ gensupport.URLParams 12719 ifNoneMatch_ string 12720 ctx_ context.Context 12721 header_ http.Header 12722} 12723 12724// Get: Gets a stored infoType. See 12725// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12726// more. 12727func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { 12728 c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12729 c.name = name 12730 return c 12731} 12732 12733// Fields allows partial responses to be retrieved. See 12734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12735// for more information. 12736func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { 12737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12738 return c 12739} 12740 12741// IfNoneMatch sets the optional parameter which makes the operation 12742// fail if the object's ETag matches the given value. This is useful for 12743// getting updates only after the object has changed since the last 12744// request. Use googleapi.IsNotModified to check whether the response 12745// error from Do is the result of In-None-Match. 12746func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { 12747 c.ifNoneMatch_ = entityTag 12748 return c 12749} 12750 12751// Context sets the context to be used in this call's Do method. Any 12752// pending HTTP request will be aborted if the provided context is 12753// canceled. 12754func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { 12755 c.ctx_ = ctx 12756 return c 12757} 12758 12759// Header returns an http.Header that can be modified by the caller to 12760// add HTTP headers to the request. 12761func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { 12762 if c.header_ == nil { 12763 c.header_ = make(http.Header) 12764 } 12765 return c.header_ 12766} 12767 12768func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 12769 reqHeaders := make(http.Header) 12770 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12771 for k, v := range c.header_ { 12772 reqHeaders[k] = v 12773 } 12774 reqHeaders.Set("User-Agent", c.s.userAgent()) 12775 if c.ifNoneMatch_ != "" { 12776 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12777 } 12778 var body io.Reader = nil 12779 c.urlParams_.Set("alt", alt) 12780 c.urlParams_.Set("prettyPrint", "false") 12781 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12782 urls += "?" + c.urlParams_.Encode() 12783 req, err := http.NewRequest("GET", urls, body) 12784 if err != nil { 12785 return nil, err 12786 } 12787 req.Header = reqHeaders 12788 googleapi.Expand(req.URL, map[string]string{ 12789 "name": c.name, 12790 }) 12791 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12792} 12793 12794// Do executes the "dlp.organizations.storedInfoTypes.get" call. 12795// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12796// non-nil. Any non-2xx status code is an error. Response headers are in 12797// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12798// a response was returned at all) in error.(*googleapi.Error).Header. 12799// Use googleapi.IsNotModified to check whether the returned error was 12800// because http.StatusNotModified was returned. 12801func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12802 gensupport.SetOptions(c.urlParams_, opts...) 12803 res, err := c.doRequest("json") 12804 if res != nil && res.StatusCode == http.StatusNotModified { 12805 if res.Body != nil { 12806 res.Body.Close() 12807 } 12808 return nil, &googleapi.Error{ 12809 Code: res.StatusCode, 12810 Header: res.Header, 12811 } 12812 } 12813 if err != nil { 12814 return nil, err 12815 } 12816 defer googleapi.CloseBody(res) 12817 if err := googleapi.CheckResponse(res); err != nil { 12818 return nil, err 12819 } 12820 ret := &GooglePrivacyDlpV2StoredInfoType{ 12821 ServerResponse: googleapi.ServerResponse{ 12822 Header: res.Header, 12823 HTTPStatusCode: res.StatusCode, 12824 }, 12825 } 12826 target := &ret 12827 if err := gensupport.DecodeResponse(target, res); err != nil { 12828 return nil, err 12829 } 12830 return ret, nil 12831 // { 12832 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12833 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 12834 // "httpMethod": "GET", 12835 // "id": "dlp.organizations.storedInfoTypes.get", 12836 // "parameterOrder": [ 12837 // "name" 12838 // ], 12839 // "parameters": { 12840 // "name": { 12841 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12842 // "location": "path", 12843 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 12844 // "required": true, 12845 // "type": "string" 12846 // } 12847 // }, 12848 // "path": "v2/{+name}", 12849 // "response": { 12850 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12851 // }, 12852 // "scopes": [ 12853 // "https://www.googleapis.com/auth/cloud-platform" 12854 // ] 12855 // } 12856 12857} 12858 12859// method id "dlp.organizations.storedInfoTypes.list": 12860 12861type OrganizationsStoredInfoTypesListCall struct { 12862 s *Service 12863 parentid string 12864 urlParams_ gensupport.URLParams 12865 ifNoneMatch_ string 12866 ctx_ context.Context 12867 header_ http.Header 12868} 12869 12870// List: Lists stored infoTypes. See 12871// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12872// more. 12873func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { 12874 c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12875 c.parentid = parentid 12876 return c 12877} 12878 12879// LocationId sets the optional parameter "locationId": Deprecated. This 12880// field has no effect. 12881func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsStoredInfoTypesListCall { 12882 c.urlParams_.Set("locationId", locationId) 12883 return c 12884} 12885 12886// OrderBy sets the optional parameter "orderBy": Comma separated list 12887// of fields to order by, followed by `asc` or `desc` postfix. This list 12888// is case-insensitive, default sorting order is ascending, redundant 12889// space characters are insignificant. Example: `name asc, display_name, 12890// create_time desc` Supported fields are: - `create_time`: corresponds 12891// to time the most recent version of the resource was created. - 12892// `state`: corresponds to the state of the resource. - `name`: 12893// corresponds to resource name. - `display_name`: corresponds to info 12894// type's display name. 12895func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { 12896 c.urlParams_.Set("orderBy", orderBy) 12897 return c 12898} 12899 12900// PageSize sets the optional parameter "pageSize": Size of the page, 12901// can be limited by server. If zero server returns a page of max size 12902// 100. 12903func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { 12904 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12905 return c 12906} 12907 12908// PageToken sets the optional parameter "pageToken": Page token to 12909// continue retrieval. Comes from previous call to 12910// `ListStoredInfoTypes`. 12911func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { 12912 c.urlParams_.Set("pageToken", pageToken) 12913 return c 12914} 12915 12916// Fields allows partial responses to be retrieved. See 12917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12918// for more information. 12919func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { 12920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12921 return c 12922} 12923 12924// IfNoneMatch sets the optional parameter which makes the operation 12925// fail if the object's ETag matches the given value. This is useful for 12926// getting updates only after the object has changed since the last 12927// request. Use googleapi.IsNotModified to check whether the response 12928// error from Do is the result of In-None-Match. 12929func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { 12930 c.ifNoneMatch_ = entityTag 12931 return c 12932} 12933 12934// Context sets the context to be used in this call's Do method. Any 12935// pending HTTP request will be aborted if the provided context is 12936// canceled. 12937func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { 12938 c.ctx_ = ctx 12939 return c 12940} 12941 12942// Header returns an http.Header that can be modified by the caller to 12943// add HTTP headers to the request. 12944func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { 12945 if c.header_ == nil { 12946 c.header_ = make(http.Header) 12947 } 12948 return c.header_ 12949} 12950 12951func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 12952 reqHeaders := make(http.Header) 12953 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12954 for k, v := range c.header_ { 12955 reqHeaders[k] = v 12956 } 12957 reqHeaders.Set("User-Agent", c.s.userAgent()) 12958 if c.ifNoneMatch_ != "" { 12959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12960 } 12961 var body io.Reader = nil 12962 c.urlParams_.Set("alt", alt) 12963 c.urlParams_.Set("prettyPrint", "false") 12964 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12965 urls += "?" + c.urlParams_.Encode() 12966 req, err := http.NewRequest("GET", urls, body) 12967 if err != nil { 12968 return nil, err 12969 } 12970 req.Header = reqHeaders 12971 googleapi.Expand(req.URL, map[string]string{ 12972 "parent": c.parentid, 12973 }) 12974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12975} 12976 12977// Do executes the "dlp.organizations.storedInfoTypes.list" call. 12978// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 12979// error will be non-nil. Any non-2xx status code is an error. Response 12980// headers are in either 12981// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 12982// or (if a response was returned at all) in 12983// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12984// whether the returned error was because http.StatusNotModified was 12985// returned. 12986func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 12987 gensupport.SetOptions(c.urlParams_, opts...) 12988 res, err := c.doRequest("json") 12989 if res != nil && res.StatusCode == http.StatusNotModified { 12990 if res.Body != nil { 12991 res.Body.Close() 12992 } 12993 return nil, &googleapi.Error{ 12994 Code: res.StatusCode, 12995 Header: res.Header, 12996 } 12997 } 12998 if err != nil { 12999 return nil, err 13000 } 13001 defer googleapi.CloseBody(res) 13002 if err := googleapi.CheckResponse(res); err != nil { 13003 return nil, err 13004 } 13005 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 13006 ServerResponse: googleapi.ServerResponse{ 13007 Header: res.Header, 13008 HTTPStatusCode: res.StatusCode, 13009 }, 13010 } 13011 target := &ret 13012 if err := gensupport.DecodeResponse(target, res); err != nil { 13013 return nil, err 13014 } 13015 return ret, nil 13016 // { 13017 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13018 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 13019 // "httpMethod": "GET", 13020 // "id": "dlp.organizations.storedInfoTypes.list", 13021 // "parameterOrder": [ 13022 // "parent" 13023 // ], 13024 // "parameters": { 13025 // "locationId": { 13026 // "description": "Deprecated. This field has no effect.", 13027 // "location": "query", 13028 // "type": "string" 13029 // }, 13030 // "orderBy": { 13031 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", 13032 // "location": "query", 13033 // "type": "string" 13034 // }, 13035 // "pageSize": { 13036 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 13037 // "format": "int32", 13038 // "location": "query", 13039 // "type": "integer" 13040 // }, 13041 // "pageToken": { 13042 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 13043 // "location": "query", 13044 // "type": "string" 13045 // }, 13046 // "parent": { 13047 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 13048 // "location": "path", 13049 // "pattern": "^organizations/[^/]+$", 13050 // "required": true, 13051 // "type": "string" 13052 // } 13053 // }, 13054 // "path": "v2/{+parent}/storedInfoTypes", 13055 // "response": { 13056 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 13057 // }, 13058 // "scopes": [ 13059 // "https://www.googleapis.com/auth/cloud-platform" 13060 // ] 13061 // } 13062 13063} 13064 13065// Pages invokes f for each page of results. 13066// A non-nil error returned from f will halt the iteration. 13067// The provided context supersedes any context provided to the Context method. 13068func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 13069 c.ctx_ = ctx 13070 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13071 for { 13072 x, err := c.Do() 13073 if err != nil { 13074 return err 13075 } 13076 if err := f(x); err != nil { 13077 return err 13078 } 13079 if x.NextPageToken == "" { 13080 return nil 13081 } 13082 c.PageToken(x.NextPageToken) 13083 } 13084} 13085 13086// method id "dlp.organizations.storedInfoTypes.patch": 13087 13088type OrganizationsStoredInfoTypesPatchCall struct { 13089 s *Service 13090 name string 13091 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 13092 urlParams_ gensupport.URLParams 13093 ctx_ context.Context 13094 header_ http.Header 13095} 13096 13097// Patch: Updates the stored infoType by creating a new version. The 13098// existing version will continue to be used until the new version is 13099// ready. See 13100// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13101// more. 13102func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { 13103 c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13104 c.name = name 13105 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 13106 return c 13107} 13108 13109// Fields allows partial responses to be retrieved. See 13110// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13111// for more information. 13112func (c *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { 13113 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13114 return c 13115} 13116 13117// Context sets the context to be used in this call's Do method. Any 13118// pending HTTP request will be aborted if the provided context is 13119// canceled. 13120func (c *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { 13121 c.ctx_ = ctx 13122 return c 13123} 13124 13125// Header returns an http.Header that can be modified by the caller to 13126// add HTTP headers to the request. 13127func (c *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { 13128 if c.header_ == nil { 13129 c.header_ = make(http.Header) 13130 } 13131 return c.header_ 13132} 13133 13134func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 13135 reqHeaders := make(http.Header) 13136 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13137 for k, v := range c.header_ { 13138 reqHeaders[k] = v 13139 } 13140 reqHeaders.Set("User-Agent", c.s.userAgent()) 13141 var body io.Reader = nil 13142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 13143 if err != nil { 13144 return nil, err 13145 } 13146 reqHeaders.Set("Content-Type", "application/json") 13147 c.urlParams_.Set("alt", alt) 13148 c.urlParams_.Set("prettyPrint", "false") 13149 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13150 urls += "?" + c.urlParams_.Encode() 13151 req, err := http.NewRequest("PATCH", urls, body) 13152 if err != nil { 13153 return nil, err 13154 } 13155 req.Header = reqHeaders 13156 googleapi.Expand(req.URL, map[string]string{ 13157 "name": c.name, 13158 }) 13159 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13160} 13161 13162// Do executes the "dlp.organizations.storedInfoTypes.patch" call. 13163// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 13164// non-nil. Any non-2xx status code is an error. Response headers are in 13165// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 13166// a response was returned at all) in error.(*googleapi.Error).Header. 13167// Use googleapi.IsNotModified to check whether the returned error was 13168// because http.StatusNotModified was returned. 13169func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 13170 gensupport.SetOptions(c.urlParams_, opts...) 13171 res, err := c.doRequest("json") 13172 if res != nil && res.StatusCode == http.StatusNotModified { 13173 if res.Body != nil { 13174 res.Body.Close() 13175 } 13176 return nil, &googleapi.Error{ 13177 Code: res.StatusCode, 13178 Header: res.Header, 13179 } 13180 } 13181 if err != nil { 13182 return nil, err 13183 } 13184 defer googleapi.CloseBody(res) 13185 if err := googleapi.CheckResponse(res); err != nil { 13186 return nil, err 13187 } 13188 ret := &GooglePrivacyDlpV2StoredInfoType{ 13189 ServerResponse: googleapi.ServerResponse{ 13190 Header: res.Header, 13191 HTTPStatusCode: res.StatusCode, 13192 }, 13193 } 13194 target := &ret 13195 if err := gensupport.DecodeResponse(target, res); err != nil { 13196 return nil, err 13197 } 13198 return ret, nil 13199 // { 13200 // "description": "Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13201 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 13202 // "httpMethod": "PATCH", 13203 // "id": "dlp.organizations.storedInfoTypes.patch", 13204 // "parameterOrder": [ 13205 // "name" 13206 // ], 13207 // "parameters": { 13208 // "name": { 13209 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 13210 // "location": "path", 13211 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 13212 // "required": true, 13213 // "type": "string" 13214 // } 13215 // }, 13216 // "path": "v2/{+name}", 13217 // "request": { 13218 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 13219 // }, 13220 // "response": { 13221 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 13222 // }, 13223 // "scopes": [ 13224 // "https://www.googleapis.com/auth/cloud-platform" 13225 // ] 13226 // } 13227 13228} 13229 13230// method id "dlp.projects.content.deidentify": 13231 13232type ProjectsContentDeidentifyCall struct { 13233 s *Service 13234 parentid string 13235 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 13236 urlParams_ gensupport.URLParams 13237 ctx_ context.Context 13238 header_ http.Header 13239} 13240 13241// Deidentify: De-identifies potentially sensitive info from a 13242// ContentItem. This method has limits on input size and output size. 13243// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 13244// learn more. When no InfoTypes or CustomInfoTypes are specified in 13245// this request, the system will automatically choose what detectors to 13246// run. By default this may be all types, but may change over time as 13247// detectors are updated. 13248func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { 13249 c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13250 c.parentid = parentid 13251 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 13252 return c 13253} 13254 13255// Fields allows partial responses to be retrieved. See 13256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13257// for more information. 13258func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { 13259 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13260 return c 13261} 13262 13263// Context sets the context to be used in this call's Do method. Any 13264// pending HTTP request will be aborted if the provided context is 13265// canceled. 13266func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { 13267 c.ctx_ = ctx 13268 return c 13269} 13270 13271// Header returns an http.Header that can be modified by the caller to 13272// add HTTP headers to the request. 13273func (c *ProjectsContentDeidentifyCall) Header() http.Header { 13274 if c.header_ == nil { 13275 c.header_ = make(http.Header) 13276 } 13277 return c.header_ 13278} 13279 13280func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 13281 reqHeaders := make(http.Header) 13282 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13283 for k, v := range c.header_ { 13284 reqHeaders[k] = v 13285 } 13286 reqHeaders.Set("User-Agent", c.s.userAgent()) 13287 var body io.Reader = nil 13288 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 13289 if err != nil { 13290 return nil, err 13291 } 13292 reqHeaders.Set("Content-Type", "application/json") 13293 c.urlParams_.Set("alt", alt) 13294 c.urlParams_.Set("prettyPrint", "false") 13295 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 13296 urls += "?" + c.urlParams_.Encode() 13297 req, err := http.NewRequest("POST", urls, body) 13298 if err != nil { 13299 return nil, err 13300 } 13301 req.Header = reqHeaders 13302 googleapi.Expand(req.URL, map[string]string{ 13303 "parent": c.parentid, 13304 }) 13305 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13306} 13307 13308// Do executes the "dlp.projects.content.deidentify" call. 13309// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 13310// will be non-nil. Any non-2xx status code is an error. Response 13311// headers are in either 13312// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 13313// (if a response was returned at all) in 13314// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13315// whether the returned error was because http.StatusNotModified was 13316// returned. 13317func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 13318 gensupport.SetOptions(c.urlParams_, opts...) 13319 res, err := c.doRequest("json") 13320 if res != nil && res.StatusCode == http.StatusNotModified { 13321 if res.Body != nil { 13322 res.Body.Close() 13323 } 13324 return nil, &googleapi.Error{ 13325 Code: res.StatusCode, 13326 Header: res.Header, 13327 } 13328 } 13329 if err != nil { 13330 return nil, err 13331 } 13332 defer googleapi.CloseBody(res) 13333 if err := googleapi.CheckResponse(res); err != nil { 13334 return nil, err 13335 } 13336 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 13337 ServerResponse: googleapi.ServerResponse{ 13338 Header: res.Header, 13339 HTTPStatusCode: res.StatusCode, 13340 }, 13341 } 13342 target := &ret 13343 if err := gensupport.DecodeResponse(target, res); err != nil { 13344 return nil, err 13345 } 13346 return ret, nil 13347 // { 13348 // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 13349 // "flatPath": "v2/projects/{projectsId}/content:deidentify", 13350 // "httpMethod": "POST", 13351 // "id": "dlp.projects.content.deidentify", 13352 // "parameterOrder": [ 13353 // "parent" 13354 // ], 13355 // "parameters": { 13356 // "parent": { 13357 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 13358 // "location": "path", 13359 // "pattern": "^projects/[^/]+$", 13360 // "required": true, 13361 // "type": "string" 13362 // } 13363 // }, 13364 // "path": "v2/{+parent}/content:deidentify", 13365 // "request": { 13366 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 13367 // }, 13368 // "response": { 13369 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 13370 // }, 13371 // "scopes": [ 13372 // "https://www.googleapis.com/auth/cloud-platform" 13373 // ] 13374 // } 13375 13376} 13377 13378// method id "dlp.projects.content.inspect": 13379 13380type ProjectsContentInspectCall struct { 13381 s *Service 13382 parentid string 13383 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 13384 urlParams_ gensupport.URLParams 13385 ctx_ context.Context 13386 header_ http.Header 13387} 13388 13389// Inspect: Finds potentially sensitive info in content. This method has 13390// limits on input size, processing time, and output size. When no 13391// InfoTypes or CustomInfoTypes are specified in this request, the 13392// system will automatically choose what detectors to run. By default 13393// this may be all types, but may change over time as detectors are 13394// updated. For how to guides, see 13395// https://cloud.google.com/dlp/docs/inspecting-images and 13396// https://cloud.google.com/dlp/docs/inspecting-text, 13397func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { 13398 c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13399 c.parentid = parentid 13400 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 13401 return c 13402} 13403 13404// Fields allows partial responses to be retrieved. See 13405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13406// for more information. 13407func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { 13408 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13409 return c 13410} 13411 13412// Context sets the context to be used in this call's Do method. Any 13413// pending HTTP request will be aborted if the provided context is 13414// canceled. 13415func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { 13416 c.ctx_ = ctx 13417 return c 13418} 13419 13420// Header returns an http.Header that can be modified by the caller to 13421// add HTTP headers to the request. 13422func (c *ProjectsContentInspectCall) Header() http.Header { 13423 if c.header_ == nil { 13424 c.header_ = make(http.Header) 13425 } 13426 return c.header_ 13427} 13428 13429func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { 13430 reqHeaders := make(http.Header) 13431 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13432 for k, v := range c.header_ { 13433 reqHeaders[k] = v 13434 } 13435 reqHeaders.Set("User-Agent", c.s.userAgent()) 13436 var body io.Reader = nil 13437 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 13438 if err != nil { 13439 return nil, err 13440 } 13441 reqHeaders.Set("Content-Type", "application/json") 13442 c.urlParams_.Set("alt", alt) 13443 c.urlParams_.Set("prettyPrint", "false") 13444 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 13445 urls += "?" + c.urlParams_.Encode() 13446 req, err := http.NewRequest("POST", urls, body) 13447 if err != nil { 13448 return nil, err 13449 } 13450 req.Header = reqHeaders 13451 googleapi.Expand(req.URL, map[string]string{ 13452 "parent": c.parentid, 13453 }) 13454 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13455} 13456 13457// Do executes the "dlp.projects.content.inspect" call. 13458// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 13459// will be non-nil. Any non-2xx status code is an error. Response 13460// headers are in either 13461// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 13462// (if a response was returned at all) in 13463// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13464// whether the returned error was because http.StatusNotModified was 13465// returned. 13466func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 13467 gensupport.SetOptions(c.urlParams_, opts...) 13468 res, err := c.doRequest("json") 13469 if res != nil && res.StatusCode == http.StatusNotModified { 13470 if res.Body != nil { 13471 res.Body.Close() 13472 } 13473 return nil, &googleapi.Error{ 13474 Code: res.StatusCode, 13475 Header: res.Header, 13476 } 13477 } 13478 if err != nil { 13479 return nil, err 13480 } 13481 defer googleapi.CloseBody(res) 13482 if err := googleapi.CheckResponse(res); err != nil { 13483 return nil, err 13484 } 13485 ret := &GooglePrivacyDlpV2InspectContentResponse{ 13486 ServerResponse: googleapi.ServerResponse{ 13487 Header: res.Header, 13488 HTTPStatusCode: res.StatusCode, 13489 }, 13490 } 13491 target := &ret 13492 if err := gensupport.DecodeResponse(target, res); err != nil { 13493 return nil, err 13494 } 13495 return ret, nil 13496 // { 13497 // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", 13498 // "flatPath": "v2/projects/{projectsId}/content:inspect", 13499 // "httpMethod": "POST", 13500 // "id": "dlp.projects.content.inspect", 13501 // "parameterOrder": [ 13502 // "parent" 13503 // ], 13504 // "parameters": { 13505 // "parent": { 13506 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 13507 // "location": "path", 13508 // "pattern": "^projects/[^/]+$", 13509 // "required": true, 13510 // "type": "string" 13511 // } 13512 // }, 13513 // "path": "v2/{+parent}/content:inspect", 13514 // "request": { 13515 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 13516 // }, 13517 // "response": { 13518 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 13519 // }, 13520 // "scopes": [ 13521 // "https://www.googleapis.com/auth/cloud-platform" 13522 // ] 13523 // } 13524 13525} 13526 13527// method id "dlp.projects.content.reidentify": 13528 13529type ProjectsContentReidentifyCall struct { 13530 s *Service 13531 parentid string 13532 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 13533 urlParams_ gensupport.URLParams 13534 ctx_ context.Context 13535 header_ http.Header 13536} 13537 13538// Reidentify: Re-identifies content that has been de-identified. See 13539// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn 13540// more. 13541func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { 13542 c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13543 c.parentid = parentid 13544 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 13545 return c 13546} 13547 13548// Fields allows partial responses to be retrieved. See 13549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13550// for more information. 13551func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { 13552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13553 return c 13554} 13555 13556// Context sets the context to be used in this call's Do method. Any 13557// pending HTTP request will be aborted if the provided context is 13558// canceled. 13559func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { 13560 c.ctx_ = ctx 13561 return c 13562} 13563 13564// Header returns an http.Header that can be modified by the caller to 13565// add HTTP headers to the request. 13566func (c *ProjectsContentReidentifyCall) Header() http.Header { 13567 if c.header_ == nil { 13568 c.header_ = make(http.Header) 13569 } 13570 return c.header_ 13571} 13572 13573func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 13574 reqHeaders := make(http.Header) 13575 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13576 for k, v := range c.header_ { 13577 reqHeaders[k] = v 13578 } 13579 reqHeaders.Set("User-Agent", c.s.userAgent()) 13580 var body io.Reader = nil 13581 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 13582 if err != nil { 13583 return nil, err 13584 } 13585 reqHeaders.Set("Content-Type", "application/json") 13586 c.urlParams_.Set("alt", alt) 13587 c.urlParams_.Set("prettyPrint", "false") 13588 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 13589 urls += "?" + c.urlParams_.Encode() 13590 req, err := http.NewRequest("POST", urls, body) 13591 if err != nil { 13592 return nil, err 13593 } 13594 req.Header = reqHeaders 13595 googleapi.Expand(req.URL, map[string]string{ 13596 "parent": c.parentid, 13597 }) 13598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13599} 13600 13601// Do executes the "dlp.projects.content.reidentify" call. 13602// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 13603// will be non-nil. Any non-2xx status code is an error. Response 13604// headers are in either 13605// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 13606// (if a response was returned at all) in 13607// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13608// whether the returned error was because http.StatusNotModified was 13609// returned. 13610func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 13611 gensupport.SetOptions(c.urlParams_, opts...) 13612 res, err := c.doRequest("json") 13613 if res != nil && res.StatusCode == http.StatusNotModified { 13614 if res.Body != nil { 13615 res.Body.Close() 13616 } 13617 return nil, &googleapi.Error{ 13618 Code: res.StatusCode, 13619 Header: res.Header, 13620 } 13621 } 13622 if err != nil { 13623 return nil, err 13624 } 13625 defer googleapi.CloseBody(res) 13626 if err := googleapi.CheckResponse(res); err != nil { 13627 return nil, err 13628 } 13629 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 13630 ServerResponse: googleapi.ServerResponse{ 13631 Header: res.Header, 13632 HTTPStatusCode: res.StatusCode, 13633 }, 13634 } 13635 target := &ret 13636 if err := gensupport.DecodeResponse(target, res); err != nil { 13637 return nil, err 13638 } 13639 return ret, nil 13640 // { 13641 // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", 13642 // "flatPath": "v2/projects/{projectsId}/content:reidentify", 13643 // "httpMethod": "POST", 13644 // "id": "dlp.projects.content.reidentify", 13645 // "parameterOrder": [ 13646 // "parent" 13647 // ], 13648 // "parameters": { 13649 // "parent": { 13650 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 13651 // "location": "path", 13652 // "pattern": "^projects/[^/]+$", 13653 // "required": true, 13654 // "type": "string" 13655 // } 13656 // }, 13657 // "path": "v2/{+parent}/content:reidentify", 13658 // "request": { 13659 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 13660 // }, 13661 // "response": { 13662 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 13663 // }, 13664 // "scopes": [ 13665 // "https://www.googleapis.com/auth/cloud-platform" 13666 // ] 13667 // } 13668 13669} 13670 13671// method id "dlp.projects.deidentifyTemplates.create": 13672 13673type ProjectsDeidentifyTemplatesCreateCall struct { 13674 s *Service 13675 parentid string 13676 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 13677 urlParams_ gensupport.URLParams 13678 ctx_ context.Context 13679 header_ http.Header 13680} 13681 13682// Create: Creates a DeidentifyTemplate for re-using frequently used 13683// configuration for de-identifying content, images, and storage. See 13684// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13685// more. 13686func (r *ProjectsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { 13687 c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13688 c.parentid = parentid 13689 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 13690 return c 13691} 13692 13693// Fields allows partial responses to be retrieved. See 13694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13695// for more information. 13696func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { 13697 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13698 return c 13699} 13700 13701// Context sets the context to be used in this call's Do method. Any 13702// pending HTTP request will be aborted if the provided context is 13703// canceled. 13704func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { 13705 c.ctx_ = ctx 13706 return c 13707} 13708 13709// Header returns an http.Header that can be modified by the caller to 13710// add HTTP headers to the request. 13711func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { 13712 if c.header_ == nil { 13713 c.header_ = make(http.Header) 13714 } 13715 return c.header_ 13716} 13717 13718func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 13719 reqHeaders := make(http.Header) 13720 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13721 for k, v := range c.header_ { 13722 reqHeaders[k] = v 13723 } 13724 reqHeaders.Set("User-Agent", c.s.userAgent()) 13725 var body io.Reader = nil 13726 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 13727 if err != nil { 13728 return nil, err 13729 } 13730 reqHeaders.Set("Content-Type", "application/json") 13731 c.urlParams_.Set("alt", alt) 13732 c.urlParams_.Set("prettyPrint", "false") 13733 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 13734 urls += "?" + c.urlParams_.Encode() 13735 req, err := http.NewRequest("POST", urls, body) 13736 if err != nil { 13737 return nil, err 13738 } 13739 req.Header = reqHeaders 13740 googleapi.Expand(req.URL, map[string]string{ 13741 "parent": c.parentid, 13742 }) 13743 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13744} 13745 13746// Do executes the "dlp.projects.deidentifyTemplates.create" call. 13747// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 13748// non-nil. Any non-2xx status code is an error. Response headers are in 13749// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 13750// (if a response was returned at all) in 13751// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13752// whether the returned error was because http.StatusNotModified was 13753// returned. 13754func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 13755 gensupport.SetOptions(c.urlParams_, opts...) 13756 res, err := c.doRequest("json") 13757 if res != nil && res.StatusCode == http.StatusNotModified { 13758 if res.Body != nil { 13759 res.Body.Close() 13760 } 13761 return nil, &googleapi.Error{ 13762 Code: res.StatusCode, 13763 Header: res.Header, 13764 } 13765 } 13766 if err != nil { 13767 return nil, err 13768 } 13769 defer googleapi.CloseBody(res) 13770 if err := googleapi.CheckResponse(res); err != nil { 13771 return nil, err 13772 } 13773 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 13774 ServerResponse: googleapi.ServerResponse{ 13775 Header: res.Header, 13776 HTTPStatusCode: res.StatusCode, 13777 }, 13778 } 13779 target := &ret 13780 if err := gensupport.DecodeResponse(target, res); err != nil { 13781 return nil, err 13782 } 13783 return ret, nil 13784 // { 13785 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 13786 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 13787 // "httpMethod": "POST", 13788 // "id": "dlp.projects.deidentifyTemplates.create", 13789 // "parameterOrder": [ 13790 // "parent" 13791 // ], 13792 // "parameters": { 13793 // "parent": { 13794 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 13795 // "location": "path", 13796 // "pattern": "^projects/[^/]+$", 13797 // "required": true, 13798 // "type": "string" 13799 // } 13800 // }, 13801 // "path": "v2/{+parent}/deidentifyTemplates", 13802 // "request": { 13803 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 13804 // }, 13805 // "response": { 13806 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 13807 // }, 13808 // "scopes": [ 13809 // "https://www.googleapis.com/auth/cloud-platform" 13810 // ] 13811 // } 13812 13813} 13814 13815// method id "dlp.projects.deidentifyTemplates.delete": 13816 13817type ProjectsDeidentifyTemplatesDeleteCall struct { 13818 s *Service 13819 name string 13820 urlParams_ gensupport.URLParams 13821 ctx_ context.Context 13822 header_ http.Header 13823} 13824 13825// Delete: Deletes a DeidentifyTemplate. See 13826// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13827// more. 13828func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { 13829 c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13830 c.name = name 13831 return c 13832} 13833 13834// Fields allows partial responses to be retrieved. See 13835// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13836// for more information. 13837func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { 13838 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13839 return c 13840} 13841 13842// Context sets the context to be used in this call's Do method. Any 13843// pending HTTP request will be aborted if the provided context is 13844// canceled. 13845func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { 13846 c.ctx_ = ctx 13847 return c 13848} 13849 13850// Header returns an http.Header that can be modified by the caller to 13851// add HTTP headers to the request. 13852func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { 13853 if c.header_ == nil { 13854 c.header_ = make(http.Header) 13855 } 13856 return c.header_ 13857} 13858 13859func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 13860 reqHeaders := make(http.Header) 13861 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13862 for k, v := range c.header_ { 13863 reqHeaders[k] = v 13864 } 13865 reqHeaders.Set("User-Agent", c.s.userAgent()) 13866 var body io.Reader = nil 13867 c.urlParams_.Set("alt", alt) 13868 c.urlParams_.Set("prettyPrint", "false") 13869 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13870 urls += "?" + c.urlParams_.Encode() 13871 req, err := http.NewRequest("DELETE", urls, body) 13872 if err != nil { 13873 return nil, err 13874 } 13875 req.Header = reqHeaders 13876 googleapi.Expand(req.URL, map[string]string{ 13877 "name": c.name, 13878 }) 13879 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13880} 13881 13882// Do executes the "dlp.projects.deidentifyTemplates.delete" call. 13883// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13884// non-2xx status code is an error. Response headers are in either 13885// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13886// returned at all) in error.(*googleapi.Error).Header. Use 13887// googleapi.IsNotModified to check whether the returned error was 13888// because http.StatusNotModified was returned. 13889func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13890 gensupport.SetOptions(c.urlParams_, opts...) 13891 res, err := c.doRequest("json") 13892 if res != nil && res.StatusCode == http.StatusNotModified { 13893 if res.Body != nil { 13894 res.Body.Close() 13895 } 13896 return nil, &googleapi.Error{ 13897 Code: res.StatusCode, 13898 Header: res.Header, 13899 } 13900 } 13901 if err != nil { 13902 return nil, err 13903 } 13904 defer googleapi.CloseBody(res) 13905 if err := googleapi.CheckResponse(res); err != nil { 13906 return nil, err 13907 } 13908 ret := &GoogleProtobufEmpty{ 13909 ServerResponse: googleapi.ServerResponse{ 13910 Header: res.Header, 13911 HTTPStatusCode: res.StatusCode, 13912 }, 13913 } 13914 target := &ret 13915 if err := gensupport.DecodeResponse(target, res); err != nil { 13916 return nil, err 13917 } 13918 return ret, nil 13919 // { 13920 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 13921 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 13922 // "httpMethod": "DELETE", 13923 // "id": "dlp.projects.deidentifyTemplates.delete", 13924 // "parameterOrder": [ 13925 // "name" 13926 // ], 13927 // "parameters": { 13928 // "name": { 13929 // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 13930 // "location": "path", 13931 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 13932 // "required": true, 13933 // "type": "string" 13934 // } 13935 // }, 13936 // "path": "v2/{+name}", 13937 // "response": { 13938 // "$ref": "GoogleProtobufEmpty" 13939 // }, 13940 // "scopes": [ 13941 // "https://www.googleapis.com/auth/cloud-platform" 13942 // ] 13943 // } 13944 13945} 13946 13947// method id "dlp.projects.deidentifyTemplates.get": 13948 13949type ProjectsDeidentifyTemplatesGetCall struct { 13950 s *Service 13951 name string 13952 urlParams_ gensupport.URLParams 13953 ifNoneMatch_ string 13954 ctx_ context.Context 13955 header_ http.Header 13956} 13957 13958// Get: Gets a DeidentifyTemplate. See 13959// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13960// more. 13961func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { 13962 c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13963 c.name = name 13964 return c 13965} 13966 13967// Fields allows partial responses to be retrieved. See 13968// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13969// for more information. 13970func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { 13971 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13972 return c 13973} 13974 13975// IfNoneMatch sets the optional parameter which makes the operation 13976// fail if the object's ETag matches the given value. This is useful for 13977// getting updates only after the object has changed since the last 13978// request. Use googleapi.IsNotModified to check whether the response 13979// error from Do is the result of In-None-Match. 13980func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { 13981 c.ifNoneMatch_ = entityTag 13982 return c 13983} 13984 13985// Context sets the context to be used in this call's Do method. Any 13986// pending HTTP request will be aborted if the provided context is 13987// canceled. 13988func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { 13989 c.ctx_ = ctx 13990 return c 13991} 13992 13993// Header returns an http.Header that can be modified by the caller to 13994// add HTTP headers to the request. 13995func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { 13996 if c.header_ == nil { 13997 c.header_ = make(http.Header) 13998 } 13999 return c.header_ 14000} 14001 14002func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 14003 reqHeaders := make(http.Header) 14004 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14005 for k, v := range c.header_ { 14006 reqHeaders[k] = v 14007 } 14008 reqHeaders.Set("User-Agent", c.s.userAgent()) 14009 if c.ifNoneMatch_ != "" { 14010 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14011 } 14012 var body io.Reader = nil 14013 c.urlParams_.Set("alt", alt) 14014 c.urlParams_.Set("prettyPrint", "false") 14015 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14016 urls += "?" + c.urlParams_.Encode() 14017 req, err := http.NewRequest("GET", urls, body) 14018 if err != nil { 14019 return nil, err 14020 } 14021 req.Header = reqHeaders 14022 googleapi.Expand(req.URL, map[string]string{ 14023 "name": c.name, 14024 }) 14025 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14026} 14027 14028// Do executes the "dlp.projects.deidentifyTemplates.get" call. 14029// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 14030// non-nil. Any non-2xx status code is an error. Response headers are in 14031// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 14032// (if a response was returned at all) in 14033// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14034// whether the returned error was because http.StatusNotModified was 14035// returned. 14036func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 14037 gensupport.SetOptions(c.urlParams_, opts...) 14038 res, err := c.doRequest("json") 14039 if res != nil && res.StatusCode == http.StatusNotModified { 14040 if res.Body != nil { 14041 res.Body.Close() 14042 } 14043 return nil, &googleapi.Error{ 14044 Code: res.StatusCode, 14045 Header: res.Header, 14046 } 14047 } 14048 if err != nil { 14049 return nil, err 14050 } 14051 defer googleapi.CloseBody(res) 14052 if err := googleapi.CheckResponse(res); err != nil { 14053 return nil, err 14054 } 14055 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 14056 ServerResponse: googleapi.ServerResponse{ 14057 Header: res.Header, 14058 HTTPStatusCode: res.StatusCode, 14059 }, 14060 } 14061 target := &ret 14062 if err := gensupport.DecodeResponse(target, res); err != nil { 14063 return nil, err 14064 } 14065 return ret, nil 14066 // { 14067 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14068 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 14069 // "httpMethod": "GET", 14070 // "id": "dlp.projects.deidentifyTemplates.get", 14071 // "parameterOrder": [ 14072 // "name" 14073 // ], 14074 // "parameters": { 14075 // "name": { 14076 // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 14077 // "location": "path", 14078 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 14079 // "required": true, 14080 // "type": "string" 14081 // } 14082 // }, 14083 // "path": "v2/{+name}", 14084 // "response": { 14085 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 14086 // }, 14087 // "scopes": [ 14088 // "https://www.googleapis.com/auth/cloud-platform" 14089 // ] 14090 // } 14091 14092} 14093 14094// method id "dlp.projects.deidentifyTemplates.list": 14095 14096type ProjectsDeidentifyTemplatesListCall struct { 14097 s *Service 14098 parentid string 14099 urlParams_ gensupport.URLParams 14100 ifNoneMatch_ string 14101 ctx_ context.Context 14102 header_ http.Header 14103} 14104 14105// List: Lists DeidentifyTemplates. See 14106// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 14107// more. 14108func (r *ProjectsDeidentifyTemplatesService) List(parentid string) *ProjectsDeidentifyTemplatesListCall { 14109 c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14110 c.parentid = parentid 14111 return c 14112} 14113 14114// LocationId sets the optional parameter "locationId": Deprecated. This 14115// field has no effect. 14116func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsDeidentifyTemplatesListCall { 14117 c.urlParams_.Set("locationId", locationId) 14118 return c 14119} 14120 14121// OrderBy sets the optional parameter "orderBy": Comma separated list 14122// of fields to order by, followed by `asc` or `desc` postfix. This list 14123// is case-insensitive, default sorting order is ascending, redundant 14124// space characters are insignificant. Example: `name asc,update_time, 14125// create_time desc` Supported fields are: - `create_time`: corresponds 14126// to time the template was created. - `update_time`: corresponds to 14127// time the template was last updated. - `name`: corresponds to 14128// template's name. - `display_name`: corresponds to template's display 14129// name. 14130func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { 14131 c.urlParams_.Set("orderBy", orderBy) 14132 return c 14133} 14134 14135// PageSize sets the optional parameter "pageSize": Size of the page, 14136// can be limited by server. If zero server returns a page of max size 14137// 100. 14138func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { 14139 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14140 return c 14141} 14142 14143// PageToken sets the optional parameter "pageToken": Page token to 14144// continue retrieval. Comes from previous call to 14145// `ListDeidentifyTemplates`. 14146func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { 14147 c.urlParams_.Set("pageToken", pageToken) 14148 return c 14149} 14150 14151// Fields allows partial responses to be retrieved. See 14152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14153// for more information. 14154func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { 14155 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14156 return c 14157} 14158 14159// IfNoneMatch sets the optional parameter which makes the operation 14160// fail if the object's ETag matches the given value. This is useful for 14161// getting updates only after the object has changed since the last 14162// request. Use googleapi.IsNotModified to check whether the response 14163// error from Do is the result of In-None-Match. 14164func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { 14165 c.ifNoneMatch_ = entityTag 14166 return c 14167} 14168 14169// Context sets the context to be used in this call's Do method. Any 14170// pending HTTP request will be aborted if the provided context is 14171// canceled. 14172func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { 14173 c.ctx_ = ctx 14174 return c 14175} 14176 14177// Header returns an http.Header that can be modified by the caller to 14178// add HTTP headers to the request. 14179func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { 14180 if c.header_ == nil { 14181 c.header_ = make(http.Header) 14182 } 14183 return c.header_ 14184} 14185 14186func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 14187 reqHeaders := make(http.Header) 14188 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14189 for k, v := range c.header_ { 14190 reqHeaders[k] = v 14191 } 14192 reqHeaders.Set("User-Agent", c.s.userAgent()) 14193 if c.ifNoneMatch_ != "" { 14194 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14195 } 14196 var body io.Reader = nil 14197 c.urlParams_.Set("alt", alt) 14198 c.urlParams_.Set("prettyPrint", "false") 14199 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 14200 urls += "?" + c.urlParams_.Encode() 14201 req, err := http.NewRequest("GET", urls, body) 14202 if err != nil { 14203 return nil, err 14204 } 14205 req.Header = reqHeaders 14206 googleapi.Expand(req.URL, map[string]string{ 14207 "parent": c.parentid, 14208 }) 14209 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14210} 14211 14212// Do executes the "dlp.projects.deidentifyTemplates.list" call. 14213// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 14214// error will be non-nil. Any non-2xx status code is an error. Response 14215// headers are in either 14216// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 14217// er or (if a response was returned at all) in 14218// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14219// whether the returned error was because http.StatusNotModified was 14220// returned. 14221func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 14222 gensupport.SetOptions(c.urlParams_, opts...) 14223 res, err := c.doRequest("json") 14224 if res != nil && res.StatusCode == http.StatusNotModified { 14225 if res.Body != nil { 14226 res.Body.Close() 14227 } 14228 return nil, &googleapi.Error{ 14229 Code: res.StatusCode, 14230 Header: res.Header, 14231 } 14232 } 14233 if err != nil { 14234 return nil, err 14235 } 14236 defer googleapi.CloseBody(res) 14237 if err := googleapi.CheckResponse(res); err != nil { 14238 return nil, err 14239 } 14240 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 14241 ServerResponse: googleapi.ServerResponse{ 14242 Header: res.Header, 14243 HTTPStatusCode: res.StatusCode, 14244 }, 14245 } 14246 target := &ret 14247 if err := gensupport.DecodeResponse(target, res); err != nil { 14248 return nil, err 14249 } 14250 return ret, nil 14251 // { 14252 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14253 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 14254 // "httpMethod": "GET", 14255 // "id": "dlp.projects.deidentifyTemplates.list", 14256 // "parameterOrder": [ 14257 // "parent" 14258 // ], 14259 // "parameters": { 14260 // "locationId": { 14261 // "description": "Deprecated. This field has no effect.", 14262 // "location": "query", 14263 // "type": "string" 14264 // }, 14265 // "orderBy": { 14266 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 14267 // "location": "query", 14268 // "type": "string" 14269 // }, 14270 // "pageSize": { 14271 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 14272 // "format": "int32", 14273 // "location": "query", 14274 // "type": "integer" 14275 // }, 14276 // "pageToken": { 14277 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 14278 // "location": "query", 14279 // "type": "string" 14280 // }, 14281 // "parent": { 14282 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 14283 // "location": "path", 14284 // "pattern": "^projects/[^/]+$", 14285 // "required": true, 14286 // "type": "string" 14287 // } 14288 // }, 14289 // "path": "v2/{+parent}/deidentifyTemplates", 14290 // "response": { 14291 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 14292 // }, 14293 // "scopes": [ 14294 // "https://www.googleapis.com/auth/cloud-platform" 14295 // ] 14296 // } 14297 14298} 14299 14300// Pages invokes f for each page of results. 14301// A non-nil error returned from f will halt the iteration. 14302// The provided context supersedes any context provided to the Context method. 14303func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 14304 c.ctx_ = ctx 14305 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14306 for { 14307 x, err := c.Do() 14308 if err != nil { 14309 return err 14310 } 14311 if err := f(x); err != nil { 14312 return err 14313 } 14314 if x.NextPageToken == "" { 14315 return nil 14316 } 14317 c.PageToken(x.NextPageToken) 14318 } 14319} 14320 14321// method id "dlp.projects.deidentifyTemplates.patch": 14322 14323type ProjectsDeidentifyTemplatesPatchCall struct { 14324 s *Service 14325 name string 14326 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 14327 urlParams_ gensupport.URLParams 14328 ctx_ context.Context 14329 header_ http.Header 14330} 14331 14332// Patch: Updates the DeidentifyTemplate. See 14333// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 14334// more. 14335func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { 14336 c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14337 c.name = name 14338 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 14339 return c 14340} 14341 14342// Fields allows partial responses to be retrieved. See 14343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14344// for more information. 14345func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { 14346 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14347 return c 14348} 14349 14350// Context sets the context to be used in this call's Do method. Any 14351// pending HTTP request will be aborted if the provided context is 14352// canceled. 14353func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { 14354 c.ctx_ = ctx 14355 return c 14356} 14357 14358// Header returns an http.Header that can be modified by the caller to 14359// add HTTP headers to the request. 14360func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { 14361 if c.header_ == nil { 14362 c.header_ = make(http.Header) 14363 } 14364 return c.header_ 14365} 14366 14367func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 14368 reqHeaders := make(http.Header) 14369 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14370 for k, v := range c.header_ { 14371 reqHeaders[k] = v 14372 } 14373 reqHeaders.Set("User-Agent", c.s.userAgent()) 14374 var body io.Reader = nil 14375 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 14376 if err != nil { 14377 return nil, err 14378 } 14379 reqHeaders.Set("Content-Type", "application/json") 14380 c.urlParams_.Set("alt", alt) 14381 c.urlParams_.Set("prettyPrint", "false") 14382 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14383 urls += "?" + c.urlParams_.Encode() 14384 req, err := http.NewRequest("PATCH", urls, body) 14385 if err != nil { 14386 return nil, err 14387 } 14388 req.Header = reqHeaders 14389 googleapi.Expand(req.URL, map[string]string{ 14390 "name": c.name, 14391 }) 14392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14393} 14394 14395// Do executes the "dlp.projects.deidentifyTemplates.patch" call. 14396// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 14397// non-nil. Any non-2xx status code is an error. Response headers are in 14398// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 14399// (if a response was returned at all) in 14400// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14401// whether the returned error was because http.StatusNotModified was 14402// returned. 14403func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 14404 gensupport.SetOptions(c.urlParams_, opts...) 14405 res, err := c.doRequest("json") 14406 if res != nil && res.StatusCode == http.StatusNotModified { 14407 if res.Body != nil { 14408 res.Body.Close() 14409 } 14410 return nil, &googleapi.Error{ 14411 Code: res.StatusCode, 14412 Header: res.Header, 14413 } 14414 } 14415 if err != nil { 14416 return nil, err 14417 } 14418 defer googleapi.CloseBody(res) 14419 if err := googleapi.CheckResponse(res); err != nil { 14420 return nil, err 14421 } 14422 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 14423 ServerResponse: googleapi.ServerResponse{ 14424 Header: res.Header, 14425 HTTPStatusCode: res.StatusCode, 14426 }, 14427 } 14428 target := &ret 14429 if err := gensupport.DecodeResponse(target, res); err != nil { 14430 return nil, err 14431 } 14432 return ret, nil 14433 // { 14434 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14435 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 14436 // "httpMethod": "PATCH", 14437 // "id": "dlp.projects.deidentifyTemplates.patch", 14438 // "parameterOrder": [ 14439 // "name" 14440 // ], 14441 // "parameters": { 14442 // "name": { 14443 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 14444 // "location": "path", 14445 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 14446 // "required": true, 14447 // "type": "string" 14448 // } 14449 // }, 14450 // "path": "v2/{+name}", 14451 // "request": { 14452 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 14453 // }, 14454 // "response": { 14455 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 14456 // }, 14457 // "scopes": [ 14458 // "https://www.googleapis.com/auth/cloud-platform" 14459 // ] 14460 // } 14461 14462} 14463 14464// method id "dlp.projects.dlpJobs.cancel": 14465 14466type ProjectsDlpJobsCancelCall struct { 14467 s *Service 14468 name string 14469 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 14470 urlParams_ gensupport.URLParams 14471 ctx_ context.Context 14472 header_ http.Header 14473} 14474 14475// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 14476// The server makes a best effort to cancel the DlpJob, but success is 14477// not guaranteed. See 14478// https://cloud.google.com/dlp/docs/inspecting-storage and 14479// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14480// more. 14481func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { 14482 c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14483 c.name = name 14484 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 14485 return c 14486} 14487 14488// Fields allows partial responses to be retrieved. See 14489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14490// for more information. 14491func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { 14492 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14493 return c 14494} 14495 14496// Context sets the context to be used in this call's Do method. Any 14497// pending HTTP request will be aborted if the provided context is 14498// canceled. 14499func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { 14500 c.ctx_ = ctx 14501 return c 14502} 14503 14504// Header returns an http.Header that can be modified by the caller to 14505// add HTTP headers to the request. 14506func (c *ProjectsDlpJobsCancelCall) Header() http.Header { 14507 if c.header_ == nil { 14508 c.header_ = make(http.Header) 14509 } 14510 return c.header_ 14511} 14512 14513func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 14514 reqHeaders := make(http.Header) 14515 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14516 for k, v := range c.header_ { 14517 reqHeaders[k] = v 14518 } 14519 reqHeaders.Set("User-Agent", c.s.userAgent()) 14520 var body io.Reader = nil 14521 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 14522 if err != nil { 14523 return nil, err 14524 } 14525 reqHeaders.Set("Content-Type", "application/json") 14526 c.urlParams_.Set("alt", alt) 14527 c.urlParams_.Set("prettyPrint", "false") 14528 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 14529 urls += "?" + c.urlParams_.Encode() 14530 req, err := http.NewRequest("POST", urls, body) 14531 if err != nil { 14532 return nil, err 14533 } 14534 req.Header = reqHeaders 14535 googleapi.Expand(req.URL, map[string]string{ 14536 "name": c.name, 14537 }) 14538 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14539} 14540 14541// Do executes the "dlp.projects.dlpJobs.cancel" call. 14542// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14543// non-2xx status code is an error. Response headers are in either 14544// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14545// returned at all) in error.(*googleapi.Error).Header. Use 14546// googleapi.IsNotModified to check whether the returned error was 14547// because http.StatusNotModified was returned. 14548func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14549 gensupport.SetOptions(c.urlParams_, opts...) 14550 res, err := c.doRequest("json") 14551 if res != nil && res.StatusCode == http.StatusNotModified { 14552 if res.Body != nil { 14553 res.Body.Close() 14554 } 14555 return nil, &googleapi.Error{ 14556 Code: res.StatusCode, 14557 Header: res.Header, 14558 } 14559 } 14560 if err != nil { 14561 return nil, err 14562 } 14563 defer googleapi.CloseBody(res) 14564 if err := googleapi.CheckResponse(res); err != nil { 14565 return nil, err 14566 } 14567 ret := &GoogleProtobufEmpty{ 14568 ServerResponse: googleapi.ServerResponse{ 14569 Header: res.Header, 14570 HTTPStatusCode: res.StatusCode, 14571 }, 14572 } 14573 target := &ret 14574 if err := gensupport.DecodeResponse(target, res); err != nil { 14575 return nil, err 14576 } 14577 return ret, nil 14578 // { 14579 // "description": "Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 14580 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", 14581 // "httpMethod": "POST", 14582 // "id": "dlp.projects.dlpJobs.cancel", 14583 // "parameterOrder": [ 14584 // "name" 14585 // ], 14586 // "parameters": { 14587 // "name": { 14588 // "description": "Required. The name of the DlpJob resource to be cancelled.", 14589 // "location": "path", 14590 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 14591 // "required": true, 14592 // "type": "string" 14593 // } 14594 // }, 14595 // "path": "v2/{+name}:cancel", 14596 // "request": { 14597 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 14598 // }, 14599 // "response": { 14600 // "$ref": "GoogleProtobufEmpty" 14601 // }, 14602 // "scopes": [ 14603 // "https://www.googleapis.com/auth/cloud-platform" 14604 // ] 14605 // } 14606 14607} 14608 14609// method id "dlp.projects.dlpJobs.create": 14610 14611type ProjectsDlpJobsCreateCall struct { 14612 s *Service 14613 parentid string 14614 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 14615 urlParams_ gensupport.URLParams 14616 ctx_ context.Context 14617 header_ http.Header 14618} 14619 14620// Create: Creates a new job to inspect storage or calculate risk 14621// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 14622// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14623// more. When no InfoTypes or CustomInfoTypes are specified in inspect 14624// jobs, the system will automatically choose what detectors to run. By 14625// default this may be all types, but may change over time as detectors 14626// are updated. 14627func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { 14628 c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14629 c.parentid = parentid 14630 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 14631 return c 14632} 14633 14634// Fields allows partial responses to be retrieved. See 14635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14636// for more information. 14637func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { 14638 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14639 return c 14640} 14641 14642// Context sets the context to be used in this call's Do method. Any 14643// pending HTTP request will be aborted if the provided context is 14644// canceled. 14645func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { 14646 c.ctx_ = ctx 14647 return c 14648} 14649 14650// Header returns an http.Header that can be modified by the caller to 14651// add HTTP headers to the request. 14652func (c *ProjectsDlpJobsCreateCall) Header() http.Header { 14653 if c.header_ == nil { 14654 c.header_ = make(http.Header) 14655 } 14656 return c.header_ 14657} 14658 14659func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 14660 reqHeaders := make(http.Header) 14661 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14662 for k, v := range c.header_ { 14663 reqHeaders[k] = v 14664 } 14665 reqHeaders.Set("User-Agent", c.s.userAgent()) 14666 var body io.Reader = nil 14667 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 14668 if err != nil { 14669 return nil, err 14670 } 14671 reqHeaders.Set("Content-Type", "application/json") 14672 c.urlParams_.Set("alt", alt) 14673 c.urlParams_.Set("prettyPrint", "false") 14674 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 14675 urls += "?" + c.urlParams_.Encode() 14676 req, err := http.NewRequest("POST", urls, body) 14677 if err != nil { 14678 return nil, err 14679 } 14680 req.Header = reqHeaders 14681 googleapi.Expand(req.URL, map[string]string{ 14682 "parent": c.parentid, 14683 }) 14684 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14685} 14686 14687// Do executes the "dlp.projects.dlpJobs.create" call. 14688// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 14689// Any non-2xx status code is an error. Response headers are in either 14690// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 14691// returned at all) in error.(*googleapi.Error).Header. Use 14692// googleapi.IsNotModified to check whether the returned error was 14693// because http.StatusNotModified was returned. 14694func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 14695 gensupport.SetOptions(c.urlParams_, opts...) 14696 res, err := c.doRequest("json") 14697 if res != nil && res.StatusCode == http.StatusNotModified { 14698 if res.Body != nil { 14699 res.Body.Close() 14700 } 14701 return nil, &googleapi.Error{ 14702 Code: res.StatusCode, 14703 Header: res.Header, 14704 } 14705 } 14706 if err != nil { 14707 return nil, err 14708 } 14709 defer googleapi.CloseBody(res) 14710 if err := googleapi.CheckResponse(res); err != nil { 14711 return nil, err 14712 } 14713 ret := &GooglePrivacyDlpV2DlpJob{ 14714 ServerResponse: googleapi.ServerResponse{ 14715 Header: res.Header, 14716 HTTPStatusCode: res.StatusCode, 14717 }, 14718 } 14719 target := &ret 14720 if err := gensupport.DecodeResponse(target, res); err != nil { 14721 return nil, err 14722 } 14723 return ret, nil 14724 // { 14725 // "description": "Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 14726 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 14727 // "httpMethod": "POST", 14728 // "id": "dlp.projects.dlpJobs.create", 14729 // "parameterOrder": [ 14730 // "parent" 14731 // ], 14732 // "parameters": { 14733 // "parent": { 14734 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 14735 // "location": "path", 14736 // "pattern": "^projects/[^/]+$", 14737 // "required": true, 14738 // "type": "string" 14739 // } 14740 // }, 14741 // "path": "v2/{+parent}/dlpJobs", 14742 // "request": { 14743 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 14744 // }, 14745 // "response": { 14746 // "$ref": "GooglePrivacyDlpV2DlpJob" 14747 // }, 14748 // "scopes": [ 14749 // "https://www.googleapis.com/auth/cloud-platform" 14750 // ] 14751 // } 14752 14753} 14754 14755// method id "dlp.projects.dlpJobs.delete": 14756 14757type ProjectsDlpJobsDeleteCall struct { 14758 s *Service 14759 name string 14760 urlParams_ gensupport.URLParams 14761 ctx_ context.Context 14762 header_ http.Header 14763} 14764 14765// Delete: Deletes a long-running DlpJob. This method indicates that the 14766// client is no longer interested in the DlpJob result. The job will be 14767// cancelled if possible. See 14768// https://cloud.google.com/dlp/docs/inspecting-storage and 14769// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14770// more. 14771func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { 14772 c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14773 c.name = name 14774 return c 14775} 14776 14777// Fields allows partial responses to be retrieved. See 14778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14779// for more information. 14780func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { 14781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14782 return c 14783} 14784 14785// Context sets the context to be used in this call's Do method. Any 14786// pending HTTP request will be aborted if the provided context is 14787// canceled. 14788func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { 14789 c.ctx_ = ctx 14790 return c 14791} 14792 14793// Header returns an http.Header that can be modified by the caller to 14794// add HTTP headers to the request. 14795func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { 14796 if c.header_ == nil { 14797 c.header_ = make(http.Header) 14798 } 14799 return c.header_ 14800} 14801 14802func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 14803 reqHeaders := make(http.Header) 14804 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14805 for k, v := range c.header_ { 14806 reqHeaders[k] = v 14807 } 14808 reqHeaders.Set("User-Agent", c.s.userAgent()) 14809 var body io.Reader = nil 14810 c.urlParams_.Set("alt", alt) 14811 c.urlParams_.Set("prettyPrint", "false") 14812 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14813 urls += "?" + c.urlParams_.Encode() 14814 req, err := http.NewRequest("DELETE", urls, body) 14815 if err != nil { 14816 return nil, err 14817 } 14818 req.Header = reqHeaders 14819 googleapi.Expand(req.URL, map[string]string{ 14820 "name": c.name, 14821 }) 14822 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14823} 14824 14825// Do executes the "dlp.projects.dlpJobs.delete" call. 14826// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14827// non-2xx status code is an error. Response headers are in either 14828// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14829// returned at all) in error.(*googleapi.Error).Header. Use 14830// googleapi.IsNotModified to check whether the returned error was 14831// because http.StatusNotModified was returned. 14832func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14833 gensupport.SetOptions(c.urlParams_, opts...) 14834 res, err := c.doRequest("json") 14835 if res != nil && res.StatusCode == http.StatusNotModified { 14836 if res.Body != nil { 14837 res.Body.Close() 14838 } 14839 return nil, &googleapi.Error{ 14840 Code: res.StatusCode, 14841 Header: res.Header, 14842 } 14843 } 14844 if err != nil { 14845 return nil, err 14846 } 14847 defer googleapi.CloseBody(res) 14848 if err := googleapi.CheckResponse(res); err != nil { 14849 return nil, err 14850 } 14851 ret := &GoogleProtobufEmpty{ 14852 ServerResponse: googleapi.ServerResponse{ 14853 Header: res.Header, 14854 HTTPStatusCode: res.StatusCode, 14855 }, 14856 } 14857 target := &ret 14858 if err := gensupport.DecodeResponse(target, res); err != nil { 14859 return nil, err 14860 } 14861 return ret, nil 14862 // { 14863 // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 14864 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 14865 // "httpMethod": "DELETE", 14866 // "id": "dlp.projects.dlpJobs.delete", 14867 // "parameterOrder": [ 14868 // "name" 14869 // ], 14870 // "parameters": { 14871 // "name": { 14872 // "description": "Required. The name of the DlpJob resource to be deleted.", 14873 // "location": "path", 14874 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 14875 // "required": true, 14876 // "type": "string" 14877 // } 14878 // }, 14879 // "path": "v2/{+name}", 14880 // "response": { 14881 // "$ref": "GoogleProtobufEmpty" 14882 // }, 14883 // "scopes": [ 14884 // "https://www.googleapis.com/auth/cloud-platform" 14885 // ] 14886 // } 14887 14888} 14889 14890// method id "dlp.projects.dlpJobs.get": 14891 14892type ProjectsDlpJobsGetCall struct { 14893 s *Service 14894 name string 14895 urlParams_ gensupport.URLParams 14896 ifNoneMatch_ string 14897 ctx_ context.Context 14898 header_ http.Header 14899} 14900 14901// Get: Gets the latest state of a long-running DlpJob. See 14902// https://cloud.google.com/dlp/docs/inspecting-storage and 14903// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14904// more. 14905func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { 14906 c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14907 c.name = name 14908 return c 14909} 14910 14911// Fields allows partial responses to be retrieved. See 14912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14913// for more information. 14914func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { 14915 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14916 return c 14917} 14918 14919// IfNoneMatch sets the optional parameter which makes the operation 14920// fail if the object's ETag matches the given value. This is useful for 14921// getting updates only after the object has changed since the last 14922// request. Use googleapi.IsNotModified to check whether the response 14923// error from Do is the result of In-None-Match. 14924func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { 14925 c.ifNoneMatch_ = entityTag 14926 return c 14927} 14928 14929// Context sets the context to be used in this call's Do method. Any 14930// pending HTTP request will be aborted if the provided context is 14931// canceled. 14932func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { 14933 c.ctx_ = ctx 14934 return c 14935} 14936 14937// Header returns an http.Header that can be modified by the caller to 14938// add HTTP headers to the request. 14939func (c *ProjectsDlpJobsGetCall) Header() http.Header { 14940 if c.header_ == nil { 14941 c.header_ = make(http.Header) 14942 } 14943 return c.header_ 14944} 14945 14946func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 14947 reqHeaders := make(http.Header) 14948 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14949 for k, v := range c.header_ { 14950 reqHeaders[k] = v 14951 } 14952 reqHeaders.Set("User-Agent", c.s.userAgent()) 14953 if c.ifNoneMatch_ != "" { 14954 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14955 } 14956 var body io.Reader = nil 14957 c.urlParams_.Set("alt", alt) 14958 c.urlParams_.Set("prettyPrint", "false") 14959 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14960 urls += "?" + c.urlParams_.Encode() 14961 req, err := http.NewRequest("GET", urls, body) 14962 if err != nil { 14963 return nil, err 14964 } 14965 req.Header = reqHeaders 14966 googleapi.Expand(req.URL, map[string]string{ 14967 "name": c.name, 14968 }) 14969 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14970} 14971 14972// Do executes the "dlp.projects.dlpJobs.get" call. 14973// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 14974// Any non-2xx status code is an error. Response headers are in either 14975// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 14976// returned at all) in error.(*googleapi.Error).Header. Use 14977// googleapi.IsNotModified to check whether the returned error was 14978// because http.StatusNotModified was returned. 14979func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 14980 gensupport.SetOptions(c.urlParams_, opts...) 14981 res, err := c.doRequest("json") 14982 if res != nil && res.StatusCode == http.StatusNotModified { 14983 if res.Body != nil { 14984 res.Body.Close() 14985 } 14986 return nil, &googleapi.Error{ 14987 Code: res.StatusCode, 14988 Header: res.Header, 14989 } 14990 } 14991 if err != nil { 14992 return nil, err 14993 } 14994 defer googleapi.CloseBody(res) 14995 if err := googleapi.CheckResponse(res); err != nil { 14996 return nil, err 14997 } 14998 ret := &GooglePrivacyDlpV2DlpJob{ 14999 ServerResponse: googleapi.ServerResponse{ 15000 Header: res.Header, 15001 HTTPStatusCode: res.StatusCode, 15002 }, 15003 } 15004 target := &ret 15005 if err := gensupport.DecodeResponse(target, res); err != nil { 15006 return nil, err 15007 } 15008 return ret, nil 15009 // { 15010 // "description": "Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 15011 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 15012 // "httpMethod": "GET", 15013 // "id": "dlp.projects.dlpJobs.get", 15014 // "parameterOrder": [ 15015 // "name" 15016 // ], 15017 // "parameters": { 15018 // "name": { 15019 // "description": "Required. The name of the DlpJob resource.", 15020 // "location": "path", 15021 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 15022 // "required": true, 15023 // "type": "string" 15024 // } 15025 // }, 15026 // "path": "v2/{+name}", 15027 // "response": { 15028 // "$ref": "GooglePrivacyDlpV2DlpJob" 15029 // }, 15030 // "scopes": [ 15031 // "https://www.googleapis.com/auth/cloud-platform" 15032 // ] 15033 // } 15034 15035} 15036 15037// method id "dlp.projects.dlpJobs.list": 15038 15039type ProjectsDlpJobsListCall struct { 15040 s *Service 15041 parentid string 15042 urlParams_ gensupport.URLParams 15043 ifNoneMatch_ string 15044 ctx_ context.Context 15045 header_ http.Header 15046} 15047 15048// List: Lists DlpJobs that match the specified filter in the request. 15049// See https://cloud.google.com/dlp/docs/inspecting-storage and 15050// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 15051// more. 15052func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { 15053 c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15054 c.parentid = parentid 15055 return c 15056} 15057 15058// Filter sets the optional parameter "filter": Allows filtering. 15059// Supported syntax: * Filter expressions are made up of one or more 15060// restrictions. * Restrictions can be combined by `AND` or `OR` logical 15061// operators. A sequence of restrictions implicitly uses `AND`. * A 15062// restriction has the form of `{field} {operator} {value}`. * Supported 15063// fields/values for inspect jobs: - `state` - 15064// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 15065// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 15066// of the trigger that created job. - 'end_time` - Corresponds to time 15067// the job finished. - 'start_time` - Corresponds to time the job 15068// finished. * Supported fields for risk analysis jobs: - `state` - 15069// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 15070// the job finished. - 'start_time` - Corresponds to time the job 15071// finished. * The operator must be `=` or `!=`. Examples: * 15072// inspected_storage = cloud_storage AND state = done * 15073// inspected_storage = cloud_storage OR inspected_storage = bigquery * 15074// inspected_storage = cloud_storage AND (state = done OR state = 15075// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 15076// this field should be no more than 500 characters. 15077func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { 15078 c.urlParams_.Set("filter", filter) 15079 return c 15080} 15081 15082// LocationId sets the optional parameter "locationId": Deprecated. This 15083// field has no effect. 15084func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobsListCall { 15085 c.urlParams_.Set("locationId", locationId) 15086 return c 15087} 15088 15089// OrderBy sets the optional parameter "orderBy": Comma separated list 15090// of fields to order by, followed by `asc` or `desc` postfix. This list 15091// is case-insensitive, default sorting order is ascending, redundant 15092// space characters are insignificant. Example: `name asc, end_time asc, 15093// create_time desc` Supported fields are: - `create_time`: corresponds 15094// to time the job was created. - `end_time`: corresponds to time the 15095// job ended. - `name`: corresponds to job's name. - `state`: 15096// corresponds to `state` 15097func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { 15098 c.urlParams_.Set("orderBy", orderBy) 15099 return c 15100} 15101 15102// PageSize sets the optional parameter "pageSize": The standard list 15103// page size. 15104func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { 15105 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15106 return c 15107} 15108 15109// PageToken sets the optional parameter "pageToken": The standard list 15110// page token. 15111func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { 15112 c.urlParams_.Set("pageToken", pageToken) 15113 return c 15114} 15115 15116// Type sets the optional parameter "type": The type of job. Defaults to 15117// `DlpJobType.INSPECT` 15118// 15119// Possible values: 15120// "DLP_JOB_TYPE_UNSPECIFIED" - Unused 15121// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 15122// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 15123func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { 15124 c.urlParams_.Set("type", type_) 15125 return c 15126} 15127 15128// Fields allows partial responses to be retrieved. See 15129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15130// for more information. 15131func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { 15132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15133 return c 15134} 15135 15136// IfNoneMatch sets the optional parameter which makes the operation 15137// fail if the object's ETag matches the given value. This is useful for 15138// getting updates only after the object has changed since the last 15139// request. Use googleapi.IsNotModified to check whether the response 15140// error from Do is the result of In-None-Match. 15141func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { 15142 c.ifNoneMatch_ = entityTag 15143 return c 15144} 15145 15146// Context sets the context to be used in this call's Do method. Any 15147// pending HTTP request will be aborted if the provided context is 15148// canceled. 15149func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { 15150 c.ctx_ = ctx 15151 return c 15152} 15153 15154// Header returns an http.Header that can be modified by the caller to 15155// add HTTP headers to the request. 15156func (c *ProjectsDlpJobsListCall) Header() http.Header { 15157 if c.header_ == nil { 15158 c.header_ = make(http.Header) 15159 } 15160 return c.header_ 15161} 15162 15163func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 15164 reqHeaders := make(http.Header) 15165 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15166 for k, v := range c.header_ { 15167 reqHeaders[k] = v 15168 } 15169 reqHeaders.Set("User-Agent", c.s.userAgent()) 15170 if c.ifNoneMatch_ != "" { 15171 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15172 } 15173 var body io.Reader = nil 15174 c.urlParams_.Set("alt", alt) 15175 c.urlParams_.Set("prettyPrint", "false") 15176 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 15177 urls += "?" + c.urlParams_.Encode() 15178 req, err := http.NewRequest("GET", urls, body) 15179 if err != nil { 15180 return nil, err 15181 } 15182 req.Header = reqHeaders 15183 googleapi.Expand(req.URL, map[string]string{ 15184 "parent": c.parentid, 15185 }) 15186 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15187} 15188 15189// Do executes the "dlp.projects.dlpJobs.list" call. 15190// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 15191// be non-nil. Any non-2xx status code is an error. Response headers are 15192// in either 15193// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 15194// response was returned at all) in error.(*googleapi.Error).Header. Use 15195// googleapi.IsNotModified to check whether the returned error was 15196// because http.StatusNotModified was returned. 15197func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 15198 gensupport.SetOptions(c.urlParams_, opts...) 15199 res, err := c.doRequest("json") 15200 if res != nil && res.StatusCode == http.StatusNotModified { 15201 if res.Body != nil { 15202 res.Body.Close() 15203 } 15204 return nil, &googleapi.Error{ 15205 Code: res.StatusCode, 15206 Header: res.Header, 15207 } 15208 } 15209 if err != nil { 15210 return nil, err 15211 } 15212 defer googleapi.CloseBody(res) 15213 if err := googleapi.CheckResponse(res); err != nil { 15214 return nil, err 15215 } 15216 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 15217 ServerResponse: googleapi.ServerResponse{ 15218 Header: res.Header, 15219 HTTPStatusCode: res.StatusCode, 15220 }, 15221 } 15222 target := &ret 15223 if err := gensupport.DecodeResponse(target, res); err != nil { 15224 return nil, err 15225 } 15226 return ret, nil 15227 // { 15228 // "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 15229 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 15230 // "httpMethod": "GET", 15231 // "id": "dlp.projects.dlpJobs.list", 15232 // "parameterOrder": [ 15233 // "parent" 15234 // ], 15235 // "parameters": { 15236 // "filter": { 15237 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 15238 // "location": "query", 15239 // "type": "string" 15240 // }, 15241 // "locationId": { 15242 // "description": "Deprecated. This field has no effect.", 15243 // "location": "query", 15244 // "type": "string" 15245 // }, 15246 // "orderBy": { 15247 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", 15248 // "location": "query", 15249 // "type": "string" 15250 // }, 15251 // "pageSize": { 15252 // "description": "The standard list page size.", 15253 // "format": "int32", 15254 // "location": "query", 15255 // "type": "integer" 15256 // }, 15257 // "pageToken": { 15258 // "description": "The standard list page token.", 15259 // "location": "query", 15260 // "type": "string" 15261 // }, 15262 // "parent": { 15263 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 15264 // "location": "path", 15265 // "pattern": "^projects/[^/]+$", 15266 // "required": true, 15267 // "type": "string" 15268 // }, 15269 // "type": { 15270 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 15271 // "enum": [ 15272 // "DLP_JOB_TYPE_UNSPECIFIED", 15273 // "INSPECT_JOB", 15274 // "RISK_ANALYSIS_JOB" 15275 // ], 15276 // "enumDescriptions": [ 15277 // "Unused", 15278 // "The job inspected Google Cloud for sensitive data.", 15279 // "The job executed a Risk Analysis computation." 15280 // ], 15281 // "location": "query", 15282 // "type": "string" 15283 // } 15284 // }, 15285 // "path": "v2/{+parent}/dlpJobs", 15286 // "response": { 15287 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 15288 // }, 15289 // "scopes": [ 15290 // "https://www.googleapis.com/auth/cloud-platform" 15291 // ] 15292 // } 15293 15294} 15295 15296// Pages invokes f for each page of results. 15297// A non-nil error returned from f will halt the iteration. 15298// The provided context supersedes any context provided to the Context method. 15299func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 15300 c.ctx_ = ctx 15301 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15302 for { 15303 x, err := c.Do() 15304 if err != nil { 15305 return err 15306 } 15307 if err := f(x); err != nil { 15308 return err 15309 } 15310 if x.NextPageToken == "" { 15311 return nil 15312 } 15313 c.PageToken(x.NextPageToken) 15314 } 15315} 15316 15317// method id "dlp.projects.image.redact": 15318 15319type ProjectsImageRedactCall struct { 15320 s *Service 15321 parentid string 15322 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 15323 urlParams_ gensupport.URLParams 15324 ctx_ context.Context 15325 header_ http.Header 15326} 15327 15328// Redact: Redacts potentially sensitive info from an image. This method 15329// has limits on input size, processing time, and output size. See 15330// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 15331// learn more. When no InfoTypes or CustomInfoTypes are specified in 15332// this request, the system will automatically choose what detectors to 15333// run. By default this may be all types, but may change over time as 15334// detectors are updated. 15335func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { 15336 c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15337 c.parentid = parentid 15338 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 15339 return c 15340} 15341 15342// Fields allows partial responses to be retrieved. See 15343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15344// for more information. 15345func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { 15346 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15347 return c 15348} 15349 15350// Context sets the context to be used in this call's Do method. Any 15351// pending HTTP request will be aborted if the provided context is 15352// canceled. 15353func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { 15354 c.ctx_ = ctx 15355 return c 15356} 15357 15358// Header returns an http.Header that can be modified by the caller to 15359// add HTTP headers to the request. 15360func (c *ProjectsImageRedactCall) Header() http.Header { 15361 if c.header_ == nil { 15362 c.header_ = make(http.Header) 15363 } 15364 return c.header_ 15365} 15366 15367func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { 15368 reqHeaders := make(http.Header) 15369 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15370 for k, v := range c.header_ { 15371 reqHeaders[k] = v 15372 } 15373 reqHeaders.Set("User-Agent", c.s.userAgent()) 15374 var body io.Reader = nil 15375 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 15376 if err != nil { 15377 return nil, err 15378 } 15379 reqHeaders.Set("Content-Type", "application/json") 15380 c.urlParams_.Set("alt", alt) 15381 c.urlParams_.Set("prettyPrint", "false") 15382 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 15383 urls += "?" + c.urlParams_.Encode() 15384 req, err := http.NewRequest("POST", urls, body) 15385 if err != nil { 15386 return nil, err 15387 } 15388 req.Header = reqHeaders 15389 googleapi.Expand(req.URL, map[string]string{ 15390 "parent": c.parentid, 15391 }) 15392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15393} 15394 15395// Do executes the "dlp.projects.image.redact" call. 15396// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 15397// be non-nil. Any non-2xx status code is an error. Response headers are 15398// in either 15399// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 15400// response was returned at all) in error.(*googleapi.Error).Header. Use 15401// googleapi.IsNotModified to check whether the returned error was 15402// because http.StatusNotModified was returned. 15403func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 15404 gensupport.SetOptions(c.urlParams_, opts...) 15405 res, err := c.doRequest("json") 15406 if res != nil && res.StatusCode == http.StatusNotModified { 15407 if res.Body != nil { 15408 res.Body.Close() 15409 } 15410 return nil, &googleapi.Error{ 15411 Code: res.StatusCode, 15412 Header: res.Header, 15413 } 15414 } 15415 if err != nil { 15416 return nil, err 15417 } 15418 defer googleapi.CloseBody(res) 15419 if err := googleapi.CheckResponse(res); err != nil { 15420 return nil, err 15421 } 15422 ret := &GooglePrivacyDlpV2RedactImageResponse{ 15423 ServerResponse: googleapi.ServerResponse{ 15424 Header: res.Header, 15425 HTTPStatusCode: res.StatusCode, 15426 }, 15427 } 15428 target := &ret 15429 if err := gensupport.DecodeResponse(target, res); err != nil { 15430 return nil, err 15431 } 15432 return ret, nil 15433 // { 15434 // "description": "Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 15435 // "flatPath": "v2/projects/{projectsId}/image:redact", 15436 // "httpMethod": "POST", 15437 // "id": "dlp.projects.image.redact", 15438 // "parameterOrder": [ 15439 // "parent" 15440 // ], 15441 // "parameters": { 15442 // "parent": { 15443 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 15444 // "location": "path", 15445 // "pattern": "^projects/[^/]+$", 15446 // "required": true, 15447 // "type": "string" 15448 // } 15449 // }, 15450 // "path": "v2/{+parent}/image:redact", 15451 // "request": { 15452 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 15453 // }, 15454 // "response": { 15455 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 15456 // }, 15457 // "scopes": [ 15458 // "https://www.googleapis.com/auth/cloud-platform" 15459 // ] 15460 // } 15461 15462} 15463 15464// method id "dlp.projects.inspectTemplates.create": 15465 15466type ProjectsInspectTemplatesCreateCall struct { 15467 s *Service 15468 parentid string 15469 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 15470 urlParams_ gensupport.URLParams 15471 ctx_ context.Context 15472 header_ http.Header 15473} 15474 15475// Create: Creates an InspectTemplate for re-using frequently used 15476// configuration for inspecting content, images, and storage. See 15477// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15478func (r *ProjectsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { 15479 c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15480 c.parentid = parentid 15481 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 15482 return c 15483} 15484 15485// Fields allows partial responses to be retrieved. See 15486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15487// for more information. 15488func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { 15489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15490 return c 15491} 15492 15493// Context sets the context to be used in this call's Do method. Any 15494// pending HTTP request will be aborted if the provided context is 15495// canceled. 15496func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { 15497 c.ctx_ = ctx 15498 return c 15499} 15500 15501// Header returns an http.Header that can be modified by the caller to 15502// add HTTP headers to the request. 15503func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { 15504 if c.header_ == nil { 15505 c.header_ = make(http.Header) 15506 } 15507 return c.header_ 15508} 15509 15510func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 15511 reqHeaders := make(http.Header) 15512 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15513 for k, v := range c.header_ { 15514 reqHeaders[k] = v 15515 } 15516 reqHeaders.Set("User-Agent", c.s.userAgent()) 15517 var body io.Reader = nil 15518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 15519 if err != nil { 15520 return nil, err 15521 } 15522 reqHeaders.Set("Content-Type", "application/json") 15523 c.urlParams_.Set("alt", alt) 15524 c.urlParams_.Set("prettyPrint", "false") 15525 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 15526 urls += "?" + c.urlParams_.Encode() 15527 req, err := http.NewRequest("POST", urls, body) 15528 if err != nil { 15529 return nil, err 15530 } 15531 req.Header = reqHeaders 15532 googleapi.Expand(req.URL, map[string]string{ 15533 "parent": c.parentid, 15534 }) 15535 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15536} 15537 15538// Do executes the "dlp.projects.inspectTemplates.create" call. 15539// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 15540// non-nil. Any non-2xx status code is an error. Response headers are in 15541// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 15542// (if a response was returned at all) in 15543// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15544// whether the returned error was because http.StatusNotModified was 15545// returned. 15546func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 15547 gensupport.SetOptions(c.urlParams_, opts...) 15548 res, err := c.doRequest("json") 15549 if res != nil && res.StatusCode == http.StatusNotModified { 15550 if res.Body != nil { 15551 res.Body.Close() 15552 } 15553 return nil, &googleapi.Error{ 15554 Code: res.StatusCode, 15555 Header: res.Header, 15556 } 15557 } 15558 if err != nil { 15559 return nil, err 15560 } 15561 defer googleapi.CloseBody(res) 15562 if err := googleapi.CheckResponse(res); err != nil { 15563 return nil, err 15564 } 15565 ret := &GooglePrivacyDlpV2InspectTemplate{ 15566 ServerResponse: googleapi.ServerResponse{ 15567 Header: res.Header, 15568 HTTPStatusCode: res.StatusCode, 15569 }, 15570 } 15571 target := &ret 15572 if err := gensupport.DecodeResponse(target, res); err != nil { 15573 return nil, err 15574 } 15575 return ret, nil 15576 // { 15577 // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 15578 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 15579 // "httpMethod": "POST", 15580 // "id": "dlp.projects.inspectTemplates.create", 15581 // "parameterOrder": [ 15582 // "parent" 15583 // ], 15584 // "parameters": { 15585 // "parent": { 15586 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 15587 // "location": "path", 15588 // "pattern": "^projects/[^/]+$", 15589 // "required": true, 15590 // "type": "string" 15591 // } 15592 // }, 15593 // "path": "v2/{+parent}/inspectTemplates", 15594 // "request": { 15595 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 15596 // }, 15597 // "response": { 15598 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 15599 // }, 15600 // "scopes": [ 15601 // "https://www.googleapis.com/auth/cloud-platform" 15602 // ] 15603 // } 15604 15605} 15606 15607// method id "dlp.projects.inspectTemplates.delete": 15608 15609type ProjectsInspectTemplatesDeleteCall struct { 15610 s *Service 15611 name string 15612 urlParams_ gensupport.URLParams 15613 ctx_ context.Context 15614 header_ http.Header 15615} 15616 15617// Delete: Deletes an InspectTemplate. See 15618// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15619func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { 15620 c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15621 c.name = name 15622 return c 15623} 15624 15625// Fields allows partial responses to be retrieved. See 15626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15627// for more information. 15628func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { 15629 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15630 return c 15631} 15632 15633// Context sets the context to be used in this call's Do method. Any 15634// pending HTTP request will be aborted if the provided context is 15635// canceled. 15636func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { 15637 c.ctx_ = ctx 15638 return c 15639} 15640 15641// Header returns an http.Header that can be modified by the caller to 15642// add HTTP headers to the request. 15643func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { 15644 if c.header_ == nil { 15645 c.header_ = make(http.Header) 15646 } 15647 return c.header_ 15648} 15649 15650func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 15651 reqHeaders := make(http.Header) 15652 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15653 for k, v := range c.header_ { 15654 reqHeaders[k] = v 15655 } 15656 reqHeaders.Set("User-Agent", c.s.userAgent()) 15657 var body io.Reader = nil 15658 c.urlParams_.Set("alt", alt) 15659 c.urlParams_.Set("prettyPrint", "false") 15660 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15661 urls += "?" + c.urlParams_.Encode() 15662 req, err := http.NewRequest("DELETE", urls, body) 15663 if err != nil { 15664 return nil, err 15665 } 15666 req.Header = reqHeaders 15667 googleapi.Expand(req.URL, map[string]string{ 15668 "name": c.name, 15669 }) 15670 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15671} 15672 15673// Do executes the "dlp.projects.inspectTemplates.delete" call. 15674// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15675// non-2xx status code is an error. Response headers are in either 15676// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15677// returned at all) in error.(*googleapi.Error).Header. Use 15678// googleapi.IsNotModified to check whether the returned error was 15679// because http.StatusNotModified was returned. 15680func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15681 gensupport.SetOptions(c.urlParams_, opts...) 15682 res, err := c.doRequest("json") 15683 if res != nil && res.StatusCode == http.StatusNotModified { 15684 if res.Body != nil { 15685 res.Body.Close() 15686 } 15687 return nil, &googleapi.Error{ 15688 Code: res.StatusCode, 15689 Header: res.Header, 15690 } 15691 } 15692 if err != nil { 15693 return nil, err 15694 } 15695 defer googleapi.CloseBody(res) 15696 if err := googleapi.CheckResponse(res); err != nil { 15697 return nil, err 15698 } 15699 ret := &GoogleProtobufEmpty{ 15700 ServerResponse: googleapi.ServerResponse{ 15701 Header: res.Header, 15702 HTTPStatusCode: res.StatusCode, 15703 }, 15704 } 15705 target := &ret 15706 if err := gensupport.DecodeResponse(target, res); err != nil { 15707 return nil, err 15708 } 15709 return ret, nil 15710 // { 15711 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 15712 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 15713 // "httpMethod": "DELETE", 15714 // "id": "dlp.projects.inspectTemplates.delete", 15715 // "parameterOrder": [ 15716 // "name" 15717 // ], 15718 // "parameters": { 15719 // "name": { 15720 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 15721 // "location": "path", 15722 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 15723 // "required": true, 15724 // "type": "string" 15725 // } 15726 // }, 15727 // "path": "v2/{+name}", 15728 // "response": { 15729 // "$ref": "GoogleProtobufEmpty" 15730 // }, 15731 // "scopes": [ 15732 // "https://www.googleapis.com/auth/cloud-platform" 15733 // ] 15734 // } 15735 15736} 15737 15738// method id "dlp.projects.inspectTemplates.get": 15739 15740type ProjectsInspectTemplatesGetCall struct { 15741 s *Service 15742 name string 15743 urlParams_ gensupport.URLParams 15744 ifNoneMatch_ string 15745 ctx_ context.Context 15746 header_ http.Header 15747} 15748 15749// Get: Gets an InspectTemplate. See 15750// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15751func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { 15752 c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15753 c.name = name 15754 return c 15755} 15756 15757// Fields allows partial responses to be retrieved. See 15758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15759// for more information. 15760func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { 15761 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15762 return c 15763} 15764 15765// IfNoneMatch sets the optional parameter which makes the operation 15766// fail if the object's ETag matches the given value. This is useful for 15767// getting updates only after the object has changed since the last 15768// request. Use googleapi.IsNotModified to check whether the response 15769// error from Do is the result of In-None-Match. 15770func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { 15771 c.ifNoneMatch_ = entityTag 15772 return c 15773} 15774 15775// Context sets the context to be used in this call's Do method. Any 15776// pending HTTP request will be aborted if the provided context is 15777// canceled. 15778func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { 15779 c.ctx_ = ctx 15780 return c 15781} 15782 15783// Header returns an http.Header that can be modified by the caller to 15784// add HTTP headers to the request. 15785func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { 15786 if c.header_ == nil { 15787 c.header_ = make(http.Header) 15788 } 15789 return c.header_ 15790} 15791 15792func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 15793 reqHeaders := make(http.Header) 15794 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15795 for k, v := range c.header_ { 15796 reqHeaders[k] = v 15797 } 15798 reqHeaders.Set("User-Agent", c.s.userAgent()) 15799 if c.ifNoneMatch_ != "" { 15800 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15801 } 15802 var body io.Reader = nil 15803 c.urlParams_.Set("alt", alt) 15804 c.urlParams_.Set("prettyPrint", "false") 15805 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15806 urls += "?" + c.urlParams_.Encode() 15807 req, err := http.NewRequest("GET", urls, body) 15808 if err != nil { 15809 return nil, err 15810 } 15811 req.Header = reqHeaders 15812 googleapi.Expand(req.URL, map[string]string{ 15813 "name": c.name, 15814 }) 15815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15816} 15817 15818// Do executes the "dlp.projects.inspectTemplates.get" call. 15819// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 15820// non-nil. Any non-2xx status code is an error. Response headers are in 15821// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 15822// (if a response was returned at all) in 15823// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15824// whether the returned error was because http.StatusNotModified was 15825// returned. 15826func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 15827 gensupport.SetOptions(c.urlParams_, opts...) 15828 res, err := c.doRequest("json") 15829 if res != nil && res.StatusCode == http.StatusNotModified { 15830 if res.Body != nil { 15831 res.Body.Close() 15832 } 15833 return nil, &googleapi.Error{ 15834 Code: res.StatusCode, 15835 Header: res.Header, 15836 } 15837 } 15838 if err != nil { 15839 return nil, err 15840 } 15841 defer googleapi.CloseBody(res) 15842 if err := googleapi.CheckResponse(res); err != nil { 15843 return nil, err 15844 } 15845 ret := &GooglePrivacyDlpV2InspectTemplate{ 15846 ServerResponse: googleapi.ServerResponse{ 15847 Header: res.Header, 15848 HTTPStatusCode: res.StatusCode, 15849 }, 15850 } 15851 target := &ret 15852 if err := gensupport.DecodeResponse(target, res); err != nil { 15853 return nil, err 15854 } 15855 return ret, nil 15856 // { 15857 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 15858 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 15859 // "httpMethod": "GET", 15860 // "id": "dlp.projects.inspectTemplates.get", 15861 // "parameterOrder": [ 15862 // "name" 15863 // ], 15864 // "parameters": { 15865 // "name": { 15866 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 15867 // "location": "path", 15868 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 15869 // "required": true, 15870 // "type": "string" 15871 // } 15872 // }, 15873 // "path": "v2/{+name}", 15874 // "response": { 15875 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 15876 // }, 15877 // "scopes": [ 15878 // "https://www.googleapis.com/auth/cloud-platform" 15879 // ] 15880 // } 15881 15882} 15883 15884// method id "dlp.projects.inspectTemplates.list": 15885 15886type ProjectsInspectTemplatesListCall struct { 15887 s *Service 15888 parentid string 15889 urlParams_ gensupport.URLParams 15890 ifNoneMatch_ string 15891 ctx_ context.Context 15892 header_ http.Header 15893} 15894 15895// List: Lists InspectTemplates. See 15896// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15897func (r *ProjectsInspectTemplatesService) List(parentid string) *ProjectsInspectTemplatesListCall { 15898 c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15899 c.parentid = parentid 15900 return c 15901} 15902 15903// LocationId sets the optional parameter "locationId": Deprecated. This 15904// field has no effect. 15905func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *ProjectsInspectTemplatesListCall { 15906 c.urlParams_.Set("locationId", locationId) 15907 return c 15908} 15909 15910// OrderBy sets the optional parameter "orderBy": Comma separated list 15911// of fields to order by, followed by `asc` or `desc` postfix. This list 15912// is case-insensitive, default sorting order is ascending, redundant 15913// space characters are insignificant. Example: `name asc,update_time, 15914// create_time desc` Supported fields are: - `create_time`: corresponds 15915// to time the template was created. - `update_time`: corresponds to 15916// time the template was last updated. - `name`: corresponds to 15917// template's name. - `display_name`: corresponds to template's display 15918// name. 15919func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { 15920 c.urlParams_.Set("orderBy", orderBy) 15921 return c 15922} 15923 15924// PageSize sets the optional parameter "pageSize": Size of the page, 15925// can be limited by server. If zero server returns a page of max size 15926// 100. 15927func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { 15928 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15929 return c 15930} 15931 15932// PageToken sets the optional parameter "pageToken": Page token to 15933// continue retrieval. Comes from previous call to 15934// `ListInspectTemplates`. 15935func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { 15936 c.urlParams_.Set("pageToken", pageToken) 15937 return c 15938} 15939 15940// Fields allows partial responses to be retrieved. See 15941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15942// for more information. 15943func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { 15944 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15945 return c 15946} 15947 15948// IfNoneMatch sets the optional parameter which makes the operation 15949// fail if the object's ETag matches the given value. This is useful for 15950// getting updates only after the object has changed since the last 15951// request. Use googleapi.IsNotModified to check whether the response 15952// error from Do is the result of In-None-Match. 15953func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { 15954 c.ifNoneMatch_ = entityTag 15955 return c 15956} 15957 15958// Context sets the context to be used in this call's Do method. Any 15959// pending HTTP request will be aborted if the provided context is 15960// canceled. 15961func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { 15962 c.ctx_ = ctx 15963 return c 15964} 15965 15966// Header returns an http.Header that can be modified by the caller to 15967// add HTTP headers to the request. 15968func (c *ProjectsInspectTemplatesListCall) Header() http.Header { 15969 if c.header_ == nil { 15970 c.header_ = make(http.Header) 15971 } 15972 return c.header_ 15973} 15974 15975func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 15976 reqHeaders := make(http.Header) 15977 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 15978 for k, v := range c.header_ { 15979 reqHeaders[k] = v 15980 } 15981 reqHeaders.Set("User-Agent", c.s.userAgent()) 15982 if c.ifNoneMatch_ != "" { 15983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15984 } 15985 var body io.Reader = nil 15986 c.urlParams_.Set("alt", alt) 15987 c.urlParams_.Set("prettyPrint", "false") 15988 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 15989 urls += "?" + c.urlParams_.Encode() 15990 req, err := http.NewRequest("GET", urls, body) 15991 if err != nil { 15992 return nil, err 15993 } 15994 req.Header = reqHeaders 15995 googleapi.Expand(req.URL, map[string]string{ 15996 "parent": c.parentid, 15997 }) 15998 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15999} 16000 16001// Do executes the "dlp.projects.inspectTemplates.list" call. 16002// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 16003// error will be non-nil. Any non-2xx status code is an error. Response 16004// headers are in either 16005// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 16006// or (if a response was returned at all) in 16007// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16008// whether the returned error was because http.StatusNotModified was 16009// returned. 16010func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 16011 gensupport.SetOptions(c.urlParams_, opts...) 16012 res, err := c.doRequest("json") 16013 if res != nil && res.StatusCode == http.StatusNotModified { 16014 if res.Body != nil { 16015 res.Body.Close() 16016 } 16017 return nil, &googleapi.Error{ 16018 Code: res.StatusCode, 16019 Header: res.Header, 16020 } 16021 } 16022 if err != nil { 16023 return nil, err 16024 } 16025 defer googleapi.CloseBody(res) 16026 if err := googleapi.CheckResponse(res); err != nil { 16027 return nil, err 16028 } 16029 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 16030 ServerResponse: googleapi.ServerResponse{ 16031 Header: res.Header, 16032 HTTPStatusCode: res.StatusCode, 16033 }, 16034 } 16035 target := &ret 16036 if err := gensupport.DecodeResponse(target, res); err != nil { 16037 return nil, err 16038 } 16039 return ret, nil 16040 // { 16041 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 16042 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 16043 // "httpMethod": "GET", 16044 // "id": "dlp.projects.inspectTemplates.list", 16045 // "parameterOrder": [ 16046 // "parent" 16047 // ], 16048 // "parameters": { 16049 // "locationId": { 16050 // "description": "Deprecated. This field has no effect.", 16051 // "location": "query", 16052 // "type": "string" 16053 // }, 16054 // "orderBy": { 16055 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 16056 // "location": "query", 16057 // "type": "string" 16058 // }, 16059 // "pageSize": { 16060 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 16061 // "format": "int32", 16062 // "location": "query", 16063 // "type": "integer" 16064 // }, 16065 // "pageToken": { 16066 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 16067 // "location": "query", 16068 // "type": "string" 16069 // }, 16070 // "parent": { 16071 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 16072 // "location": "path", 16073 // "pattern": "^projects/[^/]+$", 16074 // "required": true, 16075 // "type": "string" 16076 // } 16077 // }, 16078 // "path": "v2/{+parent}/inspectTemplates", 16079 // "response": { 16080 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 16081 // }, 16082 // "scopes": [ 16083 // "https://www.googleapis.com/auth/cloud-platform" 16084 // ] 16085 // } 16086 16087} 16088 16089// Pages invokes f for each page of results. 16090// A non-nil error returned from f will halt the iteration. 16091// The provided context supersedes any context provided to the Context method. 16092func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 16093 c.ctx_ = ctx 16094 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16095 for { 16096 x, err := c.Do() 16097 if err != nil { 16098 return err 16099 } 16100 if err := f(x); err != nil { 16101 return err 16102 } 16103 if x.NextPageToken == "" { 16104 return nil 16105 } 16106 c.PageToken(x.NextPageToken) 16107 } 16108} 16109 16110// method id "dlp.projects.inspectTemplates.patch": 16111 16112type ProjectsInspectTemplatesPatchCall struct { 16113 s *Service 16114 name string 16115 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 16116 urlParams_ gensupport.URLParams 16117 ctx_ context.Context 16118 header_ http.Header 16119} 16120 16121// Patch: Updates the InspectTemplate. See 16122// https://cloud.google.com/dlp/docs/creating-templates to learn more. 16123func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { 16124 c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16125 c.name = name 16126 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 16127 return c 16128} 16129 16130// Fields allows partial responses to be retrieved. See 16131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16132// for more information. 16133func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { 16134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16135 return c 16136} 16137 16138// Context sets the context to be used in this call's Do method. Any 16139// pending HTTP request will be aborted if the provided context is 16140// canceled. 16141func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { 16142 c.ctx_ = ctx 16143 return c 16144} 16145 16146// Header returns an http.Header that can be modified by the caller to 16147// add HTTP headers to the request. 16148func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { 16149 if c.header_ == nil { 16150 c.header_ = make(http.Header) 16151 } 16152 return c.header_ 16153} 16154 16155func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 16156 reqHeaders := make(http.Header) 16157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16158 for k, v := range c.header_ { 16159 reqHeaders[k] = v 16160 } 16161 reqHeaders.Set("User-Agent", c.s.userAgent()) 16162 var body io.Reader = nil 16163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 16164 if err != nil { 16165 return nil, err 16166 } 16167 reqHeaders.Set("Content-Type", "application/json") 16168 c.urlParams_.Set("alt", alt) 16169 c.urlParams_.Set("prettyPrint", "false") 16170 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16171 urls += "?" + c.urlParams_.Encode() 16172 req, err := http.NewRequest("PATCH", urls, body) 16173 if err != nil { 16174 return nil, err 16175 } 16176 req.Header = reqHeaders 16177 googleapi.Expand(req.URL, map[string]string{ 16178 "name": c.name, 16179 }) 16180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16181} 16182 16183// Do executes the "dlp.projects.inspectTemplates.patch" call. 16184// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 16185// non-nil. Any non-2xx status code is an error. Response headers are in 16186// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 16187// (if a response was returned at all) in 16188// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16189// whether the returned error was because http.StatusNotModified was 16190// returned. 16191func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 16192 gensupport.SetOptions(c.urlParams_, opts...) 16193 res, err := c.doRequest("json") 16194 if res != nil && res.StatusCode == http.StatusNotModified { 16195 if res.Body != nil { 16196 res.Body.Close() 16197 } 16198 return nil, &googleapi.Error{ 16199 Code: res.StatusCode, 16200 Header: res.Header, 16201 } 16202 } 16203 if err != nil { 16204 return nil, err 16205 } 16206 defer googleapi.CloseBody(res) 16207 if err := googleapi.CheckResponse(res); err != nil { 16208 return nil, err 16209 } 16210 ret := &GooglePrivacyDlpV2InspectTemplate{ 16211 ServerResponse: googleapi.ServerResponse{ 16212 Header: res.Header, 16213 HTTPStatusCode: res.StatusCode, 16214 }, 16215 } 16216 target := &ret 16217 if err := gensupport.DecodeResponse(target, res); err != nil { 16218 return nil, err 16219 } 16220 return ret, nil 16221 // { 16222 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 16223 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 16224 // "httpMethod": "PATCH", 16225 // "id": "dlp.projects.inspectTemplates.patch", 16226 // "parameterOrder": [ 16227 // "name" 16228 // ], 16229 // "parameters": { 16230 // "name": { 16231 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 16232 // "location": "path", 16233 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 16234 // "required": true, 16235 // "type": "string" 16236 // } 16237 // }, 16238 // "path": "v2/{+name}", 16239 // "request": { 16240 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 16241 // }, 16242 // "response": { 16243 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 16244 // }, 16245 // "scopes": [ 16246 // "https://www.googleapis.com/auth/cloud-platform" 16247 // ] 16248 // } 16249 16250} 16251 16252// method id "dlp.projects.jobTriggers.activate": 16253 16254type ProjectsJobTriggersActivateCall struct { 16255 s *Service 16256 name string 16257 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 16258 urlParams_ gensupport.URLParams 16259 ctx_ context.Context 16260 header_ http.Header 16261} 16262 16263// Activate: Activate a job trigger. Causes the immediate execute of a 16264// trigger instead of waiting on the trigger event to occur. 16265func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { 16266 c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16267 c.name = name 16268 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 16269 return c 16270} 16271 16272// Fields allows partial responses to be retrieved. See 16273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16274// for more information. 16275func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { 16276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16277 return c 16278} 16279 16280// Context sets the context to be used in this call's Do method. Any 16281// pending HTTP request will be aborted if the provided context is 16282// canceled. 16283func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { 16284 c.ctx_ = ctx 16285 return c 16286} 16287 16288// Header returns an http.Header that can be modified by the caller to 16289// add HTTP headers to the request. 16290func (c *ProjectsJobTriggersActivateCall) Header() http.Header { 16291 if c.header_ == nil { 16292 c.header_ = make(http.Header) 16293 } 16294 return c.header_ 16295} 16296 16297func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 16298 reqHeaders := make(http.Header) 16299 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16300 for k, v := range c.header_ { 16301 reqHeaders[k] = v 16302 } 16303 reqHeaders.Set("User-Agent", c.s.userAgent()) 16304 var body io.Reader = nil 16305 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 16306 if err != nil { 16307 return nil, err 16308 } 16309 reqHeaders.Set("Content-Type", "application/json") 16310 c.urlParams_.Set("alt", alt) 16311 c.urlParams_.Set("prettyPrint", "false") 16312 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 16313 urls += "?" + c.urlParams_.Encode() 16314 req, err := http.NewRequest("POST", urls, body) 16315 if err != nil { 16316 return nil, err 16317 } 16318 req.Header = reqHeaders 16319 googleapi.Expand(req.URL, map[string]string{ 16320 "name": c.name, 16321 }) 16322 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16323} 16324 16325// Do executes the "dlp.projects.jobTriggers.activate" call. 16326// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 16327// Any non-2xx status code is an error. Response headers are in either 16328// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 16329// returned at all) in error.(*googleapi.Error).Header. Use 16330// googleapi.IsNotModified to check whether the returned error was 16331// because http.StatusNotModified was returned. 16332func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 16333 gensupport.SetOptions(c.urlParams_, opts...) 16334 res, err := c.doRequest("json") 16335 if res != nil && res.StatusCode == http.StatusNotModified { 16336 if res.Body != nil { 16337 res.Body.Close() 16338 } 16339 return nil, &googleapi.Error{ 16340 Code: res.StatusCode, 16341 Header: res.Header, 16342 } 16343 } 16344 if err != nil { 16345 return nil, err 16346 } 16347 defer googleapi.CloseBody(res) 16348 if err := googleapi.CheckResponse(res); err != nil { 16349 return nil, err 16350 } 16351 ret := &GooglePrivacyDlpV2DlpJob{ 16352 ServerResponse: googleapi.ServerResponse{ 16353 Header: res.Header, 16354 HTTPStatusCode: res.StatusCode, 16355 }, 16356 } 16357 target := &ret 16358 if err := gensupport.DecodeResponse(target, res); err != nil { 16359 return nil, err 16360 } 16361 return ret, nil 16362 // { 16363 // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 16364 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", 16365 // "httpMethod": "POST", 16366 // "id": "dlp.projects.jobTriggers.activate", 16367 // "parameterOrder": [ 16368 // "name" 16369 // ], 16370 // "parameters": { 16371 // "name": { 16372 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16373 // "location": "path", 16374 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16375 // "required": true, 16376 // "type": "string" 16377 // } 16378 // }, 16379 // "path": "v2/{+name}:activate", 16380 // "request": { 16381 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 16382 // }, 16383 // "response": { 16384 // "$ref": "GooglePrivacyDlpV2DlpJob" 16385 // }, 16386 // "scopes": [ 16387 // "https://www.googleapis.com/auth/cloud-platform" 16388 // ] 16389 // } 16390 16391} 16392 16393// method id "dlp.projects.jobTriggers.create": 16394 16395type ProjectsJobTriggersCreateCall struct { 16396 s *Service 16397 parentid string 16398 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 16399 urlParams_ gensupport.URLParams 16400 ctx_ context.Context 16401 header_ http.Header 16402} 16403 16404// Create: Creates a job trigger to run DLP actions such as scanning 16405// storage for sensitive information on a set schedule. See 16406// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16407// more. 16408func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { 16409 c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16410 c.parentid = parentid 16411 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 16412 return c 16413} 16414 16415// Fields allows partial responses to be retrieved. See 16416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16417// for more information. 16418func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { 16419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16420 return c 16421} 16422 16423// Context sets the context to be used in this call's Do method. Any 16424// pending HTTP request will be aborted if the provided context is 16425// canceled. 16426func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { 16427 c.ctx_ = ctx 16428 return c 16429} 16430 16431// Header returns an http.Header that can be modified by the caller to 16432// add HTTP headers to the request. 16433func (c *ProjectsJobTriggersCreateCall) Header() http.Header { 16434 if c.header_ == nil { 16435 c.header_ = make(http.Header) 16436 } 16437 return c.header_ 16438} 16439 16440func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 16441 reqHeaders := make(http.Header) 16442 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16443 for k, v := range c.header_ { 16444 reqHeaders[k] = v 16445 } 16446 reqHeaders.Set("User-Agent", c.s.userAgent()) 16447 var body io.Reader = nil 16448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 16449 if err != nil { 16450 return nil, err 16451 } 16452 reqHeaders.Set("Content-Type", "application/json") 16453 c.urlParams_.Set("alt", alt) 16454 c.urlParams_.Set("prettyPrint", "false") 16455 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 16456 urls += "?" + c.urlParams_.Encode() 16457 req, err := http.NewRequest("POST", urls, body) 16458 if err != nil { 16459 return nil, err 16460 } 16461 req.Header = reqHeaders 16462 googleapi.Expand(req.URL, map[string]string{ 16463 "parent": c.parentid, 16464 }) 16465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16466} 16467 16468// Do executes the "dlp.projects.jobTriggers.create" call. 16469// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 16470// non-nil. Any non-2xx status code is an error. Response headers are in 16471// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 16472// response was returned at all) in error.(*googleapi.Error).Header. Use 16473// googleapi.IsNotModified to check whether the returned error was 16474// because http.StatusNotModified was returned. 16475func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 16476 gensupport.SetOptions(c.urlParams_, opts...) 16477 res, err := c.doRequest("json") 16478 if res != nil && res.StatusCode == http.StatusNotModified { 16479 if res.Body != nil { 16480 res.Body.Close() 16481 } 16482 return nil, &googleapi.Error{ 16483 Code: res.StatusCode, 16484 Header: res.Header, 16485 } 16486 } 16487 if err != nil { 16488 return nil, err 16489 } 16490 defer googleapi.CloseBody(res) 16491 if err := googleapi.CheckResponse(res); err != nil { 16492 return nil, err 16493 } 16494 ret := &GooglePrivacyDlpV2JobTrigger{ 16495 ServerResponse: googleapi.ServerResponse{ 16496 Header: res.Header, 16497 HTTPStatusCode: res.StatusCode, 16498 }, 16499 } 16500 target := &ret 16501 if err := gensupport.DecodeResponse(target, res); err != nil { 16502 return nil, err 16503 } 16504 return ret, nil 16505 // { 16506 // "description": "Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16507 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 16508 // "httpMethod": "POST", 16509 // "id": "dlp.projects.jobTriggers.create", 16510 // "parameterOrder": [ 16511 // "parent" 16512 // ], 16513 // "parameters": { 16514 // "parent": { 16515 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 16516 // "location": "path", 16517 // "pattern": "^projects/[^/]+$", 16518 // "required": true, 16519 // "type": "string" 16520 // } 16521 // }, 16522 // "path": "v2/{+parent}/jobTriggers", 16523 // "request": { 16524 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 16525 // }, 16526 // "response": { 16527 // "$ref": "GooglePrivacyDlpV2JobTrigger" 16528 // }, 16529 // "scopes": [ 16530 // "https://www.googleapis.com/auth/cloud-platform" 16531 // ] 16532 // } 16533 16534} 16535 16536// method id "dlp.projects.jobTriggers.delete": 16537 16538type ProjectsJobTriggersDeleteCall struct { 16539 s *Service 16540 name string 16541 urlParams_ gensupport.URLParams 16542 ctx_ context.Context 16543 header_ http.Header 16544} 16545 16546// Delete: Deletes a job trigger. See 16547// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16548// more. 16549func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { 16550 c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16551 c.name = name 16552 return c 16553} 16554 16555// Fields allows partial responses to be retrieved. See 16556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16557// for more information. 16558func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { 16559 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16560 return c 16561} 16562 16563// Context sets the context to be used in this call's Do method. Any 16564// pending HTTP request will be aborted if the provided context is 16565// canceled. 16566func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { 16567 c.ctx_ = ctx 16568 return c 16569} 16570 16571// Header returns an http.Header that can be modified by the caller to 16572// add HTTP headers to the request. 16573func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { 16574 if c.header_ == nil { 16575 c.header_ = make(http.Header) 16576 } 16577 return c.header_ 16578} 16579 16580func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 16581 reqHeaders := make(http.Header) 16582 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16583 for k, v := range c.header_ { 16584 reqHeaders[k] = v 16585 } 16586 reqHeaders.Set("User-Agent", c.s.userAgent()) 16587 var body io.Reader = nil 16588 c.urlParams_.Set("alt", alt) 16589 c.urlParams_.Set("prettyPrint", "false") 16590 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16591 urls += "?" + c.urlParams_.Encode() 16592 req, err := http.NewRequest("DELETE", urls, body) 16593 if err != nil { 16594 return nil, err 16595 } 16596 req.Header = reqHeaders 16597 googleapi.Expand(req.URL, map[string]string{ 16598 "name": c.name, 16599 }) 16600 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16601} 16602 16603// Do executes the "dlp.projects.jobTriggers.delete" call. 16604// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16605// non-2xx status code is an error. Response headers are in either 16606// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16607// returned at all) in error.(*googleapi.Error).Header. Use 16608// googleapi.IsNotModified to check whether the returned error was 16609// because http.StatusNotModified was returned. 16610func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16611 gensupport.SetOptions(c.urlParams_, opts...) 16612 res, err := c.doRequest("json") 16613 if res != nil && res.StatusCode == http.StatusNotModified { 16614 if res.Body != nil { 16615 res.Body.Close() 16616 } 16617 return nil, &googleapi.Error{ 16618 Code: res.StatusCode, 16619 Header: res.Header, 16620 } 16621 } 16622 if err != nil { 16623 return nil, err 16624 } 16625 defer googleapi.CloseBody(res) 16626 if err := googleapi.CheckResponse(res); err != nil { 16627 return nil, err 16628 } 16629 ret := &GoogleProtobufEmpty{ 16630 ServerResponse: googleapi.ServerResponse{ 16631 Header: res.Header, 16632 HTTPStatusCode: res.StatusCode, 16633 }, 16634 } 16635 target := &ret 16636 if err := gensupport.DecodeResponse(target, res); err != nil { 16637 return nil, err 16638 } 16639 return ret, nil 16640 // { 16641 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16642 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 16643 // "httpMethod": "DELETE", 16644 // "id": "dlp.projects.jobTriggers.delete", 16645 // "parameterOrder": [ 16646 // "name" 16647 // ], 16648 // "parameters": { 16649 // "name": { 16650 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16651 // "location": "path", 16652 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16653 // "required": true, 16654 // "type": "string" 16655 // } 16656 // }, 16657 // "path": "v2/{+name}", 16658 // "response": { 16659 // "$ref": "GoogleProtobufEmpty" 16660 // }, 16661 // "scopes": [ 16662 // "https://www.googleapis.com/auth/cloud-platform" 16663 // ] 16664 // } 16665 16666} 16667 16668// method id "dlp.projects.jobTriggers.get": 16669 16670type ProjectsJobTriggersGetCall struct { 16671 s *Service 16672 name string 16673 urlParams_ gensupport.URLParams 16674 ifNoneMatch_ string 16675 ctx_ context.Context 16676 header_ http.Header 16677} 16678 16679// Get: Gets a job trigger. See 16680// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16681// more. 16682func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { 16683 c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16684 c.name = name 16685 return c 16686} 16687 16688// Fields allows partial responses to be retrieved. See 16689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16690// for more information. 16691func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { 16692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16693 return c 16694} 16695 16696// IfNoneMatch sets the optional parameter which makes the operation 16697// fail if the object's ETag matches the given value. This is useful for 16698// getting updates only after the object has changed since the last 16699// request. Use googleapi.IsNotModified to check whether the response 16700// error from Do is the result of In-None-Match. 16701func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { 16702 c.ifNoneMatch_ = entityTag 16703 return c 16704} 16705 16706// Context sets the context to be used in this call's Do method. Any 16707// pending HTTP request will be aborted if the provided context is 16708// canceled. 16709func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { 16710 c.ctx_ = ctx 16711 return c 16712} 16713 16714// Header returns an http.Header that can be modified by the caller to 16715// add HTTP headers to the request. 16716func (c *ProjectsJobTriggersGetCall) Header() http.Header { 16717 if c.header_ == nil { 16718 c.header_ = make(http.Header) 16719 } 16720 return c.header_ 16721} 16722 16723func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 16724 reqHeaders := make(http.Header) 16725 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16726 for k, v := range c.header_ { 16727 reqHeaders[k] = v 16728 } 16729 reqHeaders.Set("User-Agent", c.s.userAgent()) 16730 if c.ifNoneMatch_ != "" { 16731 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16732 } 16733 var body io.Reader = nil 16734 c.urlParams_.Set("alt", alt) 16735 c.urlParams_.Set("prettyPrint", "false") 16736 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16737 urls += "?" + c.urlParams_.Encode() 16738 req, err := http.NewRequest("GET", urls, body) 16739 if err != nil { 16740 return nil, err 16741 } 16742 req.Header = reqHeaders 16743 googleapi.Expand(req.URL, map[string]string{ 16744 "name": c.name, 16745 }) 16746 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16747} 16748 16749// Do executes the "dlp.projects.jobTriggers.get" call. 16750// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 16751// non-nil. Any non-2xx status code is an error. Response headers are in 16752// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 16753// response was returned at all) in error.(*googleapi.Error).Header. Use 16754// googleapi.IsNotModified to check whether the returned error was 16755// because http.StatusNotModified was returned. 16756func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 16757 gensupport.SetOptions(c.urlParams_, opts...) 16758 res, err := c.doRequest("json") 16759 if res != nil && res.StatusCode == http.StatusNotModified { 16760 if res.Body != nil { 16761 res.Body.Close() 16762 } 16763 return nil, &googleapi.Error{ 16764 Code: res.StatusCode, 16765 Header: res.Header, 16766 } 16767 } 16768 if err != nil { 16769 return nil, err 16770 } 16771 defer googleapi.CloseBody(res) 16772 if err := googleapi.CheckResponse(res); err != nil { 16773 return nil, err 16774 } 16775 ret := &GooglePrivacyDlpV2JobTrigger{ 16776 ServerResponse: googleapi.ServerResponse{ 16777 Header: res.Header, 16778 HTTPStatusCode: res.StatusCode, 16779 }, 16780 } 16781 target := &ret 16782 if err := gensupport.DecodeResponse(target, res); err != nil { 16783 return nil, err 16784 } 16785 return ret, nil 16786 // { 16787 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16788 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 16789 // "httpMethod": "GET", 16790 // "id": "dlp.projects.jobTriggers.get", 16791 // "parameterOrder": [ 16792 // "name" 16793 // ], 16794 // "parameters": { 16795 // "name": { 16796 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16797 // "location": "path", 16798 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16799 // "required": true, 16800 // "type": "string" 16801 // } 16802 // }, 16803 // "path": "v2/{+name}", 16804 // "response": { 16805 // "$ref": "GooglePrivacyDlpV2JobTrigger" 16806 // }, 16807 // "scopes": [ 16808 // "https://www.googleapis.com/auth/cloud-platform" 16809 // ] 16810 // } 16811 16812} 16813 16814// method id "dlp.projects.jobTriggers.list": 16815 16816type ProjectsJobTriggersListCall struct { 16817 s *Service 16818 parentid string 16819 urlParams_ gensupport.URLParams 16820 ifNoneMatch_ string 16821 ctx_ context.Context 16822 header_ http.Header 16823} 16824 16825// List: Lists job triggers. See 16826// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16827// more. 16828func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { 16829 c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16830 c.parentid = parentid 16831 return c 16832} 16833 16834// Filter sets the optional parameter "filter": Allows filtering. 16835// Supported syntax: * Filter expressions are made up of one or more 16836// restrictions. * Restrictions can be combined by `AND` or `OR` logical 16837// operators. A sequence of restrictions implicitly uses `AND`. * A 16838// restriction has the form of `{field} {operator} {value}`. * Supported 16839// fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED 16840// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 16841// 'last_run_time` - RFC 3339 formatted timestamp, surrounded by 16842// quotation marks. Nanoseconds are ignored. - 'error_count' - Number of 16843// errors that have occurred while running. * The operator must be `=` 16844// or `!=` for status and inspected_storage. Examples: * 16845// inspected_storage = cloud_storage AND status = HEALTHY * 16846// inspected_storage = cloud_storage OR inspected_storage = bigquery * 16847// inspected_storage = cloud_storage AND (state = PAUSED OR state = 16848// HEALTHY) * last_run_time > \"2017-12-12T00:00:00+00:00\" The length 16849// of this field should be no more than 500 characters. 16850func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { 16851 c.urlParams_.Set("filter", filter) 16852 return c 16853} 16854 16855// LocationId sets the optional parameter "locationId": Deprecated. This 16856// field has no effect. 16857func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJobTriggersListCall { 16858 c.urlParams_.Set("locationId", locationId) 16859 return c 16860} 16861 16862// OrderBy sets the optional parameter "orderBy": Comma separated list 16863// of triggeredJob fields to order by, followed by `asc` or `desc` 16864// postfix. This list is case-insensitive, default sorting order is 16865// ascending, redundant space characters are insignificant. Example: 16866// `name asc,update_time, create_time desc` Supported fields are: - 16867// `create_time`: corresponds to time the JobTrigger was created. - 16868// `update_time`: corresponds to time the JobTrigger was last updated. - 16869// `last_run_time`: corresponds to the last time the JobTrigger ran. - 16870// `name`: corresponds to JobTrigger's name. - `display_name`: 16871// corresponds to JobTrigger's display name. - `status`: corresponds to 16872// JobTrigger's status. 16873func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { 16874 c.urlParams_.Set("orderBy", orderBy) 16875 return c 16876} 16877 16878// PageSize sets the optional parameter "pageSize": Size of the page, 16879// can be limited by a server. 16880func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { 16881 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16882 return c 16883} 16884 16885// PageToken sets the optional parameter "pageToken": Page token to 16886// continue retrieval. Comes from previous call to ListJobTriggers. 16887// `order_by` field must not change for subsequent calls. 16888func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { 16889 c.urlParams_.Set("pageToken", pageToken) 16890 return c 16891} 16892 16893// Fields allows partial responses to be retrieved. See 16894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16895// for more information. 16896func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { 16897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16898 return c 16899} 16900 16901// IfNoneMatch sets the optional parameter which makes the operation 16902// fail if the object's ETag matches the given value. This is useful for 16903// getting updates only after the object has changed since the last 16904// request. Use googleapi.IsNotModified to check whether the response 16905// error from Do is the result of In-None-Match. 16906func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { 16907 c.ifNoneMatch_ = entityTag 16908 return c 16909} 16910 16911// Context sets the context to be used in this call's Do method. Any 16912// pending HTTP request will be aborted if the provided context is 16913// canceled. 16914func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { 16915 c.ctx_ = ctx 16916 return c 16917} 16918 16919// Header returns an http.Header that can be modified by the caller to 16920// add HTTP headers to the request. 16921func (c *ProjectsJobTriggersListCall) Header() http.Header { 16922 if c.header_ == nil { 16923 c.header_ = make(http.Header) 16924 } 16925 return c.header_ 16926} 16927 16928func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 16929 reqHeaders := make(http.Header) 16930 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 16931 for k, v := range c.header_ { 16932 reqHeaders[k] = v 16933 } 16934 reqHeaders.Set("User-Agent", c.s.userAgent()) 16935 if c.ifNoneMatch_ != "" { 16936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16937 } 16938 var body io.Reader = nil 16939 c.urlParams_.Set("alt", alt) 16940 c.urlParams_.Set("prettyPrint", "false") 16941 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 16942 urls += "?" + c.urlParams_.Encode() 16943 req, err := http.NewRequest("GET", urls, body) 16944 if err != nil { 16945 return nil, err 16946 } 16947 req.Header = reqHeaders 16948 googleapi.Expand(req.URL, map[string]string{ 16949 "parent": c.parentid, 16950 }) 16951 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16952} 16953 16954// Do executes the "dlp.projects.jobTriggers.list" call. 16955// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 16956// will be non-nil. Any non-2xx status code is an error. Response 16957// headers are in either 16958// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 16959// (if a response was returned at all) in 16960// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16961// whether the returned error was because http.StatusNotModified was 16962// returned. 16963func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 16964 gensupport.SetOptions(c.urlParams_, opts...) 16965 res, err := c.doRequest("json") 16966 if res != nil && res.StatusCode == http.StatusNotModified { 16967 if res.Body != nil { 16968 res.Body.Close() 16969 } 16970 return nil, &googleapi.Error{ 16971 Code: res.StatusCode, 16972 Header: res.Header, 16973 } 16974 } 16975 if err != nil { 16976 return nil, err 16977 } 16978 defer googleapi.CloseBody(res) 16979 if err := googleapi.CheckResponse(res); err != nil { 16980 return nil, err 16981 } 16982 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 16983 ServerResponse: googleapi.ServerResponse{ 16984 Header: res.Header, 16985 HTTPStatusCode: res.StatusCode, 16986 }, 16987 } 16988 target := &ret 16989 if err := gensupport.DecodeResponse(target, res); err != nil { 16990 return nil, err 16991 } 16992 return ret, nil 16993 // { 16994 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16995 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 16996 // "httpMethod": "GET", 16997 // "id": "dlp.projects.jobTriggers.list", 16998 // "parameterOrder": [ 16999 // "parent" 17000 // ], 17001 // "parameters": { 17002 // "filter": { 17003 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 17004 // "location": "query", 17005 // "type": "string" 17006 // }, 17007 // "locationId": { 17008 // "description": "Deprecated. This field has no effect.", 17009 // "location": "query", 17010 // "type": "string" 17011 // }, 17012 // "orderBy": { 17013 // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", 17014 // "location": "query", 17015 // "type": "string" 17016 // }, 17017 // "pageSize": { 17018 // "description": "Size of the page, can be limited by a server.", 17019 // "format": "int32", 17020 // "location": "query", 17021 // "type": "integer" 17022 // }, 17023 // "pageToken": { 17024 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 17025 // "location": "query", 17026 // "type": "string" 17027 // }, 17028 // "parent": { 17029 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 17030 // "location": "path", 17031 // "pattern": "^projects/[^/]+$", 17032 // "required": true, 17033 // "type": "string" 17034 // } 17035 // }, 17036 // "path": "v2/{+parent}/jobTriggers", 17037 // "response": { 17038 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 17039 // }, 17040 // "scopes": [ 17041 // "https://www.googleapis.com/auth/cloud-platform" 17042 // ] 17043 // } 17044 17045} 17046 17047// Pages invokes f for each page of results. 17048// A non-nil error returned from f will halt the iteration. 17049// The provided context supersedes any context provided to the Context method. 17050func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 17051 c.ctx_ = ctx 17052 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17053 for { 17054 x, err := c.Do() 17055 if err != nil { 17056 return err 17057 } 17058 if err := f(x); err != nil { 17059 return err 17060 } 17061 if x.NextPageToken == "" { 17062 return nil 17063 } 17064 c.PageToken(x.NextPageToken) 17065 } 17066} 17067 17068// method id "dlp.projects.jobTriggers.patch": 17069 17070type ProjectsJobTriggersPatchCall struct { 17071 s *Service 17072 name string 17073 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 17074 urlParams_ gensupport.URLParams 17075 ctx_ context.Context 17076 header_ http.Header 17077} 17078 17079// Patch: Updates a job trigger. See 17080// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 17081// more. 17082func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { 17083 c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17084 c.name = name 17085 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 17086 return c 17087} 17088 17089// Fields allows partial responses to be retrieved. See 17090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17091// for more information. 17092func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { 17093 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17094 return c 17095} 17096 17097// Context sets the context to be used in this call's Do method. Any 17098// pending HTTP request will be aborted if the provided context is 17099// canceled. 17100func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { 17101 c.ctx_ = ctx 17102 return c 17103} 17104 17105// Header returns an http.Header that can be modified by the caller to 17106// add HTTP headers to the request. 17107func (c *ProjectsJobTriggersPatchCall) Header() http.Header { 17108 if c.header_ == nil { 17109 c.header_ = make(http.Header) 17110 } 17111 return c.header_ 17112} 17113 17114func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 17115 reqHeaders := make(http.Header) 17116 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17117 for k, v := range c.header_ { 17118 reqHeaders[k] = v 17119 } 17120 reqHeaders.Set("User-Agent", c.s.userAgent()) 17121 var body io.Reader = nil 17122 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 17123 if err != nil { 17124 return nil, err 17125 } 17126 reqHeaders.Set("Content-Type", "application/json") 17127 c.urlParams_.Set("alt", alt) 17128 c.urlParams_.Set("prettyPrint", "false") 17129 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17130 urls += "?" + c.urlParams_.Encode() 17131 req, err := http.NewRequest("PATCH", urls, body) 17132 if err != nil { 17133 return nil, err 17134 } 17135 req.Header = reqHeaders 17136 googleapi.Expand(req.URL, map[string]string{ 17137 "name": c.name, 17138 }) 17139 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17140} 17141 17142// Do executes the "dlp.projects.jobTriggers.patch" call. 17143// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 17144// non-nil. Any non-2xx status code is an error. Response headers are in 17145// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 17146// response was returned at all) in error.(*googleapi.Error).Header. Use 17147// googleapi.IsNotModified to check whether the returned error was 17148// because http.StatusNotModified was returned. 17149func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 17150 gensupport.SetOptions(c.urlParams_, opts...) 17151 res, err := c.doRequest("json") 17152 if res != nil && res.StatusCode == http.StatusNotModified { 17153 if res.Body != nil { 17154 res.Body.Close() 17155 } 17156 return nil, &googleapi.Error{ 17157 Code: res.StatusCode, 17158 Header: res.Header, 17159 } 17160 } 17161 if err != nil { 17162 return nil, err 17163 } 17164 defer googleapi.CloseBody(res) 17165 if err := googleapi.CheckResponse(res); err != nil { 17166 return nil, err 17167 } 17168 ret := &GooglePrivacyDlpV2JobTrigger{ 17169 ServerResponse: googleapi.ServerResponse{ 17170 Header: res.Header, 17171 HTTPStatusCode: res.StatusCode, 17172 }, 17173 } 17174 target := &ret 17175 if err := gensupport.DecodeResponse(target, res); err != nil { 17176 return nil, err 17177 } 17178 return ret, nil 17179 // { 17180 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 17181 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 17182 // "httpMethod": "PATCH", 17183 // "id": "dlp.projects.jobTriggers.patch", 17184 // "parameterOrder": [ 17185 // "name" 17186 // ], 17187 // "parameters": { 17188 // "name": { 17189 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 17190 // "location": "path", 17191 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 17192 // "required": true, 17193 // "type": "string" 17194 // } 17195 // }, 17196 // "path": "v2/{+name}", 17197 // "request": { 17198 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 17199 // }, 17200 // "response": { 17201 // "$ref": "GooglePrivacyDlpV2JobTrigger" 17202 // }, 17203 // "scopes": [ 17204 // "https://www.googleapis.com/auth/cloud-platform" 17205 // ] 17206 // } 17207 17208} 17209 17210// method id "dlp.projects.locations.content.deidentify": 17211 17212type ProjectsLocationsContentDeidentifyCall struct { 17213 s *Service 17214 parentid string 17215 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 17216 urlParams_ gensupport.URLParams 17217 ctx_ context.Context 17218 header_ http.Header 17219} 17220 17221// Deidentify: De-identifies potentially sensitive info from a 17222// ContentItem. This method has limits on input size and output size. 17223// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 17224// learn more. When no InfoTypes or CustomInfoTypes are specified in 17225// this request, the system will automatically choose what detectors to 17226// run. By default this may be all types, but may change over time as 17227// detectors are updated. 17228func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { 17229 c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17230 c.parentid = parentid 17231 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 17232 return c 17233} 17234 17235// Fields allows partial responses to be retrieved. See 17236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17237// for more information. 17238func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { 17239 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17240 return c 17241} 17242 17243// Context sets the context to be used in this call's Do method. Any 17244// pending HTTP request will be aborted if the provided context is 17245// canceled. 17246func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { 17247 c.ctx_ = ctx 17248 return c 17249} 17250 17251// Header returns an http.Header that can be modified by the caller to 17252// add HTTP headers to the request. 17253func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { 17254 if c.header_ == nil { 17255 c.header_ = make(http.Header) 17256 } 17257 return c.header_ 17258} 17259 17260func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 17261 reqHeaders := make(http.Header) 17262 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17263 for k, v := range c.header_ { 17264 reqHeaders[k] = v 17265 } 17266 reqHeaders.Set("User-Agent", c.s.userAgent()) 17267 var body io.Reader = nil 17268 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 17269 if err != nil { 17270 return nil, err 17271 } 17272 reqHeaders.Set("Content-Type", "application/json") 17273 c.urlParams_.Set("alt", alt) 17274 c.urlParams_.Set("prettyPrint", "false") 17275 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 17276 urls += "?" + c.urlParams_.Encode() 17277 req, err := http.NewRequest("POST", urls, body) 17278 if err != nil { 17279 return nil, err 17280 } 17281 req.Header = reqHeaders 17282 googleapi.Expand(req.URL, map[string]string{ 17283 "parent": c.parentid, 17284 }) 17285 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17286} 17287 17288// Do executes the "dlp.projects.locations.content.deidentify" call. 17289// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 17290// will be non-nil. Any non-2xx status code is an error. Response 17291// headers are in either 17292// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 17293// (if a response was returned at all) in 17294// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17295// whether the returned error was because http.StatusNotModified was 17296// returned. 17297func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 17298 gensupport.SetOptions(c.urlParams_, opts...) 17299 res, err := c.doRequest("json") 17300 if res != nil && res.StatusCode == http.StatusNotModified { 17301 if res.Body != nil { 17302 res.Body.Close() 17303 } 17304 return nil, &googleapi.Error{ 17305 Code: res.StatusCode, 17306 Header: res.Header, 17307 } 17308 } 17309 if err != nil { 17310 return nil, err 17311 } 17312 defer googleapi.CloseBody(res) 17313 if err := googleapi.CheckResponse(res); err != nil { 17314 return nil, err 17315 } 17316 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 17317 ServerResponse: googleapi.ServerResponse{ 17318 Header: res.Header, 17319 HTTPStatusCode: res.StatusCode, 17320 }, 17321 } 17322 target := &ret 17323 if err := gensupport.DecodeResponse(target, res); err != nil { 17324 return nil, err 17325 } 17326 return ret, nil 17327 // { 17328 // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 17329 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:deidentify", 17330 // "httpMethod": "POST", 17331 // "id": "dlp.projects.locations.content.deidentify", 17332 // "parameterOrder": [ 17333 // "parent" 17334 // ], 17335 // "parameters": { 17336 // "parent": { 17337 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 17338 // "location": "path", 17339 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17340 // "required": true, 17341 // "type": "string" 17342 // } 17343 // }, 17344 // "path": "v2/{+parent}/content:deidentify", 17345 // "request": { 17346 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 17347 // }, 17348 // "response": { 17349 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 17350 // }, 17351 // "scopes": [ 17352 // "https://www.googleapis.com/auth/cloud-platform" 17353 // ] 17354 // } 17355 17356} 17357 17358// method id "dlp.projects.locations.content.inspect": 17359 17360type ProjectsLocationsContentInspectCall struct { 17361 s *Service 17362 parentid string 17363 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 17364 urlParams_ gensupport.URLParams 17365 ctx_ context.Context 17366 header_ http.Header 17367} 17368 17369// Inspect: Finds potentially sensitive info in content. This method has 17370// limits on input size, processing time, and output size. When no 17371// InfoTypes or CustomInfoTypes are specified in this request, the 17372// system will automatically choose what detectors to run. By default 17373// this may be all types, but may change over time as detectors are 17374// updated. For how to guides, see 17375// https://cloud.google.com/dlp/docs/inspecting-images and 17376// https://cloud.google.com/dlp/docs/inspecting-text, 17377func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { 17378 c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17379 c.parentid = parentid 17380 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 17381 return c 17382} 17383 17384// Fields allows partial responses to be retrieved. See 17385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17386// for more information. 17387func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { 17388 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17389 return c 17390} 17391 17392// Context sets the context to be used in this call's Do method. Any 17393// pending HTTP request will be aborted if the provided context is 17394// canceled. 17395func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { 17396 c.ctx_ = ctx 17397 return c 17398} 17399 17400// Header returns an http.Header that can be modified by the caller to 17401// add HTTP headers to the request. 17402func (c *ProjectsLocationsContentInspectCall) Header() http.Header { 17403 if c.header_ == nil { 17404 c.header_ = make(http.Header) 17405 } 17406 return c.header_ 17407} 17408 17409func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { 17410 reqHeaders := make(http.Header) 17411 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17412 for k, v := range c.header_ { 17413 reqHeaders[k] = v 17414 } 17415 reqHeaders.Set("User-Agent", c.s.userAgent()) 17416 var body io.Reader = nil 17417 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 17418 if err != nil { 17419 return nil, err 17420 } 17421 reqHeaders.Set("Content-Type", "application/json") 17422 c.urlParams_.Set("alt", alt) 17423 c.urlParams_.Set("prettyPrint", "false") 17424 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 17425 urls += "?" + c.urlParams_.Encode() 17426 req, err := http.NewRequest("POST", urls, body) 17427 if err != nil { 17428 return nil, err 17429 } 17430 req.Header = reqHeaders 17431 googleapi.Expand(req.URL, map[string]string{ 17432 "parent": c.parentid, 17433 }) 17434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17435} 17436 17437// Do executes the "dlp.projects.locations.content.inspect" call. 17438// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 17439// will be non-nil. Any non-2xx status code is an error. Response 17440// headers are in either 17441// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 17442// (if a response was returned at all) in 17443// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17444// whether the returned error was because http.StatusNotModified was 17445// returned. 17446func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 17447 gensupport.SetOptions(c.urlParams_, opts...) 17448 res, err := c.doRequest("json") 17449 if res != nil && res.StatusCode == http.StatusNotModified { 17450 if res.Body != nil { 17451 res.Body.Close() 17452 } 17453 return nil, &googleapi.Error{ 17454 Code: res.StatusCode, 17455 Header: res.Header, 17456 } 17457 } 17458 if err != nil { 17459 return nil, err 17460 } 17461 defer googleapi.CloseBody(res) 17462 if err := googleapi.CheckResponse(res); err != nil { 17463 return nil, err 17464 } 17465 ret := &GooglePrivacyDlpV2InspectContentResponse{ 17466 ServerResponse: googleapi.ServerResponse{ 17467 Header: res.Header, 17468 HTTPStatusCode: res.StatusCode, 17469 }, 17470 } 17471 target := &ret 17472 if err := gensupport.DecodeResponse(target, res); err != nil { 17473 return nil, err 17474 } 17475 return ret, nil 17476 // { 17477 // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", 17478 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", 17479 // "httpMethod": "POST", 17480 // "id": "dlp.projects.locations.content.inspect", 17481 // "parameterOrder": [ 17482 // "parent" 17483 // ], 17484 // "parameters": { 17485 // "parent": { 17486 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 17487 // "location": "path", 17488 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17489 // "required": true, 17490 // "type": "string" 17491 // } 17492 // }, 17493 // "path": "v2/{+parent}/content:inspect", 17494 // "request": { 17495 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 17496 // }, 17497 // "response": { 17498 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 17499 // }, 17500 // "scopes": [ 17501 // "https://www.googleapis.com/auth/cloud-platform" 17502 // ] 17503 // } 17504 17505} 17506 17507// method id "dlp.projects.locations.content.reidentify": 17508 17509type ProjectsLocationsContentReidentifyCall struct { 17510 s *Service 17511 parentid string 17512 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 17513 urlParams_ gensupport.URLParams 17514 ctx_ context.Context 17515 header_ http.Header 17516} 17517 17518// Reidentify: Re-identifies content that has been de-identified. See 17519// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn 17520// more. 17521func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { 17522 c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17523 c.parentid = parentid 17524 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 17525 return c 17526} 17527 17528// Fields allows partial responses to be retrieved. See 17529// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17530// for more information. 17531func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { 17532 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17533 return c 17534} 17535 17536// Context sets the context to be used in this call's Do method. Any 17537// pending HTTP request will be aborted if the provided context is 17538// canceled. 17539func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { 17540 c.ctx_ = ctx 17541 return c 17542} 17543 17544// Header returns an http.Header that can be modified by the caller to 17545// add HTTP headers to the request. 17546func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { 17547 if c.header_ == nil { 17548 c.header_ = make(http.Header) 17549 } 17550 return c.header_ 17551} 17552 17553func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 17554 reqHeaders := make(http.Header) 17555 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17556 for k, v := range c.header_ { 17557 reqHeaders[k] = v 17558 } 17559 reqHeaders.Set("User-Agent", c.s.userAgent()) 17560 var body io.Reader = nil 17561 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 17562 if err != nil { 17563 return nil, err 17564 } 17565 reqHeaders.Set("Content-Type", "application/json") 17566 c.urlParams_.Set("alt", alt) 17567 c.urlParams_.Set("prettyPrint", "false") 17568 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 17569 urls += "?" + c.urlParams_.Encode() 17570 req, err := http.NewRequest("POST", urls, body) 17571 if err != nil { 17572 return nil, err 17573 } 17574 req.Header = reqHeaders 17575 googleapi.Expand(req.URL, map[string]string{ 17576 "parent": c.parentid, 17577 }) 17578 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17579} 17580 17581// Do executes the "dlp.projects.locations.content.reidentify" call. 17582// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 17583// will be non-nil. Any non-2xx status code is an error. Response 17584// headers are in either 17585// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 17586// (if a response was returned at all) in 17587// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17588// whether the returned error was because http.StatusNotModified was 17589// returned. 17590func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 17591 gensupport.SetOptions(c.urlParams_, opts...) 17592 res, err := c.doRequest("json") 17593 if res != nil && res.StatusCode == http.StatusNotModified { 17594 if res.Body != nil { 17595 res.Body.Close() 17596 } 17597 return nil, &googleapi.Error{ 17598 Code: res.StatusCode, 17599 Header: res.Header, 17600 } 17601 } 17602 if err != nil { 17603 return nil, err 17604 } 17605 defer googleapi.CloseBody(res) 17606 if err := googleapi.CheckResponse(res); err != nil { 17607 return nil, err 17608 } 17609 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 17610 ServerResponse: googleapi.ServerResponse{ 17611 Header: res.Header, 17612 HTTPStatusCode: res.StatusCode, 17613 }, 17614 } 17615 target := &ret 17616 if err := gensupport.DecodeResponse(target, res); err != nil { 17617 return nil, err 17618 } 17619 return ret, nil 17620 // { 17621 // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", 17622 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:reidentify", 17623 // "httpMethod": "POST", 17624 // "id": "dlp.projects.locations.content.reidentify", 17625 // "parameterOrder": [ 17626 // "parent" 17627 // ], 17628 // "parameters": { 17629 // "parent": { 17630 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 17631 // "location": "path", 17632 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17633 // "required": true, 17634 // "type": "string" 17635 // } 17636 // }, 17637 // "path": "v2/{+parent}/content:reidentify", 17638 // "request": { 17639 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 17640 // }, 17641 // "response": { 17642 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 17643 // }, 17644 // "scopes": [ 17645 // "https://www.googleapis.com/auth/cloud-platform" 17646 // ] 17647 // } 17648 17649} 17650 17651// method id "dlp.projects.locations.deidentifyTemplates.create": 17652 17653type ProjectsLocationsDeidentifyTemplatesCreateCall struct { 17654 s *Service 17655 parentid string 17656 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 17657 urlParams_ gensupport.URLParams 17658 ctx_ context.Context 17659 header_ http.Header 17660} 17661 17662// Create: Creates a DeidentifyTemplate for re-using frequently used 17663// configuration for de-identifying content, images, and storage. See 17664// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17665// more. 17666func (r *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17667 c := &ProjectsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17668 c.parentid = parentid 17669 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 17670 return c 17671} 17672 17673// Fields allows partial responses to be retrieved. See 17674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17675// for more information. 17676func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17677 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17678 return c 17679} 17680 17681// Context sets the context to be used in this call's Do method. Any 17682// pending HTTP request will be aborted if the provided context is 17683// canceled. 17684func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17685 c.ctx_ = ctx 17686 return c 17687} 17688 17689// Header returns an http.Header that can be modified by the caller to 17690// add HTTP headers to the request. 17691func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 17692 if c.header_ == nil { 17693 c.header_ = make(http.Header) 17694 } 17695 return c.header_ 17696} 17697 17698func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 17699 reqHeaders := make(http.Header) 17700 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17701 for k, v := range c.header_ { 17702 reqHeaders[k] = v 17703 } 17704 reqHeaders.Set("User-Agent", c.s.userAgent()) 17705 var body io.Reader = nil 17706 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 17707 if err != nil { 17708 return nil, err 17709 } 17710 reqHeaders.Set("Content-Type", "application/json") 17711 c.urlParams_.Set("alt", alt) 17712 c.urlParams_.Set("prettyPrint", "false") 17713 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 17714 urls += "?" + c.urlParams_.Encode() 17715 req, err := http.NewRequest("POST", urls, body) 17716 if err != nil { 17717 return nil, err 17718 } 17719 req.Header = reqHeaders 17720 googleapi.Expand(req.URL, map[string]string{ 17721 "parent": c.parentid, 17722 }) 17723 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17724} 17725 17726// Do executes the "dlp.projects.locations.deidentifyTemplates.create" call. 17727// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 17728// non-nil. Any non-2xx status code is an error. Response headers are in 17729// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 17730// (if a response was returned at all) in 17731// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17732// whether the returned error was because http.StatusNotModified was 17733// returned. 17734func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 17735 gensupport.SetOptions(c.urlParams_, opts...) 17736 res, err := c.doRequest("json") 17737 if res != nil && res.StatusCode == http.StatusNotModified { 17738 if res.Body != nil { 17739 res.Body.Close() 17740 } 17741 return nil, &googleapi.Error{ 17742 Code: res.StatusCode, 17743 Header: res.Header, 17744 } 17745 } 17746 if err != nil { 17747 return nil, err 17748 } 17749 defer googleapi.CloseBody(res) 17750 if err := googleapi.CheckResponse(res); err != nil { 17751 return nil, err 17752 } 17753 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 17754 ServerResponse: googleapi.ServerResponse{ 17755 Header: res.Header, 17756 HTTPStatusCode: res.StatusCode, 17757 }, 17758 } 17759 target := &ret 17760 if err := gensupport.DecodeResponse(target, res); err != nil { 17761 return nil, err 17762 } 17763 return ret, nil 17764 // { 17765 // "description": "Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 17766 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 17767 // "httpMethod": "POST", 17768 // "id": "dlp.projects.locations.deidentifyTemplates.create", 17769 // "parameterOrder": [ 17770 // "parent" 17771 // ], 17772 // "parameters": { 17773 // "parent": { 17774 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 17775 // "location": "path", 17776 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17777 // "required": true, 17778 // "type": "string" 17779 // } 17780 // }, 17781 // "path": "v2/{+parent}/deidentifyTemplates", 17782 // "request": { 17783 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 17784 // }, 17785 // "response": { 17786 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 17787 // }, 17788 // "scopes": [ 17789 // "https://www.googleapis.com/auth/cloud-platform" 17790 // ] 17791 // } 17792 17793} 17794 17795// method id "dlp.projects.locations.deidentifyTemplates.delete": 17796 17797type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { 17798 s *Service 17799 name string 17800 urlParams_ gensupport.URLParams 17801 ctx_ context.Context 17802 header_ http.Header 17803} 17804 17805// Delete: Deletes a DeidentifyTemplate. See 17806// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17807// more. 17808func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17809 c := &ProjectsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17810 c.name = name 17811 return c 17812} 17813 17814// Fields allows partial responses to be retrieved. See 17815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17816// for more information. 17817func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17818 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17819 return c 17820} 17821 17822// Context sets the context to be used in this call's Do method. Any 17823// pending HTTP request will be aborted if the provided context is 17824// canceled. 17825func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17826 c.ctx_ = ctx 17827 return c 17828} 17829 17830// Header returns an http.Header that can be modified by the caller to 17831// add HTTP headers to the request. 17832func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 17833 if c.header_ == nil { 17834 c.header_ = make(http.Header) 17835 } 17836 return c.header_ 17837} 17838 17839func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 17840 reqHeaders := make(http.Header) 17841 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17842 for k, v := range c.header_ { 17843 reqHeaders[k] = v 17844 } 17845 reqHeaders.Set("User-Agent", c.s.userAgent()) 17846 var body io.Reader = nil 17847 c.urlParams_.Set("alt", alt) 17848 c.urlParams_.Set("prettyPrint", "false") 17849 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17850 urls += "?" + c.urlParams_.Encode() 17851 req, err := http.NewRequest("DELETE", urls, body) 17852 if err != nil { 17853 return nil, err 17854 } 17855 req.Header = reqHeaders 17856 googleapi.Expand(req.URL, map[string]string{ 17857 "name": c.name, 17858 }) 17859 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17860} 17861 17862// Do executes the "dlp.projects.locations.deidentifyTemplates.delete" call. 17863// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 17864// non-2xx status code is an error. Response headers are in either 17865// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 17866// returned at all) in error.(*googleapi.Error).Header. Use 17867// googleapi.IsNotModified to check whether the returned error was 17868// because http.StatusNotModified was returned. 17869func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 17870 gensupport.SetOptions(c.urlParams_, opts...) 17871 res, err := c.doRequest("json") 17872 if res != nil && res.StatusCode == http.StatusNotModified { 17873 if res.Body != nil { 17874 res.Body.Close() 17875 } 17876 return nil, &googleapi.Error{ 17877 Code: res.StatusCode, 17878 Header: res.Header, 17879 } 17880 } 17881 if err != nil { 17882 return nil, err 17883 } 17884 defer googleapi.CloseBody(res) 17885 if err := googleapi.CheckResponse(res); err != nil { 17886 return nil, err 17887 } 17888 ret := &GoogleProtobufEmpty{ 17889 ServerResponse: googleapi.ServerResponse{ 17890 Header: res.Header, 17891 HTTPStatusCode: res.StatusCode, 17892 }, 17893 } 17894 target := &ret 17895 if err := gensupport.DecodeResponse(target, res); err != nil { 17896 return nil, err 17897 } 17898 return ret, nil 17899 // { 17900 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 17901 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 17902 // "httpMethod": "DELETE", 17903 // "id": "dlp.projects.locations.deidentifyTemplates.delete", 17904 // "parameterOrder": [ 17905 // "name" 17906 // ], 17907 // "parameters": { 17908 // "name": { 17909 // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 17910 // "location": "path", 17911 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 17912 // "required": true, 17913 // "type": "string" 17914 // } 17915 // }, 17916 // "path": "v2/{+name}", 17917 // "response": { 17918 // "$ref": "GoogleProtobufEmpty" 17919 // }, 17920 // "scopes": [ 17921 // "https://www.googleapis.com/auth/cloud-platform" 17922 // ] 17923 // } 17924 17925} 17926 17927// method id "dlp.projects.locations.deidentifyTemplates.get": 17928 17929type ProjectsLocationsDeidentifyTemplatesGetCall struct { 17930 s *Service 17931 name string 17932 urlParams_ gensupport.URLParams 17933 ifNoneMatch_ string 17934 ctx_ context.Context 17935 header_ http.Header 17936} 17937 17938// Get: Gets a DeidentifyTemplate. See 17939// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17940// more. 17941func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *ProjectsLocationsDeidentifyTemplatesGetCall { 17942 c := &ProjectsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17943 c.name = name 17944 return c 17945} 17946 17947// Fields allows partial responses to be retrieved. See 17948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17949// for more information. 17950func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesGetCall { 17951 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17952 return c 17953} 17954 17955// IfNoneMatch sets the optional parameter which makes the operation 17956// fail if the object's ETag matches the given value. This is useful for 17957// getting updates only after the object has changed since the last 17958// request. Use googleapi.IsNotModified to check whether the response 17959// error from Do is the result of In-None-Match. 17960func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesGetCall { 17961 c.ifNoneMatch_ = entityTag 17962 return c 17963} 17964 17965// Context sets the context to be used in this call's Do method. Any 17966// pending HTTP request will be aborted if the provided context is 17967// canceled. 17968func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesGetCall { 17969 c.ctx_ = ctx 17970 return c 17971} 17972 17973// Header returns an http.Header that can be modified by the caller to 17974// add HTTP headers to the request. 17975func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 17976 if c.header_ == nil { 17977 c.header_ = make(http.Header) 17978 } 17979 return c.header_ 17980} 17981 17982func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 17983 reqHeaders := make(http.Header) 17984 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 17985 for k, v := range c.header_ { 17986 reqHeaders[k] = v 17987 } 17988 reqHeaders.Set("User-Agent", c.s.userAgent()) 17989 if c.ifNoneMatch_ != "" { 17990 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17991 } 17992 var body io.Reader = nil 17993 c.urlParams_.Set("alt", alt) 17994 c.urlParams_.Set("prettyPrint", "false") 17995 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17996 urls += "?" + c.urlParams_.Encode() 17997 req, err := http.NewRequest("GET", urls, body) 17998 if err != nil { 17999 return nil, err 18000 } 18001 req.Header = reqHeaders 18002 googleapi.Expand(req.URL, map[string]string{ 18003 "name": c.name, 18004 }) 18005 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18006} 18007 18008// Do executes the "dlp.projects.locations.deidentifyTemplates.get" call. 18009// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 18010// non-nil. Any non-2xx status code is an error. Response headers are in 18011// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 18012// (if a response was returned at all) in 18013// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18014// whether the returned error was because http.StatusNotModified was 18015// returned. 18016func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 18017 gensupport.SetOptions(c.urlParams_, opts...) 18018 res, err := c.doRequest("json") 18019 if res != nil && res.StatusCode == http.StatusNotModified { 18020 if res.Body != nil { 18021 res.Body.Close() 18022 } 18023 return nil, &googleapi.Error{ 18024 Code: res.StatusCode, 18025 Header: res.Header, 18026 } 18027 } 18028 if err != nil { 18029 return nil, err 18030 } 18031 defer googleapi.CloseBody(res) 18032 if err := googleapi.CheckResponse(res); err != nil { 18033 return nil, err 18034 } 18035 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 18036 ServerResponse: googleapi.ServerResponse{ 18037 Header: res.Header, 18038 HTTPStatusCode: res.StatusCode, 18039 }, 18040 } 18041 target := &ret 18042 if err := gensupport.DecodeResponse(target, res); err != nil { 18043 return nil, err 18044 } 18045 return ret, nil 18046 // { 18047 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18048 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 18049 // "httpMethod": "GET", 18050 // "id": "dlp.projects.locations.deidentifyTemplates.get", 18051 // "parameterOrder": [ 18052 // "name" 18053 // ], 18054 // "parameters": { 18055 // "name": { 18056 // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 18057 // "location": "path", 18058 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 18059 // "required": true, 18060 // "type": "string" 18061 // } 18062 // }, 18063 // "path": "v2/{+name}", 18064 // "response": { 18065 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 18066 // }, 18067 // "scopes": [ 18068 // "https://www.googleapis.com/auth/cloud-platform" 18069 // ] 18070 // } 18071 18072} 18073 18074// method id "dlp.projects.locations.deidentifyTemplates.list": 18075 18076type ProjectsLocationsDeidentifyTemplatesListCall struct { 18077 s *Service 18078 parentid string 18079 urlParams_ gensupport.URLParams 18080 ifNoneMatch_ string 18081 ctx_ context.Context 18082 header_ http.Header 18083} 18084 18085// List: Lists DeidentifyTemplates. See 18086// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 18087// more. 18088func (r *ProjectsLocationsDeidentifyTemplatesService) List(parentid string) *ProjectsLocationsDeidentifyTemplatesListCall { 18089 c := &ProjectsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18090 c.parentid = parentid 18091 return c 18092} 18093 18094// LocationId sets the optional parameter "locationId": Deprecated. This 18095// field has no effect. 18096func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsLocationsDeidentifyTemplatesListCall { 18097 c.urlParams_.Set("locationId", locationId) 18098 return c 18099} 18100 18101// OrderBy sets the optional parameter "orderBy": Comma separated list 18102// of fields to order by, followed by `asc` or `desc` postfix. This list 18103// is case-insensitive, default sorting order is ascending, redundant 18104// space characters are insignificant. Example: `name asc,update_time, 18105// create_time desc` Supported fields are: - `create_time`: corresponds 18106// to time the template was created. - `update_time`: corresponds to 18107// time the template was last updated. - `name`: corresponds to 18108// template's name. - `display_name`: corresponds to template's display 18109// name. 18110func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { 18111 c.urlParams_.Set("orderBy", orderBy) 18112 return c 18113} 18114 18115// PageSize sets the optional parameter "pageSize": Size of the page, 18116// can be limited by server. If zero server returns a page of max size 18117// 100. 18118func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { 18119 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18120 return c 18121} 18122 18123// PageToken sets the optional parameter "pageToken": Page token to 18124// continue retrieval. Comes from previous call to 18125// `ListDeidentifyTemplates`. 18126func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { 18127 c.urlParams_.Set("pageToken", pageToken) 18128 return c 18129} 18130 18131// Fields allows partial responses to be retrieved. See 18132// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18133// for more information. 18134func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesListCall { 18135 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18136 return c 18137} 18138 18139// IfNoneMatch sets the optional parameter which makes the operation 18140// fail if the object's ETag matches the given value. This is useful for 18141// getting updates only after the object has changed since the last 18142// request. Use googleapi.IsNotModified to check whether the response 18143// error from Do is the result of In-None-Match. 18144func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesListCall { 18145 c.ifNoneMatch_ = entityTag 18146 return c 18147} 18148 18149// Context sets the context to be used in this call's Do method. Any 18150// pending HTTP request will be aborted if the provided context is 18151// canceled. 18152func (c *ProjectsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesListCall { 18153 c.ctx_ = ctx 18154 return c 18155} 18156 18157// Header returns an http.Header that can be modified by the caller to 18158// add HTTP headers to the request. 18159func (c *ProjectsLocationsDeidentifyTemplatesListCall) Header() http.Header { 18160 if c.header_ == nil { 18161 c.header_ = make(http.Header) 18162 } 18163 return c.header_ 18164} 18165 18166func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 18167 reqHeaders := make(http.Header) 18168 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18169 for k, v := range c.header_ { 18170 reqHeaders[k] = v 18171 } 18172 reqHeaders.Set("User-Agent", c.s.userAgent()) 18173 if c.ifNoneMatch_ != "" { 18174 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18175 } 18176 var body io.Reader = nil 18177 c.urlParams_.Set("alt", alt) 18178 c.urlParams_.Set("prettyPrint", "false") 18179 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 18180 urls += "?" + c.urlParams_.Encode() 18181 req, err := http.NewRequest("GET", urls, body) 18182 if err != nil { 18183 return nil, err 18184 } 18185 req.Header = reqHeaders 18186 googleapi.Expand(req.URL, map[string]string{ 18187 "parent": c.parentid, 18188 }) 18189 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18190} 18191 18192// Do executes the "dlp.projects.locations.deidentifyTemplates.list" call. 18193// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 18194// error will be non-nil. Any non-2xx status code is an error. Response 18195// headers are in either 18196// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 18197// er or (if a response was returned at all) in 18198// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18199// whether the returned error was because http.StatusNotModified was 18200// returned. 18201func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 18202 gensupport.SetOptions(c.urlParams_, opts...) 18203 res, err := c.doRequest("json") 18204 if res != nil && res.StatusCode == http.StatusNotModified { 18205 if res.Body != nil { 18206 res.Body.Close() 18207 } 18208 return nil, &googleapi.Error{ 18209 Code: res.StatusCode, 18210 Header: res.Header, 18211 } 18212 } 18213 if err != nil { 18214 return nil, err 18215 } 18216 defer googleapi.CloseBody(res) 18217 if err := googleapi.CheckResponse(res); err != nil { 18218 return nil, err 18219 } 18220 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 18221 ServerResponse: googleapi.ServerResponse{ 18222 Header: res.Header, 18223 HTTPStatusCode: res.StatusCode, 18224 }, 18225 } 18226 target := &ret 18227 if err := gensupport.DecodeResponse(target, res); err != nil { 18228 return nil, err 18229 } 18230 return ret, nil 18231 // { 18232 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18233 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 18234 // "httpMethod": "GET", 18235 // "id": "dlp.projects.locations.deidentifyTemplates.list", 18236 // "parameterOrder": [ 18237 // "parent" 18238 // ], 18239 // "parameters": { 18240 // "locationId": { 18241 // "description": "Deprecated. This field has no effect.", 18242 // "location": "query", 18243 // "type": "string" 18244 // }, 18245 // "orderBy": { 18246 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 18247 // "location": "query", 18248 // "type": "string" 18249 // }, 18250 // "pageSize": { 18251 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 18252 // "format": "int32", 18253 // "location": "query", 18254 // "type": "integer" 18255 // }, 18256 // "pageToken": { 18257 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 18258 // "location": "query", 18259 // "type": "string" 18260 // }, 18261 // "parent": { 18262 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 18263 // "location": "path", 18264 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18265 // "required": true, 18266 // "type": "string" 18267 // } 18268 // }, 18269 // "path": "v2/{+parent}/deidentifyTemplates", 18270 // "response": { 18271 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 18272 // }, 18273 // "scopes": [ 18274 // "https://www.googleapis.com/auth/cloud-platform" 18275 // ] 18276 // } 18277 18278} 18279 18280// Pages invokes f for each page of results. 18281// A non-nil error returned from f will halt the iteration. 18282// The provided context supersedes any context provided to the Context method. 18283func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 18284 c.ctx_ = ctx 18285 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18286 for { 18287 x, err := c.Do() 18288 if err != nil { 18289 return err 18290 } 18291 if err := f(x); err != nil { 18292 return err 18293 } 18294 if x.NextPageToken == "" { 18295 return nil 18296 } 18297 c.PageToken(x.NextPageToken) 18298 } 18299} 18300 18301// method id "dlp.projects.locations.deidentifyTemplates.patch": 18302 18303type ProjectsLocationsDeidentifyTemplatesPatchCall struct { 18304 s *Service 18305 name string 18306 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 18307 urlParams_ gensupport.URLParams 18308 ctx_ context.Context 18309 header_ http.Header 18310} 18311 18312// Patch: Updates the DeidentifyTemplate. See 18313// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 18314// more. 18315func (r *ProjectsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18316 c := &ProjectsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18317 c.name = name 18318 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 18319 return c 18320} 18321 18322// Fields allows partial responses to be retrieved. See 18323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18324// for more information. 18325func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18326 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18327 return c 18328} 18329 18330// Context sets the context to be used in this call's Do method. Any 18331// pending HTTP request will be aborted if the provided context is 18332// canceled. 18333func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18334 c.ctx_ = ctx 18335 return c 18336} 18337 18338// Header returns an http.Header that can be modified by the caller to 18339// add HTTP headers to the request. 18340func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 18341 if c.header_ == nil { 18342 c.header_ = make(http.Header) 18343 } 18344 return c.header_ 18345} 18346 18347func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 18348 reqHeaders := make(http.Header) 18349 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18350 for k, v := range c.header_ { 18351 reqHeaders[k] = v 18352 } 18353 reqHeaders.Set("User-Agent", c.s.userAgent()) 18354 var body io.Reader = nil 18355 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 18356 if err != nil { 18357 return nil, err 18358 } 18359 reqHeaders.Set("Content-Type", "application/json") 18360 c.urlParams_.Set("alt", alt) 18361 c.urlParams_.Set("prettyPrint", "false") 18362 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18363 urls += "?" + c.urlParams_.Encode() 18364 req, err := http.NewRequest("PATCH", urls, body) 18365 if err != nil { 18366 return nil, err 18367 } 18368 req.Header = reqHeaders 18369 googleapi.Expand(req.URL, map[string]string{ 18370 "name": c.name, 18371 }) 18372 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18373} 18374 18375// Do executes the "dlp.projects.locations.deidentifyTemplates.patch" call. 18376// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 18377// non-nil. Any non-2xx status code is an error. Response headers are in 18378// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 18379// (if a response was returned at all) in 18380// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18381// whether the returned error was because http.StatusNotModified was 18382// returned. 18383func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 18384 gensupport.SetOptions(c.urlParams_, opts...) 18385 res, err := c.doRequest("json") 18386 if res != nil && res.StatusCode == http.StatusNotModified { 18387 if res.Body != nil { 18388 res.Body.Close() 18389 } 18390 return nil, &googleapi.Error{ 18391 Code: res.StatusCode, 18392 Header: res.Header, 18393 } 18394 } 18395 if err != nil { 18396 return nil, err 18397 } 18398 defer googleapi.CloseBody(res) 18399 if err := googleapi.CheckResponse(res); err != nil { 18400 return nil, err 18401 } 18402 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 18403 ServerResponse: googleapi.ServerResponse{ 18404 Header: res.Header, 18405 HTTPStatusCode: res.StatusCode, 18406 }, 18407 } 18408 target := &ret 18409 if err := gensupport.DecodeResponse(target, res); err != nil { 18410 return nil, err 18411 } 18412 return ret, nil 18413 // { 18414 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18415 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 18416 // "httpMethod": "PATCH", 18417 // "id": "dlp.projects.locations.deidentifyTemplates.patch", 18418 // "parameterOrder": [ 18419 // "name" 18420 // ], 18421 // "parameters": { 18422 // "name": { 18423 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 18424 // "location": "path", 18425 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 18426 // "required": true, 18427 // "type": "string" 18428 // } 18429 // }, 18430 // "path": "v2/{+name}", 18431 // "request": { 18432 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 18433 // }, 18434 // "response": { 18435 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 18436 // }, 18437 // "scopes": [ 18438 // "https://www.googleapis.com/auth/cloud-platform" 18439 // ] 18440 // } 18441 18442} 18443 18444// method id "dlp.projects.locations.dlpJobs.cancel": 18445 18446type ProjectsLocationsDlpJobsCancelCall struct { 18447 s *Service 18448 name string 18449 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 18450 urlParams_ gensupport.URLParams 18451 ctx_ context.Context 18452 header_ http.Header 18453} 18454 18455// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 18456// The server makes a best effort to cancel the DlpJob, but success is 18457// not guaranteed. See 18458// https://cloud.google.com/dlp/docs/inspecting-storage and 18459// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18460// more. 18461func (r *ProjectsLocationsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsLocationsDlpJobsCancelCall { 18462 c := &ProjectsLocationsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18463 c.name = name 18464 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 18465 return c 18466} 18467 18468// Fields allows partial responses to be retrieved. See 18469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18470// for more information. 18471func (c *ProjectsLocationsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCancelCall { 18472 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18473 return c 18474} 18475 18476// Context sets the context to be used in this call's Do method. Any 18477// pending HTTP request will be aborted if the provided context is 18478// canceled. 18479func (c *ProjectsLocationsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCancelCall { 18480 c.ctx_ = ctx 18481 return c 18482} 18483 18484// Header returns an http.Header that can be modified by the caller to 18485// add HTTP headers to the request. 18486func (c *ProjectsLocationsDlpJobsCancelCall) Header() http.Header { 18487 if c.header_ == nil { 18488 c.header_ = make(http.Header) 18489 } 18490 return c.header_ 18491} 18492 18493func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 18494 reqHeaders := make(http.Header) 18495 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18496 for k, v := range c.header_ { 18497 reqHeaders[k] = v 18498 } 18499 reqHeaders.Set("User-Agent", c.s.userAgent()) 18500 var body io.Reader = nil 18501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 18502 if err != nil { 18503 return nil, err 18504 } 18505 reqHeaders.Set("Content-Type", "application/json") 18506 c.urlParams_.Set("alt", alt) 18507 c.urlParams_.Set("prettyPrint", "false") 18508 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 18509 urls += "?" + c.urlParams_.Encode() 18510 req, err := http.NewRequest("POST", urls, body) 18511 if err != nil { 18512 return nil, err 18513 } 18514 req.Header = reqHeaders 18515 googleapi.Expand(req.URL, map[string]string{ 18516 "name": c.name, 18517 }) 18518 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18519} 18520 18521// Do executes the "dlp.projects.locations.dlpJobs.cancel" call. 18522// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18523// non-2xx status code is an error. Response headers are in either 18524// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18525// returned at all) in error.(*googleapi.Error).Header. Use 18526// googleapi.IsNotModified to check whether the returned error was 18527// because http.StatusNotModified was returned. 18528func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18529 gensupport.SetOptions(c.urlParams_, opts...) 18530 res, err := c.doRequest("json") 18531 if res != nil && res.StatusCode == http.StatusNotModified { 18532 if res.Body != nil { 18533 res.Body.Close() 18534 } 18535 return nil, &googleapi.Error{ 18536 Code: res.StatusCode, 18537 Header: res.Header, 18538 } 18539 } 18540 if err != nil { 18541 return nil, err 18542 } 18543 defer googleapi.CloseBody(res) 18544 if err := googleapi.CheckResponse(res); err != nil { 18545 return nil, err 18546 } 18547 ret := &GoogleProtobufEmpty{ 18548 ServerResponse: googleapi.ServerResponse{ 18549 Header: res.Header, 18550 HTTPStatusCode: res.StatusCode, 18551 }, 18552 } 18553 target := &ret 18554 if err := gensupport.DecodeResponse(target, res); err != nil { 18555 return nil, err 18556 } 18557 return ret, nil 18558 // { 18559 // "description": "Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 18560 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", 18561 // "httpMethod": "POST", 18562 // "id": "dlp.projects.locations.dlpJobs.cancel", 18563 // "parameterOrder": [ 18564 // "name" 18565 // ], 18566 // "parameters": { 18567 // "name": { 18568 // "description": "Required. The name of the DlpJob resource to be cancelled.", 18569 // "location": "path", 18570 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18571 // "required": true, 18572 // "type": "string" 18573 // } 18574 // }, 18575 // "path": "v2/{+name}:cancel", 18576 // "request": { 18577 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 18578 // }, 18579 // "response": { 18580 // "$ref": "GoogleProtobufEmpty" 18581 // }, 18582 // "scopes": [ 18583 // "https://www.googleapis.com/auth/cloud-platform" 18584 // ] 18585 // } 18586 18587} 18588 18589// method id "dlp.projects.locations.dlpJobs.create": 18590 18591type ProjectsLocationsDlpJobsCreateCall struct { 18592 s *Service 18593 parentid string 18594 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 18595 urlParams_ gensupport.URLParams 18596 ctx_ context.Context 18597 header_ http.Header 18598} 18599 18600// Create: Creates a new job to inspect storage or calculate risk 18601// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 18602// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18603// more. When no InfoTypes or CustomInfoTypes are specified in inspect 18604// jobs, the system will automatically choose what detectors to run. By 18605// default this may be all types, but may change over time as detectors 18606// are updated. 18607func (r *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { 18608 c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18609 c.parentid = parentid 18610 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 18611 return c 18612} 18613 18614// Fields allows partial responses to be retrieved. See 18615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18616// for more information. 18617func (c *ProjectsLocationsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCreateCall { 18618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18619 return c 18620} 18621 18622// Context sets the context to be used in this call's Do method. Any 18623// pending HTTP request will be aborted if the provided context is 18624// canceled. 18625func (c *ProjectsLocationsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCreateCall { 18626 c.ctx_ = ctx 18627 return c 18628} 18629 18630// Header returns an http.Header that can be modified by the caller to 18631// add HTTP headers to the request. 18632func (c *ProjectsLocationsDlpJobsCreateCall) Header() http.Header { 18633 if c.header_ == nil { 18634 c.header_ = make(http.Header) 18635 } 18636 return c.header_ 18637} 18638 18639func (c *ProjectsLocationsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 18640 reqHeaders := make(http.Header) 18641 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18642 for k, v := range c.header_ { 18643 reqHeaders[k] = v 18644 } 18645 reqHeaders.Set("User-Agent", c.s.userAgent()) 18646 var body io.Reader = nil 18647 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 18648 if err != nil { 18649 return nil, err 18650 } 18651 reqHeaders.Set("Content-Type", "application/json") 18652 c.urlParams_.Set("alt", alt) 18653 c.urlParams_.Set("prettyPrint", "false") 18654 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 18655 urls += "?" + c.urlParams_.Encode() 18656 req, err := http.NewRequest("POST", urls, body) 18657 if err != nil { 18658 return nil, err 18659 } 18660 req.Header = reqHeaders 18661 googleapi.Expand(req.URL, map[string]string{ 18662 "parent": c.parentid, 18663 }) 18664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18665} 18666 18667// Do executes the "dlp.projects.locations.dlpJobs.create" call. 18668// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 18669// Any non-2xx status code is an error. Response headers are in either 18670// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 18671// returned at all) in error.(*googleapi.Error).Header. Use 18672// googleapi.IsNotModified to check whether the returned error was 18673// because http.StatusNotModified was returned. 18674func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 18675 gensupport.SetOptions(c.urlParams_, opts...) 18676 res, err := c.doRequest("json") 18677 if res != nil && res.StatusCode == http.StatusNotModified { 18678 if res.Body != nil { 18679 res.Body.Close() 18680 } 18681 return nil, &googleapi.Error{ 18682 Code: res.StatusCode, 18683 Header: res.Header, 18684 } 18685 } 18686 if err != nil { 18687 return nil, err 18688 } 18689 defer googleapi.CloseBody(res) 18690 if err := googleapi.CheckResponse(res); err != nil { 18691 return nil, err 18692 } 18693 ret := &GooglePrivacyDlpV2DlpJob{ 18694 ServerResponse: googleapi.ServerResponse{ 18695 Header: res.Header, 18696 HTTPStatusCode: res.StatusCode, 18697 }, 18698 } 18699 target := &ret 18700 if err := gensupport.DecodeResponse(target, res); err != nil { 18701 return nil, err 18702 } 18703 return ret, nil 18704 // { 18705 // "description": "Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 18706 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 18707 // "httpMethod": "POST", 18708 // "id": "dlp.projects.locations.dlpJobs.create", 18709 // "parameterOrder": [ 18710 // "parent" 18711 // ], 18712 // "parameters": { 18713 // "parent": { 18714 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 18715 // "location": "path", 18716 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18717 // "required": true, 18718 // "type": "string" 18719 // } 18720 // }, 18721 // "path": "v2/{+parent}/dlpJobs", 18722 // "request": { 18723 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 18724 // }, 18725 // "response": { 18726 // "$ref": "GooglePrivacyDlpV2DlpJob" 18727 // }, 18728 // "scopes": [ 18729 // "https://www.googleapis.com/auth/cloud-platform" 18730 // ] 18731 // } 18732 18733} 18734 18735// method id "dlp.projects.locations.dlpJobs.delete": 18736 18737type ProjectsLocationsDlpJobsDeleteCall struct { 18738 s *Service 18739 name string 18740 urlParams_ gensupport.URLParams 18741 ctx_ context.Context 18742 header_ http.Header 18743} 18744 18745// Delete: Deletes a long-running DlpJob. This method indicates that the 18746// client is no longer interested in the DlpJob result. The job will be 18747// cancelled if possible. See 18748// https://cloud.google.com/dlp/docs/inspecting-storage and 18749// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18750// more. 18751func (r *ProjectsLocationsDlpJobsService) Delete(name string) *ProjectsLocationsDlpJobsDeleteCall { 18752 c := &ProjectsLocationsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18753 c.name = name 18754 return c 18755} 18756 18757// Fields allows partial responses to be retrieved. See 18758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18759// for more information. 18760func (c *ProjectsLocationsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsDeleteCall { 18761 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18762 return c 18763} 18764 18765// Context sets the context to be used in this call's Do method. Any 18766// pending HTTP request will be aborted if the provided context is 18767// canceled. 18768func (c *ProjectsLocationsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsDeleteCall { 18769 c.ctx_ = ctx 18770 return c 18771} 18772 18773// Header returns an http.Header that can be modified by the caller to 18774// add HTTP headers to the request. 18775func (c *ProjectsLocationsDlpJobsDeleteCall) Header() http.Header { 18776 if c.header_ == nil { 18777 c.header_ = make(http.Header) 18778 } 18779 return c.header_ 18780} 18781 18782func (c *ProjectsLocationsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 18783 reqHeaders := make(http.Header) 18784 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18785 for k, v := range c.header_ { 18786 reqHeaders[k] = v 18787 } 18788 reqHeaders.Set("User-Agent", c.s.userAgent()) 18789 var body io.Reader = nil 18790 c.urlParams_.Set("alt", alt) 18791 c.urlParams_.Set("prettyPrint", "false") 18792 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18793 urls += "?" + c.urlParams_.Encode() 18794 req, err := http.NewRequest("DELETE", urls, body) 18795 if err != nil { 18796 return nil, err 18797 } 18798 req.Header = reqHeaders 18799 googleapi.Expand(req.URL, map[string]string{ 18800 "name": c.name, 18801 }) 18802 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18803} 18804 18805// Do executes the "dlp.projects.locations.dlpJobs.delete" call. 18806// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18807// non-2xx status code is an error. Response headers are in either 18808// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18809// returned at all) in error.(*googleapi.Error).Header. Use 18810// googleapi.IsNotModified to check whether the returned error was 18811// because http.StatusNotModified was returned. 18812func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18813 gensupport.SetOptions(c.urlParams_, opts...) 18814 res, err := c.doRequest("json") 18815 if res != nil && res.StatusCode == http.StatusNotModified { 18816 if res.Body != nil { 18817 res.Body.Close() 18818 } 18819 return nil, &googleapi.Error{ 18820 Code: res.StatusCode, 18821 Header: res.Header, 18822 } 18823 } 18824 if err != nil { 18825 return nil, err 18826 } 18827 defer googleapi.CloseBody(res) 18828 if err := googleapi.CheckResponse(res); err != nil { 18829 return nil, err 18830 } 18831 ret := &GoogleProtobufEmpty{ 18832 ServerResponse: googleapi.ServerResponse{ 18833 Header: res.Header, 18834 HTTPStatusCode: res.StatusCode, 18835 }, 18836 } 18837 target := &ret 18838 if err := gensupport.DecodeResponse(target, res); err != nil { 18839 return nil, err 18840 } 18841 return ret, nil 18842 // { 18843 // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 18844 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 18845 // "httpMethod": "DELETE", 18846 // "id": "dlp.projects.locations.dlpJobs.delete", 18847 // "parameterOrder": [ 18848 // "name" 18849 // ], 18850 // "parameters": { 18851 // "name": { 18852 // "description": "Required. The name of the DlpJob resource to be deleted.", 18853 // "location": "path", 18854 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18855 // "required": true, 18856 // "type": "string" 18857 // } 18858 // }, 18859 // "path": "v2/{+name}", 18860 // "response": { 18861 // "$ref": "GoogleProtobufEmpty" 18862 // }, 18863 // "scopes": [ 18864 // "https://www.googleapis.com/auth/cloud-platform" 18865 // ] 18866 // } 18867 18868} 18869 18870// method id "dlp.projects.locations.dlpJobs.finish": 18871 18872type ProjectsLocationsDlpJobsFinishCall struct { 18873 s *Service 18874 name string 18875 googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest 18876 urlParams_ gensupport.URLParams 18877 ctx_ context.Context 18878 header_ http.Header 18879} 18880 18881// Finish: Finish a running hybrid DlpJob. Triggers the finalization 18882// steps and running of any enabled actions that have not yet run. Early 18883// access feature is in a pre-release state and might change or have 18884// limited support. For more information, see 18885// https://cloud.google.com/products#product-launch-stages. 18886func (r *ProjectsLocationsDlpJobsService) Finish(name string, googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest) *ProjectsLocationsDlpJobsFinishCall { 18887 c := &ProjectsLocationsDlpJobsFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18888 c.name = name 18889 c.googleprivacydlpv2finishdlpjobrequest = googleprivacydlpv2finishdlpjobrequest 18890 return c 18891} 18892 18893// Fields allows partial responses to be retrieved. See 18894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18895// for more information. 18896func (c *ProjectsLocationsDlpJobsFinishCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsFinishCall { 18897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18898 return c 18899} 18900 18901// Context sets the context to be used in this call's Do method. Any 18902// pending HTTP request will be aborted if the provided context is 18903// canceled. 18904func (c *ProjectsLocationsDlpJobsFinishCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsFinishCall { 18905 c.ctx_ = ctx 18906 return c 18907} 18908 18909// Header returns an http.Header that can be modified by the caller to 18910// add HTTP headers to the request. 18911func (c *ProjectsLocationsDlpJobsFinishCall) Header() http.Header { 18912 if c.header_ == nil { 18913 c.header_ = make(http.Header) 18914 } 18915 return c.header_ 18916} 18917 18918func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Response, error) { 18919 reqHeaders := make(http.Header) 18920 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 18921 for k, v := range c.header_ { 18922 reqHeaders[k] = v 18923 } 18924 reqHeaders.Set("User-Agent", c.s.userAgent()) 18925 var body io.Reader = nil 18926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2finishdlpjobrequest) 18927 if err != nil { 18928 return nil, err 18929 } 18930 reqHeaders.Set("Content-Type", "application/json") 18931 c.urlParams_.Set("alt", alt) 18932 c.urlParams_.Set("prettyPrint", "false") 18933 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:finish") 18934 urls += "?" + c.urlParams_.Encode() 18935 req, err := http.NewRequest("POST", urls, body) 18936 if err != nil { 18937 return nil, err 18938 } 18939 req.Header = reqHeaders 18940 googleapi.Expand(req.URL, map[string]string{ 18941 "name": c.name, 18942 }) 18943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18944} 18945 18946// Do executes the "dlp.projects.locations.dlpJobs.finish" call. 18947// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18948// non-2xx status code is an error. Response headers are in either 18949// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18950// returned at all) in error.(*googleapi.Error).Header. Use 18951// googleapi.IsNotModified to check whether the returned error was 18952// because http.StatusNotModified was returned. 18953func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18954 gensupport.SetOptions(c.urlParams_, opts...) 18955 res, err := c.doRequest("json") 18956 if res != nil && res.StatusCode == http.StatusNotModified { 18957 if res.Body != nil { 18958 res.Body.Close() 18959 } 18960 return nil, &googleapi.Error{ 18961 Code: res.StatusCode, 18962 Header: res.Header, 18963 } 18964 } 18965 if err != nil { 18966 return nil, err 18967 } 18968 defer googleapi.CloseBody(res) 18969 if err := googleapi.CheckResponse(res); err != nil { 18970 return nil, err 18971 } 18972 ret := &GoogleProtobufEmpty{ 18973 ServerResponse: googleapi.ServerResponse{ 18974 Header: res.Header, 18975 HTTPStatusCode: res.StatusCode, 18976 }, 18977 } 18978 target := &ret 18979 if err := gensupport.DecodeResponse(target, res); err != nil { 18980 return nil, err 18981 } 18982 return ret, nil 18983 // { 18984 // "description": "Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 18985 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:finish", 18986 // "httpMethod": "POST", 18987 // "id": "dlp.projects.locations.dlpJobs.finish", 18988 // "parameterOrder": [ 18989 // "name" 18990 // ], 18991 // "parameters": { 18992 // "name": { 18993 // "description": "Required. The name of the DlpJob resource to be cancelled.", 18994 // "location": "path", 18995 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18996 // "required": true, 18997 // "type": "string" 18998 // } 18999 // }, 19000 // "path": "v2/{+name}:finish", 19001 // "request": { 19002 // "$ref": "GooglePrivacyDlpV2FinishDlpJobRequest" 19003 // }, 19004 // "response": { 19005 // "$ref": "GoogleProtobufEmpty" 19006 // }, 19007 // "scopes": [ 19008 // "https://www.googleapis.com/auth/cloud-platform" 19009 // ] 19010 // } 19011 19012} 19013 19014// method id "dlp.projects.locations.dlpJobs.get": 19015 19016type ProjectsLocationsDlpJobsGetCall struct { 19017 s *Service 19018 name string 19019 urlParams_ gensupport.URLParams 19020 ifNoneMatch_ string 19021 ctx_ context.Context 19022 header_ http.Header 19023} 19024 19025// Get: Gets the latest state of a long-running DlpJob. See 19026// https://cloud.google.com/dlp/docs/inspecting-storage and 19027// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 19028// more. 19029func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlpJobsGetCall { 19030 c := &ProjectsLocationsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19031 c.name = name 19032 return c 19033} 19034 19035// Fields allows partial responses to be retrieved. See 19036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19037// for more information. 19038func (c *ProjectsLocationsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsGetCall { 19039 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19040 return c 19041} 19042 19043// IfNoneMatch sets the optional parameter which makes the operation 19044// fail if the object's ETag matches the given value. This is useful for 19045// getting updates only after the object has changed since the last 19046// request. Use googleapi.IsNotModified to check whether the response 19047// error from Do is the result of In-None-Match. 19048func (c *ProjectsLocationsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsGetCall { 19049 c.ifNoneMatch_ = entityTag 19050 return c 19051} 19052 19053// Context sets the context to be used in this call's Do method. Any 19054// pending HTTP request will be aborted if the provided context is 19055// canceled. 19056func (c *ProjectsLocationsDlpJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsGetCall { 19057 c.ctx_ = ctx 19058 return c 19059} 19060 19061// Header returns an http.Header that can be modified by the caller to 19062// add HTTP headers to the request. 19063func (c *ProjectsLocationsDlpJobsGetCall) Header() http.Header { 19064 if c.header_ == nil { 19065 c.header_ = make(http.Header) 19066 } 19067 return c.header_ 19068} 19069 19070func (c *ProjectsLocationsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 19071 reqHeaders := make(http.Header) 19072 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19073 for k, v := range c.header_ { 19074 reqHeaders[k] = v 19075 } 19076 reqHeaders.Set("User-Agent", c.s.userAgent()) 19077 if c.ifNoneMatch_ != "" { 19078 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19079 } 19080 var body io.Reader = nil 19081 c.urlParams_.Set("alt", alt) 19082 c.urlParams_.Set("prettyPrint", "false") 19083 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19084 urls += "?" + c.urlParams_.Encode() 19085 req, err := http.NewRequest("GET", urls, body) 19086 if err != nil { 19087 return nil, err 19088 } 19089 req.Header = reqHeaders 19090 googleapi.Expand(req.URL, map[string]string{ 19091 "name": c.name, 19092 }) 19093 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19094} 19095 19096// Do executes the "dlp.projects.locations.dlpJobs.get" call. 19097// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 19098// Any non-2xx status code is an error. Response headers are in either 19099// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 19100// returned at all) in error.(*googleapi.Error).Header. Use 19101// googleapi.IsNotModified to check whether the returned error was 19102// because http.StatusNotModified was returned. 19103func (c *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 19104 gensupport.SetOptions(c.urlParams_, opts...) 19105 res, err := c.doRequest("json") 19106 if res != nil && res.StatusCode == http.StatusNotModified { 19107 if res.Body != nil { 19108 res.Body.Close() 19109 } 19110 return nil, &googleapi.Error{ 19111 Code: res.StatusCode, 19112 Header: res.Header, 19113 } 19114 } 19115 if err != nil { 19116 return nil, err 19117 } 19118 defer googleapi.CloseBody(res) 19119 if err := googleapi.CheckResponse(res); err != nil { 19120 return nil, err 19121 } 19122 ret := &GooglePrivacyDlpV2DlpJob{ 19123 ServerResponse: googleapi.ServerResponse{ 19124 Header: res.Header, 19125 HTTPStatusCode: res.StatusCode, 19126 }, 19127 } 19128 target := &ret 19129 if err := gensupport.DecodeResponse(target, res); err != nil { 19130 return nil, err 19131 } 19132 return ret, nil 19133 // { 19134 // "description": "Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 19135 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 19136 // "httpMethod": "GET", 19137 // "id": "dlp.projects.locations.dlpJobs.get", 19138 // "parameterOrder": [ 19139 // "name" 19140 // ], 19141 // "parameters": { 19142 // "name": { 19143 // "description": "Required. The name of the DlpJob resource.", 19144 // "location": "path", 19145 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 19146 // "required": true, 19147 // "type": "string" 19148 // } 19149 // }, 19150 // "path": "v2/{+name}", 19151 // "response": { 19152 // "$ref": "GooglePrivacyDlpV2DlpJob" 19153 // }, 19154 // "scopes": [ 19155 // "https://www.googleapis.com/auth/cloud-platform" 19156 // ] 19157 // } 19158 19159} 19160 19161// method id "dlp.projects.locations.dlpJobs.hybridInspect": 19162 19163type ProjectsLocationsDlpJobsHybridInspectCall struct { 19164 s *Service 19165 name string 19166 googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest 19167 urlParams_ gensupport.URLParams 19168 ctx_ context.Context 19169 header_ http.Header 19170} 19171 19172// HybridInspect: Inspect hybrid content and store findings to a job. To 19173// review the findings inspect the job. Inspection will occur 19174// asynchronously. Early access feature is in a pre-release state and 19175// might change or have limited support. For more information, see 19176// https://cloud.google.com/products#product-launch-stages. 19177func (r *ProjectsLocationsDlpJobsService) HybridInspect(name string, googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest) *ProjectsLocationsDlpJobsHybridInspectCall { 19178 c := &ProjectsLocationsDlpJobsHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19179 c.name = name 19180 c.googleprivacydlpv2hybridinspectdlpjobrequest = googleprivacydlpv2hybridinspectdlpjobrequest 19181 return c 19182} 19183 19184// Fields allows partial responses to be retrieved. See 19185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19186// for more information. 19187func (c *ProjectsLocationsDlpJobsHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsHybridInspectCall { 19188 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19189 return c 19190} 19191 19192// Context sets the context to be used in this call's Do method. Any 19193// pending HTTP request will be aborted if the provided context is 19194// canceled. 19195func (c *ProjectsLocationsDlpJobsHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsHybridInspectCall { 19196 c.ctx_ = ctx 19197 return c 19198} 19199 19200// Header returns an http.Header that can be modified by the caller to 19201// add HTTP headers to the request. 19202func (c *ProjectsLocationsDlpJobsHybridInspectCall) Header() http.Header { 19203 if c.header_ == nil { 19204 c.header_ = make(http.Header) 19205 } 19206 return c.header_ 19207} 19208 19209func (c *ProjectsLocationsDlpJobsHybridInspectCall) doRequest(alt string) (*http.Response, error) { 19210 reqHeaders := make(http.Header) 19211 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19212 for k, v := range c.header_ { 19213 reqHeaders[k] = v 19214 } 19215 reqHeaders.Set("User-Agent", c.s.userAgent()) 19216 var body io.Reader = nil 19217 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectdlpjobrequest) 19218 if err != nil { 19219 return nil, err 19220 } 19221 reqHeaders.Set("Content-Type", "application/json") 19222 c.urlParams_.Set("alt", alt) 19223 c.urlParams_.Set("prettyPrint", "false") 19224 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 19225 urls += "?" + c.urlParams_.Encode() 19226 req, err := http.NewRequest("POST", urls, body) 19227 if err != nil { 19228 return nil, err 19229 } 19230 req.Header = reqHeaders 19231 googleapi.Expand(req.URL, map[string]string{ 19232 "name": c.name, 19233 }) 19234 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19235} 19236 19237// Do executes the "dlp.projects.locations.dlpJobs.hybridInspect" call. 19238// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 19239// be non-nil. Any non-2xx status code is an error. Response headers are 19240// in either 19241// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 19242// a response was returned at all) in error.(*googleapi.Error).Header. 19243// Use googleapi.IsNotModified to check whether the returned error was 19244// because http.StatusNotModified was returned. 19245func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 19246 gensupport.SetOptions(c.urlParams_, opts...) 19247 res, err := c.doRequest("json") 19248 if res != nil && res.StatusCode == http.StatusNotModified { 19249 if res.Body != nil { 19250 res.Body.Close() 19251 } 19252 return nil, &googleapi.Error{ 19253 Code: res.StatusCode, 19254 Header: res.Header, 19255 } 19256 } 19257 if err != nil { 19258 return nil, err 19259 } 19260 defer googleapi.CloseBody(res) 19261 if err := googleapi.CheckResponse(res); err != nil { 19262 return nil, err 19263 } 19264 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 19265 ServerResponse: googleapi.ServerResponse{ 19266 Header: res.Header, 19267 HTTPStatusCode: res.StatusCode, 19268 }, 19269 } 19270 target := &ret 19271 if err := gensupport.DecodeResponse(target, res); err != nil { 19272 return nil, err 19273 } 19274 return ret, nil 19275 // { 19276 // "description": "Inspect hybrid content and store findings to a job. To review the findings inspect the job. Inspection will occur asynchronously. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 19277 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:hybridInspect", 19278 // "httpMethod": "POST", 19279 // "id": "dlp.projects.locations.dlpJobs.hybridInspect", 19280 // "parameterOrder": [ 19281 // "name" 19282 // ], 19283 // "parameters": { 19284 // "name": { 19285 // "description": "Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.", 19286 // "location": "path", 19287 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 19288 // "required": true, 19289 // "type": "string" 19290 // } 19291 // }, 19292 // "path": "v2/{+name}:hybridInspect", 19293 // "request": { 19294 // "$ref": "GooglePrivacyDlpV2HybridInspectDlpJobRequest" 19295 // }, 19296 // "response": { 19297 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 19298 // }, 19299 // "scopes": [ 19300 // "https://www.googleapis.com/auth/cloud-platform" 19301 // ] 19302 // } 19303 19304} 19305 19306// method id "dlp.projects.locations.dlpJobs.list": 19307 19308type ProjectsLocationsDlpJobsListCall struct { 19309 s *Service 19310 parentid string 19311 urlParams_ gensupport.URLParams 19312 ifNoneMatch_ string 19313 ctx_ context.Context 19314 header_ http.Header 19315} 19316 19317// List: Lists DlpJobs that match the specified filter in the request. 19318// See https://cloud.google.com/dlp/docs/inspecting-storage and 19319// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 19320// more. 19321func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { 19322 c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19323 c.parentid = parentid 19324 return c 19325} 19326 19327// Filter sets the optional parameter "filter": Allows filtering. 19328// Supported syntax: * Filter expressions are made up of one or more 19329// restrictions. * Restrictions can be combined by `AND` or `OR` logical 19330// operators. A sequence of restrictions implicitly uses `AND`. * A 19331// restriction has the form of `{field} {operator} {value}`. * Supported 19332// fields/values for inspect jobs: - `state` - 19333// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 19334// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 19335// of the trigger that created job. - 'end_time` - Corresponds to time 19336// the job finished. - 'start_time` - Corresponds to time the job 19337// finished. * Supported fields for risk analysis jobs: - `state` - 19338// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 19339// the job finished. - 'start_time` - Corresponds to time the job 19340// finished. * The operator must be `=` or `!=`. Examples: * 19341// inspected_storage = cloud_storage AND state = done * 19342// inspected_storage = cloud_storage OR inspected_storage = bigquery * 19343// inspected_storage = cloud_storage AND (state = done OR state = 19344// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 19345// this field should be no more than 500 characters. 19346func (c *ProjectsLocationsDlpJobsListCall) Filter(filter string) *ProjectsLocationsDlpJobsListCall { 19347 c.urlParams_.Set("filter", filter) 19348 return c 19349} 19350 19351// LocationId sets the optional parameter "locationId": Deprecated. This 19352// field has no effect. 19353func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *ProjectsLocationsDlpJobsListCall { 19354 c.urlParams_.Set("locationId", locationId) 19355 return c 19356} 19357 19358// OrderBy sets the optional parameter "orderBy": Comma separated list 19359// of fields to order by, followed by `asc` or `desc` postfix. This list 19360// is case-insensitive, default sorting order is ascending, redundant 19361// space characters are insignificant. Example: `name asc, end_time asc, 19362// create_time desc` Supported fields are: - `create_time`: corresponds 19363// to time the job was created. - `end_time`: corresponds to time the 19364// job ended. - `name`: corresponds to job's name. - `state`: 19365// corresponds to `state` 19366func (c *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { 19367 c.urlParams_.Set("orderBy", orderBy) 19368 return c 19369} 19370 19371// PageSize sets the optional parameter "pageSize": The standard list 19372// page size. 19373func (c *ProjectsLocationsDlpJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDlpJobsListCall { 19374 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19375 return c 19376} 19377 19378// PageToken sets the optional parameter "pageToken": The standard list 19379// page token. 19380func (c *ProjectsLocationsDlpJobsListCall) PageToken(pageToken string) *ProjectsLocationsDlpJobsListCall { 19381 c.urlParams_.Set("pageToken", pageToken) 19382 return c 19383} 19384 19385// Type sets the optional parameter "type": The type of job. Defaults to 19386// `DlpJobType.INSPECT` 19387// 19388// Possible values: 19389// "DLP_JOB_TYPE_UNSPECIFIED" - Unused 19390// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 19391// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 19392func (c *ProjectsLocationsDlpJobsListCall) Type(type_ string) *ProjectsLocationsDlpJobsListCall { 19393 c.urlParams_.Set("type", type_) 19394 return c 19395} 19396 19397// Fields allows partial responses to be retrieved. See 19398// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19399// for more information. 19400func (c *ProjectsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsListCall { 19401 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19402 return c 19403} 19404 19405// IfNoneMatch sets the optional parameter which makes the operation 19406// fail if the object's ETag matches the given value. This is useful for 19407// getting updates only after the object has changed since the last 19408// request. Use googleapi.IsNotModified to check whether the response 19409// error from Do is the result of In-None-Match. 19410func (c *ProjectsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsListCall { 19411 c.ifNoneMatch_ = entityTag 19412 return c 19413} 19414 19415// Context sets the context to be used in this call's Do method. Any 19416// pending HTTP request will be aborted if the provided context is 19417// canceled. 19418func (c *ProjectsLocationsDlpJobsListCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsListCall { 19419 c.ctx_ = ctx 19420 return c 19421} 19422 19423// Header returns an http.Header that can be modified by the caller to 19424// add HTTP headers to the request. 19425func (c *ProjectsLocationsDlpJobsListCall) Header() http.Header { 19426 if c.header_ == nil { 19427 c.header_ = make(http.Header) 19428 } 19429 return c.header_ 19430} 19431 19432func (c *ProjectsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 19433 reqHeaders := make(http.Header) 19434 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19435 for k, v := range c.header_ { 19436 reqHeaders[k] = v 19437 } 19438 reqHeaders.Set("User-Agent", c.s.userAgent()) 19439 if c.ifNoneMatch_ != "" { 19440 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19441 } 19442 var body io.Reader = nil 19443 c.urlParams_.Set("alt", alt) 19444 c.urlParams_.Set("prettyPrint", "false") 19445 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 19446 urls += "?" + c.urlParams_.Encode() 19447 req, err := http.NewRequest("GET", urls, body) 19448 if err != nil { 19449 return nil, err 19450 } 19451 req.Header = reqHeaders 19452 googleapi.Expand(req.URL, map[string]string{ 19453 "parent": c.parentid, 19454 }) 19455 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19456} 19457 19458// Do executes the "dlp.projects.locations.dlpJobs.list" call. 19459// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 19460// be non-nil. Any non-2xx status code is an error. Response headers are 19461// in either 19462// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 19463// response was returned at all) in error.(*googleapi.Error).Header. Use 19464// googleapi.IsNotModified to check whether the returned error was 19465// because http.StatusNotModified was returned. 19466func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 19467 gensupport.SetOptions(c.urlParams_, opts...) 19468 res, err := c.doRequest("json") 19469 if res != nil && res.StatusCode == http.StatusNotModified { 19470 if res.Body != nil { 19471 res.Body.Close() 19472 } 19473 return nil, &googleapi.Error{ 19474 Code: res.StatusCode, 19475 Header: res.Header, 19476 } 19477 } 19478 if err != nil { 19479 return nil, err 19480 } 19481 defer googleapi.CloseBody(res) 19482 if err := googleapi.CheckResponse(res); err != nil { 19483 return nil, err 19484 } 19485 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 19486 ServerResponse: googleapi.ServerResponse{ 19487 Header: res.Header, 19488 HTTPStatusCode: res.StatusCode, 19489 }, 19490 } 19491 target := &ret 19492 if err := gensupport.DecodeResponse(target, res); err != nil { 19493 return nil, err 19494 } 19495 return ret, nil 19496 // { 19497 // "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", 19498 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 19499 // "httpMethod": "GET", 19500 // "id": "dlp.projects.locations.dlpJobs.list", 19501 // "parameterOrder": [ 19502 // "parent" 19503 // ], 19504 // "parameters": { 19505 // "filter": { 19506 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time the job finished. - 'start_time` - Corresponds to time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 19507 // "location": "query", 19508 // "type": "string" 19509 // }, 19510 // "locationId": { 19511 // "description": "Deprecated. This field has no effect.", 19512 // "location": "query", 19513 // "type": "string" 19514 // }, 19515 // "orderBy": { 19516 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state`", 19517 // "location": "query", 19518 // "type": "string" 19519 // }, 19520 // "pageSize": { 19521 // "description": "The standard list page size.", 19522 // "format": "int32", 19523 // "location": "query", 19524 // "type": "integer" 19525 // }, 19526 // "pageToken": { 19527 // "description": "The standard list page token.", 19528 // "location": "query", 19529 // "type": "string" 19530 // }, 19531 // "parent": { 19532 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 19533 // "location": "path", 19534 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19535 // "required": true, 19536 // "type": "string" 19537 // }, 19538 // "type": { 19539 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 19540 // "enum": [ 19541 // "DLP_JOB_TYPE_UNSPECIFIED", 19542 // "INSPECT_JOB", 19543 // "RISK_ANALYSIS_JOB" 19544 // ], 19545 // "enumDescriptions": [ 19546 // "Unused", 19547 // "The job inspected Google Cloud for sensitive data.", 19548 // "The job executed a Risk Analysis computation." 19549 // ], 19550 // "location": "query", 19551 // "type": "string" 19552 // } 19553 // }, 19554 // "path": "v2/{+parent}/dlpJobs", 19555 // "response": { 19556 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 19557 // }, 19558 // "scopes": [ 19559 // "https://www.googleapis.com/auth/cloud-platform" 19560 // ] 19561 // } 19562 19563} 19564 19565// Pages invokes f for each page of results. 19566// A non-nil error returned from f will halt the iteration. 19567// The provided context supersedes any context provided to the Context method. 19568func (c *ProjectsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 19569 c.ctx_ = ctx 19570 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19571 for { 19572 x, err := c.Do() 19573 if err != nil { 19574 return err 19575 } 19576 if err := f(x); err != nil { 19577 return err 19578 } 19579 if x.NextPageToken == "" { 19580 return nil 19581 } 19582 c.PageToken(x.NextPageToken) 19583 } 19584} 19585 19586// method id "dlp.projects.locations.image.redact": 19587 19588type ProjectsLocationsImageRedactCall struct { 19589 s *Service 19590 parentid string 19591 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 19592 urlParams_ gensupport.URLParams 19593 ctx_ context.Context 19594 header_ http.Header 19595} 19596 19597// Redact: Redacts potentially sensitive info from an image. This method 19598// has limits on input size, processing time, and output size. See 19599// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 19600// learn more. When no InfoTypes or CustomInfoTypes are specified in 19601// this request, the system will automatically choose what detectors to 19602// run. By default this may be all types, but may change over time as 19603// detectors are updated. 19604func (r *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { 19605 c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19606 c.parentid = parentid 19607 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 19608 return c 19609} 19610 19611// Fields allows partial responses to be retrieved. See 19612// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19613// for more information. 19614func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { 19615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19616 return c 19617} 19618 19619// Context sets the context to be used in this call's Do method. Any 19620// pending HTTP request will be aborted if the provided context is 19621// canceled. 19622func (c *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { 19623 c.ctx_ = ctx 19624 return c 19625} 19626 19627// Header returns an http.Header that can be modified by the caller to 19628// add HTTP headers to the request. 19629func (c *ProjectsLocationsImageRedactCall) Header() http.Header { 19630 if c.header_ == nil { 19631 c.header_ = make(http.Header) 19632 } 19633 return c.header_ 19634} 19635 19636func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response, error) { 19637 reqHeaders := make(http.Header) 19638 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19639 for k, v := range c.header_ { 19640 reqHeaders[k] = v 19641 } 19642 reqHeaders.Set("User-Agent", c.s.userAgent()) 19643 var body io.Reader = nil 19644 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 19645 if err != nil { 19646 return nil, err 19647 } 19648 reqHeaders.Set("Content-Type", "application/json") 19649 c.urlParams_.Set("alt", alt) 19650 c.urlParams_.Set("prettyPrint", "false") 19651 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 19652 urls += "?" + c.urlParams_.Encode() 19653 req, err := http.NewRequest("POST", urls, body) 19654 if err != nil { 19655 return nil, err 19656 } 19657 req.Header = reqHeaders 19658 googleapi.Expand(req.URL, map[string]string{ 19659 "parent": c.parentid, 19660 }) 19661 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19662} 19663 19664// Do executes the "dlp.projects.locations.image.redact" call. 19665// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 19666// be non-nil. Any non-2xx status code is an error. Response headers are 19667// in either 19668// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 19669// response was returned at all) in error.(*googleapi.Error).Header. Use 19670// googleapi.IsNotModified to check whether the returned error was 19671// because http.StatusNotModified was returned. 19672func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 19673 gensupport.SetOptions(c.urlParams_, opts...) 19674 res, err := c.doRequest("json") 19675 if res != nil && res.StatusCode == http.StatusNotModified { 19676 if res.Body != nil { 19677 res.Body.Close() 19678 } 19679 return nil, &googleapi.Error{ 19680 Code: res.StatusCode, 19681 Header: res.Header, 19682 } 19683 } 19684 if err != nil { 19685 return nil, err 19686 } 19687 defer googleapi.CloseBody(res) 19688 if err := googleapi.CheckResponse(res); err != nil { 19689 return nil, err 19690 } 19691 ret := &GooglePrivacyDlpV2RedactImageResponse{ 19692 ServerResponse: googleapi.ServerResponse{ 19693 Header: res.Header, 19694 HTTPStatusCode: res.StatusCode, 19695 }, 19696 } 19697 target := &ret 19698 if err := gensupport.DecodeResponse(target, res); err != nil { 19699 return nil, err 19700 } 19701 return ret, nil 19702 // { 19703 // "description": "Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", 19704 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/image:redact", 19705 // "httpMethod": "POST", 19706 // "id": "dlp.projects.locations.image.redact", 19707 // "parameterOrder": [ 19708 // "parent" 19709 // ], 19710 // "parameters": { 19711 // "parent": { 19712 // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 19713 // "location": "path", 19714 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19715 // "required": true, 19716 // "type": "string" 19717 // } 19718 // }, 19719 // "path": "v2/{+parent}/image:redact", 19720 // "request": { 19721 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 19722 // }, 19723 // "response": { 19724 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 19725 // }, 19726 // "scopes": [ 19727 // "https://www.googleapis.com/auth/cloud-platform" 19728 // ] 19729 // } 19730 19731} 19732 19733// method id "dlp.projects.locations.inspectTemplates.create": 19734 19735type ProjectsLocationsInspectTemplatesCreateCall struct { 19736 s *Service 19737 parentid string 19738 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 19739 urlParams_ gensupport.URLParams 19740 ctx_ context.Context 19741 header_ http.Header 19742} 19743 19744// Create: Creates an InspectTemplate for re-using frequently used 19745// configuration for inspecting content, images, and storage. See 19746// https://cloud.google.com/dlp/docs/creating-templates to learn more. 19747func (r *ProjectsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesCreateCall { 19748 c := &ProjectsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19749 c.parentid = parentid 19750 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 19751 return c 19752} 19753 19754// Fields allows partial responses to be retrieved. See 19755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19756// for more information. 19757func (c *ProjectsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesCreateCall { 19758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19759 return c 19760} 19761 19762// Context sets the context to be used in this call's Do method. Any 19763// pending HTTP request will be aborted if the provided context is 19764// canceled. 19765func (c *ProjectsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesCreateCall { 19766 c.ctx_ = ctx 19767 return c 19768} 19769 19770// Header returns an http.Header that can be modified by the caller to 19771// add HTTP headers to the request. 19772func (c *ProjectsLocationsInspectTemplatesCreateCall) Header() http.Header { 19773 if c.header_ == nil { 19774 c.header_ = make(http.Header) 19775 } 19776 return c.header_ 19777} 19778 19779func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 19780 reqHeaders := make(http.Header) 19781 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19782 for k, v := range c.header_ { 19783 reqHeaders[k] = v 19784 } 19785 reqHeaders.Set("User-Agent", c.s.userAgent()) 19786 var body io.Reader = nil 19787 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 19788 if err != nil { 19789 return nil, err 19790 } 19791 reqHeaders.Set("Content-Type", "application/json") 19792 c.urlParams_.Set("alt", alt) 19793 c.urlParams_.Set("prettyPrint", "false") 19794 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 19795 urls += "?" + c.urlParams_.Encode() 19796 req, err := http.NewRequest("POST", urls, body) 19797 if err != nil { 19798 return nil, err 19799 } 19800 req.Header = reqHeaders 19801 googleapi.Expand(req.URL, map[string]string{ 19802 "parent": c.parentid, 19803 }) 19804 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19805} 19806 19807// Do executes the "dlp.projects.locations.inspectTemplates.create" call. 19808// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 19809// non-nil. Any non-2xx status code is an error. Response headers are in 19810// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 19811// (if a response was returned at all) in 19812// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19813// whether the returned error was because http.StatusNotModified was 19814// returned. 19815func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 19816 gensupport.SetOptions(c.urlParams_, opts...) 19817 res, err := c.doRequest("json") 19818 if res != nil && res.StatusCode == http.StatusNotModified { 19819 if res.Body != nil { 19820 res.Body.Close() 19821 } 19822 return nil, &googleapi.Error{ 19823 Code: res.StatusCode, 19824 Header: res.Header, 19825 } 19826 } 19827 if err != nil { 19828 return nil, err 19829 } 19830 defer googleapi.CloseBody(res) 19831 if err := googleapi.CheckResponse(res); err != nil { 19832 return nil, err 19833 } 19834 ret := &GooglePrivacyDlpV2InspectTemplate{ 19835 ServerResponse: googleapi.ServerResponse{ 19836 Header: res.Header, 19837 HTTPStatusCode: res.StatusCode, 19838 }, 19839 } 19840 target := &ret 19841 if err := gensupport.DecodeResponse(target, res); err != nil { 19842 return nil, err 19843 } 19844 return ret, nil 19845 // { 19846 // "description": "Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 19847 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 19848 // "httpMethod": "POST", 19849 // "id": "dlp.projects.locations.inspectTemplates.create", 19850 // "parameterOrder": [ 19851 // "parent" 19852 // ], 19853 // "parameters": { 19854 // "parent": { 19855 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 19856 // "location": "path", 19857 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19858 // "required": true, 19859 // "type": "string" 19860 // } 19861 // }, 19862 // "path": "v2/{+parent}/inspectTemplates", 19863 // "request": { 19864 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 19865 // }, 19866 // "response": { 19867 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 19868 // }, 19869 // "scopes": [ 19870 // "https://www.googleapis.com/auth/cloud-platform" 19871 // ] 19872 // } 19873 19874} 19875 19876// method id "dlp.projects.locations.inspectTemplates.delete": 19877 19878type ProjectsLocationsInspectTemplatesDeleteCall struct { 19879 s *Service 19880 name string 19881 urlParams_ gensupport.URLParams 19882 ctx_ context.Context 19883 header_ http.Header 19884} 19885 19886// Delete: Deletes an InspectTemplate. See 19887// https://cloud.google.com/dlp/docs/creating-templates to learn more. 19888func (r *ProjectsLocationsInspectTemplatesService) Delete(name string) *ProjectsLocationsInspectTemplatesDeleteCall { 19889 c := &ProjectsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19890 c.name = name 19891 return c 19892} 19893 19894// Fields allows partial responses to be retrieved. See 19895// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19896// for more information. 19897func (c *ProjectsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesDeleteCall { 19898 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19899 return c 19900} 19901 19902// Context sets the context to be used in this call's Do method. Any 19903// pending HTTP request will be aborted if the provided context is 19904// canceled. 19905func (c *ProjectsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesDeleteCall { 19906 c.ctx_ = ctx 19907 return c 19908} 19909 19910// Header returns an http.Header that can be modified by the caller to 19911// add HTTP headers to the request. 19912func (c *ProjectsLocationsInspectTemplatesDeleteCall) Header() http.Header { 19913 if c.header_ == nil { 19914 c.header_ = make(http.Header) 19915 } 19916 return c.header_ 19917} 19918 19919func (c *ProjectsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 19920 reqHeaders := make(http.Header) 19921 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 19922 for k, v := range c.header_ { 19923 reqHeaders[k] = v 19924 } 19925 reqHeaders.Set("User-Agent", c.s.userAgent()) 19926 var body io.Reader = nil 19927 c.urlParams_.Set("alt", alt) 19928 c.urlParams_.Set("prettyPrint", "false") 19929 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19930 urls += "?" + c.urlParams_.Encode() 19931 req, err := http.NewRequest("DELETE", urls, body) 19932 if err != nil { 19933 return nil, err 19934 } 19935 req.Header = reqHeaders 19936 googleapi.Expand(req.URL, map[string]string{ 19937 "name": c.name, 19938 }) 19939 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19940} 19941 19942// Do executes the "dlp.projects.locations.inspectTemplates.delete" call. 19943// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 19944// non-2xx status code is an error. Response headers are in either 19945// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 19946// returned at all) in error.(*googleapi.Error).Header. Use 19947// googleapi.IsNotModified to check whether the returned error was 19948// because http.StatusNotModified was returned. 19949func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 19950 gensupport.SetOptions(c.urlParams_, opts...) 19951 res, err := c.doRequest("json") 19952 if res != nil && res.StatusCode == http.StatusNotModified { 19953 if res.Body != nil { 19954 res.Body.Close() 19955 } 19956 return nil, &googleapi.Error{ 19957 Code: res.StatusCode, 19958 Header: res.Header, 19959 } 19960 } 19961 if err != nil { 19962 return nil, err 19963 } 19964 defer googleapi.CloseBody(res) 19965 if err := googleapi.CheckResponse(res); err != nil { 19966 return nil, err 19967 } 19968 ret := &GoogleProtobufEmpty{ 19969 ServerResponse: googleapi.ServerResponse{ 19970 Header: res.Header, 19971 HTTPStatusCode: res.StatusCode, 19972 }, 19973 } 19974 target := &ret 19975 if err := gensupport.DecodeResponse(target, res); err != nil { 19976 return nil, err 19977 } 19978 return ret, nil 19979 // { 19980 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 19981 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 19982 // "httpMethod": "DELETE", 19983 // "id": "dlp.projects.locations.inspectTemplates.delete", 19984 // "parameterOrder": [ 19985 // "name" 19986 // ], 19987 // "parameters": { 19988 // "name": { 19989 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 19990 // "location": "path", 19991 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 19992 // "required": true, 19993 // "type": "string" 19994 // } 19995 // }, 19996 // "path": "v2/{+name}", 19997 // "response": { 19998 // "$ref": "GoogleProtobufEmpty" 19999 // }, 20000 // "scopes": [ 20001 // "https://www.googleapis.com/auth/cloud-platform" 20002 // ] 20003 // } 20004 20005} 20006 20007// method id "dlp.projects.locations.inspectTemplates.get": 20008 20009type ProjectsLocationsInspectTemplatesGetCall struct { 20010 s *Service 20011 name string 20012 urlParams_ gensupport.URLParams 20013 ifNoneMatch_ string 20014 ctx_ context.Context 20015 header_ http.Header 20016} 20017 20018// Get: Gets an InspectTemplate. See 20019// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20020func (r *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLocationsInspectTemplatesGetCall { 20021 c := &ProjectsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20022 c.name = name 20023 return c 20024} 20025 20026// Fields allows partial responses to be retrieved. See 20027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20028// for more information. 20029func (c *ProjectsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesGetCall { 20030 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20031 return c 20032} 20033 20034// IfNoneMatch sets the optional parameter which makes the operation 20035// fail if the object's ETag matches the given value. This is useful for 20036// getting updates only after the object has changed since the last 20037// request. Use googleapi.IsNotModified to check whether the response 20038// error from Do is the result of In-None-Match. 20039func (c *ProjectsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesGetCall { 20040 c.ifNoneMatch_ = entityTag 20041 return c 20042} 20043 20044// Context sets the context to be used in this call's Do method. Any 20045// pending HTTP request will be aborted if the provided context is 20046// canceled. 20047func (c *ProjectsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesGetCall { 20048 c.ctx_ = ctx 20049 return c 20050} 20051 20052// Header returns an http.Header that can be modified by the caller to 20053// add HTTP headers to the request. 20054func (c *ProjectsLocationsInspectTemplatesGetCall) Header() http.Header { 20055 if c.header_ == nil { 20056 c.header_ = make(http.Header) 20057 } 20058 return c.header_ 20059} 20060 20061func (c *ProjectsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 20062 reqHeaders := make(http.Header) 20063 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20064 for k, v := range c.header_ { 20065 reqHeaders[k] = v 20066 } 20067 reqHeaders.Set("User-Agent", c.s.userAgent()) 20068 if c.ifNoneMatch_ != "" { 20069 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20070 } 20071 var body io.Reader = nil 20072 c.urlParams_.Set("alt", alt) 20073 c.urlParams_.Set("prettyPrint", "false") 20074 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20075 urls += "?" + c.urlParams_.Encode() 20076 req, err := http.NewRequest("GET", urls, body) 20077 if err != nil { 20078 return nil, err 20079 } 20080 req.Header = reqHeaders 20081 googleapi.Expand(req.URL, map[string]string{ 20082 "name": c.name, 20083 }) 20084 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20085} 20086 20087// Do executes the "dlp.projects.locations.inspectTemplates.get" call. 20088// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 20089// non-nil. Any non-2xx status code is an error. Response headers are in 20090// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 20091// (if a response was returned at all) in 20092// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20093// whether the returned error was because http.StatusNotModified was 20094// returned. 20095func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 20096 gensupport.SetOptions(c.urlParams_, opts...) 20097 res, err := c.doRequest("json") 20098 if res != nil && res.StatusCode == http.StatusNotModified { 20099 if res.Body != nil { 20100 res.Body.Close() 20101 } 20102 return nil, &googleapi.Error{ 20103 Code: res.StatusCode, 20104 Header: res.Header, 20105 } 20106 } 20107 if err != nil { 20108 return nil, err 20109 } 20110 defer googleapi.CloseBody(res) 20111 if err := googleapi.CheckResponse(res); err != nil { 20112 return nil, err 20113 } 20114 ret := &GooglePrivacyDlpV2InspectTemplate{ 20115 ServerResponse: googleapi.ServerResponse{ 20116 Header: res.Header, 20117 HTTPStatusCode: res.StatusCode, 20118 }, 20119 } 20120 target := &ret 20121 if err := gensupport.DecodeResponse(target, res); err != nil { 20122 return nil, err 20123 } 20124 return ret, nil 20125 // { 20126 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20127 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 20128 // "httpMethod": "GET", 20129 // "id": "dlp.projects.locations.inspectTemplates.get", 20130 // "parameterOrder": [ 20131 // "name" 20132 // ], 20133 // "parameters": { 20134 // "name": { 20135 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 20136 // "location": "path", 20137 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 20138 // "required": true, 20139 // "type": "string" 20140 // } 20141 // }, 20142 // "path": "v2/{+name}", 20143 // "response": { 20144 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 20145 // }, 20146 // "scopes": [ 20147 // "https://www.googleapis.com/auth/cloud-platform" 20148 // ] 20149 // } 20150 20151} 20152 20153// method id "dlp.projects.locations.inspectTemplates.list": 20154 20155type ProjectsLocationsInspectTemplatesListCall struct { 20156 s *Service 20157 parentid string 20158 urlParams_ gensupport.URLParams 20159 ifNoneMatch_ string 20160 ctx_ context.Context 20161 header_ http.Header 20162} 20163 20164// List: Lists InspectTemplates. See 20165// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20166func (r *ProjectsLocationsInspectTemplatesService) List(parentid string) *ProjectsLocationsInspectTemplatesListCall { 20167 c := &ProjectsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20168 c.parentid = parentid 20169 return c 20170} 20171 20172// LocationId sets the optional parameter "locationId": Deprecated. This 20173// field has no effect. 20174func (c *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string) *ProjectsLocationsInspectTemplatesListCall { 20175 c.urlParams_.Set("locationId", locationId) 20176 return c 20177} 20178 20179// OrderBy sets the optional parameter "orderBy": Comma separated list 20180// of fields to order by, followed by `asc` or `desc` postfix. This list 20181// is case-insensitive, default sorting order is ascending, redundant 20182// space characters are insignificant. Example: `name asc,update_time, 20183// create_time desc` Supported fields are: - `create_time`: corresponds 20184// to time the template was created. - `update_time`: corresponds to 20185// time the template was last updated. - `name`: corresponds to 20186// template's name. - `display_name`: corresponds to template's display 20187// name. 20188func (c *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { 20189 c.urlParams_.Set("orderBy", orderBy) 20190 return c 20191} 20192 20193// PageSize sets the optional parameter "pageSize": Size of the page, 20194// can be limited by server. If zero server returns a page of max size 20195// 100. 20196func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { 20197 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 20198 return c 20199} 20200 20201// PageToken sets the optional parameter "pageToken": Page token to 20202// continue retrieval. Comes from previous call to 20203// `ListInspectTemplates`. 20204func (c *ProjectsLocationsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsInspectTemplatesListCall { 20205 c.urlParams_.Set("pageToken", pageToken) 20206 return c 20207} 20208 20209// Fields allows partial responses to be retrieved. See 20210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20211// for more information. 20212func (c *ProjectsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesListCall { 20213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20214 return c 20215} 20216 20217// IfNoneMatch sets the optional parameter which makes the operation 20218// fail if the object's ETag matches the given value. This is useful for 20219// getting updates only after the object has changed since the last 20220// request. Use googleapi.IsNotModified to check whether the response 20221// error from Do is the result of In-None-Match. 20222func (c *ProjectsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesListCall { 20223 c.ifNoneMatch_ = entityTag 20224 return c 20225} 20226 20227// Context sets the context to be used in this call's Do method. Any 20228// pending HTTP request will be aborted if the provided context is 20229// canceled. 20230func (c *ProjectsLocationsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesListCall { 20231 c.ctx_ = ctx 20232 return c 20233} 20234 20235// Header returns an http.Header that can be modified by the caller to 20236// add HTTP headers to the request. 20237func (c *ProjectsLocationsInspectTemplatesListCall) Header() http.Header { 20238 if c.header_ == nil { 20239 c.header_ = make(http.Header) 20240 } 20241 return c.header_ 20242} 20243 20244func (c *ProjectsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 20245 reqHeaders := make(http.Header) 20246 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20247 for k, v := range c.header_ { 20248 reqHeaders[k] = v 20249 } 20250 reqHeaders.Set("User-Agent", c.s.userAgent()) 20251 if c.ifNoneMatch_ != "" { 20252 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20253 } 20254 var body io.Reader = nil 20255 c.urlParams_.Set("alt", alt) 20256 c.urlParams_.Set("prettyPrint", "false") 20257 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 20258 urls += "?" + c.urlParams_.Encode() 20259 req, err := http.NewRequest("GET", urls, body) 20260 if err != nil { 20261 return nil, err 20262 } 20263 req.Header = reqHeaders 20264 googleapi.Expand(req.URL, map[string]string{ 20265 "parent": c.parentid, 20266 }) 20267 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20268} 20269 20270// Do executes the "dlp.projects.locations.inspectTemplates.list" call. 20271// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 20272// error will be non-nil. Any non-2xx status code is an error. Response 20273// headers are in either 20274// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 20275// or (if a response was returned at all) in 20276// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20277// whether the returned error was because http.StatusNotModified was 20278// returned. 20279func (c *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 20280 gensupport.SetOptions(c.urlParams_, opts...) 20281 res, err := c.doRequest("json") 20282 if res != nil && res.StatusCode == http.StatusNotModified { 20283 if res.Body != nil { 20284 res.Body.Close() 20285 } 20286 return nil, &googleapi.Error{ 20287 Code: res.StatusCode, 20288 Header: res.Header, 20289 } 20290 } 20291 if err != nil { 20292 return nil, err 20293 } 20294 defer googleapi.CloseBody(res) 20295 if err := googleapi.CheckResponse(res); err != nil { 20296 return nil, err 20297 } 20298 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 20299 ServerResponse: googleapi.ServerResponse{ 20300 Header: res.Header, 20301 HTTPStatusCode: res.StatusCode, 20302 }, 20303 } 20304 target := &ret 20305 if err := gensupport.DecodeResponse(target, res); err != nil { 20306 return nil, err 20307 } 20308 return ret, nil 20309 // { 20310 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20311 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 20312 // "httpMethod": "GET", 20313 // "id": "dlp.projects.locations.inspectTemplates.list", 20314 // "parameterOrder": [ 20315 // "parent" 20316 // ], 20317 // "parameters": { 20318 // "locationId": { 20319 // "description": "Deprecated. This field has no effect.", 20320 // "location": "query", 20321 // "type": "string" 20322 // }, 20323 // "orderBy": { 20324 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the template was created. - `update_time`: corresponds to time the template was last updated. - `name`: corresponds to template's name. - `display_name`: corresponds to template's display name.", 20325 // "location": "query", 20326 // "type": "string" 20327 // }, 20328 // "pageSize": { 20329 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 20330 // "format": "int32", 20331 // "location": "query", 20332 // "type": "integer" 20333 // }, 20334 // "pageToken": { 20335 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 20336 // "location": "query", 20337 // "type": "string" 20338 // }, 20339 // "parent": { 20340 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 20341 // "location": "path", 20342 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20343 // "required": true, 20344 // "type": "string" 20345 // } 20346 // }, 20347 // "path": "v2/{+parent}/inspectTemplates", 20348 // "response": { 20349 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 20350 // }, 20351 // "scopes": [ 20352 // "https://www.googleapis.com/auth/cloud-platform" 20353 // ] 20354 // } 20355 20356} 20357 20358// Pages invokes f for each page of results. 20359// A non-nil error returned from f will halt the iteration. 20360// The provided context supersedes any context provided to the Context method. 20361func (c *ProjectsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 20362 c.ctx_ = ctx 20363 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20364 for { 20365 x, err := c.Do() 20366 if err != nil { 20367 return err 20368 } 20369 if err := f(x); err != nil { 20370 return err 20371 } 20372 if x.NextPageToken == "" { 20373 return nil 20374 } 20375 c.PageToken(x.NextPageToken) 20376 } 20377} 20378 20379// method id "dlp.projects.locations.inspectTemplates.patch": 20380 20381type ProjectsLocationsInspectTemplatesPatchCall struct { 20382 s *Service 20383 name string 20384 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 20385 urlParams_ gensupport.URLParams 20386 ctx_ context.Context 20387 header_ http.Header 20388} 20389 20390// Patch: Updates the InspectTemplate. See 20391// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20392func (r *ProjectsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesPatchCall { 20393 c := &ProjectsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20394 c.name = name 20395 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 20396 return c 20397} 20398 20399// Fields allows partial responses to be retrieved. See 20400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20401// for more information. 20402func (c *ProjectsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesPatchCall { 20403 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20404 return c 20405} 20406 20407// Context sets the context to be used in this call's Do method. Any 20408// pending HTTP request will be aborted if the provided context is 20409// canceled. 20410func (c *ProjectsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesPatchCall { 20411 c.ctx_ = ctx 20412 return c 20413} 20414 20415// Header returns an http.Header that can be modified by the caller to 20416// add HTTP headers to the request. 20417func (c *ProjectsLocationsInspectTemplatesPatchCall) Header() http.Header { 20418 if c.header_ == nil { 20419 c.header_ = make(http.Header) 20420 } 20421 return c.header_ 20422} 20423 20424func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 20425 reqHeaders := make(http.Header) 20426 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20427 for k, v := range c.header_ { 20428 reqHeaders[k] = v 20429 } 20430 reqHeaders.Set("User-Agent", c.s.userAgent()) 20431 var body io.Reader = nil 20432 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 20433 if err != nil { 20434 return nil, err 20435 } 20436 reqHeaders.Set("Content-Type", "application/json") 20437 c.urlParams_.Set("alt", alt) 20438 c.urlParams_.Set("prettyPrint", "false") 20439 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20440 urls += "?" + c.urlParams_.Encode() 20441 req, err := http.NewRequest("PATCH", urls, body) 20442 if err != nil { 20443 return nil, err 20444 } 20445 req.Header = reqHeaders 20446 googleapi.Expand(req.URL, map[string]string{ 20447 "name": c.name, 20448 }) 20449 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20450} 20451 20452// Do executes the "dlp.projects.locations.inspectTemplates.patch" call. 20453// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 20454// non-nil. Any non-2xx status code is an error. Response headers are in 20455// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 20456// (if a response was returned at all) in 20457// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20458// whether the returned error was because http.StatusNotModified was 20459// returned. 20460func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 20461 gensupport.SetOptions(c.urlParams_, opts...) 20462 res, err := c.doRequest("json") 20463 if res != nil && res.StatusCode == http.StatusNotModified { 20464 if res.Body != nil { 20465 res.Body.Close() 20466 } 20467 return nil, &googleapi.Error{ 20468 Code: res.StatusCode, 20469 Header: res.Header, 20470 } 20471 } 20472 if err != nil { 20473 return nil, err 20474 } 20475 defer googleapi.CloseBody(res) 20476 if err := googleapi.CheckResponse(res); err != nil { 20477 return nil, err 20478 } 20479 ret := &GooglePrivacyDlpV2InspectTemplate{ 20480 ServerResponse: googleapi.ServerResponse{ 20481 Header: res.Header, 20482 HTTPStatusCode: res.StatusCode, 20483 }, 20484 } 20485 target := &ret 20486 if err := gensupport.DecodeResponse(target, res); err != nil { 20487 return nil, err 20488 } 20489 return ret, nil 20490 // { 20491 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20492 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 20493 // "httpMethod": "PATCH", 20494 // "id": "dlp.projects.locations.inspectTemplates.patch", 20495 // "parameterOrder": [ 20496 // "name" 20497 // ], 20498 // "parameters": { 20499 // "name": { 20500 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 20501 // "location": "path", 20502 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 20503 // "required": true, 20504 // "type": "string" 20505 // } 20506 // }, 20507 // "path": "v2/{+name}", 20508 // "request": { 20509 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 20510 // }, 20511 // "response": { 20512 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 20513 // }, 20514 // "scopes": [ 20515 // "https://www.googleapis.com/auth/cloud-platform" 20516 // ] 20517 // } 20518 20519} 20520 20521// method id "dlp.projects.locations.jobTriggers.activate": 20522 20523type ProjectsLocationsJobTriggersActivateCall struct { 20524 s *Service 20525 name string 20526 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 20527 urlParams_ gensupport.URLParams 20528 ctx_ context.Context 20529 header_ http.Header 20530} 20531 20532// Activate: Activate a job trigger. Causes the immediate execute of a 20533// trigger instead of waiting on the trigger event to occur. 20534func (r *ProjectsLocationsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsLocationsJobTriggersActivateCall { 20535 c := &ProjectsLocationsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20536 c.name = name 20537 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 20538 return c 20539} 20540 20541// Fields allows partial responses to be retrieved. See 20542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20543// for more information. 20544func (c *ProjectsLocationsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersActivateCall { 20545 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20546 return c 20547} 20548 20549// Context sets the context to be used in this call's Do method. Any 20550// pending HTTP request will be aborted if the provided context is 20551// canceled. 20552func (c *ProjectsLocationsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersActivateCall { 20553 c.ctx_ = ctx 20554 return c 20555} 20556 20557// Header returns an http.Header that can be modified by the caller to 20558// add HTTP headers to the request. 20559func (c *ProjectsLocationsJobTriggersActivateCall) Header() http.Header { 20560 if c.header_ == nil { 20561 c.header_ = make(http.Header) 20562 } 20563 return c.header_ 20564} 20565 20566func (c *ProjectsLocationsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 20567 reqHeaders := make(http.Header) 20568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20569 for k, v := range c.header_ { 20570 reqHeaders[k] = v 20571 } 20572 reqHeaders.Set("User-Agent", c.s.userAgent()) 20573 var body io.Reader = nil 20574 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 20575 if err != nil { 20576 return nil, err 20577 } 20578 reqHeaders.Set("Content-Type", "application/json") 20579 c.urlParams_.Set("alt", alt) 20580 c.urlParams_.Set("prettyPrint", "false") 20581 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 20582 urls += "?" + c.urlParams_.Encode() 20583 req, err := http.NewRequest("POST", urls, body) 20584 if err != nil { 20585 return nil, err 20586 } 20587 req.Header = reqHeaders 20588 googleapi.Expand(req.URL, map[string]string{ 20589 "name": c.name, 20590 }) 20591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20592} 20593 20594// Do executes the "dlp.projects.locations.jobTriggers.activate" call. 20595// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 20596// Any non-2xx status code is an error. Response headers are in either 20597// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 20598// returned at all) in error.(*googleapi.Error).Header. Use 20599// googleapi.IsNotModified to check whether the returned error was 20600// because http.StatusNotModified was returned. 20601func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 20602 gensupport.SetOptions(c.urlParams_, opts...) 20603 res, err := c.doRequest("json") 20604 if res != nil && res.StatusCode == http.StatusNotModified { 20605 if res.Body != nil { 20606 res.Body.Close() 20607 } 20608 return nil, &googleapi.Error{ 20609 Code: res.StatusCode, 20610 Header: res.Header, 20611 } 20612 } 20613 if err != nil { 20614 return nil, err 20615 } 20616 defer googleapi.CloseBody(res) 20617 if err := googleapi.CheckResponse(res); err != nil { 20618 return nil, err 20619 } 20620 ret := &GooglePrivacyDlpV2DlpJob{ 20621 ServerResponse: googleapi.ServerResponse{ 20622 Header: res.Header, 20623 HTTPStatusCode: res.StatusCode, 20624 }, 20625 } 20626 target := &ret 20627 if err := gensupport.DecodeResponse(target, res); err != nil { 20628 return nil, err 20629 } 20630 return ret, nil 20631 // { 20632 // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 20633 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:activate", 20634 // "httpMethod": "POST", 20635 // "id": "dlp.projects.locations.jobTriggers.activate", 20636 // "parameterOrder": [ 20637 // "name" 20638 // ], 20639 // "parameters": { 20640 // "name": { 20641 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 20642 // "location": "path", 20643 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 20644 // "required": true, 20645 // "type": "string" 20646 // } 20647 // }, 20648 // "path": "v2/{+name}:activate", 20649 // "request": { 20650 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 20651 // }, 20652 // "response": { 20653 // "$ref": "GooglePrivacyDlpV2DlpJob" 20654 // }, 20655 // "scopes": [ 20656 // "https://www.googleapis.com/auth/cloud-platform" 20657 // ] 20658 // } 20659 20660} 20661 20662// method id "dlp.projects.locations.jobTriggers.create": 20663 20664type ProjectsLocationsJobTriggersCreateCall struct { 20665 s *Service 20666 parentid string 20667 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 20668 urlParams_ gensupport.URLParams 20669 ctx_ context.Context 20670 header_ http.Header 20671} 20672 20673// Create: Creates a job trigger to run DLP actions such as scanning 20674// storage for sensitive information on a set schedule. See 20675// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20676// more. 20677func (r *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { 20678 c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20679 c.parentid = parentid 20680 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 20681 return c 20682} 20683 20684// Fields allows partial responses to be retrieved. See 20685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20686// for more information. 20687func (c *ProjectsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersCreateCall { 20688 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20689 return c 20690} 20691 20692// Context sets the context to be used in this call's Do method. Any 20693// pending HTTP request will be aborted if the provided context is 20694// canceled. 20695func (c *ProjectsLocationsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersCreateCall { 20696 c.ctx_ = ctx 20697 return c 20698} 20699 20700// Header returns an http.Header that can be modified by the caller to 20701// add HTTP headers to the request. 20702func (c *ProjectsLocationsJobTriggersCreateCall) Header() http.Header { 20703 if c.header_ == nil { 20704 c.header_ = make(http.Header) 20705 } 20706 return c.header_ 20707} 20708 20709func (c *ProjectsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 20710 reqHeaders := make(http.Header) 20711 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20712 for k, v := range c.header_ { 20713 reqHeaders[k] = v 20714 } 20715 reqHeaders.Set("User-Agent", c.s.userAgent()) 20716 var body io.Reader = nil 20717 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 20718 if err != nil { 20719 return nil, err 20720 } 20721 reqHeaders.Set("Content-Type", "application/json") 20722 c.urlParams_.Set("alt", alt) 20723 c.urlParams_.Set("prettyPrint", "false") 20724 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 20725 urls += "?" + c.urlParams_.Encode() 20726 req, err := http.NewRequest("POST", urls, body) 20727 if err != nil { 20728 return nil, err 20729 } 20730 req.Header = reqHeaders 20731 googleapi.Expand(req.URL, map[string]string{ 20732 "parent": c.parentid, 20733 }) 20734 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20735} 20736 20737// Do executes the "dlp.projects.locations.jobTriggers.create" call. 20738// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 20739// non-nil. Any non-2xx status code is an error. Response headers are in 20740// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 20741// response was returned at all) in error.(*googleapi.Error).Header. Use 20742// googleapi.IsNotModified to check whether the returned error was 20743// because http.StatusNotModified was returned. 20744func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 20745 gensupport.SetOptions(c.urlParams_, opts...) 20746 res, err := c.doRequest("json") 20747 if res != nil && res.StatusCode == http.StatusNotModified { 20748 if res.Body != nil { 20749 res.Body.Close() 20750 } 20751 return nil, &googleapi.Error{ 20752 Code: res.StatusCode, 20753 Header: res.Header, 20754 } 20755 } 20756 if err != nil { 20757 return nil, err 20758 } 20759 defer googleapi.CloseBody(res) 20760 if err := googleapi.CheckResponse(res); err != nil { 20761 return nil, err 20762 } 20763 ret := &GooglePrivacyDlpV2JobTrigger{ 20764 ServerResponse: googleapi.ServerResponse{ 20765 Header: res.Header, 20766 HTTPStatusCode: res.StatusCode, 20767 }, 20768 } 20769 target := &ret 20770 if err := gensupport.DecodeResponse(target, res); err != nil { 20771 return nil, err 20772 } 20773 return ret, nil 20774 // { 20775 // "description": "Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 20776 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 20777 // "httpMethod": "POST", 20778 // "id": "dlp.projects.locations.jobTriggers.create", 20779 // "parameterOrder": [ 20780 // "parent" 20781 // ], 20782 // "parameters": { 20783 // "parent": { 20784 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 20785 // "location": "path", 20786 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20787 // "required": true, 20788 // "type": "string" 20789 // } 20790 // }, 20791 // "path": "v2/{+parent}/jobTriggers", 20792 // "request": { 20793 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 20794 // }, 20795 // "response": { 20796 // "$ref": "GooglePrivacyDlpV2JobTrigger" 20797 // }, 20798 // "scopes": [ 20799 // "https://www.googleapis.com/auth/cloud-platform" 20800 // ] 20801 // } 20802 20803} 20804 20805// method id "dlp.projects.locations.jobTriggers.delete": 20806 20807type ProjectsLocationsJobTriggersDeleteCall struct { 20808 s *Service 20809 name string 20810 urlParams_ gensupport.URLParams 20811 ctx_ context.Context 20812 header_ http.Header 20813} 20814 20815// Delete: Deletes a job trigger. See 20816// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20817// more. 20818func (r *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocationsJobTriggersDeleteCall { 20819 c := &ProjectsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20820 c.name = name 20821 return c 20822} 20823 20824// Fields allows partial responses to be retrieved. See 20825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20826// for more information. 20827func (c *ProjectsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersDeleteCall { 20828 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20829 return c 20830} 20831 20832// Context sets the context to be used in this call's Do method. Any 20833// pending HTTP request will be aborted if the provided context is 20834// canceled. 20835func (c *ProjectsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersDeleteCall { 20836 c.ctx_ = ctx 20837 return c 20838} 20839 20840// Header returns an http.Header that can be modified by the caller to 20841// add HTTP headers to the request. 20842func (c *ProjectsLocationsJobTriggersDeleteCall) Header() http.Header { 20843 if c.header_ == nil { 20844 c.header_ = make(http.Header) 20845 } 20846 return c.header_ 20847} 20848 20849func (c *ProjectsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 20850 reqHeaders := make(http.Header) 20851 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20852 for k, v := range c.header_ { 20853 reqHeaders[k] = v 20854 } 20855 reqHeaders.Set("User-Agent", c.s.userAgent()) 20856 var body io.Reader = nil 20857 c.urlParams_.Set("alt", alt) 20858 c.urlParams_.Set("prettyPrint", "false") 20859 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20860 urls += "?" + c.urlParams_.Encode() 20861 req, err := http.NewRequest("DELETE", urls, body) 20862 if err != nil { 20863 return nil, err 20864 } 20865 req.Header = reqHeaders 20866 googleapi.Expand(req.URL, map[string]string{ 20867 "name": c.name, 20868 }) 20869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20870} 20871 20872// Do executes the "dlp.projects.locations.jobTriggers.delete" call. 20873// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20874// non-2xx status code is an error. Response headers are in either 20875// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20876// returned at all) in error.(*googleapi.Error).Header. Use 20877// googleapi.IsNotModified to check whether the returned error was 20878// because http.StatusNotModified was returned. 20879func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20880 gensupport.SetOptions(c.urlParams_, opts...) 20881 res, err := c.doRequest("json") 20882 if res != nil && res.StatusCode == http.StatusNotModified { 20883 if res.Body != nil { 20884 res.Body.Close() 20885 } 20886 return nil, &googleapi.Error{ 20887 Code: res.StatusCode, 20888 Header: res.Header, 20889 } 20890 } 20891 if err != nil { 20892 return nil, err 20893 } 20894 defer googleapi.CloseBody(res) 20895 if err := googleapi.CheckResponse(res); err != nil { 20896 return nil, err 20897 } 20898 ret := &GoogleProtobufEmpty{ 20899 ServerResponse: googleapi.ServerResponse{ 20900 Header: res.Header, 20901 HTTPStatusCode: res.StatusCode, 20902 }, 20903 } 20904 target := &ret 20905 if err := gensupport.DecodeResponse(target, res); err != nil { 20906 return nil, err 20907 } 20908 return ret, nil 20909 // { 20910 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 20911 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 20912 // "httpMethod": "DELETE", 20913 // "id": "dlp.projects.locations.jobTriggers.delete", 20914 // "parameterOrder": [ 20915 // "name" 20916 // ], 20917 // "parameters": { 20918 // "name": { 20919 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 20920 // "location": "path", 20921 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 20922 // "required": true, 20923 // "type": "string" 20924 // } 20925 // }, 20926 // "path": "v2/{+name}", 20927 // "response": { 20928 // "$ref": "GoogleProtobufEmpty" 20929 // }, 20930 // "scopes": [ 20931 // "https://www.googleapis.com/auth/cloud-platform" 20932 // ] 20933 // } 20934 20935} 20936 20937// method id "dlp.projects.locations.jobTriggers.get": 20938 20939type ProjectsLocationsJobTriggersGetCall struct { 20940 s *Service 20941 name string 20942 urlParams_ gensupport.URLParams 20943 ifNoneMatch_ string 20944 ctx_ context.Context 20945 header_ http.Header 20946} 20947 20948// Get: Gets a job trigger. See 20949// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20950// more. 20951func (r *ProjectsLocationsJobTriggersService) Get(name string) *ProjectsLocationsJobTriggersGetCall { 20952 c := &ProjectsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20953 c.name = name 20954 return c 20955} 20956 20957// Fields allows partial responses to be retrieved. See 20958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20959// for more information. 20960func (c *ProjectsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersGetCall { 20961 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20962 return c 20963} 20964 20965// IfNoneMatch sets the optional parameter which makes the operation 20966// fail if the object's ETag matches the given value. This is useful for 20967// getting updates only after the object has changed since the last 20968// request. Use googleapi.IsNotModified to check whether the response 20969// error from Do is the result of In-None-Match. 20970func (c *ProjectsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersGetCall { 20971 c.ifNoneMatch_ = entityTag 20972 return c 20973} 20974 20975// Context sets the context to be used in this call's Do method. Any 20976// pending HTTP request will be aborted if the provided context is 20977// canceled. 20978func (c *ProjectsLocationsJobTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersGetCall { 20979 c.ctx_ = ctx 20980 return c 20981} 20982 20983// Header returns an http.Header that can be modified by the caller to 20984// add HTTP headers to the request. 20985func (c *ProjectsLocationsJobTriggersGetCall) Header() http.Header { 20986 if c.header_ == nil { 20987 c.header_ = make(http.Header) 20988 } 20989 return c.header_ 20990} 20991 20992func (c *ProjectsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 20993 reqHeaders := make(http.Header) 20994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 20995 for k, v := range c.header_ { 20996 reqHeaders[k] = v 20997 } 20998 reqHeaders.Set("User-Agent", c.s.userAgent()) 20999 if c.ifNoneMatch_ != "" { 21000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21001 } 21002 var body io.Reader = nil 21003 c.urlParams_.Set("alt", alt) 21004 c.urlParams_.Set("prettyPrint", "false") 21005 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21006 urls += "?" + c.urlParams_.Encode() 21007 req, err := http.NewRequest("GET", urls, body) 21008 if err != nil { 21009 return nil, err 21010 } 21011 req.Header = reqHeaders 21012 googleapi.Expand(req.URL, map[string]string{ 21013 "name": c.name, 21014 }) 21015 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21016} 21017 21018// Do executes the "dlp.projects.locations.jobTriggers.get" call. 21019// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 21020// non-nil. Any non-2xx status code is an error. Response headers are in 21021// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 21022// response was returned at all) in error.(*googleapi.Error).Header. Use 21023// googleapi.IsNotModified to check whether the returned error was 21024// because http.StatusNotModified was returned. 21025func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 21026 gensupport.SetOptions(c.urlParams_, opts...) 21027 res, err := c.doRequest("json") 21028 if res != nil && res.StatusCode == http.StatusNotModified { 21029 if res.Body != nil { 21030 res.Body.Close() 21031 } 21032 return nil, &googleapi.Error{ 21033 Code: res.StatusCode, 21034 Header: res.Header, 21035 } 21036 } 21037 if err != nil { 21038 return nil, err 21039 } 21040 defer googleapi.CloseBody(res) 21041 if err := googleapi.CheckResponse(res); err != nil { 21042 return nil, err 21043 } 21044 ret := &GooglePrivacyDlpV2JobTrigger{ 21045 ServerResponse: googleapi.ServerResponse{ 21046 Header: res.Header, 21047 HTTPStatusCode: res.StatusCode, 21048 }, 21049 } 21050 target := &ret 21051 if err := gensupport.DecodeResponse(target, res); err != nil { 21052 return nil, err 21053 } 21054 return ret, nil 21055 // { 21056 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21057 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 21058 // "httpMethod": "GET", 21059 // "id": "dlp.projects.locations.jobTriggers.get", 21060 // "parameterOrder": [ 21061 // "name" 21062 // ], 21063 // "parameters": { 21064 // "name": { 21065 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21066 // "location": "path", 21067 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21068 // "required": true, 21069 // "type": "string" 21070 // } 21071 // }, 21072 // "path": "v2/{+name}", 21073 // "response": { 21074 // "$ref": "GooglePrivacyDlpV2JobTrigger" 21075 // }, 21076 // "scopes": [ 21077 // "https://www.googleapis.com/auth/cloud-platform" 21078 // ] 21079 // } 21080 21081} 21082 21083// method id "dlp.projects.locations.jobTriggers.hybridInspect": 21084 21085type ProjectsLocationsJobTriggersHybridInspectCall struct { 21086 s *Service 21087 name string 21088 googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest 21089 urlParams_ gensupport.URLParams 21090 ctx_ context.Context 21091 header_ http.Header 21092} 21093 21094// HybridInspect: Inspect hybrid content and store findings to a 21095// trigger. The inspection will be processed asynchronously. To review 21096// the findings monitor the jobs within the trigger. Early access 21097// feature is in a pre-release state and might change or have limited 21098// support. For more information, see 21099// https://cloud.google.com/products#product-launch-stages. 21100func (r *ProjectsLocationsJobTriggersService) HybridInspect(name string, googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) *ProjectsLocationsJobTriggersHybridInspectCall { 21101 c := &ProjectsLocationsJobTriggersHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21102 c.name = name 21103 c.googleprivacydlpv2hybridinspectjobtriggerrequest = googleprivacydlpv2hybridinspectjobtriggerrequest 21104 return c 21105} 21106 21107// Fields allows partial responses to be retrieved. See 21108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21109// for more information. 21110func (c *ProjectsLocationsJobTriggersHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersHybridInspectCall { 21111 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21112 return c 21113} 21114 21115// Context sets the context to be used in this call's Do method. Any 21116// pending HTTP request will be aborted if the provided context is 21117// canceled. 21118func (c *ProjectsLocationsJobTriggersHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersHybridInspectCall { 21119 c.ctx_ = ctx 21120 return c 21121} 21122 21123// Header returns an http.Header that can be modified by the caller to 21124// add HTTP headers to the request. 21125func (c *ProjectsLocationsJobTriggersHybridInspectCall) Header() http.Header { 21126 if c.header_ == nil { 21127 c.header_ = make(http.Header) 21128 } 21129 return c.header_ 21130} 21131 21132func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (*http.Response, error) { 21133 reqHeaders := make(http.Header) 21134 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21135 for k, v := range c.header_ { 21136 reqHeaders[k] = v 21137 } 21138 reqHeaders.Set("User-Agent", c.s.userAgent()) 21139 var body io.Reader = nil 21140 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectjobtriggerrequest) 21141 if err != nil { 21142 return nil, err 21143 } 21144 reqHeaders.Set("Content-Type", "application/json") 21145 c.urlParams_.Set("alt", alt) 21146 c.urlParams_.Set("prettyPrint", "false") 21147 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 21148 urls += "?" + c.urlParams_.Encode() 21149 req, err := http.NewRequest("POST", urls, body) 21150 if err != nil { 21151 return nil, err 21152 } 21153 req.Header = reqHeaders 21154 googleapi.Expand(req.URL, map[string]string{ 21155 "name": c.name, 21156 }) 21157 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21158} 21159 21160// Do executes the "dlp.projects.locations.jobTriggers.hybridInspect" call. 21161// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 21162// be non-nil. Any non-2xx status code is an error. Response headers are 21163// in either 21164// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 21165// a response was returned at all) in error.(*googleapi.Error).Header. 21166// Use googleapi.IsNotModified to check whether the returned error was 21167// because http.StatusNotModified was returned. 21168func (c *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 21169 gensupport.SetOptions(c.urlParams_, opts...) 21170 res, err := c.doRequest("json") 21171 if res != nil && res.StatusCode == http.StatusNotModified { 21172 if res.Body != nil { 21173 res.Body.Close() 21174 } 21175 return nil, &googleapi.Error{ 21176 Code: res.StatusCode, 21177 Header: res.Header, 21178 } 21179 } 21180 if err != nil { 21181 return nil, err 21182 } 21183 defer googleapi.CloseBody(res) 21184 if err := googleapi.CheckResponse(res); err != nil { 21185 return nil, err 21186 } 21187 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 21188 ServerResponse: googleapi.ServerResponse{ 21189 Header: res.Header, 21190 HTTPStatusCode: res.StatusCode, 21191 }, 21192 } 21193 target := &ret 21194 if err := gensupport.DecodeResponse(target, res); err != nil { 21195 return nil, err 21196 } 21197 return ret, nil 21198 // { 21199 // "description": "Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 21200 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:hybridInspect", 21201 // "httpMethod": "POST", 21202 // "id": "dlp.projects.locations.jobTriggers.hybridInspect", 21203 // "parameterOrder": [ 21204 // "name" 21205 // ], 21206 // "parameters": { 21207 // "name": { 21208 // "description": "Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21209 // "location": "path", 21210 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21211 // "required": true, 21212 // "type": "string" 21213 // } 21214 // }, 21215 // "path": "v2/{+name}:hybridInspect", 21216 // "request": { 21217 // "$ref": "GooglePrivacyDlpV2HybridInspectJobTriggerRequest" 21218 // }, 21219 // "response": { 21220 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 21221 // }, 21222 // "scopes": [ 21223 // "https://www.googleapis.com/auth/cloud-platform" 21224 // ] 21225 // } 21226 21227} 21228 21229// method id "dlp.projects.locations.jobTriggers.list": 21230 21231type ProjectsLocationsJobTriggersListCall struct { 21232 s *Service 21233 parentid string 21234 urlParams_ gensupport.URLParams 21235 ifNoneMatch_ string 21236 ctx_ context.Context 21237 header_ http.Header 21238} 21239 21240// List: Lists job triggers. See 21241// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 21242// more. 21243func (r *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { 21244 c := &ProjectsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21245 c.parentid = parentid 21246 return c 21247} 21248 21249// Filter sets the optional parameter "filter": Allows filtering. 21250// Supported syntax: * Filter expressions are made up of one or more 21251// restrictions. * Restrictions can be combined by `AND` or `OR` logical 21252// operators. A sequence of restrictions implicitly uses `AND`. * A 21253// restriction has the form of `{field} {operator} {value}`. * Supported 21254// fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED 21255// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 21256// 'last_run_time` - RFC 3339 formatted timestamp, surrounded by 21257// quotation marks. Nanoseconds are ignored. - 'error_count' - Number of 21258// errors that have occurred while running. * The operator must be `=` 21259// or `!=` for status and inspected_storage. Examples: * 21260// inspected_storage = cloud_storage AND status = HEALTHY * 21261// inspected_storage = cloud_storage OR inspected_storage = bigquery * 21262// inspected_storage = cloud_storage AND (state = PAUSED OR state = 21263// HEALTHY) * last_run_time > \"2017-12-12T00:00:00+00:00\" The length 21264// of this field should be no more than 500 characters. 21265func (c *ProjectsLocationsJobTriggersListCall) Filter(filter string) *ProjectsLocationsJobTriggersListCall { 21266 c.urlParams_.Set("filter", filter) 21267 return c 21268} 21269 21270// LocationId sets the optional parameter "locationId": Deprecated. This 21271// field has no effect. 21272func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *ProjectsLocationsJobTriggersListCall { 21273 c.urlParams_.Set("locationId", locationId) 21274 return c 21275} 21276 21277// OrderBy sets the optional parameter "orderBy": Comma separated list 21278// of triggeredJob fields to order by, followed by `asc` or `desc` 21279// postfix. This list is case-insensitive, default sorting order is 21280// ascending, redundant space characters are insignificant. Example: 21281// `name asc,update_time, create_time desc` Supported fields are: - 21282// `create_time`: corresponds to time the JobTrigger was created. - 21283// `update_time`: corresponds to time the JobTrigger was last updated. - 21284// `last_run_time`: corresponds to the last time the JobTrigger ran. - 21285// `name`: corresponds to JobTrigger's name. - `display_name`: 21286// corresponds to JobTrigger's display name. - `status`: corresponds to 21287// JobTrigger's status. 21288func (c *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { 21289 c.urlParams_.Set("orderBy", orderBy) 21290 return c 21291} 21292 21293// PageSize sets the optional parameter "pageSize": Size of the page, 21294// can be limited by a server. 21295func (c *ProjectsLocationsJobTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsJobTriggersListCall { 21296 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21297 return c 21298} 21299 21300// PageToken sets the optional parameter "pageToken": Page token to 21301// continue retrieval. Comes from previous call to ListJobTriggers. 21302// `order_by` field must not change for subsequent calls. 21303func (c *ProjectsLocationsJobTriggersListCall) PageToken(pageToken string) *ProjectsLocationsJobTriggersListCall { 21304 c.urlParams_.Set("pageToken", pageToken) 21305 return c 21306} 21307 21308// Fields allows partial responses to be retrieved. See 21309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21310// for more information. 21311func (c *ProjectsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersListCall { 21312 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21313 return c 21314} 21315 21316// IfNoneMatch sets the optional parameter which makes the operation 21317// fail if the object's ETag matches the given value. This is useful for 21318// getting updates only after the object has changed since the last 21319// request. Use googleapi.IsNotModified to check whether the response 21320// error from Do is the result of In-None-Match. 21321func (c *ProjectsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersListCall { 21322 c.ifNoneMatch_ = entityTag 21323 return c 21324} 21325 21326// Context sets the context to be used in this call's Do method. Any 21327// pending HTTP request will be aborted if the provided context is 21328// canceled. 21329func (c *ProjectsLocationsJobTriggersListCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersListCall { 21330 c.ctx_ = ctx 21331 return c 21332} 21333 21334// Header returns an http.Header that can be modified by the caller to 21335// add HTTP headers to the request. 21336func (c *ProjectsLocationsJobTriggersListCall) Header() http.Header { 21337 if c.header_ == nil { 21338 c.header_ = make(http.Header) 21339 } 21340 return c.header_ 21341} 21342 21343func (c *ProjectsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 21344 reqHeaders := make(http.Header) 21345 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21346 for k, v := range c.header_ { 21347 reqHeaders[k] = v 21348 } 21349 reqHeaders.Set("User-Agent", c.s.userAgent()) 21350 if c.ifNoneMatch_ != "" { 21351 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21352 } 21353 var body io.Reader = nil 21354 c.urlParams_.Set("alt", alt) 21355 c.urlParams_.Set("prettyPrint", "false") 21356 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 21357 urls += "?" + c.urlParams_.Encode() 21358 req, err := http.NewRequest("GET", urls, body) 21359 if err != nil { 21360 return nil, err 21361 } 21362 req.Header = reqHeaders 21363 googleapi.Expand(req.URL, map[string]string{ 21364 "parent": c.parentid, 21365 }) 21366 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21367} 21368 21369// Do executes the "dlp.projects.locations.jobTriggers.list" call. 21370// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 21371// will be non-nil. Any non-2xx status code is an error. Response 21372// headers are in either 21373// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 21374// (if a response was returned at all) in 21375// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21376// whether the returned error was because http.StatusNotModified was 21377// returned. 21378func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 21379 gensupport.SetOptions(c.urlParams_, opts...) 21380 res, err := c.doRequest("json") 21381 if res != nil && res.StatusCode == http.StatusNotModified { 21382 if res.Body != nil { 21383 res.Body.Close() 21384 } 21385 return nil, &googleapi.Error{ 21386 Code: res.StatusCode, 21387 Header: res.Header, 21388 } 21389 } 21390 if err != nil { 21391 return nil, err 21392 } 21393 defer googleapi.CloseBody(res) 21394 if err := googleapi.CheckResponse(res); err != nil { 21395 return nil, err 21396 } 21397 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 21398 ServerResponse: googleapi.ServerResponse{ 21399 Header: res.Header, 21400 HTTPStatusCode: res.StatusCode, 21401 }, 21402 } 21403 target := &ret 21404 if err := gensupport.DecodeResponse(target, res); err != nil { 21405 return nil, err 21406 } 21407 return ret, nil 21408 // { 21409 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21410 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 21411 // "httpMethod": "GET", 21412 // "id": "dlp.projects.locations.jobTriggers.list", 21413 // "parameterOrder": [ 21414 // "parent" 21415 // ], 21416 // "parameters": { 21417 // "filter": { 21418 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 21419 // "location": "query", 21420 // "type": "string" 21421 // }, 21422 // "locationId": { 21423 // "description": "Deprecated. This field has no effect.", 21424 // "location": "query", 21425 // "type": "string" 21426 // }, 21427 // "orderBy": { 21428 // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to time the JobTrigger was created. - `update_time`: corresponds to time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to JobTrigger's name. - `display_name`: corresponds to JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", 21429 // "location": "query", 21430 // "type": "string" 21431 // }, 21432 // "pageSize": { 21433 // "description": "Size of the page, can be limited by a server.", 21434 // "format": "int32", 21435 // "location": "query", 21436 // "type": "integer" 21437 // }, 21438 // "pageToken": { 21439 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 21440 // "location": "query", 21441 // "type": "string" 21442 // }, 21443 // "parent": { 21444 // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 21445 // "location": "path", 21446 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21447 // "required": true, 21448 // "type": "string" 21449 // } 21450 // }, 21451 // "path": "v2/{+parent}/jobTriggers", 21452 // "response": { 21453 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 21454 // }, 21455 // "scopes": [ 21456 // "https://www.googleapis.com/auth/cloud-platform" 21457 // ] 21458 // } 21459 21460} 21461 21462// Pages invokes f for each page of results. 21463// A non-nil error returned from f will halt the iteration. 21464// The provided context supersedes any context provided to the Context method. 21465func (c *ProjectsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 21466 c.ctx_ = ctx 21467 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21468 for { 21469 x, err := c.Do() 21470 if err != nil { 21471 return err 21472 } 21473 if err := f(x); err != nil { 21474 return err 21475 } 21476 if x.NextPageToken == "" { 21477 return nil 21478 } 21479 c.PageToken(x.NextPageToken) 21480 } 21481} 21482 21483// method id "dlp.projects.locations.jobTriggers.patch": 21484 21485type ProjectsLocationsJobTriggersPatchCall struct { 21486 s *Service 21487 name string 21488 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 21489 urlParams_ gensupport.URLParams 21490 ctx_ context.Context 21491 header_ http.Header 21492} 21493 21494// Patch: Updates a job trigger. See 21495// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 21496// more. 21497func (r *ProjectsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsLocationsJobTriggersPatchCall { 21498 c := &ProjectsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21499 c.name = name 21500 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 21501 return c 21502} 21503 21504// Fields allows partial responses to be retrieved. See 21505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21506// for more information. 21507func (c *ProjectsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersPatchCall { 21508 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21509 return c 21510} 21511 21512// Context sets the context to be used in this call's Do method. Any 21513// pending HTTP request will be aborted if the provided context is 21514// canceled. 21515func (c *ProjectsLocationsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersPatchCall { 21516 c.ctx_ = ctx 21517 return c 21518} 21519 21520// Header returns an http.Header that can be modified by the caller to 21521// add HTTP headers to the request. 21522func (c *ProjectsLocationsJobTriggersPatchCall) Header() http.Header { 21523 if c.header_ == nil { 21524 c.header_ = make(http.Header) 21525 } 21526 return c.header_ 21527} 21528 21529func (c *ProjectsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 21530 reqHeaders := make(http.Header) 21531 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21532 for k, v := range c.header_ { 21533 reqHeaders[k] = v 21534 } 21535 reqHeaders.Set("User-Agent", c.s.userAgent()) 21536 var body io.Reader = nil 21537 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 21538 if err != nil { 21539 return nil, err 21540 } 21541 reqHeaders.Set("Content-Type", "application/json") 21542 c.urlParams_.Set("alt", alt) 21543 c.urlParams_.Set("prettyPrint", "false") 21544 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21545 urls += "?" + c.urlParams_.Encode() 21546 req, err := http.NewRequest("PATCH", urls, body) 21547 if err != nil { 21548 return nil, err 21549 } 21550 req.Header = reqHeaders 21551 googleapi.Expand(req.URL, map[string]string{ 21552 "name": c.name, 21553 }) 21554 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21555} 21556 21557// Do executes the "dlp.projects.locations.jobTriggers.patch" call. 21558// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 21559// non-nil. Any non-2xx status code is an error. Response headers are in 21560// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 21561// response was returned at all) in error.(*googleapi.Error).Header. Use 21562// googleapi.IsNotModified to check whether the returned error was 21563// because http.StatusNotModified was returned. 21564func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 21565 gensupport.SetOptions(c.urlParams_, opts...) 21566 res, err := c.doRequest("json") 21567 if res != nil && res.StatusCode == http.StatusNotModified { 21568 if res.Body != nil { 21569 res.Body.Close() 21570 } 21571 return nil, &googleapi.Error{ 21572 Code: res.StatusCode, 21573 Header: res.Header, 21574 } 21575 } 21576 if err != nil { 21577 return nil, err 21578 } 21579 defer googleapi.CloseBody(res) 21580 if err := googleapi.CheckResponse(res); err != nil { 21581 return nil, err 21582 } 21583 ret := &GooglePrivacyDlpV2JobTrigger{ 21584 ServerResponse: googleapi.ServerResponse{ 21585 Header: res.Header, 21586 HTTPStatusCode: res.StatusCode, 21587 }, 21588 } 21589 target := &ret 21590 if err := gensupport.DecodeResponse(target, res); err != nil { 21591 return nil, err 21592 } 21593 return ret, nil 21594 // { 21595 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21596 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 21597 // "httpMethod": "PATCH", 21598 // "id": "dlp.projects.locations.jobTriggers.patch", 21599 // "parameterOrder": [ 21600 // "name" 21601 // ], 21602 // "parameters": { 21603 // "name": { 21604 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21605 // "location": "path", 21606 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21607 // "required": true, 21608 // "type": "string" 21609 // } 21610 // }, 21611 // "path": "v2/{+name}", 21612 // "request": { 21613 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 21614 // }, 21615 // "response": { 21616 // "$ref": "GooglePrivacyDlpV2JobTrigger" 21617 // }, 21618 // "scopes": [ 21619 // "https://www.googleapis.com/auth/cloud-platform" 21620 // ] 21621 // } 21622 21623} 21624 21625// method id "dlp.projects.locations.storedInfoTypes.create": 21626 21627type ProjectsLocationsStoredInfoTypesCreateCall struct { 21628 s *Service 21629 parentid string 21630 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 21631 urlParams_ gensupport.URLParams 21632 ctx_ context.Context 21633 header_ http.Header 21634} 21635 21636// Create: Creates a pre-built stored infoType to be used for 21637// inspection. See 21638// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21639// more. 21640func (r *ProjectsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesCreateCall { 21641 c := &ProjectsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21642 c.parentid = parentid 21643 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 21644 return c 21645} 21646 21647// Fields allows partial responses to be retrieved. See 21648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21649// for more information. 21650func (c *ProjectsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesCreateCall { 21651 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21652 return c 21653} 21654 21655// Context sets the context to be used in this call's Do method. Any 21656// pending HTTP request will be aborted if the provided context is 21657// canceled. 21658func (c *ProjectsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesCreateCall { 21659 c.ctx_ = ctx 21660 return c 21661} 21662 21663// Header returns an http.Header that can be modified by the caller to 21664// add HTTP headers to the request. 21665func (c *ProjectsLocationsStoredInfoTypesCreateCall) Header() http.Header { 21666 if c.header_ == nil { 21667 c.header_ = make(http.Header) 21668 } 21669 return c.header_ 21670} 21671 21672func (c *ProjectsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 21673 reqHeaders := make(http.Header) 21674 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21675 for k, v := range c.header_ { 21676 reqHeaders[k] = v 21677 } 21678 reqHeaders.Set("User-Agent", c.s.userAgent()) 21679 var body io.Reader = nil 21680 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 21681 if err != nil { 21682 return nil, err 21683 } 21684 reqHeaders.Set("Content-Type", "application/json") 21685 c.urlParams_.Set("alt", alt) 21686 c.urlParams_.Set("prettyPrint", "false") 21687 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 21688 urls += "?" + c.urlParams_.Encode() 21689 req, err := http.NewRequest("POST", urls, body) 21690 if err != nil { 21691 return nil, err 21692 } 21693 req.Header = reqHeaders 21694 googleapi.Expand(req.URL, map[string]string{ 21695 "parent": c.parentid, 21696 }) 21697 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21698} 21699 21700// Do executes the "dlp.projects.locations.storedInfoTypes.create" call. 21701// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 21702// non-nil. Any non-2xx status code is an error. Response headers are in 21703// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 21704// a response was returned at all) in error.(*googleapi.Error).Header. 21705// Use googleapi.IsNotModified to check whether the returned error was 21706// because http.StatusNotModified was returned. 21707func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 21708 gensupport.SetOptions(c.urlParams_, opts...) 21709 res, err := c.doRequest("json") 21710 if res != nil && res.StatusCode == http.StatusNotModified { 21711 if res.Body != nil { 21712 res.Body.Close() 21713 } 21714 return nil, &googleapi.Error{ 21715 Code: res.StatusCode, 21716 Header: res.Header, 21717 } 21718 } 21719 if err != nil { 21720 return nil, err 21721 } 21722 defer googleapi.CloseBody(res) 21723 if err := googleapi.CheckResponse(res); err != nil { 21724 return nil, err 21725 } 21726 ret := &GooglePrivacyDlpV2StoredInfoType{ 21727 ServerResponse: googleapi.ServerResponse{ 21728 Header: res.Header, 21729 HTTPStatusCode: res.StatusCode, 21730 }, 21731 } 21732 target := &ret 21733 if err := gensupport.DecodeResponse(target, res); err != nil { 21734 return nil, err 21735 } 21736 return ret, nil 21737 // { 21738 // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 21739 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 21740 // "httpMethod": "POST", 21741 // "id": "dlp.projects.locations.storedInfoTypes.create", 21742 // "parameterOrder": [ 21743 // "parent" 21744 // ], 21745 // "parameters": { 21746 // "parent": { 21747 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 21748 // "location": "path", 21749 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21750 // "required": true, 21751 // "type": "string" 21752 // } 21753 // }, 21754 // "path": "v2/{+parent}/storedInfoTypes", 21755 // "request": { 21756 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 21757 // }, 21758 // "response": { 21759 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 21760 // }, 21761 // "scopes": [ 21762 // "https://www.googleapis.com/auth/cloud-platform" 21763 // ] 21764 // } 21765 21766} 21767 21768// method id "dlp.projects.locations.storedInfoTypes.delete": 21769 21770type ProjectsLocationsStoredInfoTypesDeleteCall struct { 21771 s *Service 21772 name string 21773 urlParams_ gensupport.URLParams 21774 ctx_ context.Context 21775 header_ http.Header 21776} 21777 21778// Delete: Deletes a stored infoType. See 21779// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21780// more. 21781func (r *ProjectsLocationsStoredInfoTypesService) Delete(name string) *ProjectsLocationsStoredInfoTypesDeleteCall { 21782 c := &ProjectsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21783 c.name = name 21784 return c 21785} 21786 21787// Fields allows partial responses to be retrieved. See 21788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21789// for more information. 21790func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesDeleteCall { 21791 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21792 return c 21793} 21794 21795// Context sets the context to be used in this call's Do method. Any 21796// pending HTTP request will be aborted if the provided context is 21797// canceled. 21798func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesDeleteCall { 21799 c.ctx_ = ctx 21800 return c 21801} 21802 21803// Header returns an http.Header that can be modified by the caller to 21804// add HTTP headers to the request. 21805func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 21806 if c.header_ == nil { 21807 c.header_ = make(http.Header) 21808 } 21809 return c.header_ 21810} 21811 21812func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 21813 reqHeaders := make(http.Header) 21814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21815 for k, v := range c.header_ { 21816 reqHeaders[k] = v 21817 } 21818 reqHeaders.Set("User-Agent", c.s.userAgent()) 21819 var body io.Reader = nil 21820 c.urlParams_.Set("alt", alt) 21821 c.urlParams_.Set("prettyPrint", "false") 21822 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21823 urls += "?" + c.urlParams_.Encode() 21824 req, err := http.NewRequest("DELETE", urls, body) 21825 if err != nil { 21826 return nil, err 21827 } 21828 req.Header = reqHeaders 21829 googleapi.Expand(req.URL, map[string]string{ 21830 "name": c.name, 21831 }) 21832 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21833} 21834 21835// Do executes the "dlp.projects.locations.storedInfoTypes.delete" call. 21836// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 21837// non-2xx status code is an error. Response headers are in either 21838// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 21839// returned at all) in error.(*googleapi.Error).Header. Use 21840// googleapi.IsNotModified to check whether the returned error was 21841// because http.StatusNotModified was returned. 21842func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 21843 gensupport.SetOptions(c.urlParams_, opts...) 21844 res, err := c.doRequest("json") 21845 if res != nil && res.StatusCode == http.StatusNotModified { 21846 if res.Body != nil { 21847 res.Body.Close() 21848 } 21849 return nil, &googleapi.Error{ 21850 Code: res.StatusCode, 21851 Header: res.Header, 21852 } 21853 } 21854 if err != nil { 21855 return nil, err 21856 } 21857 defer googleapi.CloseBody(res) 21858 if err := googleapi.CheckResponse(res); err != nil { 21859 return nil, err 21860 } 21861 ret := &GoogleProtobufEmpty{ 21862 ServerResponse: googleapi.ServerResponse{ 21863 Header: res.Header, 21864 HTTPStatusCode: res.StatusCode, 21865 }, 21866 } 21867 target := &ret 21868 if err := gensupport.DecodeResponse(target, res); err != nil { 21869 return nil, err 21870 } 21871 return ret, nil 21872 // { 21873 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 21874 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 21875 // "httpMethod": "DELETE", 21876 // "id": "dlp.projects.locations.storedInfoTypes.delete", 21877 // "parameterOrder": [ 21878 // "name" 21879 // ], 21880 // "parameters": { 21881 // "name": { 21882 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 21883 // "location": "path", 21884 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 21885 // "required": true, 21886 // "type": "string" 21887 // } 21888 // }, 21889 // "path": "v2/{+name}", 21890 // "response": { 21891 // "$ref": "GoogleProtobufEmpty" 21892 // }, 21893 // "scopes": [ 21894 // "https://www.googleapis.com/auth/cloud-platform" 21895 // ] 21896 // } 21897 21898} 21899 21900// method id "dlp.projects.locations.storedInfoTypes.get": 21901 21902type ProjectsLocationsStoredInfoTypesGetCall struct { 21903 s *Service 21904 name string 21905 urlParams_ gensupport.URLParams 21906 ifNoneMatch_ string 21907 ctx_ context.Context 21908 header_ http.Header 21909} 21910 21911// Get: Gets a stored infoType. See 21912// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21913// more. 21914func (r *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLocationsStoredInfoTypesGetCall { 21915 c := &ProjectsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21916 c.name = name 21917 return c 21918} 21919 21920// Fields allows partial responses to be retrieved. See 21921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21922// for more information. 21923func (c *ProjectsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesGetCall { 21924 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21925 return c 21926} 21927 21928// IfNoneMatch sets the optional parameter which makes the operation 21929// fail if the object's ETag matches the given value. This is useful for 21930// getting updates only after the object has changed since the last 21931// request. Use googleapi.IsNotModified to check whether the response 21932// error from Do is the result of In-None-Match. 21933func (c *ProjectsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesGetCall { 21934 c.ifNoneMatch_ = entityTag 21935 return c 21936} 21937 21938// Context sets the context to be used in this call's Do method. Any 21939// pending HTTP request will be aborted if the provided context is 21940// canceled. 21941func (c *ProjectsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesGetCall { 21942 c.ctx_ = ctx 21943 return c 21944} 21945 21946// Header returns an http.Header that can be modified by the caller to 21947// add HTTP headers to the request. 21948func (c *ProjectsLocationsStoredInfoTypesGetCall) Header() http.Header { 21949 if c.header_ == nil { 21950 c.header_ = make(http.Header) 21951 } 21952 return c.header_ 21953} 21954 21955func (c *ProjectsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 21956 reqHeaders := make(http.Header) 21957 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 21958 for k, v := range c.header_ { 21959 reqHeaders[k] = v 21960 } 21961 reqHeaders.Set("User-Agent", c.s.userAgent()) 21962 if c.ifNoneMatch_ != "" { 21963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21964 } 21965 var body io.Reader = nil 21966 c.urlParams_.Set("alt", alt) 21967 c.urlParams_.Set("prettyPrint", "false") 21968 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21969 urls += "?" + c.urlParams_.Encode() 21970 req, err := http.NewRequest("GET", urls, body) 21971 if err != nil { 21972 return nil, err 21973 } 21974 req.Header = reqHeaders 21975 googleapi.Expand(req.URL, map[string]string{ 21976 "name": c.name, 21977 }) 21978 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21979} 21980 21981// Do executes the "dlp.projects.locations.storedInfoTypes.get" call. 21982// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 21983// non-nil. Any non-2xx status code is an error. Response headers are in 21984// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 21985// a response was returned at all) in error.(*googleapi.Error).Header. 21986// Use googleapi.IsNotModified to check whether the returned error was 21987// because http.StatusNotModified was returned. 21988func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 21989 gensupport.SetOptions(c.urlParams_, opts...) 21990 res, err := c.doRequest("json") 21991 if res != nil && res.StatusCode == http.StatusNotModified { 21992 if res.Body != nil { 21993 res.Body.Close() 21994 } 21995 return nil, &googleapi.Error{ 21996 Code: res.StatusCode, 21997 Header: res.Header, 21998 } 21999 } 22000 if err != nil { 22001 return nil, err 22002 } 22003 defer googleapi.CloseBody(res) 22004 if err := googleapi.CheckResponse(res); err != nil { 22005 return nil, err 22006 } 22007 ret := &GooglePrivacyDlpV2StoredInfoType{ 22008 ServerResponse: googleapi.ServerResponse{ 22009 Header: res.Header, 22010 HTTPStatusCode: res.StatusCode, 22011 }, 22012 } 22013 target := &ret 22014 if err := gensupport.DecodeResponse(target, res); err != nil { 22015 return nil, err 22016 } 22017 return ret, nil 22018 // { 22019 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22020 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 22021 // "httpMethod": "GET", 22022 // "id": "dlp.projects.locations.storedInfoTypes.get", 22023 // "parameterOrder": [ 22024 // "name" 22025 // ], 22026 // "parameters": { 22027 // "name": { 22028 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22029 // "location": "path", 22030 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 22031 // "required": true, 22032 // "type": "string" 22033 // } 22034 // }, 22035 // "path": "v2/{+name}", 22036 // "response": { 22037 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22038 // }, 22039 // "scopes": [ 22040 // "https://www.googleapis.com/auth/cloud-platform" 22041 // ] 22042 // } 22043 22044} 22045 22046// method id "dlp.projects.locations.storedInfoTypes.list": 22047 22048type ProjectsLocationsStoredInfoTypesListCall struct { 22049 s *Service 22050 parentid string 22051 urlParams_ gensupport.URLParams 22052 ifNoneMatch_ string 22053 ctx_ context.Context 22054 header_ http.Header 22055} 22056 22057// List: Lists stored infoTypes. See 22058// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22059// more. 22060func (r *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { 22061 c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22062 c.parentid = parentid 22063 return c 22064} 22065 22066// LocationId sets the optional parameter "locationId": Deprecated. This 22067// field has no effect. 22068func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsLocationsStoredInfoTypesListCall { 22069 c.urlParams_.Set("locationId", locationId) 22070 return c 22071} 22072 22073// OrderBy sets the optional parameter "orderBy": Comma separated list 22074// of fields to order by, followed by `asc` or `desc` postfix. This list 22075// is case-insensitive, default sorting order is ascending, redundant 22076// space characters are insignificant. Example: `name asc, display_name, 22077// create_time desc` Supported fields are: - `create_time`: corresponds 22078// to time the most recent version of the resource was created. - 22079// `state`: corresponds to the state of the resource. - `name`: 22080// corresponds to resource name. - `display_name`: corresponds to info 22081// type's display name. 22082func (c *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsLocationsStoredInfoTypesListCall { 22083 c.urlParams_.Set("orderBy", orderBy) 22084 return c 22085} 22086 22087// PageSize sets the optional parameter "pageSize": Size of the page, 22088// can be limited by server. If zero server returns a page of max size 22089// 100. 22090func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { 22091 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22092 return c 22093} 22094 22095// PageToken sets the optional parameter "pageToken": Page token to 22096// continue retrieval. Comes from previous call to 22097// `ListStoredInfoTypes`. 22098func (c *ProjectsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsLocationsStoredInfoTypesListCall { 22099 c.urlParams_.Set("pageToken", pageToken) 22100 return c 22101} 22102 22103// Fields allows partial responses to be retrieved. See 22104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22105// for more information. 22106func (c *ProjectsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesListCall { 22107 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22108 return c 22109} 22110 22111// IfNoneMatch sets the optional parameter which makes the operation 22112// fail if the object's ETag matches the given value. This is useful for 22113// getting updates only after the object has changed since the last 22114// request. Use googleapi.IsNotModified to check whether the response 22115// error from Do is the result of In-None-Match. 22116func (c *ProjectsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesListCall { 22117 c.ifNoneMatch_ = entityTag 22118 return c 22119} 22120 22121// Context sets the context to be used in this call's Do method. Any 22122// pending HTTP request will be aborted if the provided context is 22123// canceled. 22124func (c *ProjectsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesListCall { 22125 c.ctx_ = ctx 22126 return c 22127} 22128 22129// Header returns an http.Header that can be modified by the caller to 22130// add HTTP headers to the request. 22131func (c *ProjectsLocationsStoredInfoTypesListCall) Header() http.Header { 22132 if c.header_ == nil { 22133 c.header_ = make(http.Header) 22134 } 22135 return c.header_ 22136} 22137 22138func (c *ProjectsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 22139 reqHeaders := make(http.Header) 22140 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22141 for k, v := range c.header_ { 22142 reqHeaders[k] = v 22143 } 22144 reqHeaders.Set("User-Agent", c.s.userAgent()) 22145 if c.ifNoneMatch_ != "" { 22146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22147 } 22148 var body io.Reader = nil 22149 c.urlParams_.Set("alt", alt) 22150 c.urlParams_.Set("prettyPrint", "false") 22151 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22152 urls += "?" + c.urlParams_.Encode() 22153 req, err := http.NewRequest("GET", urls, body) 22154 if err != nil { 22155 return nil, err 22156 } 22157 req.Header = reqHeaders 22158 googleapi.Expand(req.URL, map[string]string{ 22159 "parent": c.parentid, 22160 }) 22161 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22162} 22163 22164// Do executes the "dlp.projects.locations.storedInfoTypes.list" call. 22165// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 22166// error will be non-nil. Any non-2xx status code is an error. Response 22167// headers are in either 22168// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 22169// or (if a response was returned at all) in 22170// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22171// whether the returned error was because http.StatusNotModified was 22172// returned. 22173func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 22174 gensupport.SetOptions(c.urlParams_, opts...) 22175 res, err := c.doRequest("json") 22176 if res != nil && res.StatusCode == http.StatusNotModified { 22177 if res.Body != nil { 22178 res.Body.Close() 22179 } 22180 return nil, &googleapi.Error{ 22181 Code: res.StatusCode, 22182 Header: res.Header, 22183 } 22184 } 22185 if err != nil { 22186 return nil, err 22187 } 22188 defer googleapi.CloseBody(res) 22189 if err := googleapi.CheckResponse(res); err != nil { 22190 return nil, err 22191 } 22192 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 22193 ServerResponse: googleapi.ServerResponse{ 22194 Header: res.Header, 22195 HTTPStatusCode: res.StatusCode, 22196 }, 22197 } 22198 target := &ret 22199 if err := gensupport.DecodeResponse(target, res); err != nil { 22200 return nil, err 22201 } 22202 return ret, nil 22203 // { 22204 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22205 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 22206 // "httpMethod": "GET", 22207 // "id": "dlp.projects.locations.storedInfoTypes.list", 22208 // "parameterOrder": [ 22209 // "parent" 22210 // ], 22211 // "parameters": { 22212 // "locationId": { 22213 // "description": "Deprecated. This field has no effect.", 22214 // "location": "query", 22215 // "type": "string" 22216 // }, 22217 // "orderBy": { 22218 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", 22219 // "location": "query", 22220 // "type": "string" 22221 // }, 22222 // "pageSize": { 22223 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 22224 // "format": "int32", 22225 // "location": "query", 22226 // "type": "integer" 22227 // }, 22228 // "pageToken": { 22229 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 22230 // "location": "query", 22231 // "type": "string" 22232 // }, 22233 // "parent": { 22234 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 22235 // "location": "path", 22236 // "pattern": "^projects/[^/]+/locations/[^/]+$", 22237 // "required": true, 22238 // "type": "string" 22239 // } 22240 // }, 22241 // "path": "v2/{+parent}/storedInfoTypes", 22242 // "response": { 22243 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 22244 // }, 22245 // "scopes": [ 22246 // "https://www.googleapis.com/auth/cloud-platform" 22247 // ] 22248 // } 22249 22250} 22251 22252// Pages invokes f for each page of results. 22253// A non-nil error returned from f will halt the iteration. 22254// The provided context supersedes any context provided to the Context method. 22255func (c *ProjectsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 22256 c.ctx_ = ctx 22257 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22258 for { 22259 x, err := c.Do() 22260 if err != nil { 22261 return err 22262 } 22263 if err := f(x); err != nil { 22264 return err 22265 } 22266 if x.NextPageToken == "" { 22267 return nil 22268 } 22269 c.PageToken(x.NextPageToken) 22270 } 22271} 22272 22273// method id "dlp.projects.locations.storedInfoTypes.patch": 22274 22275type ProjectsLocationsStoredInfoTypesPatchCall struct { 22276 s *Service 22277 name string 22278 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 22279 urlParams_ gensupport.URLParams 22280 ctx_ context.Context 22281 header_ http.Header 22282} 22283 22284// Patch: Updates the stored infoType by creating a new version. The 22285// existing version will continue to be used until the new version is 22286// ready. See 22287// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22288// more. 22289func (r *ProjectsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesPatchCall { 22290 c := &ProjectsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22291 c.name = name 22292 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 22293 return c 22294} 22295 22296// Fields allows partial responses to be retrieved. See 22297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22298// for more information. 22299func (c *ProjectsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesPatchCall { 22300 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22301 return c 22302} 22303 22304// Context sets the context to be used in this call's Do method. Any 22305// pending HTTP request will be aborted if the provided context is 22306// canceled. 22307func (c *ProjectsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesPatchCall { 22308 c.ctx_ = ctx 22309 return c 22310} 22311 22312// Header returns an http.Header that can be modified by the caller to 22313// add HTTP headers to the request. 22314func (c *ProjectsLocationsStoredInfoTypesPatchCall) Header() http.Header { 22315 if c.header_ == nil { 22316 c.header_ = make(http.Header) 22317 } 22318 return c.header_ 22319} 22320 22321func (c *ProjectsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 22322 reqHeaders := make(http.Header) 22323 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22324 for k, v := range c.header_ { 22325 reqHeaders[k] = v 22326 } 22327 reqHeaders.Set("User-Agent", c.s.userAgent()) 22328 var body io.Reader = nil 22329 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 22330 if err != nil { 22331 return nil, err 22332 } 22333 reqHeaders.Set("Content-Type", "application/json") 22334 c.urlParams_.Set("alt", alt) 22335 c.urlParams_.Set("prettyPrint", "false") 22336 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22337 urls += "?" + c.urlParams_.Encode() 22338 req, err := http.NewRequest("PATCH", urls, body) 22339 if err != nil { 22340 return nil, err 22341 } 22342 req.Header = reqHeaders 22343 googleapi.Expand(req.URL, map[string]string{ 22344 "name": c.name, 22345 }) 22346 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22347} 22348 22349// Do executes the "dlp.projects.locations.storedInfoTypes.patch" call. 22350// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22351// non-nil. Any non-2xx status code is an error. Response headers are in 22352// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22353// a response was returned at all) in error.(*googleapi.Error).Header. 22354// Use googleapi.IsNotModified to check whether the returned error was 22355// because http.StatusNotModified was returned. 22356func (c *ProjectsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22357 gensupport.SetOptions(c.urlParams_, opts...) 22358 res, err := c.doRequest("json") 22359 if res != nil && res.StatusCode == http.StatusNotModified { 22360 if res.Body != nil { 22361 res.Body.Close() 22362 } 22363 return nil, &googleapi.Error{ 22364 Code: res.StatusCode, 22365 Header: res.Header, 22366 } 22367 } 22368 if err != nil { 22369 return nil, err 22370 } 22371 defer googleapi.CloseBody(res) 22372 if err := googleapi.CheckResponse(res); err != nil { 22373 return nil, err 22374 } 22375 ret := &GooglePrivacyDlpV2StoredInfoType{ 22376 ServerResponse: googleapi.ServerResponse{ 22377 Header: res.Header, 22378 HTTPStatusCode: res.StatusCode, 22379 }, 22380 } 22381 target := &ret 22382 if err := gensupport.DecodeResponse(target, res); err != nil { 22383 return nil, err 22384 } 22385 return ret, nil 22386 // { 22387 // "description": "Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22388 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 22389 // "httpMethod": "PATCH", 22390 // "id": "dlp.projects.locations.storedInfoTypes.patch", 22391 // "parameterOrder": [ 22392 // "name" 22393 // ], 22394 // "parameters": { 22395 // "name": { 22396 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22397 // "location": "path", 22398 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 22399 // "required": true, 22400 // "type": "string" 22401 // } 22402 // }, 22403 // "path": "v2/{+name}", 22404 // "request": { 22405 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 22406 // }, 22407 // "response": { 22408 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22409 // }, 22410 // "scopes": [ 22411 // "https://www.googleapis.com/auth/cloud-platform" 22412 // ] 22413 // } 22414 22415} 22416 22417// method id "dlp.projects.storedInfoTypes.create": 22418 22419type ProjectsStoredInfoTypesCreateCall struct { 22420 s *Service 22421 parentid string 22422 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 22423 urlParams_ gensupport.URLParams 22424 ctx_ context.Context 22425 header_ http.Header 22426} 22427 22428// Create: Creates a pre-built stored infoType to be used for 22429// inspection. See 22430// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22431// more. 22432func (r *ProjectsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsStoredInfoTypesCreateCall { 22433 c := &ProjectsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22434 c.parentid = parentid 22435 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 22436 return c 22437} 22438 22439// Fields allows partial responses to be retrieved. See 22440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22441// for more information. 22442func (c *ProjectsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesCreateCall { 22443 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22444 return c 22445} 22446 22447// Context sets the context to be used in this call's Do method. Any 22448// pending HTTP request will be aborted if the provided context is 22449// canceled. 22450func (c *ProjectsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsStoredInfoTypesCreateCall { 22451 c.ctx_ = ctx 22452 return c 22453} 22454 22455// Header returns an http.Header that can be modified by the caller to 22456// add HTTP headers to the request. 22457func (c *ProjectsStoredInfoTypesCreateCall) Header() http.Header { 22458 if c.header_ == nil { 22459 c.header_ = make(http.Header) 22460 } 22461 return c.header_ 22462} 22463 22464func (c *ProjectsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 22465 reqHeaders := make(http.Header) 22466 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22467 for k, v := range c.header_ { 22468 reqHeaders[k] = v 22469 } 22470 reqHeaders.Set("User-Agent", c.s.userAgent()) 22471 var body io.Reader = nil 22472 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 22473 if err != nil { 22474 return nil, err 22475 } 22476 reqHeaders.Set("Content-Type", "application/json") 22477 c.urlParams_.Set("alt", alt) 22478 c.urlParams_.Set("prettyPrint", "false") 22479 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22480 urls += "?" + c.urlParams_.Encode() 22481 req, err := http.NewRequest("POST", urls, body) 22482 if err != nil { 22483 return nil, err 22484 } 22485 req.Header = reqHeaders 22486 googleapi.Expand(req.URL, map[string]string{ 22487 "parent": c.parentid, 22488 }) 22489 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22490} 22491 22492// Do executes the "dlp.projects.storedInfoTypes.create" call. 22493// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22494// non-nil. Any non-2xx status code is an error. Response headers are in 22495// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22496// a response was returned at all) in error.(*googleapi.Error).Header. 22497// Use googleapi.IsNotModified to check whether the returned error was 22498// because http.StatusNotModified was returned. 22499func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22500 gensupport.SetOptions(c.urlParams_, opts...) 22501 res, err := c.doRequest("json") 22502 if res != nil && res.StatusCode == http.StatusNotModified { 22503 if res.Body != nil { 22504 res.Body.Close() 22505 } 22506 return nil, &googleapi.Error{ 22507 Code: res.StatusCode, 22508 Header: res.Header, 22509 } 22510 } 22511 if err != nil { 22512 return nil, err 22513 } 22514 defer googleapi.CloseBody(res) 22515 if err := googleapi.CheckResponse(res); err != nil { 22516 return nil, err 22517 } 22518 ret := &GooglePrivacyDlpV2StoredInfoType{ 22519 ServerResponse: googleapi.ServerResponse{ 22520 Header: res.Header, 22521 HTTPStatusCode: res.StatusCode, 22522 }, 22523 } 22524 target := &ret 22525 if err := gensupport.DecodeResponse(target, res); err != nil { 22526 return nil, err 22527 } 22528 return ret, nil 22529 // { 22530 // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22531 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 22532 // "httpMethod": "POST", 22533 // "id": "dlp.projects.storedInfoTypes.create", 22534 // "parameterOrder": [ 22535 // "parent" 22536 // ], 22537 // "parameters": { 22538 // "parent": { 22539 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 22540 // "location": "path", 22541 // "pattern": "^projects/[^/]+$", 22542 // "required": true, 22543 // "type": "string" 22544 // } 22545 // }, 22546 // "path": "v2/{+parent}/storedInfoTypes", 22547 // "request": { 22548 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 22549 // }, 22550 // "response": { 22551 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22552 // }, 22553 // "scopes": [ 22554 // "https://www.googleapis.com/auth/cloud-platform" 22555 // ] 22556 // } 22557 22558} 22559 22560// method id "dlp.projects.storedInfoTypes.delete": 22561 22562type ProjectsStoredInfoTypesDeleteCall struct { 22563 s *Service 22564 name string 22565 urlParams_ gensupport.URLParams 22566 ctx_ context.Context 22567 header_ http.Header 22568} 22569 22570// Delete: Deletes a stored infoType. See 22571// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22572// more. 22573func (r *ProjectsStoredInfoTypesService) Delete(name string) *ProjectsStoredInfoTypesDeleteCall { 22574 c := &ProjectsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22575 c.name = name 22576 return c 22577} 22578 22579// Fields allows partial responses to be retrieved. See 22580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22581// for more information. 22582func (c *ProjectsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesDeleteCall { 22583 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22584 return c 22585} 22586 22587// Context sets the context to be used in this call's Do method. Any 22588// pending HTTP request will be aborted if the provided context is 22589// canceled. 22590func (c *ProjectsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsStoredInfoTypesDeleteCall { 22591 c.ctx_ = ctx 22592 return c 22593} 22594 22595// Header returns an http.Header that can be modified by the caller to 22596// add HTTP headers to the request. 22597func (c *ProjectsStoredInfoTypesDeleteCall) Header() http.Header { 22598 if c.header_ == nil { 22599 c.header_ = make(http.Header) 22600 } 22601 return c.header_ 22602} 22603 22604func (c *ProjectsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 22605 reqHeaders := make(http.Header) 22606 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22607 for k, v := range c.header_ { 22608 reqHeaders[k] = v 22609 } 22610 reqHeaders.Set("User-Agent", c.s.userAgent()) 22611 var body io.Reader = nil 22612 c.urlParams_.Set("alt", alt) 22613 c.urlParams_.Set("prettyPrint", "false") 22614 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22615 urls += "?" + c.urlParams_.Encode() 22616 req, err := http.NewRequest("DELETE", urls, body) 22617 if err != nil { 22618 return nil, err 22619 } 22620 req.Header = reqHeaders 22621 googleapi.Expand(req.URL, map[string]string{ 22622 "name": c.name, 22623 }) 22624 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22625} 22626 22627// Do executes the "dlp.projects.storedInfoTypes.delete" call. 22628// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 22629// non-2xx status code is an error. Response headers are in either 22630// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 22631// returned at all) in error.(*googleapi.Error).Header. Use 22632// googleapi.IsNotModified to check whether the returned error was 22633// because http.StatusNotModified was returned. 22634func (c *ProjectsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 22635 gensupport.SetOptions(c.urlParams_, opts...) 22636 res, err := c.doRequest("json") 22637 if res != nil && res.StatusCode == http.StatusNotModified { 22638 if res.Body != nil { 22639 res.Body.Close() 22640 } 22641 return nil, &googleapi.Error{ 22642 Code: res.StatusCode, 22643 Header: res.Header, 22644 } 22645 } 22646 if err != nil { 22647 return nil, err 22648 } 22649 defer googleapi.CloseBody(res) 22650 if err := googleapi.CheckResponse(res); err != nil { 22651 return nil, err 22652 } 22653 ret := &GoogleProtobufEmpty{ 22654 ServerResponse: googleapi.ServerResponse{ 22655 Header: res.Header, 22656 HTTPStatusCode: res.StatusCode, 22657 }, 22658 } 22659 target := &ret 22660 if err := gensupport.DecodeResponse(target, res); err != nil { 22661 return nil, err 22662 } 22663 return ret, nil 22664 // { 22665 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22666 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 22667 // "httpMethod": "DELETE", 22668 // "id": "dlp.projects.storedInfoTypes.delete", 22669 // "parameterOrder": [ 22670 // "name" 22671 // ], 22672 // "parameters": { 22673 // "name": { 22674 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22675 // "location": "path", 22676 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 22677 // "required": true, 22678 // "type": "string" 22679 // } 22680 // }, 22681 // "path": "v2/{+name}", 22682 // "response": { 22683 // "$ref": "GoogleProtobufEmpty" 22684 // }, 22685 // "scopes": [ 22686 // "https://www.googleapis.com/auth/cloud-platform" 22687 // ] 22688 // } 22689 22690} 22691 22692// method id "dlp.projects.storedInfoTypes.get": 22693 22694type ProjectsStoredInfoTypesGetCall struct { 22695 s *Service 22696 name string 22697 urlParams_ gensupport.URLParams 22698 ifNoneMatch_ string 22699 ctx_ context.Context 22700 header_ http.Header 22701} 22702 22703// Get: Gets a stored infoType. See 22704// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22705// more. 22706func (r *ProjectsStoredInfoTypesService) Get(name string) *ProjectsStoredInfoTypesGetCall { 22707 c := &ProjectsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22708 c.name = name 22709 return c 22710} 22711 22712// Fields allows partial responses to be retrieved. See 22713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22714// for more information. 22715func (c *ProjectsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesGetCall { 22716 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22717 return c 22718} 22719 22720// IfNoneMatch sets the optional parameter which makes the operation 22721// fail if the object's ETag matches the given value. This is useful for 22722// getting updates only after the object has changed since the last 22723// request. Use googleapi.IsNotModified to check whether the response 22724// error from Do is the result of In-None-Match. 22725func (c *ProjectsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesGetCall { 22726 c.ifNoneMatch_ = entityTag 22727 return c 22728} 22729 22730// Context sets the context to be used in this call's Do method. Any 22731// pending HTTP request will be aborted if the provided context is 22732// canceled. 22733func (c *ProjectsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsStoredInfoTypesGetCall { 22734 c.ctx_ = ctx 22735 return c 22736} 22737 22738// Header returns an http.Header that can be modified by the caller to 22739// add HTTP headers to the request. 22740func (c *ProjectsStoredInfoTypesGetCall) Header() http.Header { 22741 if c.header_ == nil { 22742 c.header_ = make(http.Header) 22743 } 22744 return c.header_ 22745} 22746 22747func (c *ProjectsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 22748 reqHeaders := make(http.Header) 22749 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22750 for k, v := range c.header_ { 22751 reqHeaders[k] = v 22752 } 22753 reqHeaders.Set("User-Agent", c.s.userAgent()) 22754 if c.ifNoneMatch_ != "" { 22755 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22756 } 22757 var body io.Reader = nil 22758 c.urlParams_.Set("alt", alt) 22759 c.urlParams_.Set("prettyPrint", "false") 22760 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22761 urls += "?" + c.urlParams_.Encode() 22762 req, err := http.NewRequest("GET", urls, body) 22763 if err != nil { 22764 return nil, err 22765 } 22766 req.Header = reqHeaders 22767 googleapi.Expand(req.URL, map[string]string{ 22768 "name": c.name, 22769 }) 22770 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22771} 22772 22773// Do executes the "dlp.projects.storedInfoTypes.get" call. 22774// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22775// non-nil. Any non-2xx status code is an error. Response headers are in 22776// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22777// a response was returned at all) in error.(*googleapi.Error).Header. 22778// Use googleapi.IsNotModified to check whether the returned error was 22779// because http.StatusNotModified was returned. 22780func (c *ProjectsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22781 gensupport.SetOptions(c.urlParams_, opts...) 22782 res, err := c.doRequest("json") 22783 if res != nil && res.StatusCode == http.StatusNotModified { 22784 if res.Body != nil { 22785 res.Body.Close() 22786 } 22787 return nil, &googleapi.Error{ 22788 Code: res.StatusCode, 22789 Header: res.Header, 22790 } 22791 } 22792 if err != nil { 22793 return nil, err 22794 } 22795 defer googleapi.CloseBody(res) 22796 if err := googleapi.CheckResponse(res); err != nil { 22797 return nil, err 22798 } 22799 ret := &GooglePrivacyDlpV2StoredInfoType{ 22800 ServerResponse: googleapi.ServerResponse{ 22801 Header: res.Header, 22802 HTTPStatusCode: res.StatusCode, 22803 }, 22804 } 22805 target := &ret 22806 if err := gensupport.DecodeResponse(target, res); err != nil { 22807 return nil, err 22808 } 22809 return ret, nil 22810 // { 22811 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22812 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 22813 // "httpMethod": "GET", 22814 // "id": "dlp.projects.storedInfoTypes.get", 22815 // "parameterOrder": [ 22816 // "name" 22817 // ], 22818 // "parameters": { 22819 // "name": { 22820 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22821 // "location": "path", 22822 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 22823 // "required": true, 22824 // "type": "string" 22825 // } 22826 // }, 22827 // "path": "v2/{+name}", 22828 // "response": { 22829 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22830 // }, 22831 // "scopes": [ 22832 // "https://www.googleapis.com/auth/cloud-platform" 22833 // ] 22834 // } 22835 22836} 22837 22838// method id "dlp.projects.storedInfoTypes.list": 22839 22840type ProjectsStoredInfoTypesListCall struct { 22841 s *Service 22842 parentid string 22843 urlParams_ gensupport.URLParams 22844 ifNoneMatch_ string 22845 ctx_ context.Context 22846 header_ http.Header 22847} 22848 22849// List: Lists stored infoTypes. See 22850// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22851// more. 22852func (r *ProjectsStoredInfoTypesService) List(parentid string) *ProjectsStoredInfoTypesListCall { 22853 c := &ProjectsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22854 c.parentid = parentid 22855 return c 22856} 22857 22858// LocationId sets the optional parameter "locationId": Deprecated. This 22859// field has no effect. 22860func (c *ProjectsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsStoredInfoTypesListCall { 22861 c.urlParams_.Set("locationId", locationId) 22862 return c 22863} 22864 22865// OrderBy sets the optional parameter "orderBy": Comma separated list 22866// of fields to order by, followed by `asc` or `desc` postfix. This list 22867// is case-insensitive, default sorting order is ascending, redundant 22868// space characters are insignificant. Example: `name asc, display_name, 22869// create_time desc` Supported fields are: - `create_time`: corresponds 22870// to time the most recent version of the resource was created. - 22871// `state`: corresponds to the state of the resource. - `name`: 22872// corresponds to resource name. - `display_name`: corresponds to info 22873// type's display name. 22874func (c *ProjectsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsStoredInfoTypesListCall { 22875 c.urlParams_.Set("orderBy", orderBy) 22876 return c 22877} 22878 22879// PageSize sets the optional parameter "pageSize": Size of the page, 22880// can be limited by server. If zero server returns a page of max size 22881// 100. 22882func (c *ProjectsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsStoredInfoTypesListCall { 22883 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22884 return c 22885} 22886 22887// PageToken sets the optional parameter "pageToken": Page token to 22888// continue retrieval. Comes from previous call to 22889// `ListStoredInfoTypes`. 22890func (c *ProjectsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsStoredInfoTypesListCall { 22891 c.urlParams_.Set("pageToken", pageToken) 22892 return c 22893} 22894 22895// Fields allows partial responses to be retrieved. See 22896// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22897// for more information. 22898func (c *ProjectsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesListCall { 22899 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22900 return c 22901} 22902 22903// IfNoneMatch sets the optional parameter which makes the operation 22904// fail if the object's ETag matches the given value. This is useful for 22905// getting updates only after the object has changed since the last 22906// request. Use googleapi.IsNotModified to check whether the response 22907// error from Do is the result of In-None-Match. 22908func (c *ProjectsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesListCall { 22909 c.ifNoneMatch_ = entityTag 22910 return c 22911} 22912 22913// Context sets the context to be used in this call's Do method. Any 22914// pending HTTP request will be aborted if the provided context is 22915// canceled. 22916func (c *ProjectsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsStoredInfoTypesListCall { 22917 c.ctx_ = ctx 22918 return c 22919} 22920 22921// Header returns an http.Header that can be modified by the caller to 22922// add HTTP headers to the request. 22923func (c *ProjectsStoredInfoTypesListCall) Header() http.Header { 22924 if c.header_ == nil { 22925 c.header_ = make(http.Header) 22926 } 22927 return c.header_ 22928} 22929 22930func (c *ProjectsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 22931 reqHeaders := make(http.Header) 22932 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 22933 for k, v := range c.header_ { 22934 reqHeaders[k] = v 22935 } 22936 reqHeaders.Set("User-Agent", c.s.userAgent()) 22937 if c.ifNoneMatch_ != "" { 22938 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22939 } 22940 var body io.Reader = nil 22941 c.urlParams_.Set("alt", alt) 22942 c.urlParams_.Set("prettyPrint", "false") 22943 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22944 urls += "?" + c.urlParams_.Encode() 22945 req, err := http.NewRequest("GET", urls, body) 22946 if err != nil { 22947 return nil, err 22948 } 22949 req.Header = reqHeaders 22950 googleapi.Expand(req.URL, map[string]string{ 22951 "parent": c.parentid, 22952 }) 22953 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22954} 22955 22956// Do executes the "dlp.projects.storedInfoTypes.list" call. 22957// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 22958// error will be non-nil. Any non-2xx status code is an error. Response 22959// headers are in either 22960// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 22961// or (if a response was returned at all) in 22962// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22963// whether the returned error was because http.StatusNotModified was 22964// returned. 22965func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 22966 gensupport.SetOptions(c.urlParams_, opts...) 22967 res, err := c.doRequest("json") 22968 if res != nil && res.StatusCode == http.StatusNotModified { 22969 if res.Body != nil { 22970 res.Body.Close() 22971 } 22972 return nil, &googleapi.Error{ 22973 Code: res.StatusCode, 22974 Header: res.Header, 22975 } 22976 } 22977 if err != nil { 22978 return nil, err 22979 } 22980 defer googleapi.CloseBody(res) 22981 if err := googleapi.CheckResponse(res); err != nil { 22982 return nil, err 22983 } 22984 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 22985 ServerResponse: googleapi.ServerResponse{ 22986 Header: res.Header, 22987 HTTPStatusCode: res.StatusCode, 22988 }, 22989 } 22990 target := &ret 22991 if err := gensupport.DecodeResponse(target, res); err != nil { 22992 return nil, err 22993 } 22994 return ret, nil 22995 // { 22996 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22997 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 22998 // "httpMethod": "GET", 22999 // "id": "dlp.projects.storedInfoTypes.list", 23000 // "parameterOrder": [ 23001 // "parent" 23002 // ], 23003 // "parameters": { 23004 // "locationId": { 23005 // "description": "Deprecated. This field has no effect.", 23006 // "location": "query", 23007 // "type": "string" 23008 // }, 23009 // "orderBy": { 23010 // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", 23011 // "location": "query", 23012 // "type": "string" 23013 // }, 23014 // "pageSize": { 23015 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 23016 // "format": "int32", 23017 // "location": "query", 23018 // "type": "integer" 23019 // }, 23020 // "pageToken": { 23021 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 23022 // "location": "query", 23023 // "type": "string" 23024 // }, 23025 // "parent": { 23026 // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", 23027 // "location": "path", 23028 // "pattern": "^projects/[^/]+$", 23029 // "required": true, 23030 // "type": "string" 23031 // } 23032 // }, 23033 // "path": "v2/{+parent}/storedInfoTypes", 23034 // "response": { 23035 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 23036 // }, 23037 // "scopes": [ 23038 // "https://www.googleapis.com/auth/cloud-platform" 23039 // ] 23040 // } 23041 23042} 23043 23044// Pages invokes f for each page of results. 23045// A non-nil error returned from f will halt the iteration. 23046// The provided context supersedes any context provided to the Context method. 23047func (c *ProjectsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 23048 c.ctx_ = ctx 23049 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23050 for { 23051 x, err := c.Do() 23052 if err != nil { 23053 return err 23054 } 23055 if err := f(x); err != nil { 23056 return err 23057 } 23058 if x.NextPageToken == "" { 23059 return nil 23060 } 23061 c.PageToken(x.NextPageToken) 23062 } 23063} 23064 23065// method id "dlp.projects.storedInfoTypes.patch": 23066 23067type ProjectsStoredInfoTypesPatchCall struct { 23068 s *Service 23069 name string 23070 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 23071 urlParams_ gensupport.URLParams 23072 ctx_ context.Context 23073 header_ http.Header 23074} 23075 23076// Patch: Updates the stored infoType by creating a new version. The 23077// existing version will continue to be used until the new version is 23078// ready. See 23079// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 23080// more. 23081func (r *ProjectsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsStoredInfoTypesPatchCall { 23082 c := &ProjectsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23083 c.name = name 23084 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 23085 return c 23086} 23087 23088// Fields allows partial responses to be retrieved. See 23089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23090// for more information. 23091func (c *ProjectsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesPatchCall { 23092 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23093 return c 23094} 23095 23096// Context sets the context to be used in this call's Do method. Any 23097// pending HTTP request will be aborted if the provided context is 23098// canceled. 23099func (c *ProjectsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsStoredInfoTypesPatchCall { 23100 c.ctx_ = ctx 23101 return c 23102} 23103 23104// Header returns an http.Header that can be modified by the caller to 23105// add HTTP headers to the request. 23106func (c *ProjectsStoredInfoTypesPatchCall) Header() http.Header { 23107 if c.header_ == nil { 23108 c.header_ = make(http.Header) 23109 } 23110 return c.header_ 23111} 23112 23113func (c *ProjectsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 23114 reqHeaders := make(http.Header) 23115 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 23116 for k, v := range c.header_ { 23117 reqHeaders[k] = v 23118 } 23119 reqHeaders.Set("User-Agent", c.s.userAgent()) 23120 var body io.Reader = nil 23121 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 23122 if err != nil { 23123 return nil, err 23124 } 23125 reqHeaders.Set("Content-Type", "application/json") 23126 c.urlParams_.Set("alt", alt) 23127 c.urlParams_.Set("prettyPrint", "false") 23128 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 23129 urls += "?" + c.urlParams_.Encode() 23130 req, err := http.NewRequest("PATCH", urls, body) 23131 if err != nil { 23132 return nil, err 23133 } 23134 req.Header = reqHeaders 23135 googleapi.Expand(req.URL, map[string]string{ 23136 "name": c.name, 23137 }) 23138 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23139} 23140 23141// Do executes the "dlp.projects.storedInfoTypes.patch" call. 23142// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 23143// non-nil. Any non-2xx status code is an error. Response headers are in 23144// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 23145// a response was returned at all) in error.(*googleapi.Error).Header. 23146// Use googleapi.IsNotModified to check whether the returned error was 23147// because http.StatusNotModified was returned. 23148func (c *ProjectsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 23149 gensupport.SetOptions(c.urlParams_, opts...) 23150 res, err := c.doRequest("json") 23151 if res != nil && res.StatusCode == http.StatusNotModified { 23152 if res.Body != nil { 23153 res.Body.Close() 23154 } 23155 return nil, &googleapi.Error{ 23156 Code: res.StatusCode, 23157 Header: res.Header, 23158 } 23159 } 23160 if err != nil { 23161 return nil, err 23162 } 23163 defer googleapi.CloseBody(res) 23164 if err := googleapi.CheckResponse(res); err != nil { 23165 return nil, err 23166 } 23167 ret := &GooglePrivacyDlpV2StoredInfoType{ 23168 ServerResponse: googleapi.ServerResponse{ 23169 Header: res.Header, 23170 HTTPStatusCode: res.StatusCode, 23171 }, 23172 } 23173 target := &ret 23174 if err := gensupport.DecodeResponse(target, res); err != nil { 23175 return nil, err 23176 } 23177 return ret, nil 23178 // { 23179 // "description": "Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 23180 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 23181 // "httpMethod": "PATCH", 23182 // "id": "dlp.projects.storedInfoTypes.patch", 23183 // "parameterOrder": [ 23184 // "name" 23185 // ], 23186 // "parameters": { 23187 // "name": { 23188 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 23189 // "location": "path", 23190 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 23191 // "required": true, 23192 // "type": "string" 23193 // } 23194 // }, 23195 // "path": "v2/{+name}", 23196 // "request": { 23197 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 23198 // }, 23199 // "response": { 23200 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 23201 // }, 23202 // "scopes": [ 23203 // "https://www.googleapis.com/auth/cloud-platform" 23204 // ] 23205 // } 23206 23207} 23208