1// Copyright 2021 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 // See, edit, configure, and delete your Google Cloud data and see the 85 // email address for your Google Account. 86 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 87) 88 89// NewService creates a new Service. 90func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 91 scopesOption := option.WithScopes( 92 "https://www.googleapis.com/auth/cloud-platform", 93 ) 94 // NOTE: prepend, so we don't override user-specified scopes. 95 opts = append([]option.ClientOption{scopesOption}, opts...) 96 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 97 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 98 client, endpoint, err := htransport.NewClient(ctx, opts...) 99 if err != nil { 100 return nil, err 101 } 102 s, err := New(client) 103 if err != nil { 104 return nil, err 105 } 106 if endpoint != "" { 107 s.BasePath = endpoint 108 } 109 return s, nil 110} 111 112// New creates a new Service. It uses the provided http.Client for requests. 113// 114// Deprecated: please use NewService instead. 115// To provide a custom HTTP client, use option.WithHTTPClient. 116// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 117func New(client *http.Client) (*Service, error) { 118 if client == nil { 119 return nil, errors.New("client is nil") 120 } 121 s := &Service{client: client, BasePath: basePath} 122 s.InfoTypes = NewInfoTypesService(s) 123 s.Locations = NewLocationsService(s) 124 s.Organizations = NewOrganizationsService(s) 125 s.Projects = NewProjectsService(s) 126 return s, nil 127} 128 129type Service struct { 130 client *http.Client 131 BasePath string // API endpoint base URL 132 UserAgent string // optional additional User-Agent fragment 133 134 InfoTypes *InfoTypesService 135 136 Locations *LocationsService 137 138 Organizations *OrganizationsService 139 140 Projects *ProjectsService 141} 142 143func (s *Service) userAgent() string { 144 if s.UserAgent == "" { 145 return googleapi.UserAgent 146 } 147 return googleapi.UserAgent + " " + s.UserAgent 148} 149 150func NewInfoTypesService(s *Service) *InfoTypesService { 151 rs := &InfoTypesService{s: s} 152 return rs 153} 154 155type InfoTypesService struct { 156 s *Service 157} 158 159func NewLocationsService(s *Service) *LocationsService { 160 rs := &LocationsService{s: s} 161 rs.InfoTypes = NewLocationsInfoTypesService(s) 162 return rs 163} 164 165type LocationsService struct { 166 s *Service 167 168 InfoTypes *LocationsInfoTypesService 169} 170 171func NewLocationsInfoTypesService(s *Service) *LocationsInfoTypesService { 172 rs := &LocationsInfoTypesService{s: s} 173 return rs 174} 175 176type LocationsInfoTypesService struct { 177 s *Service 178} 179 180func NewOrganizationsService(s *Service) *OrganizationsService { 181 rs := &OrganizationsService{s: s} 182 rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s) 183 rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s) 184 rs.Locations = NewOrganizationsLocationsService(s) 185 rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s) 186 return rs 187} 188 189type OrganizationsService struct { 190 s *Service 191 192 DeidentifyTemplates *OrganizationsDeidentifyTemplatesService 193 194 InspectTemplates *OrganizationsInspectTemplatesService 195 196 Locations *OrganizationsLocationsService 197 198 StoredInfoTypes *OrganizationsStoredInfoTypesService 199} 200 201func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService { 202 rs := &OrganizationsDeidentifyTemplatesService{s: s} 203 return rs 204} 205 206type OrganizationsDeidentifyTemplatesService struct { 207 s *Service 208} 209 210func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService { 211 rs := &OrganizationsInspectTemplatesService{s: s} 212 return rs 213} 214 215type OrganizationsInspectTemplatesService struct { 216 s *Service 217} 218 219func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { 220 rs := &OrganizationsLocationsService{s: s} 221 rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) 222 rs.DlpJobs = NewOrganizationsLocationsDlpJobsService(s) 223 rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s) 224 rs.JobTriggers = NewOrganizationsLocationsJobTriggersService(s) 225 rs.StoredInfoTypes = NewOrganizationsLocationsStoredInfoTypesService(s) 226 return rs 227} 228 229type OrganizationsLocationsService struct { 230 s *Service 231 232 DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService 233 234 DlpJobs *OrganizationsLocationsDlpJobsService 235 236 InspectTemplates *OrganizationsLocationsInspectTemplatesService 237 238 JobTriggers *OrganizationsLocationsJobTriggersService 239 240 StoredInfoTypes *OrganizationsLocationsStoredInfoTypesService 241} 242 243func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService { 244 rs := &OrganizationsLocationsDeidentifyTemplatesService{s: s} 245 return rs 246} 247 248type OrganizationsLocationsDeidentifyTemplatesService struct { 249 s *Service 250} 251 252func NewOrganizationsLocationsDlpJobsService(s *Service) *OrganizationsLocationsDlpJobsService { 253 rs := &OrganizationsLocationsDlpJobsService{s: s} 254 return rs 255} 256 257type OrganizationsLocationsDlpJobsService struct { 258 s *Service 259} 260 261func NewOrganizationsLocationsInspectTemplatesService(s *Service) *OrganizationsLocationsInspectTemplatesService { 262 rs := &OrganizationsLocationsInspectTemplatesService{s: s} 263 return rs 264} 265 266type OrganizationsLocationsInspectTemplatesService struct { 267 s *Service 268} 269 270func NewOrganizationsLocationsJobTriggersService(s *Service) *OrganizationsLocationsJobTriggersService { 271 rs := &OrganizationsLocationsJobTriggersService{s: s} 272 return rs 273} 274 275type OrganizationsLocationsJobTriggersService struct { 276 s *Service 277} 278 279func NewOrganizationsLocationsStoredInfoTypesService(s *Service) *OrganizationsLocationsStoredInfoTypesService { 280 rs := &OrganizationsLocationsStoredInfoTypesService{s: s} 281 return rs 282} 283 284type OrganizationsLocationsStoredInfoTypesService struct { 285 s *Service 286} 287 288func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService { 289 rs := &OrganizationsStoredInfoTypesService{s: s} 290 return rs 291} 292 293type OrganizationsStoredInfoTypesService struct { 294 s *Service 295} 296 297func NewProjectsService(s *Service) *ProjectsService { 298 rs := &ProjectsService{s: s} 299 rs.Content = NewProjectsContentService(s) 300 rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s) 301 rs.DlpJobs = NewProjectsDlpJobsService(s) 302 rs.Image = NewProjectsImageService(s) 303 rs.InspectTemplates = NewProjectsInspectTemplatesService(s) 304 rs.JobTriggers = NewProjectsJobTriggersService(s) 305 rs.Locations = NewProjectsLocationsService(s) 306 rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s) 307 return rs 308} 309 310type ProjectsService struct { 311 s *Service 312 313 Content *ProjectsContentService 314 315 DeidentifyTemplates *ProjectsDeidentifyTemplatesService 316 317 DlpJobs *ProjectsDlpJobsService 318 319 Image *ProjectsImageService 320 321 InspectTemplates *ProjectsInspectTemplatesService 322 323 JobTriggers *ProjectsJobTriggersService 324 325 Locations *ProjectsLocationsService 326 327 StoredInfoTypes *ProjectsStoredInfoTypesService 328} 329 330func NewProjectsContentService(s *Service) *ProjectsContentService { 331 rs := &ProjectsContentService{s: s} 332 return rs 333} 334 335type ProjectsContentService struct { 336 s *Service 337} 338 339func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService { 340 rs := &ProjectsDeidentifyTemplatesService{s: s} 341 return rs 342} 343 344type ProjectsDeidentifyTemplatesService struct { 345 s *Service 346} 347 348func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService { 349 rs := &ProjectsDlpJobsService{s: s} 350 return rs 351} 352 353type ProjectsDlpJobsService struct { 354 s *Service 355} 356 357func NewProjectsImageService(s *Service) *ProjectsImageService { 358 rs := &ProjectsImageService{s: s} 359 return rs 360} 361 362type ProjectsImageService struct { 363 s *Service 364} 365 366func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService { 367 rs := &ProjectsInspectTemplatesService{s: s} 368 return rs 369} 370 371type ProjectsInspectTemplatesService struct { 372 s *Service 373} 374 375func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService { 376 rs := &ProjectsJobTriggersService{s: s} 377 return rs 378} 379 380type ProjectsJobTriggersService struct { 381 s *Service 382} 383 384func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 385 rs := &ProjectsLocationsService{s: s} 386 rs.Content = NewProjectsLocationsContentService(s) 387 rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) 388 rs.DlpJobs = NewProjectsLocationsDlpJobsService(s) 389 rs.Image = NewProjectsLocationsImageService(s) 390 rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s) 391 rs.JobTriggers = NewProjectsLocationsJobTriggersService(s) 392 rs.StoredInfoTypes = NewProjectsLocationsStoredInfoTypesService(s) 393 return rs 394} 395 396type ProjectsLocationsService struct { 397 s *Service 398 399 Content *ProjectsLocationsContentService 400 401 DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService 402 403 DlpJobs *ProjectsLocationsDlpJobsService 404 405 Image *ProjectsLocationsImageService 406 407 InspectTemplates *ProjectsLocationsInspectTemplatesService 408 409 JobTriggers *ProjectsLocationsJobTriggersService 410 411 StoredInfoTypes *ProjectsLocationsStoredInfoTypesService 412} 413 414func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { 415 rs := &ProjectsLocationsContentService{s: s} 416 return rs 417} 418 419type ProjectsLocationsContentService struct { 420 s *Service 421} 422 423func NewProjectsLocationsDeidentifyTemplatesService(s *Service) *ProjectsLocationsDeidentifyTemplatesService { 424 rs := &ProjectsLocationsDeidentifyTemplatesService{s: s} 425 return rs 426} 427 428type ProjectsLocationsDeidentifyTemplatesService struct { 429 s *Service 430} 431 432func NewProjectsLocationsDlpJobsService(s *Service) *ProjectsLocationsDlpJobsService { 433 rs := &ProjectsLocationsDlpJobsService{s: s} 434 return rs 435} 436 437type ProjectsLocationsDlpJobsService struct { 438 s *Service 439} 440 441func NewProjectsLocationsImageService(s *Service) *ProjectsLocationsImageService { 442 rs := &ProjectsLocationsImageService{s: s} 443 return rs 444} 445 446type ProjectsLocationsImageService struct { 447 s *Service 448} 449 450func NewProjectsLocationsInspectTemplatesService(s *Service) *ProjectsLocationsInspectTemplatesService { 451 rs := &ProjectsLocationsInspectTemplatesService{s: s} 452 return rs 453} 454 455type ProjectsLocationsInspectTemplatesService struct { 456 s *Service 457} 458 459func NewProjectsLocationsJobTriggersService(s *Service) *ProjectsLocationsJobTriggersService { 460 rs := &ProjectsLocationsJobTriggersService{s: s} 461 return rs 462} 463 464type ProjectsLocationsJobTriggersService struct { 465 s *Service 466} 467 468func NewProjectsLocationsStoredInfoTypesService(s *Service) *ProjectsLocationsStoredInfoTypesService { 469 rs := &ProjectsLocationsStoredInfoTypesService{s: s} 470 return rs 471} 472 473type ProjectsLocationsStoredInfoTypesService struct { 474 s *Service 475} 476 477func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService { 478 rs := &ProjectsStoredInfoTypesService{s: s} 479 return rs 480} 481 482type ProjectsStoredInfoTypesService struct { 483 s *Service 484} 485 486// GooglePrivacyDlpV2Action: A task to execute on the completion of a 487// job. See https://cloud.google.com/dlp/docs/concepts-actions to learn 488// more. 489type GooglePrivacyDlpV2Action struct { 490 // JobNotificationEmails: Enable email notification for project owners 491 // and editors on job's completion/failure. 492 JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` 493 494 // PubSub: Publish a notification to a pubsub topic. 495 PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"` 496 497 // PublishFindingsToCloudDataCatalog: Publish findings to Cloud Datahub. 498 PublishFindingsToCloudDataCatalog *GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog `json:"publishFindingsToCloudDataCatalog,omitempty"` 499 500 // PublishSummaryToCscc: Publish summary to Cloud Security Command 501 // Center (Alpha). 502 PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"` 503 504 // PublishToStackdriver: Enable Stackdriver metric 505 // dlp.googleapis.com/finding_count. 506 PublishToStackdriver *GooglePrivacyDlpV2PublishToStackdriver `json:"publishToStackdriver,omitempty"` 507 508 // SaveFindings: Save resulting findings in a provided location. 509 SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"` 510 511 // ForceSendFields is a list of field names (e.g. 512 // "JobNotificationEmails") to unconditionally include in API requests. 513 // By default, fields with empty or default values are omitted from API 514 // requests. However, any non-pointer, non-interface field appearing in 515 // ForceSendFields will be sent to the server regardless of whether the 516 // field is empty or not. This may be used to include empty fields in 517 // Patch requests. 518 ForceSendFields []string `json:"-"` 519 520 // NullFields is a list of field names (e.g. "JobNotificationEmails") to 521 // include in API requests with the JSON null value. By default, fields 522 // with empty values are omitted from API requests. However, any field 523 // with an empty value appearing in NullFields will be sent to the 524 // server as null. It is an error if a field in this list has a 525 // non-empty value. This may be used to include null fields in Patch 526 // requests. 527 NullFields []string `json:"-"` 528} 529 530func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) { 531 type NoMethod GooglePrivacyDlpV2Action 532 raw := NoMethod(*s) 533 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 534} 535 536// GooglePrivacyDlpV2ActivateJobTriggerRequest: Request message for 537// ActivateJobTrigger. 538type GooglePrivacyDlpV2ActivateJobTriggerRequest struct { 539} 540 541// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk 542// analysis operation request. 543type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct { 544 // CategoricalStatsResult: Categorical stats result 545 CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` 546 547 // DeltaPresenceEstimationResult: Delta-presence result 548 DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"` 549 550 // KAnonymityResult: K-anonymity result 551 KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"` 552 553 // KMapEstimationResult: K-map result 554 KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"` 555 556 // LDiversityResult: L-divesity result 557 LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"` 558 559 // NumericalStatsResult: Numerical stats result 560 NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"` 561 562 // RequestedOptions: The configuration used for this job. 563 RequestedOptions *GooglePrivacyDlpV2RequestedRiskAnalysisOptions `json:"requestedOptions,omitempty"` 564 565 // RequestedPrivacyMetric: Privacy metric to compute. 566 RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` 567 568 // RequestedSourceTable: Input dataset to compute metrics over. 569 RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"` 570 571 // ForceSendFields is a list of field names (e.g. 572 // "CategoricalStatsResult") to unconditionally include in API requests. 573 // By default, fields with empty or default values are omitted from API 574 // requests. However, any non-pointer, non-interface field appearing in 575 // ForceSendFields will be sent to the server regardless of whether the 576 // field is empty or not. This may be used to include empty fields in 577 // Patch requests. 578 ForceSendFields []string `json:"-"` 579 580 // NullFields is a list of field names (e.g. "CategoricalStatsResult") 581 // to include in API requests with the JSON null value. By default, 582 // fields with empty values are omitted from API requests. However, any 583 // field with an empty value appearing in NullFields will be sent to the 584 // server as null. It is an error if a field in this list has a 585 // non-empty value. This may be used to include null fields in Patch 586 // requests. 587 NullFields []string `json:"-"` 588} 589 590func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) { 591 type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails 592 raw := NoMethod(*s) 593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 594} 595 596// GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains 597// statistical information on the relative frequency of different 598// quasi-identifiers values. It has one or several quasi-identifiers 599// columns, and one column that indicates the relative frequency of each 600// quasi-identifier tuple. If a tuple is present in the data but not in 601// the auxiliary table, the corresponding relative frequency is assumed 602// to be zero (and thus, the tuple is highly reidentifiable). 603type GooglePrivacyDlpV2AuxiliaryTable struct { 604 // QuasiIds: Required. Quasi-identifier columns. 605 QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"` 606 607 // RelativeFrequency: Required. The relative frequency column must 608 // contain a floating-point number between 0 and 1 (inclusive). Null 609 // values are assumed to be zero. 610 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 611 612 // Table: Required. Auxiliary table location. 613 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 614 615 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 616 // unconditionally include in API requests. By default, fields with 617 // empty or default values are omitted from API requests. However, any 618 // non-pointer, non-interface field appearing in ForceSendFields will be 619 // sent to the server regardless of whether the field is empty or not. 620 // This may be used to include empty fields in Patch requests. 621 ForceSendFields []string `json:"-"` 622 623 // NullFields is a list of field names (e.g. "QuasiIds") to include in 624 // API requests with the JSON null value. By default, fields with empty 625 // values are omitted from API requests. However, any field with an 626 // empty value appearing in NullFields will be sent to the server as 627 // null. It is an error if a field in this list has a non-empty value. 628 // This may be used to include null fields in Patch requests. 629 NullFields []string `json:"-"` 630} 631 632func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) { 633 type NoMethod GooglePrivacyDlpV2AuxiliaryTable 634 raw := NoMethod(*s) 635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 636} 637 638// GooglePrivacyDlpV2BigQueryField: Message defining a field of a 639// BigQuery table. 640type GooglePrivacyDlpV2BigQueryField struct { 641 // Field: Designated field in the BigQuery table. 642 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 643 644 // Table: Source table of the field. 645 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 646 647 // ForceSendFields is a list of field names (e.g. "Field") to 648 // unconditionally include in API requests. By default, fields with 649 // empty or default values are omitted from API requests. However, any 650 // non-pointer, non-interface field appearing in ForceSendFields will be 651 // sent to the server regardless of whether the field is empty or not. 652 // This may be used to include empty fields in Patch requests. 653 ForceSendFields []string `json:"-"` 654 655 // NullFields is a list of field names (e.g. "Field") to include in API 656 // requests with the JSON null value. By default, fields with empty 657 // values are omitted from API requests. However, any field with an 658 // empty value appearing in NullFields will be sent to the server as 659 // null. It is an error if a field in this list has a non-empty value. 660 // This may be used to include null fields in Patch requests. 661 NullFields []string `json:"-"` 662} 663 664func (s *GooglePrivacyDlpV2BigQueryField) MarshalJSON() ([]byte, error) { 665 type NoMethod GooglePrivacyDlpV2BigQueryField 666 raw := NoMethod(*s) 667 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 668} 669 670// GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in 671// BigQuery table. 672type GooglePrivacyDlpV2BigQueryKey struct { 673 // RowNumber: Row number inferred at the time the table was scanned. 674 // This value is nondeterministic, cannot be queried, and may be null 675 // for inspection jobs. To locate findings within a table, specify 676 // `inspect_job.storage_config.big_query_options.identifying_fields` in 677 // `CreateDlpJobRequest`. 678 RowNumber int64 `json:"rowNumber,omitempty,string"` 679 680 // TableReference: Complete BigQuery table reference. 681 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 682 683 // ForceSendFields is a list of field names (e.g. "RowNumber") to 684 // unconditionally include in API requests. By default, fields with 685 // empty or default values are omitted from API requests. However, any 686 // non-pointer, non-interface field appearing in ForceSendFields will be 687 // sent to the server regardless of whether the field is empty or not. 688 // This may be used to include empty fields in Patch requests. 689 ForceSendFields []string `json:"-"` 690 691 // NullFields is a list of field names (e.g. "RowNumber") to include in 692 // API requests with the JSON null value. By default, fields with empty 693 // values are omitted from API requests. However, any field with an 694 // empty value appearing in NullFields will be sent to the server as 695 // null. It is an error if a field in this list has a non-empty value. 696 // This may be used to include null fields in Patch requests. 697 NullFields []string `json:"-"` 698} 699 700func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) { 701 type NoMethod GooglePrivacyDlpV2BigQueryKey 702 raw := NoMethod(*s) 703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 704} 705 706// GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table 707// and row identifiers. 708type GooglePrivacyDlpV2BigQueryOptions struct { 709 // ExcludedFields: References to fields excluded from scanning. This 710 // allows you to skip inspection of entire columns which you know have 711 // no findings. 712 ExcludedFields []*GooglePrivacyDlpV2FieldId `json:"excludedFields,omitempty"` 713 714 // IdentifyingFields: Table fields that may uniquely identify a row 715 // within the table. When `actions.saveFindings.outputConfig.table` is 716 // specified, the values of columns specified here are available in the 717 // output table under 718 // `location.content_locations.record_location.record_key.id_values`. 719 // Nested fields such as `person.birthdate.year` are allowed. 720 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 721 722 // RowsLimit: Max number of rows to scan. If the table has more rows 723 // than this value, the rest of the rows are omitted. If not set, or if 724 // set to 0, all rows will be scanned. Only one of rows_limit and 725 // rows_limit_percent can be specified. Cannot be used in conjunction 726 // with TimespanConfig. 727 RowsLimit int64 `json:"rowsLimit,omitempty,string"` 728 729 // RowsLimitPercent: Max percentage of rows to scan. The rest are 730 // omitted. The number of rows scanned is rounded down. Must be between 731 // 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. 732 // Only one of rows_limit and rows_limit_percent can be specified. 733 // Cannot be used in conjunction with TimespanConfig. 734 RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"` 735 736 // Possible values: 737 // "SAMPLE_METHOD_UNSPECIFIED" 738 // "TOP" - Scan groups of rows in the order BigQuery provides 739 // (default). Multiple groups of rows may be scanned in parallel, so 740 // results may not appear in the same order the rows are read. 741 // "RANDOM_START" - Randomly pick groups of rows to scan. 742 SampleMethod string `json:"sampleMethod,omitempty"` 743 744 // TableReference: Complete BigQuery table reference. 745 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 746 747 // ForceSendFields is a list of field names (e.g. "ExcludedFields") to 748 // unconditionally include in API requests. By default, fields with 749 // empty or default values are omitted from API requests. However, any 750 // non-pointer, non-interface field appearing in ForceSendFields will be 751 // sent to the server regardless of whether the field is empty or not. 752 // This may be used to include empty fields in Patch requests. 753 ForceSendFields []string `json:"-"` 754 755 // NullFields is a list of field names (e.g. "ExcludedFields") to 756 // include in API requests with the JSON null value. By default, fields 757 // with empty values are omitted from API requests. However, any field 758 // with an empty value appearing in NullFields will be sent to the 759 // server as null. It is an error if a field in this list has a 760 // non-empty value. This may be used to include null fields in Patch 761 // requests. 762 NullFields []string `json:"-"` 763} 764 765func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) { 766 type NoMethod GooglePrivacyDlpV2BigQueryOptions 767 raw := NoMethod(*s) 768 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 769} 770 771// GooglePrivacyDlpV2BigQueryTable: Message defining the location of a 772// BigQuery table. A table is uniquely identified by its project_id, 773// dataset_id, and table_name. Within a query a table is often 774// referenced with a string in the format of: `:.` or `..`. 775type GooglePrivacyDlpV2BigQueryTable struct { 776 // DatasetId: Dataset ID of the table. 777 DatasetId string `json:"datasetId,omitempty"` 778 779 // ProjectId: The Google Cloud Platform project ID of the project 780 // containing the table. If omitted, project ID is inferred from the API 781 // call. 782 ProjectId string `json:"projectId,omitempty"` 783 784 // TableId: Name of the table. 785 TableId string `json:"tableId,omitempty"` 786 787 // ForceSendFields is a list of field names (e.g. "DatasetId") to 788 // unconditionally include in API requests. By default, fields with 789 // empty or default values are omitted from API requests. However, any 790 // non-pointer, non-interface field appearing in ForceSendFields will be 791 // sent to the server regardless of whether the field is empty or not. 792 // This may be used to include empty fields in Patch requests. 793 ForceSendFields []string `json:"-"` 794 795 // NullFields is a list of field names (e.g. "DatasetId") to include in 796 // API requests with the JSON null value. By default, fields with empty 797 // values are omitted from API requests. However, any field with an 798 // empty value appearing in NullFields will be sent to the server as 799 // null. It is an error if a field in this list has a non-empty value. 800 // This may be used to include null fields in Patch requests. 801 NullFields []string `json:"-"` 802} 803 804func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) { 805 type NoMethod GooglePrivacyDlpV2BigQueryTable 806 raw := NoMethod(*s) 807 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 808} 809 810// GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected 811// text within an image. 812type GooglePrivacyDlpV2BoundingBox struct { 813 // Height: Height of the bounding box in pixels. 814 Height int64 `json:"height,omitempty"` 815 816 // Left: Left coordinate of the bounding box. (0,0) is upper left. 817 Left int64 `json:"left,omitempty"` 818 819 // Top: Top coordinate of the bounding box. (0,0) is upper left. 820 Top int64 `json:"top,omitempty"` 821 822 // Width: Width of the bounding box in pixels. 823 Width int64 `json:"width,omitempty"` 824 825 // ForceSendFields is a list of field names (e.g. "Height") to 826 // unconditionally include in API requests. By default, fields with 827 // empty or default values are omitted from API requests. However, any 828 // non-pointer, non-interface field appearing in ForceSendFields will be 829 // sent to the server regardless of whether the field is empty or not. 830 // This may be used to include empty fields in Patch requests. 831 ForceSendFields []string `json:"-"` 832 833 // NullFields is a list of field names (e.g. "Height") to include in API 834 // requests with the JSON null value. By default, fields with empty 835 // values are omitted from API requests. However, any field with an 836 // empty value appearing in NullFields will be sent to the server as 837 // null. It is an error if a field in this list has a non-empty value. 838 // This may be used to include null fields in Patch requests. 839 NullFields []string `json:"-"` 840} 841 842func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) { 843 type NoMethod GooglePrivacyDlpV2BoundingBox 844 raw := NoMethod(*s) 845 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 846} 847 848// GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along 849// with replacement values. 850type GooglePrivacyDlpV2Bucket struct { 851 // Max: Upper bound of the range, exclusive; type must match min. 852 Max *GooglePrivacyDlpV2Value `json:"max,omitempty"` 853 854 // Min: Lower bound of the range, inclusive. Type should be the same as 855 // max if used. 856 Min *GooglePrivacyDlpV2Value `json:"min,omitempty"` 857 858 // ReplacementValue: Required. Replacement value for this bucket. 859 ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"` 860 861 // ForceSendFields is a list of field names (e.g. "Max") to 862 // unconditionally include in API requests. By default, fields with 863 // empty or default values are omitted from API requests. However, any 864 // non-pointer, non-interface field appearing in ForceSendFields will be 865 // sent to the server regardless of whether the field is empty or not. 866 // This may be used to include empty fields in Patch requests. 867 ForceSendFields []string `json:"-"` 868 869 // NullFields is a list of field names (e.g. "Max") to include in API 870 // requests with the JSON null value. By default, fields with empty 871 // values are omitted from API requests. However, any field with an 872 // empty value appearing in NullFields will be sent to the server as 873 // null. It is an error if a field in this list has a non-empty value. 874 // This may be used to include null fields in Patch requests. 875 NullFields []string `json:"-"` 876} 877 878func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) { 879 type NoMethod GooglePrivacyDlpV2Bucket 880 raw := NoMethod(*s) 881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 882} 883 884// GooglePrivacyDlpV2BucketingConfig: Generalization function that 885// buckets values based on ranges. The ranges and replacement values are 886// dynamically provided by the user for custom behavior, such as 1-30 -> 887// LOW 31-65 -> MEDIUM 66-100 -> HIGH This can be used on data of type: 888// number, long, string, timestamp. If the bound `Value` type differs 889// from the type of data being transformed, we will first attempt 890// converting the type of the data to be transformed to match the type 891// of the bound before comparing. See 892// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 893type GooglePrivacyDlpV2BucketingConfig struct { 894 // Buckets: Set of buckets. Ranges must be non-overlapping. 895 Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"` 896 897 // ForceSendFields is a list of field names (e.g. "Buckets") to 898 // unconditionally include in API requests. By default, fields with 899 // empty or default values are omitted from API requests. However, any 900 // non-pointer, non-interface field appearing in ForceSendFields will be 901 // sent to the server regardless of whether the field is empty or not. 902 // This may be used to include empty fields in Patch requests. 903 ForceSendFields []string `json:"-"` 904 905 // NullFields is a list of field names (e.g. "Buckets") to include in 906 // API requests with the JSON null value. By default, fields with empty 907 // values are omitted from API requests. However, any field with an 908 // empty value appearing in NullFields will be sent to the server as 909 // null. It is an error if a field in this list has a non-empty value. 910 // This may be used to include null fields in Patch requests. 911 NullFields []string `json:"-"` 912} 913 914func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) { 915 type NoMethod GooglePrivacyDlpV2BucketingConfig 916 raw := NoMethod(*s) 917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 918} 919 920// GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or 921// redact. 922type GooglePrivacyDlpV2ByteContentItem struct { 923 // Data: Content data to inspect or redact. 924 Data string `json:"data,omitempty"` 925 926 // Type: The type of data stored in the bytes string. Default will be 927 // TEXT_UTF8. 928 // 929 // Possible values: 930 // "BYTES_TYPE_UNSPECIFIED" - Unused 931 // "IMAGE" - Any image type. 932 // "IMAGE_JPEG" - jpeg 933 // "IMAGE_BMP" - bmp 934 // "IMAGE_PNG" - png 935 // "IMAGE_SVG" - svg 936 // "TEXT_UTF8" - plain text 937 // "WORD_DOCUMENT" - docx, docm, dotx, dotm 938 // "PDF" - pdf 939 // "AVRO" - avro 940 // "CSV" - csv 941 // "TSV" - tsv 942 Type string `json:"type,omitempty"` 943 944 // ForceSendFields is a list of field names (e.g. "Data") to 945 // unconditionally include in API requests. By default, fields with 946 // empty or default values are omitted from API requests. However, any 947 // non-pointer, non-interface field appearing in ForceSendFields will be 948 // sent to the server regardless of whether the field is empty or not. 949 // This may be used to include empty fields in Patch requests. 950 ForceSendFields []string `json:"-"` 951 952 // NullFields is a list of field names (e.g. "Data") to include in API 953 // requests with the JSON null value. By default, fields with empty 954 // values are omitted from API requests. However, any field with an 955 // empty value appearing in NullFields will be sent to the server as 956 // null. It is an error if a field in this list has a non-empty value. 957 // This may be used to include null fields in Patch requests. 958 NullFields []string `json:"-"` 959} 960 961func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) { 962 type NoMethod GooglePrivacyDlpV2ByteContentItem 963 raw := NoMethod(*s) 964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 965} 966 967// GooglePrivacyDlpV2CancelDlpJobRequest: The request message for 968// canceling a DLP job. 969type GooglePrivacyDlpV2CancelDlpJobRequest struct { 970} 971 972// GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats 973// over an individual column, including number of distinct values and 974// value count distribution. 975type GooglePrivacyDlpV2CategoricalStatsConfig struct { 976 // Field: Field to compute categorical stats on. All column types are 977 // supported except for arrays and structs. However, it may be more 978 // informative to use NumericalStats when the field type is supported, 979 // depending on the data. 980 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 981 982 // ForceSendFields is a list of field names (e.g. "Field") to 983 // unconditionally include in API requests. By default, fields with 984 // empty or default values are omitted from API requests. However, any 985 // non-pointer, non-interface field appearing in ForceSendFields will be 986 // sent to the server regardless of whether the field is empty or not. 987 // This may be used to include empty fields in Patch requests. 988 ForceSendFields []string `json:"-"` 989 990 // NullFields is a list of field names (e.g. "Field") to include in API 991 // requests with the JSON null value. By default, fields with empty 992 // values are omitted from API requests. However, any field with an 993 // empty value appearing in NullFields will be sent to the server as 994 // null. It is an error if a field in this list has a non-empty value. 995 // This may be used to include null fields in Patch requests. 996 NullFields []string `json:"-"` 997} 998 999func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) { 1000 type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig 1001 raw := NoMethod(*s) 1002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1003} 1004 1005// GooglePrivacyDlpV2CategoricalStatsHistogramBucket: Histogram of value 1006// frequencies in the column. 1007type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct { 1008 // BucketSize: Total number of values in this bucket. 1009 BucketSize int64 `json:"bucketSize,omitempty,string"` 1010 1011 // BucketValueCount: Total number of distinct values in this bucket. 1012 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 1013 1014 // BucketValues: Sample of value frequencies in this bucket. The total 1015 // number of values returned per bucket is capped at 20. 1016 BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"` 1017 1018 // ValueFrequencyLowerBound: Lower bound on the value frequency of the 1019 // values in this bucket. 1020 ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` 1021 1022 // ValueFrequencyUpperBound: Upper bound on the value frequency of the 1023 // values in this bucket. 1024 ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` 1025 1026 // ForceSendFields is a list of field names (e.g. "BucketSize") to 1027 // unconditionally include in API requests. By default, fields with 1028 // empty or default values are omitted from API requests. However, any 1029 // non-pointer, non-interface field appearing in ForceSendFields will be 1030 // sent to the server regardless of whether the field is empty or not. 1031 // This may be used to include empty fields in Patch requests. 1032 ForceSendFields []string `json:"-"` 1033 1034 // NullFields is a list of field names (e.g. "BucketSize") to include in 1035 // API requests with the JSON null value. By default, fields with empty 1036 // values are omitted from API requests. However, any field with an 1037 // empty value appearing in NullFields will be sent to the server as 1038 // null. It is an error if a field in this list has a non-empty value. 1039 // This may be used to include null fields in Patch requests. 1040 NullFields []string `json:"-"` 1041} 1042 1043func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { 1044 type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket 1045 raw := NoMethod(*s) 1046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1047} 1048 1049// GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical 1050// stats computation. 1051type GooglePrivacyDlpV2CategoricalStatsResult struct { 1052 // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the 1053 // column. 1054 ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` 1055 1056 // ForceSendFields is a list of field names (e.g. 1057 // "ValueFrequencyHistogramBuckets") to unconditionally include in API 1058 // requests. By default, fields with empty or default values are omitted 1059 // from API requests. However, any non-pointer, non-interface field 1060 // appearing in ForceSendFields will be sent to the server regardless of 1061 // whether the field is empty or not. This may be used to include empty 1062 // fields in Patch requests. 1063 ForceSendFields []string `json:"-"` 1064 1065 // NullFields is a list of field names (e.g. 1066 // "ValueFrequencyHistogramBuckets") to include in API requests with the 1067 // JSON null value. By default, fields with empty values are omitted 1068 // from API requests. However, any field with an empty value appearing 1069 // in NullFields will be sent to the server as null. It is an error if a 1070 // field in this list has a non-empty value. This may be used to include 1071 // null fields in Patch requests. 1072 NullFields []string `json:"-"` 1073} 1074 1075func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) { 1076 type NoMethod GooglePrivacyDlpV2CategoricalStatsResult 1077 raw := NoMethod(*s) 1078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1079} 1080 1081// GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by 1082// replacing a given number of characters with a fixed character. 1083// Masking can start from the beginning or end of the string. This can 1084// be used on data of any type (numbers, longs, and so on) and when 1085// de-identifying structured data we'll attempt to preserve the original 1086// data's type. (This allows you to take a long like 123 and modify it 1087// to a string like **3. 1088type GooglePrivacyDlpV2CharacterMaskConfig struct { 1089 // CharactersToIgnore: When masking a string, items in this list will be 1090 // skipped when replacing characters. For example, if the input string 1091 // is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 1092 // characters with `*`, Cloud DLP returns `***-**5-5555`. 1093 CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"` 1094 1095 // MaskingCharacter: Character to use to mask the sensitive values—for 1096 // example, `*` for an alphabetic string such as a name, or `0` for a 1097 // numeric string such as ZIP code or credit card number. This string 1098 // must have a length of 1. If not supplied, this value defaults to `*` 1099 // for strings, and `0` for digits. 1100 MaskingCharacter string `json:"maskingCharacter,omitempty"` 1101 1102 // NumberToMask: Number of characters to mask. If not set, all matching 1103 // chars will be masked. Skipped characters do not count towards this 1104 // tally. 1105 NumberToMask int64 `json:"numberToMask,omitempty"` 1106 1107 // ReverseOrder: Mask characters in reverse order. For example, if 1108 // `masking_character` is `0`, `number_to_mask` is `14`, and 1109 // `reverse_order` is `false`, then the input string 1110 // `1234-5678-9012-3456` is masked as `00000000000000-3456`. If 1111 // `masking_character` is `*`, `number_to_mask` is `3`, and 1112 // `reverse_order` is `true`, then the string `12345` is masked as 1113 // `12***`. 1114 ReverseOrder bool `json:"reverseOrder,omitempty"` 1115 1116 // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") 1117 // to unconditionally include in API requests. By default, fields with 1118 // empty or default values are omitted from API requests. However, any 1119 // non-pointer, non-interface field appearing in ForceSendFields will be 1120 // sent to the server regardless of whether the field is empty or not. 1121 // This may be used to include empty fields in Patch requests. 1122 ForceSendFields []string `json:"-"` 1123 1124 // NullFields is a list of field names (e.g. "CharactersToIgnore") to 1125 // include in API requests with the JSON null value. By default, fields 1126 // with empty values are omitted from API requests. However, any field 1127 // with an empty value appearing in NullFields will be sent to the 1128 // server as null. It is an error if a field in this list has a 1129 // non-empty value. This may be used to include null fields in Patch 1130 // requests. 1131 NullFields []string `json:"-"` 1132} 1133 1134func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) { 1135 type NoMethod GooglePrivacyDlpV2CharacterMaskConfig 1136 raw := NoMethod(*s) 1137 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1138} 1139 1140// GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing 1141// deidentification of a value. These will be left alone and skipped. 1142type GooglePrivacyDlpV2CharsToIgnore struct { 1143 // CharactersToSkip: Characters to not transform when masking. 1144 CharactersToSkip string `json:"charactersToSkip,omitempty"` 1145 1146 // CommonCharactersToIgnore: Common characters to not transform when 1147 // masking. Useful to avoid removing punctuation. 1148 // 1149 // Possible values: 1150 // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" - Unused. 1151 // "NUMERIC" - 0-9 1152 // "ALPHA_UPPER_CASE" - A-Z 1153 // "ALPHA_LOWER_CASE" - a-z 1154 // "PUNCTUATION" - US Punctuation, one of 1155 // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ 1156 // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] 1157 CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` 1158 1159 // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to 1160 // unconditionally include in API requests. By default, fields with 1161 // empty or default values are omitted from API requests. However, any 1162 // non-pointer, non-interface field appearing in ForceSendFields will be 1163 // sent to the server regardless of whether the field is empty or not. 1164 // This may be used to include empty fields in Patch requests. 1165 ForceSendFields []string `json:"-"` 1166 1167 // NullFields is a list of field names (e.g. "CharactersToSkip") to 1168 // include in API requests with the JSON null value. By default, fields 1169 // with empty values are omitted from API requests. However, any field 1170 // with an empty value appearing in NullFields will be sent to the 1171 // server as null. It is an error if a field in this list has a 1172 // non-empty value. This may be used to include null fields in Patch 1173 // requests. 1174 NullFields []string `json:"-"` 1175} 1176 1177func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) { 1178 type NoMethod GooglePrivacyDlpV2CharsToIgnore 1179 raw := NoMethod(*s) 1180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1181} 1182 1183// GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of 1184// files in Cloud Storage. 1185type GooglePrivacyDlpV2CloudStorageFileSet struct { 1186 // Url: The url, in the format `gs:///`. Trailing wildcard in the path 1187 // is allowed. 1188 Url string `json:"url,omitempty"` 1189 1190 // ForceSendFields is a list of field names (e.g. "Url") to 1191 // unconditionally include in API requests. By default, fields with 1192 // empty or default values are omitted from API requests. However, any 1193 // non-pointer, non-interface field appearing in ForceSendFields will be 1194 // sent to the server regardless of whether the field is empty or not. 1195 // This may be used to include empty fields in Patch requests. 1196 ForceSendFields []string `json:"-"` 1197 1198 // NullFields is a list of field names (e.g. "Url") to include in API 1199 // requests with the JSON null value. By default, fields with empty 1200 // values are omitted from API requests. However, any field with an 1201 // empty value appearing in NullFields will be sent to the server as 1202 // null. It is an error if a field in this list has a non-empty value. 1203 // This may be used to include null fields in Patch requests. 1204 NullFields []string `json:"-"` 1205} 1206 1207func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) { 1208 type NoMethod GooglePrivacyDlpV2CloudStorageFileSet 1209 raw := NoMethod(*s) 1210 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1211} 1212 1213// GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a 1214// set of files within a Google Cloud Storage bucket. 1215type GooglePrivacyDlpV2CloudStorageOptions struct { 1216 // BytesLimitPerFile: Max number of bytes to scan from a file. If a 1217 // scanned file's size is bigger than this value then the rest of the 1218 // bytes are omitted. Only one of bytes_limit_per_file and 1219 // bytes_limit_per_file_percent can be specified. Cannot be set if 1220 // de-identification is requested. 1221 BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` 1222 1223 // BytesLimitPerFilePercent: Max percentage of bytes to scan from a 1224 // file. The rest are omitted. The number of bytes scanned is rounded 1225 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1226 // limit. Defaults to 0. Only one of bytes_limit_per_file and 1227 // bytes_limit_per_file_percent can be specified. Cannot be set if 1228 // de-identification is requested. 1229 BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"` 1230 1231 // FileSet: The set of one or more files to scan. 1232 FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"` 1233 1234 // FileTypes: List of file type groups to include in the scan. If empty, 1235 // all files are scanned and available data format processors are 1236 // applied. In addition, the binary content of the selected files is 1237 // always scanned as well. Images are scanned only as binary if the 1238 // specified region does not support image inspection and no file_types 1239 // were specified. Image inspection is restricted to 'global', 'us', 1240 // 'asia', and 'europe'. 1241 // 1242 // Possible values: 1243 // "FILE_TYPE_UNSPECIFIED" - Includes all files. 1244 // "BINARY_FILE" - Includes all file extensions not covered by another 1245 // entry. Binary scanning attempts to convert the content of the file to 1246 // utf_8 to scan the file. If you wish to avoid this fall back, specify 1247 // one or more of the other FileType's in your storage scan. 1248 // "TEXT_FILE" - Included file extensions: asc,asp, aspx, brf, c, 1249 // cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, dat, dot, eml,, 1250 // epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, mkd, markdown, 1251 // m, ml, mli, perl, pl, plist, pm, php, phtml, pht, properties, py, 1252 // pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, shtml, shtm, 1253 // xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md, txt, text, 1254 // tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml. 1255 // "IMAGE" - Included file extensions: bmp, gif, jpg, jpeg, jpe, png. 1256 // bytes_limit_per_file has no effect on image files. Image inspection 1257 // is restricted to 'global', 'us', 'asia', and 'europe'. 1258 // "WORD" - Word files >30 MB will be scanned as binary files. 1259 // Included file extensions: docx, dotx, docm, dotm 1260 // "PDF" - PDF files >30 MB will be scanned as binary files. Included 1261 // file extensions: pdf 1262 // "AVRO" - Included file extensions: avro 1263 // "CSV" - Included file extensions: csv 1264 // "TSV" - Included file extensions: tsv 1265 FileTypes []string `json:"fileTypes,omitempty"` 1266 1267 // FilesLimitPercent: Limits the number of files to scan to this 1268 // percentage of the input FileSet. Number of files scanned is rounded 1269 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1270 // limit. Defaults to 0. 1271 FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"` 1272 1273 // Possible values: 1274 // "SAMPLE_METHOD_UNSPECIFIED" 1275 // "TOP" - Scan from the top (default). 1276 // "RANDOM_START" - For each file larger than bytes_limit_per_file, 1277 // randomly pick the offset to start scanning. The scanned bytes are 1278 // contiguous. 1279 SampleMethod string `json:"sampleMethod,omitempty"` 1280 1281 // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile") 1282 // to unconditionally include in API requests. By default, fields with 1283 // empty or default values are omitted from API requests. However, any 1284 // non-pointer, non-interface field appearing in ForceSendFields will be 1285 // sent to the server regardless of whether the field is empty or not. 1286 // This may be used to include empty fields in Patch requests. 1287 ForceSendFields []string `json:"-"` 1288 1289 // NullFields is a list of field names (e.g. "BytesLimitPerFile") to 1290 // include in API requests with the JSON null value. By default, fields 1291 // with empty values are omitted from API requests. However, any field 1292 // with an empty value appearing in NullFields will be sent to the 1293 // server as null. It is an error if a field in this list has a 1294 // non-empty value. This may be used to include null fields in Patch 1295 // requests. 1296 NullFields []string `json:"-"` 1297} 1298 1299func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) { 1300 type NoMethod GooglePrivacyDlpV2CloudStorageOptions 1301 raw := NoMethod(*s) 1302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1303} 1304 1305// GooglePrivacyDlpV2CloudStoragePath: Message representing a single 1306// file or path in Cloud Storage. 1307type GooglePrivacyDlpV2CloudStoragePath struct { 1308 // Path: A url representing a file or path (no wildcards) in Cloud 1309 // Storage. Example: gs://[BUCKET_NAME]/dictionary.txt 1310 Path string `json:"path,omitempty"` 1311 1312 // ForceSendFields is a list of field names (e.g. "Path") to 1313 // unconditionally include in API requests. By default, fields with 1314 // empty or default values are omitted from API requests. However, any 1315 // non-pointer, non-interface field appearing in ForceSendFields will be 1316 // sent to the server regardless of whether the field is empty or not. 1317 // This may be used to include empty fields in Patch requests. 1318 ForceSendFields []string `json:"-"` 1319 1320 // NullFields is a list of field names (e.g. "Path") to include in API 1321 // requests with the JSON null value. By default, fields with empty 1322 // values are omitted from API requests. However, any field with an 1323 // empty value appearing in NullFields will be sent to the server as 1324 // null. It is an error if a field in this list has a non-empty value. 1325 // This may be used to include null fields in Patch requests. 1326 NullFields []string `json:"-"` 1327} 1328 1329func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) { 1330 type NoMethod GooglePrivacyDlpV2CloudStoragePath 1331 raw := NoMethod(*s) 1332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1333} 1334 1335// GooglePrivacyDlpV2CloudStorageRegexFileSet: Message representing a 1336// set of files in a Cloud Storage bucket. Regular expressions are used 1337// to allow fine-grained control over which files in the bucket to 1338// include. Included files are those that match at least one item in 1339// `include_regex` and do not match any items in `exclude_regex`. Note 1340// that a file that matches items from both lists will _not_ be 1341// included. For a match to occur, the entire file path (i.e., 1342// everything in the url after the bucket name) must match the regular 1343// expression. For example, given the input `{bucket_name: "mybucket", 1344// include_regex: ["directory1/.*"], exclude_regex: 1345// ["directory1/excluded.*"]}`: * `gs://mybucket/directory1/myfile` will 1346// be included * `gs://mybucket/directory1/directory2/myfile` will be 1347// included (`.*` matches across `/`) * 1348// `gs://mybucket/directory0/directory1/myfile` will _not_ be included 1349// (the full path doesn't match any items in `include_regex`) * 1350// `gs://mybucket/directory1/excludedfile` will _not_ be included (the 1351// path matches an item in `exclude_regex`) If `include_regex` is left 1352// empty, it will match all files by default (this is equivalent to 1353// setting `include_regex: [".*"]`). Some other common use cases: * 1354// `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include 1355// all files in `mybucket` except for .pdf files * `{bucket_name: 1356// "mybucket", include_regex: ["directory/[^/]+"]}` will include all 1357// files directly under `gs://mybucket/directory/`, without matching 1358// across `/` 1359type GooglePrivacyDlpV2CloudStorageRegexFileSet struct { 1360 // BucketName: The name of a Cloud Storage bucket. Required. 1361 BucketName string `json:"bucketName,omitempty"` 1362 1363 // ExcludeRegex: A list of regular expressions matching file paths to 1364 // exclude. All files in the bucket that match at least one of these 1365 // regular expressions will be excluded from the scan. Regular 1366 // expressions use RE2 syntax 1367 // (https://github.com/google/re2/wiki/Syntax); a guide can be found 1368 // under the google/re2 repository on GitHub. 1369 ExcludeRegex []string `json:"excludeRegex,omitempty"` 1370 1371 // IncludeRegex: A list of regular expressions matching file paths to 1372 // include. All files in the bucket that match at least one of these 1373 // regular expressions will be included in the set of files, except for 1374 // those that also match an item in `exclude_regex`. Leaving this field 1375 // empty will match all files by default (this is equivalent to 1376 // including `.*` in the list). Regular expressions use RE2 syntax 1377 // (https://github.com/google/re2/wiki/Syntax); a guide can be found 1378 // under the google/re2 repository on GitHub. 1379 IncludeRegex []string `json:"includeRegex,omitempty"` 1380 1381 // ForceSendFields is a list of field names (e.g. "BucketName") to 1382 // unconditionally include in API requests. By default, fields with 1383 // empty or default values are omitted from API requests. However, any 1384 // non-pointer, non-interface field appearing in ForceSendFields will be 1385 // sent to the server regardless of whether the field is empty or not. 1386 // This may be used to include empty fields in Patch requests. 1387 ForceSendFields []string `json:"-"` 1388 1389 // NullFields is a list of field names (e.g. "BucketName") to include in 1390 // API requests with the JSON null value. By default, fields with empty 1391 // values are omitted from API requests. However, any field with an 1392 // empty value appearing in NullFields will be sent to the server as 1393 // null. It is an error if a field in this list has a non-empty value. 1394 // This may be used to include null fields in Patch requests. 1395 NullFields []string `json:"-"` 1396} 1397 1398func (s *GooglePrivacyDlpV2CloudStorageRegexFileSet) MarshalJSON() ([]byte, error) { 1399 type NoMethod GooglePrivacyDlpV2CloudStorageRegexFileSet 1400 raw := NoMethod(*s) 1401 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1402} 1403 1404// GooglePrivacyDlpV2Color: Represents a color in the RGB color space. 1405type GooglePrivacyDlpV2Color struct { 1406 // Blue: The amount of blue in the color as a value in the interval [0, 1407 // 1]. 1408 Blue float64 `json:"blue,omitempty"` 1409 1410 // Green: The amount of green in the color as a value in the interval 1411 // [0, 1]. 1412 Green float64 `json:"green,omitempty"` 1413 1414 // Red: The amount of red in the color as a value in the interval [0, 1415 // 1]. 1416 Red float64 `json:"red,omitempty"` 1417 1418 // ForceSendFields is a list of field names (e.g. "Blue") to 1419 // unconditionally include in API requests. By default, fields with 1420 // empty or default values are omitted from API requests. However, any 1421 // non-pointer, non-interface field appearing in ForceSendFields will be 1422 // sent to the server regardless of whether the field is empty or not. 1423 // This may be used to include empty fields in Patch requests. 1424 ForceSendFields []string `json:"-"` 1425 1426 // NullFields is a list of field names (e.g. "Blue") to include in API 1427 // requests with the JSON null value. By default, fields with empty 1428 // values are omitted from API requests. However, any field with an 1429 // empty value appearing in NullFields will be sent to the server as 1430 // null. It is an error if a field in this list has a non-empty value. 1431 // This may be used to include null fields in Patch requests. 1432 NullFields []string `json:"-"` 1433} 1434 1435func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) { 1436 type NoMethod GooglePrivacyDlpV2Color 1437 raw := NoMethod(*s) 1438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1439} 1440 1441func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error { 1442 type NoMethod GooglePrivacyDlpV2Color 1443 var s1 struct { 1444 Blue gensupport.JSONFloat64 `json:"blue"` 1445 Green gensupport.JSONFloat64 `json:"green"` 1446 Red gensupport.JSONFloat64 `json:"red"` 1447 *NoMethod 1448 } 1449 s1.NoMethod = (*NoMethod)(s) 1450 if err := json.Unmarshal(data, &s1); err != nil { 1451 return err 1452 } 1453 s.Blue = float64(s1.Blue) 1454 s.Green = float64(s1.Green) 1455 s.Red = float64(s1.Red) 1456 return nil 1457} 1458 1459// GooglePrivacyDlpV2Condition: The field type of `value` and `field` do 1460// not need to match to be considered equal, but not all comparisons are 1461// possible. EQUAL_TO and NOT_EQUAL_TO attempt to compare even with 1462// incompatible types, but all other comparisons are invalid with 1463// incompatible types. A `value` of type: - `string` can be compared 1464// against all other types - `boolean` can only be compared against 1465// other booleans - `integer` can be compared against doubles or a 1466// string if the string value can be parsed as an integer. - `double` 1467// can be compared against integers or a string if the string can be 1468// parsed as a double. - `Timestamp` can be compared against strings in 1469// RFC 3339 date string format. - `TimeOfDay` can be compared against 1470// timestamps and strings in the format of 'HH:mm:ss'. If we fail to 1471// compare do to type mismatch, a warning will be given and the 1472// condition will evaluate to false. 1473type GooglePrivacyDlpV2Condition struct { 1474 // Field: Required. Field within the record this condition is evaluated 1475 // against. 1476 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 1477 1478 // Operator: Required. Operator used to compare the field or infoType to 1479 // the value. 1480 // 1481 // Possible values: 1482 // "RELATIONAL_OPERATOR_UNSPECIFIED" - Unused 1483 // "EQUAL_TO" - Equal. Attempts to match even with incompatible types. 1484 // "NOT_EQUAL_TO" - Not equal to. Attempts to match even with 1485 // incompatible types. 1486 // "GREATER_THAN" - Greater than. 1487 // "LESS_THAN" - Less than. 1488 // "GREATER_THAN_OR_EQUALS" - Greater than or equals. 1489 // "LESS_THAN_OR_EQUALS" - Less than or equals. 1490 // "EXISTS" - Exists 1491 Operator string `json:"operator,omitempty"` 1492 1493 // Value: Value to compare against. [Mandatory, except for `EXISTS` 1494 // tests.] 1495 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 1496 1497 // ForceSendFields is a list of field names (e.g. "Field") to 1498 // unconditionally include in API requests. By default, fields with 1499 // empty or default values are omitted from API requests. However, any 1500 // non-pointer, non-interface field appearing in ForceSendFields will be 1501 // sent to the server regardless of whether the field is empty or not. 1502 // This may be used to include empty fields in Patch requests. 1503 ForceSendFields []string `json:"-"` 1504 1505 // NullFields is a list of field names (e.g. "Field") to include in API 1506 // 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 *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) { 1515 type NoMethod GooglePrivacyDlpV2Condition 1516 raw := NoMethod(*s) 1517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1518} 1519 1520// GooglePrivacyDlpV2Conditions: A collection of conditions. 1521type GooglePrivacyDlpV2Conditions struct { 1522 // Conditions: A collection of conditions. 1523 Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"` 1524 1525 // ForceSendFields is a list of field names (e.g. "Conditions") to 1526 // unconditionally include in API requests. By default, fields with 1527 // empty or default values are omitted from API requests. However, any 1528 // non-pointer, non-interface field appearing in ForceSendFields will be 1529 // sent to the server regardless of whether the field is empty or not. 1530 // This may be used to include empty fields in Patch requests. 1531 ForceSendFields []string `json:"-"` 1532 1533 // NullFields is a list of field names (e.g. "Conditions") to include in 1534 // API requests with the JSON null value. By default, fields with empty 1535 // values are omitted from API requests. However, any field with an 1536 // empty value appearing in NullFields will be sent to the server as 1537 // null. It is an error if a field in this list has a non-empty value. 1538 // This may be used to include null fields in Patch requests. 1539 NullFields []string `json:"-"` 1540} 1541 1542func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { 1543 type NoMethod GooglePrivacyDlpV2Conditions 1544 raw := NoMethod(*s) 1545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1546} 1547 1548// GooglePrivacyDlpV2Container: Represents a container that may contain 1549// DLP findings. Examples of a container include a file, table, or 1550// database record. 1551type GooglePrivacyDlpV2Container struct { 1552 // FullPath: A string representation of the full container name. 1553 // Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud 1554 // Storage: 'gs://Bucket/folders/filename.txt' 1555 FullPath string `json:"fullPath,omitempty"` 1556 1557 // ProjectId: Project where the finding was found. Can be different from 1558 // the project that owns the finding. 1559 ProjectId string `json:"projectId,omitempty"` 1560 1561 // RelativePath: The rest of the path after the root. Examples: - For 1562 // BigQuery table `project_id:dataset_id.table_id`, the relative path is 1563 // `table_id` - Google Cloud Storage file 1564 // `gs://bucket/folder/filename.txt`, the relative path is 1565 // `folder/filename.txt` 1566 RelativePath string `json:"relativePath,omitempty"` 1567 1568 // RootPath: The root of the container. Examples: - For BigQuery table 1569 // `project_id:dataset_id.table_id`, the root is `dataset_id` - For 1570 // Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root 1571 // is `gs://bucket` 1572 RootPath string `json:"rootPath,omitempty"` 1573 1574 // Type: Container type, for example BigQuery or Google Cloud Storage. 1575 Type string `json:"type,omitempty"` 1576 1577 // UpdateTime: Findings container modification timestamp, if applicable. 1578 // For Google Cloud Storage contains last file modification timestamp. 1579 // For BigQuery table contains last_modified_time property. For 1580 // Datastore - not populated. 1581 UpdateTime string `json:"updateTime,omitempty"` 1582 1583 // Version: Findings container version, if available ("generation" for 1584 // Google Cloud Storage). 1585 Version string `json:"version,omitempty"` 1586 1587 // ForceSendFields is a list of field names (e.g. "FullPath") to 1588 // unconditionally include in API requests. By default, fields with 1589 // empty or default values are omitted from API requests. However, any 1590 // non-pointer, non-interface field appearing in ForceSendFields will be 1591 // sent to the server regardless of whether the field is empty or not. 1592 // This may be used to include empty fields in Patch requests. 1593 ForceSendFields []string `json:"-"` 1594 1595 // NullFields is a list of field names (e.g. "FullPath") to include in 1596 // API requests with the JSON null value. By default, fields with empty 1597 // values are omitted from API requests. However, any field with an 1598 // empty value appearing in NullFields will be sent to the server as 1599 // null. It is an error if a field in this list has a non-empty value. 1600 // This may be used to include null fields in Patch requests. 1601 NullFields []string `json:"-"` 1602} 1603 1604func (s *GooglePrivacyDlpV2Container) MarshalJSON() ([]byte, error) { 1605 type NoMethod GooglePrivacyDlpV2Container 1606 raw := NoMethod(*s) 1607 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1608} 1609 1610// GooglePrivacyDlpV2ContentItem: Container structure for the content to 1611// inspect. 1612type GooglePrivacyDlpV2ContentItem struct { 1613 // ByteItem: Content data to inspect or redact. Replaces `type` and 1614 // `data`. 1615 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 1616 1617 // Table: Structured content for inspection. See 1618 // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 1619 // to learn more. 1620 Table *GooglePrivacyDlpV2Table `json:"table,omitempty"` 1621 1622 // Value: String data to inspect or redact. 1623 Value string `json:"value,omitempty"` 1624 1625 // ForceSendFields is a list of field names (e.g. "ByteItem") to 1626 // unconditionally include in API requests. By default, fields with 1627 // empty or default values are omitted from API requests. However, any 1628 // non-pointer, non-interface field appearing in ForceSendFields will be 1629 // sent to the server regardless of whether the field is empty or not. 1630 // This may be used to include empty fields in Patch requests. 1631 ForceSendFields []string `json:"-"` 1632 1633 // NullFields is a list of field names (e.g. "ByteItem") to include in 1634 // API requests with the JSON null value. By default, fields with empty 1635 // values are omitted from API requests. However, any field with an 1636 // empty value appearing in NullFields will be sent to the server as 1637 // null. It is an error if a field in this list has a non-empty value. 1638 // This may be used to include null fields in Patch requests. 1639 NullFields []string `json:"-"` 1640} 1641 1642func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) { 1643 type NoMethod GooglePrivacyDlpV2ContentItem 1644 raw := NoMethod(*s) 1645 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1646} 1647 1648// GooglePrivacyDlpV2ContentLocation: Precise location of the finding 1649// within a document, record, image, or metadata container. 1650type GooglePrivacyDlpV2ContentLocation struct { 1651 // ContainerName: Name of the container where the finding is located. 1652 // The top level name is the source file name or table name. Names of 1653 // some common storage containers are formatted as follows: * BigQuery 1654 // tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: 1655 // `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested 1656 // names could be absent if the embedded object has no string identifier 1657 // (for an example an image contained within a document). 1658 ContainerName string `json:"containerName,omitempty"` 1659 1660 // ContainerTimestamp: Findings container modification timestamp, if 1661 // applicable. For Google Cloud Storage contains last file modification 1662 // timestamp. For BigQuery table contains last_modified_time property. 1663 // For Datastore - not populated. 1664 ContainerTimestamp string `json:"containerTimestamp,omitempty"` 1665 1666 // ContainerVersion: Findings container version, if available 1667 // ("generation" for Google Cloud Storage). 1668 ContainerVersion string `json:"containerVersion,omitempty"` 1669 1670 // DocumentLocation: Location data for document files. 1671 DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"` 1672 1673 // ImageLocation: Location within an image's pixels. 1674 ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"` 1675 1676 // MetadataLocation: Location within the metadata for inspected content. 1677 MetadataLocation *GooglePrivacyDlpV2MetadataLocation `json:"metadataLocation,omitempty"` 1678 1679 // RecordLocation: Location within a row or record of a database table. 1680 RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"` 1681 1682 // ForceSendFields is a list of field names (e.g. "ContainerName") to 1683 // unconditionally include in API requests. By default, fields with 1684 // empty or default values are omitted from API requests. However, any 1685 // non-pointer, non-interface field appearing in ForceSendFields will be 1686 // sent to the server regardless of whether the field is empty or not. 1687 // This may be used to include empty fields in Patch requests. 1688 ForceSendFields []string `json:"-"` 1689 1690 // NullFields is a list of field names (e.g. "ContainerName") to include 1691 // in API requests with the JSON null value. By default, fields with 1692 // empty values are omitted from API requests. However, any field with 1693 // an empty value appearing in NullFields will be sent to the server as 1694 // null. It is an error if a field in this list has a non-empty value. 1695 // This may be used to include null fields in Patch requests. 1696 NullFields []string `json:"-"` 1697} 1698 1699func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) { 1700 type NoMethod GooglePrivacyDlpV2ContentLocation 1701 raw := NoMethod(*s) 1702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1703} 1704 1705// GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message 1706// for CreateDeidentifyTemplate. 1707type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct { 1708 // DeidentifyTemplate: Required. The DeidentifyTemplate to create. 1709 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 1710 1711 // LocationId: Deprecated. This field has no effect. 1712 LocationId string `json:"locationId,omitempty"` 1713 1714 // TemplateId: The template id can contain uppercase and lowercase 1715 // letters, numbers, and hyphens; that is, it must match the regular 1716 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1717 // Can be empty to allow the system to generate one. 1718 TemplateId string `json:"templateId,omitempty"` 1719 1720 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 1721 // to unconditionally include in API requests. By default, fields with 1722 // empty or default values are omitted from API requests. However, any 1723 // non-pointer, non-interface field appearing in ForceSendFields will be 1724 // sent to the server regardless of whether the field is empty or not. 1725 // This may be used to include empty fields in Patch requests. 1726 ForceSendFields []string `json:"-"` 1727 1728 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 1729 // include in API requests with the JSON null value. By default, fields 1730 // with empty values are omitted from API requests. However, any field 1731 // with an empty value appearing in NullFields will be sent to the 1732 // server as null. It is an error if a field in this list has a 1733 // non-empty value. This may be used to include null fields in Patch 1734 // requests. 1735 NullFields []string `json:"-"` 1736} 1737 1738func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 1739 type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 1740 raw := NoMethod(*s) 1741 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1742} 1743 1744// GooglePrivacyDlpV2CreateDlpJobRequest: Request message for 1745// CreateDlpJobRequest. Used to initiate long running jobs such as 1746// calculating risk metrics or inspecting Google Cloud Storage. 1747type GooglePrivacyDlpV2CreateDlpJobRequest struct { 1748 // InspectJob: An inspection job scans a storage repository for 1749 // InfoTypes. 1750 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 1751 1752 // JobId: The job id can contain uppercase and lowercase letters, 1753 // numbers, and hyphens; that is, it must match the regular expression: 1754 // `[a-zA-Z\d-_]+`. The maximum length is 100 characters. Can be empty 1755 // to allow the system to generate one. 1756 JobId string `json:"jobId,omitempty"` 1757 1758 // LocationId: Deprecated. This field has no effect. 1759 LocationId string `json:"locationId,omitempty"` 1760 1761 // RiskJob: A risk analysis job calculates re-identification risk 1762 // metrics for a BigQuery table. 1763 RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"` 1764 1765 // ForceSendFields is a list of field names (e.g. "InspectJob") to 1766 // unconditionally include in API requests. By default, fields with 1767 // empty or default values are omitted from API requests. However, any 1768 // non-pointer, non-interface field appearing in ForceSendFields will be 1769 // sent to the server regardless of whether the field is empty or not. 1770 // This may be used to include empty fields in Patch requests. 1771 ForceSendFields []string `json:"-"` 1772 1773 // NullFields is a list of field names (e.g. "InspectJob") to include in 1774 // API requests with the JSON null value. By default, fields with empty 1775 // values are omitted from API requests. However, any field with an 1776 // empty value appearing in NullFields will be sent to the server as 1777 // null. It is an error if a field in this list has a non-empty value. 1778 // This may be used to include null fields in Patch requests. 1779 NullFields []string `json:"-"` 1780} 1781 1782func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) { 1783 type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest 1784 raw := NoMethod(*s) 1785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1786} 1787 1788// GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for 1789// CreateInspectTemplate. 1790type GooglePrivacyDlpV2CreateInspectTemplateRequest struct { 1791 // InspectTemplate: Required. The InspectTemplate to create. 1792 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 1793 1794 // LocationId: Deprecated. This field has no effect. 1795 LocationId string `json:"locationId,omitempty"` 1796 1797 // TemplateId: The template id can contain uppercase and lowercase 1798 // letters, numbers, and hyphens; that is, it must match the regular 1799 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1800 // Can be empty to allow the system to generate one. 1801 TemplateId string `json:"templateId,omitempty"` 1802 1803 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 1804 // unconditionally include in API requests. By default, fields with 1805 // empty or default values are omitted from API requests. However, any 1806 // non-pointer, non-interface field appearing in ForceSendFields will be 1807 // sent to the server regardless of whether the field is empty or not. 1808 // This may be used to include empty fields in Patch requests. 1809 ForceSendFields []string `json:"-"` 1810 1811 // NullFields is a list of field names (e.g. "InspectTemplate") to 1812 // include in API requests with the JSON null value. By default, fields 1813 // with empty values are omitted from API requests. However, any field 1814 // with an empty value appearing in NullFields will be sent to the 1815 // server as null. It is an error if a field in this list has a 1816 // non-empty value. This may be used to include null fields in Patch 1817 // requests. 1818 NullFields []string `json:"-"` 1819} 1820 1821func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 1822 type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest 1823 raw := NoMethod(*s) 1824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1825} 1826 1827// GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for 1828// CreateJobTrigger. 1829type GooglePrivacyDlpV2CreateJobTriggerRequest struct { 1830 // JobTrigger: Required. The JobTrigger to create. 1831 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 1832 1833 // LocationId: Deprecated. This field has no effect. 1834 LocationId string `json:"locationId,omitempty"` 1835 1836 // TriggerId: The trigger id can contain uppercase and lowercase 1837 // letters, numbers, and hyphens; that is, it must match the regular 1838 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1839 // Can be empty to allow the system to generate one. 1840 TriggerId string `json:"triggerId,omitempty"` 1841 1842 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 1843 // unconditionally include in API requests. By default, fields with 1844 // empty or default values are omitted from API requests. However, any 1845 // non-pointer, non-interface field appearing in ForceSendFields will be 1846 // sent to the server regardless of whether the field is empty or not. 1847 // This may be used to include empty fields in Patch requests. 1848 ForceSendFields []string `json:"-"` 1849 1850 // NullFields is a list of field names (e.g. "JobTrigger") to include in 1851 // API requests with the JSON null value. By default, fields with empty 1852 // values are omitted from API requests. However, any field with an 1853 // empty value appearing in NullFields will be sent to the server as 1854 // null. It is an error if a field in this list has a non-empty value. 1855 // This may be used to include null fields in Patch requests. 1856 NullFields []string `json:"-"` 1857} 1858 1859func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) { 1860 type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest 1861 raw := NoMethod(*s) 1862 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1863} 1864 1865// GooglePrivacyDlpV2CreateStoredInfoTypeRequest: Request message for 1866// CreateStoredInfoType. 1867type GooglePrivacyDlpV2CreateStoredInfoTypeRequest struct { 1868 // Config: Required. Configuration of the storedInfoType to create. 1869 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 1870 1871 // LocationId: Deprecated. This field has no effect. 1872 LocationId string `json:"locationId,omitempty"` 1873 1874 // StoredInfoTypeId: The storedInfoType ID can contain uppercase and 1875 // lowercase letters, numbers, and hyphens; that is, it must match the 1876 // regular expression: `[a-zA-Z\d-_]+`. The maximum length is 100 1877 // characters. Can be empty to allow the system to generate one. 1878 StoredInfoTypeId string `json:"storedInfoTypeId,omitempty"` 1879 1880 // ForceSendFields is a list of field names (e.g. "Config") to 1881 // unconditionally include in API requests. By default, fields with 1882 // empty or default values are omitted from API requests. However, any 1883 // non-pointer, non-interface field appearing in ForceSendFields will be 1884 // sent to the server regardless of whether the field is empty or not. 1885 // This may be used to include empty fields in Patch requests. 1886 ForceSendFields []string `json:"-"` 1887 1888 // NullFields is a list of field names (e.g. "Config") to include in API 1889 // requests with the JSON null value. By default, fields with empty 1890 // values are omitted from API requests. However, any field with an 1891 // empty value appearing in NullFields will be sent to the server as 1892 // null. It is an error if a field in this list has a non-empty value. 1893 // This may be used to include null fields in Patch requests. 1894 NullFields []string `json:"-"` 1895} 1896 1897func (s *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 1898 type NoMethod GooglePrivacyDlpV2CreateStoredInfoTypeRequest 1899 raw := NoMethod(*s) 1900 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1901} 1902 1903// GooglePrivacyDlpV2CryptoDeterministicConfig: Pseudonymization method 1904// that generates deterministic encryption for the given input. Outputs 1905// a base64 encoded representation of the encrypted output. Uses AES-SIV 1906// based on the RFC https://tools.ietf.org/html/rfc5297. 1907type GooglePrivacyDlpV2CryptoDeterministicConfig struct { 1908 // Context: A context may be used for higher security and maintaining 1909 // referential integrity such that the same identifier in two different 1910 // contexts will be given a distinct surrogate. The context is appended 1911 // to plaintext value being encrypted. On decryption the provided 1912 // context is validated against the value used during encryption. If a 1913 // context was provided during encryption, same context must be provided 1914 // during decryption as well. If the context is not set, plaintext would 1915 // be used as is for encryption. If the context is set but: 1. there is 1916 // no record present when transforming a given value or 2. the field is 1917 // not present when transforming a given value, plaintext would be used 1918 // as is for encryption. Note that case (1) is expected when an 1919 // `InfoTypeTransformation` is applied to both structured and 1920 // non-structured `ContentItem`s. 1921 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 1922 1923 // CryptoKey: The key used by the encryption function. For deterministic 1924 // encryption using AES-SIV, the provided key is internally expanded to 1925 // 64 bytes prior to use. 1926 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1927 1928 // SurrogateInfoType: The custom info type to annotate the surrogate 1929 // with. This annotation will be applied to the surrogate by prefixing 1930 // it with the name of the custom info type followed by the number of 1931 // characters comprising the surrogate. The following scheme defines the 1932 // format: {info type name}({surrogate character count}):{surrogate} For 1933 // example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 1934 // the surrogate is 'abc', the full replacement value will be: 1935 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 1936 // when inspecting content using the custom info type 'Surrogate'. This 1937 // facilitates reversal of the surrogate when it occurs in free text. 1938 // Note: For record transformations where the entire cell in a table is 1939 // being transformed, surrogates are not mandatory. Surrogates are used 1940 // to denote the location of the token and are necessary for 1941 // re-identification in free form text. In order for inspection to work 1942 // properly, the name of this info type must not occur naturally 1943 // anywhere in your data; otherwise, inspection may either - reverse a 1944 // surrogate that does not correspond to an actual identifier - be 1945 // unable to parse the surrogate and result in an error Therefore, 1946 // choose your custom info type name carefully after considering what 1947 // your data looks like. One way to select a name that has a high chance 1948 // of yielding reliable detection is to include one or more unicode 1949 // characters that are highly improbable to exist in your data. For 1950 // example, assuming your data is entered from a regular ASCII keyboard, 1951 // the symbol with the hex code point 29DD might be used like so: 1952 // ⧝MY_TOKEN_TYPE. 1953 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 1954 1955 // ForceSendFields is a list of field names (e.g. "Context") to 1956 // unconditionally include in API requests. By default, fields with 1957 // empty or default values are omitted from API requests. However, any 1958 // non-pointer, non-interface field appearing in ForceSendFields will be 1959 // sent to the server regardless of whether the field is empty or not. 1960 // This may be used to include empty fields in Patch requests. 1961 ForceSendFields []string `json:"-"` 1962 1963 // NullFields is a list of field names (e.g. "Context") to include in 1964 // API requests with the JSON null value. By default, fields with empty 1965 // values are omitted from API requests. However, any field with an 1966 // empty value appearing in NullFields will be sent to the server as 1967 // null. It is an error if a field in this list has a non-empty value. 1968 // This may be used to include null fields in Patch requests. 1969 NullFields []string `json:"-"` 1970} 1971 1972func (s *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, error) { 1973 type NoMethod GooglePrivacyDlpV2CryptoDeterministicConfig 1974 raw := NoMethod(*s) 1975 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1976} 1977 1978// GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that 1979// generates surrogates via cryptographic hashing. Uses SHA-256. The key 1980// size must be either 32 or 64 bytes. Outputs a base64 encoded 1981// representation of the hashed output (for example, 1982// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string 1983// and integer values can be hashed. See 1984// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 1985type GooglePrivacyDlpV2CryptoHashConfig struct { 1986 // CryptoKey: The key used by the hash function. 1987 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1988 1989 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 1990 // unconditionally include in API requests. By default, fields with 1991 // empty or default values are omitted from API requests. However, any 1992 // non-pointer, non-interface field appearing in ForceSendFields will be 1993 // sent to the server regardless of whether the field is empty or not. 1994 // This may be used to include empty fields in Patch requests. 1995 ForceSendFields []string `json:"-"` 1996 1997 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1998 // API requests with the JSON null value. By default, fields with empty 1999 // values are omitted from API requests. However, any field with an 2000 // empty value appearing in NullFields will be sent to the server as 2001 // null. It is an error if a field in this list has a non-empty value. 2002 // This may be used to include null fields in Patch requests. 2003 NullFields []string `json:"-"` 2004} 2005 2006func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) { 2007 type NoMethod GooglePrivacyDlpV2CryptoHashConfig 2008 raw := NoMethod(*s) 2009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2010} 2011 2012// GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as 2013// opposed to a key encryption key (KEK) stored by Cloud Key Management 2014// Service (Cloud KMS). When using Cloud KMS to wrap or unwrap a DEK, be 2015// sure to set an appropriate IAM policy on the KEK to ensure an 2016// attacker cannot unwrap the DEK. 2017type GooglePrivacyDlpV2CryptoKey struct { 2018 // KmsWrapped: Key wrapped using Cloud KMS 2019 KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` 2020 2021 // Transient: Transient crypto key 2022 Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"` 2023 2024 // Unwrapped: Unwrapped crypto key 2025 Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"` 2026 2027 // ForceSendFields is a list of field names (e.g. "KmsWrapped") to 2028 // unconditionally include in API requests. By default, fields with 2029 // empty or default values are omitted from API requests. However, any 2030 // non-pointer, non-interface field appearing in ForceSendFields will be 2031 // sent to the server regardless of whether the field is empty or not. 2032 // This may be used to include empty fields in Patch requests. 2033 ForceSendFields []string `json:"-"` 2034 2035 // NullFields is a list of field names (e.g. "KmsWrapped") to include in 2036 // API requests with the JSON null value. By default, fields with empty 2037 // values are omitted from API requests. However, any field with an 2038 // empty value appearing in NullFields will be sent to the server as 2039 // null. It is an error if a field in this list has a non-empty value. 2040 // This may be used to include null fields in Patch requests. 2041 NullFields []string `json:"-"` 2042} 2043 2044func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) { 2045 type NoMethod GooglePrivacyDlpV2CryptoKey 2046 raw := NoMethod(*s) 2047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2048} 2049 2050// GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier 2051// with a surrogate using Format Preserving Encryption (FPE) with the 2052// FFX mode of operation; however when used in the `ReidentifyContent` 2053// API method, it serves the opposite function by reversing the 2054// surrogate back into the original identifier. The identifier must be 2055// encoded as ASCII. For a given crypto key and context, the same 2056// identifier will be replaced with the same surrogate. Identifiers must 2057// be at least two characters long. In the case that the identifier is 2058// the empty string, it will be skipped. See 2059// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 2060// Note: We recommend using CryptoDeterministicConfig for all use cases 2061// which do not require preserving the input alphabet space and size, 2062// plus warrant referential integrity. 2063type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { 2064 // CommonAlphabet: Common alphabets. 2065 // 2066 // Possible values: 2067 // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - Unused. 2068 // "NUMERIC" - `[0-9]` (radix of 10) 2069 // "HEXADECIMAL" - `[0-9A-F]` (radix of 16) 2070 // "UPPER_CASE_ALPHA_NUMERIC" - `[0-9A-Z]` (radix of 36) 2071 // "ALPHA_NUMERIC" - `[0-9A-Za-z]` (radix of 62) 2072 CommonAlphabet string `json:"commonAlphabet,omitempty"` 2073 2074 // Context: The 'tweak', a context may be used for higher security since 2075 // the same identifier in two different contexts won't be given the same 2076 // surrogate. If the context is not set, a default tweak will be used. 2077 // If the context is set but: 1. there is no record present when 2078 // transforming a given value or 1. the field is not present when 2079 // transforming a given value, a default tweak will be used. Note that 2080 // case (1) is expected when an `InfoTypeTransformation` is applied to 2081 // both structured and non-structured `ContentItem`s. Currently, the 2082 // referenced field may be of value type integer or string. The tweak is 2083 // constructed as a sequence of bytes in big endian byte order such 2084 // that: - a 64 bit integer is encoded followed by a single byte of 2085 // value 1 - a string is encoded in UTF-8 format followed by a single 2086 // byte of value 2 2087 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2088 2089 // CryptoKey: Required. The key used by the encryption algorithm. 2090 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2091 2092 // CustomAlphabet: This is supported by mapping these to the 2093 // alphanumeric characters that the FFX mode natively supports. This 2094 // happens before/after encryption/decryption. Each character listed 2095 // must appear only once. Number of characters must be in the range [2, 2096 // 95]. This must be encoded as ASCII. The order of characters does not 2097 // matter. The full list of allowed characters is: 2098 // 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 2099 // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ 2100 CustomAlphabet string `json:"customAlphabet,omitempty"` 2101 2102 // Radix: The native way to select the alphabet. Must be in the range 2103 // [2, 95]. 2104 Radix int64 `json:"radix,omitempty"` 2105 2106 // SurrogateInfoType: The custom infoType to annotate the surrogate 2107 // with. This annotation will be applied to the surrogate by prefixing 2108 // it with the name of the custom infoType followed by the number of 2109 // characters comprising the surrogate. The following scheme defines the 2110 // format: info_type_name(surrogate_character_count):surrogate For 2111 // example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and 2112 // the surrogate is 'abc', the full replacement value will be: 2113 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 2114 // when inspecting content using the custom infoType `SurrogateType` 2115 // (https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). 2116 // This facilitates reversal of the surrogate when it occurs in free 2117 // text. In order for inspection to work properly, the name of this 2118 // infoType must not occur naturally anywhere in your data; otherwise, 2119 // inspection may find a surrogate that does not correspond to an actual 2120 // identifier. Therefore, choose your custom infoType name carefully 2121 // after considering what your data looks like. One way to select a name 2122 // that has a high chance of yielding reliable detection is to include 2123 // one or more unicode characters that are highly improbable to exist in 2124 // your data. For example, assuming your data is entered from a regular 2125 // ASCII keyboard, the symbol with the hex code point 29DD might be used 2126 // like so: ⧝MY_TOKEN_TYPE 2127 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 2128 2129 // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to 2130 // unconditionally include in API requests. By default, fields with 2131 // empty or default values are omitted from API requests. However, any 2132 // non-pointer, non-interface field appearing in ForceSendFields will be 2133 // sent to the server regardless of whether the field is empty or not. 2134 // This may be used to include empty fields in Patch requests. 2135 ForceSendFields []string `json:"-"` 2136 2137 // NullFields is a list of field names (e.g. "CommonAlphabet") to 2138 // include in API requests with the JSON null value. By default, fields 2139 // with empty values are omitted from API requests. However, any field 2140 // with an empty value appearing in NullFields will be sent to the 2141 // server as null. It is an error if a field in this list has a 2142 // non-empty value. This may be used to include null fields in Patch 2143 // requests. 2144 NullFields []string `json:"-"` 2145} 2146 2147func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { 2148 type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig 2149 raw := NoMethod(*s) 2150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2151} 2152 2153// GooglePrivacyDlpV2CustomInfoType: Custom information type provided by 2154// the user. Used to find domain-specific sensitive information 2155// configurable to the data in question. 2156type GooglePrivacyDlpV2CustomInfoType struct { 2157 // DetectionRules: Set of detection rules to apply to all findings of 2158 // this CustomInfoType. Rules are applied in order that they are 2159 // specified. Not supported for the `surrogate_type` CustomInfoType. 2160 DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"` 2161 2162 // Dictionary: A list of phrases to detect as a CustomInfoType. 2163 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 2164 2165 // ExclusionType: If set to EXCLUSION_TYPE_EXCLUDE this infoType will 2166 // not cause a finding to be returned. It still can be used for rules 2167 // matching. 2168 // 2169 // Possible values: 2170 // "EXCLUSION_TYPE_UNSPECIFIED" - A finding of this custom info type 2171 // will not be excluded from results. 2172 // "EXCLUSION_TYPE_EXCLUDE" - A finding of this custom info type will 2173 // be excluded from final results, but can still affect rule execution. 2174 ExclusionType string `json:"exclusionType,omitempty"` 2175 2176 // InfoType: CustomInfoType can either be a new infoType, or an 2177 // extension of built-in infoType, when the name matches one of existing 2178 // infoTypes and that infoType is specified in 2179 // `InspectContent.info_types` field. Specifying the latter adds 2180 // findings to the one detected by the system. If built-in info type is 2181 // not specified in `InspectContent.info_types` list then the name is 2182 // treated as a custom info type. 2183 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 2184 2185 // Likelihood: Likelihood to return for this CustomInfoType. This base 2186 // value can be altered by a detection rule if the finding meets the 2187 // criteria specified by the rule. Defaults to `VERY_LIKELY` if not 2188 // specified. 2189 // 2190 // Possible values: 2191 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 2192 // "VERY_UNLIKELY" - Few matching elements. 2193 // "UNLIKELY" 2194 // "POSSIBLE" - Some matching elements. 2195 // "LIKELY" 2196 // "VERY_LIKELY" - Many matching elements. 2197 Likelihood string `json:"likelihood,omitempty"` 2198 2199 // Regex: Regular expression based CustomInfoType. 2200 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 2201 2202 // StoredType: Load an existing `StoredInfoType` resource for use in 2203 // `InspectDataSource`. Not currently supported in `InspectContent`. 2204 StoredType *GooglePrivacyDlpV2StoredType `json:"storedType,omitempty"` 2205 2206 // SurrogateType: Message for detecting output from deidentification 2207 // transformations that support reversing. 2208 SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"` 2209 2210 // ForceSendFields is a list of field names (e.g. "DetectionRules") to 2211 // unconditionally include in API requests. By default, fields with 2212 // empty or default values are omitted from API requests. However, any 2213 // non-pointer, non-interface field appearing in ForceSendFields will be 2214 // sent to the server regardless of whether the field is empty or not. 2215 // This may be used to include empty fields in Patch requests. 2216 ForceSendFields []string `json:"-"` 2217 2218 // NullFields is a list of field names (e.g. "DetectionRules") to 2219 // include in API requests with the JSON null value. By default, fields 2220 // with empty values are omitted from API requests. However, any field 2221 // with an empty value appearing in NullFields will be sent to the 2222 // server as null. It is an error if a field in this list has a 2223 // non-empty value. This may be used to include null fields in Patch 2224 // requests. 2225 NullFields []string `json:"-"` 2226} 2227 2228func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) { 2229 type NoMethod GooglePrivacyDlpV2CustomInfoType 2230 raw := NoMethod(*s) 2231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2232} 2233 2234// GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud 2235// Datastore. 2236type GooglePrivacyDlpV2DatastoreKey struct { 2237 // EntityKey: Datastore entity key. 2238 EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"` 2239 2240 // ForceSendFields is a list of field names (e.g. "EntityKey") to 2241 // unconditionally include in API requests. By default, fields with 2242 // empty or default values are omitted from API requests. However, any 2243 // non-pointer, non-interface field appearing in ForceSendFields will be 2244 // sent to the server regardless of whether the field is empty or not. 2245 // This may be used to include empty fields in Patch requests. 2246 ForceSendFields []string `json:"-"` 2247 2248 // NullFields is a list of field names (e.g. "EntityKey") to include in 2249 // API requests with the JSON null value. By default, fields with empty 2250 // values are omitted from API requests. However, any field with an 2251 // empty value appearing in NullFields will be sent to the server as 2252 // null. It is an error if a field in this list has a non-empty value. 2253 // This may be used to include null fields in Patch requests. 2254 NullFields []string `json:"-"` 2255} 2256 2257func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) { 2258 type NoMethod GooglePrivacyDlpV2DatastoreKey 2259 raw := NoMethod(*s) 2260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2261} 2262 2263// GooglePrivacyDlpV2DatastoreOptions: Options defining a data set 2264// within Google Cloud Datastore. 2265type GooglePrivacyDlpV2DatastoreOptions struct { 2266 // Kind: The kind to process. 2267 Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"` 2268 2269 // PartitionId: A partition ID identifies a grouping of entities. The 2270 // grouping is always by project and namespace, however the namespace ID 2271 // may be empty. 2272 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 2273 2274 // ForceSendFields is a list of field names (e.g. "Kind") to 2275 // unconditionally include in API requests. By default, fields with 2276 // empty or default values are omitted from API requests. However, any 2277 // non-pointer, non-interface field appearing in ForceSendFields will be 2278 // sent to the server regardless of whether the field is empty or not. 2279 // This may be used to include empty fields in Patch requests. 2280 ForceSendFields []string `json:"-"` 2281 2282 // NullFields is a list of field names (e.g. "Kind") to include in API 2283 // requests with the JSON null value. By default, fields with empty 2284 // values are omitted from API requests. However, any field with an 2285 // empty value appearing in NullFields will be sent to the server as 2286 // null. It is an error if a field in this list has a non-empty value. 2287 // This may be used to include null fields in Patch requests. 2288 NullFields []string `json:"-"` 2289} 2290 2291func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) { 2292 type NoMethod GooglePrivacyDlpV2DatastoreOptions 2293 raw := NoMethod(*s) 2294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2295} 2296 2297// GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of 2298// days, with option to be consistent for the same context. See 2299// https://cloud.google.com/dlp/docs/concepts-date-shifting to learn 2300// more. 2301type GooglePrivacyDlpV2DateShiftConfig struct { 2302 // Context: Points to the field that contains the context, for example, 2303 // an entity id. If set, must also set cryptoKey. If set, shift will be 2304 // consistent for the given context. 2305 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2306 2307 // CryptoKey: Causes the shift to be computed based on this key and the 2308 // context. This results in the same shift for the same context and 2309 // crypto_key. If set, must also set context. Can only be applied to 2310 // table items. 2311 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2312 2313 // LowerBoundDays: Required. For example, -5 means shift date to at most 2314 // 5 days back in the past. 2315 LowerBoundDays int64 `json:"lowerBoundDays,omitempty"` 2316 2317 // UpperBoundDays: Required. Range of shift in days. Actual shift will 2318 // be selected at random within this range (inclusive ends). Negative 2319 // means shift to earlier in time. Must not be more than 365250 days 2320 // (1000 years) each direction. For example, 3 means shift date to at 2321 // most 3 days into the future. 2322 UpperBoundDays int64 `json:"upperBoundDays,omitempty"` 2323 2324 // ForceSendFields is a list of field names (e.g. "Context") to 2325 // unconditionally include in API requests. By default, fields with 2326 // empty or default values are omitted from API requests. However, any 2327 // non-pointer, non-interface field appearing in ForceSendFields will be 2328 // sent to the server regardless of whether the field is empty or not. 2329 // This may be used to include empty fields in Patch requests. 2330 ForceSendFields []string `json:"-"` 2331 2332 // NullFields is a list of field names (e.g. "Context") to include in 2333 // API requests with the JSON null value. By default, fields with empty 2334 // values are omitted from API requests. However, any field with an 2335 // empty value appearing in NullFields will be sent to the server as 2336 // null. It is an error if a field in this list has a non-empty value. 2337 // This may be used to include null fields in Patch requests. 2338 NullFields []string `json:"-"` 2339} 2340 2341func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) { 2342 type NoMethod GooglePrivacyDlpV2DateShiftConfig 2343 raw := NoMethod(*s) 2344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2345} 2346 2347// GooglePrivacyDlpV2DateTime: Message for a date time object. e.g. 2348// 2018-01-01, 5th August. 2349type GooglePrivacyDlpV2DateTime struct { 2350 // Date: One or more of the following must be set. Must be a valid date 2351 // or time value. 2352 Date *GoogleTypeDate `json:"date,omitempty"` 2353 2354 // DayOfWeek: Day of week 2355 // 2356 // Possible values: 2357 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 2358 // "MONDAY" - Monday 2359 // "TUESDAY" - Tuesday 2360 // "WEDNESDAY" - Wednesday 2361 // "THURSDAY" - Thursday 2362 // "FRIDAY" - Friday 2363 // "SATURDAY" - Saturday 2364 // "SUNDAY" - Sunday 2365 DayOfWeek string `json:"dayOfWeek,omitempty"` 2366 2367 // Time: Time of day 2368 Time *GoogleTypeTimeOfDay `json:"time,omitempty"` 2369 2370 // TimeZone: Time zone 2371 TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"` 2372 2373 // ForceSendFields is a list of field names (e.g. "Date") to 2374 // unconditionally include in API requests. By default, fields with 2375 // empty or default values are omitted from API requests. However, any 2376 // non-pointer, non-interface field appearing in ForceSendFields will be 2377 // sent to the server regardless of whether the field is empty or not. 2378 // This may be used to include empty fields in Patch requests. 2379 ForceSendFields []string `json:"-"` 2380 2381 // NullFields is a list of field names (e.g. "Date") to include in API 2382 // requests with the JSON null value. By default, fields with empty 2383 // values are omitted from API requests. However, any field with an 2384 // empty value appearing in NullFields will be sent to the server as 2385 // null. It is an error if a field in this list has a non-empty value. 2386 // This may be used to include null fields in Patch requests. 2387 NullFields []string `json:"-"` 2388} 2389 2390func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) { 2391 type NoMethod GooglePrivacyDlpV2DateTime 2392 raw := NoMethod(*s) 2393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2394} 2395 2396// GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls 2397// how the data will change. 2398type GooglePrivacyDlpV2DeidentifyConfig struct { 2399 // InfoTypeTransformations: Treat the dataset as free-form text and 2400 // apply the same free text transformation everywhere. 2401 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 2402 2403 // RecordTransformations: Treat the dataset as structured. 2404 // Transformations can be applied to specific locations within 2405 // structured datasets, such as transforming a column within a table. 2406 RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"` 2407 2408 // TransformationErrorHandling: Mode for handling transformation errors. 2409 // If left unspecified, the default mode is 2410 // `TransformationErrorHandling.ThrowError`. 2411 TransformationErrorHandling *GooglePrivacyDlpV2TransformationErrorHandling `json:"transformationErrorHandling,omitempty"` 2412 2413 // ForceSendFields is a list of field names (e.g. 2414 // "InfoTypeTransformations") to unconditionally include in API 2415 // requests. By default, fields with empty or default values are omitted 2416 // from API requests. However, any non-pointer, non-interface field 2417 // appearing in ForceSendFields will be sent to the server regardless of 2418 // whether the field is empty or not. This may be used to include empty 2419 // fields in Patch requests. 2420 ForceSendFields []string `json:"-"` 2421 2422 // NullFields is a list of field names (e.g. "InfoTypeTransformations") 2423 // to include in API requests with the JSON null value. By default, 2424 // fields with empty values are omitted from API requests. However, any 2425 // field with an empty value appearing in NullFields will be sent to the 2426 // server as null. It is an error if a field in this list has a 2427 // non-empty value. This may be used to include null fields in Patch 2428 // requests. 2429 NullFields []string `json:"-"` 2430} 2431 2432func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) { 2433 type NoMethod GooglePrivacyDlpV2DeidentifyConfig 2434 raw := NoMethod(*s) 2435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2436} 2437 2438// GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a 2439// list of items. 2440type GooglePrivacyDlpV2DeidentifyContentRequest struct { 2441 // DeidentifyConfig: Configuration for the de-identification of the 2442 // content item. Items specified here will override the template 2443 // referenced by the deidentify_template_name argument. 2444 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2445 2446 // DeidentifyTemplateName: Template to use. Any configuration directly 2447 // specified in deidentify_config will override those set in the 2448 // template. Singular fields that are set in this request will replace 2449 // their corresponding fields in the template. Repeated fields are 2450 // appended. Singular sub-messages and groups are recursively merged. 2451 DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"` 2452 2453 // InspectConfig: Configuration for the inspector. Items specified here 2454 // will override the template referenced by the inspect_template_name 2455 // argument. 2456 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 2457 2458 // InspectTemplateName: Template to use. Any configuration directly 2459 // specified in inspect_config will override those set in the template. 2460 // Singular fields that are set in this request will replace their 2461 // corresponding fields in the template. Repeated fields are appended. 2462 // Singular sub-messages and groups are recursively merged. 2463 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 2464 2465 // Item: The item to de-identify. Will be treated as text. 2466 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2467 2468 // LocationId: Deprecated. This field has no effect. 2469 LocationId string `json:"locationId,omitempty"` 2470 2471 // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to 2472 // unconditionally include in API requests. By default, fields with 2473 // empty or default values are omitted from API requests. However, any 2474 // non-pointer, non-interface field appearing in ForceSendFields will be 2475 // sent to the server regardless of whether the field is empty or not. 2476 // This may be used to include empty fields in Patch requests. 2477 ForceSendFields []string `json:"-"` 2478 2479 // NullFields is a list of field names (e.g. "DeidentifyConfig") to 2480 // include in API requests with the JSON null value. By default, fields 2481 // with empty values are omitted from API requests. However, any field 2482 // with an empty value appearing in NullFields will be sent to the 2483 // server as null. It is an error if a field in this list has a 2484 // non-empty value. This may be used to include null fields in Patch 2485 // requests. 2486 NullFields []string `json:"-"` 2487} 2488 2489func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) { 2490 type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest 2491 raw := NoMethod(*s) 2492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2493} 2494 2495// GooglePrivacyDlpV2DeidentifyContentResponse: Results of 2496// de-identifying a ContentItem. 2497type GooglePrivacyDlpV2DeidentifyContentResponse struct { 2498 // Item: The de-identified item. 2499 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2500 2501 // Overview: An overview of the changes that were made on the `item`. 2502 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 2503 2504 // ServerResponse contains the HTTP response code and headers from the 2505 // server. 2506 googleapi.ServerResponse `json:"-"` 2507 2508 // ForceSendFields is a list of field names (e.g. "Item") to 2509 // unconditionally include in API requests. By default, fields with 2510 // empty or default values are omitted from API requests. However, any 2511 // non-pointer, non-interface field appearing in ForceSendFields will be 2512 // sent to the server regardless of whether the field is empty or not. 2513 // This may be used to include empty fields in Patch requests. 2514 ForceSendFields []string `json:"-"` 2515 2516 // NullFields is a list of field names (e.g. "Item") to include in API 2517 // requests with the JSON null value. By default, fields with empty 2518 // values are omitted from API requests. However, any field with an 2519 // empty value appearing in NullFields will be sent to the server as 2520 // null. It is an error if a field in this list has a non-empty value. 2521 // This may be used to include null fields in Patch requests. 2522 NullFields []string `json:"-"` 2523} 2524 2525func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) { 2526 type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse 2527 raw := NoMethod(*s) 2528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2529} 2530 2531// GooglePrivacyDlpV2DeidentifyTemplate: DeidentifyTemplates contains 2532// instructions on how to de-identify content. See 2533// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 2534type GooglePrivacyDlpV2DeidentifyTemplate struct { 2535 // CreateTime: Output only. The creation timestamp of an 2536 // inspectTemplate. 2537 CreateTime string `json:"createTime,omitempty"` 2538 2539 // DeidentifyConfig: The core content of the template. 2540 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2541 2542 // Description: Short description (max 256 chars). 2543 Description string `json:"description,omitempty"` 2544 2545 // DisplayName: Display name (max 256 chars). 2546 DisplayName string `json:"displayName,omitempty"` 2547 2548 // Name: Output only. The template name. The template will have one of 2549 // the following formats: 2550 // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 2551 // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 2552 Name string `json:"name,omitempty"` 2553 2554 // UpdateTime: Output only. The last update timestamp of an 2555 // inspectTemplate. 2556 UpdateTime string `json:"updateTime,omitempty"` 2557 2558 // ServerResponse contains the HTTP response code and headers from the 2559 // server. 2560 googleapi.ServerResponse `json:"-"` 2561 2562 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2563 // unconditionally include in API requests. By default, fields with 2564 // empty or default values are omitted from API requests. However, any 2565 // non-pointer, non-interface field appearing in ForceSendFields will be 2566 // sent to the server regardless of whether the field is empty or not. 2567 // This may be used to include empty fields in Patch requests. 2568 ForceSendFields []string `json:"-"` 2569 2570 // NullFields is a list of field names (e.g. "CreateTime") to include in 2571 // API requests with the JSON null value. By default, fields with empty 2572 // values are omitted from API requests. However, any field with an 2573 // empty value appearing in NullFields will be sent to the server as 2574 // null. It is an error if a field in this list has a non-empty value. 2575 // This may be used to include null fields in Patch requests. 2576 NullFields []string `json:"-"` 2577} 2578 2579func (s *GooglePrivacyDlpV2DeidentifyTemplate) MarshalJSON() ([]byte, error) { 2580 type NoMethod GooglePrivacyDlpV2DeidentifyTemplate 2581 raw := NoMethod(*s) 2582 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2583} 2584 2585// GooglePrivacyDlpV2DeltaPresenceEstimationConfig: δ-presence metric, 2586// used to estimate how likely it is for an attacker to figure out that 2587// one given individual appears in a de-identified dataset. Similarly to 2588// the k-map metric, we cannot compute δ-presence exactly without 2589// knowing the attack dataset, so we use a statistical model instead. 2590type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct { 2591 // AuxiliaryTables: Several auxiliary tables can be used in the 2592 // analysis. Each custom_tag used to tag a quasi-identifiers field must 2593 // appear in exactly one field of one auxiliary table. 2594 AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"` 2595 2596 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 2597 // fields can have the same tag. 2598 QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"` 2599 2600 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 2601 // modeling. Set if no column is tagged with a region-specific InfoType 2602 // (like US_ZIP_5) or a region code. 2603 RegionCode string `json:"regionCode,omitempty"` 2604 2605 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 2606 // unconditionally include in API requests. By default, fields with 2607 // empty or default values are omitted from API requests. However, any 2608 // non-pointer, non-interface field appearing in ForceSendFields will be 2609 // sent to the server regardless of whether the field is empty or not. 2610 // This may be used to include empty fields in Patch requests. 2611 ForceSendFields []string `json:"-"` 2612 2613 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 2614 // include in API requests with the JSON null value. By default, fields 2615 // with empty values are omitted from API requests. However, any field 2616 // with an empty value appearing in NullFields will be sent to the 2617 // server as null. It is an error if a field in this list has a 2618 // non-empty value. This may be used to include null fields in Patch 2619 // requests. 2620 NullFields []string `json:"-"` 2621} 2622 2623func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) { 2624 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig 2625 raw := NoMethod(*s) 2626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2627} 2628 2629// GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A 2630// DeltaPresenceEstimationHistogramBucket message with the following 2631// values: min_probability: 0.1 max_probability: 0.2 frequency: 42 means 2632// that there are 42 records for which δ is in [0.1, 0.2). An important 2633// particular case is when min_probability = max_probability = 1: then, 2634// every individual who shares this quasi-identifier combination is in 2635// the dataset. 2636type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct { 2637 // BucketSize: Number of records within these probability bounds. 2638 BucketSize int64 `json:"bucketSize,omitempty,string"` 2639 2640 // BucketValueCount: Total number of distinct quasi-identifier tuple 2641 // values in this bucket. 2642 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 2643 2644 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 2645 // The total number of classes returned per bucket is capped at 20. 2646 BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"` 2647 2648 // MaxProbability: Always greater than or equal to min_probability. 2649 MaxProbability float64 `json:"maxProbability,omitempty"` 2650 2651 // MinProbability: Between 0 and 1. 2652 MinProbability float64 `json:"minProbability,omitempty"` 2653 2654 // ForceSendFields is a list of field names (e.g. "BucketSize") to 2655 // unconditionally include in API requests. By default, fields with 2656 // empty or default values are omitted from API requests. However, any 2657 // non-pointer, non-interface field appearing in ForceSendFields will be 2658 // sent to the server regardless of whether the field is empty or not. 2659 // This may be used to include empty fields in Patch requests. 2660 ForceSendFields []string `json:"-"` 2661 2662 // NullFields is a list of field names (e.g. "BucketSize") to include in 2663 // API requests with the JSON null value. By default, fields with empty 2664 // values are omitted from API requests. However, any field with an 2665 // empty value appearing in NullFields will be sent to the server as 2666 // null. It is an error if a field in this list has a non-empty value. 2667 // This may be used to include null fields in Patch requests. 2668 NullFields []string `json:"-"` 2669} 2670 2671func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 2672 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2673 raw := NoMethod(*s) 2674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2675} 2676 2677func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error { 2678 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2679 var s1 struct { 2680 MaxProbability gensupport.JSONFloat64 `json:"maxProbability"` 2681 MinProbability gensupport.JSONFloat64 `json:"minProbability"` 2682 *NoMethod 2683 } 2684 s1.NoMethod = (*NoMethod)(s) 2685 if err := json.Unmarshal(data, &s1); err != nil { 2686 return err 2687 } 2688 s.MaxProbability = float64(s1.MaxProbability) 2689 s.MinProbability = float64(s1.MinProbability) 2690 return nil 2691} 2692 2693// GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of 2694// values for the quasi-identifier columns. 2695type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct { 2696 // EstimatedProbability: The estimated probability that a given 2697 // individual sharing these quasi-identifier values is in the dataset. 2698 // This value, typically called δ, is the ratio between the number of 2699 // records in the dataset with these quasi-identifier values, and the 2700 // total number of individuals (inside *and* outside the dataset) with 2701 // these quasi-identifier values. For example, if there are 15 2702 // individuals in the dataset who share the same quasi-identifier 2703 // values, and an estimated 100 people in the entire population with 2704 // these values, then δ is 0.15. 2705 EstimatedProbability float64 `json:"estimatedProbability,omitempty"` 2706 2707 // QuasiIdsValues: The quasi-identifier values. 2708 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 2709 2710 // ForceSendFields is a list of field names (e.g. 2711 // "EstimatedProbability") to unconditionally include in API requests. 2712 // By default, fields with empty or default values are omitted from API 2713 // requests. However, any non-pointer, non-interface field appearing in 2714 // ForceSendFields will be sent to the server regardless of whether the 2715 // field is empty or not. This may be used to include empty fields in 2716 // Patch requests. 2717 ForceSendFields []string `json:"-"` 2718 2719 // NullFields is a list of field names (e.g. "EstimatedProbability") to 2720 // include in API requests with the JSON null value. By default, fields 2721 // with empty values are omitted from API requests. However, any field 2722 // with an empty value appearing in NullFields will be sent to the 2723 // server as null. It is an error if a field in this list has a 2724 // non-empty value. This may be used to include null fields in Patch 2725 // requests. 2726 NullFields []string `json:"-"` 2727} 2728 2729func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 2730 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2731 raw := NoMethod(*s) 2732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2733} 2734 2735func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error { 2736 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2737 var s1 struct { 2738 EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"` 2739 *NoMethod 2740 } 2741 s1.NoMethod = (*NoMethod)(s) 2742 if err := json.Unmarshal(data, &s1); err != nil { 2743 return err 2744 } 2745 s.EstimatedProbability = float64(s1.EstimatedProbability) 2746 return nil 2747} 2748 2749// GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the 2750// δ-presence computation. Note that these results are an estimation, 2751// not exact values. 2752type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct { 2753 // DeltaPresenceEstimationHistogram: The intervals [min_probability, 2754 // max_probability) do not overlap. If a value doesn't correspond to any 2755 // such interval, the associated frequency is zero. For example, the 2756 // following records: {min_probability: 0, max_probability: 0.1, 2757 // frequency: 17} {min_probability: 0.2, max_probability: 0.3, 2758 // frequency: 42} {min_probability: 0.3, max_probability: 0.4, 2759 // frequency: 99} mean that there are no record with an estimated 2760 // probability in [0.1, 0.2) nor larger or equal to 0.4. 2761 DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"` 2762 2763 // ForceSendFields is a list of field names (e.g. 2764 // "DeltaPresenceEstimationHistogram") to unconditionally include in API 2765 // requests. By default, fields with empty or default values are omitted 2766 // from API requests. However, any non-pointer, non-interface field 2767 // appearing in ForceSendFields will be sent to the server regardless of 2768 // whether the field is empty or not. This may be used to include empty 2769 // fields in Patch requests. 2770 ForceSendFields []string `json:"-"` 2771 2772 // NullFields is a list of field names (e.g. 2773 // "DeltaPresenceEstimationHistogram") to include in API requests with 2774 // the JSON null value. By default, fields with empty values are omitted 2775 // from API requests. However, any field with an empty value appearing 2776 // in NullFields will be sent to the server as null. It is an error if a 2777 // field in this list has a non-empty value. This may be used to include 2778 // null fields in Patch requests. 2779 NullFields []string `json:"-"` 2780} 2781 2782func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) { 2783 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult 2784 raw := NoMethod(*s) 2785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2786} 2787 2788// GooglePrivacyDlpV2DetectionRule: Deprecated; use `InspectionRuleSet` 2789// instead. Rule for modifying a `CustomInfoType` to alter behavior 2790// under certain circumstances, depending on the specific details of the 2791// rule. Not supported for the `surrogate_type` custom infoType. 2792type GooglePrivacyDlpV2DetectionRule struct { 2793 // HotwordRule: Hotword-based detection rule. 2794 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 2795 2796 // ForceSendFields is a list of field names (e.g. "HotwordRule") to 2797 // unconditionally include in API requests. By default, fields with 2798 // empty or default values are omitted from API requests. However, any 2799 // non-pointer, non-interface field appearing in ForceSendFields will be 2800 // sent to the server regardless of whether the field is empty or not. 2801 // This may be used to include empty fields in Patch requests. 2802 ForceSendFields []string `json:"-"` 2803 2804 // NullFields is a list of field names (e.g. "HotwordRule") to include 2805 // in API requests with the JSON null value. By default, fields with 2806 // empty values are omitted from API requests. However, any field with 2807 // an empty value appearing in NullFields will be sent to the server as 2808 // null. It is an error if a field in this list has a non-empty value. 2809 // This may be used to include null fields in Patch requests. 2810 NullFields []string `json:"-"` 2811} 2812 2813func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) { 2814 type NoMethod GooglePrivacyDlpV2DetectionRule 2815 raw := NoMethod(*s) 2816 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2817} 2818 2819// GooglePrivacyDlpV2Dictionary: Custom information type based on a 2820// dictionary of words or phrases. This can be used to match sensitive 2821// information specific to the data, such as a list of employee IDs or 2822// job titles. Dictionary words are case-insensitive and all characters 2823// other than letters and digits in the unicode Basic Multilingual Plane 2824// (https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) 2825// will be replaced with whitespace when scanning for matches, so the 2826// dictionary phrase "Sam Johnson" will match all three phrases "sam 2827// johnson", "Sam, Johnson", and "Sam (Johnson)". Additionally, the 2828// characters surrounding any match must be of a different type than the 2829// adjacent characters within the word, so letters must be next to 2830// non-letters and digits next to non-digits. For example, the 2831// dictionary word "jen" will match the first three letters of the text 2832// "jen123" but will return no matches for "jennifer". Dictionary words 2833// containing a large number of characters that are not letters or 2834// digits may result in unexpected findings because such characters are 2835// treated as whitespace. The limits 2836// (https://cloud.google.com/dlp/limits) page contains details about the 2837// size limits of dictionaries. For dictionaries that do not fit within 2838// these constraints, consider using `LargeCustomDictionaryConfig` in 2839// the `StoredInfoType` API. 2840type GooglePrivacyDlpV2Dictionary struct { 2841 // CloudStoragePath: Newline-delimited file of words in Cloud Storage. 2842 // Only a single file is accepted. 2843 CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"` 2844 2845 // WordList: List of words or phrases to search for. 2846 WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` 2847 2848 // ForceSendFields is a list of field names (e.g. "CloudStoragePath") to 2849 // unconditionally include in API requests. By default, fields with 2850 // empty or default values are omitted from API requests. However, any 2851 // non-pointer, non-interface field appearing in ForceSendFields will be 2852 // sent to the server regardless of whether the field is empty or not. 2853 // This may be used to include empty fields in Patch requests. 2854 ForceSendFields []string `json:"-"` 2855 2856 // NullFields is a list of field names (e.g. "CloudStoragePath") to 2857 // include in API requests with the JSON null value. By default, fields 2858 // with empty values are omitted from API requests. However, any field 2859 // with an empty value appearing in NullFields will be sent to the 2860 // server as null. It is an error if a field in this list has a 2861 // non-empty value. This may be used to include null fields in Patch 2862 // requests. 2863 NullFields []string `json:"-"` 2864} 2865 2866func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) { 2867 type NoMethod GooglePrivacyDlpV2Dictionary 2868 raw := NoMethod(*s) 2869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2870} 2871 2872// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP 2873// job. 2874type GooglePrivacyDlpV2DlpJob struct { 2875 // CreateTime: Time when the job was created. 2876 CreateTime string `json:"createTime,omitempty"` 2877 2878 // EndTime: Time when the job finished. 2879 EndTime string `json:"endTime,omitempty"` 2880 2881 // Errors: A stream of errors encountered running the job. 2882 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 2883 2884 // InspectDetails: Results from inspecting a data source. 2885 InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` 2886 2887 // JobTriggerName: If created by a job trigger, the resource name of the 2888 // trigger that instantiated the job. 2889 JobTriggerName string `json:"jobTriggerName,omitempty"` 2890 2891 // Name: The server-assigned name. 2892 Name string `json:"name,omitempty"` 2893 2894 // RiskDetails: Results from analyzing risk of a data source. 2895 RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` 2896 2897 // StartTime: Time when the job started. 2898 StartTime string `json:"startTime,omitempty"` 2899 2900 // State: State of a job. 2901 // 2902 // Possible values: 2903 // "JOB_STATE_UNSPECIFIED" - Unused. 2904 // "PENDING" - The job has not yet started. 2905 // "RUNNING" - The job is currently running. Once a job has finished 2906 // it will transition to FAILED or DONE. 2907 // "DONE" - The job is no longer running. 2908 // "CANCELED" - The job was canceled before it could complete. 2909 // "FAILED" - The job had an error and did not complete. 2910 // "ACTIVE" - The job is currently accepting findings via 2911 // hybridInspect. A hybrid job in ACTIVE state may continue to have 2912 // findings added to it through calling of hybridInspect. After the job 2913 // has finished no more calls to hybridInspect may be made. ACTIVE jobs 2914 // can transition to DONE. 2915 State string `json:"state,omitempty"` 2916 2917 // Type: The type of job. 2918 // 2919 // Possible values: 2920 // "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 2921 // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 2922 // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 2923 Type string `json:"type,omitempty"` 2924 2925 // ServerResponse contains the HTTP response code and headers from the 2926 // server. 2927 googleapi.ServerResponse `json:"-"` 2928 2929 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2930 // unconditionally include in API requests. By default, fields with 2931 // empty or default values are omitted from API requests. However, any 2932 // non-pointer, non-interface field appearing in ForceSendFields will be 2933 // sent to the server regardless of whether the field is empty or not. 2934 // This may be used to include empty fields in Patch requests. 2935 ForceSendFields []string `json:"-"` 2936 2937 // NullFields is a list of field names (e.g. "CreateTime") 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 *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { 2947 type NoMethod GooglePrivacyDlpV2DlpJob 2948 raw := NoMethod(*s) 2949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2950} 2951 2952// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a 2953// document. 2954type GooglePrivacyDlpV2DocumentLocation struct { 2955 // FileOffset: Offset of the line, from the beginning of the file, where 2956 // the finding is located. 2957 FileOffset int64 `json:"fileOffset,omitempty,string"` 2958 2959 // ForceSendFields is a list of field names (e.g. "FileOffset") to 2960 // unconditionally include in API requests. By default, fields with 2961 // empty or default values are omitted from API requests. However, any 2962 // non-pointer, non-interface field appearing in ForceSendFields will be 2963 // sent to the server regardless of whether the field is empty or not. 2964 // This may be used to include empty fields in Patch requests. 2965 ForceSendFields []string `json:"-"` 2966 2967 // NullFields is a list of field names (e.g. "FileOffset") to include in 2968 // API requests with the JSON null value. By default, fields with empty 2969 // values are omitted from API requests. However, any field with an 2970 // empty value appearing in NullFields will be sent to the server as 2971 // null. It is an error if a field in this list has a non-empty value. 2972 // This may be used to include null fields in Patch requests. 2973 NullFields []string `json:"-"` 2974} 2975 2976func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { 2977 type NoMethod GooglePrivacyDlpV2DocumentLocation 2978 raw := NoMethod(*s) 2979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2980} 2981 2982// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set 2983// of fields that correspond to a single person. For example, in medical 2984// records the `EntityId` might be a patient identifier, or for 2985// financial records it might be an account identifier. This message is 2986// used when generalizations or analysis must take into account that 2987// multiple rows correspond to the same entity. 2988type GooglePrivacyDlpV2EntityId struct { 2989 // Field: Composite key indicating which field contains the entity 2990 // identifier. 2991 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 2992 2993 // ForceSendFields is a list of field names (e.g. "Field") to 2994 // unconditionally include in API requests. By default, fields with 2995 // empty or default values are omitted from API requests. However, any 2996 // non-pointer, non-interface field appearing in ForceSendFields will be 2997 // sent to the server regardless of whether the field is empty or not. 2998 // This may be used to include empty fields in Patch requests. 2999 ForceSendFields []string `json:"-"` 3000 3001 // NullFields is a list of field names (e.g. "Field") to include in API 3002 // requests with the JSON null value. By default, fields with empty 3003 // values are omitted from API requests. However, any field with an 3004 // empty value appearing in NullFields will be sent to the server as 3005 // null. It is an error if a field in this list has a non-empty value. 3006 // This may be used to include null fields in Patch requests. 3007 NullFields []string `json:"-"` 3008} 3009 3010func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { 3011 type NoMethod GooglePrivacyDlpV2EntityId 3012 raw := NoMethod(*s) 3013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3014} 3015 3016// GooglePrivacyDlpV2Error: Details information about an error 3017// encountered during job execution or the results of an unsuccessful 3018// activation of the JobTrigger. 3019type GooglePrivacyDlpV2Error struct { 3020 // Details: Detailed error codes and messages. 3021 Details *GoogleRpcStatus `json:"details,omitempty"` 3022 3023 // Timestamps: The times the error occurred. 3024 Timestamps []string `json:"timestamps,omitempty"` 3025 3026 // ForceSendFields is a list of field names (e.g. "Details") to 3027 // unconditionally include in API requests. By default, fields with 3028 // empty or default values are omitted from API requests. However, any 3029 // non-pointer, non-interface field appearing in ForceSendFields will be 3030 // sent to the server regardless of whether the field is empty or not. 3031 // This may be used to include empty fields in Patch requests. 3032 ForceSendFields []string `json:"-"` 3033 3034 // NullFields is a list of field names (e.g. "Details") to include in 3035 // API requests with the JSON null value. By default, fields with empty 3036 // values are omitted from API requests. However, any field with an 3037 // empty value appearing in NullFields will be sent to the server as 3038 // null. It is an error if a field in this list has a non-empty value. 3039 // This may be used to include null fields in Patch requests. 3040 NullFields []string `json:"-"` 3041} 3042 3043func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { 3044 type NoMethod GooglePrivacyDlpV2Error 3045 raw := NoMethod(*s) 3046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3047} 3048 3049// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes. 3050type GooglePrivacyDlpV2ExcludeInfoTypes struct { 3051 // InfoTypes: InfoType list in ExclusionRule rule drops a finding when 3052 // it overlaps or contained within with a finding of an infoType from 3053 // this list. For example, for `InspectionRuleSet.info_types` containing 3054 // "PHONE_NUMBER" and `exclusion_rule` containing 3055 // `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number 3056 // findings are dropped if they overlap with EMAIL_ADDRESS finding. That 3057 // leads to "555-222-2222@example.org" to generate only a single 3058 // finding, namely email address. 3059 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3060 3061 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3062 // unconditionally include in API requests. By default, fields with 3063 // empty or default values are omitted from API requests. However, any 3064 // non-pointer, non-interface field appearing in ForceSendFields will be 3065 // sent to the server regardless of whether the field is empty or not. 3066 // This may be used to include empty fields in Patch requests. 3067 ForceSendFields []string `json:"-"` 3068 3069 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3070 // API requests with the JSON null value. By default, fields with empty 3071 // values are omitted from API requests. However, any field with an 3072 // empty value appearing in NullFields will be sent to the server as 3073 // null. It is an error if a field in this list has a non-empty value. 3074 // This may be used to include null fields in Patch requests. 3075 NullFields []string `json:"-"` 3076} 3077 3078func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { 3079 type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes 3080 raw := NoMethod(*s) 3081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3082} 3083 3084// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions 3085// when findings of infoTypes specified in `InspectionRuleSet` are 3086// removed from results. 3087type GooglePrivacyDlpV2ExclusionRule struct { 3088 // Dictionary: Dictionary which defines the rule. 3089 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 3090 3091 // ExcludeInfoTypes: Set of infoTypes for which findings would affect 3092 // this rule. 3093 ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` 3094 3095 // MatchingType: How the rule is applied, see MatchingType documentation 3096 // for details. 3097 // 3098 // Possible values: 3099 // "MATCHING_TYPE_UNSPECIFIED" - Invalid. 3100 // "MATCHING_TYPE_FULL_MATCH" - Full match. - Dictionary: join of 3101 // Dictionary results matched complete finding quote - Regex: all regex 3102 // matches fill a finding quote start to end - Exclude info type: 3103 // completely inside affecting info types findings 3104 // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. - Dictionary: at 3105 // least one of the tokens in the finding matches - Regex: substring of 3106 // the finding matches - Exclude info type: intersects with affecting 3107 // info types findings 3108 // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. - Dictionary: no 3109 // tokens in the finding match the dictionary - Regex: finding doesn't 3110 // match the regex - Exclude info type: no intersection with affecting 3111 // info types findings 3112 MatchingType string `json:"matchingType,omitempty"` 3113 3114 // Regex: Regular expression which defines the rule. 3115 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 3116 3117 // ForceSendFields is a list of field names (e.g. "Dictionary") to 3118 // unconditionally include in API requests. By default, fields with 3119 // empty or default values are omitted from API requests. However, any 3120 // non-pointer, non-interface field appearing in ForceSendFields will be 3121 // sent to the server regardless of whether the field is empty or not. 3122 // This may be used to include empty fields in Patch requests. 3123 ForceSendFields []string `json:"-"` 3124 3125 // NullFields is a list of field names (e.g. "Dictionary") to include in 3126 // API requests with the JSON null value. By default, fields with empty 3127 // values are omitted from API requests. However, any field with an 3128 // empty value appearing in NullFields will be sent to the server as 3129 // null. It is an error if a field in this list has a non-empty value. 3130 // This may be used to include null fields in Patch requests. 3131 NullFields []string `json:"-"` 3132} 3133 3134func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { 3135 type NoMethod GooglePrivacyDlpV2ExclusionRule 3136 raw := NoMethod(*s) 3137 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3138} 3139 3140// GooglePrivacyDlpV2Expressions: An expression, consisting or an 3141// operator and conditions. 3142type GooglePrivacyDlpV2Expressions struct { 3143 // Conditions: Conditions to apply to the expression. 3144 Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` 3145 3146 // LogicalOperator: The operator to apply to the result of conditions. 3147 // Default and currently only supported value is `AND`. 3148 // 3149 // Possible values: 3150 // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused 3151 // "AND" - Conditional AND 3152 LogicalOperator string `json:"logicalOperator,omitempty"` 3153 3154 // ForceSendFields is a list of field names (e.g. "Conditions") to 3155 // unconditionally include in API requests. By default, fields with 3156 // empty or default values are omitted from API requests. However, any 3157 // non-pointer, non-interface field appearing in ForceSendFields will be 3158 // sent to the server regardless of whether the field is empty or not. 3159 // This may be used to include empty fields in Patch requests. 3160 ForceSendFields []string `json:"-"` 3161 3162 // NullFields is a list of field names (e.g. "Conditions") to include in 3163 // API requests with the JSON null value. By default, fields with empty 3164 // values are omitted from API requests. However, any field with an 3165 // empty value appearing in NullFields will be sent to the server as 3166 // null. It is an error if a field in this list has a non-empty value. 3167 // This may be used to include null fields in Patch requests. 3168 NullFields []string `json:"-"` 3169} 3170 3171func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { 3172 type NoMethod GooglePrivacyDlpV2Expressions 3173 raw := NoMethod(*s) 3174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3175} 3176 3177// GooglePrivacyDlpV2FieldId: General identifier of a data field in a 3178// storage service. 3179type GooglePrivacyDlpV2FieldId struct { 3180 // Name: Name describing the field. 3181 Name string `json:"name,omitempty"` 3182 3183 // ForceSendFields is a list of field names (e.g. "Name") to 3184 // unconditionally include in API requests. By default, fields with 3185 // empty or default values are omitted from API requests. However, any 3186 // non-pointer, non-interface field appearing in ForceSendFields will be 3187 // sent to the server regardless of whether the field is empty or not. 3188 // This may be used to include empty fields in Patch requests. 3189 ForceSendFields []string `json:"-"` 3190 3191 // NullFields is a list of field names (e.g. "Name") to include in API 3192 // requests with the JSON null value. By default, fields with empty 3193 // values are omitted from API requests. However, any field with an 3194 // empty value appearing in NullFields will be sent to the server as 3195 // null. It is an error if a field in this list has a non-empty value. 3196 // This may be used to include null fields in Patch requests. 3197 NullFields []string `json:"-"` 3198} 3199 3200func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { 3201 type NoMethod GooglePrivacyDlpV2FieldId 3202 raw := NoMethod(*s) 3203 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3204} 3205 3206// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to 3207// the field. 3208type GooglePrivacyDlpV2FieldTransformation struct { 3209 // Condition: Only apply the transformation if the condition evaluates 3210 // to true for the given `RecordCondition`. The conditions are allowed 3211 // to reference fields that are not used in the actual transformation. 3212 // Example Use Cases: - Apply a different bucket transformation to an 3213 // age column if the zip code column for the same record is within a 3214 // specific range. - Redact a field if the date of birth field is 3215 // greater than 85. 3216 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 3217 3218 // Fields: Required. Input field(s) to apply the transformation to. When 3219 // you have columns that reference their position within a list, omit 3220 // the index from the FieldId. FieldId name matching ignores the index. 3221 // For example, instead of "contact.nums[0].type", use 3222 // "contact.nums.type". 3223 Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` 3224 3225 // InfoTypeTransformations: Treat the contents of the field as free 3226 // text, and selectively transform content that matches an `InfoType`. 3227 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 3228 3229 // PrimitiveTransformation: Apply the transformation to the entire 3230 // field. 3231 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3232 3233 // ForceSendFields is a list of field names (e.g. "Condition") to 3234 // unconditionally include in API requests. By default, fields with 3235 // empty or default values are omitted from API requests. However, any 3236 // non-pointer, non-interface field appearing in ForceSendFields will be 3237 // sent to the server regardless of whether the field is empty or not. 3238 // This may be used to include empty fields in Patch requests. 3239 ForceSendFields []string `json:"-"` 3240 3241 // NullFields is a list of field names (e.g. "Condition") to include in 3242 // API requests with the JSON null value. By default, fields with empty 3243 // values are omitted from API requests. However, any field with an 3244 // empty value appearing in NullFields will be sent to the server as 3245 // null. It is an error if a field in this list has a non-empty value. 3246 // This may be used to include null fields in Patch requests. 3247 NullFields []string `json:"-"` 3248} 3249 3250func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { 3251 type NoMethod GooglePrivacyDlpV2FieldTransformation 3252 raw := NoMethod(*s) 3253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3254} 3255 3256// GooglePrivacyDlpV2FileSet: Set of files to scan. 3257type GooglePrivacyDlpV2FileSet struct { 3258 // RegexFileSet: The regex-filtered set of files to scan. Exactly one of 3259 // `url` or `regex_file_set` must be set. 3260 RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` 3261 3262 // Url: The Cloud Storage url of the file(s) to scan, in the format 3263 // `gs:///`. Trailing wildcard in the path is allowed. If the url ends 3264 // in a trailing slash, the bucket or directory represented by the url 3265 // will be scanned non-recursively (content in sub-directories will not 3266 // be scanned). This means that `gs://mybucket/` is equivalent to 3267 // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to 3268 // `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` 3269 // must be set. 3270 Url string `json:"url,omitempty"` 3271 3272 // ForceSendFields is a list of field names (e.g. "RegexFileSet") to 3273 // unconditionally include in API requests. By default, fields with 3274 // empty or default values are omitted from API requests. However, any 3275 // non-pointer, non-interface field appearing in ForceSendFields will be 3276 // sent to the server regardless of whether the field is empty or not. 3277 // This may be used to include empty fields in Patch requests. 3278 ForceSendFields []string `json:"-"` 3279 3280 // NullFields is a list of field names (e.g. "RegexFileSet") to include 3281 // in API requests with the JSON null value. By default, fields with 3282 // empty values are omitted from API requests. However, any field with 3283 // an empty value appearing in NullFields will be sent to the server as 3284 // null. It is an error if a field in this list has a non-empty value. 3285 // This may be used to include null fields in Patch requests. 3286 NullFields []string `json:"-"` 3287} 3288 3289func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { 3290 type NoMethod GooglePrivacyDlpV2FileSet 3291 raw := NoMethod(*s) 3292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3293} 3294 3295// GooglePrivacyDlpV2Finding: Represents a piece of potentially 3296// sensitive content. 3297type GooglePrivacyDlpV2Finding struct { 3298 // CreateTime: Timestamp when finding was detected. 3299 CreateTime string `json:"createTime,omitempty"` 3300 3301 // FindingId: The unique finding id. 3302 FindingId string `json:"findingId,omitempty"` 3303 3304 // InfoType: The type of content that might have been found. Provided if 3305 // `excluded_types` is false. 3306 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3307 3308 // JobCreateTime: Time the job started that produced this finding. 3309 JobCreateTime string `json:"jobCreateTime,omitempty"` 3310 3311 // JobName: The job that stored the finding. 3312 JobName string `json:"jobName,omitempty"` 3313 3314 // Labels: The labels associated with this `Finding`. Label keys must be 3315 // between 1 and 63 characters long and must conform to the following 3316 // regular expression: `a-z ([-a-z0-9]*[a-z0-9])?`. Label values must be 3317 // between 0 and 63 characters long and must conform to the regular 3318 // expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels 3319 // can be associated with a given finding. Examples: * "environment" : 3320 // "production" * "pipeline" : "etl" 3321 Labels map[string]string `json:"labels,omitempty"` 3322 3323 // Likelihood: Confidence of how likely it is that the `info_type` is 3324 // correct. 3325 // 3326 // Possible values: 3327 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 3328 // "VERY_UNLIKELY" - Few matching elements. 3329 // "UNLIKELY" 3330 // "POSSIBLE" - Some matching elements. 3331 // "LIKELY" 3332 // "VERY_LIKELY" - Many matching elements. 3333 Likelihood string `json:"likelihood,omitempty"` 3334 3335 // Location: Where the content was found. 3336 Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` 3337 3338 // Name: Resource name in format 3339 // projects/{project}/locations/{location}/findings/{finding} Populated 3340 // only when viewing persisted findings. 3341 Name string `json:"name,omitempty"` 3342 3343 // Quote: The content that was found. Even if the content is not 3344 // textual, it may be converted to a textual representation here. 3345 // Provided if `include_quote` is true and the finding is less than or 3346 // equal to 4096 bytes long. If the finding exceeds 4096 bytes in 3347 // length, the quote may be omitted. 3348 Quote string `json:"quote,omitempty"` 3349 3350 // QuoteInfo: Contains data parsed from quotes. Only populated if 3351 // include_quote was set to true and a supported infoType was requested. 3352 // Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. 3353 QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` 3354 3355 // ResourceName: The job that stored the finding. 3356 ResourceName string `json:"resourceName,omitempty"` 3357 3358 // TriggerName: Job trigger name, if applicable, for this finding. 3359 TriggerName string `json:"triggerName,omitempty"` 3360 3361 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3362 // unconditionally include in API requests. By default, fields with 3363 // empty or default values are omitted from API requests. However, any 3364 // non-pointer, non-interface field appearing in ForceSendFields will be 3365 // sent to the server regardless of whether the field is empty or not. 3366 // This may be used to include empty fields in Patch requests. 3367 ForceSendFields []string `json:"-"` 3368 3369 // NullFields is a list of field names (e.g. "CreateTime") to include in 3370 // API requests with the JSON null value. By default, fields with empty 3371 // values are omitted from API requests. However, any field with an 3372 // empty value appearing in NullFields will be sent to the server as 3373 // null. It is an error if a field in this list has a non-empty value. 3374 // This may be used to include null fields in Patch requests. 3375 NullFields []string `json:"-"` 3376} 3377 3378func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { 3379 type NoMethod GooglePrivacyDlpV2Finding 3380 raw := NoMethod(*s) 3381 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3382} 3383 3384// GooglePrivacyDlpV2FindingLimits: Configuration to control the number 3385// of findings returned. Cannot be set if de-identification is 3386// requested. 3387type GooglePrivacyDlpV2FindingLimits struct { 3388 // MaxFindingsPerInfoType: Configuration of findings limit given for 3389 // specified infoTypes. 3390 MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` 3391 3392 // MaxFindingsPerItem: Max number of findings that will be returned for 3393 // each item scanned. When set within `InspectJobConfig`, the maximum 3394 // returned is 2000 regardless if this is set higher. When set within 3395 // `InspectContentRequest`, this field is ignored. 3396 MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` 3397 3398 // MaxFindingsPerRequest: Max number of findings that will be returned 3399 // per request/job. When set within `InspectContentRequest`, the maximum 3400 // returned is 2000 regardless if this is set higher. 3401 MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` 3402 3403 // ForceSendFields is a list of field names (e.g. 3404 // "MaxFindingsPerInfoType") to unconditionally include in API requests. 3405 // By default, fields with empty or default values are omitted from API 3406 // requests. However, any non-pointer, non-interface field appearing in 3407 // ForceSendFields will be sent to the server regardless of whether the 3408 // field is empty or not. This may be used to include empty fields in 3409 // Patch requests. 3410 ForceSendFields []string `json:"-"` 3411 3412 // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") 3413 // to include in API requests with the JSON null value. By default, 3414 // fields with empty values are omitted from API requests. However, any 3415 // field with an empty value appearing in NullFields will be sent to the 3416 // server as null. It is an error if a field in this list has a 3417 // non-empty value. This may be used to include null fields in Patch 3418 // requests. 3419 NullFields []string `json:"-"` 3420} 3421 3422func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { 3423 type NoMethod GooglePrivacyDlpV2FindingLimits 3424 raw := NoMethod(*s) 3425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3426} 3427 3428// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for 3429// finishing a DLP hybrid job. 3430type GooglePrivacyDlpV2FinishDlpJobRequest struct { 3431} 3432 3433// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on 3434// fixed size ranges. The Bucketing transformation can provide all of 3435// this functionality, but requires more configuration. This message is 3436// provided as a convenience to the user for simple bucketing 3437// strategies. The transformed value will be a hyphenated string of 3438// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and 3439// upper_bound = 20, all values that are within this bucket will be 3440// replaced with "10-20". This can be used on data of type: double, 3441// long. If the bound Value type differs from the type of data being 3442// transformed, we will first attempt converting the type of the data to 3443// be transformed to match the type of the bound before comparing. See 3444// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 3445type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { 3446 // BucketSize: Required. Size of each bucket (except for minimum and 3447 // maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and 3448 // `bucket_size` = 10, then the following buckets would be used: -10, 3449 // 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. 3450 // Precision up to 2 decimals works. 3451 BucketSize float64 `json:"bucketSize,omitempty"` 3452 3453 // LowerBound: Required. Lower bound value of buckets. All values less 3454 // than `lower_bound` are grouped together into a single bucket; for 3455 // example if `lower_bound` = 10, then all values less than 10 are 3456 // replaced with the value "-10". 3457 LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` 3458 3459 // UpperBound: Required. Upper bound value of buckets. All values 3460 // greater than upper_bound are grouped together into a single bucket; 3461 // for example if `upper_bound` = 89, then all values greater than 89 3462 // are replaced with the value "89+". 3463 UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` 3464 3465 // ForceSendFields is a list of field names (e.g. "BucketSize") to 3466 // unconditionally include in API requests. By default, fields with 3467 // empty or default values are omitted from API requests. However, any 3468 // non-pointer, non-interface field appearing in ForceSendFields will be 3469 // sent to the server regardless of whether the field is empty or not. 3470 // This may be used to include empty fields in Patch requests. 3471 ForceSendFields []string `json:"-"` 3472 3473 // NullFields is a list of field names (e.g. "BucketSize") to include in 3474 // API requests with the JSON null value. By default, fields with empty 3475 // values are omitted from API requests. However, any field with an 3476 // empty value appearing in NullFields will be sent to the server as 3477 // null. It is an error if a field in this list has a non-empty value. 3478 // This may be used to include null fields in Patch requests. 3479 NullFields []string `json:"-"` 3480} 3481 3482func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { 3483 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3484 raw := NoMethod(*s) 3485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3486} 3487 3488func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { 3489 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3490 var s1 struct { 3491 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 3492 *NoMethod 3493 } 3494 s1.NoMethod = (*NoMethod)(s) 3495 if err := json.Unmarshal(data, &s1); err != nil { 3496 return err 3497 } 3498 s.BucketSize = float64(s1.BucketSize) 3499 return nil 3500} 3501 3502// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood 3503// of findings within a certain proximity of hotwords. 3504type GooglePrivacyDlpV2HotwordRule struct { 3505 // HotwordRegex: Regular expression pattern defining what qualifies as a 3506 // hotword. 3507 HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` 3508 3509 // LikelihoodAdjustment: Likelihood adjustment to apply to all matching 3510 // findings. 3511 LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` 3512 3513 // Proximity: Proximity of the finding within which the entire hotword 3514 // must reside. The total length of the window cannot exceed 1000 3515 // characters. Note that the finding itself will be included in the 3516 // window, so that hotwords may be used to match substrings of the 3517 // finding itself. For example, the certainty of a phone number regex 3518 // "\(\d{3}\) \d{3}-\d{4}" could be adjusted upwards if the area code is 3519 // known to be the local area code of a company office using the hotword 3520 // regex "\(xxx\)", where "xxx" is the area code in question. 3521 Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` 3522 3523 // ForceSendFields is a list of field names (e.g. "HotwordRegex") to 3524 // unconditionally include in API requests. By default, fields with 3525 // empty or default values are omitted from API requests. However, any 3526 // non-pointer, non-interface field appearing in ForceSendFields will be 3527 // sent to the server regardless of whether the field is empty or not. 3528 // This may be used to include empty fields in Patch requests. 3529 ForceSendFields []string `json:"-"` 3530 3531 // NullFields is a list of field names (e.g. "HotwordRegex") to include 3532 // in API requests with the JSON null value. By default, fields with 3533 // empty values are omitted from API requests. However, any field with 3534 // an empty value appearing in NullFields will be sent to the server as 3535 // null. It is an error if a field in this list has a non-empty value. 3536 // This may be used to include null fields in Patch requests. 3537 NullFields []string `json:"-"` 3538} 3539 3540func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { 3541 type NoMethod GooglePrivacyDlpV2HotwordRule 3542 raw := NoMethod(*s) 3543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3544} 3545 3546// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to 3547// inspect. Will be stored temporarily during processing. 3548type GooglePrivacyDlpV2HybridContentItem struct { 3549 // FindingDetails: Supplementary information that will be added to each 3550 // finding. 3551 FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"` 3552 3553 // Item: The item to inspect. 3554 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 3555 3556 // ForceSendFields is a list of field names (e.g. "FindingDetails") to 3557 // unconditionally include in API requests. By default, fields with 3558 // empty or default values are omitted from API requests. However, any 3559 // non-pointer, non-interface field appearing in ForceSendFields will be 3560 // sent to the server regardless of whether the field is empty or not. 3561 // This may be used to include empty fields in Patch requests. 3562 ForceSendFields []string `json:"-"` 3563 3564 // NullFields is a list of field names (e.g. "FindingDetails") to 3565 // include in API requests with the JSON null value. By default, fields 3566 // with empty values are omitted from API requests. However, any field 3567 // with an empty value appearing in NullFields will be sent to the 3568 // server as null. It is an error if a field in this list has a 3569 // non-empty value. This may be used to include null fields in Patch 3570 // requests. 3571 NullFields []string `json:"-"` 3572} 3573 3574func (s *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) { 3575 type NoMethod GooglePrivacyDlpV2HybridContentItem 3576 raw := NoMethod(*s) 3577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3578} 3579 3580// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate 3581// additional data with each finding. 3582type GooglePrivacyDlpV2HybridFindingDetails struct { 3583 // ContainerDetails: Details about the container where the content being 3584 // inspected is from. 3585 ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"` 3586 3587 // FileOffset: Offset in bytes of the line, from the beginning of the 3588 // file, where the finding is located. Populate if the item being 3589 // scanned is only part of a bigger item, such as a shard of a file and 3590 // you want to track the absolute position of the finding. 3591 FileOffset int64 `json:"fileOffset,omitempty,string"` 3592 3593 // Labels: Labels to represent user provided metadata about the data 3594 // being inspected. If configured by the job, some key values may be 3595 // required. The labels associated with `Finding`'s produced by hybrid 3596 // inspection. Label keys must be between 1 and 63 characters long and 3597 // must conform to the following regular expression: `a-z 3598 // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3599 // characters long and must conform to the regular expression 3600 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3601 // associated with a given finding. Examples: * "environment" : 3602 // "production" * "pipeline" : "etl" 3603 Labels map[string]string `json:"labels,omitempty"` 3604 3605 // RowOffset: Offset of the row for tables. Populate if the row(s) being 3606 // scanned are part of a bigger dataset and you want to keep track of 3607 // their absolute position. 3608 RowOffset int64 `json:"rowOffset,omitempty,string"` 3609 3610 // TableOptions: If the container is a table, additional information to 3611 // make findings meaningful such as the columns that are primary keys. 3612 // If not known ahead of time, can also be set within each inspect 3613 // hybrid call and the two will be merged. Note that identifying_fields 3614 // will only be stored to BigQuery, and only if the BigQuery action has 3615 // been included. 3616 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3617 3618 // ForceSendFields is a list of field names (e.g. "ContainerDetails") to 3619 // unconditionally include in API requests. By default, fields with 3620 // empty or default values are omitted from API requests. However, any 3621 // non-pointer, non-interface field appearing in ForceSendFields will be 3622 // sent to the server regardless of whether the field is empty or not. 3623 // This may be used to include empty fields in Patch requests. 3624 ForceSendFields []string `json:"-"` 3625 3626 // NullFields is a list of field names (e.g. "ContainerDetails") to 3627 // include in API requests with the JSON null value. By default, fields 3628 // with empty values are omitted from API requests. However, any field 3629 // with an empty value appearing in NullFields will be sent to the 3630 // server as null. It is an error if a field in this list has a 3631 // non-empty value. This may be used to include null fields in Patch 3632 // requests. 3633 NullFields []string `json:"-"` 3634} 3635 3636func (s *GooglePrivacyDlpV2HybridFindingDetails) MarshalJSON() ([]byte, error) { 3637 type NoMethod GooglePrivacyDlpV2HybridFindingDetails 3638 raw := NoMethod(*s) 3639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3640} 3641 3642// GooglePrivacyDlpV2HybridInspectDlpJobRequest: Request to search for 3643// potentially sensitive info in a custom location. 3644type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { 3645 // HybridItem: The item to inspect. 3646 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3647 3648 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3649 // unconditionally include in API requests. By default, fields with 3650 // empty or default values are omitted from API requests. However, any 3651 // non-pointer, non-interface field appearing in ForceSendFields will be 3652 // sent to the server regardless of whether the field is empty or not. 3653 // This may be used to include empty fields in Patch requests. 3654 ForceSendFields []string `json:"-"` 3655 3656 // NullFields is a list of field names (e.g. "HybridItem") to include in 3657 // API requests with the JSON null value. By default, fields with empty 3658 // values are omitted from API requests. However, any field with an 3659 // empty value appearing in NullFields will be sent to the server as 3660 // null. It is an error if a field in this list has a non-empty value. 3661 // This may be used to include null fields in Patch requests. 3662 NullFields []string `json:"-"` 3663} 3664 3665func (s *GooglePrivacyDlpV2HybridInspectDlpJobRequest) MarshalJSON() ([]byte, error) { 3666 type NoMethod GooglePrivacyDlpV2HybridInspectDlpJobRequest 3667 raw := NoMethod(*s) 3668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3669} 3670 3671// GooglePrivacyDlpV2HybridInspectJobTriggerRequest: Request to search 3672// for potentially sensitive info in a custom location. 3673type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { 3674 // HybridItem: The item to inspect. 3675 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3676 3677 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3678 // unconditionally include in API requests. By default, fields with 3679 // empty or default values are omitted from API requests. However, any 3680 // non-pointer, non-interface field appearing in ForceSendFields will be 3681 // sent to the server regardless of whether the field is empty or not. 3682 // This may be used to include empty fields in Patch requests. 3683 ForceSendFields []string `json:"-"` 3684 3685 // NullFields is a list of field names (e.g. "HybridItem") to include in 3686 // API requests with the JSON null value. By default, fields with empty 3687 // values are omitted from API requests. However, any field with an 3688 // empty value appearing in NullFields will be sent to the server as 3689 // null. It is an error if a field in this list has a non-empty value. 3690 // This may be used to include null fields in Patch requests. 3691 NullFields []string `json:"-"` 3692} 3693 3694func (s *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) MarshalJSON() ([]byte, error) { 3695 type NoMethod GooglePrivacyDlpV2HybridInspectJobTriggerRequest 3696 raw := NoMethod(*s) 3697 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3698} 3699 3700// GooglePrivacyDlpV2HybridInspectResponse: Quota exceeded errors will 3701// be thrown once quota has been met. 3702type GooglePrivacyDlpV2HybridInspectResponse struct { 3703 // ServerResponse contains the HTTP response code and headers from the 3704 // server. 3705 googleapi.ServerResponse `json:"-"` 3706} 3707 3708// GooglePrivacyDlpV2HybridInspectStatistics: Statistics related to 3709// processing hybrid inspect requests. 3710type GooglePrivacyDlpV2HybridInspectStatistics struct { 3711 // AbortedCount: The number of hybrid inspection requests aborted 3712 // because the job ran out of quota or was ended before they could be 3713 // processed. 3714 AbortedCount int64 `json:"abortedCount,omitempty,string"` 3715 3716 // PendingCount: The number of hybrid requests currently being 3717 // processed. Only populated when called via method `getDlpJob`. A burst 3718 // of traffic may cause hybrid inspect requests to be enqueued. 3719 // Processing will take place as quickly as possible, but resource 3720 // limitations may impact how long a request is enqueued for. 3721 PendingCount int64 `json:"pendingCount,omitempty,string"` 3722 3723 // ProcessedCount: The number of hybrid inspection requests processed 3724 // within this job. 3725 ProcessedCount int64 `json:"processedCount,omitempty,string"` 3726 3727 // ForceSendFields is a list of field names (e.g. "AbortedCount") to 3728 // unconditionally include in API requests. By default, fields with 3729 // empty or default values are omitted from API requests. However, any 3730 // non-pointer, non-interface field appearing in ForceSendFields will be 3731 // sent to the server regardless of whether the field is empty or not. 3732 // This may be used to include empty fields in Patch requests. 3733 ForceSendFields []string `json:"-"` 3734 3735 // NullFields is a list of field names (e.g. "AbortedCount") to include 3736 // in API requests with the JSON null value. By default, fields with 3737 // empty values are omitted from API requests. However, any field with 3738 // an empty value appearing in NullFields will be sent to the server as 3739 // null. It is an error if a field in this list has a non-empty value. 3740 // This may be used to include null fields in Patch requests. 3741 NullFields []string `json:"-"` 3742} 3743 3744func (s *GooglePrivacyDlpV2HybridInspectStatistics) MarshalJSON() ([]byte, error) { 3745 type NoMethod GooglePrivacyDlpV2HybridInspectStatistics 3746 raw := NoMethod(*s) 3747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3748} 3749 3750// GooglePrivacyDlpV2HybridOptions: Configuration to control jobs where 3751// the content being inspected is outside of Google Cloud Platform. 3752type GooglePrivacyDlpV2HybridOptions struct { 3753 // Description: A short description of where the data is coming from. 3754 // Will be stored once in the job. 256 max length. 3755 Description string `json:"description,omitempty"` 3756 3757 // Labels: To organize findings, these labels will be added to each 3758 // finding. Label keys must be between 1 and 63 characters long and must 3759 // conform to the following regular expression: `a-z 3760 // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3761 // characters long and must conform to the regular expression 3762 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3763 // associated with a given finding. Examples: * "environment" : 3764 // "production" * "pipeline" : "etl" 3765 Labels map[string]string `json:"labels,omitempty"` 3766 3767 // RequiredFindingLabelKeys: These are labels that each inspection 3768 // request must include within their 'finding_labels' map. Request may 3769 // contain others, but any missing one of these will be rejected. Label 3770 // keys must be between 1 and 63 characters long and must conform to the 3771 // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more 3772 // than 10 keys can be required. 3773 RequiredFindingLabelKeys []string `json:"requiredFindingLabelKeys,omitempty"` 3774 3775 // TableOptions: If the container is a table, additional information to 3776 // make findings meaningful such as the columns that are primary keys. 3777 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3778 3779 // ForceSendFields is a list of field names (e.g. "Description") to 3780 // unconditionally include in API requests. By default, fields with 3781 // empty or default values are omitted from API requests. However, any 3782 // non-pointer, non-interface field appearing in ForceSendFields will be 3783 // sent to the server regardless of whether the field is empty or not. 3784 // This may be used to include empty fields in Patch requests. 3785 ForceSendFields []string `json:"-"` 3786 3787 // NullFields is a list of field names (e.g. "Description") to include 3788 // in API requests with the JSON null value. By default, fields with 3789 // empty values are omitted from API requests. However, any field with 3790 // an empty value appearing in NullFields will be sent to the server as 3791 // null. It is an error if a field in this list has a non-empty value. 3792 // This may be used to include null fields in Patch requests. 3793 NullFields []string `json:"-"` 3794} 3795 3796func (s *GooglePrivacyDlpV2HybridOptions) MarshalJSON() ([]byte, error) { 3797 type NoMethod GooglePrivacyDlpV2HybridOptions 3798 raw := NoMethod(*s) 3799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3800} 3801 3802// GooglePrivacyDlpV2ImageLocation: Location of the finding within an 3803// image. 3804type GooglePrivacyDlpV2ImageLocation struct { 3805 // BoundingBoxes: Bounding boxes locating the pixels within the image 3806 // containing the finding. 3807 BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` 3808 3809 // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to 3810 // unconditionally include in API requests. By default, fields with 3811 // empty or default values are omitted from API requests. However, any 3812 // non-pointer, non-interface field appearing in ForceSendFields will be 3813 // sent to the server regardless of whether the field is empty or not. 3814 // This may be used to include empty fields in Patch requests. 3815 ForceSendFields []string `json:"-"` 3816 3817 // NullFields is a list of field names (e.g. "BoundingBoxes") to include 3818 // in API requests with the JSON null value. By default, fields with 3819 // empty values are omitted from API requests. However, any field with 3820 // an empty value appearing in NullFields will be sent to the server as 3821 // null. It is an error if a field in this list has a non-empty value. 3822 // This may be used to include null fields in Patch requests. 3823 NullFields []string `json:"-"` 3824} 3825 3826func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { 3827 type NoMethod GooglePrivacyDlpV2ImageLocation 3828 raw := NoMethod(*s) 3829 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3830} 3831 3832// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining 3833// how redaction of images should occur. 3834type GooglePrivacyDlpV2ImageRedactionConfig struct { 3835 // InfoType: Only one per info_type should be provided per request. If 3836 // not specified, and redact_all_text is false, the DLP API will redact 3837 // all text that it matches against all info_types that are found, but 3838 // not specified in another ImageRedactionConfig. 3839 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3840 3841 // RedactAllText: If true, all text found in the image, regardless 3842 // whether it matches an info_type, is redacted. Only one should be 3843 // provided. 3844 RedactAllText bool `json:"redactAllText,omitempty"` 3845 3846 // RedactionColor: The color to use when redacting content from an 3847 // image. If not specified, the default is black. 3848 RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` 3849 3850 // ForceSendFields is a list of field names (e.g. "InfoType") to 3851 // unconditionally include in API requests. By default, fields with 3852 // empty or default values are omitted from API requests. However, any 3853 // non-pointer, non-interface field appearing in ForceSendFields will be 3854 // sent to the server regardless of whether the field is empty or not. 3855 // This may be used to include empty fields in Patch requests. 3856 ForceSendFields []string `json:"-"` 3857 3858 // NullFields is a list of field names (e.g. "InfoType") to include in 3859 // API requests with the JSON null value. By default, fields with empty 3860 // values are omitted from API requests. However, any field with an 3861 // empty value appearing in NullFields will be sent to the server as 3862 // null. It is an error if a field in this list has a non-empty value. 3863 // This may be used to include null fields in Patch requests. 3864 NullFields []string `json:"-"` 3865} 3866 3867func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { 3868 type NoMethod GooglePrivacyDlpV2ImageRedactionConfig 3869 raw := NoMethod(*s) 3870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3871} 3872 3873// GooglePrivacyDlpV2InfoType: Type of information detected by the API. 3874type GooglePrivacyDlpV2InfoType struct { 3875 // Name: Name of the information type. Either a name of your choosing 3876 // when creating a CustomInfoType, or one of the names listed at 3877 // https://cloud.google.com/dlp/docs/infotypes-reference when specifying 3878 // a built-in type. When sending Cloud DLP results to Data Catalog, 3879 // infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. 3880 Name string `json:"name,omitempty"` 3881 3882 // Version: Optional version name for this InfoType. 3883 Version string `json:"version,omitempty"` 3884 3885 // ForceSendFields is a list of field names (e.g. "Name") to 3886 // unconditionally include in API requests. By default, fields with 3887 // empty or default values are omitted from API requests. However, any 3888 // non-pointer, non-interface field appearing in ForceSendFields will be 3889 // sent to the server regardless of whether the field is empty or not. 3890 // This may be used to include empty fields in Patch requests. 3891 ForceSendFields []string `json:"-"` 3892 3893 // NullFields is a list of field names (e.g. "Name") to include in API 3894 // requests with the JSON null value. By default, fields with empty 3895 // values are omitted from API requests. However, any field with an 3896 // empty value appearing in NullFields will be sent to the server as 3897 // null. It is an error if a field in this list has a non-empty value. 3898 // This may be used to include null fields in Patch requests. 3899 NullFields []string `json:"-"` 3900} 3901 3902func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { 3903 type NoMethod GooglePrivacyDlpV2InfoType 3904 raw := NoMethod(*s) 3905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3906} 3907 3908// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. 3909type GooglePrivacyDlpV2InfoTypeDescription struct { 3910 // Description: Description of the infotype. Translated when language is 3911 // provided in the request. 3912 Description string `json:"description,omitempty"` 3913 3914 // DisplayName: Human readable form of the infoType name. 3915 DisplayName string `json:"displayName,omitempty"` 3916 3917 // Name: Internal name of the infoType. 3918 Name string `json:"name,omitempty"` 3919 3920 // SupportedBy: Which parts of the API supports this InfoType. 3921 // 3922 // Possible values: 3923 // "ENUM_TYPE_UNSPECIFIED" - Unused. 3924 // "INSPECT" - Supported by the inspect operations. 3925 // "RISK_ANALYSIS" - Supported by the risk analysis operations. 3926 SupportedBy []string `json:"supportedBy,omitempty"` 3927 3928 // ForceSendFields is a list of field names (e.g. "Description") to 3929 // unconditionally include in API requests. By default, fields with 3930 // empty or default values are omitted from API requests. However, any 3931 // non-pointer, non-interface field appearing in ForceSendFields will be 3932 // sent to the server regardless of whether the field is empty or not. 3933 // This may be used to include empty fields in Patch requests. 3934 ForceSendFields []string `json:"-"` 3935 3936 // NullFields is a list of field names (e.g. "Description") to include 3937 // in API requests with the JSON null value. By default, fields with 3938 // empty values are omitted from API requests. However, any field with 3939 // an empty value appearing in NullFields will be sent to the server as 3940 // null. It is an error if a field in this list has a non-empty value. 3941 // This may be used to include null fields in Patch requests. 3942 NullFields []string `json:"-"` 3943} 3944 3945func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { 3946 type NoMethod GooglePrivacyDlpV2InfoTypeDescription 3947 raw := NoMethod(*s) 3948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3949} 3950 3951// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per 3952// infoType, per content item or long running DlpJob. 3953type GooglePrivacyDlpV2InfoTypeLimit struct { 3954 // InfoType: Type of information the findings limit applies to. Only one 3955 // limit per info_type should be provided. If InfoTypeLimit does not 3956 // have an info_type, the DLP API applies the limit against all 3957 // info_types that are found but not specified in another InfoTypeLimit. 3958 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3959 3960 // MaxFindings: Max findings limit for the given infoType. 3961 MaxFindings int64 `json:"maxFindings,omitempty"` 3962 3963 // ForceSendFields is a list of field names (e.g. "InfoType") to 3964 // unconditionally include in API requests. By default, fields with 3965 // empty or default values are omitted from API requests. However, any 3966 // non-pointer, non-interface field appearing in ForceSendFields will be 3967 // sent to the server regardless of whether the field is empty or not. 3968 // This may be used to include empty fields in Patch requests. 3969 ForceSendFields []string `json:"-"` 3970 3971 // NullFields is a list of field names (e.g. "InfoType") to include in 3972 // API requests with the JSON null value. By default, fields with empty 3973 // values are omitted from API requests. However, any field with an 3974 // empty value appearing in NullFields will be sent to the server as 3975 // null. It is an error if a field in this list has a non-empty value. 3976 // This may be used to include null fields in Patch requests. 3977 NullFields []string `json:"-"` 3978} 3979 3980func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { 3981 type NoMethod GooglePrivacyDlpV2InfoTypeLimit 3982 raw := NoMethod(*s) 3983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3984} 3985 3986// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific 3987// InfoType. 3988type GooglePrivacyDlpV2InfoTypeStats struct { 3989 // Count: Number of findings for this infoType. 3990 Count int64 `json:"count,omitempty,string"` 3991 3992 // InfoType: The type of finding this stat is for. 3993 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3994 3995 // ForceSendFields is a list of field names (e.g. "Count") to 3996 // unconditionally include in API requests. By default, fields with 3997 // empty or default values are omitted from API requests. However, any 3998 // non-pointer, non-interface field appearing in ForceSendFields will be 3999 // sent to the server regardless of whether the field is empty or not. 4000 // This may be used to include empty fields in Patch requests. 4001 ForceSendFields []string `json:"-"` 4002 4003 // NullFields is a list of field names (e.g. "Count") to include in API 4004 // requests with the JSON null value. By default, fields with empty 4005 // values are omitted from API requests. However, any field with an 4006 // empty value appearing in NullFields will be sent to the server as 4007 // null. It is an error if a field in this list has a non-empty value. 4008 // This may be used to include null fields in Patch requests. 4009 NullFields []string `json:"-"` 4010} 4011 4012func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { 4013 type NoMethod GooglePrivacyDlpV2InfoTypeStats 4014 raw := NoMethod(*s) 4015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4016} 4017 4018// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply 4019// to text that is identified as a specific info_type. 4020type GooglePrivacyDlpV2InfoTypeTransformation struct { 4021 // InfoTypes: InfoTypes to apply the transformation to. An empty list 4022 // will cause this transformation to apply to all findings that 4023 // correspond to infoTypes that were requested in `InspectConfig`. 4024 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4025 4026 // PrimitiveTransformation: Required. Primitive transformation to apply 4027 // to the infoType. 4028 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 4029 4030 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 4031 // unconditionally include in API requests. By default, fields with 4032 // empty or default values are omitted from API requests. However, any 4033 // non-pointer, non-interface field appearing in ForceSendFields will be 4034 // sent to the server regardless of whether the field is empty or not. 4035 // This may be used to include empty fields in Patch requests. 4036 ForceSendFields []string `json:"-"` 4037 4038 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4039 // API requests with the JSON null value. By default, fields with empty 4040 // values are omitted from API requests. However, any field with an 4041 // empty value appearing in NullFields will be sent to the server as 4042 // null. It is an error if a field in this list has a non-empty value. 4043 // This may be used to include null fields in Patch requests. 4044 NullFields []string `json:"-"` 4045} 4046 4047func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { 4048 type NoMethod GooglePrivacyDlpV2InfoTypeTransformation 4049 raw := NoMethod(*s) 4050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4051} 4052 4053// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation 4054// that will scan unstructured text and apply various 4055// `PrimitiveTransformation`s to each finding, where the transformation 4056// is applied to only values that were identified as a specific 4057// info_type. 4058type GooglePrivacyDlpV2InfoTypeTransformations struct { 4059 // Transformations: Required. Transformation for each infoType. Cannot 4060 // specify more than one for a given infoType. 4061 Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` 4062 4063 // ForceSendFields is a list of field names (e.g. "Transformations") to 4064 // unconditionally include in API requests. By default, fields with 4065 // empty or default values are omitted from API requests. However, any 4066 // non-pointer, non-interface field appearing in ForceSendFields will be 4067 // sent to the server regardless of whether the field is empty or not. 4068 // This may be used to include empty fields in Patch requests. 4069 ForceSendFields []string `json:"-"` 4070 4071 // NullFields is a list of field names (e.g. "Transformations") to 4072 // include in API requests with the JSON null value. By default, fields 4073 // with empty values are omitted from API requests. However, any field 4074 // with an empty value appearing in NullFields will be sent to the 4075 // server as null. It is an error if a field in this list has a 4076 // non-empty value. This may be used to include null fields in Patch 4077 // requests. 4078 NullFields []string `json:"-"` 4079} 4080 4081func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { 4082 type NoMethod GooglePrivacyDlpV2InfoTypeTransformations 4083 raw := NoMethod(*s) 4084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4085} 4086 4087// GooglePrivacyDlpV2InspectConfig: Configuration description of the 4088// scanning process. When used with redactContent only info_types and 4089// min_likelihood are currently used. 4090type GooglePrivacyDlpV2InspectConfig struct { 4091 // ContentOptions: List of options defining data content to scan. If 4092 // empty, text, images, and other content will be included. 4093 // 4094 // Possible values: 4095 // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data 4096 // stream. 4097 // "CONTENT_TEXT" - Text content within the data, excluding any 4098 // metadata. 4099 // "CONTENT_IMAGE" - Images found in the data. 4100 ContentOptions []string `json:"contentOptions,omitempty"` 4101 4102 // CustomInfoTypes: CustomInfoTypes provided by the user. See 4103 // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn 4104 // more. 4105 CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` 4106 4107 // ExcludeInfoTypes: When true, excludes type information of the 4108 // findings. 4109 ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` 4110 4111 // IncludeQuote: When true, a contextual quote from the data that 4112 // triggered a finding is included in the response; see Finding.quote. 4113 IncludeQuote bool `json:"includeQuote,omitempty"` 4114 4115 // InfoTypes: Restricts what info_types to look for. The values must 4116 // correspond to InfoType values returned by ListInfoTypes or listed at 4117 // https://cloud.google.com/dlp/docs/infotypes-reference. When no 4118 // InfoTypes or CustomInfoTypes are specified in a request, the system 4119 // may automatically choose what detectors to run. By default this may 4120 // be all types, but may change over time as detectors are updated. If 4121 // you need precise control and predictability as to what detectors are 4122 // run you should specify specific InfoTypes listed in the reference, 4123 // otherwise a default list will be used, which may change over time. 4124 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4125 4126 // Limits: Configuration to control the number of findings returned. 4127 Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` 4128 4129 // MinLikelihood: Only returns findings equal or above this threshold. 4130 // The default is POSSIBLE. See 4131 // https://cloud.google.com/dlp/docs/likelihood to learn more. 4132 // 4133 // Possible values: 4134 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 4135 // "VERY_UNLIKELY" - Few matching elements. 4136 // "UNLIKELY" 4137 // "POSSIBLE" - Some matching elements. 4138 // "LIKELY" 4139 // "VERY_LIKELY" - Many matching elements. 4140 MinLikelihood string `json:"minLikelihood,omitempty"` 4141 4142 // RuleSet: Set of rules to apply to the findings for this 4143 // InspectConfig. Exclusion rules, contained in the set are executed in 4144 // the end, other rules are executed in the order they are specified for 4145 // each info type. 4146 RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` 4147 4148 // ForceSendFields is a list of field names (e.g. "ContentOptions") to 4149 // unconditionally include in API requests. By default, fields with 4150 // empty or default values are omitted from API requests. However, any 4151 // non-pointer, non-interface field appearing in ForceSendFields will be 4152 // sent to the server regardless of whether the field is empty or not. 4153 // This may be used to include empty fields in Patch requests. 4154 ForceSendFields []string `json:"-"` 4155 4156 // NullFields is a list of field names (e.g. "ContentOptions") to 4157 // include in API requests with the JSON null value. By default, fields 4158 // with empty values are omitted from API requests. However, any field 4159 // with an empty value appearing in NullFields will be sent to the 4160 // server as null. It is an error if a field in this list has a 4161 // non-empty value. This may be used to include null fields in Patch 4162 // requests. 4163 NullFields []string `json:"-"` 4164} 4165 4166func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { 4167 type NoMethod GooglePrivacyDlpV2InspectConfig 4168 raw := NoMethod(*s) 4169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4170} 4171 4172// GooglePrivacyDlpV2InspectContentRequest: Request to search for 4173// potentially sensitive info in a ContentItem. 4174type GooglePrivacyDlpV2InspectContentRequest struct { 4175 // InspectConfig: Configuration for the inspector. What specified here 4176 // will override the template referenced by the inspect_template_name 4177 // argument. 4178 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4179 4180 // InspectTemplateName: Template to use. Any configuration directly 4181 // specified in inspect_config will override those set in the template. 4182 // Singular fields that are set in this request will replace their 4183 // corresponding fields in the template. Repeated fields are appended. 4184 // Singular sub-messages and groups are recursively merged. 4185 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4186 4187 // Item: The item to inspect. 4188 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 4189 4190 // LocationId: Deprecated. This field has no effect. 4191 LocationId string `json:"locationId,omitempty"` 4192 4193 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 4194 // unconditionally include in API requests. By default, fields with 4195 // empty or default values are omitted from API requests. However, any 4196 // non-pointer, non-interface field appearing in ForceSendFields will be 4197 // sent to the server regardless of whether the field is empty or not. 4198 // This may be used to include empty fields in Patch requests. 4199 ForceSendFields []string `json:"-"` 4200 4201 // NullFields is a list of field names (e.g. "InspectConfig") to include 4202 // in API requests with the JSON null value. By default, fields with 4203 // empty values are omitted from API requests. However, any field with 4204 // an empty value appearing in NullFields will be sent to the server as 4205 // null. It is an error if a field in this list has a non-empty value. 4206 // This may be used to include null fields in Patch requests. 4207 NullFields []string `json:"-"` 4208} 4209 4210func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { 4211 type NoMethod GooglePrivacyDlpV2InspectContentRequest 4212 raw := NoMethod(*s) 4213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4214} 4215 4216// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an 4217// item. 4218type GooglePrivacyDlpV2InspectContentResponse struct { 4219 // Result: The findings. 4220 Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` 4221 4222 // ServerResponse contains the HTTP response code and headers from the 4223 // server. 4224 googleapi.ServerResponse `json:"-"` 4225 4226 // ForceSendFields is a list of field names (e.g. "Result") to 4227 // unconditionally include in API requests. By default, fields with 4228 // empty or default values are omitted from API requests. However, any 4229 // non-pointer, non-interface field appearing in ForceSendFields will be 4230 // sent to the server regardless of whether the field is empty or not. 4231 // This may be used to include empty fields in Patch requests. 4232 ForceSendFields []string `json:"-"` 4233 4234 // NullFields is a list of field names (e.g. "Result") to include in API 4235 // requests with the JSON null value. By default, fields with empty 4236 // values are omitted from API requests. However, any field with an 4237 // empty value appearing in NullFields will be sent to the server as 4238 // null. It is an error if a field in this list has a non-empty value. 4239 // This may be used to include null fields in Patch requests. 4240 NullFields []string `json:"-"` 4241} 4242 4243func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { 4244 type NoMethod GooglePrivacyDlpV2InspectContentResponse 4245 raw := NoMethod(*s) 4246 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4247} 4248 4249// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect 4250// DataSource job. 4251type GooglePrivacyDlpV2InspectDataSourceDetails struct { 4252 // RequestedOptions: The configuration used for this job. 4253 RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` 4254 4255 // Result: A summary of the outcome of this inspection job. 4256 Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` 4257 4258 // ForceSendFields is a list of field names (e.g. "RequestedOptions") to 4259 // unconditionally include in API requests. By default, fields with 4260 // empty or default values are omitted from API requests. However, any 4261 // non-pointer, non-interface field appearing in ForceSendFields will be 4262 // sent to the server regardless of whether the field is empty or not. 4263 // This may be used to include empty fields in Patch requests. 4264 ForceSendFields []string `json:"-"` 4265 4266 // NullFields is a list of field names (e.g. "RequestedOptions") to 4267 // include in API requests with the JSON null value. By default, fields 4268 // with empty values are omitted from API requests. However, any field 4269 // with an empty value appearing in NullFields will be sent to the 4270 // server as null. It is an error if a field in this list has a 4271 // non-empty value. This may be used to include null fields in Patch 4272 // requests. 4273 NullFields []string `json:"-"` 4274} 4275 4276func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { 4277 type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails 4278 raw := NoMethod(*s) 4279 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4280} 4281 4282// GooglePrivacyDlpV2InspectJobConfig: Controls what and how to inspect 4283// for findings. 4284type GooglePrivacyDlpV2InspectJobConfig struct { 4285 // Actions: Actions to execute at the completion of the job. 4286 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 4287 4288 // InspectConfig: How and what to scan for. 4289 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4290 4291 // InspectTemplateName: If provided, will be used as the default for all 4292 // values in InspectConfig. `inspect_config` will be merged into the 4293 // values persisted as part of the template. 4294 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4295 4296 // StorageConfig: The data to scan. 4297 StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` 4298 4299 // ForceSendFields is a list of field names (e.g. "Actions") to 4300 // unconditionally include in API requests. By default, fields with 4301 // empty or default values are omitted from API requests. However, any 4302 // non-pointer, non-interface field appearing in ForceSendFields will be 4303 // sent to the server regardless of whether the field is empty or not. 4304 // This may be used to include empty fields in Patch requests. 4305 ForceSendFields []string `json:"-"` 4306 4307 // NullFields is a list of field names (e.g. "Actions") to include in 4308 // API requests with the JSON null value. By default, fields with empty 4309 // values are omitted from API requests. However, any field with an 4310 // empty value appearing in NullFields will be sent to the server as 4311 // null. It is an error if a field in this list has a non-empty value. 4312 // This may be used to include null fields in Patch requests. 4313 NullFields []string `json:"-"` 4314} 4315 4316func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { 4317 type NoMethod GooglePrivacyDlpV2InspectJobConfig 4318 raw := NoMethod(*s) 4319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4320} 4321 4322// GooglePrivacyDlpV2InspectResult: All the findings for a single 4323// scanned item. 4324type GooglePrivacyDlpV2InspectResult struct { 4325 // Findings: List of findings for an item. 4326 Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` 4327 4328 // FindingsTruncated: If true, then this item might have more findings 4329 // than were returned, and the findings returned are an arbitrary subset 4330 // of all findings. The findings list might be truncated because the 4331 // input items were too large, or because the server reached the maximum 4332 // amount of resources allowed for a single API call. For best results, 4333 // divide the input into smaller batches. 4334 FindingsTruncated bool `json:"findingsTruncated,omitempty"` 4335 4336 // ForceSendFields is a list of field names (e.g. "Findings") to 4337 // unconditionally include in API requests. By default, fields with 4338 // empty or default values are omitted from API requests. However, any 4339 // non-pointer, non-interface field appearing in ForceSendFields will be 4340 // sent to the server regardless of whether the field is empty or not. 4341 // This may be used to include empty fields in Patch requests. 4342 ForceSendFields []string `json:"-"` 4343 4344 // NullFields is a list of field names (e.g. "Findings") to include in 4345 // API requests with the JSON null value. By default, fields with empty 4346 // values are omitted from API requests. However, any field with an 4347 // empty value appearing in NullFields will be sent to the server as 4348 // null. It is an error if a field in this list has a non-empty value. 4349 // This may be used to include null fields in Patch requests. 4350 NullFields []string `json:"-"` 4351} 4352 4353func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { 4354 type NoMethod GooglePrivacyDlpV2InspectResult 4355 raw := NoMethod(*s) 4356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4357} 4358 4359// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a 4360// configuration (set of types of sensitive data to be detected) to be 4361// used anywhere you otherwise would normally specify InspectConfig. See 4362// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 4363type GooglePrivacyDlpV2InspectTemplate struct { 4364 // CreateTime: Output only. The creation timestamp of an 4365 // inspectTemplate. 4366 CreateTime string `json:"createTime,omitempty"` 4367 4368 // Description: Short description (max 256 chars). 4369 Description string `json:"description,omitempty"` 4370 4371 // DisplayName: Display name (max 256 chars). 4372 DisplayName string `json:"displayName,omitempty"` 4373 4374 // InspectConfig: The core content of the template. Configuration of the 4375 // scanning process. 4376 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4377 4378 // Name: Output only. The template name. The template will have one of 4379 // the following formats: 4380 // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR 4381 // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; 4382 Name string `json:"name,omitempty"` 4383 4384 // UpdateTime: Output only. The last update timestamp of an 4385 // inspectTemplate. 4386 UpdateTime string `json:"updateTime,omitempty"` 4387 4388 // ServerResponse contains the HTTP response code and headers from the 4389 // server. 4390 googleapi.ServerResponse `json:"-"` 4391 4392 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4393 // unconditionally include in API requests. By default, fields with 4394 // empty or default values are omitted from API requests. However, any 4395 // non-pointer, non-interface field appearing in ForceSendFields will be 4396 // sent to the server regardless of whether the field is empty or not. 4397 // This may be used to include empty fields in Patch requests. 4398 ForceSendFields []string `json:"-"` 4399 4400 // NullFields is a list of field names (e.g. "CreateTime") to include in 4401 // API requests with the JSON null value. By default, fields with empty 4402 // values are omitted from API requests. However, any field with an 4403 // empty value appearing in NullFields will be sent to the server as 4404 // null. It is an error if a field in this list has a non-empty value. 4405 // This may be used to include null fields in Patch requests. 4406 NullFields []string `json:"-"` 4407} 4408 4409func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { 4410 type NoMethod GooglePrivacyDlpV2InspectTemplate 4411 raw := NoMethod(*s) 4412 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4413} 4414 4415// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be 4416// applied to infoTypes, specified in `InspectionRuleSet`. 4417type GooglePrivacyDlpV2InspectionRule struct { 4418 // ExclusionRule: Exclusion rule. 4419 ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` 4420 4421 // HotwordRule: Hotword-based detection rule. 4422 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 4423 4424 // ForceSendFields is a list of field names (e.g. "ExclusionRule") to 4425 // unconditionally include in API requests. By default, fields with 4426 // empty or default values are omitted from API requests. However, any 4427 // non-pointer, non-interface field appearing in ForceSendFields will be 4428 // sent to the server regardless of whether the field is empty or not. 4429 // This may be used to include empty fields in Patch requests. 4430 ForceSendFields []string `json:"-"` 4431 4432 // NullFields is a list of field names (e.g. "ExclusionRule") to include 4433 // in API requests with the JSON null value. By default, fields with 4434 // empty values are omitted from API requests. However, any field with 4435 // an empty value appearing in NullFields will be sent to the server as 4436 // null. It is an error if a field in this list has a non-empty value. 4437 // This may be used to include null fields in Patch requests. 4438 NullFields []string `json:"-"` 4439} 4440 4441func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { 4442 type NoMethod GooglePrivacyDlpV2InspectionRule 4443 raw := NoMethod(*s) 4444 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4445} 4446 4447// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of 4448// infoTypes to alter behavior under certain circumstances, depending on 4449// the specific details of the rules within the set. 4450type GooglePrivacyDlpV2InspectionRuleSet struct { 4451 // InfoTypes: List of infoTypes this rule set is applied to. 4452 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4453 4454 // Rules: Set of rules to be applied to infoTypes. The rules are applied 4455 // in order. 4456 Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` 4457 4458 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 4459 // unconditionally include in API requests. By default, fields with 4460 // empty or default values are omitted from API requests. However, any 4461 // non-pointer, non-interface field appearing in ForceSendFields will be 4462 // sent to the server regardless of whether the field is empty or not. 4463 // This may be used to include empty fields in Patch requests. 4464 ForceSendFields []string `json:"-"` 4465 4466 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4467 // API requests with the JSON null value. By default, fields with empty 4468 // values are omitted from API requests. However, any field with an 4469 // empty value appearing in NullFields will be sent to the server as 4470 // null. It is an error if a field in this list has a non-empty value. 4471 // This may be used to include null fields in Patch requests. 4472 NullFields []string `json:"-"` 4473} 4474 4475func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { 4476 type NoMethod GooglePrivacyDlpV2InspectionRuleSet 4477 raw := NoMethod(*s) 4478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4479} 4480 4481// GooglePrivacyDlpV2JobNotificationEmails: Enable email notification to 4482// project owners and editors on jobs's completion/failure. 4483type GooglePrivacyDlpV2JobNotificationEmails struct { 4484} 4485 4486// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp 4487// api calls on a repeating basis. See 4488// https://cloud.google.com/dlp/docs/concepts-job-triggers to learn 4489// more. 4490type GooglePrivacyDlpV2JobTrigger struct { 4491 // CreateTime: Output only. The creation timestamp of a triggeredJob. 4492 CreateTime string `json:"createTime,omitempty"` 4493 4494 // Description: User provided description (max 256 chars) 4495 Description string `json:"description,omitempty"` 4496 4497 // DisplayName: Display name (max 100 chars) 4498 DisplayName string `json:"displayName,omitempty"` 4499 4500 // Errors: Output only. A stream of errors encountered when the trigger 4501 // was activated. Repeated errors may result in the JobTrigger 4502 // automatically being paused. Will return the last 100 errors. Whenever 4503 // the JobTrigger is modified this list will be cleared. 4504 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 4505 4506 // InspectJob: For inspect jobs, a snapshot of the configuration. 4507 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 4508 4509 // LastRunTime: Output only. The timestamp of the last time this trigger 4510 // executed. 4511 LastRunTime string `json:"lastRunTime,omitempty"` 4512 4513 // Name: Unique resource name for the triggeredJob, assigned by the 4514 // service when the triggeredJob is created, for example 4515 // `projects/dlp-test-project/jobTriggers/53234423`. 4516 Name string `json:"name,omitempty"` 4517 4518 // Status: Required. A status for this trigger. 4519 // 4520 // Possible values: 4521 // "STATUS_UNSPECIFIED" - Unused. 4522 // "HEALTHY" - Trigger is healthy. 4523 // "PAUSED" - Trigger is temporarily paused. 4524 // "CANCELLED" - Trigger is cancelled and can not be resumed. 4525 Status string `json:"status,omitempty"` 4526 4527 // Triggers: A list of triggers which will be OR'ed together. Only one 4528 // in the list needs to trigger for a job to be started. The list may 4529 // contain only a single Schedule trigger and must have at least one 4530 // object. 4531 Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` 4532 4533 // UpdateTime: Output only. The last update timestamp of a triggeredJob. 4534 UpdateTime string `json:"updateTime,omitempty"` 4535 4536 // ServerResponse contains the HTTP response code and headers from the 4537 // server. 4538 googleapi.ServerResponse `json:"-"` 4539 4540 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4541 // unconditionally include in API requests. By default, fields with 4542 // empty or default values are omitted from API requests. However, any 4543 // non-pointer, non-interface field appearing in ForceSendFields will be 4544 // sent to the server regardless of whether the field is empty or not. 4545 // This may be used to include empty fields in Patch requests. 4546 ForceSendFields []string `json:"-"` 4547 4548 // NullFields is a list of field names (e.g. "CreateTime") to include in 4549 // API requests with the JSON null value. By default, fields with empty 4550 // values are omitted from API requests. However, any field with an 4551 // empty value appearing in NullFields will be sent to the server as 4552 // null. It is an error if a field in this list has a non-empty value. 4553 // This may be used to include null fields in Patch requests. 4554 NullFields []string `json:"-"` 4555} 4556 4557func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { 4558 type NoMethod GooglePrivacyDlpV2JobTrigger 4559 raw := NoMethod(*s) 4560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4561} 4562 4563// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for 4564// analysis of reidentification risk. 4565type GooglePrivacyDlpV2KAnonymityConfig struct { 4566 // EntityId: Message indicating that multiple rows might be associated 4567 // to a single individual. If the same entity_id is associated to 4568 // multiple quasi-identifier tuples over distinct rows, we consider the 4569 // entire collection of tuples as the composite quasi-identifier. This 4570 // collection is a multiset: the order in which the different tuples 4571 // appear in the dataset is ignored, but their frequency is taken into 4572 // account. Important note: a maximum of 1000 rows can be associated to 4573 // a single entity ID. If more rows are associated with the same entity 4574 // ID, some might be ignored. 4575 EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` 4576 4577 // QuasiIds: Set of fields to compute k-anonymity over. When multiple 4578 // fields are specified, they are considered a single composite key. 4579 // Structs and repeated data types are not supported; however, nested 4580 // fields are supported so long as they are not structs themselves or 4581 // nested within a repeated field. 4582 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4583 4584 // ForceSendFields is a list of field names (e.g. "EntityId") to 4585 // unconditionally include in API requests. By default, fields with 4586 // empty or default values are omitted from API requests. However, any 4587 // non-pointer, non-interface field appearing in ForceSendFields will be 4588 // sent to the server regardless of whether the field is empty or not. 4589 // This may be used to include empty fields in Patch requests. 4590 ForceSendFields []string `json:"-"` 4591 4592 // NullFields is a list of field names (e.g. "EntityId") to include in 4593 // API requests with the JSON null value. By default, fields with empty 4594 // values are omitted from API requests. However, any field with an 4595 // empty value appearing in NullFields will be sent to the server as 4596 // null. It is an error if a field in this list has a non-empty value. 4597 // This may be used to include null fields in Patch requests. 4598 NullFields []string `json:"-"` 4599} 4600 4601func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { 4602 type NoMethod GooglePrivacyDlpV2KAnonymityConfig 4603 raw := NoMethod(*s) 4604 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4605} 4606 4607// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' 4608// values that share the same ldiversity value 4609type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { 4610 // EquivalenceClassSize: Size of the equivalence class, for example 4611 // number of rows with the above set of values. 4612 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4613 4614 // QuasiIdsValues: Set of values defining the equivalence class. One 4615 // value per quasi-identifier column in the original KAnonymity metric 4616 // message. The order is always the same as the original request. 4617 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4618 4619 // ForceSendFields is a list of field names (e.g. 4620 // "EquivalenceClassSize") to unconditionally include in API requests. 4621 // By default, fields with empty or default values are omitted from API 4622 // requests. However, any non-pointer, non-interface field appearing in 4623 // ForceSendFields will be sent to the server regardless of whether the 4624 // field is empty or not. This may be used to include empty fields in 4625 // Patch requests. 4626 ForceSendFields []string `json:"-"` 4627 4628 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 4629 // include in API requests with the JSON null value. By default, fields 4630 // with empty values are omitted from API requests. However, any field 4631 // with an empty value appearing in NullFields will be sent to the 4632 // server as null. It is an error if a field in this list has a 4633 // non-empty value. This may be used to include null fields in Patch 4634 // requests. 4635 NullFields []string `json:"-"` 4636} 4637 4638func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { 4639 type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass 4640 raw := NoMethod(*s) 4641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4642} 4643 4644// GooglePrivacyDlpV2KAnonymityHistogramBucket: Histogram of k-anonymity 4645// equivalence classes. 4646type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { 4647 // BucketSize: Total number of equivalence classes in this bucket. 4648 BucketSize int64 `json:"bucketSize,omitempty,string"` 4649 4650 // BucketValueCount: Total number of distinct equivalence classes in 4651 // this bucket. 4652 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4653 4654 // BucketValues: Sample of equivalence classes in this bucket. The total 4655 // number of classes returned per bucket is capped at 20. 4656 BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` 4657 4658 // EquivalenceClassSizeLowerBound: Lower bound on the size of the 4659 // equivalence classes in this bucket. 4660 EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` 4661 4662 // EquivalenceClassSizeUpperBound: Upper bound on the size of the 4663 // equivalence classes in this bucket. 4664 EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` 4665 4666 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4667 // unconditionally include in API requests. By default, fields with 4668 // empty or default values are omitted from API requests. However, any 4669 // non-pointer, non-interface field appearing in ForceSendFields will be 4670 // sent to the server regardless of whether the field is empty or not. 4671 // This may be used to include empty fields in Patch requests. 4672 ForceSendFields []string `json:"-"` 4673 4674 // NullFields is a list of field names (e.g. "BucketSize") to include in 4675 // API requests with the JSON null value. By default, fields with empty 4676 // values are omitted from API requests. However, any field with an 4677 // empty value appearing in NullFields will be sent to the server as 4678 // null. It is an error if a field in this list has a non-empty value. 4679 // This may be used to include null fields in Patch requests. 4680 NullFields []string `json:"-"` 4681} 4682 4683func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { 4684 type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket 4685 raw := NoMethod(*s) 4686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4687} 4688 4689// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity 4690// computation. 4691type GooglePrivacyDlpV2KAnonymityResult struct { 4692 // EquivalenceClassHistogramBuckets: Histogram of k-anonymity 4693 // equivalence classes. 4694 EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` 4695 4696 // ForceSendFields is a list of field names (e.g. 4697 // "EquivalenceClassHistogramBuckets") to unconditionally include in API 4698 // requests. By default, fields with empty or default values are omitted 4699 // from API requests. However, any non-pointer, non-interface field 4700 // appearing in ForceSendFields will be sent to the server regardless of 4701 // whether the field is empty or not. This may be used to include empty 4702 // fields in Patch requests. 4703 ForceSendFields []string `json:"-"` 4704 4705 // NullFields is a list of field names (e.g. 4706 // "EquivalenceClassHistogramBuckets") to include in API requests with 4707 // the JSON null value. By default, fields with empty values are omitted 4708 // from API requests. However, any field with an empty value appearing 4709 // in NullFields will be sent to the server as null. It is an error if a 4710 // field in this list has a non-empty value. This may be used to include 4711 // null fields in Patch requests. 4712 NullFields []string `json:"-"` 4713} 4714 4715func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { 4716 type NoMethod GooglePrivacyDlpV2KAnonymityResult 4717 raw := NoMethod(*s) 4718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4719} 4720 4721// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. 4722// This corresponds to a risk model similar to what is called 4723// "journalist risk" in the literature, except the attack dataset is 4724// statistically modeled instead of being perfectly known. This can be 4725// done using publicly available data (like the US Census), or using a 4726// custom statistical model (indicated as one or several BigQuery 4727// tables), or by extrapolating from the distribution of values in the 4728// input dataset. 4729type GooglePrivacyDlpV2KMapEstimationConfig struct { 4730 // AuxiliaryTables: Several auxiliary tables can be used in the 4731 // analysis. Each custom_tag used to tag a quasi-identifiers column must 4732 // appear in exactly one column of one auxiliary table. 4733 AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` 4734 4735 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 4736 // columns can have the same tag. 4737 QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` 4738 4739 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 4740 // modeling. Set if no column is tagged with a region-specific InfoType 4741 // (like US_ZIP_5) or a region code. 4742 RegionCode string `json:"regionCode,omitempty"` 4743 4744 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 4745 // unconditionally include in API requests. By default, fields with 4746 // empty or default values are omitted from API requests. However, any 4747 // non-pointer, non-interface field appearing in ForceSendFields will be 4748 // sent to the server regardless of whether the field is empty or not. 4749 // This may be used to include empty fields in Patch requests. 4750 ForceSendFields []string `json:"-"` 4751 4752 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 4753 // include in API requests with the JSON null value. By default, fields 4754 // with empty values are omitted from API requests. However, any field 4755 // with an empty value appearing in NullFields will be sent to the 4756 // server as null. It is an error if a field in this list has a 4757 // non-empty value. This may be used to include null fields in Patch 4758 // requests. 4759 NullFields []string `json:"-"` 4760} 4761 4762func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { 4763 type NoMethod GooglePrivacyDlpV2KMapEstimationConfig 4764 raw := NoMethod(*s) 4765 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4766} 4767 4768// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A 4769// KMapEstimationHistogramBucket message with the following values: 4770// min_anonymity: 3 max_anonymity: 5 frequency: 42 means that there are 4771// 42 records whose quasi-identifier values correspond to 3, 4 or 5 4772// people in the overlying population. An important particular case is 4773// when min_anonymity = max_anonymity = 1: the frequency field then 4774// corresponds to the number of uniquely identifiable records. 4775type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { 4776 // BucketSize: Number of records within these anonymity bounds. 4777 BucketSize int64 `json:"bucketSize,omitempty,string"` 4778 4779 // BucketValueCount: Total number of distinct quasi-identifier tuple 4780 // values in this bucket. 4781 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4782 4783 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 4784 // The total number of classes returned per bucket is capped at 20. 4785 BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` 4786 4787 // MaxAnonymity: Always greater than or equal to min_anonymity. 4788 MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` 4789 4790 // MinAnonymity: Always positive. 4791 MinAnonymity int64 `json:"minAnonymity,omitempty,string"` 4792 4793 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4794 // unconditionally include in API requests. By default, fields with 4795 // empty or default values are omitted from API requests. However, any 4796 // non-pointer, non-interface field appearing in ForceSendFields will be 4797 // sent to the server regardless of whether the field is empty or not. 4798 // This may be used to include empty fields in Patch requests. 4799 ForceSendFields []string `json:"-"` 4800 4801 // NullFields is a list of field names (e.g. "BucketSize") to include in 4802 // API requests with the JSON null value. By default, fields with empty 4803 // values are omitted from API requests. However, any field with an 4804 // empty value appearing in NullFields will be sent to the server as 4805 // null. It is an error if a field in this list has a non-empty value. 4806 // This may be used to include null fields in Patch requests. 4807 NullFields []string `json:"-"` 4808} 4809 4810func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 4811 type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket 4812 raw := NoMethod(*s) 4813 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4814} 4815 4816// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for 4817// the quasi-identifier columns. 4818type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { 4819 // EstimatedAnonymity: The estimated anonymity for these 4820 // quasi-identifier values. 4821 EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` 4822 4823 // QuasiIdsValues: The quasi-identifier values. 4824 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4825 4826 // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") 4827 // to unconditionally include in API requests. By default, fields with 4828 // empty or default values are omitted from API requests. However, any 4829 // non-pointer, non-interface field appearing in ForceSendFields will be 4830 // sent to the server regardless of whether the field is empty or not. 4831 // This may be used to include empty fields in Patch requests. 4832 ForceSendFields []string `json:"-"` 4833 4834 // NullFields is a list of field names (e.g. "EstimatedAnonymity") to 4835 // include in API requests with the JSON null value. By default, fields 4836 // with empty values are omitted from API requests. However, any field 4837 // 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 *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 4845 type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues 4846 raw := NoMethod(*s) 4847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4848} 4849 4850// GooglePrivacyDlpV2KMapEstimationResult: Result of the 4851// reidentifiability analysis. Note that these results are an 4852// estimation, not exact values. 4853type GooglePrivacyDlpV2KMapEstimationResult struct { 4854 // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] 4855 // do not overlap. If a value doesn't correspond to any such interval, 4856 // the associated frequency is zero. For example, the following records: 4857 // {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: 4858 // 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: 4859 // 10, frequency: 99} mean that there are no record with an estimated 4860 // anonymity of 4, 5, or larger than 10. 4861 KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` 4862 4863 // ForceSendFields is a list of field names (e.g. 4864 // "KMapEstimationHistogram") to unconditionally include in API 4865 // requests. By default, fields with empty or default values are omitted 4866 // from API requests. However, any non-pointer, non-interface field 4867 // appearing in ForceSendFields will be sent to the server regardless of 4868 // whether the field is empty or not. This may be used to include empty 4869 // fields in Patch requests. 4870 ForceSendFields []string `json:"-"` 4871 4872 // NullFields is a list of field names (e.g. "KMapEstimationHistogram") 4873 // to include in API requests with the JSON null value. By default, 4874 // fields with empty values are omitted from API requests. However, any 4875 // field with an empty value appearing in NullFields will be sent to the 4876 // server as null. It is an error if a field in this list has a 4877 // non-empty value. This may be used to include null fields in Patch 4878 // requests. 4879 NullFields []string `json:"-"` 4880} 4881 4882func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { 4883 type NoMethod GooglePrivacyDlpV2KMapEstimationResult 4884 raw := NoMethod(*s) 4885 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4886} 4887 4888// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. If 4889// a key's partition ID or any of its path kinds or names are 4890// reserved/read-only, the key is reserved/read-only. A 4891// reserved/read-only key is forbidden in certain documented contexts. 4892type GooglePrivacyDlpV2Key struct { 4893 // PartitionId: Entities are partitioned into subsets, currently 4894 // identified by a project ID and namespace ID. Queries are scoped to a 4895 // single partition. 4896 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 4897 4898 // Path: The entity path. An entity path consists of one or more 4899 // elements composed of a kind and a string or numerical identifier, 4900 // which identify entities. The first element identifies a _root 4901 // entity_, the second element identifies a _child_ of the root entity, 4902 // the third element identifies a child of the second entity, and so 4903 // forth. The entities identified by all prefixes of the path are called 4904 // the element's _ancestors_. A path can never be empty, and a path can 4905 // have at most 100 elements. 4906 Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` 4907 4908 // ForceSendFields is a list of field names (e.g. "PartitionId") to 4909 // unconditionally include in API requests. By default, fields with 4910 // empty or default values are omitted from API requests. However, any 4911 // non-pointer, non-interface field appearing in ForceSendFields will be 4912 // sent to the server regardless of whether the field is empty or not. 4913 // This may be used to include empty fields in Patch requests. 4914 ForceSendFields []string `json:"-"` 4915 4916 // NullFields is a list of field names (e.g. "PartitionId") to include 4917 // in API requests with the JSON null value. By default, fields with 4918 // empty values are omitted from API requests. However, any field with 4919 // an empty value appearing in NullFields will be sent to the server as 4920 // null. It is an error if a field in this list has a non-empty value. 4921 // This may be used to include null fields in Patch requests. 4922 NullFields []string `json:"-"` 4923} 4924 4925func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { 4926 type NoMethod GooglePrivacyDlpV2Key 4927 raw := NoMethod(*s) 4928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4929} 4930 4931// GooglePrivacyDlpV2KindExpression: A representation of a Datastore 4932// kind. 4933type GooglePrivacyDlpV2KindExpression struct { 4934 // Name: The name of the kind. 4935 Name string `json:"name,omitempty"` 4936 4937 // ForceSendFields is a list of field names (e.g. "Name") to 4938 // unconditionally include in API requests. By default, fields with 4939 // empty or default values are omitted from API requests. However, any 4940 // non-pointer, non-interface field appearing in ForceSendFields will be 4941 // sent to the server regardless of whether the field is empty or not. 4942 // This may be used to include empty fields in Patch requests. 4943 ForceSendFields []string `json:"-"` 4944 4945 // NullFields is a list of field names (e.g. "Name") to include in API 4946 // requests with the JSON null value. By default, fields with empty 4947 // values are omitted from API requests. However, any field with an 4948 // empty value appearing in NullFields will be sent to the server as 4949 // null. It is an error if a field in this list has a non-empty value. 4950 // This may be used to include null fields in Patch requests. 4951 NullFields []string `json:"-"` 4952} 4953 4954func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { 4955 type NoMethod GooglePrivacyDlpV2KindExpression 4956 raw := NoMethod(*s) 4957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4958} 4959 4960// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing 4961// data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, 4962// or 256-bit key. Authorization requires the following IAM permissions 4963// when sending a request to perform a crypto transformation using a 4964// KMS-wrapped crypto key: dlp.kms.encrypt For more information, see 4965// [Creating a wrapped key] 4966// (https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When 4967// you use Cloud KMS for cryptographic operations, charges apply 4968// (https://cloud.google.com/kms/pricing). 4969type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { 4970 // CryptoKeyName: Required. The resource name of the KMS CryptoKey to 4971 // use for unwrapping. 4972 CryptoKeyName string `json:"cryptoKeyName,omitempty"` 4973 4974 // WrappedKey: Required. The wrapped data crypto key. 4975 WrappedKey string `json:"wrappedKey,omitempty"` 4976 4977 // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to 4978 // unconditionally include in API requests. By default, fields with 4979 // empty or default values are omitted from API requests. However, any 4980 // non-pointer, non-interface field appearing in ForceSendFields will be 4981 // sent to the server regardless of whether the field is empty or not. 4982 // This may be used to include empty fields in Patch requests. 4983 ForceSendFields []string `json:"-"` 4984 4985 // NullFields is a list of field names (e.g. "CryptoKeyName") to include 4986 // in API requests with the JSON null value. By default, fields with 4987 // empty values are omitted from API requests. However, any field with 4988 // an empty value appearing in NullFields will be sent to the server as 4989 // null. It is an error if a field in this list has a non-empty value. 4990 // This may be used to include null fields in Patch requests. 4991 NullFields []string `json:"-"` 4992} 4993 4994func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { 4995 type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey 4996 raw := NoMethod(*s) 4997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4998} 4999 5000// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for 5001// analysis of reidentification risk. 5002type GooglePrivacyDlpV2LDiversityConfig struct { 5003 // QuasiIds: Set of quasi-identifiers indicating how equivalence classes 5004 // are defined for the l-diversity computation. When multiple fields are 5005 // specified, they are considered a single composite key. 5006 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 5007 5008 // SensitiveAttribute: Sensitive field for computing the l-value. 5009 SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` 5010 5011 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 5012 // unconditionally include in API requests. By default, fields with 5013 // empty or default values are omitted from API requests. However, any 5014 // non-pointer, non-interface field appearing in ForceSendFields will be 5015 // sent to the server regardless of whether the field is empty or not. 5016 // This may be used to include empty fields in Patch requests. 5017 ForceSendFields []string `json:"-"` 5018 5019 // NullFields is a list of field names (e.g. "QuasiIds") to include in 5020 // API requests with the JSON null value. By default, fields with empty 5021 // values are omitted from API requests. However, any field with an 5022 // empty value appearing in NullFields will be sent to the server as 5023 // null. It is an error if a field in this list has a non-empty value. 5024 // This may be used to include null fields in Patch requests. 5025 NullFields []string `json:"-"` 5026} 5027 5028func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { 5029 type NoMethod GooglePrivacyDlpV2LDiversityConfig 5030 raw := NoMethod(*s) 5031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5032} 5033 5034// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' 5035// values that share the same ldiversity value. 5036type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { 5037 // EquivalenceClassSize: Size of the k-anonymity equivalence class. 5038 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 5039 5040 // NumDistinctSensitiveValues: Number of distinct sensitive values in 5041 // this equivalence class. 5042 NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` 5043 5044 // QuasiIdsValues: Quasi-identifier values defining the k-anonymity 5045 // equivalence class. The order is always the same as the original 5046 // request. 5047 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 5048 5049 // TopSensitiveValues: Estimated frequencies of top sensitive values. 5050 TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` 5051 5052 // ForceSendFields is a list of field names (e.g. 5053 // "EquivalenceClassSize") to unconditionally include in API requests. 5054 // By default, fields with empty or default values are omitted from API 5055 // requests. However, any non-pointer, non-interface field appearing in 5056 // ForceSendFields will be sent to the server regardless of whether the 5057 // field is empty or not. This may be used to include empty fields in 5058 // Patch requests. 5059 ForceSendFields []string `json:"-"` 5060 5061 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 5062 // include in API requests with the JSON null value. By default, fields 5063 // with empty values are omitted from API requests. However, any field 5064 // with an empty value appearing in NullFields will be sent to the 5065 // server as null. It is an error if a field in this list has a 5066 // non-empty value. This may be used to include null fields in Patch 5067 // requests. 5068 NullFields []string `json:"-"` 5069} 5070 5071func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { 5072 type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass 5073 raw := NoMethod(*s) 5074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5075} 5076 5077// GooglePrivacyDlpV2LDiversityHistogramBucket: Histogram of l-diversity 5078// equivalence class sensitive value frequencies. 5079type GooglePrivacyDlpV2LDiversityHistogramBucket struct { 5080 // BucketSize: Total number of equivalence classes in this bucket. 5081 BucketSize int64 `json:"bucketSize,omitempty,string"` 5082 5083 // BucketValueCount: Total number of distinct equivalence classes in 5084 // this bucket. 5085 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 5086 5087 // BucketValues: Sample of equivalence classes in this bucket. The total 5088 // number of classes returned per bucket is capped at 20. 5089 BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` 5090 5091 // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value 5092 // frequencies of the equivalence classes in this bucket. 5093 SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` 5094 5095 // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value 5096 // frequencies of the equivalence classes in this bucket. 5097 SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` 5098 5099 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5100 // unconditionally include in API requests. By default, fields with 5101 // empty or default values are omitted from API requests. However, any 5102 // non-pointer, non-interface field appearing in ForceSendFields will be 5103 // sent to the server regardless of whether the field is empty or not. 5104 // This may be used to include empty fields in Patch requests. 5105 ForceSendFields []string `json:"-"` 5106 5107 // NullFields is a list of field names (e.g. "BucketSize") to include in 5108 // API requests with the JSON null value. By default, fields with empty 5109 // values are omitted from API requests. However, any field with an 5110 // empty value appearing in NullFields will be sent to the server as 5111 // null. It is an error if a field in this list has a non-empty value. 5112 // This may be used to include null fields in Patch requests. 5113 NullFields []string `json:"-"` 5114} 5115 5116func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { 5117 type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket 5118 raw := NoMethod(*s) 5119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5120} 5121 5122// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity 5123// computation. 5124type GooglePrivacyDlpV2LDiversityResult struct { 5125 // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity 5126 // equivalence class sensitive value frequencies. 5127 SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` 5128 5129 // ForceSendFields is a list of field names (e.g. 5130 // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include 5131 // in API requests. By default, fields with empty or default values are 5132 // omitted from API requests. However, any non-pointer, non-interface 5133 // field appearing in ForceSendFields will be sent to the server 5134 // regardless of whether the field is empty or not. This may be used to 5135 // include empty fields in Patch requests. 5136 ForceSendFields []string `json:"-"` 5137 5138 // NullFields is a list of field names (e.g. 5139 // "SensitiveValueFrequencyHistogramBuckets") to include in API requests 5140 // with the JSON null value. By default, fields with empty values are 5141 // omitted from API requests. However, any field with an empty value 5142 // appearing in NullFields will be sent to the server as null. It is an 5143 // error if a field in this list has a non-empty value. This may be used 5144 // to include null fields in Patch requests. 5145 NullFields []string `json:"-"` 5146} 5147 5148func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { 5149 type NoMethod GooglePrivacyDlpV2LDiversityResult 5150 raw := NoMethod(*s) 5151 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5152} 5153 5154// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a 5155// custom dictionary created from a data source of any size up to the 5156// maximum size defined in the limits 5157// (https://cloud.google.com/dlp/limits) page. The artifacts of 5158// dictionary creation are stored in the specified Google Cloud Storage 5159// location. Consider using `CustomInfoType.Dictionary` for smaller 5160// dictionaries that satisfy the size requirements. 5161type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { 5162 // BigQueryField: Field in a BigQuery table where each cell represents a 5163 // dictionary phrase. 5164 BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` 5165 5166 // CloudStorageFileSet: Set of files containing newline-delimited lists 5167 // of dictionary phrases. 5168 CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` 5169 5170 // OutputPath: Location to store dictionary artifacts in Google Cloud 5171 // Storage. These files will only be accessible by project owners and 5172 // the DLP API. If any of these artifacts are modified, the dictionary 5173 // is considered invalid and can no longer be used. 5174 OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` 5175 5176 // ForceSendFields is a list of field names (e.g. "BigQueryField") to 5177 // unconditionally include in API requests. By default, fields with 5178 // empty or default values are omitted from API requests. However, any 5179 // non-pointer, non-interface field appearing in ForceSendFields will be 5180 // sent to the server regardless of whether the field is empty or not. 5181 // This may be used to include empty fields in Patch requests. 5182 ForceSendFields []string `json:"-"` 5183 5184 // NullFields is a list of field names (e.g. "BigQueryField") to include 5185 // in API requests with the JSON null value. By default, fields with 5186 // empty values are omitted from API requests. However, any field with 5187 // an empty value appearing in NullFields will be sent to the server as 5188 // null. It is an error if a field in this list has a non-empty value. 5189 // This may be used to include null fields in Patch requests. 5190 NullFields []string `json:"-"` 5191} 5192 5193func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { 5194 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig 5195 raw := NoMethod(*s) 5196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5197} 5198 5199// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a 5200// custom dictionary. 5201type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { 5202 // ApproxNumPhrases: Approximate number of distinct phrases in the 5203 // dictionary. 5204 ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` 5205 5206 // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to 5207 // unconditionally include in API requests. By default, fields with 5208 // empty or default values are omitted from API requests. However, any 5209 // non-pointer, non-interface field appearing in ForceSendFields will be 5210 // sent to the server regardless of whether the field is empty or not. 5211 // This may be used to include empty fields in Patch requests. 5212 ForceSendFields []string `json:"-"` 5213 5214 // NullFields is a list of field names (e.g. "ApproxNumPhrases") to 5215 // include in API requests with the JSON null value. By default, fields 5216 // with empty values are omitted from API requests. However, any field 5217 // with an empty value appearing in NullFields will be sent to the 5218 // server as null. It is an error if a field in this list has a 5219 // non-empty value. This may be used to include null fields in Patch 5220 // requests. 5221 NullFields []string `json:"-"` 5222} 5223 5224func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { 5225 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats 5226 raw := NoMethod(*s) 5227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5228} 5229 5230// GooglePrivacyDlpV2LeaveUntransformed: Skips the data without 5231// modifying it if the requested transformation would cause an error. 5232// For example, if a `DateShift` transformation were applied an an IP 5233// address, this mode would leave the IP address unchanged in the 5234// response. 5235type GooglePrivacyDlpV2LeaveUntransformed struct { 5236} 5237 5238// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an 5239// adjustment to the likelihood of a finding as part of a detection 5240// rule. 5241type GooglePrivacyDlpV2LikelihoodAdjustment struct { 5242 // FixedLikelihood: Set the likelihood of a finding to a fixed value. 5243 // 5244 // Possible values: 5245 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 5246 // "VERY_UNLIKELY" - Few matching elements. 5247 // "UNLIKELY" 5248 // "POSSIBLE" - Some matching elements. 5249 // "LIKELY" 5250 // "VERY_LIKELY" - Many matching elements. 5251 FixedLikelihood string `json:"fixedLikelihood,omitempty"` 5252 5253 // RelativeLikelihood: Increase or decrease the likelihood by the 5254 // specified number of levels. For example, if a finding would be 5255 // `POSSIBLE` without the detection rule and `relative_likelihood` is 1, 5256 // then it is upgraded to `LIKELY`, while a value of -1 would downgrade 5257 // it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or 5258 // exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an 5259 // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in 5260 // a final likelihood of `LIKELY`. 5261 RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` 5262 5263 // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to 5264 // unconditionally include in API requests. By default, fields with 5265 // empty or default values are omitted from API requests. However, any 5266 // non-pointer, non-interface field appearing in ForceSendFields will be 5267 // sent to the server regardless of whether the field is empty or not. 5268 // This may be used to include empty fields in Patch requests. 5269 ForceSendFields []string `json:"-"` 5270 5271 // NullFields is a list of field names (e.g. "FixedLikelihood") to 5272 // include in API requests with the JSON null value. By default, fields 5273 // with empty values are omitted from API requests. However, any field 5274 // with an empty value appearing in NullFields will be sent to the 5275 // server as null. It is an error if a field in this list has a 5276 // non-empty value. This may be used to include null fields in Patch 5277 // requests. 5278 NullFields []string `json:"-"` 5279} 5280 5281func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { 5282 type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment 5283 raw := NoMethod(*s) 5284 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5285} 5286 5287// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message 5288// for ListDeidentifyTemplates. 5289type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { 5290 // DeidentifyTemplates: List of deidentify templates, up to page_size in 5291 // ListDeidentifyTemplatesRequest. 5292 DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` 5293 5294 // NextPageToken: If the next page is available then the next page token 5295 // to be used in following ListDeidentifyTemplates request. 5296 NextPageToken string `json:"nextPageToken,omitempty"` 5297 5298 // ServerResponse contains the HTTP response code and headers from the 5299 // server. 5300 googleapi.ServerResponse `json:"-"` 5301 5302 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") 5303 // to unconditionally include in API requests. By default, fields with 5304 // empty or default values are omitted from API requests. However, any 5305 // non-pointer, non-interface field appearing in ForceSendFields will be 5306 // sent to the server regardless of whether the field is empty or not. 5307 // This may be used to include empty fields in Patch requests. 5308 ForceSendFields []string `json:"-"` 5309 5310 // NullFields is a list of field names (e.g. "DeidentifyTemplates") to 5311 // include in API requests with the JSON null value. By default, fields 5312 // with empty values are omitted from API requests. However, any field 5313 // with an empty value appearing in NullFields will be sent to the 5314 // server as null. It is an error if a field in this list has a 5315 // non-empty value. This may be used to include null fields in Patch 5316 // requests. 5317 NullFields []string `json:"-"` 5318} 5319 5320func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { 5321 type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse 5322 raw := NoMethod(*s) 5323 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5324} 5325 5326// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for 5327// listing DLP jobs. 5328type GooglePrivacyDlpV2ListDlpJobsResponse struct { 5329 // Jobs: A list of DlpJobs that matches the specified filter in the 5330 // request. 5331 Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` 5332 5333 // NextPageToken: The standard List next-page token. 5334 NextPageToken string `json:"nextPageToken,omitempty"` 5335 5336 // ServerResponse contains the HTTP response code and headers from the 5337 // server. 5338 googleapi.ServerResponse `json:"-"` 5339 5340 // ForceSendFields is a list of field names (e.g. "Jobs") to 5341 // unconditionally include in API requests. By default, fields with 5342 // empty or default values are omitted from API requests. However, any 5343 // non-pointer, non-interface field appearing in ForceSendFields will be 5344 // sent to the server regardless of whether the field is empty or not. 5345 // This may be used to include empty fields in Patch requests. 5346 ForceSendFields []string `json:"-"` 5347 5348 // NullFields is a list of field names (e.g. "Jobs") to include in API 5349 // requests with the JSON null value. By default, fields with empty 5350 // values are omitted from API requests. However, any field with an 5351 // empty value appearing in NullFields will be sent to the server as 5352 // null. It is an error if a field in this list has a non-empty value. 5353 // This may be used to include null fields in Patch requests. 5354 NullFields []string `json:"-"` 5355} 5356 5357func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { 5358 type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse 5359 raw := NoMethod(*s) 5360 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5361} 5362 5363// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the 5364// ListInfoTypes request. 5365type GooglePrivacyDlpV2ListInfoTypesResponse struct { 5366 // InfoTypes: Set of sensitive infoTypes. 5367 InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` 5368 5369 // ServerResponse contains the HTTP response code and headers from the 5370 // server. 5371 googleapi.ServerResponse `json:"-"` 5372 5373 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 5374 // unconditionally include in API requests. By default, fields with 5375 // empty or default values are omitted from API requests. However, any 5376 // non-pointer, non-interface field appearing in ForceSendFields will be 5377 // sent to the server regardless of whether the field is empty or not. 5378 // This may be used to include empty fields in Patch requests. 5379 ForceSendFields []string `json:"-"` 5380 5381 // NullFields is a list of field names (e.g. "InfoTypes") to include in 5382 // API requests with the JSON null value. By default, fields with empty 5383 // values are omitted from API requests. However, any field with an 5384 // empty value appearing in NullFields will be sent to the server as 5385 // null. It is an error if a field in this list has a non-empty value. 5386 // This may be used to include null fields in Patch requests. 5387 NullFields []string `json:"-"` 5388} 5389 5390func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { 5391 type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse 5392 raw := NoMethod(*s) 5393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5394} 5395 5396// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for 5397// ListInspectTemplates. 5398type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { 5399 // InspectTemplates: List of inspectTemplates, up to page_size in 5400 // ListInspectTemplatesRequest. 5401 InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` 5402 5403 // NextPageToken: If the next page is available then the next page token 5404 // to be used in following ListInspectTemplates request. 5405 NextPageToken string `json:"nextPageToken,omitempty"` 5406 5407 // ServerResponse contains the HTTP response code and headers from the 5408 // server. 5409 googleapi.ServerResponse `json:"-"` 5410 5411 // ForceSendFields is a list of field names (e.g. "InspectTemplates") to 5412 // unconditionally include in API requests. By default, fields with 5413 // empty or default values are omitted from API requests. However, any 5414 // non-pointer, non-interface field appearing in ForceSendFields will be 5415 // sent to the server regardless of whether the field is empty or not. 5416 // This may be used to include empty fields in Patch requests. 5417 ForceSendFields []string `json:"-"` 5418 5419 // NullFields is a list of field names (e.g. "InspectTemplates") to 5420 // include in API requests with the JSON null value. By default, fields 5421 // with empty values are omitted from API requests. However, any field 5422 // with an empty value appearing in NullFields will be sent to the 5423 // server as null. It is an error if a field in this list has a 5424 // non-empty value. This may be used to include null fields in Patch 5425 // requests. 5426 NullFields []string `json:"-"` 5427} 5428 5429func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { 5430 type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse 5431 raw := NoMethod(*s) 5432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5433} 5434 5435// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for 5436// ListJobTriggers. 5437type GooglePrivacyDlpV2ListJobTriggersResponse struct { 5438 // JobTriggers: List of triggeredJobs, up to page_size in 5439 // ListJobTriggersRequest. 5440 JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` 5441 5442 // NextPageToken: If the next page is available then the next page token 5443 // to be used in following ListJobTriggers request. 5444 NextPageToken string `json:"nextPageToken,omitempty"` 5445 5446 // ServerResponse contains the HTTP response code and headers from the 5447 // server. 5448 googleapi.ServerResponse `json:"-"` 5449 5450 // ForceSendFields is a list of field names (e.g. "JobTriggers") to 5451 // unconditionally include in API requests. By default, fields with 5452 // empty or default values are omitted from API requests. However, any 5453 // non-pointer, non-interface field appearing in ForceSendFields will be 5454 // sent to the server regardless of whether the field is empty or not. 5455 // This may be used to include empty fields in Patch requests. 5456 ForceSendFields []string `json:"-"` 5457 5458 // NullFields is a list of field names (e.g. "JobTriggers") to include 5459 // in API requests with the JSON null value. By default, fields with 5460 // empty values are omitted from API requests. However, any field with 5461 // an empty value appearing in NullFields will be sent to the server as 5462 // null. It is an error if a field in this list has a non-empty value. 5463 // This may be used to include null fields in Patch requests. 5464 NullFields []string `json:"-"` 5465} 5466 5467func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { 5468 type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse 5469 raw := NoMethod(*s) 5470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5471} 5472 5473// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for 5474// ListStoredInfoTypes. 5475type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { 5476 // NextPageToken: If the next page is available then the next page token 5477 // to be used in following ListStoredInfoTypes request. 5478 NextPageToken string `json:"nextPageToken,omitempty"` 5479 5480 // StoredInfoTypes: List of storedInfoTypes, up to page_size in 5481 // ListStoredInfoTypesRequest. 5482 StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` 5483 5484 // ServerResponse contains the HTTP response code and headers from the 5485 // server. 5486 googleapi.ServerResponse `json:"-"` 5487 5488 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5489 // unconditionally include in API requests. By default, fields with 5490 // empty or default values are omitted from API requests. However, any 5491 // non-pointer, non-interface field appearing in ForceSendFields will be 5492 // sent to the server regardless of whether the field is empty or not. 5493 // This may be used to include empty fields in Patch requests. 5494 ForceSendFields []string `json:"-"` 5495 5496 // NullFields is a list of field names (e.g. "NextPageToken") to include 5497 // in API requests with the JSON null value. By default, fields with 5498 // empty values are omitted from API requests. However, any field with 5499 // an empty value appearing in NullFields will be sent to the server as 5500 // null. It is an error if a field in this list has a non-empty value. 5501 // This may be used to include null fields in Patch requests. 5502 NullFields []string `json:"-"` 5503} 5504 5505func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { 5506 type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse 5507 raw := NoMethod(*s) 5508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5509} 5510 5511// GooglePrivacyDlpV2Location: Specifies the location of the finding. 5512type GooglePrivacyDlpV2Location struct { 5513 // ByteRange: Zero-based byte offsets delimiting the finding. These are 5514 // relative to the finding's containing element. Note that when the 5515 // content is not textual, this references the UTF-8 encoded textual 5516 // representation of the content. Omitted if content is an image. 5517 ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` 5518 5519 // CodepointRange: Unicode character offsets delimiting the finding. 5520 // These are relative to the finding's containing element. Provided when 5521 // the content is text. 5522 CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` 5523 5524 // Container: Information about the container where this finding 5525 // occurred, if available. 5526 Container *GooglePrivacyDlpV2Container `json:"container,omitempty"` 5527 5528 // ContentLocations: List of nested objects pointing to the precise 5529 // location of the finding within the file or record. 5530 ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` 5531 5532 // ForceSendFields is a list of field names (e.g. "ByteRange") to 5533 // unconditionally include in API requests. By default, fields with 5534 // empty or default values are omitted from API requests. However, any 5535 // non-pointer, non-interface field appearing in ForceSendFields will be 5536 // sent to the server regardless of whether the field is empty or not. 5537 // This may be used to include empty fields in Patch requests. 5538 ForceSendFields []string `json:"-"` 5539 5540 // NullFields is a list of field names (e.g. "ByteRange") to include in 5541 // API requests with the JSON null value. By default, fields with empty 5542 // values are omitted from API requests. However, any field with an 5543 // empty value appearing in NullFields will be sent to the server as 5544 // null. It is an error if a field in this list has a non-empty value. 5545 // This may be used to include null fields in Patch requests. 5546 NullFields []string `json:"-"` 5547} 5548 5549func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { 5550 type NoMethod GooglePrivacyDlpV2Location 5551 raw := NoMethod(*s) 5552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5553} 5554 5555// GooglePrivacyDlpV2Manual: Job trigger option for hybrid jobs. Jobs 5556// must be manually created and finished. 5557type GooglePrivacyDlpV2Manual struct { 5558} 5559 5560// GooglePrivacyDlpV2MetadataLocation: Metadata Location 5561type GooglePrivacyDlpV2MetadataLocation struct { 5562 // StorageLabel: Storage metadata. 5563 StorageLabel *GooglePrivacyDlpV2StorageMetadataLabel `json:"storageLabel,omitempty"` 5564 5565 // Type: Type of metadata containing the finding. 5566 // 5567 // Possible values: 5568 // "METADATATYPE_UNSPECIFIED" - Unused 5569 // "STORAGE_METADATA" - General file metadata provided by Cloud 5570 // Storage. 5571 Type string `json:"type,omitempty"` 5572 5573 // ForceSendFields is a list of field names (e.g. "StorageLabel") to 5574 // unconditionally include in API requests. By default, fields with 5575 // empty or default values are omitted from API requests. However, any 5576 // non-pointer, non-interface field appearing in ForceSendFields will be 5577 // sent to the server regardless of whether the field is empty or not. 5578 // This may be used to include empty fields in Patch requests. 5579 ForceSendFields []string `json:"-"` 5580 5581 // NullFields is a list of field names (e.g. "StorageLabel") to include 5582 // in API requests with the JSON null value. By default, fields with 5583 // empty values are omitted from API requests. However, any field with 5584 // an empty value appearing in NullFields will be sent to the server as 5585 // null. It is an error if a field in this list has a non-empty value. 5586 // This may be used to include null fields in Patch requests. 5587 NullFields []string `json:"-"` 5588} 5589 5590func (s *GooglePrivacyDlpV2MetadataLocation) MarshalJSON() ([]byte, error) { 5591 type NoMethod GooglePrivacyDlpV2MetadataLocation 5592 raw := NoMethod(*s) 5593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5594} 5595 5596// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over 5597// an individual column, including min, max, and quantiles. 5598type GooglePrivacyDlpV2NumericalStatsConfig struct { 5599 // Field: Field to compute numerical stats on. Supported types are 5600 // integer, float, date, datetime, timestamp, time. 5601 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5602 5603 // ForceSendFields is a list of field names (e.g. "Field") to 5604 // unconditionally include in API requests. By default, fields with 5605 // empty or default values are omitted from API requests. However, any 5606 // non-pointer, non-interface field appearing in ForceSendFields will be 5607 // sent to the server regardless of whether the field is empty or not. 5608 // This may be used to include empty fields in Patch requests. 5609 ForceSendFields []string `json:"-"` 5610 5611 // NullFields is a list of field names (e.g. "Field") to include in API 5612 // requests with the JSON null value. By default, fields with empty 5613 // values are omitted from API requests. However, any field with an 5614 // empty value appearing in NullFields will be sent to the server as 5615 // null. It is an error if a field in this list has a non-empty value. 5616 // This may be used to include null fields in Patch requests. 5617 NullFields []string `json:"-"` 5618} 5619 5620func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { 5621 type NoMethod GooglePrivacyDlpV2NumericalStatsConfig 5622 raw := NoMethod(*s) 5623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5624} 5625 5626// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats 5627// computation. 5628type GooglePrivacyDlpV2NumericalStatsResult struct { 5629 // MaxValue: Maximum value appearing in the column. 5630 MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` 5631 5632 // MinValue: Minimum value appearing in the column. 5633 MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` 5634 5635 // QuantileValues: List of 99 values that partition the set of field 5636 // values into 100 equal sized buckets. 5637 QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` 5638 5639 // ForceSendFields is a list of field names (e.g. "MaxValue") to 5640 // unconditionally include in API requests. By default, fields with 5641 // empty or default values are omitted from API requests. However, any 5642 // non-pointer, non-interface field appearing in ForceSendFields will be 5643 // sent to the server regardless of whether the field is empty or not. 5644 // This may be used to include empty fields in Patch requests. 5645 ForceSendFields []string `json:"-"` 5646 5647 // NullFields is a list of field names (e.g. "MaxValue") to include in 5648 // API requests with the JSON null value. By default, fields with empty 5649 // values are omitted from API requests. However, any field with an 5650 // empty value appearing in NullFields will be sent to the server as 5651 // null. It is an error if a field in this list has a non-empty value. 5652 // This may be used to include null fields in Patch requests. 5653 NullFields []string `json:"-"` 5654} 5655 5656func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { 5657 type NoMethod GooglePrivacyDlpV2NumericalStatsResult 5658 raw := NoMethod(*s) 5659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5660} 5661 5662// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing 5663// output. 5664type GooglePrivacyDlpV2OutputStorageConfig struct { 5665 // OutputSchema: Schema used for writing the findings for Inspect jobs. 5666 // This field is only used for Inspect and must be unspecified for Risk 5667 // jobs. Columns are derived from the `Finding` object. If appending to 5668 // an existing table, any columns from the predefined schema that are 5669 // missing will be added. No columns in the existing table will be 5670 // deleted. If unspecified, then all available columns will be used for 5671 // a new table or an (existing) table with no schema, and no changes 5672 // will be made to an existing table that has a schema. Only for use 5673 // with external storage. 5674 // 5675 // Possible values: 5676 // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. 5677 // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, 5678 // `certainty`, and `timestamp`. 5679 // "GCS_COLUMNS" - Schema tailored to findings from scanning Google 5680 // Cloud Storage. 5681 // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning 5682 // Google Datastore. 5683 // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning 5684 // Google BigQuery. 5685 // "ALL_COLUMNS" - Schema containing all columns. 5686 OutputSchema string `json:"outputSchema,omitempty"` 5687 5688 // Table: Store findings in an existing table or a new table in an 5689 // existing dataset. If table_id is not set a new one will be generated 5690 // for you with the following format: 5691 // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used 5692 // for generating the date details. For Inspect, each column in an 5693 // existing output table must have the same name, type, and mode of a 5694 // field in the `Finding` object. For Risk, an existing output table 5695 // should be the output of a previous Risk analysis job run on the same 5696 // source table, with the same privacy metric and quasi-identifiers. 5697 // Risk jobs that analyze the same table but compute a different privacy 5698 // metric, or use different sets of quasi-identifiers, cannot store 5699 // their results in the same table. 5700 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 5701 5702 // ForceSendFields is a list of field names (e.g. "OutputSchema") to 5703 // unconditionally include in API requests. By default, fields with 5704 // empty or default values are omitted from API requests. However, any 5705 // non-pointer, non-interface field appearing in ForceSendFields will be 5706 // sent to the server regardless of whether the field is empty or not. 5707 // This may be used to include empty fields in Patch requests. 5708 ForceSendFields []string `json:"-"` 5709 5710 // NullFields is a list of field names (e.g. "OutputSchema") to include 5711 // in API requests with the JSON null value. By default, fields with 5712 // empty values are omitted from API requests. However, any field with 5713 // an empty value appearing in NullFields will be sent to the server as 5714 // null. It is an error if a field in this list has a non-empty value. 5715 // This may be used to include null fields in Patch requests. 5716 NullFields []string `json:"-"` 5717} 5718 5719func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { 5720 type NoMethod GooglePrivacyDlpV2OutputStorageConfig 5721 raw := NoMethod(*s) 5722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5723} 5724 5725// GooglePrivacyDlpV2PartitionId: Datastore partition ID. A partition ID 5726// identifies a grouping of entities. The grouping is always by project 5727// and namespace, however the namespace ID may be empty. A partition ID 5728// contains several dimensions: project ID and namespace ID. 5729type GooglePrivacyDlpV2PartitionId struct { 5730 // NamespaceId: If not empty, the ID of the namespace to which the 5731 // entities belong. 5732 NamespaceId string `json:"namespaceId,omitempty"` 5733 5734 // ProjectId: The ID of the project to which the entities belong. 5735 ProjectId string `json:"projectId,omitempty"` 5736 5737 // ForceSendFields is a list of field names (e.g. "NamespaceId") to 5738 // unconditionally include in API requests. By default, fields with 5739 // empty or default values are omitted from API requests. However, any 5740 // non-pointer, non-interface field appearing in ForceSendFields will be 5741 // sent to the server regardless of whether the field is empty or not. 5742 // This may be used to include empty fields in Patch requests. 5743 ForceSendFields []string `json:"-"` 5744 5745 // NullFields is a list of field names (e.g. "NamespaceId") to include 5746 // in API requests with the JSON null value. By default, fields with 5747 // empty values are omitted from API requests. However, any field with 5748 // an 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 *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { 5755 type NoMethod GooglePrivacyDlpV2PartitionId 5756 raw := NoMethod(*s) 5757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5758} 5759 5760// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to 5761// construct a key path. If either name or ID is set, the element is 5762// complete. If neither is set, the element is incomplete. 5763type GooglePrivacyDlpV2PathElement struct { 5764 // Id: The auto-allocated ID of the entity. Never equal to zero. Values 5765 // less than zero are discouraged and may not be supported in the 5766 // future. 5767 Id int64 `json:"id,omitempty,string"` 5768 5769 // Kind: The kind of the entity. A kind matching regex `__.*__` is 5770 // reserved/read-only. A kind must not contain more than 1500 bytes when 5771 // UTF-8 encoded. Cannot be "". 5772 Kind string `json:"kind,omitempty"` 5773 5774 // Name: The name of the entity. A name matching regex `__.*__` is 5775 // reserved/read-only. A name must not be more than 1500 bytes when 5776 // UTF-8 encoded. Cannot be "". 5777 Name string `json:"name,omitempty"` 5778 5779 // ForceSendFields is a list of field names (e.g. "Id") to 5780 // unconditionally include in API requests. By default, fields with 5781 // empty or default values are omitted from API requests. However, any 5782 // non-pointer, non-interface field appearing in ForceSendFields will be 5783 // sent to the server regardless of whether the field is empty or not. 5784 // This may be used to include empty fields in Patch requests. 5785 ForceSendFields []string `json:"-"` 5786 5787 // NullFields is a list of field names (e.g. "Id") to include in API 5788 // requests with the JSON null value. By default, fields with empty 5789 // values are omitted from API requests. However, any field with an 5790 // empty value appearing in NullFields will be sent to the server as 5791 // null. It is an error if a field in this list has a non-empty value. 5792 // This may be used to include null fields in Patch requests. 5793 NullFields []string `json:"-"` 5794} 5795 5796func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { 5797 type NoMethod GooglePrivacyDlpV2PathElement 5798 raw := NoMethod(*s) 5799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5800} 5801 5802// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a 5803// value. 5804type GooglePrivacyDlpV2PrimitiveTransformation struct { 5805 // BucketingConfig: Bucketing 5806 BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` 5807 5808 // CharacterMaskConfig: Mask 5809 CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 5810 5811 // CryptoDeterministicConfig: Deterministic Crypto 5812 CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` 5813 5814 // CryptoHashConfig: Crypto 5815 CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 5816 5817 // CryptoReplaceFfxFpeConfig: Ffx-Fpe 5818 CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` 5819 5820 // DateShiftConfig: Date Shift 5821 DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` 5822 5823 // FixedSizeBucketingConfig: Fixed size bucketing 5824 FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` 5825 5826 // RedactConfig: Redact 5827 RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` 5828 5829 // ReplaceConfig: Replace with a specified value. 5830 ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` 5831 5832 // ReplaceDictionaryConfig: Replace with a value randomly drawn (with 5833 // replacement) from a dictionary. 5834 ReplaceDictionaryConfig *GooglePrivacyDlpV2ReplaceDictionaryConfig `json:"replaceDictionaryConfig,omitempty"` 5835 5836 // ReplaceWithInfoTypeConfig: Replace with infotype 5837 ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 5838 5839 // TimePartConfig: Time extraction 5840 TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` 5841 5842 // ForceSendFields is a list of field names (e.g. "BucketingConfig") to 5843 // unconditionally include in API requests. By default, fields with 5844 // empty or default values are omitted from API requests. However, any 5845 // non-pointer, non-interface field appearing in ForceSendFields will be 5846 // sent to the server regardless of whether the field is empty or not. 5847 // This may be used to include empty fields in Patch requests. 5848 ForceSendFields []string `json:"-"` 5849 5850 // NullFields is a list of field names (e.g. "BucketingConfig") to 5851 // include in API requests with the JSON null value. By default, fields 5852 // with empty values are omitted from API requests. However, any field 5853 // 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 *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { 5861 type NoMethod GooglePrivacyDlpV2PrimitiveTransformation 5862 raw := NoMethod(*s) 5863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5864} 5865 5866// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for 5867// reidentification risk analysis. 5868type GooglePrivacyDlpV2PrivacyMetric struct { 5869 // CategoricalStatsConfig: Categorical stats 5870 CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` 5871 5872 // DeltaPresenceEstimationConfig: delta-presence 5873 DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` 5874 5875 // KAnonymityConfig: K-anonymity 5876 KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` 5877 5878 // KMapEstimationConfig: k-map 5879 KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` 5880 5881 // LDiversityConfig: l-diversity 5882 LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` 5883 5884 // NumericalStatsConfig: Numerical stats 5885 NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` 5886 5887 // ForceSendFields is a list of field names (e.g. 5888 // "CategoricalStatsConfig") to unconditionally include in API requests. 5889 // By default, fields with empty or default values are omitted from API 5890 // requests. However, any non-pointer, non-interface field appearing in 5891 // ForceSendFields will be sent to the server regardless of whether the 5892 // field is empty or not. This may be used to include empty fields in 5893 // Patch requests. 5894 ForceSendFields []string `json:"-"` 5895 5896 // NullFields is a list of field names (e.g. "CategoricalStatsConfig") 5897 // to include in API requests with the JSON null value. By default, 5898 // fields with empty values are omitted from API requests. However, any 5899 // field with an empty value appearing in NullFields will be sent to the 5900 // server as null. It is an error if a field in this list has a 5901 // non-empty value. This may be used to include null fields in Patch 5902 // requests. 5903 NullFields []string `json:"-"` 5904} 5905 5906func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { 5907 type NoMethod GooglePrivacyDlpV2PrivacyMetric 5908 raw := NoMethod(*s) 5909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5910} 5911 5912// GooglePrivacyDlpV2Proximity: Message for specifying a window around a 5913// finding to apply a detection rule. 5914type GooglePrivacyDlpV2Proximity struct { 5915 // WindowAfter: Number of characters after the finding to consider. 5916 WindowAfter int64 `json:"windowAfter,omitempty"` 5917 5918 // WindowBefore: Number of characters before the finding to consider. 5919 WindowBefore int64 `json:"windowBefore,omitempty"` 5920 5921 // ForceSendFields is a list of field names (e.g. "WindowAfter") to 5922 // unconditionally include in API requests. By default, fields with 5923 // empty or default values are omitted from API requests. However, any 5924 // non-pointer, non-interface field appearing in ForceSendFields will be 5925 // sent to the server regardless of whether the field is empty or not. 5926 // This may be used to include empty fields in Patch requests. 5927 ForceSendFields []string `json:"-"` 5928 5929 // NullFields is a list of field names (e.g. "WindowAfter") to include 5930 // in API requests with the JSON null value. By default, fields with 5931 // empty values are omitted from API requests. However, any field with 5932 // an empty value appearing in NullFields will be sent to the server as 5933 // null. It is an error if a field in this list has a non-empty value. 5934 // This may be used to include null fields in Patch requests. 5935 NullFields []string `json:"-"` 5936} 5937 5938func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { 5939 type NoMethod GooglePrivacyDlpV2Proximity 5940 raw := NoMethod(*s) 5941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5942} 5943 5944// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings 5945// of a DlpJob to Data Catalog. Labels summarizing the results of the 5946// DlpJob will be applied to the entry for the resource scanned in Data 5947// Catalog. Any labels previously written by another DlpJob will be 5948// deleted. InfoType naming patterns are strictly enforced when using 5949// this feature. Note that the findings will be persisted in Data 5950// Catalog storage and are governed by Data Catalog service-specific 5951// policy, see https://cloud.google.com/terms/service-terms Only a 5952// single instance of this action can be specified and only allowed if 5953// all resources being scanned are BigQuery tables. Compatible with: 5954// Inspect 5955type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { 5956} 5957 5958// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of 5959// a DlpJob to the Cloud Security Command Center (CSCC Alpha). This 5960// action is only available for projects which are parts of an 5961// organization and whitelisted for the alpha Cloud Security Command 5962// Center. The action will publish count of finding instances and their 5963// info types. The summary of findings will be persisted in CSCC and are 5964// governed by CSCC service-specific policy, see 5965// https://cloud.google.com/terms/service-terms Only a single instance 5966// of this action can be specified. Compatible with: Inspect 5967type GooglePrivacyDlpV2PublishSummaryToCscc struct { 5968} 5969 5970// GooglePrivacyDlpV2PublishToPubSub: Publish a message into given 5971// Pub/Sub topic when DlpJob has completed. The message contains a 5972// single field, `DlpJobName`, which is equal to the finished job's 5973// `DlpJob.name` 5974// (https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). 5975// Compatible with: Inspect, Risk 5976type GooglePrivacyDlpV2PublishToPubSub struct { 5977 // Topic: Cloud Pub/Sub topic to send notifications to. The topic must 5978 // have given publishing access rights to the DLP API service account 5979 // executing the long running DlpJob sending the notifications. Format 5980 // is projects/{project}/topics/{topic}. 5981 Topic string `json:"topic,omitempty"` 5982 5983 // ForceSendFields is a list of field names (e.g. "Topic") to 5984 // unconditionally include in API requests. By default, fields with 5985 // empty or default values are omitted from API requests. However, any 5986 // non-pointer, non-interface field appearing in ForceSendFields will be 5987 // sent to the server regardless of whether the field is empty or not. 5988 // This may be used to include empty fields in Patch requests. 5989 ForceSendFields []string `json:"-"` 5990 5991 // NullFields is a list of field names (e.g. "Topic") to include in API 5992 // requests with the JSON null value. By default, fields with empty 5993 // values are omitted from API requests. However, any field with an 5994 // empty value appearing in NullFields will be sent to the server as 5995 // null. It is an error if a field in this list has a non-empty value. 5996 // This may be used to include null fields in Patch requests. 5997 NullFields []string `json:"-"` 5998} 5999 6000func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { 6001 type NoMethod GooglePrivacyDlpV2PublishToPubSub 6002 raw := NoMethod(*s) 6003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6004} 6005 6006// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric 6007// dlp.googleapis.com/finding_count. This will publish a metric to stack 6008// driver on each infotype requested and how many findings were found 6009// for it. CustomDetectors will be bucketed as 'Custom' under the 6010// Stackdriver label 'info_type'. 6011type GooglePrivacyDlpV2PublishToStackdriver struct { 6012} 6013 6014// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. 6015type GooglePrivacyDlpV2QuasiId struct { 6016 // CustomTag: A column can be tagged with a custom tag. In this case, 6017 // the user must indicate an auxiliary table that contains statistical 6018 // information on the possible values of this column (below). 6019 CustomTag string `json:"customTag,omitempty"` 6020 6021 // Field: Required. Identifies the column. 6022 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6023 6024 // Inferred: If no semantic tag is indicated, we infer the statistical 6025 // model from the distribution of values in the input data 6026 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 6027 6028 // InfoType: A column can be tagged with a InfoType to use the relevant 6029 // public dataset as a statistical model of population, if available. We 6030 // currently support US ZIP codes, region codes, ages and genders. To 6031 // programmatically obtain the list of supported InfoTypes, use 6032 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 6033 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 6034 6035 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6036 // unconditionally include in API requests. By default, fields with 6037 // empty or default values are omitted from API requests. However, any 6038 // non-pointer, non-interface field appearing in ForceSendFields will be 6039 // sent to the server regardless of whether the field is empty or not. 6040 // This may be used to include empty fields in Patch requests. 6041 ForceSendFields []string `json:"-"` 6042 6043 // NullFields is a list of field names (e.g. "CustomTag") to include in 6044 // API requests with the JSON null value. By default, fields with empty 6045 // values are omitted from API requests. However, any field with an 6046 // empty value appearing in NullFields will be sent to the server as 6047 // null. It is an error if a field in this list has a non-empty value. 6048 // This may be used to include null fields in Patch requests. 6049 NullFields []string `json:"-"` 6050} 6051 6052func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { 6053 type NoMethod GooglePrivacyDlpV2QuasiId 6054 raw := NoMethod(*s) 6055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6056} 6057 6058// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a 6059// custom_tag, used to know which column in the data corresponds to 6060// which column in the statistical model. 6061type GooglePrivacyDlpV2QuasiIdField struct { 6062 // CustomTag: A auxiliary field. 6063 CustomTag string `json:"customTag,omitempty"` 6064 6065 // Field: Identifies the column. 6066 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6067 6068 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6069 // unconditionally include in API requests. By default, fields with 6070 // empty or default values are omitted from API requests. However, any 6071 // non-pointer, non-interface field appearing in ForceSendFields will be 6072 // sent to the server regardless of whether the field is empty or not. 6073 // This may be used to include empty fields in Patch requests. 6074 ForceSendFields []string `json:"-"` 6075 6076 // NullFields is a list of field names (e.g. "CustomTag") to include in 6077 // API requests with the JSON null value. By default, fields with empty 6078 // values are omitted from API requests. However, any field with an 6079 // empty value appearing in NullFields will be sent to the server as 6080 // null. It is an error if a field in this list has a non-empty value. 6081 // This may be used to include null fields in Patch requests. 6082 NullFields []string `json:"-"` 6083} 6084 6085func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { 6086 type NoMethod GooglePrivacyDlpV2QuasiIdField 6087 raw := NoMethod(*s) 6088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6089} 6090 6091// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has 6092// a custom_tag, used to know which column in the data corresponds to 6093// which column in the statistical model. 6094type GooglePrivacyDlpV2QuasiIdentifierField struct { 6095 // CustomTag: A column can be tagged with a custom tag. In this case, 6096 // the user must indicate an auxiliary table that contains statistical 6097 // information on the possible values of this column (below). 6098 CustomTag string `json:"customTag,omitempty"` 6099 6100 // Field: Identifies the column. 6101 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6102 6103 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6104 // unconditionally include in API requests. By default, fields with 6105 // empty or default values are omitted from API requests. However, any 6106 // non-pointer, non-interface field appearing in ForceSendFields will be 6107 // sent to the server regardless of whether the field is empty or not. 6108 // This may be used to include empty fields in Patch requests. 6109 ForceSendFields []string `json:"-"` 6110 6111 // NullFields is a list of field names (e.g. "CustomTag") to include in 6112 // API requests with the JSON null value. By default, fields with empty 6113 // values are omitted from API requests. However, any field with an 6114 // empty value appearing in NullFields will be sent to the server as 6115 // null. It is an error if a field in this list has a non-empty value. 6116 // This may be used to include null fields in Patch requests. 6117 NullFields []string `json:"-"` 6118} 6119 6120func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { 6121 type NoMethod GooglePrivacyDlpV2QuasiIdentifierField 6122 raw := NoMethod(*s) 6123 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6124} 6125 6126// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details 6127// parsed from quote. 6128type GooglePrivacyDlpV2QuoteInfo struct { 6129 // DateTime: The date time indicated by the quote. 6130 DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` 6131 6132 // ForceSendFields is a list of field names (e.g. "DateTime") to 6133 // unconditionally include in API requests. By default, fields with 6134 // empty or default values are omitted from API requests. However, any 6135 // non-pointer, non-interface field appearing in ForceSendFields will be 6136 // sent to the server regardless of whether the field is empty or not. 6137 // This may be used to include empty fields in Patch requests. 6138 ForceSendFields []string `json:"-"` 6139 6140 // NullFields is a list of field names (e.g. "DateTime") to include in 6141 // API requests with the JSON null value. By default, fields with empty 6142 // values are omitted from API requests. However, any field with an 6143 // empty value appearing in NullFields will be sent to the server as 6144 // null. It is an error if a field in this list has a non-empty value. 6145 // This may be used to include null fields in Patch requests. 6146 NullFields []string `json:"-"` 6147} 6148 6149func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { 6150 type NoMethod GooglePrivacyDlpV2QuoteInfo 6151 raw := NoMethod(*s) 6152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6153} 6154 6155// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) 6156type GooglePrivacyDlpV2Range struct { 6157 // End: Index of the last character of the range (exclusive). 6158 End int64 `json:"end,omitempty,string"` 6159 6160 // Start: Index of the first character of the range (inclusive). 6161 Start int64 `json:"start,omitempty,string"` 6162 6163 // ForceSendFields is a list of field names (e.g. "End") to 6164 // unconditionally include in API requests. By default, fields with 6165 // empty or default values are omitted from API requests. However, any 6166 // non-pointer, non-interface field appearing in ForceSendFields will be 6167 // sent to the server regardless of whether the field is empty or not. 6168 // This may be used to include empty fields in Patch requests. 6169 ForceSendFields []string `json:"-"` 6170 6171 // NullFields is a list of field names (e.g. "End") to include in API 6172 // requests with the JSON null value. By default, fields with empty 6173 // values are omitted from API requests. However, any field with an 6174 // empty value appearing in NullFields will be sent to the server as 6175 // null. It is an error if a field in this list has a non-empty value. 6176 // This may be used to include null fields in Patch requests. 6177 NullFields []string `json:"-"` 6178} 6179 6180func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { 6181 type NoMethod GooglePrivacyDlpV2Range 6182 raw := NoMethod(*s) 6183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6184} 6185 6186// GooglePrivacyDlpV2RecordCondition: A condition for determining 6187// whether a transformation should be applied to a field. 6188type GooglePrivacyDlpV2RecordCondition struct { 6189 // Expressions: An expression. 6190 Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` 6191 6192 // ForceSendFields is a list of field names (e.g. "Expressions") to 6193 // unconditionally include in API requests. By default, fields with 6194 // empty or default values are omitted from API requests. However, any 6195 // non-pointer, non-interface field appearing in ForceSendFields will be 6196 // sent to the server regardless of whether the field is empty or not. 6197 // This may be used to include empty fields in Patch requests. 6198 ForceSendFields []string `json:"-"` 6199 6200 // NullFields is a list of field names (e.g. "Expressions") to include 6201 // in API requests with the JSON null value. By default, fields with 6202 // empty values are omitted from API requests. However, any field with 6203 // an empty value appearing in NullFields will be sent to the server as 6204 // null. It is an error if a field in this list has a non-empty value. 6205 // This may be used to include null fields in Patch requests. 6206 NullFields []string `json:"-"` 6207} 6208 6209func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { 6210 type NoMethod GooglePrivacyDlpV2RecordCondition 6211 raw := NoMethod(*s) 6212 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6213} 6214 6215// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a 6216// record that contains a finding. 6217type GooglePrivacyDlpV2RecordKey struct { 6218 BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` 6219 6220 DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` 6221 6222 // IdValues: Values of identifying columns in the given row. Order of 6223 // values matches the order of `identifying_fields` specified in the 6224 // scanning request. 6225 IdValues []string `json:"idValues,omitempty"` 6226 6227 // ForceSendFields is a list of field names (e.g. "BigQueryKey") to 6228 // unconditionally include in API requests. By default, fields with 6229 // empty or default values are omitted from API requests. However, any 6230 // non-pointer, non-interface field appearing in ForceSendFields will be 6231 // sent to the server regardless of whether the field is empty or not. 6232 // This may be used to include empty fields in Patch requests. 6233 ForceSendFields []string `json:"-"` 6234 6235 // NullFields is a list of field names (e.g. "BigQueryKey") to include 6236 // in API requests with the JSON null value. By default, fields with 6237 // empty values are omitted from API requests. However, any field with 6238 // an empty value appearing in NullFields will be sent to the server as 6239 // null. It is an error if a field in this list has a non-empty value. 6240 // This may be used to include null fields in Patch requests. 6241 NullFields []string `json:"-"` 6242} 6243 6244func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { 6245 type NoMethod GooglePrivacyDlpV2RecordKey 6246 raw := NoMethod(*s) 6247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6248} 6249 6250// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row 6251// or record. 6252type GooglePrivacyDlpV2RecordLocation struct { 6253 // FieldId: Field id of the field containing the finding. 6254 FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` 6255 6256 // RecordKey: Key of the finding. 6257 RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` 6258 6259 // TableLocation: Location within a `ContentItem.Table`. 6260 TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` 6261 6262 // ForceSendFields is a list of field names (e.g. "FieldId") to 6263 // unconditionally include in API requests. By default, fields with 6264 // empty or default values are omitted from API requests. However, any 6265 // non-pointer, non-interface field appearing in ForceSendFields will be 6266 // sent to the server regardless of whether the field is empty or not. 6267 // This may be used to include empty fields in Patch requests. 6268 ForceSendFields []string `json:"-"` 6269 6270 // NullFields is a list of field names (e.g. "FieldId") to include in 6271 // API requests with the JSON null value. By default, fields with empty 6272 // values are omitted from API requests. However, any field with an 6273 // empty value appearing in NullFields will be sent to the server as 6274 // null. It is an error if a field in this list has a non-empty value. 6275 // This may be used to include null fields in Patch requests. 6276 NullFields []string `json:"-"` 6277} 6278 6279func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { 6280 type NoMethod GooglePrivacyDlpV2RecordLocation 6281 raw := NoMethod(*s) 6282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6283} 6284 6285// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress 6286// records whose suppression conditions evaluate to true. 6287type GooglePrivacyDlpV2RecordSuppression struct { 6288 // Condition: A condition that when it evaluates to true will result in 6289 // the record being evaluated to be suppressed from the transformed 6290 // content. 6291 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 6292 6293 // ForceSendFields is a list of field names (e.g. "Condition") to 6294 // unconditionally include in API requests. By default, fields with 6295 // empty or default values are omitted from API requests. However, any 6296 // non-pointer, non-interface field appearing in ForceSendFields will be 6297 // sent to the server regardless of whether the field is empty or not. 6298 // This may be used to include empty fields in Patch requests. 6299 ForceSendFields []string `json:"-"` 6300 6301 // NullFields is a list of field names (e.g. "Condition") to include in 6302 // API requests with the JSON null value. By default, fields with empty 6303 // values are omitted from API requests. However, any field with an 6304 // empty value appearing in NullFields will be sent to the server as 6305 // null. It is an error if a field in this list has a non-empty value. 6306 // This may be used to include null fields in Patch requests. 6307 NullFields []string `json:"-"` 6308} 6309 6310func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { 6311 type NoMethod GooglePrivacyDlpV2RecordSuppression 6312 raw := NoMethod(*s) 6313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6314} 6315 6316// GooglePrivacyDlpV2RecordTransformations: A type of transformation 6317// that is applied over structured data such as a table. 6318type GooglePrivacyDlpV2RecordTransformations struct { 6319 // FieldTransformations: Transform the record by applying various field 6320 // transformations. 6321 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 6322 6323 // RecordSuppressions: Configuration defining which records get 6324 // suppressed entirely. Records that match any suppression rule are 6325 // omitted from the output. 6326 RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` 6327 6328 // ForceSendFields is a list of field names (e.g. 6329 // "FieldTransformations") to unconditionally include in API requests. 6330 // By default, fields with empty or default values are omitted from API 6331 // requests. However, any non-pointer, non-interface field appearing in 6332 // ForceSendFields will be sent to the server regardless of whether the 6333 // field is empty or not. This may be used to include empty fields in 6334 // Patch requests. 6335 ForceSendFields []string `json:"-"` 6336 6337 // NullFields is a list of field names (e.g. "FieldTransformations") to 6338 // include in API requests with the JSON null value. By default, fields 6339 // with empty values are omitted from API requests. However, any field 6340 // with an empty value appearing in NullFields will be sent to the 6341 // server as null. It is an error if a field in this list has a 6342 // non-empty value. This may be used to include null fields in Patch 6343 // requests. 6344 NullFields []string `json:"-"` 6345} 6346 6347func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { 6348 type NoMethod GooglePrivacyDlpV2RecordTransformations 6349 raw := NoMethod(*s) 6350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6351} 6352 6353// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if 6354// used with an `InfoTypeTransformation` transforming PHONE_NUMBER, and 6355// input 'My phone number is 206-555-0123', the output would be 'My 6356// phone number is '. 6357type GooglePrivacyDlpV2RedactConfig struct { 6358} 6359 6360// GooglePrivacyDlpV2RedactImageRequest: Request to search for 6361// potentially sensitive info in an image and redact it by covering it 6362// with a colored rectangle. 6363type GooglePrivacyDlpV2RedactImageRequest struct { 6364 // ByteItem: The content must be PNG, JPEG, SVG or BMP. 6365 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 6366 6367 // ImageRedactionConfigs: The configuration for specifying what content 6368 // to redact from images. 6369 ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` 6370 6371 // IncludeFindings: Whether the response should include findings along 6372 // with the redacted image. 6373 IncludeFindings bool `json:"includeFindings,omitempty"` 6374 6375 // InspectConfig: Configuration for the inspector. 6376 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6377 6378 // LocationId: Deprecated. This field has no effect. 6379 LocationId string `json:"locationId,omitempty"` 6380 6381 // ForceSendFields is a list of field names (e.g. "ByteItem") to 6382 // unconditionally include in API requests. By default, fields with 6383 // empty or default values are omitted from API requests. However, any 6384 // non-pointer, non-interface field appearing in ForceSendFields will be 6385 // sent to the server regardless of whether the field is empty or not. 6386 // This may be used to include empty fields in Patch requests. 6387 ForceSendFields []string `json:"-"` 6388 6389 // NullFields is a list of field names (e.g. "ByteItem") to include in 6390 // API requests with the JSON null value. By default, fields with empty 6391 // values are omitted from API requests. However, any field with an 6392 // empty value appearing in NullFields will be sent to the server as 6393 // null. It is an error if a field in this list has a non-empty value. 6394 // This may be used to include null fields in Patch requests. 6395 NullFields []string `json:"-"` 6396} 6397 6398func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { 6399 type NoMethod GooglePrivacyDlpV2RedactImageRequest 6400 raw := NoMethod(*s) 6401 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6402} 6403 6404// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. 6405type GooglePrivacyDlpV2RedactImageResponse struct { 6406 // ExtractedText: If an image was being inspected and the 6407 // InspectConfig's include_quote was set to true, then this field will 6408 // include all text, if any, that was found in the image. 6409 ExtractedText string `json:"extractedText,omitempty"` 6410 6411 // InspectResult: The findings. Populated when include_findings in the 6412 // request is true. 6413 InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` 6414 6415 // RedactedImage: The redacted image. The type will be the same as the 6416 // original image. 6417 RedactedImage string `json:"redactedImage,omitempty"` 6418 6419 // ServerResponse contains the HTTP response code and headers from the 6420 // server. 6421 googleapi.ServerResponse `json:"-"` 6422 6423 // ForceSendFields is a list of field names (e.g. "ExtractedText") to 6424 // unconditionally include in API requests. By default, fields with 6425 // empty or default values are omitted from API requests. However, any 6426 // non-pointer, non-interface field appearing in ForceSendFields will be 6427 // sent to the server regardless of whether the field is empty or not. 6428 // This may be used to include empty fields in Patch requests. 6429 ForceSendFields []string `json:"-"` 6430 6431 // NullFields is a list of field names (e.g. "ExtractedText") to include 6432 // in API requests with the JSON null value. By default, fields with 6433 // empty values are omitted from API requests. However, any field with 6434 // an empty value appearing in NullFields will be sent to the server as 6435 // null. It is an error if a field in this list has a non-empty value. 6436 // This may be used to include null fields in Patch requests. 6437 NullFields []string `json:"-"` 6438} 6439 6440func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { 6441 type NoMethod GooglePrivacyDlpV2RedactImageResponse 6442 raw := NoMethod(*s) 6443 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6444} 6445 6446// GooglePrivacyDlpV2Regex: Message defining a custom regular 6447// expression. 6448type GooglePrivacyDlpV2Regex struct { 6449 // GroupIndexes: The index of the submatch to extract as findings. When 6450 // not specified, the entire match is returned. No more than 3 may be 6451 // included. 6452 GroupIndexes []int64 `json:"groupIndexes,omitempty"` 6453 6454 // Pattern: Pattern defining the regular expression. Its syntax 6455 // (https://github.com/google/re2/wiki/Syntax) can be found under the 6456 // google/re2 repository on GitHub. 6457 Pattern string `json:"pattern,omitempty"` 6458 6459 // ForceSendFields is a list of field names (e.g. "GroupIndexes") to 6460 // unconditionally include in API requests. By default, fields with 6461 // empty or default values are omitted from API requests. However, any 6462 // non-pointer, non-interface field appearing in ForceSendFields will be 6463 // sent to the server regardless of whether the field is empty or not. 6464 // This may be used to include empty fields in Patch requests. 6465 ForceSendFields []string `json:"-"` 6466 6467 // NullFields is a list of field names (e.g. "GroupIndexes") to include 6468 // in API requests with the JSON null value. By default, fields with 6469 // empty values are omitted from API requests. However, any field with 6470 // an empty value appearing in NullFields will be sent to the server as 6471 // null. It is an error if a field in this list has a non-empty value. 6472 // This may be used to include null fields in Patch requests. 6473 NullFields []string `json:"-"` 6474} 6475 6476func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { 6477 type NoMethod GooglePrivacyDlpV2Regex 6478 raw := NoMethod(*s) 6479 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6480} 6481 6482// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an 6483// item. 6484type GooglePrivacyDlpV2ReidentifyContentRequest struct { 6485 // InspectConfig: Configuration for the inspector. 6486 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6487 6488 // InspectTemplateName: Template to use. Any configuration directly 6489 // specified in `inspect_config` will override those set in the 6490 // template. Singular fields that are set in this request will replace 6491 // their corresponding fields in the template. Repeated fields are 6492 // appended. Singular sub-messages and groups are recursively merged. 6493 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 6494 6495 // Item: The item to re-identify. Will be treated as text. 6496 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6497 6498 // LocationId: Deprecated. This field has no effect. 6499 LocationId string `json:"locationId,omitempty"` 6500 6501 // ReidentifyConfig: Configuration for the re-identification of the 6502 // content item. This field shares the same proto message type that is 6503 // used for de-identification, however its usage here is for the 6504 // reversal of the previous de-identification. Re-identification is 6505 // performed by examining the transformations used to de-identify the 6506 // items and executing the reverse. This requires that only reversible 6507 // transformations be provided here. The reversible transformations are: 6508 // - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig` 6509 ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` 6510 6511 // ReidentifyTemplateName: Template to use. References an instance of 6512 // `DeidentifyTemplate`. Any configuration directly specified in 6513 // `reidentify_config` or `inspect_config` will override those set in 6514 // the template. The `DeidentifyTemplate` used must include only 6515 // reversible transformations. Singular fields that are set in this 6516 // request will replace their corresponding fields in the template. 6517 // Repeated fields are appended. Singular sub-messages and groups are 6518 // recursively merged. 6519 ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` 6520 6521 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 6522 // unconditionally include in API requests. By default, fields with 6523 // empty or default values are omitted from API requests. However, any 6524 // non-pointer, non-interface field appearing in ForceSendFields will be 6525 // sent to the server regardless of whether the field is empty or not. 6526 // This may be used to include empty fields in Patch requests. 6527 ForceSendFields []string `json:"-"` 6528 6529 // NullFields is a list of field names (e.g. "InspectConfig") to include 6530 // in API requests with the JSON null value. By default, fields with 6531 // empty values are omitted from API requests. However, any field with 6532 // an empty value appearing in NullFields will be sent to the server as 6533 // null. It is an error if a field in this list has a non-empty value. 6534 // This may be used to include null fields in Patch requests. 6535 NullFields []string `json:"-"` 6536} 6537 6538func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { 6539 type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest 6540 raw := NoMethod(*s) 6541 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6542} 6543 6544// GooglePrivacyDlpV2ReidentifyContentResponse: Results of 6545// re-identifying a item. 6546type GooglePrivacyDlpV2ReidentifyContentResponse struct { 6547 // Item: The re-identified item. 6548 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6549 6550 // Overview: An overview of the changes that were made to the `item`. 6551 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 6552 6553 // ServerResponse contains the HTTP response code and headers from the 6554 // server. 6555 googleapi.ServerResponse `json:"-"` 6556 6557 // ForceSendFields is a list of field names (e.g. "Item") to 6558 // unconditionally include in API requests. By default, fields with 6559 // empty or default values are omitted from API requests. However, any 6560 // non-pointer, non-interface field appearing in ForceSendFields will be 6561 // sent to the server regardless of whether the field is empty or not. 6562 // This may be used to include empty fields in Patch requests. 6563 ForceSendFields []string `json:"-"` 6564 6565 // NullFields is a list of field names (e.g. "Item") to include in API 6566 // requests with the JSON null value. By default, fields with empty 6567 // values are omitted from API requests. However, any field with an 6568 // empty value appearing in NullFields will be sent to the server as 6569 // null. It is an error if a field in this list has a non-empty value. 6570 // This may be used to include null fields in Patch requests. 6571 NullFields []string `json:"-"` 6572} 6573 6574func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { 6575 type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse 6576 raw := NoMethod(*s) 6577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6578} 6579 6580// GooglePrivacyDlpV2ReplaceDictionaryConfig: Replace each input value 6581// with a value randomly selected from the dictionary. 6582type GooglePrivacyDlpV2ReplaceDictionaryConfig struct { 6583 // WordList: A list of words to select from for random replacement. The 6584 // limits (https://cloud.google.com/dlp/limits) page contains details 6585 // about the size limits of dictionaries. 6586 WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` 6587 6588 // ForceSendFields is a list of field names (e.g. "WordList") to 6589 // unconditionally include in API requests. By default, fields with 6590 // empty or default values are omitted from API requests. However, any 6591 // non-pointer, non-interface field appearing in ForceSendFields will be 6592 // sent to the server regardless of whether the field is empty or not. 6593 // This may be used to include empty fields in Patch requests. 6594 ForceSendFields []string `json:"-"` 6595 6596 // NullFields is a list of field names (e.g. "WordList") to include in 6597 // API requests with the JSON null value. By default, fields with empty 6598 // values are omitted from API requests. However, any field with an 6599 // empty value appearing in NullFields will be sent to the server as 6600 // null. It is an error if a field in this list has a non-empty value. 6601 // This may be used to include null fields in Patch requests. 6602 NullFields []string `json:"-"` 6603} 6604 6605func (s *GooglePrivacyDlpV2ReplaceDictionaryConfig) MarshalJSON() ([]byte, error) { 6606 type NoMethod GooglePrivacyDlpV2ReplaceDictionaryConfig 6607 raw := NoMethod(*s) 6608 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6609} 6610 6611// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a 6612// given `Value`. 6613type GooglePrivacyDlpV2ReplaceValueConfig struct { 6614 // NewValue: Value to replace it with. 6615 NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` 6616 6617 // ForceSendFields is a list of field names (e.g. "NewValue") to 6618 // unconditionally include in API requests. By default, fields with 6619 // empty or default values are omitted from API requests. However, any 6620 // non-pointer, non-interface field appearing in ForceSendFields will be 6621 // sent to the server regardless of whether the field is empty or not. 6622 // This may be used to include empty fields in Patch requests. 6623 ForceSendFields []string `json:"-"` 6624 6625 // NullFields is a list of field names (e.g. "NewValue") to include in 6626 // API requests with the JSON null value. By default, fields with empty 6627 // values are omitted from API requests. However, any field with an 6628 // empty value appearing in NullFields will be sent to the server as 6629 // null. It is an error if a field in this list has a non-empty value. 6630 // This may be used to include null fields in Patch requests. 6631 NullFields []string `json:"-"` 6632} 6633 6634func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { 6635 type NoMethod GooglePrivacyDlpV2ReplaceValueConfig 6636 raw := NoMethod(*s) 6637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6638} 6639 6640// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching 6641// finding with the name of the info_type. 6642type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { 6643} 6644 6645// GooglePrivacyDlpV2RequestedOptions: Snapshot of the inspection 6646// configuration. 6647type GooglePrivacyDlpV2RequestedOptions struct { 6648 // JobConfig: Inspect config. 6649 JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` 6650 6651 // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot 6652 // of its state at the time of this run. 6653 SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` 6654 6655 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6656 // unconditionally include in API requests. By default, fields with 6657 // empty or default values are omitted from API requests. However, any 6658 // non-pointer, non-interface field appearing in ForceSendFields will be 6659 // sent to the server regardless of whether the field is empty or not. 6660 // This may be used to include empty fields in Patch requests. 6661 ForceSendFields []string `json:"-"` 6662 6663 // NullFields is a list of field names (e.g. "JobConfig") to include in 6664 // API requests with the JSON null value. By default, fields with empty 6665 // values are omitted from API requests. However, any field with an 6666 // empty value appearing in NullFields will be sent to the server as 6667 // null. It is an error if a field in this list has a non-empty value. 6668 // This may be used to include null fields in Patch requests. 6669 NullFields []string `json:"-"` 6670} 6671 6672func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { 6673 type NoMethod GooglePrivacyDlpV2RequestedOptions 6674 raw := NoMethod(*s) 6675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6676} 6677 6678// GooglePrivacyDlpV2RequestedRiskAnalysisOptions: Risk analysis 6679// options. 6680type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { 6681 // JobConfig: The job config for the risk job. 6682 JobConfig *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` 6683 6684 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6685 // unconditionally include in API requests. By default, fields with 6686 // empty or default values are omitted from API requests. However, any 6687 // non-pointer, non-interface field appearing in ForceSendFields will be 6688 // sent to the server regardless of whether the field is empty or not. 6689 // This may be used to include empty fields in Patch requests. 6690 ForceSendFields []string `json:"-"` 6691 6692 // NullFields is a list of field names (e.g. "JobConfig") to include in 6693 // API requests with the JSON null value. By default, fields with empty 6694 // values are omitted from API requests. However, any field with an 6695 // empty value appearing in NullFields will be sent to the server as 6696 // null. It is an error if a field in this list has a non-empty value. 6697 // This may be used to include null fields in Patch requests. 6698 NullFields []string `json:"-"` 6699} 6700 6701func (s *GooglePrivacyDlpV2RequestedRiskAnalysisOptions) MarshalJSON() ([]byte, error) { 6702 type NoMethod GooglePrivacyDlpV2RequestedRiskAnalysisOptions 6703 raw := NoMethod(*s) 6704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6705} 6706 6707// GooglePrivacyDlpV2Result: All result fields mentioned below are 6708// updated while the job is processing. 6709type GooglePrivacyDlpV2Result struct { 6710 // HybridStats: Statistics related to the processing of hybrid inspect. 6711 HybridStats *GooglePrivacyDlpV2HybridInspectStatistics `json:"hybridStats,omitempty"` 6712 6713 // InfoTypeStats: Statistics of how many instances of each info type 6714 // were found during inspect job. 6715 InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` 6716 6717 // ProcessedBytes: Total size in bytes that were processed. 6718 ProcessedBytes int64 `json:"processedBytes,omitempty,string"` 6719 6720 // TotalEstimatedBytes: Estimate of the number of bytes to process. 6721 TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` 6722 6723 // ForceSendFields is a list of field names (e.g. "HybridStats") to 6724 // unconditionally include in API requests. By default, fields with 6725 // empty or default values are omitted from API requests. However, any 6726 // non-pointer, non-interface field appearing in ForceSendFields will be 6727 // sent to the server regardless of whether the field is empty or not. 6728 // This may be used to include empty fields in Patch requests. 6729 ForceSendFields []string `json:"-"` 6730 6731 // NullFields is a list of field names (e.g. "HybridStats") to include 6732 // in API requests with the JSON null value. By default, fields with 6733 // empty values are omitted from API requests. However, any field with 6734 // an empty value appearing in NullFields will be sent to the server as 6735 // null. It is an error if a field in this list has a non-empty value. 6736 // This may be used to include null fields in Patch requests. 6737 NullFields []string `json:"-"` 6738} 6739 6740func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { 6741 type NoMethod GooglePrivacyDlpV2Result 6742 raw := NoMethod(*s) 6743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6744} 6745 6746// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk 6747// analysis job. See 6748// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn 6749// more. 6750type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { 6751 // Actions: Actions to execute at the completion of the job. Are 6752 // executed in the order provided. 6753 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 6754 6755 // PrivacyMetric: Privacy metric to compute. 6756 PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` 6757 6758 // SourceTable: Input dataset to compute metrics over. 6759 SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` 6760 6761 // ForceSendFields is a list of field names (e.g. "Actions") to 6762 // unconditionally include in API requests. By default, fields with 6763 // empty or default values are omitted from API requests. However, any 6764 // non-pointer, non-interface field appearing in ForceSendFields will be 6765 // sent to the server regardless of whether the field is empty or not. 6766 // This may be used to include empty fields in Patch requests. 6767 ForceSendFields []string `json:"-"` 6768 6769 // NullFields is a list of field names (e.g. "Actions") to include in 6770 // API requests with the JSON null value. By default, fields with empty 6771 // values are omitted from API requests. However, any field with an 6772 // empty value appearing in NullFields will be sent to the server as 6773 // null. It is an error if a field in this list has a non-empty value. 6774 // This may be used to include null fields in Patch requests. 6775 NullFields []string `json:"-"` 6776} 6777 6778func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { 6779 type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig 6780 raw := NoMethod(*s) 6781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6782} 6783 6784// GooglePrivacyDlpV2Row: Values of the row. 6785type GooglePrivacyDlpV2Row struct { 6786 // Values: Individual cells. 6787 Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` 6788 6789 // ForceSendFields is a list of field names (e.g. "Values") to 6790 // unconditionally include in API requests. By default, fields with 6791 // empty or default values are omitted from API requests. However, any 6792 // non-pointer, non-interface field appearing in ForceSendFields will be 6793 // sent to the server regardless of whether the field is empty or not. 6794 // This may be used to include empty fields in Patch requests. 6795 ForceSendFields []string `json:"-"` 6796 6797 // NullFields is a list of field names (e.g. "Values") to include in API 6798 // requests with the JSON null value. By default, fields with empty 6799 // values are omitted from API requests. However, any field with an 6800 // empty value appearing in NullFields will be sent to the server as 6801 // null. It is an error if a field in this list has a non-empty value. 6802 // This may be used to include null fields in Patch requests. 6803 NullFields []string `json:"-"` 6804} 6805 6806func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { 6807 type NoMethod GooglePrivacyDlpV2Row 6808 raw := NoMethod(*s) 6809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6810} 6811 6812// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be 6813// persisted to the specified OutputStorageConfig. Only a single 6814// instance of this action can be specified. Compatible with: Inspect, 6815// Risk 6816type GooglePrivacyDlpV2SaveFindings struct { 6817 // OutputConfig: Location to store findings outside of DLP. 6818 OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` 6819 6820 // ForceSendFields is a list of field names (e.g. "OutputConfig") to 6821 // unconditionally include in API requests. By default, fields with 6822 // empty or default values are omitted from API requests. However, any 6823 // non-pointer, non-interface field appearing in ForceSendFields will be 6824 // sent to the server regardless of whether the field is empty or not. 6825 // This may be used to include empty fields in Patch requests. 6826 ForceSendFields []string `json:"-"` 6827 6828 // NullFields is a list of field names (e.g. "OutputConfig") to include 6829 // in API requests with the JSON null value. By default, fields with 6830 // empty values are omitted from API requests. However, any field with 6831 // an empty value appearing in NullFields will be sent to the server as 6832 // null. It is an error if a field in this list has a non-empty value. 6833 // This may be used to include null fields in Patch requests. 6834 NullFields []string `json:"-"` 6835} 6836 6837func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { 6838 type NoMethod GooglePrivacyDlpV2SaveFindings 6839 raw := NoMethod(*s) 6840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6841} 6842 6843// GooglePrivacyDlpV2Schedule: Schedule for inspect job triggers. 6844type GooglePrivacyDlpV2Schedule struct { 6845 // RecurrencePeriodDuration: With this option a job is started a regular 6846 // periodic basis. For example: every day (86400 seconds). A scheduled 6847 // start time will be skipped if the previous execution has not ended 6848 // when its scheduled time occurs. This value must be set to a time 6849 // duration greater than or equal to 1 day and can be no longer than 60 6850 // days. 6851 RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` 6852 6853 // ForceSendFields is a list of field names (e.g. 6854 // "RecurrencePeriodDuration") to unconditionally include in API 6855 // requests. By default, fields with empty or default values are omitted 6856 // from API requests. However, any non-pointer, non-interface field 6857 // appearing in ForceSendFields will be sent to the server regardless of 6858 // whether the field is empty or not. This may be used to include empty 6859 // fields in Patch requests. 6860 ForceSendFields []string `json:"-"` 6861 6862 // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") 6863 // to include in API requests with the JSON null value. By default, 6864 // fields with empty values are omitted from API requests. However, any 6865 // field with an empty value appearing in NullFields will be sent to the 6866 // server as null. It is an error if a field in this list has a 6867 // non-empty value. This may be used to include null fields in Patch 6868 // requests. 6869 NullFields []string `json:"-"` 6870} 6871 6872func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { 6873 type NoMethod GooglePrivacyDlpV2Schedule 6874 raw := NoMethod(*s) 6875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6876} 6877 6878// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing 6879// statistical information on the relative frequency of different 6880// quasi-identifiers values. It has one or several quasi-identifiers 6881// columns, and one column that indicates the relative frequency of each 6882// quasi-identifier tuple. If a tuple is present in the data but not in 6883// the auxiliary table, the corresponding relative frequency is assumed 6884// to be zero (and thus, the tuple is highly reidentifiable). 6885type GooglePrivacyDlpV2StatisticalTable struct { 6886 // QuasiIds: Required. Quasi-identifier columns. 6887 QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` 6888 6889 // RelativeFrequency: Required. The relative frequency column must 6890 // contain a floating-point number between 0 and 1 (inclusive). Null 6891 // values are assumed to be zero. 6892 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 6893 6894 // Table: Required. Auxiliary table location. 6895 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 6896 6897 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 6898 // unconditionally include in API requests. By default, fields with 6899 // empty or default values are omitted from API requests. However, any 6900 // non-pointer, non-interface field appearing in ForceSendFields will be 6901 // sent to the server regardless of whether the field is empty or not. 6902 // This may be used to include empty fields in Patch requests. 6903 ForceSendFields []string `json:"-"` 6904 6905 // NullFields is a list of field names (e.g. "QuasiIds") to include in 6906 // API requests with the JSON null value. By default, fields with empty 6907 // values are omitted from API requests. However, any field with an 6908 // empty value appearing in NullFields will be sent to the server as 6909 // null. It is an error if a field in this list has a non-empty value. 6910 // This may be used to include null fields in Patch requests. 6911 NullFields []string `json:"-"` 6912} 6913 6914func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { 6915 type NoMethod GooglePrivacyDlpV2StatisticalTable 6916 raw := NoMethod(*s) 6917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6918} 6919 6920// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud 6921// storage type. 6922type GooglePrivacyDlpV2StorageConfig struct { 6923 // BigQueryOptions: BigQuery options. 6924 BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` 6925 6926 // CloudStorageOptions: Google Cloud Storage options. 6927 CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` 6928 6929 // DatastoreOptions: Google Cloud Datastore options. 6930 DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` 6931 6932 // HybridOptions: Hybrid inspection options. 6933 HybridOptions *GooglePrivacyDlpV2HybridOptions `json:"hybridOptions,omitempty"` 6934 6935 TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` 6936 6937 // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to 6938 // unconditionally include in API requests. By default, fields with 6939 // empty or default values are omitted from API requests. However, any 6940 // non-pointer, non-interface field appearing in ForceSendFields will be 6941 // sent to the server regardless of whether the field is empty or not. 6942 // This may be used to include empty fields in Patch requests. 6943 ForceSendFields []string `json:"-"` 6944 6945 // NullFields is a list of field names (e.g. "BigQueryOptions") to 6946 // include in API requests with the JSON null value. By default, fields 6947 // with empty values are omitted from API requests. However, any field 6948 // with an empty value appearing in NullFields will be sent to the 6949 // server as null. It is an error if a field in this list has a 6950 // non-empty value. This may be used to include null fields in Patch 6951 // requests. 6952 NullFields []string `json:"-"` 6953} 6954 6955func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { 6956 type NoMethod GooglePrivacyDlpV2StorageConfig 6957 raw := NoMethod(*s) 6958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6959} 6960 6961// GooglePrivacyDlpV2StorageMetadataLabel: Storage metadata label to 6962// indicate which metadata entry contains findings. 6963type GooglePrivacyDlpV2StorageMetadataLabel struct { 6964 Key string `json:"key,omitempty"` 6965 6966 // ForceSendFields is a list of field names (e.g. "Key") to 6967 // unconditionally include in API requests. By default, fields with 6968 // empty or default values are omitted from API requests. However, any 6969 // non-pointer, non-interface field appearing in ForceSendFields will be 6970 // sent to the server regardless of whether the field is empty or not. 6971 // This may be used to include empty fields in Patch requests. 6972 ForceSendFields []string `json:"-"` 6973 6974 // NullFields is a list of field names (e.g. "Key") to include in API 6975 // requests with the JSON null value. By default, fields with empty 6976 // values are omitted from API requests. However, any field with an 6977 // empty value appearing in NullFields will be sent to the server as 6978 // null. It is an error if a field in this list has a non-empty value. 6979 // This may be used to include null fields in Patch requests. 6980 NullFields []string `json:"-"` 6981} 6982 6983func (s *GooglePrivacyDlpV2StorageMetadataLabel) MarshalJSON() ([]byte, error) { 6984 type NoMethod GooglePrivacyDlpV2StorageMetadataLabel 6985 raw := NoMethod(*s) 6986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6987} 6988 6989// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message 6990// that contains information about the current version and any pending 6991// updates. 6992type GooglePrivacyDlpV2StoredInfoType struct { 6993 // CurrentVersion: Current version of the stored info type. 6994 CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` 6995 6996 // Name: Resource name. 6997 Name string `json:"name,omitempty"` 6998 6999 // PendingVersions: Pending versions of the stored info type. Empty if 7000 // no versions are pending. 7001 PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` 7002 7003 // ServerResponse contains the HTTP response code and headers from the 7004 // server. 7005 googleapi.ServerResponse `json:"-"` 7006 7007 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to 7008 // unconditionally include in API requests. By default, fields with 7009 // empty or default values are omitted from API requests. However, any 7010 // non-pointer, non-interface field appearing in ForceSendFields will be 7011 // sent to the server regardless of whether the field is empty or not. 7012 // This may be used to include empty fields in Patch requests. 7013 ForceSendFields []string `json:"-"` 7014 7015 // NullFields is a list of field names (e.g. "CurrentVersion") to 7016 // include in API requests with the JSON null value. By default, fields 7017 // with empty values are omitted from API requests. However, any field 7018 // with an empty value appearing in NullFields will be sent to the 7019 // server as null. It is an error if a field in this list has a 7020 // non-empty value. This may be used to include null fields in Patch 7021 // requests. 7022 NullFields []string `json:"-"` 7023} 7024 7025func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { 7026 type NoMethod GooglePrivacyDlpV2StoredInfoType 7027 raw := NoMethod(*s) 7028 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7029} 7030 7031// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for stored 7032// infoTypes. All fields and subfield are provided by the user. For more 7033// information, see 7034// https://cloud.google.com/dlp/docs/creating-custom-infotypes. 7035type GooglePrivacyDlpV2StoredInfoTypeConfig struct { 7036 // Description: Description of the StoredInfoType (max 256 characters). 7037 Description string `json:"description,omitempty"` 7038 7039 // Dictionary: Store dictionary-based CustomInfoType. 7040 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 7041 7042 // DisplayName: Display name of the StoredInfoType (max 256 characters). 7043 DisplayName string `json:"displayName,omitempty"` 7044 7045 // LargeCustomDictionary: StoredInfoType where findings are defined by a 7046 // dictionary of phrases. 7047 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` 7048 7049 // Regex: Store regular expression-based StoredInfoType. 7050 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 7051 7052 // ForceSendFields is a list of field names (e.g. "Description") to 7053 // unconditionally include in API requests. By default, fields with 7054 // empty or default values are omitted from API requests. However, any 7055 // non-pointer, non-interface field appearing in ForceSendFields will be 7056 // sent to the server regardless of whether the field is empty or not. 7057 // This may be used to include empty fields in Patch requests. 7058 ForceSendFields []string `json:"-"` 7059 7060 // NullFields is a list of field names (e.g. "Description") to include 7061 // in API requests with the JSON null value. By default, fields with 7062 // empty values are omitted from API requests. However, any field with 7063 // an empty value appearing in NullFields will be sent to the server as 7064 // null. It is an error if a field in this list has a non-empty value. 7065 // This may be used to include null fields in Patch requests. 7066 NullFields []string `json:"-"` 7067} 7068 7069func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { 7070 type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig 7071 raw := NoMethod(*s) 7072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7073} 7074 7075// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a 7076// StoredInfoType. 7077type GooglePrivacyDlpV2StoredInfoTypeStats struct { 7078 // LargeCustomDictionary: StoredInfoType where findings are defined by a 7079 // dictionary of phrases. 7080 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` 7081 7082 // ForceSendFields is a list of field names (e.g. 7083 // "LargeCustomDictionary") to unconditionally include in API requests. 7084 // By default, fields with empty or default values are omitted from API 7085 // requests. However, any non-pointer, non-interface field appearing in 7086 // ForceSendFields will be sent to the server regardless of whether the 7087 // field is empty or not. This may be used to include empty fields in 7088 // Patch requests. 7089 ForceSendFields []string `json:"-"` 7090 7091 // NullFields is a list of field names (e.g. "LargeCustomDictionary") to 7092 // include in API requests with the JSON null value. By default, fields 7093 // with empty values are omitted from API requests. However, any field 7094 // with an empty value appearing in NullFields will be sent to the 7095 // server as null. It is an error if a field in this list has a 7096 // non-empty value. This may be used to include null fields in Patch 7097 // requests. 7098 NullFields []string `json:"-"` 7099} 7100 7101func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { 7102 type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats 7103 raw := NoMethod(*s) 7104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7105} 7106 7107// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, 7108// including the configuration used to build it, create timestamp, and 7109// current state. 7110type GooglePrivacyDlpV2StoredInfoTypeVersion struct { 7111 // Config: StoredInfoType configuration. 7112 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7113 7114 // CreateTime: Create timestamp of the version. Read-only, determined by 7115 // the system when the version is created. 7116 CreateTime string `json:"createTime,omitempty"` 7117 7118 // Errors: Errors that occurred when creating this storedInfoType 7119 // version, or anomalies detected in the storedInfoType data that render 7120 // it unusable. Only the five most recent errors will be displayed, with 7121 // the most recent error appearing first. For example, some of the data 7122 // for stored custom dictionaries is put in the user's Google Cloud 7123 // Storage bucket, and if this data is modified or deleted by the user 7124 // or another system, the dictionary becomes invalid. If any errors 7125 // occur, fix the problem indicated by the error message and use the 7126 // UpdateStoredInfoType API method to create another version of the 7127 // storedInfoType to continue using it, reusing the same `config` if it 7128 // was not the source of the error. 7129 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 7130 7131 // State: Stored info type version state. Read-only, updated by the 7132 // system during dictionary creation. 7133 // 7134 // Possible values: 7135 // "STORED_INFO_TYPE_STATE_UNSPECIFIED" - Unused 7136 // "PENDING" - StoredInfoType version is being created. 7137 // "READY" - StoredInfoType version is ready for use. 7138 // "FAILED" - StoredInfoType creation failed. All relevant error 7139 // messages are returned in the `StoredInfoTypeVersion` message. 7140 // "INVALID" - StoredInfoType is no longer valid because artifacts 7141 // stored in user-controlled storage were modified. To fix an invalid 7142 // StoredInfoType, use the `UpdateStoredInfoType` method to create a new 7143 // version. 7144 State string `json:"state,omitempty"` 7145 7146 // Stats: Statistics about this storedInfoType version. 7147 Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` 7148 7149 // ForceSendFields is a list of field names (e.g. "Config") to 7150 // unconditionally include in API requests. By default, fields with 7151 // empty or default values are omitted from API requests. However, any 7152 // non-pointer, non-interface field appearing in ForceSendFields will be 7153 // sent to the server regardless of whether the field is empty or not. 7154 // This may be used to include empty fields in Patch requests. 7155 ForceSendFields []string `json:"-"` 7156 7157 // NullFields is a list of field names (e.g. "Config") to include in API 7158 // requests with the JSON null value. By default, fields with empty 7159 // values are omitted from API requests. However, any field with an 7160 // empty value appearing in NullFields will be sent to the server as 7161 // null. It is an error if a field in this list has a non-empty value. 7162 // This may be used to include null fields in Patch requests. 7163 NullFields []string `json:"-"` 7164} 7165 7166func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { 7167 type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion 7168 raw := NoMethod(*s) 7169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7170} 7171 7172// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use 7173// with scanning. 7174type GooglePrivacyDlpV2StoredType struct { 7175 // CreateTime: Timestamp indicating when the version of the 7176 // `StoredInfoType` used for inspection was created. Output-only field, 7177 // populated by the system. 7178 CreateTime string `json:"createTime,omitempty"` 7179 7180 // Name: Resource name of the requested `StoredInfoType`, for example 7181 // `organizations/433245324/storedInfoTypes/432452342` or 7182 // `projects/project-id/storedInfoTypes/432452342`. 7183 Name string `json:"name,omitempty"` 7184 7185 // ForceSendFields is a list of field names (e.g. "CreateTime") to 7186 // unconditionally include in API requests. By default, fields with 7187 // empty or default values are omitted from API requests. However, any 7188 // non-pointer, non-interface field appearing in ForceSendFields will be 7189 // sent to the server regardless of whether the field is empty or not. 7190 // This may be used to include empty fields in Patch requests. 7191 ForceSendFields []string `json:"-"` 7192 7193 // NullFields is a list of field names (e.g. "CreateTime") to include in 7194 // API requests with the JSON null value. By default, fields with empty 7195 // values are omitted from API requests. However, any field with an 7196 // empty value appearing in NullFields will be sent to the server as 7197 // null. It is an error if a field in this list has a non-empty value. 7198 // This may be used to include null fields in Patch requests. 7199 NullFields []string `json:"-"` 7200} 7201 7202func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { 7203 type NoMethod GooglePrivacyDlpV2StoredType 7204 raw := NoMethod(*s) 7205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7206} 7207 7208// GooglePrivacyDlpV2SummaryResult: A collection that informs the user 7209// the number of times a particular `TransformationResultCode` and error 7210// details occurred. 7211type GooglePrivacyDlpV2SummaryResult struct { 7212 // Code: Outcome of the transformation. 7213 // 7214 // Possible values: 7215 // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - Unused 7216 // "SUCCESS" - Transformation completed without an error. 7217 // "ERROR" - Transformation had an error. 7218 Code string `json:"code,omitempty"` 7219 7220 // Count: Number of transformations counted by this result. 7221 Count int64 `json:"count,omitempty,string"` 7222 7223 // Details: A place for warnings or errors to show up if a 7224 // transformation didn't work as expected. 7225 Details string `json:"details,omitempty"` 7226 7227 // ForceSendFields is a list of field names (e.g. "Code") to 7228 // unconditionally include in API requests. By default, fields with 7229 // empty or default values are omitted from API requests. However, any 7230 // non-pointer, non-interface field appearing in ForceSendFields will be 7231 // sent to the server regardless of whether the field is empty or not. 7232 // This may be used to include empty fields in Patch requests. 7233 ForceSendFields []string `json:"-"` 7234 7235 // NullFields is a list of field names (e.g. "Code") to include in API 7236 // requests with the JSON null value. By default, fields with empty 7237 // values are omitted from API requests. However, any field with an 7238 // empty value appearing in NullFields will be sent to the server as 7239 // null. It is an error if a field in this list has a non-empty value. 7240 // This may be used to include null fields in Patch requests. 7241 NullFields []string `json:"-"` 7242} 7243 7244func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { 7245 type NoMethod GooglePrivacyDlpV2SummaryResult 7246 raw := NoMethod(*s) 7247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7248} 7249 7250// GooglePrivacyDlpV2SurrogateType: Message for detecting output from 7251// deidentification transformations such as `CryptoReplaceFfxFpeConfig` 7252// (https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). 7253// These types of transformations are those that perform 7254// pseudonymization, thereby producing a "surrogate" as output. This 7255// should be used in conjunction with a field on the transformation such 7256// as `surrogate_info_type`. This CustomInfoType does not support the 7257// use of `detection_rules`. 7258type GooglePrivacyDlpV2SurrogateType struct { 7259} 7260 7261// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 7262// `Value`s per request allowed. See 7263// https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table 7264// to learn more. 7265type GooglePrivacyDlpV2Table struct { 7266 // Headers: Headers of the table. 7267 Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` 7268 7269 // Rows: Rows of the table. 7270 Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` 7271 7272 // ForceSendFields is a list of field names (e.g. "Headers") to 7273 // unconditionally include in API requests. By default, fields with 7274 // empty or default values are omitted from API requests. However, any 7275 // non-pointer, non-interface field appearing in ForceSendFields will be 7276 // sent to the server regardless of whether the field is empty or not. 7277 // This may be used to include empty fields in Patch requests. 7278 ForceSendFields []string `json:"-"` 7279 7280 // NullFields is a list of field names (e.g. "Headers") to include in 7281 // API requests with the JSON null value. By default, fields with empty 7282 // values are omitted from API requests. However, any field with an 7283 // empty value appearing in NullFields will be sent to the server as 7284 // null. It is an error if a field in this list has a non-empty value. 7285 // This may be used to include null fields in Patch requests. 7286 NullFields []string `json:"-"` 7287} 7288 7289func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { 7290 type NoMethod GooglePrivacyDlpV2Table 7291 raw := NoMethod(*s) 7292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7293} 7294 7295// GooglePrivacyDlpV2TableLocation: Location of a finding within a 7296// table. 7297type GooglePrivacyDlpV2TableLocation struct { 7298 // RowIndex: The zero-based index of the row where the finding is 7299 // located. Only populated for resources that have a natural ordering, 7300 // not BigQuery. In BigQuery, to identify the row a finding came from, 7301 // populate BigQueryOptions.identifying_fields with your primary key 7302 // column names and when you store the findings the value of those 7303 // columns will be stored inside of Finding. 7304 RowIndex int64 `json:"rowIndex,omitempty,string"` 7305 7306 // ForceSendFields is a list of field names (e.g. "RowIndex") to 7307 // unconditionally include in API requests. By default, fields with 7308 // empty or default values are omitted from API requests. However, any 7309 // non-pointer, non-interface field appearing in ForceSendFields will be 7310 // sent to the server regardless of whether the field is empty or not. 7311 // This may be used to include empty fields in Patch requests. 7312 ForceSendFields []string `json:"-"` 7313 7314 // NullFields is a list of field names (e.g. "RowIndex") to include in 7315 // API requests with the JSON null value. By default, fields with empty 7316 // values are omitted from API requests. However, any field with an 7317 // empty value appearing in NullFields will be sent to the server as 7318 // null. It is an error if a field in this list has a non-empty value. 7319 // This may be used to include null fields in Patch requests. 7320 NullFields []string `json:"-"` 7321} 7322 7323func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { 7324 type NoMethod GooglePrivacyDlpV2TableLocation 7325 raw := NoMethod(*s) 7326 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7327} 7328 7329// GooglePrivacyDlpV2TableOptions: Instructions regarding the table 7330// content being inspected. 7331type GooglePrivacyDlpV2TableOptions struct { 7332 // IdentifyingFields: The columns that are the primary keys for table 7333 // objects included in ContentItem. A copy of this cell's value will 7334 // stored alongside alongside each finding so that the finding can be 7335 // traced to the specific row it came from. No more than 3 may be 7336 // provided. 7337 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 7338 7339 // ForceSendFields is a list of field names (e.g. "IdentifyingFields") 7340 // to unconditionally include in API requests. By default, fields with 7341 // empty or default values are omitted from API requests. However, any 7342 // non-pointer, non-interface field appearing in ForceSendFields will be 7343 // sent to the server regardless of whether the field is empty or not. 7344 // This may be used to include empty fields in Patch requests. 7345 ForceSendFields []string `json:"-"` 7346 7347 // NullFields is a list of field names (e.g. "IdentifyingFields") to 7348 // include in API requests with the JSON null value. By default, fields 7349 // with empty values are omitted from API requests. However, any field 7350 // with an empty value appearing in NullFields will be sent to the 7351 // server as null. It is an error if a field in this list has a 7352 // non-empty value. This may be used to include null fields in Patch 7353 // requests. 7354 NullFields []string `json:"-"` 7355} 7356 7357func (s *GooglePrivacyDlpV2TableOptions) MarshalJSON() ([]byte, error) { 7358 type NoMethod GooglePrivacyDlpV2TableOptions 7359 raw := NoMethod(*s) 7360 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7361} 7362 7363// GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. 7364type GooglePrivacyDlpV2TaggedField struct { 7365 // CustomTag: A column can be tagged with a custom tag. In this case, 7366 // the user must indicate an auxiliary table that contains statistical 7367 // information on the possible values of this column (below). 7368 CustomTag string `json:"customTag,omitempty"` 7369 7370 // Field: Required. Identifies the column. 7371 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7372 7373 // Inferred: If no semantic tag is indicated, we infer the statistical 7374 // model from the distribution of values in the input data 7375 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 7376 7377 // InfoType: A column can be tagged with a InfoType to use the relevant 7378 // public dataset as a statistical model of population, if available. We 7379 // currently support US ZIP codes, region codes, ages and genders. To 7380 // programmatically obtain the list of supported InfoTypes, use 7381 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 7382 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7383 7384 // ForceSendFields is a list of field names (e.g. "CustomTag") to 7385 // unconditionally include in API requests. By default, fields with 7386 // empty or default values are omitted from API requests. However, any 7387 // non-pointer, non-interface field appearing in ForceSendFields will be 7388 // sent to the server regardless of whether the field is empty or not. 7389 // This may be used to include empty fields in Patch requests. 7390 ForceSendFields []string `json:"-"` 7391 7392 // NullFields is a list of field names (e.g. "CustomTag") to include in 7393 // API requests with the JSON null value. By default, fields with empty 7394 // values are omitted from API requests. However, any field with an 7395 // empty value appearing in NullFields will be sent to the server as 7396 // null. It is an error if a field in this list has a non-empty value. 7397 // This may be used to include null fields in Patch requests. 7398 NullFields []string `json:"-"` 7399} 7400 7401func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { 7402 type NoMethod GooglePrivacyDlpV2TaggedField 7403 raw := NoMethod(*s) 7404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7405} 7406 7407// GooglePrivacyDlpV2ThrowError: Throw an error and fail the request 7408// when a transformation error occurs. 7409type GooglePrivacyDlpV2ThrowError struct { 7410} 7411 7412// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, 7413// and `TimeOfDay`, extract or preserve a portion of the value. 7414type GooglePrivacyDlpV2TimePartConfig struct { 7415 // PartToExtract: The part of the time to keep. 7416 // 7417 // Possible values: 7418 // "TIME_PART_UNSPECIFIED" - Unused 7419 // "YEAR" - [0-9999] 7420 // "MONTH" - [1-12] 7421 // "DAY_OF_MONTH" - [1-31] 7422 // "DAY_OF_WEEK" - [1-7] 7423 // "WEEK_OF_YEAR" - [1-53] 7424 // "HOUR_OF_DAY" - [0-23] 7425 PartToExtract string `json:"partToExtract,omitempty"` 7426 7427 // ForceSendFields is a list of field names (e.g. "PartToExtract") to 7428 // unconditionally include in API requests. By default, fields with 7429 // empty or default values are omitted from API requests. However, any 7430 // non-pointer, non-interface field appearing in ForceSendFields will be 7431 // sent to the server regardless of whether the field is empty or not. 7432 // This may be used to include empty fields in Patch requests. 7433 ForceSendFields []string `json:"-"` 7434 7435 // NullFields is a list of field names (e.g. "PartToExtract") to include 7436 // in API requests with the JSON null value. By default, fields with 7437 // empty values are omitted from API requests. However, any field with 7438 // an empty value appearing in NullFields will be sent to the server as 7439 // null. It is an error if a field in this list has a non-empty value. 7440 // This may be used to include null fields in Patch requests. 7441 NullFields []string `json:"-"` 7442} 7443 7444func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { 7445 type NoMethod GooglePrivacyDlpV2TimePartConfig 7446 raw := NoMethod(*s) 7447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7448} 7449 7450// GooglePrivacyDlpV2TimeZone: Time zone of the date time object. 7451type GooglePrivacyDlpV2TimeZone struct { 7452 // OffsetMinutes: Set only if the offset can be determined. Positive for 7453 // time ahead of UTC. E.g. For "UTC-9", this value is -540. 7454 OffsetMinutes int64 `json:"offsetMinutes,omitempty"` 7455 7456 // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to 7457 // unconditionally include in API requests. By default, fields with 7458 // empty or default values are omitted from API requests. However, any 7459 // non-pointer, non-interface field appearing in ForceSendFields will be 7460 // sent to the server regardless of whether the field is empty or not. 7461 // This may be used to include empty fields in Patch requests. 7462 ForceSendFields []string `json:"-"` 7463 7464 // NullFields is a list of field names (e.g. "OffsetMinutes") to include 7465 // in API requests with the JSON null value. By default, fields with 7466 // empty values are omitted from API requests. However, any field with 7467 // an empty value appearing in NullFields will be sent to the server as 7468 // null. It is an error if a field in this list has a non-empty value. 7469 // This may be used to include null fields in Patch requests. 7470 NullFields []string `json:"-"` 7471} 7472 7473func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { 7474 type NoMethod GooglePrivacyDlpV2TimeZone 7475 raw := NoMethod(*s) 7476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7477} 7478 7479// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of 7480// the items to include in scanning. Currently only supported when 7481// inspecting Google Cloud Storage and BigQuery. 7482type GooglePrivacyDlpV2TimespanConfig struct { 7483 // EnableAutoPopulationOfTimespanConfig: When the job is started by a 7484 // JobTrigger we will automatically figure out a valid start_time to 7485 // avoid scanning files that have not been modified since the last time 7486 // the JobTrigger executed. This will be based on the time of the 7487 // execution of the last run of the JobTrigger. 7488 EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` 7489 7490 // EndTime: Exclude files, tables, or rows newer than this value. If not 7491 // set, no upper time limit is applied. 7492 EndTime string `json:"endTime,omitempty"` 7493 7494 // StartTime: Exclude files, tables, or rows older than this value. If 7495 // not set, no lower time limit is applied. 7496 StartTime string `json:"startTime,omitempty"` 7497 7498 // TimestampField: Specification of the field containing the timestamp 7499 // of scanned items. Used for data sources like Datastore and BigQuery. 7500 // For BigQuery: If this value is not specified and the table was 7501 // modified between the given start and end times, the entire table will 7502 // be scanned. If this value is specified, then rows are filtered based 7503 // on the given start and end times. Rows with a `NULL` value in the 7504 // provided BigQuery column are skipped. Valid data types of the 7505 // provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and 7506 // `DATETIME`. For Datastore: If this value is specified, then entities 7507 // are filtered based on the given start and end times. If an entity 7508 // does not contain the provided timestamp property or contains empty or 7509 // invalid values, then it is included. Valid data types of the provided 7510 // timestamp property are: `TIMESTAMP`. 7511 TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` 7512 7513 // ForceSendFields is a list of field names (e.g. 7514 // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in 7515 // API requests. By default, fields with empty or default values are 7516 // omitted from API requests. However, any non-pointer, non-interface 7517 // field appearing in ForceSendFields will be sent to the server 7518 // regardless of whether the field is empty or not. This may be used to 7519 // include empty fields in Patch requests. 7520 ForceSendFields []string `json:"-"` 7521 7522 // NullFields is a list of field names (e.g. 7523 // "EnableAutoPopulationOfTimespanConfig") to include in API requests 7524 // with the JSON null value. By default, fields with empty values are 7525 // omitted from API requests. However, any field with an empty value 7526 // appearing in NullFields will be sent to the server as null. It is an 7527 // error if a field in this list has a non-empty value. This may be used 7528 // to include null fields in Patch requests. 7529 NullFields []string `json:"-"` 7530} 7531 7532func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { 7533 type NoMethod GooglePrivacyDlpV2TimespanConfig 7534 raw := NoMethod(*s) 7535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7536} 7537 7538// GooglePrivacyDlpV2TransformationErrorHandling: How to handle 7539// transformation errors during de-identification. A transformation 7540// error occurs when the requested transformation is incompatible with 7541// the data. For example, trying to de-identify an IP address using a 7542// `DateShift` transformation would result in a transformation error, 7543// since date info cannot be extracted from an IP address. Information 7544// about any incompatible transformations, and how they were handled, is 7545// returned in the response as part of the `TransformationOverviews`. 7546type GooglePrivacyDlpV2TransformationErrorHandling struct { 7547 // LeaveUntransformed: Ignore errors 7548 LeaveUntransformed *GooglePrivacyDlpV2LeaveUntransformed `json:"leaveUntransformed,omitempty"` 7549 7550 // ThrowError: Throw an error 7551 ThrowError *GooglePrivacyDlpV2ThrowError `json:"throwError,omitempty"` 7552 7553 // ForceSendFields is a list of field names (e.g. "LeaveUntransformed") 7554 // to unconditionally include in API requests. By default, fields with 7555 // empty or default values are omitted from API requests. However, any 7556 // non-pointer, non-interface field appearing in ForceSendFields will be 7557 // sent to the server regardless of whether the field is empty or not. 7558 // This may be used to include empty fields in Patch requests. 7559 ForceSendFields []string `json:"-"` 7560 7561 // NullFields is a list of field names (e.g. "LeaveUntransformed") to 7562 // include in API requests with the JSON null value. By default, fields 7563 // with empty values are omitted from API requests. However, any field 7564 // with an empty value appearing in NullFields will be sent to the 7565 // server as null. It is an error if a field in this list has a 7566 // non-empty value. This may be used to include null fields in Patch 7567 // requests. 7568 NullFields []string `json:"-"` 7569} 7570 7571func (s *GooglePrivacyDlpV2TransformationErrorHandling) MarshalJSON() ([]byte, error) { 7572 type NoMethod GooglePrivacyDlpV2TransformationErrorHandling 7573 raw := NoMethod(*s) 7574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7575} 7576 7577// GooglePrivacyDlpV2TransformationOverview: Overview of the 7578// modifications that occurred. 7579type GooglePrivacyDlpV2TransformationOverview struct { 7580 // TransformationSummaries: Transformations applied to the dataset. 7581 TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` 7582 7583 // TransformedBytes: Total size in bytes that were transformed in some 7584 // way. 7585 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7586 7587 // ForceSendFields is a list of field names (e.g. 7588 // "TransformationSummaries") to unconditionally include in API 7589 // requests. By default, fields with empty or default values are omitted 7590 // from API requests. However, any non-pointer, non-interface field 7591 // appearing in ForceSendFields will be sent to the server regardless of 7592 // whether the field is empty or not. This may be used to include empty 7593 // fields in Patch requests. 7594 ForceSendFields []string `json:"-"` 7595 7596 // NullFields is a list of field names (e.g. "TransformationSummaries") 7597 // to include in API requests with the JSON null value. By default, 7598 // fields with empty values are omitted from API requests. However, any 7599 // field with an empty value appearing in NullFields will be sent to the 7600 // server as null. It is an error if a field in this list has a 7601 // non-empty value. This may be used to include null fields in Patch 7602 // requests. 7603 NullFields []string `json:"-"` 7604} 7605 7606func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { 7607 type NoMethod GooglePrivacyDlpV2TransformationOverview 7608 raw := NoMethod(*s) 7609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7610} 7611 7612// GooglePrivacyDlpV2TransformationSummary: Summary of a single 7613// transformation. Only one of 'transformation', 'field_transformation', 7614// or 'record_suppress' will be set. 7615type GooglePrivacyDlpV2TransformationSummary struct { 7616 // Field: Set if the transformation was limited to a specific FieldId. 7617 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7618 7619 // FieldTransformations: The field transformation that was applied. If 7620 // multiple field transformations are requested for a single field, this 7621 // list will contain all of them; otherwise, only one is supplied. 7622 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 7623 7624 // InfoType: Set if the transformation was limited to a specific 7625 // InfoType. 7626 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7627 7628 // RecordSuppress: The specific suppression option these stats apply to. 7629 RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` 7630 7631 // Results: Collection of all transformations that took place or had an 7632 // error. 7633 Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` 7634 7635 // Transformation: The specific transformation these stats apply to. 7636 Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` 7637 7638 // TransformedBytes: Total size in bytes that were transformed in some 7639 // way. 7640 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7641 7642 // ForceSendFields is a list of field names (e.g. "Field") to 7643 // unconditionally include in API requests. By default, fields with 7644 // empty or default values are omitted from API requests. However, any 7645 // non-pointer, non-interface field appearing in ForceSendFields will be 7646 // sent to the server regardless of whether the field is empty or not. 7647 // This may be used to include empty fields in Patch requests. 7648 ForceSendFields []string `json:"-"` 7649 7650 // NullFields is a list of field names (e.g. "Field") 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 *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { 7660 type NoMethod GooglePrivacyDlpV2TransformationSummary 7661 raw := NoMethod(*s) 7662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7663} 7664 7665// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data 7666// crypto key generated. It will be discarded after the request 7667// finishes. 7668type GooglePrivacyDlpV2TransientCryptoKey struct { 7669 // Name: Required. Name of the key. This is an arbitrary string used to 7670 // differentiate different keys. A unique key is generated per name: two 7671 // separate `TransientCryptoKey` protos share the same generated key if 7672 // their names are the same. When the data crypto key is generated, this 7673 // name is not used in any way (repeating the api call will result in a 7674 // different key being generated). 7675 Name string `json:"name,omitempty"` 7676 7677 // ForceSendFields is a list of field names (e.g. "Name") to 7678 // unconditionally include in API requests. By default, fields with 7679 // empty or default values are omitted from API requests. However, any 7680 // non-pointer, non-interface field appearing in ForceSendFields will be 7681 // sent to the server regardless of whether the field is empty or not. 7682 // This may be used to include empty fields in Patch requests. 7683 ForceSendFields []string `json:"-"` 7684 7685 // NullFields is a list of field names (e.g. "Name") to include in API 7686 // requests with the JSON null value. By default, fields with empty 7687 // values are omitted from API requests. However, any field with an 7688 // empty value appearing in NullFields will be sent to the server as 7689 // null. It is an error if a field in this list has a non-empty value. 7690 // This may be used to include null fields in Patch requests. 7691 NullFields []string `json:"-"` 7692} 7693 7694func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { 7695 type NoMethod GooglePrivacyDlpV2TransientCryptoKey 7696 raw := NoMethod(*s) 7697 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7698} 7699 7700// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to 7701// be started. 7702type GooglePrivacyDlpV2Trigger struct { 7703 // Manual: For use with hybrid jobs. Jobs must be manually created and 7704 // finished. 7705 Manual *GooglePrivacyDlpV2Manual `json:"manual,omitempty"` 7706 7707 // Schedule: Create a job on a repeating basis based on the elapse of 7708 // time. 7709 Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` 7710 7711 // ForceSendFields is a list of field names (e.g. "Manual") to 7712 // unconditionally include in API requests. By default, fields with 7713 // empty or default values are omitted from API requests. However, any 7714 // non-pointer, non-interface field appearing in ForceSendFields will be 7715 // sent to the server regardless of whether the field is empty or not. 7716 // This may be used to include empty fields in Patch requests. 7717 ForceSendFields []string `json:"-"` 7718 7719 // NullFields is a list of field names (e.g. "Manual") to include in API 7720 // requests with the JSON null value. By default, fields with empty 7721 // values are omitted from API requests. However, any field with an 7722 // empty value appearing in NullFields will be sent to the server as 7723 // null. It is an error if a field in this list has a non-empty value. 7724 // This may be used to include null fields in Patch requests. 7725 NullFields []string `json:"-"` 7726} 7727 7728func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { 7729 type NoMethod GooglePrivacyDlpV2Trigger 7730 raw := NoMethod(*s) 7731 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7732} 7733 7734// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to 7735// security risks due to accidentally leaking the key. Choose another 7736// type of key if possible. 7737type GooglePrivacyDlpV2UnwrappedCryptoKey struct { 7738 // Key: Required. A 128/192/256 bit key. 7739 Key string `json:"key,omitempty"` 7740 7741 // ForceSendFields is a list of field names (e.g. "Key") to 7742 // unconditionally include in API requests. By default, fields with 7743 // empty or default values are omitted from API requests. However, any 7744 // non-pointer, non-interface field appearing in ForceSendFields will be 7745 // sent to the server regardless of whether the field is empty or not. 7746 // This may be used to include empty fields in Patch requests. 7747 ForceSendFields []string `json:"-"` 7748 7749 // NullFields is a list of field names (e.g. "Key") to include in API 7750 // requests with the JSON null value. By default, fields with empty 7751 // values are omitted from API requests. However, any field with an 7752 // empty value appearing in NullFields will be sent to the server as 7753 // null. It is an error if a field in this list has a non-empty value. 7754 // This may be used to include null fields in Patch requests. 7755 NullFields []string `json:"-"` 7756} 7757 7758func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { 7759 type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey 7760 raw := NoMethod(*s) 7761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7762} 7763 7764// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message 7765// for UpdateDeidentifyTemplate. 7766type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { 7767 // DeidentifyTemplate: New DeidentifyTemplate value. 7768 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 7769 7770 // UpdateMask: Mask to control which fields get updated. 7771 UpdateMask string `json:"updateMask,omitempty"` 7772 7773 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 7774 // to unconditionally include in API requests. By default, fields with 7775 // empty or default values are omitted from API requests. However, any 7776 // non-pointer, non-interface field appearing in ForceSendFields will be 7777 // sent to the server regardless of whether the field is empty or not. 7778 // This may be used to include empty fields in Patch requests. 7779 ForceSendFields []string `json:"-"` 7780 7781 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 7782 // include in API requests with the JSON null value. By default, fields 7783 // with empty values are omitted from API requests. However, any field 7784 // with an empty value appearing in NullFields will be sent to the 7785 // server as null. It is an error if a field in this list has a 7786 // non-empty value. This may be used to include null fields in Patch 7787 // requests. 7788 NullFields []string `json:"-"` 7789} 7790 7791func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 7792 type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 7793 raw := NoMethod(*s) 7794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7795} 7796 7797// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for 7798// UpdateInspectTemplate. 7799type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { 7800 // InspectTemplate: New InspectTemplate value. 7801 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 7802 7803 // UpdateMask: Mask to control which fields get updated. 7804 UpdateMask string `json:"updateMask,omitempty"` 7805 7806 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 7807 // unconditionally include in API requests. By default, fields with 7808 // empty or default values are omitted from API requests. However, any 7809 // non-pointer, non-interface field appearing in ForceSendFields will be 7810 // sent to the server regardless of whether the field is empty or not. 7811 // This may be used to include empty fields in Patch requests. 7812 ForceSendFields []string `json:"-"` 7813 7814 // NullFields is a list of field names (e.g. "InspectTemplate") to 7815 // include in API requests with the JSON null value. By default, fields 7816 // with empty values are omitted from API requests. However, any field 7817 // with an empty value appearing in NullFields will be sent to the 7818 // server as null. It is an error if a field in this list has a 7819 // non-empty value. This may be used to include null fields in Patch 7820 // requests. 7821 NullFields []string `json:"-"` 7822} 7823 7824func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 7825 type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest 7826 raw := NoMethod(*s) 7827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7828} 7829 7830// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for 7831// UpdateJobTrigger. 7832type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { 7833 // JobTrigger: New JobTrigger value. 7834 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 7835 7836 // UpdateMask: Mask to control which fields get updated. 7837 UpdateMask string `json:"updateMask,omitempty"` 7838 7839 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 7840 // unconditionally include in API requests. By default, fields with 7841 // empty or default values are omitted from API requests. However, any 7842 // non-pointer, non-interface field appearing in ForceSendFields will be 7843 // sent to the server regardless of whether the field is empty or not. 7844 // This may be used to include empty fields in Patch requests. 7845 ForceSendFields []string `json:"-"` 7846 7847 // NullFields is a list of field names (e.g. "JobTrigger") to include in 7848 // API requests with the JSON null value. By default, fields with empty 7849 // values are omitted from API requests. However, any field with an 7850 // empty value appearing in NullFields will be sent to the server as 7851 // null. It is an error if a field in this list has a non-empty value. 7852 // This may be used to include null fields in Patch requests. 7853 NullFields []string `json:"-"` 7854} 7855 7856func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { 7857 type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest 7858 raw := NoMethod(*s) 7859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7860} 7861 7862// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for 7863// UpdateStoredInfoType. 7864type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { 7865 // Config: Updated configuration for the storedInfoType. If not 7866 // provided, a new version of the storedInfoType will be created with 7867 // the existing configuration. 7868 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7869 7870 // UpdateMask: Mask to control which fields get updated. 7871 UpdateMask string `json:"updateMask,omitempty"` 7872 7873 // ForceSendFields is a list of field names (e.g. "Config") to 7874 // unconditionally include in API requests. By default, fields with 7875 // empty or default values are omitted from API requests. However, any 7876 // non-pointer, non-interface field appearing in ForceSendFields will be 7877 // sent to the server regardless of whether the field is empty or not. 7878 // This may be used to include empty fields in Patch requests. 7879 ForceSendFields []string `json:"-"` 7880 7881 // NullFields is a list of field names (e.g. "Config") to include in API 7882 // requests with the JSON null value. By default, fields with empty 7883 // values are omitted from API requests. However, any field with an 7884 // empty value appearing in NullFields will be sent to the server as 7885 // null. It is an error if a field in this list has a non-empty value. 7886 // This may be used to include null fields in Patch requests. 7887 NullFields []string `json:"-"` 7888} 7889 7890func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 7891 type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 7892 raw := NoMethod(*s) 7893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7894} 7895 7896// GooglePrivacyDlpV2Value: Set of primitive values supported by the 7897// system. Note that for the purposes of inspection or transformation, 7898// the number of bytes considered to comprise a 'Value' is based on its 7899// representation as a UTF-8 encoded string. For example, if 7900// 'integer_value' is set to 123456789, the number of bytes would be 7901// counted as 9, even though an int64 only holds up to 8 bytes of data. 7902type GooglePrivacyDlpV2Value struct { 7903 // BooleanValue: boolean 7904 BooleanValue bool `json:"booleanValue,omitempty"` 7905 7906 // DateValue: date 7907 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 7908 7909 // DayOfWeekValue: day of week 7910 // 7911 // Possible values: 7912 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 7913 // "MONDAY" - Monday 7914 // "TUESDAY" - Tuesday 7915 // "WEDNESDAY" - Wednesday 7916 // "THURSDAY" - Thursday 7917 // "FRIDAY" - Friday 7918 // "SATURDAY" - Saturday 7919 // "SUNDAY" - Sunday 7920 DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` 7921 7922 // FloatValue: float 7923 FloatValue float64 `json:"floatValue,omitempty"` 7924 7925 // IntegerValue: integer 7926 IntegerValue int64 `json:"integerValue,omitempty,string"` 7927 7928 // StringValue: string 7929 StringValue string `json:"stringValue,omitempty"` 7930 7931 // TimeValue: time of day 7932 TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` 7933 7934 // TimestampValue: timestamp 7935 TimestampValue string `json:"timestampValue,omitempty"` 7936 7937 // ForceSendFields is a list of field names (e.g. "BooleanValue") to 7938 // unconditionally include in API requests. By default, fields with 7939 // empty or default values are omitted from API requests. However, any 7940 // non-pointer, non-interface field appearing in ForceSendFields will be 7941 // sent to the server regardless of whether the field is empty or not. 7942 // This may be used to include empty fields in Patch requests. 7943 ForceSendFields []string `json:"-"` 7944 7945 // NullFields is a list of field names (e.g. "BooleanValue") to include 7946 // in API requests with the JSON null value. By default, fields with 7947 // empty values are omitted from API requests. However, any field with 7948 // an empty value appearing in NullFields will be sent to the server as 7949 // null. It is an error if a field in this list has a non-empty value. 7950 // This may be used to include null fields in Patch requests. 7951 NullFields []string `json:"-"` 7952} 7953 7954func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { 7955 type NoMethod GooglePrivacyDlpV2Value 7956 raw := NoMethod(*s) 7957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7958} 7959 7960func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { 7961 type NoMethod GooglePrivacyDlpV2Value 7962 var s1 struct { 7963 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 7964 *NoMethod 7965 } 7966 s1.NoMethod = (*NoMethod)(s) 7967 if err := json.Unmarshal(data, &s1); err != nil { 7968 return err 7969 } 7970 s.FloatValue = float64(s1.FloatValue) 7971 return nil 7972} 7973 7974// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its 7975// frequency. 7976type GooglePrivacyDlpV2ValueFrequency struct { 7977 // Count: How many times the value is contained in the field. 7978 Count int64 `json:"count,omitempty,string"` 7979 7980 // Value: A value contained in the field in question. 7981 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 7982 7983 // ForceSendFields is a list of field names (e.g. "Count") to 7984 // unconditionally include in API requests. By default, fields with 7985 // empty or default values are omitted from API requests. However, any 7986 // non-pointer, non-interface field appearing in ForceSendFields will be 7987 // sent to the server regardless of whether the field is empty or not. 7988 // This may be used to include empty fields in Patch requests. 7989 ForceSendFields []string `json:"-"` 7990 7991 // NullFields is a list of field names (e.g. "Count") to include in API 7992 // requests with the JSON null value. By default, fields with empty 7993 // values are omitted from API requests. However, any field with an 7994 // empty value appearing in NullFields will be sent to the server as 7995 // null. It is an error if a field in this list has a non-empty value. 7996 // This may be used to include null fields in Patch requests. 7997 NullFields []string `json:"-"` 7998} 7999 8000func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { 8001 type NoMethod GooglePrivacyDlpV2ValueFrequency 8002 raw := NoMethod(*s) 8003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8004} 8005 8006// GooglePrivacyDlpV2WordList: Message defining a list of words or 8007// phrases to search for in the data. 8008type GooglePrivacyDlpV2WordList struct { 8009 // Words: Words or phrases defining the dictionary. The dictionary must 8010 // contain at least one phrase and every phrase must contain at least 2 8011 // characters that are letters or digits. [required] 8012 Words []string `json:"words,omitempty"` 8013 8014 // ForceSendFields is a list of field names (e.g. "Words") to 8015 // unconditionally include in API requests. By default, fields with 8016 // empty or default values are omitted from API requests. However, any 8017 // non-pointer, non-interface field appearing in ForceSendFields will be 8018 // sent to the server regardless of whether the field is empty or not. 8019 // This may be used to include empty fields in Patch requests. 8020 ForceSendFields []string `json:"-"` 8021 8022 // NullFields is a list of field names (e.g. "Words") to include in API 8023 // requests with the JSON null value. By default, fields with empty 8024 // values are omitted from API requests. However, any field with an 8025 // empty value appearing in NullFields will be sent to the server as 8026 // null. It is an error if a field in this list has a non-empty value. 8027 // This may be used to include null fields in Patch requests. 8028 NullFields []string `json:"-"` 8029} 8030 8031func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { 8032 type NoMethod GooglePrivacyDlpV2WordList 8033 raw := NoMethod(*s) 8034 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8035} 8036 8037// GoogleProtobufEmpty: A generic empty message that you can re-use to 8038// avoid defining duplicated empty messages in your APIs. A typical 8039// example is to use it as the request or the response type of an API 8040// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) 8041// returns (google.protobuf.Empty); } The JSON representation for 8042// `Empty` is empty JSON object `{}`. 8043type GoogleProtobufEmpty struct { 8044 // ServerResponse contains the HTTP response code and headers from the 8045 // server. 8046 googleapi.ServerResponse `json:"-"` 8047} 8048 8049// GoogleRpcStatus: The `Status` type defines a logical error model that 8050// is suitable for different programming environments, including REST 8051// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 8052// `Status` message contains three pieces of data: error code, error 8053// message, and error details. You can find out more about this error 8054// model and how to work with it in the API Design Guide 8055// (https://cloud.google.com/apis/design/errors). 8056type GoogleRpcStatus struct { 8057 // Code: The status code, which should be an enum value of 8058 // google.rpc.Code. 8059 Code int64 `json:"code,omitempty"` 8060 8061 // Details: A list of messages that carry the error details. There is a 8062 // common set of message types for APIs to use. 8063 Details []googleapi.RawMessage `json:"details,omitempty"` 8064 8065 // Message: A developer-facing error message, which should be in 8066 // English. Any user-facing error message should be localized and sent 8067 // in the google.rpc.Status.details field, or localized by the client. 8068 Message string `json:"message,omitempty"` 8069 8070 // ForceSendFields is a list of field names (e.g. "Code") to 8071 // unconditionally include in API requests. By default, fields with 8072 // empty or default values are omitted from API requests. However, any 8073 // non-pointer, non-interface field appearing in ForceSendFields will be 8074 // sent to the server regardless of whether the field is empty or not. 8075 // This may be used to include empty fields in Patch requests. 8076 ForceSendFields []string `json:"-"` 8077 8078 // NullFields is a list of field names (e.g. "Code") to include in API 8079 // requests with the JSON null value. By default, fields with empty 8080 // values are omitted from API requests. However, any field with an 8081 // empty value appearing in NullFields will be sent to the server as 8082 // null. It is an error if a field in this list has a non-empty value. 8083 // This may be used to include null fields in Patch requests. 8084 NullFields []string `json:"-"` 8085} 8086 8087func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 8088 type NoMethod GoogleRpcStatus 8089 raw := NoMethod(*s) 8090 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8091} 8092 8093// GoogleTypeDate: Represents a whole or partial calendar date, such as 8094// a birthday. The time of day and time zone are either specified 8095// elsewhere or are insignificant. The date is relative to the Gregorian 8096// Calendar. This can represent one of the following: * A full date, 8097// with non-zero year, month, and day values * A month and day value, 8098// with a zero year, such as an anniversary * A year on its own, with 8099// zero month and day values * A year and month value, with a zero day, 8100// such as a credit card expiration date Related types are 8101// google.type.TimeOfDay and `google.protobuf.Timestamp`. 8102type GoogleTypeDate struct { 8103 // Day: Day of a month. Must be from 1 to 31 and valid for the year and 8104 // month, or 0 to specify a year by itself or a year and month where the 8105 // day isn't significant. 8106 Day int64 `json:"day,omitempty"` 8107 8108 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year 8109 // without a month and day. 8110 Month int64 `json:"month,omitempty"` 8111 8112 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a 8113 // date without a year. 8114 Year int64 `json:"year,omitempty"` 8115 8116 // ForceSendFields is a list of field names (e.g. "Day") to 8117 // unconditionally include in API requests. By default, fields with 8118 // empty or default values are omitted from API requests. However, any 8119 // non-pointer, non-interface field appearing in ForceSendFields will be 8120 // sent to the server regardless of whether the field is empty or not. 8121 // This may be used to include empty fields in Patch requests. 8122 ForceSendFields []string `json:"-"` 8123 8124 // NullFields is a list of field names (e.g. "Day") to include in API 8125 // requests with the JSON null value. By default, fields with empty 8126 // values are omitted from API requests. However, any field with an 8127 // empty value appearing in NullFields will be sent to the server as 8128 // null. It is an error if a field in this list has a non-empty value. 8129 // This may be used to include null fields in Patch requests. 8130 NullFields []string `json:"-"` 8131} 8132 8133func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 8134 type NoMethod GoogleTypeDate 8135 raw := NoMethod(*s) 8136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8137} 8138 8139// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone 8140// are either not significant or are specified elsewhere. An API may 8141// choose to allow leap seconds. Related types are google.type.Date and 8142// `google.protobuf.Timestamp`. 8143type GoogleTypeTimeOfDay struct { 8144 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 8145 // may choose to allow the value "24:00:00" for scenarios like business 8146 // closing time. 8147 Hours int64 `json:"hours,omitempty"` 8148 8149 // Minutes: Minutes of hour of day. Must be from 0 to 59. 8150 Minutes int64 `json:"minutes,omitempty"` 8151 8152 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 8153 // 999,999,999. 8154 Nanos int64 `json:"nanos,omitempty"` 8155 8156 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 8157 // 59. An API may allow the value 60 if it allows leap-seconds. 8158 Seconds int64 `json:"seconds,omitempty"` 8159 8160 // ForceSendFields is a list of field names (e.g. "Hours") to 8161 // unconditionally include in API requests. By default, fields with 8162 // empty or default values are omitted from API requests. However, any 8163 // non-pointer, non-interface field appearing in ForceSendFields will be 8164 // sent to the server regardless of whether the field is empty or not. 8165 // This may be used to include empty fields in Patch requests. 8166 ForceSendFields []string `json:"-"` 8167 8168 // NullFields is a list of field names (e.g. "Hours") to include in API 8169 // requests with the JSON null value. By default, fields with empty 8170 // values are omitted from API requests. However, any field with an 8171 // empty value appearing in NullFields will be sent to the server as 8172 // null. It is an error if a field in this list has a non-empty value. 8173 // This may be used to include null fields in Patch requests. 8174 NullFields []string `json:"-"` 8175} 8176 8177func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { 8178 type NoMethod GoogleTypeTimeOfDay 8179 raw := NoMethod(*s) 8180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8181} 8182 8183// method id "dlp.infoTypes.list": 8184 8185type InfoTypesListCall struct { 8186 s *Service 8187 urlParams_ gensupport.URLParams 8188 ifNoneMatch_ string 8189 ctx_ context.Context 8190 header_ http.Header 8191} 8192 8193// List: Returns a list of the sensitive information types that the DLP 8194// API supports. See 8195// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8196func (r *InfoTypesService) List() *InfoTypesListCall { 8197 c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8198 return c 8199} 8200 8201// Filter sets the optional parameter "filter": filter to only return 8202// infoTypes supported by certain parts of the API. Defaults to 8203// supported_by=INSPECT. 8204func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { 8205 c.urlParams_.Set("filter", filter) 8206 return c 8207} 8208 8209// LanguageCode sets the optional parameter "languageCode": BCP-47 8210// language code for localized infoType friendly names. If omitted, or 8211// if localized strings are not available, en-US strings will be 8212// returned. 8213func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { 8214 c.urlParams_.Set("languageCode", languageCode) 8215 return c 8216} 8217 8218// LocationId sets the optional parameter "locationId": Deprecated. This 8219// field has no effect. 8220func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { 8221 c.urlParams_.Set("locationId", locationId) 8222 return c 8223} 8224 8225// Parent sets the optional parameter "parent": The parent resource 8226// name. The format of this value is as follows: locations/ LOCATION_ID 8227func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { 8228 c.urlParams_.Set("parent", parent) 8229 return c 8230} 8231 8232// Fields allows partial responses to be retrieved. See 8233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8234// for more information. 8235func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { 8236 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8237 return c 8238} 8239 8240// IfNoneMatch sets the optional parameter which makes the operation 8241// fail if the object's ETag matches the given value. This is useful for 8242// getting updates only after the object has changed since the last 8243// request. Use googleapi.IsNotModified to check whether the response 8244// error from Do is the result of In-None-Match. 8245func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { 8246 c.ifNoneMatch_ = entityTag 8247 return c 8248} 8249 8250// Context sets the context to be used in this call's Do method. Any 8251// pending HTTP request will be aborted if the provided context is 8252// canceled. 8253func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { 8254 c.ctx_ = ctx 8255 return c 8256} 8257 8258// Header returns an http.Header that can be modified by the caller to 8259// add HTTP headers to the request. 8260func (c *InfoTypesListCall) Header() http.Header { 8261 if c.header_ == nil { 8262 c.header_ = make(http.Header) 8263 } 8264 return c.header_ 8265} 8266 8267func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8268 reqHeaders := make(http.Header) 8269 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 8270 for k, v := range c.header_ { 8271 reqHeaders[k] = v 8272 } 8273 reqHeaders.Set("User-Agent", c.s.userAgent()) 8274 if c.ifNoneMatch_ != "" { 8275 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8276 } 8277 var body io.Reader = nil 8278 c.urlParams_.Set("alt", alt) 8279 c.urlParams_.Set("prettyPrint", "false") 8280 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") 8281 urls += "?" + c.urlParams_.Encode() 8282 req, err := http.NewRequest("GET", urls, body) 8283 if err != nil { 8284 return nil, err 8285 } 8286 req.Header = reqHeaders 8287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8288} 8289 8290// Do executes the "dlp.infoTypes.list" call. 8291// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8292// be non-nil. Any non-2xx status code is an error. Response headers are 8293// in either 8294// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8295// a response was returned at all) in error.(*googleapi.Error).Header. 8296// Use googleapi.IsNotModified to check whether the returned error was 8297// because http.StatusNotModified was returned. 8298func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8299 gensupport.SetOptions(c.urlParams_, opts...) 8300 res, err := c.doRequest("json") 8301 if res != nil && res.StatusCode == http.StatusNotModified { 8302 if res.Body != nil { 8303 res.Body.Close() 8304 } 8305 return nil, &googleapi.Error{ 8306 Code: res.StatusCode, 8307 Header: res.Header, 8308 } 8309 } 8310 if err != nil { 8311 return nil, err 8312 } 8313 defer googleapi.CloseBody(res) 8314 if err := googleapi.CheckResponse(res); err != nil { 8315 return nil, err 8316 } 8317 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8318 ServerResponse: googleapi.ServerResponse{ 8319 Header: res.Header, 8320 HTTPStatusCode: res.StatusCode, 8321 }, 8322 } 8323 target := &ret 8324 if err := gensupport.DecodeResponse(target, res); err != nil { 8325 return nil, err 8326 } 8327 return ret, nil 8328 // { 8329 // "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.", 8330 // "flatPath": "v2/infoTypes", 8331 // "httpMethod": "GET", 8332 // "id": "dlp.infoTypes.list", 8333 // "parameterOrder": [], 8334 // "parameters": { 8335 // "filter": { 8336 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8337 // "location": "query", 8338 // "type": "string" 8339 // }, 8340 // "languageCode": { 8341 // "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.", 8342 // "location": "query", 8343 // "type": "string" 8344 // }, 8345 // "locationId": { 8346 // "description": "Deprecated. This field has no effect.", 8347 // "location": "query", 8348 // "type": "string" 8349 // }, 8350 // "parent": { 8351 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8352 // "location": "query", 8353 // "type": "string" 8354 // } 8355 // }, 8356 // "path": "v2/infoTypes", 8357 // "response": { 8358 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8359 // }, 8360 // "scopes": [ 8361 // "https://www.googleapis.com/auth/cloud-platform" 8362 // ] 8363 // } 8364 8365} 8366 8367// method id "dlp.locations.infoTypes.list": 8368 8369type LocationsInfoTypesListCall struct { 8370 s *Service 8371 parent string 8372 urlParams_ gensupport.URLParams 8373 ifNoneMatch_ string 8374 ctx_ context.Context 8375 header_ http.Header 8376} 8377 8378// List: Returns a list of the sensitive information types that the DLP 8379// API supports. See 8380// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8381// 8382// - parent: The parent resource name. The format of this value is as 8383// follows: locations/ LOCATION_ID. 8384func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { 8385 c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8386 c.parent = parent 8387 return c 8388} 8389 8390// Filter sets the optional parameter "filter": filter to only return 8391// infoTypes supported by certain parts of the API. Defaults to 8392// supported_by=INSPECT. 8393func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { 8394 c.urlParams_.Set("filter", filter) 8395 return c 8396} 8397 8398// LanguageCode sets the optional parameter "languageCode": BCP-47 8399// language code for localized infoType friendly names. If omitted, or 8400// if localized strings are not available, en-US strings will be 8401// returned. 8402func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { 8403 c.urlParams_.Set("languageCode", languageCode) 8404 return c 8405} 8406 8407// LocationId sets the optional parameter "locationId": Deprecated. This 8408// field has no effect. 8409func (c *LocationsInfoTypesListCall) LocationId(locationId string) *LocationsInfoTypesListCall { 8410 c.urlParams_.Set("locationId", locationId) 8411 return c 8412} 8413 8414// Fields allows partial responses to be retrieved. See 8415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8416// for more information. 8417func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { 8418 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8419 return c 8420} 8421 8422// IfNoneMatch sets the optional parameter which makes the operation 8423// fail if the object's ETag matches the given value. This is useful for 8424// getting updates only after the object has changed since the last 8425// request. Use googleapi.IsNotModified to check whether the response 8426// error from Do is the result of In-None-Match. 8427func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { 8428 c.ifNoneMatch_ = entityTag 8429 return c 8430} 8431 8432// Context sets the context to be used in this call's Do method. Any 8433// pending HTTP request will be aborted if the provided context is 8434// canceled. 8435func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { 8436 c.ctx_ = ctx 8437 return c 8438} 8439 8440// Header returns an http.Header that can be modified by the caller to 8441// add HTTP headers to the request. 8442func (c *LocationsInfoTypesListCall) Header() http.Header { 8443 if c.header_ == nil { 8444 c.header_ = make(http.Header) 8445 } 8446 return c.header_ 8447} 8448 8449func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8450 reqHeaders := make(http.Header) 8451 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 8452 for k, v := range c.header_ { 8453 reqHeaders[k] = v 8454 } 8455 reqHeaders.Set("User-Agent", c.s.userAgent()) 8456 if c.ifNoneMatch_ != "" { 8457 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8458 } 8459 var body io.Reader = nil 8460 c.urlParams_.Set("alt", alt) 8461 c.urlParams_.Set("prettyPrint", "false") 8462 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/infoTypes") 8463 urls += "?" + c.urlParams_.Encode() 8464 req, err := http.NewRequest("GET", urls, body) 8465 if err != nil { 8466 return nil, err 8467 } 8468 req.Header = reqHeaders 8469 googleapi.Expand(req.URL, map[string]string{ 8470 "parent": c.parent, 8471 }) 8472 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8473} 8474 8475// Do executes the "dlp.locations.infoTypes.list" call. 8476// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8477// be non-nil. Any non-2xx status code is an error. Response headers are 8478// in either 8479// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8480// a response was returned at all) in error.(*googleapi.Error).Header. 8481// Use googleapi.IsNotModified to check whether the returned error was 8482// because http.StatusNotModified was returned. 8483func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8484 gensupport.SetOptions(c.urlParams_, opts...) 8485 res, err := c.doRequest("json") 8486 if res != nil && res.StatusCode == http.StatusNotModified { 8487 if res.Body != nil { 8488 res.Body.Close() 8489 } 8490 return nil, &googleapi.Error{ 8491 Code: res.StatusCode, 8492 Header: res.Header, 8493 } 8494 } 8495 if err != nil { 8496 return nil, err 8497 } 8498 defer googleapi.CloseBody(res) 8499 if err := googleapi.CheckResponse(res); err != nil { 8500 return nil, err 8501 } 8502 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8503 ServerResponse: googleapi.ServerResponse{ 8504 Header: res.Header, 8505 HTTPStatusCode: res.StatusCode, 8506 }, 8507 } 8508 target := &ret 8509 if err := gensupport.DecodeResponse(target, res); err != nil { 8510 return nil, err 8511 } 8512 return ret, nil 8513 // { 8514 // "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.", 8515 // "flatPath": "v2/locations/{locationsId}/infoTypes", 8516 // "httpMethod": "GET", 8517 // "id": "dlp.locations.infoTypes.list", 8518 // "parameterOrder": [ 8519 // "parent" 8520 // ], 8521 // "parameters": { 8522 // "filter": { 8523 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8524 // "location": "query", 8525 // "type": "string" 8526 // }, 8527 // "languageCode": { 8528 // "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.", 8529 // "location": "query", 8530 // "type": "string" 8531 // }, 8532 // "locationId": { 8533 // "description": "Deprecated. This field has no effect.", 8534 // "location": "query", 8535 // "type": "string" 8536 // }, 8537 // "parent": { 8538 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8539 // "location": "path", 8540 // "pattern": "^locations/[^/]+$", 8541 // "required": true, 8542 // "type": "string" 8543 // } 8544 // }, 8545 // "path": "v2/{+parent}/infoTypes", 8546 // "response": { 8547 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8548 // }, 8549 // "scopes": [ 8550 // "https://www.googleapis.com/auth/cloud-platform" 8551 // ] 8552 // } 8553 8554} 8555 8556// method id "dlp.organizations.deidentifyTemplates.create": 8557 8558type OrganizationsDeidentifyTemplatesCreateCall struct { 8559 s *Service 8560 parentid string 8561 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 8562 urlParams_ gensupport.URLParams 8563 ctx_ context.Context 8564 header_ http.Header 8565} 8566 8567// Create: Creates a DeidentifyTemplate for re-using frequently used 8568// configuration for de-identifying content, images, and storage. See 8569// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8570// more. 8571// 8572// - parent: Parent resource name. The format of this value varies 8573// depending on the scope of the request (project or organization) and 8574// whether you have specified a processing location 8575// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 8576// scope, location specified: 8577// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 8578// location specified (defaults to global): `projects/`PROJECT_ID + 8579// Organizations scope, location specified: 8580// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 8581// scope, no location specified (defaults to global): 8582// `organizations/`ORG_ID The following example `parent` string 8583// specifies a parent project with the identifier `example-project`, 8584// and specifies the `europe-west3` location for processing data: 8585// parent=projects/example-project/locations/europe-west3. 8586func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { 8587 c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8588 c.parentid = parentid 8589 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 8590 return c 8591} 8592 8593// Fields allows partial responses to be retrieved. See 8594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8595// for more information. 8596func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { 8597 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8598 return c 8599} 8600 8601// Context sets the context to be used in this call's Do method. Any 8602// pending HTTP request will be aborted if the provided context is 8603// canceled. 8604func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { 8605 c.ctx_ = ctx 8606 return c 8607} 8608 8609// Header returns an http.Header that can be modified by the caller to 8610// add HTTP headers to the request. 8611func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { 8612 if c.header_ == nil { 8613 c.header_ = make(http.Header) 8614 } 8615 return c.header_ 8616} 8617 8618func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 8619 reqHeaders := make(http.Header) 8620 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 8621 for k, v := range c.header_ { 8622 reqHeaders[k] = v 8623 } 8624 reqHeaders.Set("User-Agent", c.s.userAgent()) 8625 var body io.Reader = nil 8626 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 8627 if err != nil { 8628 return nil, err 8629 } 8630 reqHeaders.Set("Content-Type", "application/json") 8631 c.urlParams_.Set("alt", alt) 8632 c.urlParams_.Set("prettyPrint", "false") 8633 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 8634 urls += "?" + c.urlParams_.Encode() 8635 req, err := http.NewRequest("POST", urls, body) 8636 if err != nil { 8637 return nil, err 8638 } 8639 req.Header = reqHeaders 8640 googleapi.Expand(req.URL, map[string]string{ 8641 "parent": c.parentid, 8642 }) 8643 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8644} 8645 8646// Do executes the "dlp.organizations.deidentifyTemplates.create" call. 8647// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8648// non-nil. Any non-2xx status code is an error. Response headers are in 8649// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8650// (if a response was returned at all) in 8651// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8652// whether the returned error was because http.StatusNotModified was 8653// returned. 8654func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8655 gensupport.SetOptions(c.urlParams_, opts...) 8656 res, err := c.doRequest("json") 8657 if res != nil && res.StatusCode == http.StatusNotModified { 8658 if res.Body != nil { 8659 res.Body.Close() 8660 } 8661 return nil, &googleapi.Error{ 8662 Code: res.StatusCode, 8663 Header: res.Header, 8664 } 8665 } 8666 if err != nil { 8667 return nil, err 8668 } 8669 defer googleapi.CloseBody(res) 8670 if err := googleapi.CheckResponse(res); err != nil { 8671 return nil, err 8672 } 8673 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8674 ServerResponse: googleapi.ServerResponse{ 8675 Header: res.Header, 8676 HTTPStatusCode: res.StatusCode, 8677 }, 8678 } 8679 target := &ret 8680 if err := gensupport.DecodeResponse(target, res); err != nil { 8681 return nil, err 8682 } 8683 return ret, nil 8684 // { 8685 // "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.", 8686 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 8687 // "httpMethod": "POST", 8688 // "id": "dlp.organizations.deidentifyTemplates.create", 8689 // "parameterOrder": [ 8690 // "parent" 8691 // ], 8692 // "parameters": { 8693 // "parent": { 8694 // "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", 8695 // "location": "path", 8696 // "pattern": "^organizations/[^/]+$", 8697 // "required": true, 8698 // "type": "string" 8699 // } 8700 // }, 8701 // "path": "v2/{+parent}/deidentifyTemplates", 8702 // "request": { 8703 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 8704 // }, 8705 // "response": { 8706 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8707 // }, 8708 // "scopes": [ 8709 // "https://www.googleapis.com/auth/cloud-platform" 8710 // ] 8711 // } 8712 8713} 8714 8715// method id "dlp.organizations.deidentifyTemplates.delete": 8716 8717type OrganizationsDeidentifyTemplatesDeleteCall struct { 8718 s *Service 8719 name string 8720 urlParams_ gensupport.URLParams 8721 ctx_ context.Context 8722 header_ http.Header 8723} 8724 8725// Delete: Deletes a DeidentifyTemplate. See 8726// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8727// more. 8728// 8729// - name: Resource name of the organization and deidentify template to 8730// be deleted, for example 8731// `organizations/433245324/deidentifyTemplates/432452342` or 8732// projects/project-id/deidentifyTemplates/432452342. 8733func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { 8734 c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8735 c.name = name 8736 return c 8737} 8738 8739// Fields allows partial responses to be retrieved. See 8740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8741// for more information. 8742func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { 8743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8744 return c 8745} 8746 8747// Context sets the context to be used in this call's Do method. Any 8748// pending HTTP request will be aborted if the provided context is 8749// canceled. 8750func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { 8751 c.ctx_ = ctx 8752 return c 8753} 8754 8755// Header returns an http.Header that can be modified by the caller to 8756// add HTTP headers to the request. 8757func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { 8758 if c.header_ == nil { 8759 c.header_ = make(http.Header) 8760 } 8761 return c.header_ 8762} 8763 8764func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 8765 reqHeaders := make(http.Header) 8766 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 8767 for k, v := range c.header_ { 8768 reqHeaders[k] = v 8769 } 8770 reqHeaders.Set("User-Agent", c.s.userAgent()) 8771 var body io.Reader = nil 8772 c.urlParams_.Set("alt", alt) 8773 c.urlParams_.Set("prettyPrint", "false") 8774 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8775 urls += "?" + c.urlParams_.Encode() 8776 req, err := http.NewRequest("DELETE", urls, body) 8777 if err != nil { 8778 return nil, err 8779 } 8780 req.Header = reqHeaders 8781 googleapi.Expand(req.URL, map[string]string{ 8782 "name": c.name, 8783 }) 8784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8785} 8786 8787// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. 8788// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8789// non-2xx status code is an error. Response headers are in either 8790// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8791// returned at all) in error.(*googleapi.Error).Header. Use 8792// googleapi.IsNotModified to check whether the returned error was 8793// because http.StatusNotModified was returned. 8794func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8795 gensupport.SetOptions(c.urlParams_, opts...) 8796 res, err := c.doRequest("json") 8797 if res != nil && res.StatusCode == http.StatusNotModified { 8798 if res.Body != nil { 8799 res.Body.Close() 8800 } 8801 return nil, &googleapi.Error{ 8802 Code: res.StatusCode, 8803 Header: res.Header, 8804 } 8805 } 8806 if err != nil { 8807 return nil, err 8808 } 8809 defer googleapi.CloseBody(res) 8810 if err := googleapi.CheckResponse(res); err != nil { 8811 return nil, err 8812 } 8813 ret := &GoogleProtobufEmpty{ 8814 ServerResponse: googleapi.ServerResponse{ 8815 Header: res.Header, 8816 HTTPStatusCode: res.StatusCode, 8817 }, 8818 } 8819 target := &ret 8820 if err := gensupport.DecodeResponse(target, res); err != nil { 8821 return nil, err 8822 } 8823 return ret, nil 8824 // { 8825 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8826 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8827 // "httpMethod": "DELETE", 8828 // "id": "dlp.organizations.deidentifyTemplates.delete", 8829 // "parameterOrder": [ 8830 // "name" 8831 // ], 8832 // "parameters": { 8833 // "name": { 8834 // "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.", 8835 // "location": "path", 8836 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8837 // "required": true, 8838 // "type": "string" 8839 // } 8840 // }, 8841 // "path": "v2/{+name}", 8842 // "response": { 8843 // "$ref": "GoogleProtobufEmpty" 8844 // }, 8845 // "scopes": [ 8846 // "https://www.googleapis.com/auth/cloud-platform" 8847 // ] 8848 // } 8849 8850} 8851 8852// method id "dlp.organizations.deidentifyTemplates.get": 8853 8854type OrganizationsDeidentifyTemplatesGetCall struct { 8855 s *Service 8856 name string 8857 urlParams_ gensupport.URLParams 8858 ifNoneMatch_ string 8859 ctx_ context.Context 8860 header_ http.Header 8861} 8862 8863// Get: Gets a DeidentifyTemplate. See 8864// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8865// more. 8866// 8867// - name: Resource name of the organization and deidentify template to 8868// be read, for example 8869// `organizations/433245324/deidentifyTemplates/432452342` or 8870// projects/project-id/deidentifyTemplates/432452342. 8871func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { 8872 c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8873 c.name = name 8874 return c 8875} 8876 8877// Fields allows partial responses to be retrieved. See 8878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8879// for more information. 8880func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { 8881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8882 return c 8883} 8884 8885// IfNoneMatch sets the optional parameter which makes the operation 8886// fail if the object's ETag matches the given value. This is useful for 8887// getting updates only after the object has changed since the last 8888// request. Use googleapi.IsNotModified to check whether the response 8889// error from Do is the result of In-None-Match. 8890func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { 8891 c.ifNoneMatch_ = entityTag 8892 return c 8893} 8894 8895// Context sets the context to be used in this call's Do method. Any 8896// pending HTTP request will be aborted if the provided context is 8897// canceled. 8898func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { 8899 c.ctx_ = ctx 8900 return c 8901} 8902 8903// Header returns an http.Header that can be modified by the caller to 8904// add HTTP headers to the request. 8905func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { 8906 if c.header_ == nil { 8907 c.header_ = make(http.Header) 8908 } 8909 return c.header_ 8910} 8911 8912func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 8913 reqHeaders := make(http.Header) 8914 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 8915 for k, v := range c.header_ { 8916 reqHeaders[k] = v 8917 } 8918 reqHeaders.Set("User-Agent", c.s.userAgent()) 8919 if c.ifNoneMatch_ != "" { 8920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8921 } 8922 var body io.Reader = nil 8923 c.urlParams_.Set("alt", alt) 8924 c.urlParams_.Set("prettyPrint", "false") 8925 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8926 urls += "?" + c.urlParams_.Encode() 8927 req, err := http.NewRequest("GET", urls, body) 8928 if err != nil { 8929 return nil, err 8930 } 8931 req.Header = reqHeaders 8932 googleapi.Expand(req.URL, map[string]string{ 8933 "name": c.name, 8934 }) 8935 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8936} 8937 8938// Do executes the "dlp.organizations.deidentifyTemplates.get" call. 8939// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8940// non-nil. Any non-2xx status code is an error. Response headers are in 8941// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8942// (if a response was returned at all) in 8943// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8944// whether the returned error was because http.StatusNotModified was 8945// returned. 8946func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8947 gensupport.SetOptions(c.urlParams_, opts...) 8948 res, err := c.doRequest("json") 8949 if res != nil && res.StatusCode == http.StatusNotModified { 8950 if res.Body != nil { 8951 res.Body.Close() 8952 } 8953 return nil, &googleapi.Error{ 8954 Code: res.StatusCode, 8955 Header: res.Header, 8956 } 8957 } 8958 if err != nil { 8959 return nil, err 8960 } 8961 defer googleapi.CloseBody(res) 8962 if err := googleapi.CheckResponse(res); err != nil { 8963 return nil, err 8964 } 8965 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8966 ServerResponse: googleapi.ServerResponse{ 8967 Header: res.Header, 8968 HTTPStatusCode: res.StatusCode, 8969 }, 8970 } 8971 target := &ret 8972 if err := gensupport.DecodeResponse(target, res); err != nil { 8973 return nil, err 8974 } 8975 return ret, nil 8976 // { 8977 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8978 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8979 // "httpMethod": "GET", 8980 // "id": "dlp.organizations.deidentifyTemplates.get", 8981 // "parameterOrder": [ 8982 // "name" 8983 // ], 8984 // "parameters": { 8985 // "name": { 8986 // "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.", 8987 // "location": "path", 8988 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8989 // "required": true, 8990 // "type": "string" 8991 // } 8992 // }, 8993 // "path": "v2/{+name}", 8994 // "response": { 8995 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8996 // }, 8997 // "scopes": [ 8998 // "https://www.googleapis.com/auth/cloud-platform" 8999 // ] 9000 // } 9001 9002} 9003 9004// method id "dlp.organizations.deidentifyTemplates.list": 9005 9006type OrganizationsDeidentifyTemplatesListCall struct { 9007 s *Service 9008 parentid string 9009 urlParams_ gensupport.URLParams 9010 ifNoneMatch_ string 9011 ctx_ context.Context 9012 header_ http.Header 9013} 9014 9015// List: Lists DeidentifyTemplates. See 9016// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 9017// more. 9018// 9019// - parent: Parent resource name. The format of this value varies 9020// depending on the scope of the request (project or organization) and 9021// whether you have specified a processing location 9022// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 9023// scope, location specified: 9024// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 9025// location specified (defaults to global): `projects/`PROJECT_ID + 9026// Organizations scope, location specified: 9027// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 9028// scope, no location specified (defaults to global): 9029// `organizations/`ORG_ID The following example `parent` string 9030// specifies a parent project with the identifier `example-project`, 9031// and specifies the `europe-west3` location for processing data: 9032// parent=projects/example-project/locations/europe-west3. 9033func (r *OrganizationsDeidentifyTemplatesService) List(parentid string) *OrganizationsDeidentifyTemplatesListCall { 9034 c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9035 c.parentid = parentid 9036 return c 9037} 9038 9039// LocationId sets the optional parameter "locationId": Deprecated. This 9040// field has no effect. 9041func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsDeidentifyTemplatesListCall { 9042 c.urlParams_.Set("locationId", locationId) 9043 return c 9044} 9045 9046// OrderBy sets the optional parameter "orderBy": Comma separated list 9047// of fields to order by, followed by `asc` or `desc` postfix. This list 9048// is case-insensitive, default sorting order is ascending, redundant 9049// space characters are insignificant. Example: `name asc,update_time, 9050// create_time desc` Supported fields are: - `create_time`: corresponds 9051// to time the template was created. - `update_time`: corresponds to 9052// time the template was last updated. - `name`: corresponds to 9053// template's name. - `display_name`: corresponds to template's display 9054// name. 9055func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { 9056 c.urlParams_.Set("orderBy", orderBy) 9057 return c 9058} 9059 9060// PageSize sets the optional parameter "pageSize": Size of the page, 9061// can be limited by server. If zero server returns a page of max size 9062// 100. 9063func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { 9064 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9065 return c 9066} 9067 9068// PageToken sets the optional parameter "pageToken": Page token to 9069// continue retrieval. Comes from previous call to 9070// `ListDeidentifyTemplates`. 9071func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { 9072 c.urlParams_.Set("pageToken", pageToken) 9073 return c 9074} 9075 9076// Fields allows partial responses to be retrieved. See 9077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9078// for more information. 9079func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { 9080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9081 return c 9082} 9083 9084// IfNoneMatch sets the optional parameter which makes the operation 9085// fail if the object's ETag matches the given value. This is useful for 9086// getting updates only after the object has changed since the last 9087// request. Use googleapi.IsNotModified to check whether the response 9088// error from Do is the result of In-None-Match. 9089func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { 9090 c.ifNoneMatch_ = entityTag 9091 return c 9092} 9093 9094// Context sets the context to be used in this call's Do method. Any 9095// pending HTTP request will be aborted if the provided context is 9096// canceled. 9097func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { 9098 c.ctx_ = ctx 9099 return c 9100} 9101 9102// Header returns an http.Header that can be modified by the caller to 9103// add HTTP headers to the request. 9104func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { 9105 if c.header_ == nil { 9106 c.header_ = make(http.Header) 9107 } 9108 return c.header_ 9109} 9110 9111func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9112 reqHeaders := make(http.Header) 9113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9114 for k, v := range c.header_ { 9115 reqHeaders[k] = v 9116 } 9117 reqHeaders.Set("User-Agent", c.s.userAgent()) 9118 if c.ifNoneMatch_ != "" { 9119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9120 } 9121 var body io.Reader = nil 9122 c.urlParams_.Set("alt", alt) 9123 c.urlParams_.Set("prettyPrint", "false") 9124 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 9125 urls += "?" + c.urlParams_.Encode() 9126 req, err := http.NewRequest("GET", urls, body) 9127 if err != nil { 9128 return nil, err 9129 } 9130 req.Header = reqHeaders 9131 googleapi.Expand(req.URL, map[string]string{ 9132 "parent": c.parentid, 9133 }) 9134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9135} 9136 9137// Do executes the "dlp.organizations.deidentifyTemplates.list" call. 9138// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 9139// error will be non-nil. Any non-2xx status code is an error. Response 9140// headers are in either 9141// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 9142// er or (if a response was returned at all) in 9143// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9144// whether the returned error was because http.StatusNotModified was 9145// returned. 9146func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 9147 gensupport.SetOptions(c.urlParams_, opts...) 9148 res, err := c.doRequest("json") 9149 if res != nil && res.StatusCode == http.StatusNotModified { 9150 if res.Body != nil { 9151 res.Body.Close() 9152 } 9153 return nil, &googleapi.Error{ 9154 Code: res.StatusCode, 9155 Header: res.Header, 9156 } 9157 } 9158 if err != nil { 9159 return nil, err 9160 } 9161 defer googleapi.CloseBody(res) 9162 if err := googleapi.CheckResponse(res); err != nil { 9163 return nil, err 9164 } 9165 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 9166 ServerResponse: googleapi.ServerResponse{ 9167 Header: res.Header, 9168 HTTPStatusCode: res.StatusCode, 9169 }, 9170 } 9171 target := &ret 9172 if err := gensupport.DecodeResponse(target, res); err != nil { 9173 return nil, err 9174 } 9175 return ret, nil 9176 // { 9177 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9178 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 9179 // "httpMethod": "GET", 9180 // "id": "dlp.organizations.deidentifyTemplates.list", 9181 // "parameterOrder": [ 9182 // "parent" 9183 // ], 9184 // "parameters": { 9185 // "locationId": { 9186 // "description": "Deprecated. This field has no effect.", 9187 // "location": "query", 9188 // "type": "string" 9189 // }, 9190 // "orderBy": { 9191 // "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.", 9192 // "location": "query", 9193 // "type": "string" 9194 // }, 9195 // "pageSize": { 9196 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 9197 // "format": "int32", 9198 // "location": "query", 9199 // "type": "integer" 9200 // }, 9201 // "pageToken": { 9202 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 9203 // "location": "query", 9204 // "type": "string" 9205 // }, 9206 // "parent": { 9207 // "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", 9208 // "location": "path", 9209 // "pattern": "^organizations/[^/]+$", 9210 // "required": true, 9211 // "type": "string" 9212 // } 9213 // }, 9214 // "path": "v2/{+parent}/deidentifyTemplates", 9215 // "response": { 9216 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 9217 // }, 9218 // "scopes": [ 9219 // "https://www.googleapis.com/auth/cloud-platform" 9220 // ] 9221 // } 9222 9223} 9224 9225// Pages invokes f for each page of results. 9226// A non-nil error returned from f will halt the iteration. 9227// The provided context supersedes any context provided to the Context method. 9228func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 9229 c.ctx_ = ctx 9230 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9231 for { 9232 x, err := c.Do() 9233 if err != nil { 9234 return err 9235 } 9236 if err := f(x); err != nil { 9237 return err 9238 } 9239 if x.NextPageToken == "" { 9240 return nil 9241 } 9242 c.PageToken(x.NextPageToken) 9243 } 9244} 9245 9246// method id "dlp.organizations.deidentifyTemplates.patch": 9247 9248type OrganizationsDeidentifyTemplatesPatchCall struct { 9249 s *Service 9250 name string 9251 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 9252 urlParams_ gensupport.URLParams 9253 ctx_ context.Context 9254 header_ http.Header 9255} 9256 9257// Patch: Updates the DeidentifyTemplate. See 9258// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 9259// more. 9260// 9261// - name: Resource name of organization and deidentify template to be 9262// updated, for example 9263// `organizations/433245324/deidentifyTemplates/432452342` or 9264// projects/project-id/deidentifyTemplates/432452342. 9265func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { 9266 c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9267 c.name = name 9268 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 9269 return c 9270} 9271 9272// Fields allows partial responses to be retrieved. See 9273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9274// for more information. 9275func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { 9276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9277 return c 9278} 9279 9280// Context sets the context to be used in this call's Do method. Any 9281// pending HTTP request will be aborted if the provided context is 9282// canceled. 9283func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { 9284 c.ctx_ = ctx 9285 return c 9286} 9287 9288// Header returns an http.Header that can be modified by the caller to 9289// add HTTP headers to the request. 9290func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { 9291 if c.header_ == nil { 9292 c.header_ = make(http.Header) 9293 } 9294 return c.header_ 9295} 9296 9297func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9298 reqHeaders := make(http.Header) 9299 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9300 for k, v := range c.header_ { 9301 reqHeaders[k] = v 9302 } 9303 reqHeaders.Set("User-Agent", c.s.userAgent()) 9304 var body io.Reader = nil 9305 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 9306 if err != nil { 9307 return nil, err 9308 } 9309 reqHeaders.Set("Content-Type", "application/json") 9310 c.urlParams_.Set("alt", alt) 9311 c.urlParams_.Set("prettyPrint", "false") 9312 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9313 urls += "?" + c.urlParams_.Encode() 9314 req, err := http.NewRequest("PATCH", urls, body) 9315 if err != nil { 9316 return nil, err 9317 } 9318 req.Header = reqHeaders 9319 googleapi.Expand(req.URL, map[string]string{ 9320 "name": c.name, 9321 }) 9322 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9323} 9324 9325// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. 9326// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 9327// non-nil. Any non-2xx status code is an error. Response headers are in 9328// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 9329// (if a response was returned at all) in 9330// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9331// whether the returned error was because http.StatusNotModified was 9332// returned. 9333func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 9334 gensupport.SetOptions(c.urlParams_, opts...) 9335 res, err := c.doRequest("json") 9336 if res != nil && res.StatusCode == http.StatusNotModified { 9337 if res.Body != nil { 9338 res.Body.Close() 9339 } 9340 return nil, &googleapi.Error{ 9341 Code: res.StatusCode, 9342 Header: res.Header, 9343 } 9344 } 9345 if err != nil { 9346 return nil, err 9347 } 9348 defer googleapi.CloseBody(res) 9349 if err := googleapi.CheckResponse(res); err != nil { 9350 return nil, err 9351 } 9352 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 9353 ServerResponse: googleapi.ServerResponse{ 9354 Header: res.Header, 9355 HTTPStatusCode: res.StatusCode, 9356 }, 9357 } 9358 target := &ret 9359 if err := gensupport.DecodeResponse(target, res); err != nil { 9360 return nil, err 9361 } 9362 return ret, nil 9363 // { 9364 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9365 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 9366 // "httpMethod": "PATCH", 9367 // "id": "dlp.organizations.deidentifyTemplates.patch", 9368 // "parameterOrder": [ 9369 // "name" 9370 // ], 9371 // "parameters": { 9372 // "name": { 9373 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 9374 // "location": "path", 9375 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 9376 // "required": true, 9377 // "type": "string" 9378 // } 9379 // }, 9380 // "path": "v2/{+name}", 9381 // "request": { 9382 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 9383 // }, 9384 // "response": { 9385 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 9386 // }, 9387 // "scopes": [ 9388 // "https://www.googleapis.com/auth/cloud-platform" 9389 // ] 9390 // } 9391 9392} 9393 9394// method id "dlp.organizations.inspectTemplates.create": 9395 9396type OrganizationsInspectTemplatesCreateCall struct { 9397 s *Service 9398 parentid string 9399 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 9400 urlParams_ gensupport.URLParams 9401 ctx_ context.Context 9402 header_ http.Header 9403} 9404 9405// Create: Creates an InspectTemplate for re-using frequently used 9406// configuration for inspecting content, images, and storage. See 9407// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9408// 9409// - parent: Parent resource name. The format of this value varies 9410// depending on the scope of the request (project or organization) and 9411// whether you have specified a processing location 9412// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 9413// scope, location specified: 9414// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 9415// location specified (defaults to global): `projects/`PROJECT_ID + 9416// Organizations scope, location specified: 9417// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 9418// scope, no location specified (defaults to global): 9419// `organizations/`ORG_ID The following example `parent` string 9420// specifies a parent project with the identifier `example-project`, 9421// and specifies the `europe-west3` location for processing data: 9422// parent=projects/example-project/locations/europe-west3. 9423func (r *OrganizationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { 9424 c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9425 c.parentid = parentid 9426 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 9427 return c 9428} 9429 9430// Fields allows partial responses to be retrieved. See 9431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9432// for more information. 9433func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { 9434 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9435 return c 9436} 9437 9438// Context sets the context to be used in this call's Do method. Any 9439// pending HTTP request will be aborted if the provided context is 9440// canceled. 9441func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { 9442 c.ctx_ = ctx 9443 return c 9444} 9445 9446// Header returns an http.Header that can be modified by the caller to 9447// add HTTP headers to the request. 9448func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { 9449 if c.header_ == nil { 9450 c.header_ = make(http.Header) 9451 } 9452 return c.header_ 9453} 9454 9455func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 9456 reqHeaders := make(http.Header) 9457 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9458 for k, v := range c.header_ { 9459 reqHeaders[k] = v 9460 } 9461 reqHeaders.Set("User-Agent", c.s.userAgent()) 9462 var body io.Reader = nil 9463 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 9464 if err != nil { 9465 return nil, err 9466 } 9467 reqHeaders.Set("Content-Type", "application/json") 9468 c.urlParams_.Set("alt", alt) 9469 c.urlParams_.Set("prettyPrint", "false") 9470 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9471 urls += "?" + c.urlParams_.Encode() 9472 req, err := http.NewRequest("POST", urls, body) 9473 if err != nil { 9474 return nil, err 9475 } 9476 req.Header = reqHeaders 9477 googleapi.Expand(req.URL, map[string]string{ 9478 "parent": c.parentid, 9479 }) 9480 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9481} 9482 9483// Do executes the "dlp.organizations.inspectTemplates.create" call. 9484// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9485// non-nil. Any non-2xx status code is an error. Response headers are in 9486// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9487// (if a response was returned at all) in 9488// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9489// whether the returned error was because http.StatusNotModified was 9490// returned. 9491func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9492 gensupport.SetOptions(c.urlParams_, opts...) 9493 res, err := c.doRequest("json") 9494 if res != nil && res.StatusCode == http.StatusNotModified { 9495 if res.Body != nil { 9496 res.Body.Close() 9497 } 9498 return nil, &googleapi.Error{ 9499 Code: res.StatusCode, 9500 Header: res.Header, 9501 } 9502 } 9503 if err != nil { 9504 return nil, err 9505 } 9506 defer googleapi.CloseBody(res) 9507 if err := googleapi.CheckResponse(res); err != nil { 9508 return nil, err 9509 } 9510 ret := &GooglePrivacyDlpV2InspectTemplate{ 9511 ServerResponse: googleapi.ServerResponse{ 9512 Header: res.Header, 9513 HTTPStatusCode: res.StatusCode, 9514 }, 9515 } 9516 target := &ret 9517 if err := gensupport.DecodeResponse(target, res); err != nil { 9518 return nil, err 9519 } 9520 return ret, nil 9521 // { 9522 // "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.", 9523 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9524 // "httpMethod": "POST", 9525 // "id": "dlp.organizations.inspectTemplates.create", 9526 // "parameterOrder": [ 9527 // "parent" 9528 // ], 9529 // "parameters": { 9530 // "parent": { 9531 // "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", 9532 // "location": "path", 9533 // "pattern": "^organizations/[^/]+$", 9534 // "required": true, 9535 // "type": "string" 9536 // } 9537 // }, 9538 // "path": "v2/{+parent}/inspectTemplates", 9539 // "request": { 9540 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 9541 // }, 9542 // "response": { 9543 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9544 // }, 9545 // "scopes": [ 9546 // "https://www.googleapis.com/auth/cloud-platform" 9547 // ] 9548 // } 9549 9550} 9551 9552// method id "dlp.organizations.inspectTemplates.delete": 9553 9554type OrganizationsInspectTemplatesDeleteCall struct { 9555 s *Service 9556 name string 9557 urlParams_ gensupport.URLParams 9558 ctx_ context.Context 9559 header_ http.Header 9560} 9561 9562// Delete: Deletes an InspectTemplate. See 9563// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9564// 9565// - name: Resource name of the organization and inspectTemplate to be 9566// deleted, for example 9567// `organizations/433245324/inspectTemplates/432452342` or 9568// projects/project-id/inspectTemplates/432452342. 9569func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { 9570 c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9571 c.name = name 9572 return c 9573} 9574 9575// Fields allows partial responses to be retrieved. See 9576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9577// for more information. 9578func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { 9579 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9580 return c 9581} 9582 9583// Context sets the context to be used in this call's Do method. Any 9584// pending HTTP request will be aborted if the provided context is 9585// canceled. 9586func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { 9587 c.ctx_ = ctx 9588 return c 9589} 9590 9591// Header returns an http.Header that can be modified by the caller to 9592// add HTTP headers to the request. 9593func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { 9594 if c.header_ == nil { 9595 c.header_ = make(http.Header) 9596 } 9597 return c.header_ 9598} 9599 9600func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 9601 reqHeaders := make(http.Header) 9602 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9603 for k, v := range c.header_ { 9604 reqHeaders[k] = v 9605 } 9606 reqHeaders.Set("User-Agent", c.s.userAgent()) 9607 var body io.Reader = nil 9608 c.urlParams_.Set("alt", alt) 9609 c.urlParams_.Set("prettyPrint", "false") 9610 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9611 urls += "?" + c.urlParams_.Encode() 9612 req, err := http.NewRequest("DELETE", urls, body) 9613 if err != nil { 9614 return nil, err 9615 } 9616 req.Header = reqHeaders 9617 googleapi.Expand(req.URL, map[string]string{ 9618 "name": c.name, 9619 }) 9620 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9621} 9622 9623// Do executes the "dlp.organizations.inspectTemplates.delete" call. 9624// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9625// non-2xx status code is an error. Response headers are in either 9626// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9627// returned at all) in error.(*googleapi.Error).Header. Use 9628// googleapi.IsNotModified to check whether the returned error was 9629// because http.StatusNotModified was returned. 9630func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9631 gensupport.SetOptions(c.urlParams_, opts...) 9632 res, err := c.doRequest("json") 9633 if res != nil && res.StatusCode == http.StatusNotModified { 9634 if res.Body != nil { 9635 res.Body.Close() 9636 } 9637 return nil, &googleapi.Error{ 9638 Code: res.StatusCode, 9639 Header: res.Header, 9640 } 9641 } 9642 if err != nil { 9643 return nil, err 9644 } 9645 defer googleapi.CloseBody(res) 9646 if err := googleapi.CheckResponse(res); err != nil { 9647 return nil, err 9648 } 9649 ret := &GoogleProtobufEmpty{ 9650 ServerResponse: googleapi.ServerResponse{ 9651 Header: res.Header, 9652 HTTPStatusCode: res.StatusCode, 9653 }, 9654 } 9655 target := &ret 9656 if err := gensupport.DecodeResponse(target, res); err != nil { 9657 return nil, err 9658 } 9659 return ret, nil 9660 // { 9661 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9662 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9663 // "httpMethod": "DELETE", 9664 // "id": "dlp.organizations.inspectTemplates.delete", 9665 // "parameterOrder": [ 9666 // "name" 9667 // ], 9668 // "parameters": { 9669 // "name": { 9670 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9671 // "location": "path", 9672 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9673 // "required": true, 9674 // "type": "string" 9675 // } 9676 // }, 9677 // "path": "v2/{+name}", 9678 // "response": { 9679 // "$ref": "GoogleProtobufEmpty" 9680 // }, 9681 // "scopes": [ 9682 // "https://www.googleapis.com/auth/cloud-platform" 9683 // ] 9684 // } 9685 9686} 9687 9688// method id "dlp.organizations.inspectTemplates.get": 9689 9690type OrganizationsInspectTemplatesGetCall struct { 9691 s *Service 9692 name string 9693 urlParams_ gensupport.URLParams 9694 ifNoneMatch_ string 9695 ctx_ context.Context 9696 header_ http.Header 9697} 9698 9699// Get: Gets an InspectTemplate. See 9700// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9701// 9702// - name: Resource name of the organization and inspectTemplate to be 9703// read, for example 9704// `organizations/433245324/inspectTemplates/432452342` or 9705// projects/project-id/inspectTemplates/432452342. 9706func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { 9707 c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9708 c.name = name 9709 return c 9710} 9711 9712// Fields allows partial responses to be retrieved. See 9713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9714// for more information. 9715func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { 9716 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9717 return c 9718} 9719 9720// IfNoneMatch sets the optional parameter which makes the operation 9721// fail if the object's ETag matches the given value. This is useful for 9722// getting updates only after the object has changed since the last 9723// request. Use googleapi.IsNotModified to check whether the response 9724// error from Do is the result of In-None-Match. 9725func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { 9726 c.ifNoneMatch_ = entityTag 9727 return c 9728} 9729 9730// Context sets the context to be used in this call's Do method. Any 9731// pending HTTP request will be aborted if the provided context is 9732// canceled. 9733func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { 9734 c.ctx_ = ctx 9735 return c 9736} 9737 9738// Header returns an http.Header that can be modified by the caller to 9739// add HTTP headers to the request. 9740func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { 9741 if c.header_ == nil { 9742 c.header_ = make(http.Header) 9743 } 9744 return c.header_ 9745} 9746 9747func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 9748 reqHeaders := make(http.Header) 9749 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9750 for k, v := range c.header_ { 9751 reqHeaders[k] = v 9752 } 9753 reqHeaders.Set("User-Agent", c.s.userAgent()) 9754 if c.ifNoneMatch_ != "" { 9755 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9756 } 9757 var body io.Reader = nil 9758 c.urlParams_.Set("alt", alt) 9759 c.urlParams_.Set("prettyPrint", "false") 9760 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9761 urls += "?" + c.urlParams_.Encode() 9762 req, err := http.NewRequest("GET", urls, body) 9763 if err != nil { 9764 return nil, err 9765 } 9766 req.Header = reqHeaders 9767 googleapi.Expand(req.URL, map[string]string{ 9768 "name": c.name, 9769 }) 9770 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9771} 9772 9773// Do executes the "dlp.organizations.inspectTemplates.get" call. 9774// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9775// non-nil. Any non-2xx status code is an error. Response headers are in 9776// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9777// (if a response was returned at all) in 9778// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9779// whether the returned error was because http.StatusNotModified was 9780// returned. 9781func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9782 gensupport.SetOptions(c.urlParams_, opts...) 9783 res, err := c.doRequest("json") 9784 if res != nil && res.StatusCode == http.StatusNotModified { 9785 if res.Body != nil { 9786 res.Body.Close() 9787 } 9788 return nil, &googleapi.Error{ 9789 Code: res.StatusCode, 9790 Header: res.Header, 9791 } 9792 } 9793 if err != nil { 9794 return nil, err 9795 } 9796 defer googleapi.CloseBody(res) 9797 if err := googleapi.CheckResponse(res); err != nil { 9798 return nil, err 9799 } 9800 ret := &GooglePrivacyDlpV2InspectTemplate{ 9801 ServerResponse: googleapi.ServerResponse{ 9802 Header: res.Header, 9803 HTTPStatusCode: res.StatusCode, 9804 }, 9805 } 9806 target := &ret 9807 if err := gensupport.DecodeResponse(target, res); err != nil { 9808 return nil, err 9809 } 9810 return ret, nil 9811 // { 9812 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9813 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9814 // "httpMethod": "GET", 9815 // "id": "dlp.organizations.inspectTemplates.get", 9816 // "parameterOrder": [ 9817 // "name" 9818 // ], 9819 // "parameters": { 9820 // "name": { 9821 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9822 // "location": "path", 9823 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9824 // "required": true, 9825 // "type": "string" 9826 // } 9827 // }, 9828 // "path": "v2/{+name}", 9829 // "response": { 9830 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9831 // }, 9832 // "scopes": [ 9833 // "https://www.googleapis.com/auth/cloud-platform" 9834 // ] 9835 // } 9836 9837} 9838 9839// method id "dlp.organizations.inspectTemplates.list": 9840 9841type OrganizationsInspectTemplatesListCall struct { 9842 s *Service 9843 parentid string 9844 urlParams_ gensupport.URLParams 9845 ifNoneMatch_ string 9846 ctx_ context.Context 9847 header_ http.Header 9848} 9849 9850// List: Lists InspectTemplates. See 9851// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9852// 9853// - parent: Parent resource name. The format of this value varies 9854// depending on the scope of the request (project or organization) and 9855// whether you have specified a processing location 9856// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 9857// scope, location specified: 9858// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 9859// location specified (defaults to global): `projects/`PROJECT_ID + 9860// Organizations scope, location specified: 9861// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 9862// scope, no location specified (defaults to global): 9863// `organizations/`ORG_ID The following example `parent` string 9864// specifies a parent project with the identifier `example-project`, 9865// and specifies the `europe-west3` location for processing data: 9866// parent=projects/example-project/locations/europe-west3. 9867func (r *OrganizationsInspectTemplatesService) List(parentid string) *OrganizationsInspectTemplatesListCall { 9868 c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9869 c.parentid = parentid 9870 return c 9871} 9872 9873// LocationId sets the optional parameter "locationId": Deprecated. This 9874// field has no effect. 9875func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsInspectTemplatesListCall { 9876 c.urlParams_.Set("locationId", locationId) 9877 return c 9878} 9879 9880// OrderBy sets the optional parameter "orderBy": Comma separated list 9881// of fields to order by, followed by `asc` or `desc` postfix. This list 9882// is case-insensitive, default sorting order is ascending, redundant 9883// space characters are insignificant. Example: `name asc,update_time, 9884// create_time desc` Supported fields are: - `create_time`: corresponds 9885// to time the template was created. - `update_time`: corresponds to 9886// time the template was last updated. - `name`: corresponds to 9887// template's name. - `display_name`: corresponds to template's display 9888// name. 9889func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { 9890 c.urlParams_.Set("orderBy", orderBy) 9891 return c 9892} 9893 9894// PageSize sets the optional parameter "pageSize": Size of the page, 9895// can be limited by server. If zero server returns a page of max size 9896// 100. 9897func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { 9898 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9899 return c 9900} 9901 9902// PageToken sets the optional parameter "pageToken": Page token to 9903// continue retrieval. Comes from previous call to 9904// `ListInspectTemplates`. 9905func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { 9906 c.urlParams_.Set("pageToken", pageToken) 9907 return c 9908} 9909 9910// Fields allows partial responses to be retrieved. See 9911// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9912// for more information. 9913func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { 9914 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9915 return c 9916} 9917 9918// IfNoneMatch sets the optional parameter which makes the operation 9919// fail if the object's ETag matches the given value. This is useful for 9920// getting updates only after the object has changed since the last 9921// request. Use googleapi.IsNotModified to check whether the response 9922// error from Do is the result of In-None-Match. 9923func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { 9924 c.ifNoneMatch_ = entityTag 9925 return c 9926} 9927 9928// Context sets the context to be used in this call's Do method. Any 9929// pending HTTP request will be aborted if the provided context is 9930// canceled. 9931func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { 9932 c.ctx_ = ctx 9933 return c 9934} 9935 9936// Header returns an http.Header that can be modified by the caller to 9937// add HTTP headers to the request. 9938func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { 9939 if c.header_ == nil { 9940 c.header_ = make(http.Header) 9941 } 9942 return c.header_ 9943} 9944 9945func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9946 reqHeaders := make(http.Header) 9947 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 9948 for k, v := range c.header_ { 9949 reqHeaders[k] = v 9950 } 9951 reqHeaders.Set("User-Agent", c.s.userAgent()) 9952 if c.ifNoneMatch_ != "" { 9953 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9954 } 9955 var body io.Reader = nil 9956 c.urlParams_.Set("alt", alt) 9957 c.urlParams_.Set("prettyPrint", "false") 9958 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9959 urls += "?" + c.urlParams_.Encode() 9960 req, err := http.NewRequest("GET", urls, body) 9961 if err != nil { 9962 return nil, err 9963 } 9964 req.Header = reqHeaders 9965 googleapi.Expand(req.URL, map[string]string{ 9966 "parent": c.parentid, 9967 }) 9968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9969} 9970 9971// Do executes the "dlp.organizations.inspectTemplates.list" call. 9972// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 9973// error will be non-nil. Any non-2xx status code is an error. Response 9974// headers are in either 9975// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 9976// or (if a response was returned at all) in 9977// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9978// whether the returned error was because http.StatusNotModified was 9979// returned. 9980func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 9981 gensupport.SetOptions(c.urlParams_, opts...) 9982 res, err := c.doRequest("json") 9983 if res != nil && res.StatusCode == http.StatusNotModified { 9984 if res.Body != nil { 9985 res.Body.Close() 9986 } 9987 return nil, &googleapi.Error{ 9988 Code: res.StatusCode, 9989 Header: res.Header, 9990 } 9991 } 9992 if err != nil { 9993 return nil, err 9994 } 9995 defer googleapi.CloseBody(res) 9996 if err := googleapi.CheckResponse(res); err != nil { 9997 return nil, err 9998 } 9999 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 10000 ServerResponse: googleapi.ServerResponse{ 10001 Header: res.Header, 10002 HTTPStatusCode: res.StatusCode, 10003 }, 10004 } 10005 target := &ret 10006 if err := gensupport.DecodeResponse(target, res); err != nil { 10007 return nil, err 10008 } 10009 return ret, nil 10010 // { 10011 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 10012 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 10013 // "httpMethod": "GET", 10014 // "id": "dlp.organizations.inspectTemplates.list", 10015 // "parameterOrder": [ 10016 // "parent" 10017 // ], 10018 // "parameters": { 10019 // "locationId": { 10020 // "description": "Deprecated. This field has no effect.", 10021 // "location": "query", 10022 // "type": "string" 10023 // }, 10024 // "orderBy": { 10025 // "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.", 10026 // "location": "query", 10027 // "type": "string" 10028 // }, 10029 // "pageSize": { 10030 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 10031 // "format": "int32", 10032 // "location": "query", 10033 // "type": "integer" 10034 // }, 10035 // "pageToken": { 10036 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 10037 // "location": "query", 10038 // "type": "string" 10039 // }, 10040 // "parent": { 10041 // "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", 10042 // "location": "path", 10043 // "pattern": "^organizations/[^/]+$", 10044 // "required": true, 10045 // "type": "string" 10046 // } 10047 // }, 10048 // "path": "v2/{+parent}/inspectTemplates", 10049 // "response": { 10050 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 10051 // }, 10052 // "scopes": [ 10053 // "https://www.googleapis.com/auth/cloud-platform" 10054 // ] 10055 // } 10056 10057} 10058 10059// Pages invokes f for each page of results. 10060// A non-nil error returned from f will halt the iteration. 10061// The provided context supersedes any context provided to the Context method. 10062func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 10063 c.ctx_ = ctx 10064 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10065 for { 10066 x, err := c.Do() 10067 if err != nil { 10068 return err 10069 } 10070 if err := f(x); err != nil { 10071 return err 10072 } 10073 if x.NextPageToken == "" { 10074 return nil 10075 } 10076 c.PageToken(x.NextPageToken) 10077 } 10078} 10079 10080// method id "dlp.organizations.inspectTemplates.patch": 10081 10082type OrganizationsInspectTemplatesPatchCall struct { 10083 s *Service 10084 name string 10085 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 10086 urlParams_ gensupport.URLParams 10087 ctx_ context.Context 10088 header_ http.Header 10089} 10090 10091// Patch: Updates the InspectTemplate. See 10092// https://cloud.google.com/dlp/docs/creating-templates to learn more. 10093// 10094// - name: Resource name of organization and inspectTemplate to be 10095// updated, for example 10096// `organizations/433245324/inspectTemplates/432452342` or 10097// projects/project-id/inspectTemplates/432452342. 10098func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { 10099 c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10100 c.name = name 10101 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 10102 return c 10103} 10104 10105// Fields allows partial responses to be retrieved. See 10106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10107// for more information. 10108func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { 10109 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10110 return c 10111} 10112 10113// Context sets the context to be used in this call's Do method. Any 10114// pending HTTP request will be aborted if the provided context is 10115// canceled. 10116func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { 10117 c.ctx_ = ctx 10118 return c 10119} 10120 10121// Header returns an http.Header that can be modified by the caller to 10122// add HTTP headers to the request. 10123func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { 10124 if c.header_ == nil { 10125 c.header_ = make(http.Header) 10126 } 10127 return c.header_ 10128} 10129 10130func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 10131 reqHeaders := make(http.Header) 10132 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10133 for k, v := range c.header_ { 10134 reqHeaders[k] = v 10135 } 10136 reqHeaders.Set("User-Agent", c.s.userAgent()) 10137 var body io.Reader = nil 10138 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 10139 if err != nil { 10140 return nil, err 10141 } 10142 reqHeaders.Set("Content-Type", "application/json") 10143 c.urlParams_.Set("alt", alt) 10144 c.urlParams_.Set("prettyPrint", "false") 10145 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10146 urls += "?" + c.urlParams_.Encode() 10147 req, err := http.NewRequest("PATCH", urls, body) 10148 if err != nil { 10149 return nil, err 10150 } 10151 req.Header = reqHeaders 10152 googleapi.Expand(req.URL, map[string]string{ 10153 "name": c.name, 10154 }) 10155 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10156} 10157 10158// Do executes the "dlp.organizations.inspectTemplates.patch" call. 10159// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 10160// non-nil. Any non-2xx status code is an error. Response headers are in 10161// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 10162// (if a response was returned at all) in 10163// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10164// whether the returned error was because http.StatusNotModified was 10165// returned. 10166func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 10167 gensupport.SetOptions(c.urlParams_, opts...) 10168 res, err := c.doRequest("json") 10169 if res != nil && res.StatusCode == http.StatusNotModified { 10170 if res.Body != nil { 10171 res.Body.Close() 10172 } 10173 return nil, &googleapi.Error{ 10174 Code: res.StatusCode, 10175 Header: res.Header, 10176 } 10177 } 10178 if err != nil { 10179 return nil, err 10180 } 10181 defer googleapi.CloseBody(res) 10182 if err := googleapi.CheckResponse(res); err != nil { 10183 return nil, err 10184 } 10185 ret := &GooglePrivacyDlpV2InspectTemplate{ 10186 ServerResponse: googleapi.ServerResponse{ 10187 Header: res.Header, 10188 HTTPStatusCode: res.StatusCode, 10189 }, 10190 } 10191 target := &ret 10192 if err := gensupport.DecodeResponse(target, res); err != nil { 10193 return nil, err 10194 } 10195 return ret, nil 10196 // { 10197 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 10198 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 10199 // "httpMethod": "PATCH", 10200 // "id": "dlp.organizations.inspectTemplates.patch", 10201 // "parameterOrder": [ 10202 // "name" 10203 // ], 10204 // "parameters": { 10205 // "name": { 10206 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 10207 // "location": "path", 10208 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 10209 // "required": true, 10210 // "type": "string" 10211 // } 10212 // }, 10213 // "path": "v2/{+name}", 10214 // "request": { 10215 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 10216 // }, 10217 // "response": { 10218 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 10219 // }, 10220 // "scopes": [ 10221 // "https://www.googleapis.com/auth/cloud-platform" 10222 // ] 10223 // } 10224 10225} 10226 10227// method id "dlp.organizations.locations.deidentifyTemplates.create": 10228 10229type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { 10230 s *Service 10231 parentid string 10232 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 10233 urlParams_ gensupport.URLParams 10234 ctx_ context.Context 10235 header_ http.Header 10236} 10237 10238// Create: Creates a DeidentifyTemplate for re-using frequently used 10239// configuration for de-identifying content, images, and storage. See 10240// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10241// more. 10242// 10243// - parent: Parent resource name. The format of this value varies 10244// depending on the scope of the request (project or organization) and 10245// whether you have specified a processing location 10246// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 10247// scope, location specified: 10248// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 10249// location specified (defaults to global): `projects/`PROJECT_ID + 10250// Organizations scope, location specified: 10251// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 10252// scope, no location specified (defaults to global): 10253// `organizations/`ORG_ID The following example `parent` string 10254// specifies a parent project with the identifier `example-project`, 10255// and specifies the `europe-west3` location for processing data: 10256// parent=projects/example-project/locations/europe-west3. 10257func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10258 c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10259 c.parentid = parentid 10260 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 10261 return c 10262} 10263 10264// Fields allows partial responses to be retrieved. See 10265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10266// for more information. 10267func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10268 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10269 return c 10270} 10271 10272// Context sets the context to be used in this call's Do method. Any 10273// pending HTTP request will be aborted if the provided context is 10274// canceled. 10275func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10276 c.ctx_ = ctx 10277 return c 10278} 10279 10280// Header returns an http.Header that can be modified by the caller to 10281// add HTTP headers to the request. 10282func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 10283 if c.header_ == nil { 10284 c.header_ = make(http.Header) 10285 } 10286 return c.header_ 10287} 10288 10289func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 10290 reqHeaders := make(http.Header) 10291 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10292 for k, v := range c.header_ { 10293 reqHeaders[k] = v 10294 } 10295 reqHeaders.Set("User-Agent", c.s.userAgent()) 10296 var body io.Reader = nil 10297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 10298 if err != nil { 10299 return nil, err 10300 } 10301 reqHeaders.Set("Content-Type", "application/json") 10302 c.urlParams_.Set("alt", alt) 10303 c.urlParams_.Set("prettyPrint", "false") 10304 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10305 urls += "?" + c.urlParams_.Encode() 10306 req, err := http.NewRequest("POST", urls, body) 10307 if err != nil { 10308 return nil, err 10309 } 10310 req.Header = reqHeaders 10311 googleapi.Expand(req.URL, map[string]string{ 10312 "parent": c.parentid, 10313 }) 10314 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10315} 10316 10317// Do executes the "dlp.organizations.locations.deidentifyTemplates.create" call. 10318// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10319// non-nil. Any non-2xx status code is an error. Response headers are in 10320// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10321// (if a response was returned at all) in 10322// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10323// whether the returned error was because http.StatusNotModified was 10324// returned. 10325func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10326 gensupport.SetOptions(c.urlParams_, opts...) 10327 res, err := c.doRequest("json") 10328 if res != nil && res.StatusCode == http.StatusNotModified { 10329 if res.Body != nil { 10330 res.Body.Close() 10331 } 10332 return nil, &googleapi.Error{ 10333 Code: res.StatusCode, 10334 Header: res.Header, 10335 } 10336 } 10337 if err != nil { 10338 return nil, err 10339 } 10340 defer googleapi.CloseBody(res) 10341 if err := googleapi.CheckResponse(res); err != nil { 10342 return nil, err 10343 } 10344 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10345 ServerResponse: googleapi.ServerResponse{ 10346 Header: res.Header, 10347 HTTPStatusCode: res.StatusCode, 10348 }, 10349 } 10350 target := &ret 10351 if err := gensupport.DecodeResponse(target, res); err != nil { 10352 return nil, err 10353 } 10354 return ret, nil 10355 // { 10356 // "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.", 10357 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10358 // "httpMethod": "POST", 10359 // "id": "dlp.organizations.locations.deidentifyTemplates.create", 10360 // "parameterOrder": [ 10361 // "parent" 10362 // ], 10363 // "parameters": { 10364 // "parent": { 10365 // "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", 10366 // "location": "path", 10367 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10368 // "required": true, 10369 // "type": "string" 10370 // } 10371 // }, 10372 // "path": "v2/{+parent}/deidentifyTemplates", 10373 // "request": { 10374 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 10375 // }, 10376 // "response": { 10377 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10378 // }, 10379 // "scopes": [ 10380 // "https://www.googleapis.com/auth/cloud-platform" 10381 // ] 10382 // } 10383 10384} 10385 10386// method id "dlp.organizations.locations.deidentifyTemplates.delete": 10387 10388type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { 10389 s *Service 10390 name string 10391 urlParams_ gensupport.URLParams 10392 ctx_ context.Context 10393 header_ http.Header 10394} 10395 10396// Delete: Deletes a DeidentifyTemplate. See 10397// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10398// more. 10399// 10400// - name: Resource name of the organization and deidentify template to 10401// be deleted, for example 10402// `organizations/433245324/deidentifyTemplates/432452342` or 10403// projects/project-id/deidentifyTemplates/432452342. 10404func (r *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10405 c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10406 c.name = name 10407 return c 10408} 10409 10410// Fields allows partial responses to be retrieved. See 10411// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10412// for more information. 10413func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10414 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10415 return c 10416} 10417 10418// Context sets the context to be used in this call's Do method. Any 10419// pending HTTP request will be aborted if the provided context is 10420// canceled. 10421func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10422 c.ctx_ = ctx 10423 return c 10424} 10425 10426// Header returns an http.Header that can be modified by the caller to 10427// add HTTP headers to the request. 10428func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 10429 if c.header_ == nil { 10430 c.header_ = make(http.Header) 10431 } 10432 return c.header_ 10433} 10434 10435func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 10436 reqHeaders := make(http.Header) 10437 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10438 for k, v := range c.header_ { 10439 reqHeaders[k] = v 10440 } 10441 reqHeaders.Set("User-Agent", c.s.userAgent()) 10442 var body io.Reader = nil 10443 c.urlParams_.Set("alt", alt) 10444 c.urlParams_.Set("prettyPrint", "false") 10445 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10446 urls += "?" + c.urlParams_.Encode() 10447 req, err := http.NewRequest("DELETE", urls, body) 10448 if err != nil { 10449 return nil, err 10450 } 10451 req.Header = reqHeaders 10452 googleapi.Expand(req.URL, map[string]string{ 10453 "name": c.name, 10454 }) 10455 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10456} 10457 10458// Do executes the "dlp.organizations.locations.deidentifyTemplates.delete" call. 10459// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10460// non-2xx status code is an error. Response headers are in either 10461// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10462// returned at all) in error.(*googleapi.Error).Header. Use 10463// googleapi.IsNotModified to check whether the returned error was 10464// because http.StatusNotModified was returned. 10465func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10466 gensupport.SetOptions(c.urlParams_, opts...) 10467 res, err := c.doRequest("json") 10468 if res != nil && res.StatusCode == http.StatusNotModified { 10469 if res.Body != nil { 10470 res.Body.Close() 10471 } 10472 return nil, &googleapi.Error{ 10473 Code: res.StatusCode, 10474 Header: res.Header, 10475 } 10476 } 10477 if err != nil { 10478 return nil, err 10479 } 10480 defer googleapi.CloseBody(res) 10481 if err := googleapi.CheckResponse(res); err != nil { 10482 return nil, err 10483 } 10484 ret := &GoogleProtobufEmpty{ 10485 ServerResponse: googleapi.ServerResponse{ 10486 Header: res.Header, 10487 HTTPStatusCode: res.StatusCode, 10488 }, 10489 } 10490 target := &ret 10491 if err := gensupport.DecodeResponse(target, res); err != nil { 10492 return nil, err 10493 } 10494 return ret, nil 10495 // { 10496 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10497 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10498 // "httpMethod": "DELETE", 10499 // "id": "dlp.organizations.locations.deidentifyTemplates.delete", 10500 // "parameterOrder": [ 10501 // "name" 10502 // ], 10503 // "parameters": { 10504 // "name": { 10505 // "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.", 10506 // "location": "path", 10507 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10508 // "required": true, 10509 // "type": "string" 10510 // } 10511 // }, 10512 // "path": "v2/{+name}", 10513 // "response": { 10514 // "$ref": "GoogleProtobufEmpty" 10515 // }, 10516 // "scopes": [ 10517 // "https://www.googleapis.com/auth/cloud-platform" 10518 // ] 10519 // } 10520 10521} 10522 10523// method id "dlp.organizations.locations.deidentifyTemplates.get": 10524 10525type OrganizationsLocationsDeidentifyTemplatesGetCall struct { 10526 s *Service 10527 name string 10528 urlParams_ gensupport.URLParams 10529 ifNoneMatch_ string 10530 ctx_ context.Context 10531 header_ http.Header 10532} 10533 10534// Get: Gets a DeidentifyTemplate. See 10535// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10536// more. 10537// 10538// - name: Resource name of the organization and deidentify template to 10539// be read, for example 10540// `organizations/433245324/deidentifyTemplates/432452342` or 10541// projects/project-id/deidentifyTemplates/432452342. 10542func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10543 c := &OrganizationsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10544 c.name = name 10545 return c 10546} 10547 10548// Fields allows partial responses to be retrieved. See 10549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10550// for more information. 10551func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10553 return c 10554} 10555 10556// IfNoneMatch sets the optional parameter which makes the operation 10557// fail if the object's ETag matches the given value. This is useful for 10558// getting updates only after the object has changed since the last 10559// request. Use googleapi.IsNotModified to check whether the response 10560// error from Do is the result of In-None-Match. 10561func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10562 c.ifNoneMatch_ = entityTag 10563 return c 10564} 10565 10566// Context sets the context to be used in this call's Do method. Any 10567// pending HTTP request will be aborted if the provided context is 10568// canceled. 10569func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10570 c.ctx_ = ctx 10571 return c 10572} 10573 10574// Header returns an http.Header that can be modified by the caller to 10575// add HTTP headers to the request. 10576func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 10577 if c.header_ == nil { 10578 c.header_ = make(http.Header) 10579 } 10580 return c.header_ 10581} 10582 10583func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 10584 reqHeaders := make(http.Header) 10585 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10586 for k, v := range c.header_ { 10587 reqHeaders[k] = v 10588 } 10589 reqHeaders.Set("User-Agent", c.s.userAgent()) 10590 if c.ifNoneMatch_ != "" { 10591 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10592 } 10593 var body io.Reader = nil 10594 c.urlParams_.Set("alt", alt) 10595 c.urlParams_.Set("prettyPrint", "false") 10596 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10597 urls += "?" + c.urlParams_.Encode() 10598 req, err := http.NewRequest("GET", urls, body) 10599 if err != nil { 10600 return nil, err 10601 } 10602 req.Header = reqHeaders 10603 googleapi.Expand(req.URL, map[string]string{ 10604 "name": c.name, 10605 }) 10606 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10607} 10608 10609// Do executes the "dlp.organizations.locations.deidentifyTemplates.get" call. 10610// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10611// non-nil. Any non-2xx status code is an error. Response headers are in 10612// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10613// (if a response was returned at all) in 10614// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10615// whether the returned error was because http.StatusNotModified was 10616// returned. 10617func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10618 gensupport.SetOptions(c.urlParams_, opts...) 10619 res, err := c.doRequest("json") 10620 if res != nil && res.StatusCode == http.StatusNotModified { 10621 if res.Body != nil { 10622 res.Body.Close() 10623 } 10624 return nil, &googleapi.Error{ 10625 Code: res.StatusCode, 10626 Header: res.Header, 10627 } 10628 } 10629 if err != nil { 10630 return nil, err 10631 } 10632 defer googleapi.CloseBody(res) 10633 if err := googleapi.CheckResponse(res); err != nil { 10634 return nil, err 10635 } 10636 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10637 ServerResponse: googleapi.ServerResponse{ 10638 Header: res.Header, 10639 HTTPStatusCode: res.StatusCode, 10640 }, 10641 } 10642 target := &ret 10643 if err := gensupport.DecodeResponse(target, res); err != nil { 10644 return nil, err 10645 } 10646 return ret, nil 10647 // { 10648 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10649 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10650 // "httpMethod": "GET", 10651 // "id": "dlp.organizations.locations.deidentifyTemplates.get", 10652 // "parameterOrder": [ 10653 // "name" 10654 // ], 10655 // "parameters": { 10656 // "name": { 10657 // "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.", 10658 // "location": "path", 10659 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10660 // "required": true, 10661 // "type": "string" 10662 // } 10663 // }, 10664 // "path": "v2/{+name}", 10665 // "response": { 10666 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10667 // }, 10668 // "scopes": [ 10669 // "https://www.googleapis.com/auth/cloud-platform" 10670 // ] 10671 // } 10672 10673} 10674 10675// method id "dlp.organizations.locations.deidentifyTemplates.list": 10676 10677type OrganizationsLocationsDeidentifyTemplatesListCall struct { 10678 s *Service 10679 parentid string 10680 urlParams_ gensupport.URLParams 10681 ifNoneMatch_ string 10682 ctx_ context.Context 10683 header_ http.Header 10684} 10685 10686// List: Lists DeidentifyTemplates. See 10687// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10688// more. 10689// 10690// - parent: Parent resource name. The format of this value varies 10691// depending on the scope of the request (project or organization) and 10692// whether you have specified a processing location 10693// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 10694// scope, location specified: 10695// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 10696// location specified (defaults to global): `projects/`PROJECT_ID + 10697// Organizations scope, location specified: 10698// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 10699// scope, no location specified (defaults to global): 10700// `organizations/`ORG_ID The following example `parent` string 10701// specifies a parent project with the identifier `example-project`, 10702// and specifies the `europe-west3` location for processing data: 10703// parent=projects/example-project/locations/europe-west3. 10704func (r *OrganizationsLocationsDeidentifyTemplatesService) List(parentid string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10705 c := &OrganizationsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10706 c.parentid = parentid 10707 return c 10708} 10709 10710// LocationId sets the optional parameter "locationId": Deprecated. This 10711// field has no effect. 10712func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10713 c.urlParams_.Set("locationId", locationId) 10714 return c 10715} 10716 10717// OrderBy sets the optional parameter "orderBy": Comma separated list 10718// of fields to order by, followed by `asc` or `desc` postfix. This list 10719// is case-insensitive, default sorting order is ascending, redundant 10720// space characters are insignificant. Example: `name asc,update_time, 10721// create_time desc` Supported fields are: - `create_time`: corresponds 10722// to time the template was created. - `update_time`: corresponds to 10723// time the template was last updated. - `name`: corresponds to 10724// template's name. - `display_name`: corresponds to template's display 10725// name. 10726func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10727 c.urlParams_.Set("orderBy", orderBy) 10728 return c 10729} 10730 10731// PageSize sets the optional parameter "pageSize": Size of the page, 10732// can be limited by server. If zero server returns a page of max size 10733// 100. 10734func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { 10735 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10736 return c 10737} 10738 10739// PageToken sets the optional parameter "pageToken": Page token to 10740// continue retrieval. Comes from previous call to 10741// `ListDeidentifyTemplates`. 10742func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10743 c.urlParams_.Set("pageToken", pageToken) 10744 return c 10745} 10746 10747// Fields allows partial responses to be retrieved. See 10748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10749// for more information. 10750func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { 10751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10752 return c 10753} 10754 10755// IfNoneMatch sets the optional parameter which makes the operation 10756// fail if the object's ETag matches the given value. This is useful for 10757// getting updates only after the object has changed since the last 10758// request. Use googleapi.IsNotModified to check whether the response 10759// error from Do is the result of In-None-Match. 10760func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10761 c.ifNoneMatch_ = entityTag 10762 return c 10763} 10764 10765// Context sets the context to be used in this call's Do method. Any 10766// pending HTTP request will be aborted if the provided context is 10767// canceled. 10768func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { 10769 c.ctx_ = ctx 10770 return c 10771} 10772 10773// Header returns an http.Header that can be modified by the caller to 10774// add HTTP headers to the request. 10775func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { 10776 if c.header_ == nil { 10777 c.header_ = make(http.Header) 10778 } 10779 return c.header_ 10780} 10781 10782func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 10783 reqHeaders := make(http.Header) 10784 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10785 for k, v := range c.header_ { 10786 reqHeaders[k] = v 10787 } 10788 reqHeaders.Set("User-Agent", c.s.userAgent()) 10789 if c.ifNoneMatch_ != "" { 10790 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10791 } 10792 var body io.Reader = nil 10793 c.urlParams_.Set("alt", alt) 10794 c.urlParams_.Set("prettyPrint", "false") 10795 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10796 urls += "?" + c.urlParams_.Encode() 10797 req, err := http.NewRequest("GET", urls, body) 10798 if err != nil { 10799 return nil, err 10800 } 10801 req.Header = reqHeaders 10802 googleapi.Expand(req.URL, map[string]string{ 10803 "parent": c.parentid, 10804 }) 10805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10806} 10807 10808// Do executes the "dlp.organizations.locations.deidentifyTemplates.list" call. 10809// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 10810// error will be non-nil. Any non-2xx status code is an error. Response 10811// headers are in either 10812// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 10813// er or (if a response was returned at all) in 10814// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10815// whether the returned error was because http.StatusNotModified was 10816// returned. 10817func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 10818 gensupport.SetOptions(c.urlParams_, opts...) 10819 res, err := c.doRequest("json") 10820 if res != nil && res.StatusCode == http.StatusNotModified { 10821 if res.Body != nil { 10822 res.Body.Close() 10823 } 10824 return nil, &googleapi.Error{ 10825 Code: res.StatusCode, 10826 Header: res.Header, 10827 } 10828 } 10829 if err != nil { 10830 return nil, err 10831 } 10832 defer googleapi.CloseBody(res) 10833 if err := googleapi.CheckResponse(res); err != nil { 10834 return nil, err 10835 } 10836 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 10837 ServerResponse: googleapi.ServerResponse{ 10838 Header: res.Header, 10839 HTTPStatusCode: res.StatusCode, 10840 }, 10841 } 10842 target := &ret 10843 if err := gensupport.DecodeResponse(target, res); err != nil { 10844 return nil, err 10845 } 10846 return ret, nil 10847 // { 10848 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10849 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10850 // "httpMethod": "GET", 10851 // "id": "dlp.organizations.locations.deidentifyTemplates.list", 10852 // "parameterOrder": [ 10853 // "parent" 10854 // ], 10855 // "parameters": { 10856 // "locationId": { 10857 // "description": "Deprecated. This field has no effect.", 10858 // "location": "query", 10859 // "type": "string" 10860 // }, 10861 // "orderBy": { 10862 // "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.", 10863 // "location": "query", 10864 // "type": "string" 10865 // }, 10866 // "pageSize": { 10867 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 10868 // "format": "int32", 10869 // "location": "query", 10870 // "type": "integer" 10871 // }, 10872 // "pageToken": { 10873 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 10874 // "location": "query", 10875 // "type": "string" 10876 // }, 10877 // "parent": { 10878 // "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", 10879 // "location": "path", 10880 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10881 // "required": true, 10882 // "type": "string" 10883 // } 10884 // }, 10885 // "path": "v2/{+parent}/deidentifyTemplates", 10886 // "response": { 10887 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 10888 // }, 10889 // "scopes": [ 10890 // "https://www.googleapis.com/auth/cloud-platform" 10891 // ] 10892 // } 10893 10894} 10895 10896// Pages invokes f for each page of results. 10897// A non-nil error returned from f will halt the iteration. 10898// The provided context supersedes any context provided to the Context method. 10899func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 10900 c.ctx_ = ctx 10901 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10902 for { 10903 x, err := c.Do() 10904 if err != nil { 10905 return err 10906 } 10907 if err := f(x); err != nil { 10908 return err 10909 } 10910 if x.NextPageToken == "" { 10911 return nil 10912 } 10913 c.PageToken(x.NextPageToken) 10914 } 10915} 10916 10917// method id "dlp.organizations.locations.deidentifyTemplates.patch": 10918 10919type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { 10920 s *Service 10921 name string 10922 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 10923 urlParams_ gensupport.URLParams 10924 ctx_ context.Context 10925 header_ http.Header 10926} 10927 10928// Patch: Updates the DeidentifyTemplate. See 10929// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10930// more. 10931// 10932// - name: Resource name of organization and deidentify template to be 10933// updated, for example 10934// `organizations/433245324/deidentifyTemplates/432452342` or 10935// projects/project-id/deidentifyTemplates/432452342. 10936func (r *OrganizationsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10937 c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10938 c.name = name 10939 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 10940 return c 10941} 10942 10943// Fields allows partial responses to be retrieved. See 10944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10945// for more information. 10946func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10947 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10948 return c 10949} 10950 10951// Context sets the context to be used in this call's Do method. Any 10952// pending HTTP request will be aborted if the provided context is 10953// canceled. 10954func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10955 c.ctx_ = ctx 10956 return c 10957} 10958 10959// Header returns an http.Header that can be modified by the caller to 10960// add HTTP headers to the request. 10961func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 10962 if c.header_ == nil { 10963 c.header_ = make(http.Header) 10964 } 10965 return c.header_ 10966} 10967 10968func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 10969 reqHeaders := make(http.Header) 10970 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 10971 for k, v := range c.header_ { 10972 reqHeaders[k] = v 10973 } 10974 reqHeaders.Set("User-Agent", c.s.userAgent()) 10975 var body io.Reader = nil 10976 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 10977 if err != nil { 10978 return nil, err 10979 } 10980 reqHeaders.Set("Content-Type", "application/json") 10981 c.urlParams_.Set("alt", alt) 10982 c.urlParams_.Set("prettyPrint", "false") 10983 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10984 urls += "?" + c.urlParams_.Encode() 10985 req, err := http.NewRequest("PATCH", urls, body) 10986 if err != nil { 10987 return nil, err 10988 } 10989 req.Header = reqHeaders 10990 googleapi.Expand(req.URL, map[string]string{ 10991 "name": c.name, 10992 }) 10993 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10994} 10995 10996// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" call. 10997// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10998// non-nil. Any non-2xx status code is an error. Response headers are in 10999// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 11000// (if a response was returned at all) in 11001// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11002// whether the returned error was because http.StatusNotModified was 11003// returned. 11004func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 11005 gensupport.SetOptions(c.urlParams_, opts...) 11006 res, err := c.doRequest("json") 11007 if res != nil && res.StatusCode == http.StatusNotModified { 11008 if res.Body != nil { 11009 res.Body.Close() 11010 } 11011 return nil, &googleapi.Error{ 11012 Code: res.StatusCode, 11013 Header: res.Header, 11014 } 11015 } 11016 if err != nil { 11017 return nil, err 11018 } 11019 defer googleapi.CloseBody(res) 11020 if err := googleapi.CheckResponse(res); err != nil { 11021 return nil, err 11022 } 11023 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 11024 ServerResponse: googleapi.ServerResponse{ 11025 Header: res.Header, 11026 HTTPStatusCode: res.StatusCode, 11027 }, 11028 } 11029 target := &ret 11030 if err := gensupport.DecodeResponse(target, res); err != nil { 11031 return nil, err 11032 } 11033 return ret, nil 11034 // { 11035 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 11036 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 11037 // "httpMethod": "PATCH", 11038 // "id": "dlp.organizations.locations.deidentifyTemplates.patch", 11039 // "parameterOrder": [ 11040 // "name" 11041 // ], 11042 // "parameters": { 11043 // "name": { 11044 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 11045 // "location": "path", 11046 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 11047 // "required": true, 11048 // "type": "string" 11049 // } 11050 // }, 11051 // "path": "v2/{+name}", 11052 // "request": { 11053 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 11054 // }, 11055 // "response": { 11056 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 11057 // }, 11058 // "scopes": [ 11059 // "https://www.googleapis.com/auth/cloud-platform" 11060 // ] 11061 // } 11062 11063} 11064 11065// method id "dlp.organizations.locations.dlpJobs.list": 11066 11067type OrganizationsLocationsDlpJobsListCall struct { 11068 s *Service 11069 parentid string 11070 urlParams_ gensupport.URLParams 11071 ifNoneMatch_ string 11072 ctx_ context.Context 11073 header_ http.Header 11074} 11075 11076// List: Lists DlpJobs that match the specified filter in the request. 11077// See https://cloud.google.com/dlp/docs/inspecting-storage and 11078// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 11079// more. 11080// 11081// - parent: Parent resource name. The format of this value varies 11082// depending on whether you have specified a processing location 11083// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 11084// scope, location specified: 11085// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 11086// location specified (defaults to global): `projects/`PROJECT_ID The 11087// following example `parent` string specifies a parent project with 11088// the identifier `example-project`, and specifies the `europe-west3` 11089// location for processing data: 11090// parent=projects/example-project/locations/europe-west3. 11091func (r *OrganizationsLocationsDlpJobsService) List(parentid string) *OrganizationsLocationsDlpJobsListCall { 11092 c := &OrganizationsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11093 c.parentid = parentid 11094 return c 11095} 11096 11097// Filter sets the optional parameter "filter": Allows filtering. 11098// Supported syntax: * Filter expressions are made up of one or more 11099// restrictions. * Restrictions can be combined by `AND` or `OR` logical 11100// operators. A sequence of restrictions implicitly uses `AND`. * A 11101// restriction has the form of `{field} {operator} {value}`. * Supported 11102// fields/values for inspect jobs: - `state` - 11103// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 11104// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 11105// of the trigger that created job. - 'end_time` - Corresponds to time 11106// the job finished. - 'start_time` - Corresponds to time the job 11107// finished. * Supported fields for risk analysis jobs: - `state` - 11108// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 11109// the job finished. - 'start_time` - Corresponds to time the job 11110// finished. * The operator must be `=` or `!=`. Examples: * 11111// inspected_storage = cloud_storage AND state = done * 11112// inspected_storage = cloud_storage OR inspected_storage = bigquery * 11113// inspected_storage = cloud_storage AND (state = done OR state = 11114// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 11115// this field should be no more than 500 characters. 11116func (c *OrganizationsLocationsDlpJobsListCall) Filter(filter string) *OrganizationsLocationsDlpJobsListCall { 11117 c.urlParams_.Set("filter", filter) 11118 return c 11119} 11120 11121// LocationId sets the optional parameter "locationId": Deprecated. This 11122// field has no effect. 11123func (c *OrganizationsLocationsDlpJobsListCall) LocationId(locationId string) *OrganizationsLocationsDlpJobsListCall { 11124 c.urlParams_.Set("locationId", locationId) 11125 return c 11126} 11127 11128// OrderBy sets the optional parameter "orderBy": Comma separated list 11129// of fields to order by, followed by `asc` or `desc` postfix. This list 11130// is case-insensitive, default sorting order is ascending, redundant 11131// space characters are insignificant. Example: `name asc, end_time asc, 11132// create_time desc` Supported fields are: - `create_time`: corresponds 11133// to time the job was created. - `end_time`: corresponds to time the 11134// job ended. - `name`: corresponds to job's name. - `state`: 11135// corresponds to `state` 11136func (c *OrganizationsLocationsDlpJobsListCall) OrderBy(orderBy string) *OrganizationsLocationsDlpJobsListCall { 11137 c.urlParams_.Set("orderBy", orderBy) 11138 return c 11139} 11140 11141// PageSize sets the optional parameter "pageSize": The standard list 11142// page size. 11143func (c *OrganizationsLocationsDlpJobsListCall) PageSize(pageSize int64) *OrganizationsLocationsDlpJobsListCall { 11144 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11145 return c 11146} 11147 11148// PageToken sets the optional parameter "pageToken": The standard list 11149// page token. 11150func (c *OrganizationsLocationsDlpJobsListCall) PageToken(pageToken string) *OrganizationsLocationsDlpJobsListCall { 11151 c.urlParams_.Set("pageToken", pageToken) 11152 return c 11153} 11154 11155// Type sets the optional parameter "type": The type of job. Defaults to 11156// `DlpJobType.INSPECT` 11157// 11158// Possible values: 11159// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 11160// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 11161// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 11162func (c *OrganizationsLocationsDlpJobsListCall) Type(type_ string) *OrganizationsLocationsDlpJobsListCall { 11163 c.urlParams_.Set("type", type_) 11164 return c 11165} 11166 11167// Fields allows partial responses to be retrieved. See 11168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11169// for more information. 11170func (c *OrganizationsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDlpJobsListCall { 11171 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11172 return c 11173} 11174 11175// IfNoneMatch sets the optional parameter which makes the operation 11176// fail if the object's ETag matches the given value. This is useful for 11177// getting updates only after the object has changed since the last 11178// request. Use googleapi.IsNotModified to check whether the response 11179// error from Do is the result of In-None-Match. 11180func (c *OrganizationsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDlpJobsListCall { 11181 c.ifNoneMatch_ = entityTag 11182 return c 11183} 11184 11185// Context sets the context to be used in this call's Do method. Any 11186// pending HTTP request will be aborted if the provided context is 11187// canceled. 11188func (c *OrganizationsLocationsDlpJobsListCall) Context(ctx context.Context) *OrganizationsLocationsDlpJobsListCall { 11189 c.ctx_ = ctx 11190 return c 11191} 11192 11193// Header returns an http.Header that can be modified by the caller to 11194// add HTTP headers to the request. 11195func (c *OrganizationsLocationsDlpJobsListCall) Header() http.Header { 11196 if c.header_ == nil { 11197 c.header_ = make(http.Header) 11198 } 11199 return c.header_ 11200} 11201 11202func (c *OrganizationsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 11203 reqHeaders := make(http.Header) 11204 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 11205 for k, v := range c.header_ { 11206 reqHeaders[k] = v 11207 } 11208 reqHeaders.Set("User-Agent", c.s.userAgent()) 11209 if c.ifNoneMatch_ != "" { 11210 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11211 } 11212 var body io.Reader = nil 11213 c.urlParams_.Set("alt", alt) 11214 c.urlParams_.Set("prettyPrint", "false") 11215 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 11216 urls += "?" + c.urlParams_.Encode() 11217 req, err := http.NewRequest("GET", urls, body) 11218 if err != nil { 11219 return nil, err 11220 } 11221 req.Header = reqHeaders 11222 googleapi.Expand(req.URL, map[string]string{ 11223 "parent": c.parentid, 11224 }) 11225 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11226} 11227 11228// Do executes the "dlp.organizations.locations.dlpJobs.list" call. 11229// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 11230// be non-nil. Any non-2xx status code is an error. Response headers are 11231// in either 11232// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 11233// response was returned at all) in error.(*googleapi.Error).Header. Use 11234// googleapi.IsNotModified to check whether the returned error was 11235// because http.StatusNotModified was returned. 11236func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 11237 gensupport.SetOptions(c.urlParams_, opts...) 11238 res, err := c.doRequest("json") 11239 if res != nil && res.StatusCode == http.StatusNotModified { 11240 if res.Body != nil { 11241 res.Body.Close() 11242 } 11243 return nil, &googleapi.Error{ 11244 Code: res.StatusCode, 11245 Header: res.Header, 11246 } 11247 } 11248 if err != nil { 11249 return nil, err 11250 } 11251 defer googleapi.CloseBody(res) 11252 if err := googleapi.CheckResponse(res); err != nil { 11253 return nil, err 11254 } 11255 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 11256 ServerResponse: googleapi.ServerResponse{ 11257 Header: res.Header, 11258 HTTPStatusCode: res.StatusCode, 11259 }, 11260 } 11261 target := &ret 11262 if err := gensupport.DecodeResponse(target, res); err != nil { 11263 return nil, err 11264 } 11265 return ret, nil 11266 // { 11267 // "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.", 11268 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/dlpJobs", 11269 // "httpMethod": "GET", 11270 // "id": "dlp.organizations.locations.dlpJobs.list", 11271 // "parameterOrder": [ 11272 // "parent" 11273 // ], 11274 // "parameters": { 11275 // "filter": { 11276 // "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.", 11277 // "location": "query", 11278 // "type": "string" 11279 // }, 11280 // "locationId": { 11281 // "description": "Deprecated. This field has no effect.", 11282 // "location": "query", 11283 // "type": "string" 11284 // }, 11285 // "orderBy": { 11286 // "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`", 11287 // "location": "query", 11288 // "type": "string" 11289 // }, 11290 // "pageSize": { 11291 // "description": "The standard list page size.", 11292 // "format": "int32", 11293 // "location": "query", 11294 // "type": "integer" 11295 // }, 11296 // "pageToken": { 11297 // "description": "The standard list page token.", 11298 // "location": "query", 11299 // "type": "string" 11300 // }, 11301 // "parent": { 11302 // "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", 11303 // "location": "path", 11304 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11305 // "required": true, 11306 // "type": "string" 11307 // }, 11308 // "type": { 11309 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 11310 // "enum": [ 11311 // "DLP_JOB_TYPE_UNSPECIFIED", 11312 // "INSPECT_JOB", 11313 // "RISK_ANALYSIS_JOB" 11314 // ], 11315 // "enumDescriptions": [ 11316 // "Defaults to INSPECT_JOB.", 11317 // "The job inspected Google Cloud for sensitive data.", 11318 // "The job executed a Risk Analysis computation." 11319 // ], 11320 // "location": "query", 11321 // "type": "string" 11322 // } 11323 // }, 11324 // "path": "v2/{+parent}/dlpJobs", 11325 // "response": { 11326 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 11327 // }, 11328 // "scopes": [ 11329 // "https://www.googleapis.com/auth/cloud-platform" 11330 // ] 11331 // } 11332 11333} 11334 11335// Pages invokes f for each page of results. 11336// A non-nil error returned from f will halt the iteration. 11337// The provided context supersedes any context provided to the Context method. 11338func (c *OrganizationsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 11339 c.ctx_ = ctx 11340 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11341 for { 11342 x, err := c.Do() 11343 if err != nil { 11344 return err 11345 } 11346 if err := f(x); err != nil { 11347 return err 11348 } 11349 if x.NextPageToken == "" { 11350 return nil 11351 } 11352 c.PageToken(x.NextPageToken) 11353 } 11354} 11355 11356// method id "dlp.organizations.locations.inspectTemplates.create": 11357 11358type OrganizationsLocationsInspectTemplatesCreateCall struct { 11359 s *Service 11360 parentid string 11361 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 11362 urlParams_ gensupport.URLParams 11363 ctx_ context.Context 11364 header_ http.Header 11365} 11366 11367// Create: Creates an InspectTemplate for re-using frequently used 11368// configuration for inspecting content, images, and storage. See 11369// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11370// 11371// - parent: Parent resource name. The format of this value varies 11372// depending on the scope of the request (project or organization) and 11373// whether you have specified a processing location 11374// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 11375// scope, location specified: 11376// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 11377// location specified (defaults to global): `projects/`PROJECT_ID + 11378// Organizations scope, location specified: 11379// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 11380// scope, no location specified (defaults to global): 11381// `organizations/`ORG_ID The following example `parent` string 11382// specifies a parent project with the identifier `example-project`, 11383// and specifies the `europe-west3` location for processing data: 11384// parent=projects/example-project/locations/europe-west3. 11385func (r *OrganizationsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesCreateCall { 11386 c := &OrganizationsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11387 c.parentid = parentid 11388 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 11389 return c 11390} 11391 11392// Fields allows partial responses to be retrieved. See 11393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11394// for more information. 11395func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { 11396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11397 return c 11398} 11399 11400// Context sets the context to be used in this call's Do method. Any 11401// pending HTTP request will be aborted if the provided context is 11402// canceled. 11403func (c *OrganizationsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesCreateCall { 11404 c.ctx_ = ctx 11405 return c 11406} 11407 11408// Header returns an http.Header that can be modified by the caller to 11409// add HTTP headers to the request. 11410func (c *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { 11411 if c.header_ == nil { 11412 c.header_ = make(http.Header) 11413 } 11414 return c.header_ 11415} 11416 11417func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 11418 reqHeaders := make(http.Header) 11419 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 11420 for k, v := range c.header_ { 11421 reqHeaders[k] = v 11422 } 11423 reqHeaders.Set("User-Agent", c.s.userAgent()) 11424 var body io.Reader = nil 11425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 11426 if err != nil { 11427 return nil, err 11428 } 11429 reqHeaders.Set("Content-Type", "application/json") 11430 c.urlParams_.Set("alt", alt) 11431 c.urlParams_.Set("prettyPrint", "false") 11432 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 11433 urls += "?" + c.urlParams_.Encode() 11434 req, err := http.NewRequest("POST", urls, body) 11435 if err != nil { 11436 return nil, err 11437 } 11438 req.Header = reqHeaders 11439 googleapi.Expand(req.URL, map[string]string{ 11440 "parent": c.parentid, 11441 }) 11442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11443} 11444 11445// Do executes the "dlp.organizations.locations.inspectTemplates.create" call. 11446// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11447// non-nil. Any non-2xx status code is an error. Response headers are in 11448// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11449// (if a response was returned at all) in 11450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11451// whether the returned error was because http.StatusNotModified was 11452// returned. 11453func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11454 gensupport.SetOptions(c.urlParams_, opts...) 11455 res, err := c.doRequest("json") 11456 if res != nil && res.StatusCode == http.StatusNotModified { 11457 if res.Body != nil { 11458 res.Body.Close() 11459 } 11460 return nil, &googleapi.Error{ 11461 Code: res.StatusCode, 11462 Header: res.Header, 11463 } 11464 } 11465 if err != nil { 11466 return nil, err 11467 } 11468 defer googleapi.CloseBody(res) 11469 if err := googleapi.CheckResponse(res); err != nil { 11470 return nil, err 11471 } 11472 ret := &GooglePrivacyDlpV2InspectTemplate{ 11473 ServerResponse: googleapi.ServerResponse{ 11474 Header: res.Header, 11475 HTTPStatusCode: res.StatusCode, 11476 }, 11477 } 11478 target := &ret 11479 if err := gensupport.DecodeResponse(target, res); err != nil { 11480 return nil, err 11481 } 11482 return ret, nil 11483 // { 11484 // "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.", 11485 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 11486 // "httpMethod": "POST", 11487 // "id": "dlp.organizations.locations.inspectTemplates.create", 11488 // "parameterOrder": [ 11489 // "parent" 11490 // ], 11491 // "parameters": { 11492 // "parent": { 11493 // "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", 11494 // "location": "path", 11495 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11496 // "required": true, 11497 // "type": "string" 11498 // } 11499 // }, 11500 // "path": "v2/{+parent}/inspectTemplates", 11501 // "request": { 11502 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 11503 // }, 11504 // "response": { 11505 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11506 // }, 11507 // "scopes": [ 11508 // "https://www.googleapis.com/auth/cloud-platform" 11509 // ] 11510 // } 11511 11512} 11513 11514// method id "dlp.organizations.locations.inspectTemplates.delete": 11515 11516type OrganizationsLocationsInspectTemplatesDeleteCall struct { 11517 s *Service 11518 name string 11519 urlParams_ gensupport.URLParams 11520 ctx_ context.Context 11521 header_ http.Header 11522} 11523 11524// Delete: Deletes an InspectTemplate. See 11525// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11526// 11527// - name: Resource name of the organization and inspectTemplate to be 11528// deleted, for example 11529// `organizations/433245324/inspectTemplates/432452342` or 11530// projects/project-id/inspectTemplates/432452342. 11531func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *OrganizationsLocationsInspectTemplatesDeleteCall { 11532 c := &OrganizationsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11533 c.name = name 11534 return c 11535} 11536 11537// Fields allows partial responses to be retrieved. See 11538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11539// for more information. 11540func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { 11541 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11542 return c 11543} 11544 11545// Context sets the context to be used in this call's Do method. Any 11546// pending HTTP request will be aborted if the provided context is 11547// canceled. 11548func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { 11549 c.ctx_ = ctx 11550 return c 11551} 11552 11553// Header returns an http.Header that can be modified by the caller to 11554// add HTTP headers to the request. 11555func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { 11556 if c.header_ == nil { 11557 c.header_ = make(http.Header) 11558 } 11559 return c.header_ 11560} 11561 11562func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 11563 reqHeaders := make(http.Header) 11564 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 11565 for k, v := range c.header_ { 11566 reqHeaders[k] = v 11567 } 11568 reqHeaders.Set("User-Agent", c.s.userAgent()) 11569 var body io.Reader = nil 11570 c.urlParams_.Set("alt", alt) 11571 c.urlParams_.Set("prettyPrint", "false") 11572 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11573 urls += "?" + c.urlParams_.Encode() 11574 req, err := http.NewRequest("DELETE", urls, body) 11575 if err != nil { 11576 return nil, err 11577 } 11578 req.Header = reqHeaders 11579 googleapi.Expand(req.URL, map[string]string{ 11580 "name": c.name, 11581 }) 11582 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11583} 11584 11585// Do executes the "dlp.organizations.locations.inspectTemplates.delete" call. 11586// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11587// non-2xx status code is an error. Response headers are in either 11588// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11589// returned at all) in error.(*googleapi.Error).Header. Use 11590// googleapi.IsNotModified to check whether the returned error was 11591// because http.StatusNotModified was returned. 11592func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11593 gensupport.SetOptions(c.urlParams_, opts...) 11594 res, err := c.doRequest("json") 11595 if res != nil && res.StatusCode == http.StatusNotModified { 11596 if res.Body != nil { 11597 res.Body.Close() 11598 } 11599 return nil, &googleapi.Error{ 11600 Code: res.StatusCode, 11601 Header: res.Header, 11602 } 11603 } 11604 if err != nil { 11605 return nil, err 11606 } 11607 defer googleapi.CloseBody(res) 11608 if err := googleapi.CheckResponse(res); err != nil { 11609 return nil, err 11610 } 11611 ret := &GoogleProtobufEmpty{ 11612 ServerResponse: googleapi.ServerResponse{ 11613 Header: res.Header, 11614 HTTPStatusCode: res.StatusCode, 11615 }, 11616 } 11617 target := &ret 11618 if err := gensupport.DecodeResponse(target, res); err != nil { 11619 return nil, err 11620 } 11621 return ret, nil 11622 // { 11623 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11624 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11625 // "httpMethod": "DELETE", 11626 // "id": "dlp.organizations.locations.inspectTemplates.delete", 11627 // "parameterOrder": [ 11628 // "name" 11629 // ], 11630 // "parameters": { 11631 // "name": { 11632 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11633 // "location": "path", 11634 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11635 // "required": true, 11636 // "type": "string" 11637 // } 11638 // }, 11639 // "path": "v2/{+name}", 11640 // "response": { 11641 // "$ref": "GoogleProtobufEmpty" 11642 // }, 11643 // "scopes": [ 11644 // "https://www.googleapis.com/auth/cloud-platform" 11645 // ] 11646 // } 11647 11648} 11649 11650// method id "dlp.organizations.locations.inspectTemplates.get": 11651 11652type OrganizationsLocationsInspectTemplatesGetCall struct { 11653 s *Service 11654 name string 11655 urlParams_ gensupport.URLParams 11656 ifNoneMatch_ string 11657 ctx_ context.Context 11658 header_ http.Header 11659} 11660 11661// Get: Gets an InspectTemplate. See 11662// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11663// 11664// - name: Resource name of the organization and inspectTemplate to be 11665// read, for example 11666// `organizations/433245324/inspectTemplates/432452342` or 11667// projects/project-id/inspectTemplates/432452342. 11668func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { 11669 c := &OrganizationsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11670 c.name = name 11671 return c 11672} 11673 11674// Fields allows partial responses to be retrieved. See 11675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11676// for more information. 11677func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { 11678 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11679 return c 11680} 11681 11682// IfNoneMatch sets the optional parameter which makes the operation 11683// fail if the object's ETag matches the given value. This is useful for 11684// getting updates only after the object has changed since the last 11685// request. Use googleapi.IsNotModified to check whether the response 11686// error from Do is the result of In-None-Match. 11687func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { 11688 c.ifNoneMatch_ = entityTag 11689 return c 11690} 11691 11692// Context sets the context to be used in this call's Do method. Any 11693// pending HTTP request will be aborted if the provided context is 11694// canceled. 11695func (c *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { 11696 c.ctx_ = ctx 11697 return c 11698} 11699 11700// Header returns an http.Header that can be modified by the caller to 11701// add HTTP headers to the request. 11702func (c *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { 11703 if c.header_ == nil { 11704 c.header_ = make(http.Header) 11705 } 11706 return c.header_ 11707} 11708 11709func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 11710 reqHeaders := make(http.Header) 11711 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 11712 for k, v := range c.header_ { 11713 reqHeaders[k] = v 11714 } 11715 reqHeaders.Set("User-Agent", c.s.userAgent()) 11716 if c.ifNoneMatch_ != "" { 11717 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11718 } 11719 var body io.Reader = nil 11720 c.urlParams_.Set("alt", alt) 11721 c.urlParams_.Set("prettyPrint", "false") 11722 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11723 urls += "?" + c.urlParams_.Encode() 11724 req, err := http.NewRequest("GET", urls, body) 11725 if err != nil { 11726 return nil, err 11727 } 11728 req.Header = reqHeaders 11729 googleapi.Expand(req.URL, map[string]string{ 11730 "name": c.name, 11731 }) 11732 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11733} 11734 11735// Do executes the "dlp.organizations.locations.inspectTemplates.get" call. 11736// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11737// non-nil. Any non-2xx status code is an error. Response headers are in 11738// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11739// (if a response was returned at all) in 11740// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11741// whether the returned error was because http.StatusNotModified was 11742// returned. 11743func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11744 gensupport.SetOptions(c.urlParams_, opts...) 11745 res, err := c.doRequest("json") 11746 if res != nil && res.StatusCode == http.StatusNotModified { 11747 if res.Body != nil { 11748 res.Body.Close() 11749 } 11750 return nil, &googleapi.Error{ 11751 Code: res.StatusCode, 11752 Header: res.Header, 11753 } 11754 } 11755 if err != nil { 11756 return nil, err 11757 } 11758 defer googleapi.CloseBody(res) 11759 if err := googleapi.CheckResponse(res); err != nil { 11760 return nil, err 11761 } 11762 ret := &GooglePrivacyDlpV2InspectTemplate{ 11763 ServerResponse: googleapi.ServerResponse{ 11764 Header: res.Header, 11765 HTTPStatusCode: res.StatusCode, 11766 }, 11767 } 11768 target := &ret 11769 if err := gensupport.DecodeResponse(target, res); err != nil { 11770 return nil, err 11771 } 11772 return ret, nil 11773 // { 11774 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11775 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11776 // "httpMethod": "GET", 11777 // "id": "dlp.organizations.locations.inspectTemplates.get", 11778 // "parameterOrder": [ 11779 // "name" 11780 // ], 11781 // "parameters": { 11782 // "name": { 11783 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11784 // "location": "path", 11785 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11786 // "required": true, 11787 // "type": "string" 11788 // } 11789 // }, 11790 // "path": "v2/{+name}", 11791 // "response": { 11792 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11793 // }, 11794 // "scopes": [ 11795 // "https://www.googleapis.com/auth/cloud-platform" 11796 // ] 11797 // } 11798 11799} 11800 11801// method id "dlp.organizations.locations.inspectTemplates.list": 11802 11803type OrganizationsLocationsInspectTemplatesListCall struct { 11804 s *Service 11805 parentid string 11806 urlParams_ gensupport.URLParams 11807 ifNoneMatch_ string 11808 ctx_ context.Context 11809 header_ http.Header 11810} 11811 11812// List: Lists InspectTemplates. See 11813// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11814// 11815// - parent: Parent resource name. The format of this value varies 11816// depending on the scope of the request (project or organization) and 11817// whether you have specified a processing location 11818// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 11819// scope, location specified: 11820// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 11821// location specified (defaults to global): `projects/`PROJECT_ID + 11822// Organizations scope, location specified: 11823// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 11824// scope, no location specified (defaults to global): 11825// `organizations/`ORG_ID The following example `parent` string 11826// specifies a parent project with the identifier `example-project`, 11827// and specifies the `europe-west3` location for processing data: 11828// parent=projects/example-project/locations/europe-west3. 11829func (r *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { 11830 c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11831 c.parentid = parentid 11832 return c 11833} 11834 11835// LocationId sets the optional parameter "locationId": Deprecated. This 11836// field has no effect. 11837func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsInspectTemplatesListCall { 11838 c.urlParams_.Set("locationId", locationId) 11839 return c 11840} 11841 11842// OrderBy sets the optional parameter "orderBy": Comma separated list 11843// of fields to order by, followed by `asc` or `desc` postfix. This list 11844// is case-insensitive, default sorting order is ascending, redundant 11845// space characters are insignificant. Example: `name asc,update_time, 11846// create_time desc` Supported fields are: - `create_time`: corresponds 11847// to time the template was created. - `update_time`: corresponds to 11848// time the template was last updated. - `name`: corresponds to 11849// template's name. - `display_name`: corresponds to template's display 11850// name. 11851func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { 11852 c.urlParams_.Set("orderBy", orderBy) 11853 return c 11854} 11855 11856// PageSize sets the optional parameter "pageSize": Size of the page, 11857// can be limited by server. If zero server returns a page of max size 11858// 100. 11859func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { 11860 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11861 return c 11862} 11863 11864// PageToken sets the optional parameter "pageToken": Page token to 11865// continue retrieval. Comes from previous call to 11866// `ListInspectTemplates`. 11867func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { 11868 c.urlParams_.Set("pageToken", pageToken) 11869 return c 11870} 11871 11872// Fields allows partial responses to be retrieved. See 11873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11874// for more information. 11875func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesListCall { 11876 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11877 return c 11878} 11879 11880// IfNoneMatch sets the optional parameter which makes the operation 11881// fail if the object's ETag matches the given value. This is useful for 11882// getting updates only after the object has changed since the last 11883// request. Use googleapi.IsNotModified to check whether the response 11884// error from Do is the result of In-None-Match. 11885func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesListCall { 11886 c.ifNoneMatch_ = entityTag 11887 return c 11888} 11889 11890// Context sets the context to be used in this call's Do method. Any 11891// pending HTTP request will be aborted if the provided context is 11892// canceled. 11893func (c *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { 11894 c.ctx_ = ctx 11895 return c 11896} 11897 11898// Header returns an http.Header that can be modified by the caller to 11899// add HTTP headers to the request. 11900func (c *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { 11901 if c.header_ == nil { 11902 c.header_ = make(http.Header) 11903 } 11904 return c.header_ 11905} 11906 11907func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 11908 reqHeaders := make(http.Header) 11909 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 11910 for k, v := range c.header_ { 11911 reqHeaders[k] = v 11912 } 11913 reqHeaders.Set("User-Agent", c.s.userAgent()) 11914 if c.ifNoneMatch_ != "" { 11915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11916 } 11917 var body io.Reader = nil 11918 c.urlParams_.Set("alt", alt) 11919 c.urlParams_.Set("prettyPrint", "false") 11920 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 11921 urls += "?" + c.urlParams_.Encode() 11922 req, err := http.NewRequest("GET", urls, body) 11923 if err != nil { 11924 return nil, err 11925 } 11926 req.Header = reqHeaders 11927 googleapi.Expand(req.URL, map[string]string{ 11928 "parent": c.parentid, 11929 }) 11930 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11931} 11932 11933// Do executes the "dlp.organizations.locations.inspectTemplates.list" call. 11934// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 11935// error will be non-nil. Any non-2xx status code is an error. Response 11936// headers are in either 11937// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 11938// or (if a response was returned at all) in 11939// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11940// whether the returned error was because http.StatusNotModified was 11941// returned. 11942func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 11943 gensupport.SetOptions(c.urlParams_, opts...) 11944 res, err := c.doRequest("json") 11945 if res != nil && res.StatusCode == http.StatusNotModified { 11946 if res.Body != nil { 11947 res.Body.Close() 11948 } 11949 return nil, &googleapi.Error{ 11950 Code: res.StatusCode, 11951 Header: res.Header, 11952 } 11953 } 11954 if err != nil { 11955 return nil, err 11956 } 11957 defer googleapi.CloseBody(res) 11958 if err := googleapi.CheckResponse(res); err != nil { 11959 return nil, err 11960 } 11961 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 11962 ServerResponse: googleapi.ServerResponse{ 11963 Header: res.Header, 11964 HTTPStatusCode: res.StatusCode, 11965 }, 11966 } 11967 target := &ret 11968 if err := gensupport.DecodeResponse(target, res); err != nil { 11969 return nil, err 11970 } 11971 return ret, nil 11972 // { 11973 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11974 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 11975 // "httpMethod": "GET", 11976 // "id": "dlp.organizations.locations.inspectTemplates.list", 11977 // "parameterOrder": [ 11978 // "parent" 11979 // ], 11980 // "parameters": { 11981 // "locationId": { 11982 // "description": "Deprecated. This field has no effect.", 11983 // "location": "query", 11984 // "type": "string" 11985 // }, 11986 // "orderBy": { 11987 // "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.", 11988 // "location": "query", 11989 // "type": "string" 11990 // }, 11991 // "pageSize": { 11992 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 11993 // "format": "int32", 11994 // "location": "query", 11995 // "type": "integer" 11996 // }, 11997 // "pageToken": { 11998 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 11999 // "location": "query", 12000 // "type": "string" 12001 // }, 12002 // "parent": { 12003 // "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", 12004 // "location": "path", 12005 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 12006 // "required": true, 12007 // "type": "string" 12008 // } 12009 // }, 12010 // "path": "v2/{+parent}/inspectTemplates", 12011 // "response": { 12012 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 12013 // }, 12014 // "scopes": [ 12015 // "https://www.googleapis.com/auth/cloud-platform" 12016 // ] 12017 // } 12018 12019} 12020 12021// Pages invokes f for each page of results. 12022// A non-nil error returned from f will halt the iteration. 12023// The provided context supersedes any context provided to the Context method. 12024func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 12025 c.ctx_ = ctx 12026 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12027 for { 12028 x, err := c.Do() 12029 if err != nil { 12030 return err 12031 } 12032 if err := f(x); err != nil { 12033 return err 12034 } 12035 if x.NextPageToken == "" { 12036 return nil 12037 } 12038 c.PageToken(x.NextPageToken) 12039 } 12040} 12041 12042// method id "dlp.organizations.locations.inspectTemplates.patch": 12043 12044type OrganizationsLocationsInspectTemplatesPatchCall struct { 12045 s *Service 12046 name string 12047 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 12048 urlParams_ gensupport.URLParams 12049 ctx_ context.Context 12050 header_ http.Header 12051} 12052 12053// Patch: Updates the InspectTemplate. See 12054// https://cloud.google.com/dlp/docs/creating-templates to learn more. 12055// 12056// - name: Resource name of organization and inspectTemplate to be 12057// updated, for example 12058// `organizations/433245324/inspectTemplates/432452342` or 12059// projects/project-id/inspectTemplates/432452342. 12060func (r *OrganizationsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { 12061 c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12062 c.name = name 12063 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 12064 return c 12065} 12066 12067// Fields allows partial responses to be retrieved. See 12068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12069// for more information. 12070func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { 12071 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12072 return c 12073} 12074 12075// Context sets the context to be used in this call's Do method. Any 12076// pending HTTP request will be aborted if the provided context is 12077// canceled. 12078func (c *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { 12079 c.ctx_ = ctx 12080 return c 12081} 12082 12083// Header returns an http.Header that can be modified by the caller to 12084// add HTTP headers to the request. 12085func (c *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { 12086 if c.header_ == nil { 12087 c.header_ = make(http.Header) 12088 } 12089 return c.header_ 12090} 12091 12092func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 12093 reqHeaders := make(http.Header) 12094 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12095 for k, v := range c.header_ { 12096 reqHeaders[k] = v 12097 } 12098 reqHeaders.Set("User-Agent", c.s.userAgent()) 12099 var body io.Reader = nil 12100 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 12101 if err != nil { 12102 return nil, err 12103 } 12104 reqHeaders.Set("Content-Type", "application/json") 12105 c.urlParams_.Set("alt", alt) 12106 c.urlParams_.Set("prettyPrint", "false") 12107 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12108 urls += "?" + c.urlParams_.Encode() 12109 req, err := http.NewRequest("PATCH", urls, body) 12110 if err != nil { 12111 return nil, err 12112 } 12113 req.Header = reqHeaders 12114 googleapi.Expand(req.URL, map[string]string{ 12115 "name": c.name, 12116 }) 12117 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12118} 12119 12120// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. 12121// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 12122// non-nil. Any non-2xx status code is an error. Response headers are in 12123// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 12124// (if a response was returned at all) in 12125// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12126// whether the returned error was because http.StatusNotModified was 12127// returned. 12128func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 12129 gensupport.SetOptions(c.urlParams_, opts...) 12130 res, err := c.doRequest("json") 12131 if res != nil && res.StatusCode == http.StatusNotModified { 12132 if res.Body != nil { 12133 res.Body.Close() 12134 } 12135 return nil, &googleapi.Error{ 12136 Code: res.StatusCode, 12137 Header: res.Header, 12138 } 12139 } 12140 if err != nil { 12141 return nil, err 12142 } 12143 defer googleapi.CloseBody(res) 12144 if err := googleapi.CheckResponse(res); err != nil { 12145 return nil, err 12146 } 12147 ret := &GooglePrivacyDlpV2InspectTemplate{ 12148 ServerResponse: googleapi.ServerResponse{ 12149 Header: res.Header, 12150 HTTPStatusCode: res.StatusCode, 12151 }, 12152 } 12153 target := &ret 12154 if err := gensupport.DecodeResponse(target, res); err != nil { 12155 return nil, err 12156 } 12157 return ret, nil 12158 // { 12159 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 12160 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 12161 // "httpMethod": "PATCH", 12162 // "id": "dlp.organizations.locations.inspectTemplates.patch", 12163 // "parameterOrder": [ 12164 // "name" 12165 // ], 12166 // "parameters": { 12167 // "name": { 12168 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 12169 // "location": "path", 12170 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 12171 // "required": true, 12172 // "type": "string" 12173 // } 12174 // }, 12175 // "path": "v2/{+name}", 12176 // "request": { 12177 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 12178 // }, 12179 // "response": { 12180 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 12181 // }, 12182 // "scopes": [ 12183 // "https://www.googleapis.com/auth/cloud-platform" 12184 // ] 12185 // } 12186 12187} 12188 12189// method id "dlp.organizations.locations.jobTriggers.create": 12190 12191type OrganizationsLocationsJobTriggersCreateCall struct { 12192 s *Service 12193 parentid string 12194 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 12195 urlParams_ gensupport.URLParams 12196 ctx_ context.Context 12197 header_ http.Header 12198} 12199 12200// Create: Creates a job trigger to run DLP actions such as scanning 12201// storage for sensitive information on a set schedule. See 12202// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 12203// more. 12204// 12205// - parent: Parent resource name. The format of this value varies 12206// depending on whether you have specified a processing location 12207// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 12208// scope, location specified: 12209// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 12210// location specified (defaults to global): `projects/`PROJECT_ID The 12211// following example `parent` string specifies a parent project with 12212// the identifier `example-project`, and specifies the `europe-west3` 12213// location for processing data: 12214// parent=projects/example-project/locations/europe-west3. 12215func (r *OrganizationsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *OrganizationsLocationsJobTriggersCreateCall { 12216 c := &OrganizationsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12217 c.parentid = parentid 12218 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 12219 return c 12220} 12221 12222// Fields allows partial responses to be retrieved. See 12223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12224// for more information. 12225func (c *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersCreateCall { 12226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12227 return c 12228} 12229 12230// Context sets the context to be used in this call's Do method. Any 12231// pending HTTP request will be aborted if the provided context is 12232// canceled. 12233func (c *OrganizationsLocationsJobTriggersCreateCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersCreateCall { 12234 c.ctx_ = ctx 12235 return c 12236} 12237 12238// Header returns an http.Header that can be modified by the caller to 12239// add HTTP headers to the request. 12240func (c *OrganizationsLocationsJobTriggersCreateCall) Header() http.Header { 12241 if c.header_ == nil { 12242 c.header_ = make(http.Header) 12243 } 12244 return c.header_ 12245} 12246 12247func (c *OrganizationsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 12248 reqHeaders := make(http.Header) 12249 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12250 for k, v := range c.header_ { 12251 reqHeaders[k] = v 12252 } 12253 reqHeaders.Set("User-Agent", c.s.userAgent()) 12254 var body io.Reader = nil 12255 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 12256 if err != nil { 12257 return nil, err 12258 } 12259 reqHeaders.Set("Content-Type", "application/json") 12260 c.urlParams_.Set("alt", alt) 12261 c.urlParams_.Set("prettyPrint", "false") 12262 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 12263 urls += "?" + c.urlParams_.Encode() 12264 req, err := http.NewRequest("POST", urls, body) 12265 if err != nil { 12266 return nil, err 12267 } 12268 req.Header = reqHeaders 12269 googleapi.Expand(req.URL, map[string]string{ 12270 "parent": c.parentid, 12271 }) 12272 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12273} 12274 12275// Do executes the "dlp.organizations.locations.jobTriggers.create" call. 12276// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 12277// non-nil. Any non-2xx status code is an error. Response headers are in 12278// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 12279// response was returned at all) in error.(*googleapi.Error).Header. Use 12280// googleapi.IsNotModified to check whether the returned error was 12281// because http.StatusNotModified was returned. 12282func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 12283 gensupport.SetOptions(c.urlParams_, opts...) 12284 res, err := c.doRequest("json") 12285 if res != nil && res.StatusCode == http.StatusNotModified { 12286 if res.Body != nil { 12287 res.Body.Close() 12288 } 12289 return nil, &googleapi.Error{ 12290 Code: res.StatusCode, 12291 Header: res.Header, 12292 } 12293 } 12294 if err != nil { 12295 return nil, err 12296 } 12297 defer googleapi.CloseBody(res) 12298 if err := googleapi.CheckResponse(res); err != nil { 12299 return nil, err 12300 } 12301 ret := &GooglePrivacyDlpV2JobTrigger{ 12302 ServerResponse: googleapi.ServerResponse{ 12303 Header: res.Header, 12304 HTTPStatusCode: res.StatusCode, 12305 }, 12306 } 12307 target := &ret 12308 if err := gensupport.DecodeResponse(target, res); err != nil { 12309 return nil, err 12310 } 12311 return ret, nil 12312 // { 12313 // "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.", 12314 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", 12315 // "httpMethod": "POST", 12316 // "id": "dlp.organizations.locations.jobTriggers.create", 12317 // "parameterOrder": [ 12318 // "parent" 12319 // ], 12320 // "parameters": { 12321 // "parent": { 12322 // "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", 12323 // "location": "path", 12324 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 12325 // "required": true, 12326 // "type": "string" 12327 // } 12328 // }, 12329 // "path": "v2/{+parent}/jobTriggers", 12330 // "request": { 12331 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 12332 // }, 12333 // "response": { 12334 // "$ref": "GooglePrivacyDlpV2JobTrigger" 12335 // }, 12336 // "scopes": [ 12337 // "https://www.googleapis.com/auth/cloud-platform" 12338 // ] 12339 // } 12340 12341} 12342 12343// method id "dlp.organizations.locations.jobTriggers.delete": 12344 12345type OrganizationsLocationsJobTriggersDeleteCall struct { 12346 s *Service 12347 name string 12348 urlParams_ gensupport.URLParams 12349 ctx_ context.Context 12350 header_ http.Header 12351} 12352 12353// Delete: Deletes a job trigger. See 12354// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 12355// more. 12356// 12357// - name: Resource name of the project and the triggeredJob, for 12358// example `projects/dlp-test-project/jobTriggers/53234423`. 12359func (r *OrganizationsLocationsJobTriggersService) Delete(name string) *OrganizationsLocationsJobTriggersDeleteCall { 12360 c := &OrganizationsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12361 c.name = name 12362 return c 12363} 12364 12365// Fields allows partial responses to be retrieved. See 12366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12367// for more information. 12368func (c *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersDeleteCall { 12369 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12370 return c 12371} 12372 12373// Context sets the context to be used in this call's Do method. Any 12374// pending HTTP request will be aborted if the provided context is 12375// canceled. 12376func (c *OrganizationsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersDeleteCall { 12377 c.ctx_ = ctx 12378 return c 12379} 12380 12381// Header returns an http.Header that can be modified by the caller to 12382// add HTTP headers to the request. 12383func (c *OrganizationsLocationsJobTriggersDeleteCall) Header() http.Header { 12384 if c.header_ == nil { 12385 c.header_ = make(http.Header) 12386 } 12387 return c.header_ 12388} 12389 12390func (c *OrganizationsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 12391 reqHeaders := make(http.Header) 12392 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12393 for k, v := range c.header_ { 12394 reqHeaders[k] = v 12395 } 12396 reqHeaders.Set("User-Agent", c.s.userAgent()) 12397 var body io.Reader = nil 12398 c.urlParams_.Set("alt", alt) 12399 c.urlParams_.Set("prettyPrint", "false") 12400 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12401 urls += "?" + c.urlParams_.Encode() 12402 req, err := http.NewRequest("DELETE", urls, body) 12403 if err != nil { 12404 return nil, err 12405 } 12406 req.Header = reqHeaders 12407 googleapi.Expand(req.URL, map[string]string{ 12408 "name": c.name, 12409 }) 12410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12411} 12412 12413// Do executes the "dlp.organizations.locations.jobTriggers.delete" call. 12414// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12415// non-2xx status code is an error. Response headers are in either 12416// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12417// returned at all) in error.(*googleapi.Error).Header. Use 12418// googleapi.IsNotModified to check whether the returned error was 12419// because http.StatusNotModified was returned. 12420func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12421 gensupport.SetOptions(c.urlParams_, opts...) 12422 res, err := c.doRequest("json") 12423 if res != nil && res.StatusCode == http.StatusNotModified { 12424 if res.Body != nil { 12425 res.Body.Close() 12426 } 12427 return nil, &googleapi.Error{ 12428 Code: res.StatusCode, 12429 Header: res.Header, 12430 } 12431 } 12432 if err != nil { 12433 return nil, err 12434 } 12435 defer googleapi.CloseBody(res) 12436 if err := googleapi.CheckResponse(res); err != nil { 12437 return nil, err 12438 } 12439 ret := &GoogleProtobufEmpty{ 12440 ServerResponse: googleapi.ServerResponse{ 12441 Header: res.Header, 12442 HTTPStatusCode: res.StatusCode, 12443 }, 12444 } 12445 target := &ret 12446 if err := gensupport.DecodeResponse(target, res); err != nil { 12447 return nil, err 12448 } 12449 return ret, nil 12450 // { 12451 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 12452 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 12453 // "httpMethod": "DELETE", 12454 // "id": "dlp.organizations.locations.jobTriggers.delete", 12455 // "parameterOrder": [ 12456 // "name" 12457 // ], 12458 // "parameters": { 12459 // "name": { 12460 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 12461 // "location": "path", 12462 // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 12463 // "required": true, 12464 // "type": "string" 12465 // } 12466 // }, 12467 // "path": "v2/{+name}", 12468 // "response": { 12469 // "$ref": "GoogleProtobufEmpty" 12470 // }, 12471 // "scopes": [ 12472 // "https://www.googleapis.com/auth/cloud-platform" 12473 // ] 12474 // } 12475 12476} 12477 12478// method id "dlp.organizations.locations.jobTriggers.get": 12479 12480type OrganizationsLocationsJobTriggersGetCall struct { 12481 s *Service 12482 name string 12483 urlParams_ gensupport.URLParams 12484 ifNoneMatch_ string 12485 ctx_ context.Context 12486 header_ http.Header 12487} 12488 12489// Get: Gets a job trigger. See 12490// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 12491// more. 12492// 12493// - name: Resource name of the project and the triggeredJob, for 12494// example `projects/dlp-test-project/jobTriggers/53234423`. 12495func (r *OrganizationsLocationsJobTriggersService) Get(name string) *OrganizationsLocationsJobTriggersGetCall { 12496 c := &OrganizationsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12497 c.name = name 12498 return c 12499} 12500 12501// Fields allows partial responses to be retrieved. See 12502// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12503// for more information. 12504func (c *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersGetCall { 12505 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12506 return c 12507} 12508 12509// IfNoneMatch sets the optional parameter which makes the operation 12510// fail if the object's ETag matches the given value. This is useful for 12511// getting updates only after the object has changed since the last 12512// request. Use googleapi.IsNotModified to check whether the response 12513// error from Do is the result of In-None-Match. 12514func (c *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersGetCall { 12515 c.ifNoneMatch_ = entityTag 12516 return c 12517} 12518 12519// Context sets the context to be used in this call's Do method. Any 12520// pending HTTP request will be aborted if the provided context is 12521// canceled. 12522func (c *OrganizationsLocationsJobTriggersGetCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersGetCall { 12523 c.ctx_ = ctx 12524 return c 12525} 12526 12527// Header returns an http.Header that can be modified by the caller to 12528// add HTTP headers to the request. 12529func (c *OrganizationsLocationsJobTriggersGetCall) Header() http.Header { 12530 if c.header_ == nil { 12531 c.header_ = make(http.Header) 12532 } 12533 return c.header_ 12534} 12535 12536func (c *OrganizationsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 12537 reqHeaders := make(http.Header) 12538 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12539 for k, v := range c.header_ { 12540 reqHeaders[k] = v 12541 } 12542 reqHeaders.Set("User-Agent", c.s.userAgent()) 12543 if c.ifNoneMatch_ != "" { 12544 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12545 } 12546 var body io.Reader = nil 12547 c.urlParams_.Set("alt", alt) 12548 c.urlParams_.Set("prettyPrint", "false") 12549 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12550 urls += "?" + c.urlParams_.Encode() 12551 req, err := http.NewRequest("GET", urls, body) 12552 if err != nil { 12553 return nil, err 12554 } 12555 req.Header = reqHeaders 12556 googleapi.Expand(req.URL, map[string]string{ 12557 "name": c.name, 12558 }) 12559 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12560} 12561 12562// Do executes the "dlp.organizations.locations.jobTriggers.get" call. 12563// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 12564// non-nil. Any non-2xx status code is an error. Response headers are in 12565// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 12566// response was returned at all) in error.(*googleapi.Error).Header. Use 12567// googleapi.IsNotModified to check whether the returned error was 12568// because http.StatusNotModified was returned. 12569func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 12570 gensupport.SetOptions(c.urlParams_, opts...) 12571 res, err := c.doRequest("json") 12572 if res != nil && res.StatusCode == http.StatusNotModified { 12573 if res.Body != nil { 12574 res.Body.Close() 12575 } 12576 return nil, &googleapi.Error{ 12577 Code: res.StatusCode, 12578 Header: res.Header, 12579 } 12580 } 12581 if err != nil { 12582 return nil, err 12583 } 12584 defer googleapi.CloseBody(res) 12585 if err := googleapi.CheckResponse(res); err != nil { 12586 return nil, err 12587 } 12588 ret := &GooglePrivacyDlpV2JobTrigger{ 12589 ServerResponse: googleapi.ServerResponse{ 12590 Header: res.Header, 12591 HTTPStatusCode: res.StatusCode, 12592 }, 12593 } 12594 target := &ret 12595 if err := gensupport.DecodeResponse(target, res); err != nil { 12596 return nil, err 12597 } 12598 return ret, nil 12599 // { 12600 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 12601 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 12602 // "httpMethod": "GET", 12603 // "id": "dlp.organizations.locations.jobTriggers.get", 12604 // "parameterOrder": [ 12605 // "name" 12606 // ], 12607 // "parameters": { 12608 // "name": { 12609 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 12610 // "location": "path", 12611 // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 12612 // "required": true, 12613 // "type": "string" 12614 // } 12615 // }, 12616 // "path": "v2/{+name}", 12617 // "response": { 12618 // "$ref": "GooglePrivacyDlpV2JobTrigger" 12619 // }, 12620 // "scopes": [ 12621 // "https://www.googleapis.com/auth/cloud-platform" 12622 // ] 12623 // } 12624 12625} 12626 12627// method id "dlp.organizations.locations.jobTriggers.list": 12628 12629type OrganizationsLocationsJobTriggersListCall struct { 12630 s *Service 12631 parentid string 12632 urlParams_ gensupport.URLParams 12633 ifNoneMatch_ string 12634 ctx_ context.Context 12635 header_ http.Header 12636} 12637 12638// List: Lists job triggers. See 12639// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 12640// more. 12641// 12642// - parent: Parent resource name. The format of this value varies 12643// depending on whether you have specified a processing location 12644// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 12645// scope, location specified: 12646// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 12647// location specified (defaults to global): `projects/`PROJECT_ID The 12648// following example `parent` string specifies a parent project with 12649// the identifier `example-project`, and specifies the `europe-west3` 12650// location for processing data: 12651// parent=projects/example-project/locations/europe-west3. 12652func (r *OrganizationsLocationsJobTriggersService) List(parentid string) *OrganizationsLocationsJobTriggersListCall { 12653 c := &OrganizationsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12654 c.parentid = parentid 12655 return c 12656} 12657 12658// Filter sets the optional parameter "filter": Allows filtering. 12659// Supported syntax: * Filter expressions are made up of one or more 12660// restrictions. * Restrictions can be combined by `AND` or `OR` logical 12661// operators. A sequence of restrictions implicitly uses `AND`. * A 12662// restriction has the form of `{field} {operator} {value}`. * Supported 12663// fields/values for inspect triggers: - `status` - 12664// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - 12665// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 12666// formatted timestamp, surrounded by quotation marks. Nanoseconds are 12667// ignored. - 'error_count' - Number of errors that have occurred while 12668// running. * The operator must be `=` or `!=` for status and 12669// inspected_storage. Examples: * inspected_storage = cloud_storage AND 12670// status = HEALTHY * inspected_storage = cloud_storage OR 12671// inspected_storage = bigquery * inspected_storage = cloud_storage AND 12672// (state = PAUSED OR state = HEALTHY) * last_run_time > 12673// \"2017-12-12T00:00:00+00:00\" The length of this field should be no 12674// more than 500 characters. 12675func (c *OrganizationsLocationsJobTriggersListCall) Filter(filter string) *OrganizationsLocationsJobTriggersListCall { 12676 c.urlParams_.Set("filter", filter) 12677 return c 12678} 12679 12680// LocationId sets the optional parameter "locationId": Deprecated. This 12681// field has no effect. 12682func (c *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string) *OrganizationsLocationsJobTriggersListCall { 12683 c.urlParams_.Set("locationId", locationId) 12684 return c 12685} 12686 12687// OrderBy sets the optional parameter "orderBy": Comma separated list 12688// of triggeredJob fields to order by, followed by `asc` or `desc` 12689// postfix. This list is case-insensitive, default sorting order is 12690// ascending, redundant space characters are insignificant. Example: 12691// `name asc,update_time, create_time desc` Supported fields are: - 12692// `create_time`: corresponds to time the JobTrigger was created. - 12693// `update_time`: corresponds to time the JobTrigger was last updated. - 12694// `last_run_time`: corresponds to the last time the JobTrigger ran. - 12695// `name`: corresponds to JobTrigger's name. - `display_name`: 12696// corresponds to JobTrigger's display name. - `status`: corresponds to 12697// JobTrigger's status. 12698func (c *OrganizationsLocationsJobTriggersListCall) OrderBy(orderBy string) *OrganizationsLocationsJobTriggersListCall { 12699 c.urlParams_.Set("orderBy", orderBy) 12700 return c 12701} 12702 12703// PageSize sets the optional parameter "pageSize": Size of the page, 12704// can be limited by a server. 12705func (c *OrganizationsLocationsJobTriggersListCall) PageSize(pageSize int64) *OrganizationsLocationsJobTriggersListCall { 12706 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12707 return c 12708} 12709 12710// PageToken sets the optional parameter "pageToken": Page token to 12711// continue retrieval. Comes from previous call to ListJobTriggers. 12712// `order_by` field must not change for subsequent calls. 12713func (c *OrganizationsLocationsJobTriggersListCall) PageToken(pageToken string) *OrganizationsLocationsJobTriggersListCall { 12714 c.urlParams_.Set("pageToken", pageToken) 12715 return c 12716} 12717 12718// Type sets the optional parameter "type": The type of jobs. Will use 12719// `DlpJobType.INSPECT` if not set. 12720// 12721// Possible values: 12722// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 12723// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 12724// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 12725func (c *OrganizationsLocationsJobTriggersListCall) Type(type_ string) *OrganizationsLocationsJobTriggersListCall { 12726 c.urlParams_.Set("type", type_) 12727 return c 12728} 12729 12730// Fields allows partial responses to be retrieved. See 12731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12732// for more information. 12733func (c *OrganizationsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersListCall { 12734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12735 return c 12736} 12737 12738// IfNoneMatch sets the optional parameter which makes the operation 12739// fail if the object's ETag matches the given value. This is useful for 12740// getting updates only after the object has changed since the last 12741// request. Use googleapi.IsNotModified to check whether the response 12742// error from Do is the result of In-None-Match. 12743func (c *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersListCall { 12744 c.ifNoneMatch_ = entityTag 12745 return c 12746} 12747 12748// Context sets the context to be used in this call's Do method. Any 12749// pending HTTP request will be aborted if the provided context is 12750// canceled. 12751func (c *OrganizationsLocationsJobTriggersListCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersListCall { 12752 c.ctx_ = ctx 12753 return c 12754} 12755 12756// Header returns an http.Header that can be modified by the caller to 12757// add HTTP headers to the request. 12758func (c *OrganizationsLocationsJobTriggersListCall) Header() http.Header { 12759 if c.header_ == nil { 12760 c.header_ = make(http.Header) 12761 } 12762 return c.header_ 12763} 12764 12765func (c *OrganizationsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 12766 reqHeaders := make(http.Header) 12767 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12768 for k, v := range c.header_ { 12769 reqHeaders[k] = v 12770 } 12771 reqHeaders.Set("User-Agent", c.s.userAgent()) 12772 if c.ifNoneMatch_ != "" { 12773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12774 } 12775 var body io.Reader = nil 12776 c.urlParams_.Set("alt", alt) 12777 c.urlParams_.Set("prettyPrint", "false") 12778 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 12779 urls += "?" + c.urlParams_.Encode() 12780 req, err := http.NewRequest("GET", urls, body) 12781 if err != nil { 12782 return nil, err 12783 } 12784 req.Header = reqHeaders 12785 googleapi.Expand(req.URL, map[string]string{ 12786 "parent": c.parentid, 12787 }) 12788 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12789} 12790 12791// Do executes the "dlp.organizations.locations.jobTriggers.list" call. 12792// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 12793// will be non-nil. Any non-2xx status code is an error. Response 12794// headers are in either 12795// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 12796// (if a response was returned at all) in 12797// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12798// whether the returned error was because http.StatusNotModified was 12799// returned. 12800func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 12801 gensupport.SetOptions(c.urlParams_, opts...) 12802 res, err := c.doRequest("json") 12803 if res != nil && res.StatusCode == http.StatusNotModified { 12804 if res.Body != nil { 12805 res.Body.Close() 12806 } 12807 return nil, &googleapi.Error{ 12808 Code: res.StatusCode, 12809 Header: res.Header, 12810 } 12811 } 12812 if err != nil { 12813 return nil, err 12814 } 12815 defer googleapi.CloseBody(res) 12816 if err := googleapi.CheckResponse(res); err != nil { 12817 return nil, err 12818 } 12819 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 12820 ServerResponse: googleapi.ServerResponse{ 12821 Header: res.Header, 12822 HTTPStatusCode: res.StatusCode, 12823 }, 12824 } 12825 target := &ret 12826 if err := gensupport.DecodeResponse(target, res); err != nil { 12827 return nil, err 12828 } 12829 return ret, nil 12830 // { 12831 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 12832 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", 12833 // "httpMethod": "GET", 12834 // "id": "dlp.organizations.locations.jobTriggers.list", 12835 // "parameterOrder": [ 12836 // "parent" 12837 // ], 12838 // "parameters": { 12839 // "filter": { 12840 // "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 triggers: - `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.", 12841 // "location": "query", 12842 // "type": "string" 12843 // }, 12844 // "locationId": { 12845 // "description": "Deprecated. This field has no effect.", 12846 // "location": "query", 12847 // "type": "string" 12848 // }, 12849 // "orderBy": { 12850 // "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.", 12851 // "location": "query", 12852 // "type": "string" 12853 // }, 12854 // "pageSize": { 12855 // "description": "Size of the page, can be limited by a server.", 12856 // "format": "int32", 12857 // "location": "query", 12858 // "type": "integer" 12859 // }, 12860 // "pageToken": { 12861 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 12862 // "location": "query", 12863 // "type": "string" 12864 // }, 12865 // "parent": { 12866 // "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", 12867 // "location": "path", 12868 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 12869 // "required": true, 12870 // "type": "string" 12871 // }, 12872 // "type": { 12873 // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", 12874 // "enum": [ 12875 // "DLP_JOB_TYPE_UNSPECIFIED", 12876 // "INSPECT_JOB", 12877 // "RISK_ANALYSIS_JOB" 12878 // ], 12879 // "enumDescriptions": [ 12880 // "Defaults to INSPECT_JOB.", 12881 // "The job inspected Google Cloud for sensitive data.", 12882 // "The job executed a Risk Analysis computation." 12883 // ], 12884 // "location": "query", 12885 // "type": "string" 12886 // } 12887 // }, 12888 // "path": "v2/{+parent}/jobTriggers", 12889 // "response": { 12890 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 12891 // }, 12892 // "scopes": [ 12893 // "https://www.googleapis.com/auth/cloud-platform" 12894 // ] 12895 // } 12896 12897} 12898 12899// Pages invokes f for each page of results. 12900// A non-nil error returned from f will halt the iteration. 12901// The provided context supersedes any context provided to the Context method. 12902func (c *OrganizationsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 12903 c.ctx_ = ctx 12904 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12905 for { 12906 x, err := c.Do() 12907 if err != nil { 12908 return err 12909 } 12910 if err := f(x); err != nil { 12911 return err 12912 } 12913 if x.NextPageToken == "" { 12914 return nil 12915 } 12916 c.PageToken(x.NextPageToken) 12917 } 12918} 12919 12920// method id "dlp.organizations.locations.jobTriggers.patch": 12921 12922type OrganizationsLocationsJobTriggersPatchCall struct { 12923 s *Service 12924 name string 12925 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 12926 urlParams_ gensupport.URLParams 12927 ctx_ context.Context 12928 header_ http.Header 12929} 12930 12931// Patch: Updates a job trigger. See 12932// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 12933// more. 12934// 12935// - name: Resource name of the project and the triggeredJob, for 12936// example `projects/dlp-test-project/jobTriggers/53234423`. 12937func (r *OrganizationsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *OrganizationsLocationsJobTriggersPatchCall { 12938 c := &OrganizationsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12939 c.name = name 12940 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 12941 return c 12942} 12943 12944// Fields allows partial responses to be retrieved. See 12945// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12946// for more information. 12947func (c *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersPatchCall { 12948 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12949 return c 12950} 12951 12952// Context sets the context to be used in this call's Do method. Any 12953// pending HTTP request will be aborted if the provided context is 12954// canceled. 12955func (c *OrganizationsLocationsJobTriggersPatchCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersPatchCall { 12956 c.ctx_ = ctx 12957 return c 12958} 12959 12960// Header returns an http.Header that can be modified by the caller to 12961// add HTTP headers to the request. 12962func (c *OrganizationsLocationsJobTriggersPatchCall) Header() http.Header { 12963 if c.header_ == nil { 12964 c.header_ = make(http.Header) 12965 } 12966 return c.header_ 12967} 12968 12969func (c *OrganizationsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 12970 reqHeaders := make(http.Header) 12971 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 12972 for k, v := range c.header_ { 12973 reqHeaders[k] = v 12974 } 12975 reqHeaders.Set("User-Agent", c.s.userAgent()) 12976 var body io.Reader = nil 12977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 12978 if err != nil { 12979 return nil, err 12980 } 12981 reqHeaders.Set("Content-Type", "application/json") 12982 c.urlParams_.Set("alt", alt) 12983 c.urlParams_.Set("prettyPrint", "false") 12984 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12985 urls += "?" + c.urlParams_.Encode() 12986 req, err := http.NewRequest("PATCH", urls, body) 12987 if err != nil { 12988 return nil, err 12989 } 12990 req.Header = reqHeaders 12991 googleapi.Expand(req.URL, map[string]string{ 12992 "name": c.name, 12993 }) 12994 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12995} 12996 12997// Do executes the "dlp.organizations.locations.jobTriggers.patch" call. 12998// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 12999// non-nil. Any non-2xx status code is an error. Response headers are in 13000// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 13001// response was returned at all) in error.(*googleapi.Error).Header. Use 13002// googleapi.IsNotModified to check whether the returned error was 13003// because http.StatusNotModified was returned. 13004func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 13005 gensupport.SetOptions(c.urlParams_, opts...) 13006 res, err := c.doRequest("json") 13007 if res != nil && res.StatusCode == http.StatusNotModified { 13008 if res.Body != nil { 13009 res.Body.Close() 13010 } 13011 return nil, &googleapi.Error{ 13012 Code: res.StatusCode, 13013 Header: res.Header, 13014 } 13015 } 13016 if err != nil { 13017 return nil, err 13018 } 13019 defer googleapi.CloseBody(res) 13020 if err := googleapi.CheckResponse(res); err != nil { 13021 return nil, err 13022 } 13023 ret := &GooglePrivacyDlpV2JobTrigger{ 13024 ServerResponse: googleapi.ServerResponse{ 13025 Header: res.Header, 13026 HTTPStatusCode: res.StatusCode, 13027 }, 13028 } 13029 target := &ret 13030 if err := gensupport.DecodeResponse(target, res); err != nil { 13031 return nil, err 13032 } 13033 return ret, nil 13034 // { 13035 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 13036 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 13037 // "httpMethod": "PATCH", 13038 // "id": "dlp.organizations.locations.jobTriggers.patch", 13039 // "parameterOrder": [ 13040 // "name" 13041 // ], 13042 // "parameters": { 13043 // "name": { 13044 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 13045 // "location": "path", 13046 // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 13047 // "required": true, 13048 // "type": "string" 13049 // } 13050 // }, 13051 // "path": "v2/{+name}", 13052 // "request": { 13053 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 13054 // }, 13055 // "response": { 13056 // "$ref": "GooglePrivacyDlpV2JobTrigger" 13057 // }, 13058 // "scopes": [ 13059 // "https://www.googleapis.com/auth/cloud-platform" 13060 // ] 13061 // } 13062 13063} 13064 13065// method id "dlp.organizations.locations.storedInfoTypes.create": 13066 13067type OrganizationsLocationsStoredInfoTypesCreateCall struct { 13068 s *Service 13069 parentid string 13070 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 13071 urlParams_ gensupport.URLParams 13072 ctx_ context.Context 13073 header_ http.Header 13074} 13075 13076// Create: Creates a pre-built stored infoType to be used for 13077// inspection. See 13078// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13079// more. 13080// 13081// - parent: Parent resource name. The format of this value varies 13082// depending on the scope of the request (project or organization) and 13083// whether you have specified a processing location 13084// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 13085// scope, location specified: 13086// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 13087// location specified (defaults to global): `projects/`PROJECT_ID + 13088// Organizations scope, location specified: 13089// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 13090// scope, no location specified (defaults to global): 13091// `organizations/`ORG_ID The following example `parent` string 13092// specifies a parent project with the identifier `example-project`, 13093// and specifies the `europe-west3` location for processing data: 13094// parent=projects/example-project/locations/europe-west3. 13095func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { 13096 c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13097 c.parentid = parentid 13098 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 13099 return c 13100} 13101 13102// Fields allows partial responses to be retrieved. See 13103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13104// for more information. 13105func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { 13106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13107 return c 13108} 13109 13110// Context sets the context to be used in this call's Do method. Any 13111// pending HTTP request will be aborted if the provided context is 13112// canceled. 13113func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesCreateCall { 13114 c.ctx_ = ctx 13115 return c 13116} 13117 13118// Header returns an http.Header that can be modified by the caller to 13119// add HTTP headers to the request. 13120func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { 13121 if c.header_ == nil { 13122 c.header_ = make(http.Header) 13123 } 13124 return c.header_ 13125} 13126 13127func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 13128 reqHeaders := make(http.Header) 13129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13130 for k, v := range c.header_ { 13131 reqHeaders[k] = v 13132 } 13133 reqHeaders.Set("User-Agent", c.s.userAgent()) 13134 var body io.Reader = nil 13135 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 13136 if err != nil { 13137 return nil, err 13138 } 13139 reqHeaders.Set("Content-Type", "application/json") 13140 c.urlParams_.Set("alt", alt) 13141 c.urlParams_.Set("prettyPrint", "false") 13142 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 13143 urls += "?" + c.urlParams_.Encode() 13144 req, err := http.NewRequest("POST", urls, body) 13145 if err != nil { 13146 return nil, err 13147 } 13148 req.Header = reqHeaders 13149 googleapi.Expand(req.URL, map[string]string{ 13150 "parent": c.parentid, 13151 }) 13152 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13153} 13154 13155// Do executes the "dlp.organizations.locations.storedInfoTypes.create" call. 13156// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 13157// non-nil. Any non-2xx status code is an error. Response headers are in 13158// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 13159// a response was returned at all) in error.(*googleapi.Error).Header. 13160// Use googleapi.IsNotModified to check whether the returned error was 13161// because http.StatusNotModified was returned. 13162func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 13163 gensupport.SetOptions(c.urlParams_, opts...) 13164 res, err := c.doRequest("json") 13165 if res != nil && res.StatusCode == http.StatusNotModified { 13166 if res.Body != nil { 13167 res.Body.Close() 13168 } 13169 return nil, &googleapi.Error{ 13170 Code: res.StatusCode, 13171 Header: res.Header, 13172 } 13173 } 13174 if err != nil { 13175 return nil, err 13176 } 13177 defer googleapi.CloseBody(res) 13178 if err := googleapi.CheckResponse(res); err != nil { 13179 return nil, err 13180 } 13181 ret := &GooglePrivacyDlpV2StoredInfoType{ 13182 ServerResponse: googleapi.ServerResponse{ 13183 Header: res.Header, 13184 HTTPStatusCode: res.StatusCode, 13185 }, 13186 } 13187 target := &ret 13188 if err := gensupport.DecodeResponse(target, res); err != nil { 13189 return nil, err 13190 } 13191 return ret, nil 13192 // { 13193 // "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.", 13194 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 13195 // "httpMethod": "POST", 13196 // "id": "dlp.organizations.locations.storedInfoTypes.create", 13197 // "parameterOrder": [ 13198 // "parent" 13199 // ], 13200 // "parameters": { 13201 // "parent": { 13202 // "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", 13203 // "location": "path", 13204 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 13205 // "required": true, 13206 // "type": "string" 13207 // } 13208 // }, 13209 // "path": "v2/{+parent}/storedInfoTypes", 13210 // "request": { 13211 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 13212 // }, 13213 // "response": { 13214 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 13215 // }, 13216 // "scopes": [ 13217 // "https://www.googleapis.com/auth/cloud-platform" 13218 // ] 13219 // } 13220 13221} 13222 13223// method id "dlp.organizations.locations.storedInfoTypes.delete": 13224 13225type OrganizationsLocationsStoredInfoTypesDeleteCall struct { 13226 s *Service 13227 name string 13228 urlParams_ gensupport.URLParams 13229 ctx_ context.Context 13230 header_ http.Header 13231} 13232 13233// Delete: Deletes a stored infoType. See 13234// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13235// more. 13236// 13237// - name: Resource name of the organization and storedInfoType to be 13238// deleted, for example 13239// `organizations/433245324/storedInfoTypes/432452342` or 13240// projects/project-id/storedInfoTypes/432452342. 13241func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { 13242 c := &OrganizationsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13243 c.name = name 13244 return c 13245} 13246 13247// Fields allows partial responses to be retrieved. See 13248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13249// for more information. 13250func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { 13251 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13252 return c 13253} 13254 13255// Context sets the context to be used in this call's Do method. Any 13256// pending HTTP request will be aborted if the provided context is 13257// canceled. 13258func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesDeleteCall { 13259 c.ctx_ = ctx 13260 return c 13261} 13262 13263// Header returns an http.Header that can be modified by the caller to 13264// add HTTP headers to the request. 13265func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 13266 if c.header_ == nil { 13267 c.header_ = make(http.Header) 13268 } 13269 return c.header_ 13270} 13271 13272func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 13273 reqHeaders := make(http.Header) 13274 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13275 for k, v := range c.header_ { 13276 reqHeaders[k] = v 13277 } 13278 reqHeaders.Set("User-Agent", c.s.userAgent()) 13279 var body io.Reader = nil 13280 c.urlParams_.Set("alt", alt) 13281 c.urlParams_.Set("prettyPrint", "false") 13282 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13283 urls += "?" + c.urlParams_.Encode() 13284 req, err := http.NewRequest("DELETE", urls, body) 13285 if err != nil { 13286 return nil, err 13287 } 13288 req.Header = reqHeaders 13289 googleapi.Expand(req.URL, map[string]string{ 13290 "name": c.name, 13291 }) 13292 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13293} 13294 13295// Do executes the "dlp.organizations.locations.storedInfoTypes.delete" call. 13296// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13297// non-2xx status code is an error. Response headers are in either 13298// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13299// returned at all) in error.(*googleapi.Error).Header. Use 13300// googleapi.IsNotModified to check whether the returned error was 13301// because http.StatusNotModified was returned. 13302func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13303 gensupport.SetOptions(c.urlParams_, opts...) 13304 res, err := c.doRequest("json") 13305 if res != nil && res.StatusCode == http.StatusNotModified { 13306 if res.Body != nil { 13307 res.Body.Close() 13308 } 13309 return nil, &googleapi.Error{ 13310 Code: res.StatusCode, 13311 Header: res.Header, 13312 } 13313 } 13314 if err != nil { 13315 return nil, err 13316 } 13317 defer googleapi.CloseBody(res) 13318 if err := googleapi.CheckResponse(res); err != nil { 13319 return nil, err 13320 } 13321 ret := &GoogleProtobufEmpty{ 13322 ServerResponse: googleapi.ServerResponse{ 13323 Header: res.Header, 13324 HTTPStatusCode: res.StatusCode, 13325 }, 13326 } 13327 target := &ret 13328 if err := gensupport.DecodeResponse(target, res); err != nil { 13329 return nil, err 13330 } 13331 return ret, nil 13332 // { 13333 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13334 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 13335 // "httpMethod": "DELETE", 13336 // "id": "dlp.organizations.locations.storedInfoTypes.delete", 13337 // "parameterOrder": [ 13338 // "name" 13339 // ], 13340 // "parameters": { 13341 // "name": { 13342 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 13343 // "location": "path", 13344 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 13345 // "required": true, 13346 // "type": "string" 13347 // } 13348 // }, 13349 // "path": "v2/{+name}", 13350 // "response": { 13351 // "$ref": "GoogleProtobufEmpty" 13352 // }, 13353 // "scopes": [ 13354 // "https://www.googleapis.com/auth/cloud-platform" 13355 // ] 13356 // } 13357 13358} 13359 13360// method id "dlp.organizations.locations.storedInfoTypes.get": 13361 13362type OrganizationsLocationsStoredInfoTypesGetCall struct { 13363 s *Service 13364 name string 13365 urlParams_ gensupport.URLParams 13366 ifNoneMatch_ string 13367 ctx_ context.Context 13368 header_ http.Header 13369} 13370 13371// Get: Gets a stored infoType. See 13372// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13373// more. 13374// 13375// - name: Resource name of the organization and storedInfoType to be 13376// read, for example 13377// `organizations/433245324/storedInfoTypes/432452342` or 13378// projects/project-id/storedInfoTypes/432452342. 13379func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { 13380 c := &OrganizationsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13381 c.name = name 13382 return c 13383} 13384 13385// Fields allows partial responses to be retrieved. See 13386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13387// for more information. 13388func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { 13389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13390 return c 13391} 13392 13393// IfNoneMatch sets the optional parameter which makes the operation 13394// fail if the object's ETag matches the given value. This is useful for 13395// getting updates only after the object has changed since the last 13396// request. Use googleapi.IsNotModified to check whether the response 13397// error from Do is the result of In-None-Match. 13398func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { 13399 c.ifNoneMatch_ = entityTag 13400 return c 13401} 13402 13403// Context sets the context to be used in this call's Do method. Any 13404// pending HTTP request will be aborted if the provided context is 13405// canceled. 13406func (c *OrganizationsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesGetCall { 13407 c.ctx_ = ctx 13408 return c 13409} 13410 13411// Header returns an http.Header that can be modified by the caller to 13412// add HTTP headers to the request. 13413func (c *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { 13414 if c.header_ == nil { 13415 c.header_ = make(http.Header) 13416 } 13417 return c.header_ 13418} 13419 13420func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 13421 reqHeaders := make(http.Header) 13422 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13423 for k, v := range c.header_ { 13424 reqHeaders[k] = v 13425 } 13426 reqHeaders.Set("User-Agent", c.s.userAgent()) 13427 if c.ifNoneMatch_ != "" { 13428 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13429 } 13430 var body io.Reader = nil 13431 c.urlParams_.Set("alt", alt) 13432 c.urlParams_.Set("prettyPrint", "false") 13433 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13434 urls += "?" + c.urlParams_.Encode() 13435 req, err := http.NewRequest("GET", urls, body) 13436 if err != nil { 13437 return nil, err 13438 } 13439 req.Header = reqHeaders 13440 googleapi.Expand(req.URL, map[string]string{ 13441 "name": c.name, 13442 }) 13443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13444} 13445 13446// Do executes the "dlp.organizations.locations.storedInfoTypes.get" call. 13447// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 13448// non-nil. Any non-2xx status code is an error. Response headers are in 13449// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 13450// a response was returned at all) in error.(*googleapi.Error).Header. 13451// Use googleapi.IsNotModified to check whether the returned error was 13452// because http.StatusNotModified was returned. 13453func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 13454 gensupport.SetOptions(c.urlParams_, opts...) 13455 res, err := c.doRequest("json") 13456 if res != nil && res.StatusCode == http.StatusNotModified { 13457 if res.Body != nil { 13458 res.Body.Close() 13459 } 13460 return nil, &googleapi.Error{ 13461 Code: res.StatusCode, 13462 Header: res.Header, 13463 } 13464 } 13465 if err != nil { 13466 return nil, err 13467 } 13468 defer googleapi.CloseBody(res) 13469 if err := googleapi.CheckResponse(res); err != nil { 13470 return nil, err 13471 } 13472 ret := &GooglePrivacyDlpV2StoredInfoType{ 13473 ServerResponse: googleapi.ServerResponse{ 13474 Header: res.Header, 13475 HTTPStatusCode: res.StatusCode, 13476 }, 13477 } 13478 target := &ret 13479 if err := gensupport.DecodeResponse(target, res); err != nil { 13480 return nil, err 13481 } 13482 return ret, nil 13483 // { 13484 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13485 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 13486 // "httpMethod": "GET", 13487 // "id": "dlp.organizations.locations.storedInfoTypes.get", 13488 // "parameterOrder": [ 13489 // "name" 13490 // ], 13491 // "parameters": { 13492 // "name": { 13493 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 13494 // "location": "path", 13495 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 13496 // "required": true, 13497 // "type": "string" 13498 // } 13499 // }, 13500 // "path": "v2/{+name}", 13501 // "response": { 13502 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 13503 // }, 13504 // "scopes": [ 13505 // "https://www.googleapis.com/auth/cloud-platform" 13506 // ] 13507 // } 13508 13509} 13510 13511// method id "dlp.organizations.locations.storedInfoTypes.list": 13512 13513type OrganizationsLocationsStoredInfoTypesListCall struct { 13514 s *Service 13515 parentid string 13516 urlParams_ gensupport.URLParams 13517 ifNoneMatch_ string 13518 ctx_ context.Context 13519 header_ http.Header 13520} 13521 13522// List: Lists stored infoTypes. See 13523// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13524// more. 13525// 13526// - parent: Parent resource name. The format of this value varies 13527// depending on the scope of the request (project or organization) and 13528// whether you have specified a processing location 13529// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 13530// scope, location specified: 13531// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 13532// location specified (defaults to global): `projects/`PROJECT_ID + 13533// Organizations scope, location specified: 13534// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 13535// scope, no location specified (defaults to global): 13536// `organizations/`ORG_ID The following example `parent` string 13537// specifies a parent project with the identifier `example-project`, 13538// and specifies the `europe-west3` location for processing data: 13539// parent=projects/example-project/locations/europe-west3. 13540func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { 13541 c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13542 c.parentid = parentid 13543 return c 13544} 13545 13546// LocationId sets the optional parameter "locationId": Deprecated. This 13547// field has no effect. 13548func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsLocationsStoredInfoTypesListCall { 13549 c.urlParams_.Set("locationId", locationId) 13550 return c 13551} 13552 13553// OrderBy sets the optional parameter "orderBy": Comma separated list 13554// of fields to order by, followed by `asc` or `desc` postfix. This list 13555// is case-insensitive, default sorting order is ascending, redundant 13556// space characters are insignificant. Example: `name asc, display_name, 13557// create_time desc` Supported fields are: - `create_time`: corresponds 13558// to time the most recent version of the resource was created. - 13559// `state`: corresponds to the state of the resource. - `name`: 13560// corresponds to resource name. - `display_name`: corresponds to info 13561// type's display name. 13562func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsLocationsStoredInfoTypesListCall { 13563 c.urlParams_.Set("orderBy", orderBy) 13564 return c 13565} 13566 13567// PageSize sets the optional parameter "pageSize": Size of the page, 13568// can be limited by server. If zero server returns a page of max size 13569// 100. 13570func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { 13571 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13572 return c 13573} 13574 13575// PageToken sets the optional parameter "pageToken": Page token to 13576// continue retrieval. Comes from previous call to 13577// `ListStoredInfoTypes`. 13578func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { 13579 c.urlParams_.Set("pageToken", pageToken) 13580 return c 13581} 13582 13583// Fields allows partial responses to be retrieved. See 13584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13585// for more information. 13586func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { 13587 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13588 return c 13589} 13590 13591// IfNoneMatch sets the optional parameter which makes the operation 13592// fail if the object's ETag matches the given value. This is useful for 13593// getting updates only after the object has changed since the last 13594// request. Use googleapi.IsNotModified to check whether the response 13595// error from Do is the result of In-None-Match. 13596func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { 13597 c.ifNoneMatch_ = entityTag 13598 return c 13599} 13600 13601// Context sets the context to be used in this call's Do method. Any 13602// pending HTTP request will be aborted if the provided context is 13603// canceled. 13604func (c *OrganizationsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesListCall { 13605 c.ctx_ = ctx 13606 return c 13607} 13608 13609// Header returns an http.Header that can be modified by the caller to 13610// add HTTP headers to the request. 13611func (c *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { 13612 if c.header_ == nil { 13613 c.header_ = make(http.Header) 13614 } 13615 return c.header_ 13616} 13617 13618func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 13619 reqHeaders := make(http.Header) 13620 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13621 for k, v := range c.header_ { 13622 reqHeaders[k] = v 13623 } 13624 reqHeaders.Set("User-Agent", c.s.userAgent()) 13625 if c.ifNoneMatch_ != "" { 13626 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13627 } 13628 var body io.Reader = nil 13629 c.urlParams_.Set("alt", alt) 13630 c.urlParams_.Set("prettyPrint", "false") 13631 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 13632 urls += "?" + c.urlParams_.Encode() 13633 req, err := http.NewRequest("GET", urls, body) 13634 if err != nil { 13635 return nil, err 13636 } 13637 req.Header = reqHeaders 13638 googleapi.Expand(req.URL, map[string]string{ 13639 "parent": c.parentid, 13640 }) 13641 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13642} 13643 13644// Do executes the "dlp.organizations.locations.storedInfoTypes.list" call. 13645// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 13646// error will be non-nil. Any non-2xx status code is an error. Response 13647// headers are in either 13648// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 13649// or (if a response was returned at all) in 13650// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13651// whether the returned error was because http.StatusNotModified was 13652// returned. 13653func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 13654 gensupport.SetOptions(c.urlParams_, opts...) 13655 res, err := c.doRequest("json") 13656 if res != nil && res.StatusCode == http.StatusNotModified { 13657 if res.Body != nil { 13658 res.Body.Close() 13659 } 13660 return nil, &googleapi.Error{ 13661 Code: res.StatusCode, 13662 Header: res.Header, 13663 } 13664 } 13665 if err != nil { 13666 return nil, err 13667 } 13668 defer googleapi.CloseBody(res) 13669 if err := googleapi.CheckResponse(res); err != nil { 13670 return nil, err 13671 } 13672 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 13673 ServerResponse: googleapi.ServerResponse{ 13674 Header: res.Header, 13675 HTTPStatusCode: res.StatusCode, 13676 }, 13677 } 13678 target := &ret 13679 if err := gensupport.DecodeResponse(target, res); err != nil { 13680 return nil, err 13681 } 13682 return ret, nil 13683 // { 13684 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13685 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 13686 // "httpMethod": "GET", 13687 // "id": "dlp.organizations.locations.storedInfoTypes.list", 13688 // "parameterOrder": [ 13689 // "parent" 13690 // ], 13691 // "parameters": { 13692 // "locationId": { 13693 // "description": "Deprecated. This field has no effect.", 13694 // "location": "query", 13695 // "type": "string" 13696 // }, 13697 // "orderBy": { 13698 // "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.", 13699 // "location": "query", 13700 // "type": "string" 13701 // }, 13702 // "pageSize": { 13703 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 13704 // "format": "int32", 13705 // "location": "query", 13706 // "type": "integer" 13707 // }, 13708 // "pageToken": { 13709 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 13710 // "location": "query", 13711 // "type": "string" 13712 // }, 13713 // "parent": { 13714 // "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", 13715 // "location": "path", 13716 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 13717 // "required": true, 13718 // "type": "string" 13719 // } 13720 // }, 13721 // "path": "v2/{+parent}/storedInfoTypes", 13722 // "response": { 13723 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 13724 // }, 13725 // "scopes": [ 13726 // "https://www.googleapis.com/auth/cloud-platform" 13727 // ] 13728 // } 13729 13730} 13731 13732// Pages invokes f for each page of results. 13733// A non-nil error returned from f will halt the iteration. 13734// The provided context supersedes any context provided to the Context method. 13735func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 13736 c.ctx_ = ctx 13737 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13738 for { 13739 x, err := c.Do() 13740 if err != nil { 13741 return err 13742 } 13743 if err := f(x); err != nil { 13744 return err 13745 } 13746 if x.NextPageToken == "" { 13747 return nil 13748 } 13749 c.PageToken(x.NextPageToken) 13750 } 13751} 13752 13753// method id "dlp.organizations.locations.storedInfoTypes.patch": 13754 13755type OrganizationsLocationsStoredInfoTypesPatchCall struct { 13756 s *Service 13757 name string 13758 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 13759 urlParams_ gensupport.URLParams 13760 ctx_ context.Context 13761 header_ http.Header 13762} 13763 13764// Patch: Updates the stored infoType by creating a new version. The 13765// existing version will continue to be used until the new version is 13766// ready. See 13767// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13768// more. 13769// 13770// - name: Resource name of organization and storedInfoType to be 13771// updated, for example 13772// `organizations/433245324/storedInfoTypes/432452342` or 13773// projects/project-id/storedInfoTypes/432452342. 13774func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { 13775 c := &OrganizationsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13776 c.name = name 13777 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 13778 return c 13779} 13780 13781// Fields allows partial responses to be retrieved. See 13782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13783// for more information. 13784func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { 13785 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13786 return c 13787} 13788 13789// Context sets the context to be used in this call's Do method. Any 13790// pending HTTP request will be aborted if the provided context is 13791// canceled. 13792func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesPatchCall { 13793 c.ctx_ = ctx 13794 return c 13795} 13796 13797// Header returns an http.Header that can be modified by the caller to 13798// add HTTP headers to the request. 13799func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { 13800 if c.header_ == nil { 13801 c.header_ = make(http.Header) 13802 } 13803 return c.header_ 13804} 13805 13806func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 13807 reqHeaders := make(http.Header) 13808 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13809 for k, v := range c.header_ { 13810 reqHeaders[k] = v 13811 } 13812 reqHeaders.Set("User-Agent", c.s.userAgent()) 13813 var body io.Reader = nil 13814 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 13815 if err != nil { 13816 return nil, err 13817 } 13818 reqHeaders.Set("Content-Type", "application/json") 13819 c.urlParams_.Set("alt", alt) 13820 c.urlParams_.Set("prettyPrint", "false") 13821 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13822 urls += "?" + c.urlParams_.Encode() 13823 req, err := http.NewRequest("PATCH", urls, body) 13824 if err != nil { 13825 return nil, err 13826 } 13827 req.Header = reqHeaders 13828 googleapi.Expand(req.URL, map[string]string{ 13829 "name": c.name, 13830 }) 13831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13832} 13833 13834// Do executes the "dlp.organizations.locations.storedInfoTypes.patch" call. 13835// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 13836// non-nil. Any non-2xx status code is an error. Response headers are in 13837// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 13838// a response was returned at all) in error.(*googleapi.Error).Header. 13839// Use googleapi.IsNotModified to check whether the returned error was 13840// because http.StatusNotModified was returned. 13841func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 13842 gensupport.SetOptions(c.urlParams_, opts...) 13843 res, err := c.doRequest("json") 13844 if res != nil && res.StatusCode == http.StatusNotModified { 13845 if res.Body != nil { 13846 res.Body.Close() 13847 } 13848 return nil, &googleapi.Error{ 13849 Code: res.StatusCode, 13850 Header: res.Header, 13851 } 13852 } 13853 if err != nil { 13854 return nil, err 13855 } 13856 defer googleapi.CloseBody(res) 13857 if err := googleapi.CheckResponse(res); err != nil { 13858 return nil, err 13859 } 13860 ret := &GooglePrivacyDlpV2StoredInfoType{ 13861 ServerResponse: googleapi.ServerResponse{ 13862 Header: res.Header, 13863 HTTPStatusCode: res.StatusCode, 13864 }, 13865 } 13866 target := &ret 13867 if err := gensupport.DecodeResponse(target, res); err != nil { 13868 return nil, err 13869 } 13870 return ret, nil 13871 // { 13872 // "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.", 13873 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 13874 // "httpMethod": "PATCH", 13875 // "id": "dlp.organizations.locations.storedInfoTypes.patch", 13876 // "parameterOrder": [ 13877 // "name" 13878 // ], 13879 // "parameters": { 13880 // "name": { 13881 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 13882 // "location": "path", 13883 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 13884 // "required": true, 13885 // "type": "string" 13886 // } 13887 // }, 13888 // "path": "v2/{+name}", 13889 // "request": { 13890 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 13891 // }, 13892 // "response": { 13893 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 13894 // }, 13895 // "scopes": [ 13896 // "https://www.googleapis.com/auth/cloud-platform" 13897 // ] 13898 // } 13899 13900} 13901 13902// method id "dlp.organizations.storedInfoTypes.create": 13903 13904type OrganizationsStoredInfoTypesCreateCall struct { 13905 s *Service 13906 parentid string 13907 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 13908 urlParams_ gensupport.URLParams 13909 ctx_ context.Context 13910 header_ http.Header 13911} 13912 13913// Create: Creates a pre-built stored infoType to be used for 13914// inspection. See 13915// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13916// more. 13917// 13918// - parent: Parent resource name. The format of this value varies 13919// depending on the scope of the request (project or organization) and 13920// whether you have specified a processing location 13921// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 13922// scope, location specified: 13923// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 13924// location specified (defaults to global): `projects/`PROJECT_ID + 13925// Organizations scope, location specified: 13926// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 13927// scope, no location specified (defaults to global): 13928// `organizations/`ORG_ID The following example `parent` string 13929// specifies a parent project with the identifier `example-project`, 13930// and specifies the `europe-west3` location for processing data: 13931// parent=projects/example-project/locations/europe-west3. 13932func (r *OrganizationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { 13933 c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13934 c.parentid = parentid 13935 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 13936 return c 13937} 13938 13939// Fields allows partial responses to be retrieved. See 13940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13941// for more information. 13942func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { 13943 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13944 return c 13945} 13946 13947// Context sets the context to be used in this call's Do method. Any 13948// pending HTTP request will be aborted if the provided context is 13949// canceled. 13950func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { 13951 c.ctx_ = ctx 13952 return c 13953} 13954 13955// Header returns an http.Header that can be modified by the caller to 13956// add HTTP headers to the request. 13957func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { 13958 if c.header_ == nil { 13959 c.header_ = make(http.Header) 13960 } 13961 return c.header_ 13962} 13963 13964func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 13965 reqHeaders := make(http.Header) 13966 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 13967 for k, v := range c.header_ { 13968 reqHeaders[k] = v 13969 } 13970 reqHeaders.Set("User-Agent", c.s.userAgent()) 13971 var body io.Reader = nil 13972 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 13973 if err != nil { 13974 return nil, err 13975 } 13976 reqHeaders.Set("Content-Type", "application/json") 13977 c.urlParams_.Set("alt", alt) 13978 c.urlParams_.Set("prettyPrint", "false") 13979 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 13980 urls += "?" + c.urlParams_.Encode() 13981 req, err := http.NewRequest("POST", urls, body) 13982 if err != nil { 13983 return nil, err 13984 } 13985 req.Header = reqHeaders 13986 googleapi.Expand(req.URL, map[string]string{ 13987 "parent": c.parentid, 13988 }) 13989 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13990} 13991 13992// Do executes the "dlp.organizations.storedInfoTypes.create" call. 13993// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 13994// non-nil. Any non-2xx status code is an error. Response headers are in 13995// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 13996// a response was returned at all) in error.(*googleapi.Error).Header. 13997// Use googleapi.IsNotModified to check whether the returned error was 13998// because http.StatusNotModified was returned. 13999func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 14000 gensupport.SetOptions(c.urlParams_, opts...) 14001 res, err := c.doRequest("json") 14002 if res != nil && res.StatusCode == http.StatusNotModified { 14003 if res.Body != nil { 14004 res.Body.Close() 14005 } 14006 return nil, &googleapi.Error{ 14007 Code: res.StatusCode, 14008 Header: res.Header, 14009 } 14010 } 14011 if err != nil { 14012 return nil, err 14013 } 14014 defer googleapi.CloseBody(res) 14015 if err := googleapi.CheckResponse(res); err != nil { 14016 return nil, err 14017 } 14018 ret := &GooglePrivacyDlpV2StoredInfoType{ 14019 ServerResponse: googleapi.ServerResponse{ 14020 Header: res.Header, 14021 HTTPStatusCode: res.StatusCode, 14022 }, 14023 } 14024 target := &ret 14025 if err := gensupport.DecodeResponse(target, res); err != nil { 14026 return nil, err 14027 } 14028 return ret, nil 14029 // { 14030 // "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.", 14031 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 14032 // "httpMethod": "POST", 14033 // "id": "dlp.organizations.storedInfoTypes.create", 14034 // "parameterOrder": [ 14035 // "parent" 14036 // ], 14037 // "parameters": { 14038 // "parent": { 14039 // "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", 14040 // "location": "path", 14041 // "pattern": "^organizations/[^/]+$", 14042 // "required": true, 14043 // "type": "string" 14044 // } 14045 // }, 14046 // "path": "v2/{+parent}/storedInfoTypes", 14047 // "request": { 14048 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 14049 // }, 14050 // "response": { 14051 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 14052 // }, 14053 // "scopes": [ 14054 // "https://www.googleapis.com/auth/cloud-platform" 14055 // ] 14056 // } 14057 14058} 14059 14060// method id "dlp.organizations.storedInfoTypes.delete": 14061 14062type OrganizationsStoredInfoTypesDeleteCall struct { 14063 s *Service 14064 name string 14065 urlParams_ gensupport.URLParams 14066 ctx_ context.Context 14067 header_ http.Header 14068} 14069 14070// Delete: Deletes a stored infoType. See 14071// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 14072// more. 14073// 14074// - name: Resource name of the organization and storedInfoType to be 14075// deleted, for example 14076// `organizations/433245324/storedInfoTypes/432452342` or 14077// projects/project-id/storedInfoTypes/432452342. 14078func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { 14079 c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14080 c.name = name 14081 return c 14082} 14083 14084// Fields allows partial responses to be retrieved. See 14085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14086// for more information. 14087func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { 14088 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14089 return c 14090} 14091 14092// Context sets the context to be used in this call's Do method. Any 14093// pending HTTP request will be aborted if the provided context is 14094// canceled. 14095func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { 14096 c.ctx_ = ctx 14097 return c 14098} 14099 14100// Header returns an http.Header that can be modified by the caller to 14101// add HTTP headers to the request. 14102func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { 14103 if c.header_ == nil { 14104 c.header_ = make(http.Header) 14105 } 14106 return c.header_ 14107} 14108 14109func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 14110 reqHeaders := make(http.Header) 14111 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14112 for k, v := range c.header_ { 14113 reqHeaders[k] = v 14114 } 14115 reqHeaders.Set("User-Agent", c.s.userAgent()) 14116 var body io.Reader = nil 14117 c.urlParams_.Set("alt", alt) 14118 c.urlParams_.Set("prettyPrint", "false") 14119 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14120 urls += "?" + c.urlParams_.Encode() 14121 req, err := http.NewRequest("DELETE", urls, body) 14122 if err != nil { 14123 return nil, err 14124 } 14125 req.Header = reqHeaders 14126 googleapi.Expand(req.URL, map[string]string{ 14127 "name": c.name, 14128 }) 14129 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14130} 14131 14132// Do executes the "dlp.organizations.storedInfoTypes.delete" call. 14133// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14134// non-2xx status code is an error. Response headers are in either 14135// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14136// returned at all) in error.(*googleapi.Error).Header. Use 14137// googleapi.IsNotModified to check whether the returned error was 14138// because http.StatusNotModified was returned. 14139func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14140 gensupport.SetOptions(c.urlParams_, opts...) 14141 res, err := c.doRequest("json") 14142 if res != nil && res.StatusCode == http.StatusNotModified { 14143 if res.Body != nil { 14144 res.Body.Close() 14145 } 14146 return nil, &googleapi.Error{ 14147 Code: res.StatusCode, 14148 Header: res.Header, 14149 } 14150 } 14151 if err != nil { 14152 return nil, err 14153 } 14154 defer googleapi.CloseBody(res) 14155 if err := googleapi.CheckResponse(res); err != nil { 14156 return nil, err 14157 } 14158 ret := &GoogleProtobufEmpty{ 14159 ServerResponse: googleapi.ServerResponse{ 14160 Header: res.Header, 14161 HTTPStatusCode: res.StatusCode, 14162 }, 14163 } 14164 target := &ret 14165 if err := gensupport.DecodeResponse(target, res); err != nil { 14166 return nil, err 14167 } 14168 return ret, nil 14169 // { 14170 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 14171 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 14172 // "httpMethod": "DELETE", 14173 // "id": "dlp.organizations.storedInfoTypes.delete", 14174 // "parameterOrder": [ 14175 // "name" 14176 // ], 14177 // "parameters": { 14178 // "name": { 14179 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 14180 // "location": "path", 14181 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 14182 // "required": true, 14183 // "type": "string" 14184 // } 14185 // }, 14186 // "path": "v2/{+name}", 14187 // "response": { 14188 // "$ref": "GoogleProtobufEmpty" 14189 // }, 14190 // "scopes": [ 14191 // "https://www.googleapis.com/auth/cloud-platform" 14192 // ] 14193 // } 14194 14195} 14196 14197// method id "dlp.organizations.storedInfoTypes.get": 14198 14199type OrganizationsStoredInfoTypesGetCall struct { 14200 s *Service 14201 name string 14202 urlParams_ gensupport.URLParams 14203 ifNoneMatch_ string 14204 ctx_ context.Context 14205 header_ http.Header 14206} 14207 14208// Get: Gets a stored infoType. See 14209// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 14210// more. 14211// 14212// - name: Resource name of the organization and storedInfoType to be 14213// read, for example 14214// `organizations/433245324/storedInfoTypes/432452342` or 14215// projects/project-id/storedInfoTypes/432452342. 14216func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { 14217 c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14218 c.name = name 14219 return c 14220} 14221 14222// Fields allows partial responses to be retrieved. See 14223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14224// for more information. 14225func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { 14226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14227 return c 14228} 14229 14230// IfNoneMatch sets the optional parameter which makes the operation 14231// fail if the object's ETag matches the given value. This is useful for 14232// getting updates only after the object has changed since the last 14233// request. Use googleapi.IsNotModified to check whether the response 14234// error from Do is the result of In-None-Match. 14235func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { 14236 c.ifNoneMatch_ = entityTag 14237 return c 14238} 14239 14240// Context sets the context to be used in this call's Do method. Any 14241// pending HTTP request will be aborted if the provided context is 14242// canceled. 14243func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { 14244 c.ctx_ = ctx 14245 return c 14246} 14247 14248// Header returns an http.Header that can be modified by the caller to 14249// add HTTP headers to the request. 14250func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { 14251 if c.header_ == nil { 14252 c.header_ = make(http.Header) 14253 } 14254 return c.header_ 14255} 14256 14257func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 14258 reqHeaders := make(http.Header) 14259 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14260 for k, v := range c.header_ { 14261 reqHeaders[k] = v 14262 } 14263 reqHeaders.Set("User-Agent", c.s.userAgent()) 14264 if c.ifNoneMatch_ != "" { 14265 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14266 } 14267 var body io.Reader = nil 14268 c.urlParams_.Set("alt", alt) 14269 c.urlParams_.Set("prettyPrint", "false") 14270 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14271 urls += "?" + c.urlParams_.Encode() 14272 req, err := http.NewRequest("GET", urls, body) 14273 if err != nil { 14274 return nil, err 14275 } 14276 req.Header = reqHeaders 14277 googleapi.Expand(req.URL, map[string]string{ 14278 "name": c.name, 14279 }) 14280 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14281} 14282 14283// Do executes the "dlp.organizations.storedInfoTypes.get" call. 14284// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 14285// non-nil. Any non-2xx status code is an error. Response headers are in 14286// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 14287// a response was returned at all) in error.(*googleapi.Error).Header. 14288// Use googleapi.IsNotModified to check whether the returned error was 14289// because http.StatusNotModified was returned. 14290func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 14291 gensupport.SetOptions(c.urlParams_, opts...) 14292 res, err := c.doRequest("json") 14293 if res != nil && res.StatusCode == http.StatusNotModified { 14294 if res.Body != nil { 14295 res.Body.Close() 14296 } 14297 return nil, &googleapi.Error{ 14298 Code: res.StatusCode, 14299 Header: res.Header, 14300 } 14301 } 14302 if err != nil { 14303 return nil, err 14304 } 14305 defer googleapi.CloseBody(res) 14306 if err := googleapi.CheckResponse(res); err != nil { 14307 return nil, err 14308 } 14309 ret := &GooglePrivacyDlpV2StoredInfoType{ 14310 ServerResponse: googleapi.ServerResponse{ 14311 Header: res.Header, 14312 HTTPStatusCode: res.StatusCode, 14313 }, 14314 } 14315 target := &ret 14316 if err := gensupport.DecodeResponse(target, res); err != nil { 14317 return nil, err 14318 } 14319 return ret, nil 14320 // { 14321 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 14322 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 14323 // "httpMethod": "GET", 14324 // "id": "dlp.organizations.storedInfoTypes.get", 14325 // "parameterOrder": [ 14326 // "name" 14327 // ], 14328 // "parameters": { 14329 // "name": { 14330 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 14331 // "location": "path", 14332 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 14333 // "required": true, 14334 // "type": "string" 14335 // } 14336 // }, 14337 // "path": "v2/{+name}", 14338 // "response": { 14339 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 14340 // }, 14341 // "scopes": [ 14342 // "https://www.googleapis.com/auth/cloud-platform" 14343 // ] 14344 // } 14345 14346} 14347 14348// method id "dlp.organizations.storedInfoTypes.list": 14349 14350type OrganizationsStoredInfoTypesListCall struct { 14351 s *Service 14352 parentid string 14353 urlParams_ gensupport.URLParams 14354 ifNoneMatch_ string 14355 ctx_ context.Context 14356 header_ http.Header 14357} 14358 14359// List: Lists stored infoTypes. See 14360// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 14361// more. 14362// 14363// - parent: Parent resource name. The format of this value varies 14364// depending on the scope of the request (project or organization) and 14365// whether you have specified a processing location 14366// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 14367// scope, location specified: 14368// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 14369// location specified (defaults to global): `projects/`PROJECT_ID + 14370// Organizations scope, location specified: 14371// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 14372// scope, no location specified (defaults to global): 14373// `organizations/`ORG_ID The following example `parent` string 14374// specifies a parent project with the identifier `example-project`, 14375// and specifies the `europe-west3` location for processing data: 14376// parent=projects/example-project/locations/europe-west3. 14377func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { 14378 c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14379 c.parentid = parentid 14380 return c 14381} 14382 14383// LocationId sets the optional parameter "locationId": Deprecated. This 14384// field has no effect. 14385func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsStoredInfoTypesListCall { 14386 c.urlParams_.Set("locationId", locationId) 14387 return c 14388} 14389 14390// OrderBy sets the optional parameter "orderBy": Comma separated list 14391// of fields to order by, followed by `asc` or `desc` postfix. This list 14392// is case-insensitive, default sorting order is ascending, redundant 14393// space characters are insignificant. Example: `name asc, display_name, 14394// create_time desc` Supported fields are: - `create_time`: corresponds 14395// to time the most recent version of the resource was created. - 14396// `state`: corresponds to the state of the resource. - `name`: 14397// corresponds to resource name. - `display_name`: corresponds to info 14398// type's display name. 14399func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { 14400 c.urlParams_.Set("orderBy", orderBy) 14401 return c 14402} 14403 14404// PageSize sets the optional parameter "pageSize": Size of the page, 14405// can be limited by server. If zero server returns a page of max size 14406// 100. 14407func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { 14408 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14409 return c 14410} 14411 14412// PageToken sets the optional parameter "pageToken": Page token to 14413// continue retrieval. Comes from previous call to 14414// `ListStoredInfoTypes`. 14415func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { 14416 c.urlParams_.Set("pageToken", pageToken) 14417 return c 14418} 14419 14420// Fields allows partial responses to be retrieved. See 14421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14422// for more information. 14423func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { 14424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14425 return c 14426} 14427 14428// IfNoneMatch sets the optional parameter which makes the operation 14429// fail if the object's ETag matches the given value. This is useful for 14430// getting updates only after the object has changed since the last 14431// request. Use googleapi.IsNotModified to check whether the response 14432// error from Do is the result of In-None-Match. 14433func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { 14434 c.ifNoneMatch_ = entityTag 14435 return c 14436} 14437 14438// Context sets the context to be used in this call's Do method. Any 14439// pending HTTP request will be aborted if the provided context is 14440// canceled. 14441func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { 14442 c.ctx_ = ctx 14443 return c 14444} 14445 14446// Header returns an http.Header that can be modified by the caller to 14447// add HTTP headers to the request. 14448func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { 14449 if c.header_ == nil { 14450 c.header_ = make(http.Header) 14451 } 14452 return c.header_ 14453} 14454 14455func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 14456 reqHeaders := make(http.Header) 14457 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14458 for k, v := range c.header_ { 14459 reqHeaders[k] = v 14460 } 14461 reqHeaders.Set("User-Agent", c.s.userAgent()) 14462 if c.ifNoneMatch_ != "" { 14463 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14464 } 14465 var body io.Reader = nil 14466 c.urlParams_.Set("alt", alt) 14467 c.urlParams_.Set("prettyPrint", "false") 14468 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 14469 urls += "?" + c.urlParams_.Encode() 14470 req, err := http.NewRequest("GET", urls, body) 14471 if err != nil { 14472 return nil, err 14473 } 14474 req.Header = reqHeaders 14475 googleapi.Expand(req.URL, map[string]string{ 14476 "parent": c.parentid, 14477 }) 14478 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14479} 14480 14481// Do executes the "dlp.organizations.storedInfoTypes.list" call. 14482// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 14483// error will be non-nil. Any non-2xx status code is an error. Response 14484// headers are in either 14485// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 14486// or (if a response was returned at all) in 14487// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14488// whether the returned error was because http.StatusNotModified was 14489// returned. 14490func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 14491 gensupport.SetOptions(c.urlParams_, opts...) 14492 res, err := c.doRequest("json") 14493 if res != nil && res.StatusCode == http.StatusNotModified { 14494 if res.Body != nil { 14495 res.Body.Close() 14496 } 14497 return nil, &googleapi.Error{ 14498 Code: res.StatusCode, 14499 Header: res.Header, 14500 } 14501 } 14502 if err != nil { 14503 return nil, err 14504 } 14505 defer googleapi.CloseBody(res) 14506 if err := googleapi.CheckResponse(res); err != nil { 14507 return nil, err 14508 } 14509 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 14510 ServerResponse: googleapi.ServerResponse{ 14511 Header: res.Header, 14512 HTTPStatusCode: res.StatusCode, 14513 }, 14514 } 14515 target := &ret 14516 if err := gensupport.DecodeResponse(target, res); err != nil { 14517 return nil, err 14518 } 14519 return ret, nil 14520 // { 14521 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 14522 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 14523 // "httpMethod": "GET", 14524 // "id": "dlp.organizations.storedInfoTypes.list", 14525 // "parameterOrder": [ 14526 // "parent" 14527 // ], 14528 // "parameters": { 14529 // "locationId": { 14530 // "description": "Deprecated. This field has no effect.", 14531 // "location": "query", 14532 // "type": "string" 14533 // }, 14534 // "orderBy": { 14535 // "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.", 14536 // "location": "query", 14537 // "type": "string" 14538 // }, 14539 // "pageSize": { 14540 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 14541 // "format": "int32", 14542 // "location": "query", 14543 // "type": "integer" 14544 // }, 14545 // "pageToken": { 14546 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 14547 // "location": "query", 14548 // "type": "string" 14549 // }, 14550 // "parent": { 14551 // "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", 14552 // "location": "path", 14553 // "pattern": "^organizations/[^/]+$", 14554 // "required": true, 14555 // "type": "string" 14556 // } 14557 // }, 14558 // "path": "v2/{+parent}/storedInfoTypes", 14559 // "response": { 14560 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 14561 // }, 14562 // "scopes": [ 14563 // "https://www.googleapis.com/auth/cloud-platform" 14564 // ] 14565 // } 14566 14567} 14568 14569// Pages invokes f for each page of results. 14570// A non-nil error returned from f will halt the iteration. 14571// The provided context supersedes any context provided to the Context method. 14572func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 14573 c.ctx_ = ctx 14574 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14575 for { 14576 x, err := c.Do() 14577 if err != nil { 14578 return err 14579 } 14580 if err := f(x); err != nil { 14581 return err 14582 } 14583 if x.NextPageToken == "" { 14584 return nil 14585 } 14586 c.PageToken(x.NextPageToken) 14587 } 14588} 14589 14590// method id "dlp.organizations.storedInfoTypes.patch": 14591 14592type OrganizationsStoredInfoTypesPatchCall struct { 14593 s *Service 14594 name string 14595 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 14596 urlParams_ gensupport.URLParams 14597 ctx_ context.Context 14598 header_ http.Header 14599} 14600 14601// Patch: Updates the stored infoType by creating a new version. The 14602// existing version will continue to be used until the new version is 14603// ready. See 14604// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 14605// more. 14606// 14607// - name: Resource name of organization and storedInfoType to be 14608// updated, for example 14609// `organizations/433245324/storedInfoTypes/432452342` or 14610// projects/project-id/storedInfoTypes/432452342. 14611func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { 14612 c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14613 c.name = name 14614 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 14615 return c 14616} 14617 14618// Fields allows partial responses to be retrieved. See 14619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14620// for more information. 14621func (c *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { 14622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14623 return c 14624} 14625 14626// Context sets the context to be used in this call's Do method. Any 14627// pending HTTP request will be aborted if the provided context is 14628// canceled. 14629func (c *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { 14630 c.ctx_ = ctx 14631 return c 14632} 14633 14634// Header returns an http.Header that can be modified by the caller to 14635// add HTTP headers to the request. 14636func (c *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { 14637 if c.header_ == nil { 14638 c.header_ = make(http.Header) 14639 } 14640 return c.header_ 14641} 14642 14643func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 14644 reqHeaders := make(http.Header) 14645 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14646 for k, v := range c.header_ { 14647 reqHeaders[k] = v 14648 } 14649 reqHeaders.Set("User-Agent", c.s.userAgent()) 14650 var body io.Reader = nil 14651 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 14652 if err != nil { 14653 return nil, err 14654 } 14655 reqHeaders.Set("Content-Type", "application/json") 14656 c.urlParams_.Set("alt", alt) 14657 c.urlParams_.Set("prettyPrint", "false") 14658 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14659 urls += "?" + c.urlParams_.Encode() 14660 req, err := http.NewRequest("PATCH", urls, body) 14661 if err != nil { 14662 return nil, err 14663 } 14664 req.Header = reqHeaders 14665 googleapi.Expand(req.URL, map[string]string{ 14666 "name": c.name, 14667 }) 14668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14669} 14670 14671// Do executes the "dlp.organizations.storedInfoTypes.patch" call. 14672// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 14673// non-nil. Any non-2xx status code is an error. Response headers are in 14674// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 14675// a response was returned at all) in error.(*googleapi.Error).Header. 14676// Use googleapi.IsNotModified to check whether the returned error was 14677// because http.StatusNotModified was returned. 14678func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 14679 gensupport.SetOptions(c.urlParams_, opts...) 14680 res, err := c.doRequest("json") 14681 if res != nil && res.StatusCode == http.StatusNotModified { 14682 if res.Body != nil { 14683 res.Body.Close() 14684 } 14685 return nil, &googleapi.Error{ 14686 Code: res.StatusCode, 14687 Header: res.Header, 14688 } 14689 } 14690 if err != nil { 14691 return nil, err 14692 } 14693 defer googleapi.CloseBody(res) 14694 if err := googleapi.CheckResponse(res); err != nil { 14695 return nil, err 14696 } 14697 ret := &GooglePrivacyDlpV2StoredInfoType{ 14698 ServerResponse: googleapi.ServerResponse{ 14699 Header: res.Header, 14700 HTTPStatusCode: res.StatusCode, 14701 }, 14702 } 14703 target := &ret 14704 if err := gensupport.DecodeResponse(target, res); err != nil { 14705 return nil, err 14706 } 14707 return ret, nil 14708 // { 14709 // "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.", 14710 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 14711 // "httpMethod": "PATCH", 14712 // "id": "dlp.organizations.storedInfoTypes.patch", 14713 // "parameterOrder": [ 14714 // "name" 14715 // ], 14716 // "parameters": { 14717 // "name": { 14718 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 14719 // "location": "path", 14720 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 14721 // "required": true, 14722 // "type": "string" 14723 // } 14724 // }, 14725 // "path": "v2/{+name}", 14726 // "request": { 14727 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 14728 // }, 14729 // "response": { 14730 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 14731 // }, 14732 // "scopes": [ 14733 // "https://www.googleapis.com/auth/cloud-platform" 14734 // ] 14735 // } 14736 14737} 14738 14739// method id "dlp.projects.content.deidentify": 14740 14741type ProjectsContentDeidentifyCall struct { 14742 s *Service 14743 parentid string 14744 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 14745 urlParams_ gensupport.URLParams 14746 ctx_ context.Context 14747 header_ http.Header 14748} 14749 14750// Deidentify: De-identifies potentially sensitive info from a 14751// ContentItem. This method has limits on input size and output size. 14752// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 14753// learn more. When no InfoTypes or CustomInfoTypes are specified in 14754// this request, the system will automatically choose what detectors to 14755// run. By default this may be all types, but may change over time as 14756// detectors are updated. 14757// 14758// - parent: Parent resource name. The format of this value varies 14759// depending on whether you have specified a processing location 14760// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 14761// scope, location specified: 14762// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 14763// location specified (defaults to global): `projects/`PROJECT_ID The 14764// following example `parent` string specifies a parent project with 14765// the identifier `example-project`, and specifies the `europe-west3` 14766// location for processing data: 14767// parent=projects/example-project/locations/europe-west3. 14768func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { 14769 c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14770 c.parentid = parentid 14771 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 14772 return c 14773} 14774 14775// Fields allows partial responses to be retrieved. See 14776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14777// for more information. 14778func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { 14779 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14780 return c 14781} 14782 14783// Context sets the context to be used in this call's Do method. Any 14784// pending HTTP request will be aborted if the provided context is 14785// canceled. 14786func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { 14787 c.ctx_ = ctx 14788 return c 14789} 14790 14791// Header returns an http.Header that can be modified by the caller to 14792// add HTTP headers to the request. 14793func (c *ProjectsContentDeidentifyCall) Header() http.Header { 14794 if c.header_ == nil { 14795 c.header_ = make(http.Header) 14796 } 14797 return c.header_ 14798} 14799 14800func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 14801 reqHeaders := make(http.Header) 14802 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14803 for k, v := range c.header_ { 14804 reqHeaders[k] = v 14805 } 14806 reqHeaders.Set("User-Agent", c.s.userAgent()) 14807 var body io.Reader = nil 14808 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 14809 if err != nil { 14810 return nil, err 14811 } 14812 reqHeaders.Set("Content-Type", "application/json") 14813 c.urlParams_.Set("alt", alt) 14814 c.urlParams_.Set("prettyPrint", "false") 14815 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 14816 urls += "?" + c.urlParams_.Encode() 14817 req, err := http.NewRequest("POST", urls, body) 14818 if err != nil { 14819 return nil, err 14820 } 14821 req.Header = reqHeaders 14822 googleapi.Expand(req.URL, map[string]string{ 14823 "parent": c.parentid, 14824 }) 14825 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14826} 14827 14828// Do executes the "dlp.projects.content.deidentify" call. 14829// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 14830// will be non-nil. Any non-2xx status code is an error. Response 14831// headers are in either 14832// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 14833// (if a response was returned at all) in 14834// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14835// whether the returned error was because http.StatusNotModified was 14836// returned. 14837func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 14838 gensupport.SetOptions(c.urlParams_, opts...) 14839 res, err := c.doRequest("json") 14840 if res != nil && res.StatusCode == http.StatusNotModified { 14841 if res.Body != nil { 14842 res.Body.Close() 14843 } 14844 return nil, &googleapi.Error{ 14845 Code: res.StatusCode, 14846 Header: res.Header, 14847 } 14848 } 14849 if err != nil { 14850 return nil, err 14851 } 14852 defer googleapi.CloseBody(res) 14853 if err := googleapi.CheckResponse(res); err != nil { 14854 return nil, err 14855 } 14856 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 14857 ServerResponse: googleapi.ServerResponse{ 14858 Header: res.Header, 14859 HTTPStatusCode: res.StatusCode, 14860 }, 14861 } 14862 target := &ret 14863 if err := gensupport.DecodeResponse(target, res); err != nil { 14864 return nil, err 14865 } 14866 return ret, nil 14867 // { 14868 // "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.", 14869 // "flatPath": "v2/projects/{projectsId}/content:deidentify", 14870 // "httpMethod": "POST", 14871 // "id": "dlp.projects.content.deidentify", 14872 // "parameterOrder": [ 14873 // "parent" 14874 // ], 14875 // "parameters": { 14876 // "parent": { 14877 // "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", 14878 // "location": "path", 14879 // "pattern": "^projects/[^/]+$", 14880 // "required": true, 14881 // "type": "string" 14882 // } 14883 // }, 14884 // "path": "v2/{+parent}/content:deidentify", 14885 // "request": { 14886 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 14887 // }, 14888 // "response": { 14889 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 14890 // }, 14891 // "scopes": [ 14892 // "https://www.googleapis.com/auth/cloud-platform" 14893 // ] 14894 // } 14895 14896} 14897 14898// method id "dlp.projects.content.inspect": 14899 14900type ProjectsContentInspectCall struct { 14901 s *Service 14902 parentid string 14903 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 14904 urlParams_ gensupport.URLParams 14905 ctx_ context.Context 14906 header_ http.Header 14907} 14908 14909// Inspect: Finds potentially sensitive info in content. This method has 14910// limits on input size, processing time, and output size. When no 14911// InfoTypes or CustomInfoTypes are specified in this request, the 14912// system will automatically choose what detectors to run. By default 14913// this may be all types, but may change over time as detectors are 14914// updated. For how to guides, see 14915// https://cloud.google.com/dlp/docs/inspecting-images and 14916// https://cloud.google.com/dlp/docs/inspecting-text, 14917// 14918// - parent: Parent resource name. The format of this value varies 14919// depending on whether you have specified a processing location 14920// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 14921// scope, location specified: 14922// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 14923// location specified (defaults to global): `projects/`PROJECT_ID The 14924// following example `parent` string specifies a parent project with 14925// the identifier `example-project`, and specifies the `europe-west3` 14926// location for processing data: 14927// parent=projects/example-project/locations/europe-west3. 14928func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { 14929 c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14930 c.parentid = parentid 14931 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 14932 return c 14933} 14934 14935// Fields allows partial responses to be retrieved. See 14936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14937// for more information. 14938func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { 14939 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14940 return c 14941} 14942 14943// Context sets the context to be used in this call's Do method. Any 14944// pending HTTP request will be aborted if the provided context is 14945// canceled. 14946func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { 14947 c.ctx_ = ctx 14948 return c 14949} 14950 14951// Header returns an http.Header that can be modified by the caller to 14952// add HTTP headers to the request. 14953func (c *ProjectsContentInspectCall) Header() http.Header { 14954 if c.header_ == nil { 14955 c.header_ = make(http.Header) 14956 } 14957 return c.header_ 14958} 14959 14960func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { 14961 reqHeaders := make(http.Header) 14962 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 14963 for k, v := range c.header_ { 14964 reqHeaders[k] = v 14965 } 14966 reqHeaders.Set("User-Agent", c.s.userAgent()) 14967 var body io.Reader = nil 14968 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 14969 if err != nil { 14970 return nil, err 14971 } 14972 reqHeaders.Set("Content-Type", "application/json") 14973 c.urlParams_.Set("alt", alt) 14974 c.urlParams_.Set("prettyPrint", "false") 14975 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 14976 urls += "?" + c.urlParams_.Encode() 14977 req, err := http.NewRequest("POST", urls, body) 14978 if err != nil { 14979 return nil, err 14980 } 14981 req.Header = reqHeaders 14982 googleapi.Expand(req.URL, map[string]string{ 14983 "parent": c.parentid, 14984 }) 14985 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14986} 14987 14988// Do executes the "dlp.projects.content.inspect" call. 14989// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 14990// will be non-nil. Any non-2xx status code is an error. Response 14991// headers are in either 14992// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 14993// (if a response was returned at all) in 14994// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14995// whether the returned error was because http.StatusNotModified was 14996// returned. 14997func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 14998 gensupport.SetOptions(c.urlParams_, opts...) 14999 res, err := c.doRequest("json") 15000 if res != nil && res.StatusCode == http.StatusNotModified { 15001 if res.Body != nil { 15002 res.Body.Close() 15003 } 15004 return nil, &googleapi.Error{ 15005 Code: res.StatusCode, 15006 Header: res.Header, 15007 } 15008 } 15009 if err != nil { 15010 return nil, err 15011 } 15012 defer googleapi.CloseBody(res) 15013 if err := googleapi.CheckResponse(res); err != nil { 15014 return nil, err 15015 } 15016 ret := &GooglePrivacyDlpV2InspectContentResponse{ 15017 ServerResponse: googleapi.ServerResponse{ 15018 Header: res.Header, 15019 HTTPStatusCode: res.StatusCode, 15020 }, 15021 } 15022 target := &ret 15023 if err := gensupport.DecodeResponse(target, res); err != nil { 15024 return nil, err 15025 } 15026 return ret, nil 15027 // { 15028 // "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,", 15029 // "flatPath": "v2/projects/{projectsId}/content:inspect", 15030 // "httpMethod": "POST", 15031 // "id": "dlp.projects.content.inspect", 15032 // "parameterOrder": [ 15033 // "parent" 15034 // ], 15035 // "parameters": { 15036 // "parent": { 15037 // "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", 15038 // "location": "path", 15039 // "pattern": "^projects/[^/]+$", 15040 // "required": true, 15041 // "type": "string" 15042 // } 15043 // }, 15044 // "path": "v2/{+parent}/content:inspect", 15045 // "request": { 15046 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 15047 // }, 15048 // "response": { 15049 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 15050 // }, 15051 // "scopes": [ 15052 // "https://www.googleapis.com/auth/cloud-platform" 15053 // ] 15054 // } 15055 15056} 15057 15058// method id "dlp.projects.content.reidentify": 15059 15060type ProjectsContentReidentifyCall struct { 15061 s *Service 15062 parentid string 15063 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 15064 urlParams_ gensupport.URLParams 15065 ctx_ context.Context 15066 header_ http.Header 15067} 15068 15069// Reidentify: Re-identifies content that has been de-identified. See 15070// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example 15071// to learn more. 15072// 15073// - parent: Parent resource name. The format of this value varies 15074// depending on whether you have specified a processing location 15075// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 15076// scope, location specified: 15077// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 15078// location specified (defaults to global): `projects/`PROJECT_ID The 15079// following example `parent` string specifies a parent project with 15080// the identifier `example-project`, and specifies the `europe-west3` 15081// location for processing data: 15082// parent=projects/example-project/locations/europe-west3. 15083func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { 15084 c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15085 c.parentid = parentid 15086 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 15087 return c 15088} 15089 15090// Fields allows partial responses to be retrieved. See 15091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15092// for more information. 15093func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { 15094 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15095 return c 15096} 15097 15098// Context sets the context to be used in this call's Do method. Any 15099// pending HTTP request will be aborted if the provided context is 15100// canceled. 15101func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { 15102 c.ctx_ = ctx 15103 return c 15104} 15105 15106// Header returns an http.Header that can be modified by the caller to 15107// add HTTP headers to the request. 15108func (c *ProjectsContentReidentifyCall) Header() http.Header { 15109 if c.header_ == nil { 15110 c.header_ = make(http.Header) 15111 } 15112 return c.header_ 15113} 15114 15115func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 15116 reqHeaders := make(http.Header) 15117 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15118 for k, v := range c.header_ { 15119 reqHeaders[k] = v 15120 } 15121 reqHeaders.Set("User-Agent", c.s.userAgent()) 15122 var body io.Reader = nil 15123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 15124 if err != nil { 15125 return nil, err 15126 } 15127 reqHeaders.Set("Content-Type", "application/json") 15128 c.urlParams_.Set("alt", alt) 15129 c.urlParams_.Set("prettyPrint", "false") 15130 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 15131 urls += "?" + c.urlParams_.Encode() 15132 req, err := http.NewRequest("POST", urls, body) 15133 if err != nil { 15134 return nil, err 15135 } 15136 req.Header = reqHeaders 15137 googleapi.Expand(req.URL, map[string]string{ 15138 "parent": c.parentid, 15139 }) 15140 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15141} 15142 15143// Do executes the "dlp.projects.content.reidentify" call. 15144// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 15145// will be non-nil. Any non-2xx status code is an error. Response 15146// headers are in either 15147// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 15148// (if a response was returned at all) in 15149// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15150// whether the returned error was because http.StatusNotModified was 15151// returned. 15152func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 15153 gensupport.SetOptions(c.urlParams_, opts...) 15154 res, err := c.doRequest("json") 15155 if res != nil && res.StatusCode == http.StatusNotModified { 15156 if res.Body != nil { 15157 res.Body.Close() 15158 } 15159 return nil, &googleapi.Error{ 15160 Code: res.StatusCode, 15161 Header: res.Header, 15162 } 15163 } 15164 if err != nil { 15165 return nil, err 15166 } 15167 defer googleapi.CloseBody(res) 15168 if err := googleapi.CheckResponse(res); err != nil { 15169 return nil, err 15170 } 15171 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 15172 ServerResponse: googleapi.ServerResponse{ 15173 Header: res.Header, 15174 HTTPStatusCode: res.StatusCode, 15175 }, 15176 } 15177 target := &ret 15178 if err := gensupport.DecodeResponse(target, res); err != nil { 15179 return nil, err 15180 } 15181 return ret, nil 15182 // { 15183 // "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.", 15184 // "flatPath": "v2/projects/{projectsId}/content:reidentify", 15185 // "httpMethod": "POST", 15186 // "id": "dlp.projects.content.reidentify", 15187 // "parameterOrder": [ 15188 // "parent" 15189 // ], 15190 // "parameters": { 15191 // "parent": { 15192 // "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", 15193 // "location": "path", 15194 // "pattern": "^projects/[^/]+$", 15195 // "required": true, 15196 // "type": "string" 15197 // } 15198 // }, 15199 // "path": "v2/{+parent}/content:reidentify", 15200 // "request": { 15201 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 15202 // }, 15203 // "response": { 15204 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 15205 // }, 15206 // "scopes": [ 15207 // "https://www.googleapis.com/auth/cloud-platform" 15208 // ] 15209 // } 15210 15211} 15212 15213// method id "dlp.projects.deidentifyTemplates.create": 15214 15215type ProjectsDeidentifyTemplatesCreateCall struct { 15216 s *Service 15217 parentid string 15218 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 15219 urlParams_ gensupport.URLParams 15220 ctx_ context.Context 15221 header_ http.Header 15222} 15223 15224// Create: Creates a DeidentifyTemplate for re-using frequently used 15225// configuration for de-identifying content, images, and storage. See 15226// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 15227// more. 15228// 15229// - parent: Parent resource name. The format of this value varies 15230// depending on the scope of the request (project or organization) and 15231// whether you have specified a processing location 15232// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 15233// scope, location specified: 15234// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 15235// location specified (defaults to global): `projects/`PROJECT_ID + 15236// Organizations scope, location specified: 15237// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 15238// scope, no location specified (defaults to global): 15239// `organizations/`ORG_ID The following example `parent` string 15240// specifies a parent project with the identifier `example-project`, 15241// and specifies the `europe-west3` location for processing data: 15242// parent=projects/example-project/locations/europe-west3. 15243func (r *ProjectsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { 15244 c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15245 c.parentid = parentid 15246 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 15247 return c 15248} 15249 15250// Fields allows partial responses to be retrieved. See 15251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15252// for more information. 15253func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { 15254 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15255 return c 15256} 15257 15258// Context sets the context to be used in this call's Do method. Any 15259// pending HTTP request will be aborted if the provided context is 15260// canceled. 15261func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { 15262 c.ctx_ = ctx 15263 return c 15264} 15265 15266// Header returns an http.Header that can be modified by the caller to 15267// add HTTP headers to the request. 15268func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { 15269 if c.header_ == nil { 15270 c.header_ = make(http.Header) 15271 } 15272 return c.header_ 15273} 15274 15275func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 15276 reqHeaders := make(http.Header) 15277 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15278 for k, v := range c.header_ { 15279 reqHeaders[k] = v 15280 } 15281 reqHeaders.Set("User-Agent", c.s.userAgent()) 15282 var body io.Reader = nil 15283 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 15284 if err != nil { 15285 return nil, err 15286 } 15287 reqHeaders.Set("Content-Type", "application/json") 15288 c.urlParams_.Set("alt", alt) 15289 c.urlParams_.Set("prettyPrint", "false") 15290 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 15291 urls += "?" + c.urlParams_.Encode() 15292 req, err := http.NewRequest("POST", urls, body) 15293 if err != nil { 15294 return nil, err 15295 } 15296 req.Header = reqHeaders 15297 googleapi.Expand(req.URL, map[string]string{ 15298 "parent": c.parentid, 15299 }) 15300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15301} 15302 15303// Do executes the "dlp.projects.deidentifyTemplates.create" call. 15304// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 15305// non-nil. Any non-2xx status code is an error. Response headers are in 15306// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 15307// (if a response was returned at all) in 15308// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15309// whether the returned error was because http.StatusNotModified was 15310// returned. 15311func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 15312 gensupport.SetOptions(c.urlParams_, opts...) 15313 res, err := c.doRequest("json") 15314 if res != nil && res.StatusCode == http.StatusNotModified { 15315 if res.Body != nil { 15316 res.Body.Close() 15317 } 15318 return nil, &googleapi.Error{ 15319 Code: res.StatusCode, 15320 Header: res.Header, 15321 } 15322 } 15323 if err != nil { 15324 return nil, err 15325 } 15326 defer googleapi.CloseBody(res) 15327 if err := googleapi.CheckResponse(res); err != nil { 15328 return nil, err 15329 } 15330 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 15331 ServerResponse: googleapi.ServerResponse{ 15332 Header: res.Header, 15333 HTTPStatusCode: res.StatusCode, 15334 }, 15335 } 15336 target := &ret 15337 if err := gensupport.DecodeResponse(target, res); err != nil { 15338 return nil, err 15339 } 15340 return ret, nil 15341 // { 15342 // "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.", 15343 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 15344 // "httpMethod": "POST", 15345 // "id": "dlp.projects.deidentifyTemplates.create", 15346 // "parameterOrder": [ 15347 // "parent" 15348 // ], 15349 // "parameters": { 15350 // "parent": { 15351 // "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", 15352 // "location": "path", 15353 // "pattern": "^projects/[^/]+$", 15354 // "required": true, 15355 // "type": "string" 15356 // } 15357 // }, 15358 // "path": "v2/{+parent}/deidentifyTemplates", 15359 // "request": { 15360 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 15361 // }, 15362 // "response": { 15363 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 15364 // }, 15365 // "scopes": [ 15366 // "https://www.googleapis.com/auth/cloud-platform" 15367 // ] 15368 // } 15369 15370} 15371 15372// method id "dlp.projects.deidentifyTemplates.delete": 15373 15374type ProjectsDeidentifyTemplatesDeleteCall struct { 15375 s *Service 15376 name string 15377 urlParams_ gensupport.URLParams 15378 ctx_ context.Context 15379 header_ http.Header 15380} 15381 15382// Delete: Deletes a DeidentifyTemplate. See 15383// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 15384// more. 15385// 15386// - name: Resource name of the organization and deidentify template to 15387// be deleted, for example 15388// `organizations/433245324/deidentifyTemplates/432452342` or 15389// projects/project-id/deidentifyTemplates/432452342. 15390func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { 15391 c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15392 c.name = name 15393 return c 15394} 15395 15396// Fields allows partial responses to be retrieved. See 15397// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15398// for more information. 15399func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { 15400 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15401 return c 15402} 15403 15404// Context sets the context to be used in this call's Do method. Any 15405// pending HTTP request will be aborted if the provided context is 15406// canceled. 15407func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { 15408 c.ctx_ = ctx 15409 return c 15410} 15411 15412// Header returns an http.Header that can be modified by the caller to 15413// add HTTP headers to the request. 15414func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { 15415 if c.header_ == nil { 15416 c.header_ = make(http.Header) 15417 } 15418 return c.header_ 15419} 15420 15421func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 15422 reqHeaders := make(http.Header) 15423 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15424 for k, v := range c.header_ { 15425 reqHeaders[k] = v 15426 } 15427 reqHeaders.Set("User-Agent", c.s.userAgent()) 15428 var body io.Reader = nil 15429 c.urlParams_.Set("alt", alt) 15430 c.urlParams_.Set("prettyPrint", "false") 15431 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15432 urls += "?" + c.urlParams_.Encode() 15433 req, err := http.NewRequest("DELETE", urls, body) 15434 if err != nil { 15435 return nil, err 15436 } 15437 req.Header = reqHeaders 15438 googleapi.Expand(req.URL, map[string]string{ 15439 "name": c.name, 15440 }) 15441 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15442} 15443 15444// Do executes the "dlp.projects.deidentifyTemplates.delete" call. 15445// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15446// non-2xx status code is an error. Response headers are in either 15447// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15448// returned at all) in error.(*googleapi.Error).Header. Use 15449// googleapi.IsNotModified to check whether the returned error was 15450// because http.StatusNotModified was returned. 15451func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15452 gensupport.SetOptions(c.urlParams_, opts...) 15453 res, err := c.doRequest("json") 15454 if res != nil && res.StatusCode == http.StatusNotModified { 15455 if res.Body != nil { 15456 res.Body.Close() 15457 } 15458 return nil, &googleapi.Error{ 15459 Code: res.StatusCode, 15460 Header: res.Header, 15461 } 15462 } 15463 if err != nil { 15464 return nil, err 15465 } 15466 defer googleapi.CloseBody(res) 15467 if err := googleapi.CheckResponse(res); err != nil { 15468 return nil, err 15469 } 15470 ret := &GoogleProtobufEmpty{ 15471 ServerResponse: googleapi.ServerResponse{ 15472 Header: res.Header, 15473 HTTPStatusCode: res.StatusCode, 15474 }, 15475 } 15476 target := &ret 15477 if err := gensupport.DecodeResponse(target, res); err != nil { 15478 return nil, err 15479 } 15480 return ret, nil 15481 // { 15482 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 15483 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 15484 // "httpMethod": "DELETE", 15485 // "id": "dlp.projects.deidentifyTemplates.delete", 15486 // "parameterOrder": [ 15487 // "name" 15488 // ], 15489 // "parameters": { 15490 // "name": { 15491 // "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.", 15492 // "location": "path", 15493 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 15494 // "required": true, 15495 // "type": "string" 15496 // } 15497 // }, 15498 // "path": "v2/{+name}", 15499 // "response": { 15500 // "$ref": "GoogleProtobufEmpty" 15501 // }, 15502 // "scopes": [ 15503 // "https://www.googleapis.com/auth/cloud-platform" 15504 // ] 15505 // } 15506 15507} 15508 15509// method id "dlp.projects.deidentifyTemplates.get": 15510 15511type ProjectsDeidentifyTemplatesGetCall struct { 15512 s *Service 15513 name string 15514 urlParams_ gensupport.URLParams 15515 ifNoneMatch_ string 15516 ctx_ context.Context 15517 header_ http.Header 15518} 15519 15520// Get: Gets a DeidentifyTemplate. See 15521// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 15522// more. 15523// 15524// - name: Resource name of the organization and deidentify template to 15525// be read, for example 15526// `organizations/433245324/deidentifyTemplates/432452342` or 15527// projects/project-id/deidentifyTemplates/432452342. 15528func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { 15529 c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15530 c.name = name 15531 return c 15532} 15533 15534// Fields allows partial responses to be retrieved. See 15535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15536// for more information. 15537func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { 15538 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15539 return c 15540} 15541 15542// IfNoneMatch sets the optional parameter which makes the operation 15543// fail if the object's ETag matches the given value. This is useful for 15544// getting updates only after the object has changed since the last 15545// request. Use googleapi.IsNotModified to check whether the response 15546// error from Do is the result of In-None-Match. 15547func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { 15548 c.ifNoneMatch_ = entityTag 15549 return c 15550} 15551 15552// Context sets the context to be used in this call's Do method. Any 15553// pending HTTP request will be aborted if the provided context is 15554// canceled. 15555func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { 15556 c.ctx_ = ctx 15557 return c 15558} 15559 15560// Header returns an http.Header that can be modified by the caller to 15561// add HTTP headers to the request. 15562func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { 15563 if c.header_ == nil { 15564 c.header_ = make(http.Header) 15565 } 15566 return c.header_ 15567} 15568 15569func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 15570 reqHeaders := make(http.Header) 15571 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15572 for k, v := range c.header_ { 15573 reqHeaders[k] = v 15574 } 15575 reqHeaders.Set("User-Agent", c.s.userAgent()) 15576 if c.ifNoneMatch_ != "" { 15577 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15578 } 15579 var body io.Reader = nil 15580 c.urlParams_.Set("alt", alt) 15581 c.urlParams_.Set("prettyPrint", "false") 15582 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15583 urls += "?" + c.urlParams_.Encode() 15584 req, err := http.NewRequest("GET", urls, body) 15585 if err != nil { 15586 return nil, err 15587 } 15588 req.Header = reqHeaders 15589 googleapi.Expand(req.URL, map[string]string{ 15590 "name": c.name, 15591 }) 15592 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15593} 15594 15595// Do executes the "dlp.projects.deidentifyTemplates.get" call. 15596// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 15597// non-nil. Any non-2xx status code is an error. Response headers are in 15598// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 15599// (if a response was returned at all) in 15600// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15601// whether the returned error was because http.StatusNotModified was 15602// returned. 15603func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 15604 gensupport.SetOptions(c.urlParams_, opts...) 15605 res, err := c.doRequest("json") 15606 if res != nil && res.StatusCode == http.StatusNotModified { 15607 if res.Body != nil { 15608 res.Body.Close() 15609 } 15610 return nil, &googleapi.Error{ 15611 Code: res.StatusCode, 15612 Header: res.Header, 15613 } 15614 } 15615 if err != nil { 15616 return nil, err 15617 } 15618 defer googleapi.CloseBody(res) 15619 if err := googleapi.CheckResponse(res); err != nil { 15620 return nil, err 15621 } 15622 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 15623 ServerResponse: googleapi.ServerResponse{ 15624 Header: res.Header, 15625 HTTPStatusCode: res.StatusCode, 15626 }, 15627 } 15628 target := &ret 15629 if err := gensupport.DecodeResponse(target, res); err != nil { 15630 return nil, err 15631 } 15632 return ret, nil 15633 // { 15634 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 15635 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 15636 // "httpMethod": "GET", 15637 // "id": "dlp.projects.deidentifyTemplates.get", 15638 // "parameterOrder": [ 15639 // "name" 15640 // ], 15641 // "parameters": { 15642 // "name": { 15643 // "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.", 15644 // "location": "path", 15645 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 15646 // "required": true, 15647 // "type": "string" 15648 // } 15649 // }, 15650 // "path": "v2/{+name}", 15651 // "response": { 15652 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 15653 // }, 15654 // "scopes": [ 15655 // "https://www.googleapis.com/auth/cloud-platform" 15656 // ] 15657 // } 15658 15659} 15660 15661// method id "dlp.projects.deidentifyTemplates.list": 15662 15663type ProjectsDeidentifyTemplatesListCall struct { 15664 s *Service 15665 parentid string 15666 urlParams_ gensupport.URLParams 15667 ifNoneMatch_ string 15668 ctx_ context.Context 15669 header_ http.Header 15670} 15671 15672// List: Lists DeidentifyTemplates. See 15673// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 15674// more. 15675// 15676// - parent: Parent resource name. The format of this value varies 15677// depending on the scope of the request (project or organization) and 15678// whether you have specified a processing location 15679// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 15680// scope, location specified: 15681// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 15682// location specified (defaults to global): `projects/`PROJECT_ID + 15683// Organizations scope, location specified: 15684// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 15685// scope, no location specified (defaults to global): 15686// `organizations/`ORG_ID The following example `parent` string 15687// specifies a parent project with the identifier `example-project`, 15688// and specifies the `europe-west3` location for processing data: 15689// parent=projects/example-project/locations/europe-west3. 15690func (r *ProjectsDeidentifyTemplatesService) List(parentid string) *ProjectsDeidentifyTemplatesListCall { 15691 c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15692 c.parentid = parentid 15693 return c 15694} 15695 15696// LocationId sets the optional parameter "locationId": Deprecated. This 15697// field has no effect. 15698func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsDeidentifyTemplatesListCall { 15699 c.urlParams_.Set("locationId", locationId) 15700 return c 15701} 15702 15703// OrderBy sets the optional parameter "orderBy": Comma separated list 15704// of fields to order by, followed by `asc` or `desc` postfix. This list 15705// is case-insensitive, default sorting order is ascending, redundant 15706// space characters are insignificant. Example: `name asc,update_time, 15707// create_time desc` Supported fields are: - `create_time`: corresponds 15708// to time the template was created. - `update_time`: corresponds to 15709// time the template was last updated. - `name`: corresponds to 15710// template's name. - `display_name`: corresponds to template's display 15711// name. 15712func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { 15713 c.urlParams_.Set("orderBy", orderBy) 15714 return c 15715} 15716 15717// PageSize sets the optional parameter "pageSize": Size of the page, 15718// can be limited by server. If zero server returns a page of max size 15719// 100. 15720func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { 15721 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15722 return c 15723} 15724 15725// PageToken sets the optional parameter "pageToken": Page token to 15726// continue retrieval. Comes from previous call to 15727// `ListDeidentifyTemplates`. 15728func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { 15729 c.urlParams_.Set("pageToken", pageToken) 15730 return c 15731} 15732 15733// Fields allows partial responses to be retrieved. See 15734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15735// for more information. 15736func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { 15737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15738 return c 15739} 15740 15741// IfNoneMatch sets the optional parameter which makes the operation 15742// fail if the object's ETag matches the given value. This is useful for 15743// getting updates only after the object has changed since the last 15744// request. Use googleapi.IsNotModified to check whether the response 15745// error from Do is the result of In-None-Match. 15746func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { 15747 c.ifNoneMatch_ = entityTag 15748 return c 15749} 15750 15751// Context sets the context to be used in this call's Do method. Any 15752// pending HTTP request will be aborted if the provided context is 15753// canceled. 15754func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { 15755 c.ctx_ = ctx 15756 return c 15757} 15758 15759// Header returns an http.Header that can be modified by the caller to 15760// add HTTP headers to the request. 15761func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { 15762 if c.header_ == nil { 15763 c.header_ = make(http.Header) 15764 } 15765 return c.header_ 15766} 15767 15768func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 15769 reqHeaders := make(http.Header) 15770 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15771 for k, v := range c.header_ { 15772 reqHeaders[k] = v 15773 } 15774 reqHeaders.Set("User-Agent", c.s.userAgent()) 15775 if c.ifNoneMatch_ != "" { 15776 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15777 } 15778 var body io.Reader = nil 15779 c.urlParams_.Set("alt", alt) 15780 c.urlParams_.Set("prettyPrint", "false") 15781 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 15782 urls += "?" + c.urlParams_.Encode() 15783 req, err := http.NewRequest("GET", urls, body) 15784 if err != nil { 15785 return nil, err 15786 } 15787 req.Header = reqHeaders 15788 googleapi.Expand(req.URL, map[string]string{ 15789 "parent": c.parentid, 15790 }) 15791 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15792} 15793 15794// Do executes the "dlp.projects.deidentifyTemplates.list" call. 15795// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 15796// error will be non-nil. Any non-2xx status code is an error. Response 15797// headers are in either 15798// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 15799// er or (if a response was returned at all) in 15800// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15801// whether the returned error was because http.StatusNotModified was 15802// returned. 15803func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 15804 gensupport.SetOptions(c.urlParams_, opts...) 15805 res, err := c.doRequest("json") 15806 if res != nil && res.StatusCode == http.StatusNotModified { 15807 if res.Body != nil { 15808 res.Body.Close() 15809 } 15810 return nil, &googleapi.Error{ 15811 Code: res.StatusCode, 15812 Header: res.Header, 15813 } 15814 } 15815 if err != nil { 15816 return nil, err 15817 } 15818 defer googleapi.CloseBody(res) 15819 if err := googleapi.CheckResponse(res); err != nil { 15820 return nil, err 15821 } 15822 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 15823 ServerResponse: googleapi.ServerResponse{ 15824 Header: res.Header, 15825 HTTPStatusCode: res.StatusCode, 15826 }, 15827 } 15828 target := &ret 15829 if err := gensupport.DecodeResponse(target, res); err != nil { 15830 return nil, err 15831 } 15832 return ret, nil 15833 // { 15834 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 15835 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 15836 // "httpMethod": "GET", 15837 // "id": "dlp.projects.deidentifyTemplates.list", 15838 // "parameterOrder": [ 15839 // "parent" 15840 // ], 15841 // "parameters": { 15842 // "locationId": { 15843 // "description": "Deprecated. This field has no effect.", 15844 // "location": "query", 15845 // "type": "string" 15846 // }, 15847 // "orderBy": { 15848 // "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.", 15849 // "location": "query", 15850 // "type": "string" 15851 // }, 15852 // "pageSize": { 15853 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 15854 // "format": "int32", 15855 // "location": "query", 15856 // "type": "integer" 15857 // }, 15858 // "pageToken": { 15859 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 15860 // "location": "query", 15861 // "type": "string" 15862 // }, 15863 // "parent": { 15864 // "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", 15865 // "location": "path", 15866 // "pattern": "^projects/[^/]+$", 15867 // "required": true, 15868 // "type": "string" 15869 // } 15870 // }, 15871 // "path": "v2/{+parent}/deidentifyTemplates", 15872 // "response": { 15873 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 15874 // }, 15875 // "scopes": [ 15876 // "https://www.googleapis.com/auth/cloud-platform" 15877 // ] 15878 // } 15879 15880} 15881 15882// Pages invokes f for each page of results. 15883// A non-nil error returned from f will halt the iteration. 15884// The provided context supersedes any context provided to the Context method. 15885func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 15886 c.ctx_ = ctx 15887 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15888 for { 15889 x, err := c.Do() 15890 if err != nil { 15891 return err 15892 } 15893 if err := f(x); err != nil { 15894 return err 15895 } 15896 if x.NextPageToken == "" { 15897 return nil 15898 } 15899 c.PageToken(x.NextPageToken) 15900 } 15901} 15902 15903// method id "dlp.projects.deidentifyTemplates.patch": 15904 15905type ProjectsDeidentifyTemplatesPatchCall struct { 15906 s *Service 15907 name string 15908 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 15909 urlParams_ gensupport.URLParams 15910 ctx_ context.Context 15911 header_ http.Header 15912} 15913 15914// Patch: Updates the DeidentifyTemplate. See 15915// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 15916// more. 15917// 15918// - name: Resource name of organization and deidentify template to be 15919// updated, for example 15920// `organizations/433245324/deidentifyTemplates/432452342` or 15921// projects/project-id/deidentifyTemplates/432452342. 15922func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { 15923 c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15924 c.name = name 15925 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 15926 return c 15927} 15928 15929// Fields allows partial responses to be retrieved. See 15930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15931// for more information. 15932func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { 15933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15934 return c 15935} 15936 15937// Context sets the context to be used in this call's Do method. Any 15938// pending HTTP request will be aborted if the provided context is 15939// canceled. 15940func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { 15941 c.ctx_ = ctx 15942 return c 15943} 15944 15945// Header returns an http.Header that can be modified by the caller to 15946// add HTTP headers to the request. 15947func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { 15948 if c.header_ == nil { 15949 c.header_ = make(http.Header) 15950 } 15951 return c.header_ 15952} 15953 15954func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 15955 reqHeaders := make(http.Header) 15956 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 15957 for k, v := range c.header_ { 15958 reqHeaders[k] = v 15959 } 15960 reqHeaders.Set("User-Agent", c.s.userAgent()) 15961 var body io.Reader = nil 15962 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 15963 if err != nil { 15964 return nil, err 15965 } 15966 reqHeaders.Set("Content-Type", "application/json") 15967 c.urlParams_.Set("alt", alt) 15968 c.urlParams_.Set("prettyPrint", "false") 15969 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15970 urls += "?" + c.urlParams_.Encode() 15971 req, err := http.NewRequest("PATCH", urls, body) 15972 if err != nil { 15973 return nil, err 15974 } 15975 req.Header = reqHeaders 15976 googleapi.Expand(req.URL, map[string]string{ 15977 "name": c.name, 15978 }) 15979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15980} 15981 15982// Do executes the "dlp.projects.deidentifyTemplates.patch" call. 15983// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 15984// non-nil. Any non-2xx status code is an error. Response headers are in 15985// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 15986// (if a response was returned at all) in 15987// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15988// whether the returned error was because http.StatusNotModified was 15989// returned. 15990func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 15991 gensupport.SetOptions(c.urlParams_, opts...) 15992 res, err := c.doRequest("json") 15993 if res != nil && res.StatusCode == http.StatusNotModified { 15994 if res.Body != nil { 15995 res.Body.Close() 15996 } 15997 return nil, &googleapi.Error{ 15998 Code: res.StatusCode, 15999 Header: res.Header, 16000 } 16001 } 16002 if err != nil { 16003 return nil, err 16004 } 16005 defer googleapi.CloseBody(res) 16006 if err := googleapi.CheckResponse(res); err != nil { 16007 return nil, err 16008 } 16009 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 16010 ServerResponse: googleapi.ServerResponse{ 16011 Header: res.Header, 16012 HTTPStatusCode: res.StatusCode, 16013 }, 16014 } 16015 target := &ret 16016 if err := gensupport.DecodeResponse(target, res); err != nil { 16017 return nil, err 16018 } 16019 return ret, nil 16020 // { 16021 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 16022 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 16023 // "httpMethod": "PATCH", 16024 // "id": "dlp.projects.deidentifyTemplates.patch", 16025 // "parameterOrder": [ 16026 // "name" 16027 // ], 16028 // "parameters": { 16029 // "name": { 16030 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 16031 // "location": "path", 16032 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 16033 // "required": true, 16034 // "type": "string" 16035 // } 16036 // }, 16037 // "path": "v2/{+name}", 16038 // "request": { 16039 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 16040 // }, 16041 // "response": { 16042 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 16043 // }, 16044 // "scopes": [ 16045 // "https://www.googleapis.com/auth/cloud-platform" 16046 // ] 16047 // } 16048 16049} 16050 16051// method id "dlp.projects.dlpJobs.cancel": 16052 16053type ProjectsDlpJobsCancelCall struct { 16054 s *Service 16055 name string 16056 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 16057 urlParams_ gensupport.URLParams 16058 ctx_ context.Context 16059 header_ http.Header 16060} 16061 16062// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 16063// The server makes a best effort to cancel the DlpJob, but success is 16064// not guaranteed. See 16065// https://cloud.google.com/dlp/docs/inspecting-storage and 16066// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 16067// more. 16068// 16069// - name: The name of the DlpJob resource to be cancelled. 16070func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { 16071 c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16072 c.name = name 16073 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 16074 return c 16075} 16076 16077// Fields allows partial responses to be retrieved. See 16078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16079// for more information. 16080func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { 16081 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16082 return c 16083} 16084 16085// Context sets the context to be used in this call's Do method. Any 16086// pending HTTP request will be aborted if the provided context is 16087// canceled. 16088func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { 16089 c.ctx_ = ctx 16090 return c 16091} 16092 16093// Header returns an http.Header that can be modified by the caller to 16094// add HTTP headers to the request. 16095func (c *ProjectsDlpJobsCancelCall) Header() http.Header { 16096 if c.header_ == nil { 16097 c.header_ = make(http.Header) 16098 } 16099 return c.header_ 16100} 16101 16102func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 16103 reqHeaders := make(http.Header) 16104 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16105 for k, v := range c.header_ { 16106 reqHeaders[k] = v 16107 } 16108 reqHeaders.Set("User-Agent", c.s.userAgent()) 16109 var body io.Reader = nil 16110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 16111 if err != nil { 16112 return nil, err 16113 } 16114 reqHeaders.Set("Content-Type", "application/json") 16115 c.urlParams_.Set("alt", alt) 16116 c.urlParams_.Set("prettyPrint", "false") 16117 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 16118 urls += "?" + c.urlParams_.Encode() 16119 req, err := http.NewRequest("POST", urls, body) 16120 if err != nil { 16121 return nil, err 16122 } 16123 req.Header = reqHeaders 16124 googleapi.Expand(req.URL, map[string]string{ 16125 "name": c.name, 16126 }) 16127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16128} 16129 16130// Do executes the "dlp.projects.dlpJobs.cancel" call. 16131// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16132// non-2xx status code is an error. Response headers are in either 16133// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16134// returned at all) in error.(*googleapi.Error).Header. Use 16135// googleapi.IsNotModified to check whether the returned error was 16136// because http.StatusNotModified was returned. 16137func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16138 gensupport.SetOptions(c.urlParams_, opts...) 16139 res, err := c.doRequest("json") 16140 if res != nil && res.StatusCode == http.StatusNotModified { 16141 if res.Body != nil { 16142 res.Body.Close() 16143 } 16144 return nil, &googleapi.Error{ 16145 Code: res.StatusCode, 16146 Header: res.Header, 16147 } 16148 } 16149 if err != nil { 16150 return nil, err 16151 } 16152 defer googleapi.CloseBody(res) 16153 if err := googleapi.CheckResponse(res); err != nil { 16154 return nil, err 16155 } 16156 ret := &GoogleProtobufEmpty{ 16157 ServerResponse: googleapi.ServerResponse{ 16158 Header: res.Header, 16159 HTTPStatusCode: res.StatusCode, 16160 }, 16161 } 16162 target := &ret 16163 if err := gensupport.DecodeResponse(target, res); err != nil { 16164 return nil, err 16165 } 16166 return ret, nil 16167 // { 16168 // "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.", 16169 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", 16170 // "httpMethod": "POST", 16171 // "id": "dlp.projects.dlpJobs.cancel", 16172 // "parameterOrder": [ 16173 // "name" 16174 // ], 16175 // "parameters": { 16176 // "name": { 16177 // "description": "Required. The name of the DlpJob resource to be cancelled.", 16178 // "location": "path", 16179 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 16180 // "required": true, 16181 // "type": "string" 16182 // } 16183 // }, 16184 // "path": "v2/{+name}:cancel", 16185 // "request": { 16186 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 16187 // }, 16188 // "response": { 16189 // "$ref": "GoogleProtobufEmpty" 16190 // }, 16191 // "scopes": [ 16192 // "https://www.googleapis.com/auth/cloud-platform" 16193 // ] 16194 // } 16195 16196} 16197 16198// method id "dlp.projects.dlpJobs.create": 16199 16200type ProjectsDlpJobsCreateCall struct { 16201 s *Service 16202 parentid string 16203 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 16204 urlParams_ gensupport.URLParams 16205 ctx_ context.Context 16206 header_ http.Header 16207} 16208 16209// Create: Creates a new job to inspect storage or calculate risk 16210// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 16211// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 16212// more. When no InfoTypes or CustomInfoTypes are specified in inspect 16213// jobs, the system will automatically choose what detectors to run. By 16214// default this may be all types, but may change over time as detectors 16215// are updated. 16216// 16217// - parent: Parent resource name. The format of this value varies 16218// depending on whether you have specified a processing location 16219// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 16220// scope, location specified: 16221// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 16222// location specified (defaults to global): `projects/`PROJECT_ID The 16223// following example `parent` string specifies a parent project with 16224// the identifier `example-project`, and specifies the `europe-west3` 16225// location for processing data: 16226// parent=projects/example-project/locations/europe-west3. 16227func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { 16228 c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16229 c.parentid = parentid 16230 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 16231 return c 16232} 16233 16234// Fields allows partial responses to be retrieved. See 16235// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16236// for more information. 16237func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { 16238 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16239 return c 16240} 16241 16242// Context sets the context to be used in this call's Do method. Any 16243// pending HTTP request will be aborted if the provided context is 16244// canceled. 16245func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { 16246 c.ctx_ = ctx 16247 return c 16248} 16249 16250// Header returns an http.Header that can be modified by the caller to 16251// add HTTP headers to the request. 16252func (c *ProjectsDlpJobsCreateCall) Header() http.Header { 16253 if c.header_ == nil { 16254 c.header_ = make(http.Header) 16255 } 16256 return c.header_ 16257} 16258 16259func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 16260 reqHeaders := make(http.Header) 16261 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16262 for k, v := range c.header_ { 16263 reqHeaders[k] = v 16264 } 16265 reqHeaders.Set("User-Agent", c.s.userAgent()) 16266 var body io.Reader = nil 16267 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 16268 if err != nil { 16269 return nil, err 16270 } 16271 reqHeaders.Set("Content-Type", "application/json") 16272 c.urlParams_.Set("alt", alt) 16273 c.urlParams_.Set("prettyPrint", "false") 16274 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 16275 urls += "?" + c.urlParams_.Encode() 16276 req, err := http.NewRequest("POST", urls, body) 16277 if err != nil { 16278 return nil, err 16279 } 16280 req.Header = reqHeaders 16281 googleapi.Expand(req.URL, map[string]string{ 16282 "parent": c.parentid, 16283 }) 16284 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16285} 16286 16287// Do executes the "dlp.projects.dlpJobs.create" call. 16288// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 16289// Any non-2xx status code is an error. Response headers are in either 16290// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 16291// returned at all) in error.(*googleapi.Error).Header. Use 16292// googleapi.IsNotModified to check whether the returned error was 16293// because http.StatusNotModified was returned. 16294func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 16295 gensupport.SetOptions(c.urlParams_, opts...) 16296 res, err := c.doRequest("json") 16297 if res != nil && res.StatusCode == http.StatusNotModified { 16298 if res.Body != nil { 16299 res.Body.Close() 16300 } 16301 return nil, &googleapi.Error{ 16302 Code: res.StatusCode, 16303 Header: res.Header, 16304 } 16305 } 16306 if err != nil { 16307 return nil, err 16308 } 16309 defer googleapi.CloseBody(res) 16310 if err := googleapi.CheckResponse(res); err != nil { 16311 return nil, err 16312 } 16313 ret := &GooglePrivacyDlpV2DlpJob{ 16314 ServerResponse: googleapi.ServerResponse{ 16315 Header: res.Header, 16316 HTTPStatusCode: res.StatusCode, 16317 }, 16318 } 16319 target := &ret 16320 if err := gensupport.DecodeResponse(target, res); err != nil { 16321 return nil, err 16322 } 16323 return ret, nil 16324 // { 16325 // "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.", 16326 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 16327 // "httpMethod": "POST", 16328 // "id": "dlp.projects.dlpJobs.create", 16329 // "parameterOrder": [ 16330 // "parent" 16331 // ], 16332 // "parameters": { 16333 // "parent": { 16334 // "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", 16335 // "location": "path", 16336 // "pattern": "^projects/[^/]+$", 16337 // "required": true, 16338 // "type": "string" 16339 // } 16340 // }, 16341 // "path": "v2/{+parent}/dlpJobs", 16342 // "request": { 16343 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 16344 // }, 16345 // "response": { 16346 // "$ref": "GooglePrivacyDlpV2DlpJob" 16347 // }, 16348 // "scopes": [ 16349 // "https://www.googleapis.com/auth/cloud-platform" 16350 // ] 16351 // } 16352 16353} 16354 16355// method id "dlp.projects.dlpJobs.delete": 16356 16357type ProjectsDlpJobsDeleteCall struct { 16358 s *Service 16359 name string 16360 urlParams_ gensupport.URLParams 16361 ctx_ context.Context 16362 header_ http.Header 16363} 16364 16365// Delete: Deletes a long-running DlpJob. This method indicates that the 16366// client is no longer interested in the DlpJob result. The job will be 16367// cancelled if possible. See 16368// https://cloud.google.com/dlp/docs/inspecting-storage and 16369// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 16370// more. 16371// 16372// - name: The name of the DlpJob resource to be deleted. 16373func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { 16374 c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16375 c.name = name 16376 return c 16377} 16378 16379// Fields allows partial responses to be retrieved. See 16380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16381// for more information. 16382func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { 16383 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16384 return c 16385} 16386 16387// Context sets the context to be used in this call's Do method. Any 16388// pending HTTP request will be aborted if the provided context is 16389// canceled. 16390func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { 16391 c.ctx_ = ctx 16392 return c 16393} 16394 16395// Header returns an http.Header that can be modified by the caller to 16396// add HTTP headers to the request. 16397func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { 16398 if c.header_ == nil { 16399 c.header_ = make(http.Header) 16400 } 16401 return c.header_ 16402} 16403 16404func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 16405 reqHeaders := make(http.Header) 16406 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16407 for k, v := range c.header_ { 16408 reqHeaders[k] = v 16409 } 16410 reqHeaders.Set("User-Agent", c.s.userAgent()) 16411 var body io.Reader = nil 16412 c.urlParams_.Set("alt", alt) 16413 c.urlParams_.Set("prettyPrint", "false") 16414 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16415 urls += "?" + c.urlParams_.Encode() 16416 req, err := http.NewRequest("DELETE", urls, body) 16417 if err != nil { 16418 return nil, err 16419 } 16420 req.Header = reqHeaders 16421 googleapi.Expand(req.URL, map[string]string{ 16422 "name": c.name, 16423 }) 16424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16425} 16426 16427// Do executes the "dlp.projects.dlpJobs.delete" call. 16428// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16429// non-2xx status code is an error. Response headers are in either 16430// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16431// returned at all) in error.(*googleapi.Error).Header. Use 16432// googleapi.IsNotModified to check whether the returned error was 16433// because http.StatusNotModified was returned. 16434func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16435 gensupport.SetOptions(c.urlParams_, opts...) 16436 res, err := c.doRequest("json") 16437 if res != nil && res.StatusCode == http.StatusNotModified { 16438 if res.Body != nil { 16439 res.Body.Close() 16440 } 16441 return nil, &googleapi.Error{ 16442 Code: res.StatusCode, 16443 Header: res.Header, 16444 } 16445 } 16446 if err != nil { 16447 return nil, err 16448 } 16449 defer googleapi.CloseBody(res) 16450 if err := googleapi.CheckResponse(res); err != nil { 16451 return nil, err 16452 } 16453 ret := &GoogleProtobufEmpty{ 16454 ServerResponse: googleapi.ServerResponse{ 16455 Header: res.Header, 16456 HTTPStatusCode: res.StatusCode, 16457 }, 16458 } 16459 target := &ret 16460 if err := gensupport.DecodeResponse(target, res); err != nil { 16461 return nil, err 16462 } 16463 return ret, nil 16464 // { 16465 // "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.", 16466 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 16467 // "httpMethod": "DELETE", 16468 // "id": "dlp.projects.dlpJobs.delete", 16469 // "parameterOrder": [ 16470 // "name" 16471 // ], 16472 // "parameters": { 16473 // "name": { 16474 // "description": "Required. The name of the DlpJob resource to be deleted.", 16475 // "location": "path", 16476 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 16477 // "required": true, 16478 // "type": "string" 16479 // } 16480 // }, 16481 // "path": "v2/{+name}", 16482 // "response": { 16483 // "$ref": "GoogleProtobufEmpty" 16484 // }, 16485 // "scopes": [ 16486 // "https://www.googleapis.com/auth/cloud-platform" 16487 // ] 16488 // } 16489 16490} 16491 16492// method id "dlp.projects.dlpJobs.get": 16493 16494type ProjectsDlpJobsGetCall struct { 16495 s *Service 16496 name string 16497 urlParams_ gensupport.URLParams 16498 ifNoneMatch_ string 16499 ctx_ context.Context 16500 header_ http.Header 16501} 16502 16503// Get: Gets the latest state of a long-running DlpJob. See 16504// https://cloud.google.com/dlp/docs/inspecting-storage and 16505// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 16506// more. 16507// 16508// - name: The name of the DlpJob resource. 16509func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { 16510 c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16511 c.name = name 16512 return c 16513} 16514 16515// Fields allows partial responses to be retrieved. See 16516// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16517// for more information. 16518func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { 16519 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16520 return c 16521} 16522 16523// IfNoneMatch sets the optional parameter which makes the operation 16524// fail if the object's ETag matches the given value. This is useful for 16525// getting updates only after the object has changed since the last 16526// request. Use googleapi.IsNotModified to check whether the response 16527// error from Do is the result of In-None-Match. 16528func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { 16529 c.ifNoneMatch_ = entityTag 16530 return c 16531} 16532 16533// Context sets the context to be used in this call's Do method. Any 16534// pending HTTP request will be aborted if the provided context is 16535// canceled. 16536func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { 16537 c.ctx_ = ctx 16538 return c 16539} 16540 16541// Header returns an http.Header that can be modified by the caller to 16542// add HTTP headers to the request. 16543func (c *ProjectsDlpJobsGetCall) Header() http.Header { 16544 if c.header_ == nil { 16545 c.header_ = make(http.Header) 16546 } 16547 return c.header_ 16548} 16549 16550func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 16551 reqHeaders := make(http.Header) 16552 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16553 for k, v := range c.header_ { 16554 reqHeaders[k] = v 16555 } 16556 reqHeaders.Set("User-Agent", c.s.userAgent()) 16557 if c.ifNoneMatch_ != "" { 16558 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16559 } 16560 var body io.Reader = nil 16561 c.urlParams_.Set("alt", alt) 16562 c.urlParams_.Set("prettyPrint", "false") 16563 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16564 urls += "?" + c.urlParams_.Encode() 16565 req, err := http.NewRequest("GET", urls, body) 16566 if err != nil { 16567 return nil, err 16568 } 16569 req.Header = reqHeaders 16570 googleapi.Expand(req.URL, map[string]string{ 16571 "name": c.name, 16572 }) 16573 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16574} 16575 16576// Do executes the "dlp.projects.dlpJobs.get" call. 16577// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 16578// Any non-2xx status code is an error. Response headers are in either 16579// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 16580// returned at all) in error.(*googleapi.Error).Header. Use 16581// googleapi.IsNotModified to check whether the returned error was 16582// because http.StatusNotModified was returned. 16583func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 16584 gensupport.SetOptions(c.urlParams_, opts...) 16585 res, err := c.doRequest("json") 16586 if res != nil && res.StatusCode == http.StatusNotModified { 16587 if res.Body != nil { 16588 res.Body.Close() 16589 } 16590 return nil, &googleapi.Error{ 16591 Code: res.StatusCode, 16592 Header: res.Header, 16593 } 16594 } 16595 if err != nil { 16596 return nil, err 16597 } 16598 defer googleapi.CloseBody(res) 16599 if err := googleapi.CheckResponse(res); err != nil { 16600 return nil, err 16601 } 16602 ret := &GooglePrivacyDlpV2DlpJob{ 16603 ServerResponse: googleapi.ServerResponse{ 16604 Header: res.Header, 16605 HTTPStatusCode: res.StatusCode, 16606 }, 16607 } 16608 target := &ret 16609 if err := gensupport.DecodeResponse(target, res); err != nil { 16610 return nil, err 16611 } 16612 return ret, nil 16613 // { 16614 // "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.", 16615 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 16616 // "httpMethod": "GET", 16617 // "id": "dlp.projects.dlpJobs.get", 16618 // "parameterOrder": [ 16619 // "name" 16620 // ], 16621 // "parameters": { 16622 // "name": { 16623 // "description": "Required. The name of the DlpJob resource.", 16624 // "location": "path", 16625 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 16626 // "required": true, 16627 // "type": "string" 16628 // } 16629 // }, 16630 // "path": "v2/{+name}", 16631 // "response": { 16632 // "$ref": "GooglePrivacyDlpV2DlpJob" 16633 // }, 16634 // "scopes": [ 16635 // "https://www.googleapis.com/auth/cloud-platform" 16636 // ] 16637 // } 16638 16639} 16640 16641// method id "dlp.projects.dlpJobs.list": 16642 16643type ProjectsDlpJobsListCall struct { 16644 s *Service 16645 parentid string 16646 urlParams_ gensupport.URLParams 16647 ifNoneMatch_ string 16648 ctx_ context.Context 16649 header_ http.Header 16650} 16651 16652// List: Lists DlpJobs that match the specified filter in the request. 16653// See https://cloud.google.com/dlp/docs/inspecting-storage and 16654// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 16655// more. 16656// 16657// - parent: Parent resource name. The format of this value varies 16658// depending on whether you have specified a processing location 16659// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 16660// scope, location specified: 16661// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 16662// location specified (defaults to global): `projects/`PROJECT_ID The 16663// following example `parent` string specifies a parent project with 16664// the identifier `example-project`, and specifies the `europe-west3` 16665// location for processing data: 16666// parent=projects/example-project/locations/europe-west3. 16667func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { 16668 c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16669 c.parentid = parentid 16670 return c 16671} 16672 16673// Filter sets the optional parameter "filter": Allows filtering. 16674// Supported syntax: * Filter expressions are made up of one or more 16675// restrictions. * Restrictions can be combined by `AND` or `OR` logical 16676// operators. A sequence of restrictions implicitly uses `AND`. * A 16677// restriction has the form of `{field} {operator} {value}`. * Supported 16678// fields/values for inspect jobs: - `state` - 16679// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 16680// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 16681// of the trigger that created job. - 'end_time` - Corresponds to time 16682// the job finished. - 'start_time` - Corresponds to time the job 16683// finished. * Supported fields for risk analysis jobs: - `state` - 16684// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 16685// the job finished. - 'start_time` - Corresponds to time the job 16686// finished. * The operator must be `=` or `!=`. Examples: * 16687// inspected_storage = cloud_storage AND state = done * 16688// inspected_storage = cloud_storage OR inspected_storage = bigquery * 16689// inspected_storage = cloud_storage AND (state = done OR state = 16690// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 16691// this field should be no more than 500 characters. 16692func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { 16693 c.urlParams_.Set("filter", filter) 16694 return c 16695} 16696 16697// LocationId sets the optional parameter "locationId": Deprecated. This 16698// field has no effect. 16699func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobsListCall { 16700 c.urlParams_.Set("locationId", locationId) 16701 return c 16702} 16703 16704// OrderBy sets the optional parameter "orderBy": Comma separated list 16705// of fields to order by, followed by `asc` or `desc` postfix. This list 16706// is case-insensitive, default sorting order is ascending, redundant 16707// space characters are insignificant. Example: `name asc, end_time asc, 16708// create_time desc` Supported fields are: - `create_time`: corresponds 16709// to time the job was created. - `end_time`: corresponds to time the 16710// job ended. - `name`: corresponds to job's name. - `state`: 16711// corresponds to `state` 16712func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { 16713 c.urlParams_.Set("orderBy", orderBy) 16714 return c 16715} 16716 16717// PageSize sets the optional parameter "pageSize": The standard list 16718// page size. 16719func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { 16720 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16721 return c 16722} 16723 16724// PageToken sets the optional parameter "pageToken": The standard list 16725// page token. 16726func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { 16727 c.urlParams_.Set("pageToken", pageToken) 16728 return c 16729} 16730 16731// Type sets the optional parameter "type": The type of job. Defaults to 16732// `DlpJobType.INSPECT` 16733// 16734// Possible values: 16735// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 16736// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 16737// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 16738func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { 16739 c.urlParams_.Set("type", type_) 16740 return c 16741} 16742 16743// Fields allows partial responses to be retrieved. See 16744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16745// for more information. 16746func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { 16747 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16748 return c 16749} 16750 16751// IfNoneMatch sets the optional parameter which makes the operation 16752// fail if the object's ETag matches the given value. This is useful for 16753// getting updates only after the object has changed since the last 16754// request. Use googleapi.IsNotModified to check whether the response 16755// error from Do is the result of In-None-Match. 16756func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { 16757 c.ifNoneMatch_ = entityTag 16758 return c 16759} 16760 16761// Context sets the context to be used in this call's Do method. Any 16762// pending HTTP request will be aborted if the provided context is 16763// canceled. 16764func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { 16765 c.ctx_ = ctx 16766 return c 16767} 16768 16769// Header returns an http.Header that can be modified by the caller to 16770// add HTTP headers to the request. 16771func (c *ProjectsDlpJobsListCall) Header() http.Header { 16772 if c.header_ == nil { 16773 c.header_ = make(http.Header) 16774 } 16775 return c.header_ 16776} 16777 16778func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 16779 reqHeaders := make(http.Header) 16780 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16781 for k, v := range c.header_ { 16782 reqHeaders[k] = v 16783 } 16784 reqHeaders.Set("User-Agent", c.s.userAgent()) 16785 if c.ifNoneMatch_ != "" { 16786 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16787 } 16788 var body io.Reader = nil 16789 c.urlParams_.Set("alt", alt) 16790 c.urlParams_.Set("prettyPrint", "false") 16791 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 16792 urls += "?" + c.urlParams_.Encode() 16793 req, err := http.NewRequest("GET", urls, body) 16794 if err != nil { 16795 return nil, err 16796 } 16797 req.Header = reqHeaders 16798 googleapi.Expand(req.URL, map[string]string{ 16799 "parent": c.parentid, 16800 }) 16801 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16802} 16803 16804// Do executes the "dlp.projects.dlpJobs.list" call. 16805// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 16806// be non-nil. Any non-2xx status code is an error. Response headers are 16807// in either 16808// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 16809// response was returned at all) in error.(*googleapi.Error).Header. Use 16810// googleapi.IsNotModified to check whether the returned error was 16811// because http.StatusNotModified was returned. 16812func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 16813 gensupport.SetOptions(c.urlParams_, opts...) 16814 res, err := c.doRequest("json") 16815 if res != nil && res.StatusCode == http.StatusNotModified { 16816 if res.Body != nil { 16817 res.Body.Close() 16818 } 16819 return nil, &googleapi.Error{ 16820 Code: res.StatusCode, 16821 Header: res.Header, 16822 } 16823 } 16824 if err != nil { 16825 return nil, err 16826 } 16827 defer googleapi.CloseBody(res) 16828 if err := googleapi.CheckResponse(res); err != nil { 16829 return nil, err 16830 } 16831 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 16832 ServerResponse: googleapi.ServerResponse{ 16833 Header: res.Header, 16834 HTTPStatusCode: res.StatusCode, 16835 }, 16836 } 16837 target := &ret 16838 if err := gensupport.DecodeResponse(target, res); err != nil { 16839 return nil, err 16840 } 16841 return ret, nil 16842 // { 16843 // "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.", 16844 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 16845 // "httpMethod": "GET", 16846 // "id": "dlp.projects.dlpJobs.list", 16847 // "parameterOrder": [ 16848 // "parent" 16849 // ], 16850 // "parameters": { 16851 // "filter": { 16852 // "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.", 16853 // "location": "query", 16854 // "type": "string" 16855 // }, 16856 // "locationId": { 16857 // "description": "Deprecated. This field has no effect.", 16858 // "location": "query", 16859 // "type": "string" 16860 // }, 16861 // "orderBy": { 16862 // "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`", 16863 // "location": "query", 16864 // "type": "string" 16865 // }, 16866 // "pageSize": { 16867 // "description": "The standard list page size.", 16868 // "format": "int32", 16869 // "location": "query", 16870 // "type": "integer" 16871 // }, 16872 // "pageToken": { 16873 // "description": "The standard list page token.", 16874 // "location": "query", 16875 // "type": "string" 16876 // }, 16877 // "parent": { 16878 // "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", 16879 // "location": "path", 16880 // "pattern": "^projects/[^/]+$", 16881 // "required": true, 16882 // "type": "string" 16883 // }, 16884 // "type": { 16885 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 16886 // "enum": [ 16887 // "DLP_JOB_TYPE_UNSPECIFIED", 16888 // "INSPECT_JOB", 16889 // "RISK_ANALYSIS_JOB" 16890 // ], 16891 // "enumDescriptions": [ 16892 // "Defaults to INSPECT_JOB.", 16893 // "The job inspected Google Cloud for sensitive data.", 16894 // "The job executed a Risk Analysis computation." 16895 // ], 16896 // "location": "query", 16897 // "type": "string" 16898 // } 16899 // }, 16900 // "path": "v2/{+parent}/dlpJobs", 16901 // "response": { 16902 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 16903 // }, 16904 // "scopes": [ 16905 // "https://www.googleapis.com/auth/cloud-platform" 16906 // ] 16907 // } 16908 16909} 16910 16911// Pages invokes f for each page of results. 16912// A non-nil error returned from f will halt the iteration. 16913// The provided context supersedes any context provided to the Context method. 16914func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 16915 c.ctx_ = ctx 16916 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16917 for { 16918 x, err := c.Do() 16919 if err != nil { 16920 return err 16921 } 16922 if err := f(x); err != nil { 16923 return err 16924 } 16925 if x.NextPageToken == "" { 16926 return nil 16927 } 16928 c.PageToken(x.NextPageToken) 16929 } 16930} 16931 16932// method id "dlp.projects.image.redact": 16933 16934type ProjectsImageRedactCall struct { 16935 s *Service 16936 parentid string 16937 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 16938 urlParams_ gensupport.URLParams 16939 ctx_ context.Context 16940 header_ http.Header 16941} 16942 16943// Redact: Redacts potentially sensitive info from an image. This method 16944// has limits on input size, processing time, and output size. See 16945// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 16946// learn more. When no InfoTypes or CustomInfoTypes are specified in 16947// this request, the system will automatically choose what detectors to 16948// run. By default this may be all types, but may change over time as 16949// detectors are updated. 16950// 16951// - parent: Parent resource name. The format of this value varies 16952// depending on whether you have specified a processing location 16953// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 16954// scope, location specified: 16955// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 16956// location specified (defaults to global): `projects/`PROJECT_ID The 16957// following example `parent` string specifies a parent project with 16958// the identifier `example-project`, and specifies the `europe-west3` 16959// location for processing data: 16960// parent=projects/example-project/locations/europe-west3. 16961func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { 16962 c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16963 c.parentid = parentid 16964 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 16965 return c 16966} 16967 16968// Fields allows partial responses to be retrieved. See 16969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16970// for more information. 16971func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { 16972 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16973 return c 16974} 16975 16976// Context sets the context to be used in this call's Do method. Any 16977// pending HTTP request will be aborted if the provided context is 16978// canceled. 16979func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { 16980 c.ctx_ = ctx 16981 return c 16982} 16983 16984// Header returns an http.Header that can be modified by the caller to 16985// add HTTP headers to the request. 16986func (c *ProjectsImageRedactCall) Header() http.Header { 16987 if c.header_ == nil { 16988 c.header_ = make(http.Header) 16989 } 16990 return c.header_ 16991} 16992 16993func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { 16994 reqHeaders := make(http.Header) 16995 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 16996 for k, v := range c.header_ { 16997 reqHeaders[k] = v 16998 } 16999 reqHeaders.Set("User-Agent", c.s.userAgent()) 17000 var body io.Reader = nil 17001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 17002 if err != nil { 17003 return nil, err 17004 } 17005 reqHeaders.Set("Content-Type", "application/json") 17006 c.urlParams_.Set("alt", alt) 17007 c.urlParams_.Set("prettyPrint", "false") 17008 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 17009 urls += "?" + c.urlParams_.Encode() 17010 req, err := http.NewRequest("POST", urls, body) 17011 if err != nil { 17012 return nil, err 17013 } 17014 req.Header = reqHeaders 17015 googleapi.Expand(req.URL, map[string]string{ 17016 "parent": c.parentid, 17017 }) 17018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17019} 17020 17021// Do executes the "dlp.projects.image.redact" call. 17022// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 17023// be non-nil. Any non-2xx status code is an error. Response headers are 17024// in either 17025// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 17026// response was returned at all) in error.(*googleapi.Error).Header. Use 17027// googleapi.IsNotModified to check whether the returned error was 17028// because http.StatusNotModified was returned. 17029func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 17030 gensupport.SetOptions(c.urlParams_, opts...) 17031 res, err := c.doRequest("json") 17032 if res != nil && res.StatusCode == http.StatusNotModified { 17033 if res.Body != nil { 17034 res.Body.Close() 17035 } 17036 return nil, &googleapi.Error{ 17037 Code: res.StatusCode, 17038 Header: res.Header, 17039 } 17040 } 17041 if err != nil { 17042 return nil, err 17043 } 17044 defer googleapi.CloseBody(res) 17045 if err := googleapi.CheckResponse(res); err != nil { 17046 return nil, err 17047 } 17048 ret := &GooglePrivacyDlpV2RedactImageResponse{ 17049 ServerResponse: googleapi.ServerResponse{ 17050 Header: res.Header, 17051 HTTPStatusCode: res.StatusCode, 17052 }, 17053 } 17054 target := &ret 17055 if err := gensupport.DecodeResponse(target, res); err != nil { 17056 return nil, err 17057 } 17058 return ret, nil 17059 // { 17060 // "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.", 17061 // "flatPath": "v2/projects/{projectsId}/image:redact", 17062 // "httpMethod": "POST", 17063 // "id": "dlp.projects.image.redact", 17064 // "parameterOrder": [ 17065 // "parent" 17066 // ], 17067 // "parameters": { 17068 // "parent": { 17069 // "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", 17070 // "location": "path", 17071 // "pattern": "^projects/[^/]+$", 17072 // "required": true, 17073 // "type": "string" 17074 // } 17075 // }, 17076 // "path": "v2/{+parent}/image:redact", 17077 // "request": { 17078 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 17079 // }, 17080 // "response": { 17081 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 17082 // }, 17083 // "scopes": [ 17084 // "https://www.googleapis.com/auth/cloud-platform" 17085 // ] 17086 // } 17087 17088} 17089 17090// method id "dlp.projects.inspectTemplates.create": 17091 17092type ProjectsInspectTemplatesCreateCall struct { 17093 s *Service 17094 parentid string 17095 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 17096 urlParams_ gensupport.URLParams 17097 ctx_ context.Context 17098 header_ http.Header 17099} 17100 17101// Create: Creates an InspectTemplate for re-using frequently used 17102// configuration for inspecting content, images, and storage. See 17103// https://cloud.google.com/dlp/docs/creating-templates to learn more. 17104// 17105// - parent: Parent resource name. The format of this value varies 17106// depending on the scope of the request (project or organization) and 17107// whether you have specified a processing location 17108// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 17109// scope, location specified: 17110// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 17111// location specified (defaults to global): `projects/`PROJECT_ID + 17112// Organizations scope, location specified: 17113// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 17114// scope, no location specified (defaults to global): 17115// `organizations/`ORG_ID The following example `parent` string 17116// specifies a parent project with the identifier `example-project`, 17117// and specifies the `europe-west3` location for processing data: 17118// parent=projects/example-project/locations/europe-west3. 17119func (r *ProjectsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { 17120 c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17121 c.parentid = parentid 17122 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 17123 return c 17124} 17125 17126// Fields allows partial responses to be retrieved. See 17127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17128// for more information. 17129func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { 17130 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17131 return c 17132} 17133 17134// Context sets the context to be used in this call's Do method. Any 17135// pending HTTP request will be aborted if the provided context is 17136// canceled. 17137func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { 17138 c.ctx_ = ctx 17139 return c 17140} 17141 17142// Header returns an http.Header that can be modified by the caller to 17143// add HTTP headers to the request. 17144func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { 17145 if c.header_ == nil { 17146 c.header_ = make(http.Header) 17147 } 17148 return c.header_ 17149} 17150 17151func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 17152 reqHeaders := make(http.Header) 17153 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17154 for k, v := range c.header_ { 17155 reqHeaders[k] = v 17156 } 17157 reqHeaders.Set("User-Agent", c.s.userAgent()) 17158 var body io.Reader = nil 17159 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 17160 if err != nil { 17161 return nil, err 17162 } 17163 reqHeaders.Set("Content-Type", "application/json") 17164 c.urlParams_.Set("alt", alt) 17165 c.urlParams_.Set("prettyPrint", "false") 17166 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 17167 urls += "?" + c.urlParams_.Encode() 17168 req, err := http.NewRequest("POST", urls, body) 17169 if err != nil { 17170 return nil, err 17171 } 17172 req.Header = reqHeaders 17173 googleapi.Expand(req.URL, map[string]string{ 17174 "parent": c.parentid, 17175 }) 17176 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17177} 17178 17179// Do executes the "dlp.projects.inspectTemplates.create" call. 17180// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 17181// non-nil. Any non-2xx status code is an error. Response headers are in 17182// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 17183// (if a response was returned at all) in 17184// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17185// whether the returned error was because http.StatusNotModified was 17186// returned. 17187func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 17188 gensupport.SetOptions(c.urlParams_, opts...) 17189 res, err := c.doRequest("json") 17190 if res != nil && res.StatusCode == http.StatusNotModified { 17191 if res.Body != nil { 17192 res.Body.Close() 17193 } 17194 return nil, &googleapi.Error{ 17195 Code: res.StatusCode, 17196 Header: res.Header, 17197 } 17198 } 17199 if err != nil { 17200 return nil, err 17201 } 17202 defer googleapi.CloseBody(res) 17203 if err := googleapi.CheckResponse(res); err != nil { 17204 return nil, err 17205 } 17206 ret := &GooglePrivacyDlpV2InspectTemplate{ 17207 ServerResponse: googleapi.ServerResponse{ 17208 Header: res.Header, 17209 HTTPStatusCode: res.StatusCode, 17210 }, 17211 } 17212 target := &ret 17213 if err := gensupport.DecodeResponse(target, res); err != nil { 17214 return nil, err 17215 } 17216 return ret, nil 17217 // { 17218 // "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.", 17219 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 17220 // "httpMethod": "POST", 17221 // "id": "dlp.projects.inspectTemplates.create", 17222 // "parameterOrder": [ 17223 // "parent" 17224 // ], 17225 // "parameters": { 17226 // "parent": { 17227 // "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", 17228 // "location": "path", 17229 // "pattern": "^projects/[^/]+$", 17230 // "required": true, 17231 // "type": "string" 17232 // } 17233 // }, 17234 // "path": "v2/{+parent}/inspectTemplates", 17235 // "request": { 17236 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 17237 // }, 17238 // "response": { 17239 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 17240 // }, 17241 // "scopes": [ 17242 // "https://www.googleapis.com/auth/cloud-platform" 17243 // ] 17244 // } 17245 17246} 17247 17248// method id "dlp.projects.inspectTemplates.delete": 17249 17250type ProjectsInspectTemplatesDeleteCall struct { 17251 s *Service 17252 name string 17253 urlParams_ gensupport.URLParams 17254 ctx_ context.Context 17255 header_ http.Header 17256} 17257 17258// Delete: Deletes an InspectTemplate. See 17259// https://cloud.google.com/dlp/docs/creating-templates to learn more. 17260// 17261// - name: Resource name of the organization and inspectTemplate to be 17262// deleted, for example 17263// `organizations/433245324/inspectTemplates/432452342` or 17264// projects/project-id/inspectTemplates/432452342. 17265func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { 17266 c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17267 c.name = name 17268 return c 17269} 17270 17271// Fields allows partial responses to be retrieved. See 17272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17273// for more information. 17274func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { 17275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17276 return c 17277} 17278 17279// Context sets the context to be used in this call's Do method. Any 17280// pending HTTP request will be aborted if the provided context is 17281// canceled. 17282func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { 17283 c.ctx_ = ctx 17284 return c 17285} 17286 17287// Header returns an http.Header that can be modified by the caller to 17288// add HTTP headers to the request. 17289func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { 17290 if c.header_ == nil { 17291 c.header_ = make(http.Header) 17292 } 17293 return c.header_ 17294} 17295 17296func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 17297 reqHeaders := make(http.Header) 17298 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17299 for k, v := range c.header_ { 17300 reqHeaders[k] = v 17301 } 17302 reqHeaders.Set("User-Agent", c.s.userAgent()) 17303 var body io.Reader = nil 17304 c.urlParams_.Set("alt", alt) 17305 c.urlParams_.Set("prettyPrint", "false") 17306 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17307 urls += "?" + c.urlParams_.Encode() 17308 req, err := http.NewRequest("DELETE", urls, body) 17309 if err != nil { 17310 return nil, err 17311 } 17312 req.Header = reqHeaders 17313 googleapi.Expand(req.URL, map[string]string{ 17314 "name": c.name, 17315 }) 17316 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17317} 17318 17319// Do executes the "dlp.projects.inspectTemplates.delete" call. 17320// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 17321// non-2xx status code is an error. Response headers are in either 17322// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 17323// returned at all) in error.(*googleapi.Error).Header. Use 17324// googleapi.IsNotModified to check whether the returned error was 17325// because http.StatusNotModified was returned. 17326func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 17327 gensupport.SetOptions(c.urlParams_, opts...) 17328 res, err := c.doRequest("json") 17329 if res != nil && res.StatusCode == http.StatusNotModified { 17330 if res.Body != nil { 17331 res.Body.Close() 17332 } 17333 return nil, &googleapi.Error{ 17334 Code: res.StatusCode, 17335 Header: res.Header, 17336 } 17337 } 17338 if err != nil { 17339 return nil, err 17340 } 17341 defer googleapi.CloseBody(res) 17342 if err := googleapi.CheckResponse(res); err != nil { 17343 return nil, err 17344 } 17345 ret := &GoogleProtobufEmpty{ 17346 ServerResponse: googleapi.ServerResponse{ 17347 Header: res.Header, 17348 HTTPStatusCode: res.StatusCode, 17349 }, 17350 } 17351 target := &ret 17352 if err := gensupport.DecodeResponse(target, res); err != nil { 17353 return nil, err 17354 } 17355 return ret, nil 17356 // { 17357 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 17358 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 17359 // "httpMethod": "DELETE", 17360 // "id": "dlp.projects.inspectTemplates.delete", 17361 // "parameterOrder": [ 17362 // "name" 17363 // ], 17364 // "parameters": { 17365 // "name": { 17366 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 17367 // "location": "path", 17368 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 17369 // "required": true, 17370 // "type": "string" 17371 // } 17372 // }, 17373 // "path": "v2/{+name}", 17374 // "response": { 17375 // "$ref": "GoogleProtobufEmpty" 17376 // }, 17377 // "scopes": [ 17378 // "https://www.googleapis.com/auth/cloud-platform" 17379 // ] 17380 // } 17381 17382} 17383 17384// method id "dlp.projects.inspectTemplates.get": 17385 17386type ProjectsInspectTemplatesGetCall struct { 17387 s *Service 17388 name string 17389 urlParams_ gensupport.URLParams 17390 ifNoneMatch_ string 17391 ctx_ context.Context 17392 header_ http.Header 17393} 17394 17395// Get: Gets an InspectTemplate. See 17396// https://cloud.google.com/dlp/docs/creating-templates to learn more. 17397// 17398// - name: Resource name of the organization and inspectTemplate to be 17399// read, for example 17400// `organizations/433245324/inspectTemplates/432452342` or 17401// projects/project-id/inspectTemplates/432452342. 17402func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { 17403 c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17404 c.name = name 17405 return c 17406} 17407 17408// Fields allows partial responses to be retrieved. See 17409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17410// for more information. 17411func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { 17412 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17413 return c 17414} 17415 17416// IfNoneMatch sets the optional parameter which makes the operation 17417// fail if the object's ETag matches the given value. This is useful for 17418// getting updates only after the object has changed since the last 17419// request. Use googleapi.IsNotModified to check whether the response 17420// error from Do is the result of In-None-Match. 17421func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { 17422 c.ifNoneMatch_ = entityTag 17423 return c 17424} 17425 17426// Context sets the context to be used in this call's Do method. Any 17427// pending HTTP request will be aborted if the provided context is 17428// canceled. 17429func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { 17430 c.ctx_ = ctx 17431 return c 17432} 17433 17434// Header returns an http.Header that can be modified by the caller to 17435// add HTTP headers to the request. 17436func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { 17437 if c.header_ == nil { 17438 c.header_ = make(http.Header) 17439 } 17440 return c.header_ 17441} 17442 17443func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 17444 reqHeaders := make(http.Header) 17445 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17446 for k, v := range c.header_ { 17447 reqHeaders[k] = v 17448 } 17449 reqHeaders.Set("User-Agent", c.s.userAgent()) 17450 if c.ifNoneMatch_ != "" { 17451 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17452 } 17453 var body io.Reader = nil 17454 c.urlParams_.Set("alt", alt) 17455 c.urlParams_.Set("prettyPrint", "false") 17456 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17457 urls += "?" + c.urlParams_.Encode() 17458 req, err := http.NewRequest("GET", urls, body) 17459 if err != nil { 17460 return nil, err 17461 } 17462 req.Header = reqHeaders 17463 googleapi.Expand(req.URL, map[string]string{ 17464 "name": c.name, 17465 }) 17466 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17467} 17468 17469// Do executes the "dlp.projects.inspectTemplates.get" call. 17470// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 17471// non-nil. Any non-2xx status code is an error. Response headers are in 17472// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 17473// (if a response was returned at all) in 17474// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17475// whether the returned error was because http.StatusNotModified was 17476// returned. 17477func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 17478 gensupport.SetOptions(c.urlParams_, opts...) 17479 res, err := c.doRequest("json") 17480 if res != nil && res.StatusCode == http.StatusNotModified { 17481 if res.Body != nil { 17482 res.Body.Close() 17483 } 17484 return nil, &googleapi.Error{ 17485 Code: res.StatusCode, 17486 Header: res.Header, 17487 } 17488 } 17489 if err != nil { 17490 return nil, err 17491 } 17492 defer googleapi.CloseBody(res) 17493 if err := googleapi.CheckResponse(res); err != nil { 17494 return nil, err 17495 } 17496 ret := &GooglePrivacyDlpV2InspectTemplate{ 17497 ServerResponse: googleapi.ServerResponse{ 17498 Header: res.Header, 17499 HTTPStatusCode: res.StatusCode, 17500 }, 17501 } 17502 target := &ret 17503 if err := gensupport.DecodeResponse(target, res); err != nil { 17504 return nil, err 17505 } 17506 return ret, nil 17507 // { 17508 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 17509 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 17510 // "httpMethod": "GET", 17511 // "id": "dlp.projects.inspectTemplates.get", 17512 // "parameterOrder": [ 17513 // "name" 17514 // ], 17515 // "parameters": { 17516 // "name": { 17517 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 17518 // "location": "path", 17519 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 17520 // "required": true, 17521 // "type": "string" 17522 // } 17523 // }, 17524 // "path": "v2/{+name}", 17525 // "response": { 17526 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 17527 // }, 17528 // "scopes": [ 17529 // "https://www.googleapis.com/auth/cloud-platform" 17530 // ] 17531 // } 17532 17533} 17534 17535// method id "dlp.projects.inspectTemplates.list": 17536 17537type ProjectsInspectTemplatesListCall struct { 17538 s *Service 17539 parentid string 17540 urlParams_ gensupport.URLParams 17541 ifNoneMatch_ string 17542 ctx_ context.Context 17543 header_ http.Header 17544} 17545 17546// List: Lists InspectTemplates. See 17547// https://cloud.google.com/dlp/docs/creating-templates to learn more. 17548// 17549// - parent: Parent resource name. The format of this value varies 17550// depending on the scope of the request (project or organization) and 17551// whether you have specified a processing location 17552// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 17553// scope, location specified: 17554// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 17555// location specified (defaults to global): `projects/`PROJECT_ID + 17556// Organizations scope, location specified: 17557// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 17558// scope, no location specified (defaults to global): 17559// `organizations/`ORG_ID The following example `parent` string 17560// specifies a parent project with the identifier `example-project`, 17561// and specifies the `europe-west3` location for processing data: 17562// parent=projects/example-project/locations/europe-west3. 17563func (r *ProjectsInspectTemplatesService) List(parentid string) *ProjectsInspectTemplatesListCall { 17564 c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17565 c.parentid = parentid 17566 return c 17567} 17568 17569// LocationId sets the optional parameter "locationId": Deprecated. This 17570// field has no effect. 17571func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *ProjectsInspectTemplatesListCall { 17572 c.urlParams_.Set("locationId", locationId) 17573 return c 17574} 17575 17576// OrderBy sets the optional parameter "orderBy": Comma separated list 17577// of fields to order by, followed by `asc` or `desc` postfix. This list 17578// is case-insensitive, default sorting order is ascending, redundant 17579// space characters are insignificant. Example: `name asc,update_time, 17580// create_time desc` Supported fields are: - `create_time`: corresponds 17581// to time the template was created. - `update_time`: corresponds to 17582// time the template was last updated. - `name`: corresponds to 17583// template's name. - `display_name`: corresponds to template's display 17584// name. 17585func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { 17586 c.urlParams_.Set("orderBy", orderBy) 17587 return c 17588} 17589 17590// PageSize sets the optional parameter "pageSize": Size of the page, 17591// can be limited by server. If zero server returns a page of max size 17592// 100. 17593func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { 17594 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17595 return c 17596} 17597 17598// PageToken sets the optional parameter "pageToken": Page token to 17599// continue retrieval. Comes from previous call to 17600// `ListInspectTemplates`. 17601func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { 17602 c.urlParams_.Set("pageToken", pageToken) 17603 return c 17604} 17605 17606// Fields allows partial responses to be retrieved. See 17607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17608// for more information. 17609func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { 17610 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17611 return c 17612} 17613 17614// IfNoneMatch sets the optional parameter which makes the operation 17615// fail if the object's ETag matches the given value. This is useful for 17616// getting updates only after the object has changed since the last 17617// request. Use googleapi.IsNotModified to check whether the response 17618// error from Do is the result of In-None-Match. 17619func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { 17620 c.ifNoneMatch_ = entityTag 17621 return c 17622} 17623 17624// Context sets the context to be used in this call's Do method. Any 17625// pending HTTP request will be aborted if the provided context is 17626// canceled. 17627func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { 17628 c.ctx_ = ctx 17629 return c 17630} 17631 17632// Header returns an http.Header that can be modified by the caller to 17633// add HTTP headers to the request. 17634func (c *ProjectsInspectTemplatesListCall) Header() http.Header { 17635 if c.header_ == nil { 17636 c.header_ = make(http.Header) 17637 } 17638 return c.header_ 17639} 17640 17641func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 17642 reqHeaders := make(http.Header) 17643 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17644 for k, v := range c.header_ { 17645 reqHeaders[k] = v 17646 } 17647 reqHeaders.Set("User-Agent", c.s.userAgent()) 17648 if c.ifNoneMatch_ != "" { 17649 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17650 } 17651 var body io.Reader = nil 17652 c.urlParams_.Set("alt", alt) 17653 c.urlParams_.Set("prettyPrint", "false") 17654 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 17655 urls += "?" + c.urlParams_.Encode() 17656 req, err := http.NewRequest("GET", urls, body) 17657 if err != nil { 17658 return nil, err 17659 } 17660 req.Header = reqHeaders 17661 googleapi.Expand(req.URL, map[string]string{ 17662 "parent": c.parentid, 17663 }) 17664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17665} 17666 17667// Do executes the "dlp.projects.inspectTemplates.list" call. 17668// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 17669// error will be non-nil. Any non-2xx status code is an error. Response 17670// headers are in either 17671// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 17672// or (if a response was returned at all) in 17673// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17674// whether the returned error was because http.StatusNotModified was 17675// returned. 17676func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 17677 gensupport.SetOptions(c.urlParams_, opts...) 17678 res, err := c.doRequest("json") 17679 if res != nil && res.StatusCode == http.StatusNotModified { 17680 if res.Body != nil { 17681 res.Body.Close() 17682 } 17683 return nil, &googleapi.Error{ 17684 Code: res.StatusCode, 17685 Header: res.Header, 17686 } 17687 } 17688 if err != nil { 17689 return nil, err 17690 } 17691 defer googleapi.CloseBody(res) 17692 if err := googleapi.CheckResponse(res); err != nil { 17693 return nil, err 17694 } 17695 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 17696 ServerResponse: googleapi.ServerResponse{ 17697 Header: res.Header, 17698 HTTPStatusCode: res.StatusCode, 17699 }, 17700 } 17701 target := &ret 17702 if err := gensupport.DecodeResponse(target, res); err != nil { 17703 return nil, err 17704 } 17705 return ret, nil 17706 // { 17707 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 17708 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 17709 // "httpMethod": "GET", 17710 // "id": "dlp.projects.inspectTemplates.list", 17711 // "parameterOrder": [ 17712 // "parent" 17713 // ], 17714 // "parameters": { 17715 // "locationId": { 17716 // "description": "Deprecated. This field has no effect.", 17717 // "location": "query", 17718 // "type": "string" 17719 // }, 17720 // "orderBy": { 17721 // "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.", 17722 // "location": "query", 17723 // "type": "string" 17724 // }, 17725 // "pageSize": { 17726 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 17727 // "format": "int32", 17728 // "location": "query", 17729 // "type": "integer" 17730 // }, 17731 // "pageToken": { 17732 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 17733 // "location": "query", 17734 // "type": "string" 17735 // }, 17736 // "parent": { 17737 // "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", 17738 // "location": "path", 17739 // "pattern": "^projects/[^/]+$", 17740 // "required": true, 17741 // "type": "string" 17742 // } 17743 // }, 17744 // "path": "v2/{+parent}/inspectTemplates", 17745 // "response": { 17746 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 17747 // }, 17748 // "scopes": [ 17749 // "https://www.googleapis.com/auth/cloud-platform" 17750 // ] 17751 // } 17752 17753} 17754 17755// Pages invokes f for each page of results. 17756// A non-nil error returned from f will halt the iteration. 17757// The provided context supersedes any context provided to the Context method. 17758func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 17759 c.ctx_ = ctx 17760 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17761 for { 17762 x, err := c.Do() 17763 if err != nil { 17764 return err 17765 } 17766 if err := f(x); err != nil { 17767 return err 17768 } 17769 if x.NextPageToken == "" { 17770 return nil 17771 } 17772 c.PageToken(x.NextPageToken) 17773 } 17774} 17775 17776// method id "dlp.projects.inspectTemplates.patch": 17777 17778type ProjectsInspectTemplatesPatchCall struct { 17779 s *Service 17780 name string 17781 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 17782 urlParams_ gensupport.URLParams 17783 ctx_ context.Context 17784 header_ http.Header 17785} 17786 17787// Patch: Updates the InspectTemplate. See 17788// https://cloud.google.com/dlp/docs/creating-templates to learn more. 17789// 17790// - name: Resource name of organization and inspectTemplate to be 17791// updated, for example 17792// `organizations/433245324/inspectTemplates/432452342` or 17793// projects/project-id/inspectTemplates/432452342. 17794func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { 17795 c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17796 c.name = name 17797 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 17798 return c 17799} 17800 17801// Fields allows partial responses to be retrieved. See 17802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17803// for more information. 17804func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { 17805 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17806 return c 17807} 17808 17809// Context sets the context to be used in this call's Do method. Any 17810// pending HTTP request will be aborted if the provided context is 17811// canceled. 17812func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { 17813 c.ctx_ = ctx 17814 return c 17815} 17816 17817// Header returns an http.Header that can be modified by the caller to 17818// add HTTP headers to the request. 17819func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { 17820 if c.header_ == nil { 17821 c.header_ = make(http.Header) 17822 } 17823 return c.header_ 17824} 17825 17826func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 17827 reqHeaders := make(http.Header) 17828 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17829 for k, v := range c.header_ { 17830 reqHeaders[k] = v 17831 } 17832 reqHeaders.Set("User-Agent", c.s.userAgent()) 17833 var body io.Reader = nil 17834 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 17835 if err != nil { 17836 return nil, err 17837 } 17838 reqHeaders.Set("Content-Type", "application/json") 17839 c.urlParams_.Set("alt", alt) 17840 c.urlParams_.Set("prettyPrint", "false") 17841 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17842 urls += "?" + c.urlParams_.Encode() 17843 req, err := http.NewRequest("PATCH", urls, body) 17844 if err != nil { 17845 return nil, err 17846 } 17847 req.Header = reqHeaders 17848 googleapi.Expand(req.URL, map[string]string{ 17849 "name": c.name, 17850 }) 17851 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17852} 17853 17854// Do executes the "dlp.projects.inspectTemplates.patch" call. 17855// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 17856// non-nil. Any non-2xx status code is an error. Response headers are in 17857// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 17858// (if a response was returned at all) in 17859// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17860// whether the returned error was because http.StatusNotModified was 17861// returned. 17862func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 17863 gensupport.SetOptions(c.urlParams_, opts...) 17864 res, err := c.doRequest("json") 17865 if res != nil && res.StatusCode == http.StatusNotModified { 17866 if res.Body != nil { 17867 res.Body.Close() 17868 } 17869 return nil, &googleapi.Error{ 17870 Code: res.StatusCode, 17871 Header: res.Header, 17872 } 17873 } 17874 if err != nil { 17875 return nil, err 17876 } 17877 defer googleapi.CloseBody(res) 17878 if err := googleapi.CheckResponse(res); err != nil { 17879 return nil, err 17880 } 17881 ret := &GooglePrivacyDlpV2InspectTemplate{ 17882 ServerResponse: googleapi.ServerResponse{ 17883 Header: res.Header, 17884 HTTPStatusCode: res.StatusCode, 17885 }, 17886 } 17887 target := &ret 17888 if err := gensupport.DecodeResponse(target, res); err != nil { 17889 return nil, err 17890 } 17891 return ret, nil 17892 // { 17893 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 17894 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 17895 // "httpMethod": "PATCH", 17896 // "id": "dlp.projects.inspectTemplates.patch", 17897 // "parameterOrder": [ 17898 // "name" 17899 // ], 17900 // "parameters": { 17901 // "name": { 17902 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 17903 // "location": "path", 17904 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 17905 // "required": true, 17906 // "type": "string" 17907 // } 17908 // }, 17909 // "path": "v2/{+name}", 17910 // "request": { 17911 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 17912 // }, 17913 // "response": { 17914 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 17915 // }, 17916 // "scopes": [ 17917 // "https://www.googleapis.com/auth/cloud-platform" 17918 // ] 17919 // } 17920 17921} 17922 17923// method id "dlp.projects.jobTriggers.activate": 17924 17925type ProjectsJobTriggersActivateCall struct { 17926 s *Service 17927 name string 17928 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 17929 urlParams_ gensupport.URLParams 17930 ctx_ context.Context 17931 header_ http.Header 17932} 17933 17934// Activate: Activate a job trigger. Causes the immediate execute of a 17935// trigger instead of waiting on the trigger event to occur. 17936// 17937// - name: Resource name of the trigger to activate, for example 17938// `projects/dlp-test-project/jobTriggers/53234423`. 17939func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { 17940 c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17941 c.name = name 17942 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 17943 return c 17944} 17945 17946// Fields allows partial responses to be retrieved. See 17947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17948// for more information. 17949func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { 17950 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17951 return c 17952} 17953 17954// Context sets the context to be used in this call's Do method. Any 17955// pending HTTP request will be aborted if the provided context is 17956// canceled. 17957func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { 17958 c.ctx_ = ctx 17959 return c 17960} 17961 17962// Header returns an http.Header that can be modified by the caller to 17963// add HTTP headers to the request. 17964func (c *ProjectsJobTriggersActivateCall) Header() http.Header { 17965 if c.header_ == nil { 17966 c.header_ = make(http.Header) 17967 } 17968 return c.header_ 17969} 17970 17971func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 17972 reqHeaders := make(http.Header) 17973 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 17974 for k, v := range c.header_ { 17975 reqHeaders[k] = v 17976 } 17977 reqHeaders.Set("User-Agent", c.s.userAgent()) 17978 var body io.Reader = nil 17979 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 17980 if err != nil { 17981 return nil, err 17982 } 17983 reqHeaders.Set("Content-Type", "application/json") 17984 c.urlParams_.Set("alt", alt) 17985 c.urlParams_.Set("prettyPrint", "false") 17986 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 17987 urls += "?" + c.urlParams_.Encode() 17988 req, err := http.NewRequest("POST", urls, body) 17989 if err != nil { 17990 return nil, err 17991 } 17992 req.Header = reqHeaders 17993 googleapi.Expand(req.URL, map[string]string{ 17994 "name": c.name, 17995 }) 17996 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17997} 17998 17999// Do executes the "dlp.projects.jobTriggers.activate" call. 18000// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 18001// Any non-2xx status code is an error. Response headers are in either 18002// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 18003// returned at all) in error.(*googleapi.Error).Header. Use 18004// googleapi.IsNotModified to check whether the returned error was 18005// because http.StatusNotModified was returned. 18006func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 18007 gensupport.SetOptions(c.urlParams_, opts...) 18008 res, err := c.doRequest("json") 18009 if res != nil && res.StatusCode == http.StatusNotModified { 18010 if res.Body != nil { 18011 res.Body.Close() 18012 } 18013 return nil, &googleapi.Error{ 18014 Code: res.StatusCode, 18015 Header: res.Header, 18016 } 18017 } 18018 if err != nil { 18019 return nil, err 18020 } 18021 defer googleapi.CloseBody(res) 18022 if err := googleapi.CheckResponse(res); err != nil { 18023 return nil, err 18024 } 18025 ret := &GooglePrivacyDlpV2DlpJob{ 18026 ServerResponse: googleapi.ServerResponse{ 18027 Header: res.Header, 18028 HTTPStatusCode: res.StatusCode, 18029 }, 18030 } 18031 target := &ret 18032 if err := gensupport.DecodeResponse(target, res); err != nil { 18033 return nil, err 18034 } 18035 return ret, nil 18036 // { 18037 // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 18038 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", 18039 // "httpMethod": "POST", 18040 // "id": "dlp.projects.jobTriggers.activate", 18041 // "parameterOrder": [ 18042 // "name" 18043 // ], 18044 // "parameters": { 18045 // "name": { 18046 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 18047 // "location": "path", 18048 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 18049 // "required": true, 18050 // "type": "string" 18051 // } 18052 // }, 18053 // "path": "v2/{+name}:activate", 18054 // "request": { 18055 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 18056 // }, 18057 // "response": { 18058 // "$ref": "GooglePrivacyDlpV2DlpJob" 18059 // }, 18060 // "scopes": [ 18061 // "https://www.googleapis.com/auth/cloud-platform" 18062 // ] 18063 // } 18064 18065} 18066 18067// method id "dlp.projects.jobTriggers.create": 18068 18069type ProjectsJobTriggersCreateCall struct { 18070 s *Service 18071 parentid string 18072 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 18073 urlParams_ gensupport.URLParams 18074 ctx_ context.Context 18075 header_ http.Header 18076} 18077 18078// Create: Creates a job trigger to run DLP actions such as scanning 18079// storage for sensitive information on a set schedule. See 18080// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 18081// more. 18082// 18083// - parent: Parent resource name. The format of this value varies 18084// depending on whether you have specified a processing location 18085// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 18086// scope, location specified: 18087// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 18088// location specified (defaults to global): `projects/`PROJECT_ID The 18089// following example `parent` string specifies a parent project with 18090// the identifier `example-project`, and specifies the `europe-west3` 18091// location for processing data: 18092// parent=projects/example-project/locations/europe-west3. 18093func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { 18094 c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18095 c.parentid = parentid 18096 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 18097 return c 18098} 18099 18100// Fields allows partial responses to be retrieved. See 18101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18102// for more information. 18103func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { 18104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18105 return c 18106} 18107 18108// Context sets the context to be used in this call's Do method. Any 18109// pending HTTP request will be aborted if the provided context is 18110// canceled. 18111func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { 18112 c.ctx_ = ctx 18113 return c 18114} 18115 18116// Header returns an http.Header that can be modified by the caller to 18117// add HTTP headers to the request. 18118func (c *ProjectsJobTriggersCreateCall) Header() http.Header { 18119 if c.header_ == nil { 18120 c.header_ = make(http.Header) 18121 } 18122 return c.header_ 18123} 18124 18125func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 18126 reqHeaders := make(http.Header) 18127 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 18128 for k, v := range c.header_ { 18129 reqHeaders[k] = v 18130 } 18131 reqHeaders.Set("User-Agent", c.s.userAgent()) 18132 var body io.Reader = nil 18133 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 18134 if err != nil { 18135 return nil, err 18136 } 18137 reqHeaders.Set("Content-Type", "application/json") 18138 c.urlParams_.Set("alt", alt) 18139 c.urlParams_.Set("prettyPrint", "false") 18140 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 18141 urls += "?" + c.urlParams_.Encode() 18142 req, err := http.NewRequest("POST", urls, body) 18143 if err != nil { 18144 return nil, err 18145 } 18146 req.Header = reqHeaders 18147 googleapi.Expand(req.URL, map[string]string{ 18148 "parent": c.parentid, 18149 }) 18150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18151} 18152 18153// Do executes the "dlp.projects.jobTriggers.create" call. 18154// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 18155// non-nil. Any non-2xx status code is an error. Response headers are in 18156// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 18157// response was returned at all) in error.(*googleapi.Error).Header. Use 18158// googleapi.IsNotModified to check whether the returned error was 18159// because http.StatusNotModified was returned. 18160func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 18161 gensupport.SetOptions(c.urlParams_, opts...) 18162 res, err := c.doRequest("json") 18163 if res != nil && res.StatusCode == http.StatusNotModified { 18164 if res.Body != nil { 18165 res.Body.Close() 18166 } 18167 return nil, &googleapi.Error{ 18168 Code: res.StatusCode, 18169 Header: res.Header, 18170 } 18171 } 18172 if err != nil { 18173 return nil, err 18174 } 18175 defer googleapi.CloseBody(res) 18176 if err := googleapi.CheckResponse(res); err != nil { 18177 return nil, err 18178 } 18179 ret := &GooglePrivacyDlpV2JobTrigger{ 18180 ServerResponse: googleapi.ServerResponse{ 18181 Header: res.Header, 18182 HTTPStatusCode: res.StatusCode, 18183 }, 18184 } 18185 target := &ret 18186 if err := gensupport.DecodeResponse(target, res); err != nil { 18187 return nil, err 18188 } 18189 return ret, nil 18190 // { 18191 // "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.", 18192 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 18193 // "httpMethod": "POST", 18194 // "id": "dlp.projects.jobTriggers.create", 18195 // "parameterOrder": [ 18196 // "parent" 18197 // ], 18198 // "parameters": { 18199 // "parent": { 18200 // "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", 18201 // "location": "path", 18202 // "pattern": "^projects/[^/]+$", 18203 // "required": true, 18204 // "type": "string" 18205 // } 18206 // }, 18207 // "path": "v2/{+parent}/jobTriggers", 18208 // "request": { 18209 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 18210 // }, 18211 // "response": { 18212 // "$ref": "GooglePrivacyDlpV2JobTrigger" 18213 // }, 18214 // "scopes": [ 18215 // "https://www.googleapis.com/auth/cloud-platform" 18216 // ] 18217 // } 18218 18219} 18220 18221// method id "dlp.projects.jobTriggers.delete": 18222 18223type ProjectsJobTriggersDeleteCall struct { 18224 s *Service 18225 name string 18226 urlParams_ gensupport.URLParams 18227 ctx_ context.Context 18228 header_ http.Header 18229} 18230 18231// Delete: Deletes a job trigger. See 18232// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 18233// more. 18234// 18235// - name: Resource name of the project and the triggeredJob, for 18236// example `projects/dlp-test-project/jobTriggers/53234423`. 18237func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { 18238 c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18239 c.name = name 18240 return c 18241} 18242 18243// Fields allows partial responses to be retrieved. See 18244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18245// for more information. 18246func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { 18247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18248 return c 18249} 18250 18251// Context sets the context to be used in this call's Do method. Any 18252// pending HTTP request will be aborted if the provided context is 18253// canceled. 18254func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { 18255 c.ctx_ = ctx 18256 return c 18257} 18258 18259// Header returns an http.Header that can be modified by the caller to 18260// add HTTP headers to the request. 18261func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { 18262 if c.header_ == nil { 18263 c.header_ = make(http.Header) 18264 } 18265 return c.header_ 18266} 18267 18268func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 18269 reqHeaders := make(http.Header) 18270 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 18271 for k, v := range c.header_ { 18272 reqHeaders[k] = v 18273 } 18274 reqHeaders.Set("User-Agent", c.s.userAgent()) 18275 var body io.Reader = nil 18276 c.urlParams_.Set("alt", alt) 18277 c.urlParams_.Set("prettyPrint", "false") 18278 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18279 urls += "?" + c.urlParams_.Encode() 18280 req, err := http.NewRequest("DELETE", urls, body) 18281 if err != nil { 18282 return nil, err 18283 } 18284 req.Header = reqHeaders 18285 googleapi.Expand(req.URL, map[string]string{ 18286 "name": c.name, 18287 }) 18288 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18289} 18290 18291// Do executes the "dlp.projects.jobTriggers.delete" call. 18292// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18293// non-2xx status code is an error. Response headers are in either 18294// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18295// returned at all) in error.(*googleapi.Error).Header. Use 18296// googleapi.IsNotModified to check whether the returned error was 18297// because http.StatusNotModified was returned. 18298func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18299 gensupport.SetOptions(c.urlParams_, opts...) 18300 res, err := c.doRequest("json") 18301 if res != nil && res.StatusCode == http.StatusNotModified { 18302 if res.Body != nil { 18303 res.Body.Close() 18304 } 18305 return nil, &googleapi.Error{ 18306 Code: res.StatusCode, 18307 Header: res.Header, 18308 } 18309 } 18310 if err != nil { 18311 return nil, err 18312 } 18313 defer googleapi.CloseBody(res) 18314 if err := googleapi.CheckResponse(res); err != nil { 18315 return nil, err 18316 } 18317 ret := &GoogleProtobufEmpty{ 18318 ServerResponse: googleapi.ServerResponse{ 18319 Header: res.Header, 18320 HTTPStatusCode: res.StatusCode, 18321 }, 18322 } 18323 target := &ret 18324 if err := gensupport.DecodeResponse(target, res); err != nil { 18325 return nil, err 18326 } 18327 return ret, nil 18328 // { 18329 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 18330 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 18331 // "httpMethod": "DELETE", 18332 // "id": "dlp.projects.jobTriggers.delete", 18333 // "parameterOrder": [ 18334 // "name" 18335 // ], 18336 // "parameters": { 18337 // "name": { 18338 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 18339 // "location": "path", 18340 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 18341 // "required": true, 18342 // "type": "string" 18343 // } 18344 // }, 18345 // "path": "v2/{+name}", 18346 // "response": { 18347 // "$ref": "GoogleProtobufEmpty" 18348 // }, 18349 // "scopes": [ 18350 // "https://www.googleapis.com/auth/cloud-platform" 18351 // ] 18352 // } 18353 18354} 18355 18356// method id "dlp.projects.jobTriggers.get": 18357 18358type ProjectsJobTriggersGetCall struct { 18359 s *Service 18360 name string 18361 urlParams_ gensupport.URLParams 18362 ifNoneMatch_ string 18363 ctx_ context.Context 18364 header_ http.Header 18365} 18366 18367// Get: Gets a job trigger. See 18368// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 18369// more. 18370// 18371// - name: Resource name of the project and the triggeredJob, for 18372// example `projects/dlp-test-project/jobTriggers/53234423`. 18373func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { 18374 c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18375 c.name = name 18376 return c 18377} 18378 18379// Fields allows partial responses to be retrieved. See 18380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18381// for more information. 18382func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { 18383 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18384 return c 18385} 18386 18387// IfNoneMatch sets the optional parameter which makes the operation 18388// fail if the object's ETag matches the given value. This is useful for 18389// getting updates only after the object has changed since the last 18390// request. Use googleapi.IsNotModified to check whether the response 18391// error from Do is the result of In-None-Match. 18392func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { 18393 c.ifNoneMatch_ = entityTag 18394 return c 18395} 18396 18397// Context sets the context to be used in this call's Do method. Any 18398// pending HTTP request will be aborted if the provided context is 18399// canceled. 18400func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { 18401 c.ctx_ = ctx 18402 return c 18403} 18404 18405// Header returns an http.Header that can be modified by the caller to 18406// add HTTP headers to the request. 18407func (c *ProjectsJobTriggersGetCall) Header() http.Header { 18408 if c.header_ == nil { 18409 c.header_ = make(http.Header) 18410 } 18411 return c.header_ 18412} 18413 18414func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 18415 reqHeaders := make(http.Header) 18416 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 18417 for k, v := range c.header_ { 18418 reqHeaders[k] = v 18419 } 18420 reqHeaders.Set("User-Agent", c.s.userAgent()) 18421 if c.ifNoneMatch_ != "" { 18422 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18423 } 18424 var body io.Reader = nil 18425 c.urlParams_.Set("alt", alt) 18426 c.urlParams_.Set("prettyPrint", "false") 18427 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18428 urls += "?" + c.urlParams_.Encode() 18429 req, err := http.NewRequest("GET", urls, body) 18430 if err != nil { 18431 return nil, err 18432 } 18433 req.Header = reqHeaders 18434 googleapi.Expand(req.URL, map[string]string{ 18435 "name": c.name, 18436 }) 18437 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18438} 18439 18440// Do executes the "dlp.projects.jobTriggers.get" call. 18441// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 18442// non-nil. Any non-2xx status code is an error. Response headers are in 18443// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 18444// response was returned at all) in error.(*googleapi.Error).Header. Use 18445// googleapi.IsNotModified to check whether the returned error was 18446// because http.StatusNotModified was returned. 18447func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 18448 gensupport.SetOptions(c.urlParams_, opts...) 18449 res, err := c.doRequest("json") 18450 if res != nil && res.StatusCode == http.StatusNotModified { 18451 if res.Body != nil { 18452 res.Body.Close() 18453 } 18454 return nil, &googleapi.Error{ 18455 Code: res.StatusCode, 18456 Header: res.Header, 18457 } 18458 } 18459 if err != nil { 18460 return nil, err 18461 } 18462 defer googleapi.CloseBody(res) 18463 if err := googleapi.CheckResponse(res); err != nil { 18464 return nil, err 18465 } 18466 ret := &GooglePrivacyDlpV2JobTrigger{ 18467 ServerResponse: googleapi.ServerResponse{ 18468 Header: res.Header, 18469 HTTPStatusCode: res.StatusCode, 18470 }, 18471 } 18472 target := &ret 18473 if err := gensupport.DecodeResponse(target, res); err != nil { 18474 return nil, err 18475 } 18476 return ret, nil 18477 // { 18478 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 18479 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 18480 // "httpMethod": "GET", 18481 // "id": "dlp.projects.jobTriggers.get", 18482 // "parameterOrder": [ 18483 // "name" 18484 // ], 18485 // "parameters": { 18486 // "name": { 18487 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 18488 // "location": "path", 18489 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 18490 // "required": true, 18491 // "type": "string" 18492 // } 18493 // }, 18494 // "path": "v2/{+name}", 18495 // "response": { 18496 // "$ref": "GooglePrivacyDlpV2JobTrigger" 18497 // }, 18498 // "scopes": [ 18499 // "https://www.googleapis.com/auth/cloud-platform" 18500 // ] 18501 // } 18502 18503} 18504 18505// method id "dlp.projects.jobTriggers.list": 18506 18507type ProjectsJobTriggersListCall struct { 18508 s *Service 18509 parentid string 18510 urlParams_ gensupport.URLParams 18511 ifNoneMatch_ string 18512 ctx_ context.Context 18513 header_ http.Header 18514} 18515 18516// List: Lists job triggers. See 18517// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 18518// more. 18519// 18520// - parent: Parent resource name. The format of this value varies 18521// depending on whether you have specified a processing location 18522// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 18523// scope, location specified: 18524// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 18525// location specified (defaults to global): `projects/`PROJECT_ID The 18526// following example `parent` string specifies a parent project with 18527// the identifier `example-project`, and specifies the `europe-west3` 18528// location for processing data: 18529// parent=projects/example-project/locations/europe-west3. 18530func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { 18531 c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18532 c.parentid = parentid 18533 return c 18534} 18535 18536// Filter sets the optional parameter "filter": Allows filtering. 18537// Supported syntax: * Filter expressions are made up of one or more 18538// restrictions. * Restrictions can be combined by `AND` or `OR` logical 18539// operators. A sequence of restrictions implicitly uses `AND`. * A 18540// restriction has the form of `{field} {operator} {value}`. * Supported 18541// fields/values for inspect triggers: - `status` - 18542// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - 18543// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 18544// formatted timestamp, surrounded by quotation marks. Nanoseconds are 18545// ignored. - 'error_count' - Number of errors that have occurred while 18546// running. * The operator must be `=` or `!=` for status and 18547// inspected_storage. Examples: * inspected_storage = cloud_storage AND 18548// status = HEALTHY * inspected_storage = cloud_storage OR 18549// inspected_storage = bigquery * inspected_storage = cloud_storage AND 18550// (state = PAUSED OR state = HEALTHY) * last_run_time > 18551// \"2017-12-12T00:00:00+00:00\" The length of this field should be no 18552// more than 500 characters. 18553func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { 18554 c.urlParams_.Set("filter", filter) 18555 return c 18556} 18557 18558// LocationId sets the optional parameter "locationId": Deprecated. This 18559// field has no effect. 18560func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJobTriggersListCall { 18561 c.urlParams_.Set("locationId", locationId) 18562 return c 18563} 18564 18565// OrderBy sets the optional parameter "orderBy": Comma separated list 18566// of triggeredJob fields to order by, followed by `asc` or `desc` 18567// postfix. This list is case-insensitive, default sorting order is 18568// ascending, redundant space characters are insignificant. Example: 18569// `name asc,update_time, create_time desc` Supported fields are: - 18570// `create_time`: corresponds to time the JobTrigger was created. - 18571// `update_time`: corresponds to time the JobTrigger was last updated. - 18572// `last_run_time`: corresponds to the last time the JobTrigger ran. - 18573// `name`: corresponds to JobTrigger's name. - `display_name`: 18574// corresponds to JobTrigger's display name. - `status`: corresponds to 18575// JobTrigger's status. 18576func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { 18577 c.urlParams_.Set("orderBy", orderBy) 18578 return c 18579} 18580 18581// PageSize sets the optional parameter "pageSize": Size of the page, 18582// can be limited by a server. 18583func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { 18584 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18585 return c 18586} 18587 18588// PageToken sets the optional parameter "pageToken": Page token to 18589// continue retrieval. Comes from previous call to ListJobTriggers. 18590// `order_by` field must not change for subsequent calls. 18591func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { 18592 c.urlParams_.Set("pageToken", pageToken) 18593 return c 18594} 18595 18596// Type sets the optional parameter "type": The type of jobs. Will use 18597// `DlpJobType.INSPECT` if not set. 18598// 18599// Possible values: 18600// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 18601// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 18602// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 18603func (c *ProjectsJobTriggersListCall) Type(type_ string) *ProjectsJobTriggersListCall { 18604 c.urlParams_.Set("type", type_) 18605 return c 18606} 18607 18608// Fields allows partial responses to be retrieved. See 18609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18610// for more information. 18611func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { 18612 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18613 return c 18614} 18615 18616// IfNoneMatch sets the optional parameter which makes the operation 18617// fail if the object's ETag matches the given value. This is useful for 18618// getting updates only after the object has changed since the last 18619// request. Use googleapi.IsNotModified to check whether the response 18620// error from Do is the result of In-None-Match. 18621func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { 18622 c.ifNoneMatch_ = entityTag 18623 return c 18624} 18625 18626// Context sets the context to be used in this call's Do method. Any 18627// pending HTTP request will be aborted if the provided context is 18628// canceled. 18629func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { 18630 c.ctx_ = ctx 18631 return c 18632} 18633 18634// Header returns an http.Header that can be modified by the caller to 18635// add HTTP headers to the request. 18636func (c *ProjectsJobTriggersListCall) Header() http.Header { 18637 if c.header_ == nil { 18638 c.header_ = make(http.Header) 18639 } 18640 return c.header_ 18641} 18642 18643func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 18644 reqHeaders := make(http.Header) 18645 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 18646 for k, v := range c.header_ { 18647 reqHeaders[k] = v 18648 } 18649 reqHeaders.Set("User-Agent", c.s.userAgent()) 18650 if c.ifNoneMatch_ != "" { 18651 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18652 } 18653 var body io.Reader = nil 18654 c.urlParams_.Set("alt", alt) 18655 c.urlParams_.Set("prettyPrint", "false") 18656 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 18657 urls += "?" + c.urlParams_.Encode() 18658 req, err := http.NewRequest("GET", urls, body) 18659 if err != nil { 18660 return nil, err 18661 } 18662 req.Header = reqHeaders 18663 googleapi.Expand(req.URL, map[string]string{ 18664 "parent": c.parentid, 18665 }) 18666 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18667} 18668 18669// Do executes the "dlp.projects.jobTriggers.list" call. 18670// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 18671// will be non-nil. Any non-2xx status code is an error. Response 18672// headers are in either 18673// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 18674// (if a response was returned at all) in 18675// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18676// whether the returned error was because http.StatusNotModified was 18677// returned. 18678func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 18679 gensupport.SetOptions(c.urlParams_, opts...) 18680 res, err := c.doRequest("json") 18681 if res != nil && res.StatusCode == http.StatusNotModified { 18682 if res.Body != nil { 18683 res.Body.Close() 18684 } 18685 return nil, &googleapi.Error{ 18686 Code: res.StatusCode, 18687 Header: res.Header, 18688 } 18689 } 18690 if err != nil { 18691 return nil, err 18692 } 18693 defer googleapi.CloseBody(res) 18694 if err := googleapi.CheckResponse(res); err != nil { 18695 return nil, err 18696 } 18697 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 18698 ServerResponse: googleapi.ServerResponse{ 18699 Header: res.Header, 18700 HTTPStatusCode: res.StatusCode, 18701 }, 18702 } 18703 target := &ret 18704 if err := gensupport.DecodeResponse(target, res); err != nil { 18705 return nil, err 18706 } 18707 return ret, nil 18708 // { 18709 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 18710 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 18711 // "httpMethod": "GET", 18712 // "id": "dlp.projects.jobTriggers.list", 18713 // "parameterOrder": [ 18714 // "parent" 18715 // ], 18716 // "parameters": { 18717 // "filter": { 18718 // "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 triggers: - `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.", 18719 // "location": "query", 18720 // "type": "string" 18721 // }, 18722 // "locationId": { 18723 // "description": "Deprecated. This field has no effect.", 18724 // "location": "query", 18725 // "type": "string" 18726 // }, 18727 // "orderBy": { 18728 // "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.", 18729 // "location": "query", 18730 // "type": "string" 18731 // }, 18732 // "pageSize": { 18733 // "description": "Size of the page, can be limited by a server.", 18734 // "format": "int32", 18735 // "location": "query", 18736 // "type": "integer" 18737 // }, 18738 // "pageToken": { 18739 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 18740 // "location": "query", 18741 // "type": "string" 18742 // }, 18743 // "parent": { 18744 // "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", 18745 // "location": "path", 18746 // "pattern": "^projects/[^/]+$", 18747 // "required": true, 18748 // "type": "string" 18749 // }, 18750 // "type": { 18751 // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", 18752 // "enum": [ 18753 // "DLP_JOB_TYPE_UNSPECIFIED", 18754 // "INSPECT_JOB", 18755 // "RISK_ANALYSIS_JOB" 18756 // ], 18757 // "enumDescriptions": [ 18758 // "Defaults to INSPECT_JOB.", 18759 // "The job inspected Google Cloud for sensitive data.", 18760 // "The job executed a Risk Analysis computation." 18761 // ], 18762 // "location": "query", 18763 // "type": "string" 18764 // } 18765 // }, 18766 // "path": "v2/{+parent}/jobTriggers", 18767 // "response": { 18768 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 18769 // }, 18770 // "scopes": [ 18771 // "https://www.googleapis.com/auth/cloud-platform" 18772 // ] 18773 // } 18774 18775} 18776 18777// Pages invokes f for each page of results. 18778// A non-nil error returned from f will halt the iteration. 18779// The provided context supersedes any context provided to the Context method. 18780func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 18781 c.ctx_ = ctx 18782 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18783 for { 18784 x, err := c.Do() 18785 if err != nil { 18786 return err 18787 } 18788 if err := f(x); err != nil { 18789 return err 18790 } 18791 if x.NextPageToken == "" { 18792 return nil 18793 } 18794 c.PageToken(x.NextPageToken) 18795 } 18796} 18797 18798// method id "dlp.projects.jobTriggers.patch": 18799 18800type ProjectsJobTriggersPatchCall struct { 18801 s *Service 18802 name string 18803 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 18804 urlParams_ gensupport.URLParams 18805 ctx_ context.Context 18806 header_ http.Header 18807} 18808 18809// Patch: Updates a job trigger. See 18810// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 18811// more. 18812// 18813// - name: Resource name of the project and the triggeredJob, for 18814// example `projects/dlp-test-project/jobTriggers/53234423`. 18815func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { 18816 c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18817 c.name = name 18818 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 18819 return c 18820} 18821 18822// Fields allows partial responses to be retrieved. See 18823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18824// for more information. 18825func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { 18826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18827 return c 18828} 18829 18830// Context sets the context to be used in this call's Do method. Any 18831// pending HTTP request will be aborted if the provided context is 18832// canceled. 18833func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { 18834 c.ctx_ = ctx 18835 return c 18836} 18837 18838// Header returns an http.Header that can be modified by the caller to 18839// add HTTP headers to the request. 18840func (c *ProjectsJobTriggersPatchCall) Header() http.Header { 18841 if c.header_ == nil { 18842 c.header_ = make(http.Header) 18843 } 18844 return c.header_ 18845} 18846 18847func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 18848 reqHeaders := make(http.Header) 18849 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 18850 for k, v := range c.header_ { 18851 reqHeaders[k] = v 18852 } 18853 reqHeaders.Set("User-Agent", c.s.userAgent()) 18854 var body io.Reader = nil 18855 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 18856 if err != nil { 18857 return nil, err 18858 } 18859 reqHeaders.Set("Content-Type", "application/json") 18860 c.urlParams_.Set("alt", alt) 18861 c.urlParams_.Set("prettyPrint", "false") 18862 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18863 urls += "?" + c.urlParams_.Encode() 18864 req, err := http.NewRequest("PATCH", urls, body) 18865 if err != nil { 18866 return nil, err 18867 } 18868 req.Header = reqHeaders 18869 googleapi.Expand(req.URL, map[string]string{ 18870 "name": c.name, 18871 }) 18872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18873} 18874 18875// Do executes the "dlp.projects.jobTriggers.patch" call. 18876// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 18877// non-nil. Any non-2xx status code is an error. Response headers are in 18878// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 18879// response was returned at all) in error.(*googleapi.Error).Header. Use 18880// googleapi.IsNotModified to check whether the returned error was 18881// because http.StatusNotModified was returned. 18882func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 18883 gensupport.SetOptions(c.urlParams_, opts...) 18884 res, err := c.doRequest("json") 18885 if res != nil && res.StatusCode == http.StatusNotModified { 18886 if res.Body != nil { 18887 res.Body.Close() 18888 } 18889 return nil, &googleapi.Error{ 18890 Code: res.StatusCode, 18891 Header: res.Header, 18892 } 18893 } 18894 if err != nil { 18895 return nil, err 18896 } 18897 defer googleapi.CloseBody(res) 18898 if err := googleapi.CheckResponse(res); err != nil { 18899 return nil, err 18900 } 18901 ret := &GooglePrivacyDlpV2JobTrigger{ 18902 ServerResponse: googleapi.ServerResponse{ 18903 Header: res.Header, 18904 HTTPStatusCode: res.StatusCode, 18905 }, 18906 } 18907 target := &ret 18908 if err := gensupport.DecodeResponse(target, res); err != nil { 18909 return nil, err 18910 } 18911 return ret, nil 18912 // { 18913 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 18914 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 18915 // "httpMethod": "PATCH", 18916 // "id": "dlp.projects.jobTriggers.patch", 18917 // "parameterOrder": [ 18918 // "name" 18919 // ], 18920 // "parameters": { 18921 // "name": { 18922 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 18923 // "location": "path", 18924 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 18925 // "required": true, 18926 // "type": "string" 18927 // } 18928 // }, 18929 // "path": "v2/{+name}", 18930 // "request": { 18931 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 18932 // }, 18933 // "response": { 18934 // "$ref": "GooglePrivacyDlpV2JobTrigger" 18935 // }, 18936 // "scopes": [ 18937 // "https://www.googleapis.com/auth/cloud-platform" 18938 // ] 18939 // } 18940 18941} 18942 18943// method id "dlp.projects.locations.content.deidentify": 18944 18945type ProjectsLocationsContentDeidentifyCall struct { 18946 s *Service 18947 parentid string 18948 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 18949 urlParams_ gensupport.URLParams 18950 ctx_ context.Context 18951 header_ http.Header 18952} 18953 18954// Deidentify: De-identifies potentially sensitive info from a 18955// ContentItem. This method has limits on input size and output size. 18956// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 18957// learn more. When no InfoTypes or CustomInfoTypes are specified in 18958// this request, the system will automatically choose what detectors to 18959// run. By default this may be all types, but may change over time as 18960// detectors are updated. 18961// 18962// - parent: Parent resource name. The format of this value varies 18963// depending on whether you have specified a processing location 18964// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 18965// scope, location specified: 18966// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 18967// location specified (defaults to global): `projects/`PROJECT_ID The 18968// following example `parent` string specifies a parent project with 18969// the identifier `example-project`, and specifies the `europe-west3` 18970// location for processing data: 18971// parent=projects/example-project/locations/europe-west3. 18972func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { 18973 c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18974 c.parentid = parentid 18975 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 18976 return c 18977} 18978 18979// Fields allows partial responses to be retrieved. See 18980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18981// for more information. 18982func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { 18983 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18984 return c 18985} 18986 18987// Context sets the context to be used in this call's Do method. Any 18988// pending HTTP request will be aborted if the provided context is 18989// canceled. 18990func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { 18991 c.ctx_ = ctx 18992 return c 18993} 18994 18995// Header returns an http.Header that can be modified by the caller to 18996// add HTTP headers to the request. 18997func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { 18998 if c.header_ == nil { 18999 c.header_ = make(http.Header) 19000 } 19001 return c.header_ 19002} 19003 19004func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 19005 reqHeaders := make(http.Header) 19006 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19007 for k, v := range c.header_ { 19008 reqHeaders[k] = v 19009 } 19010 reqHeaders.Set("User-Agent", c.s.userAgent()) 19011 var body io.Reader = nil 19012 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 19013 if err != nil { 19014 return nil, err 19015 } 19016 reqHeaders.Set("Content-Type", "application/json") 19017 c.urlParams_.Set("alt", alt) 19018 c.urlParams_.Set("prettyPrint", "false") 19019 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 19020 urls += "?" + c.urlParams_.Encode() 19021 req, err := http.NewRequest("POST", urls, body) 19022 if err != nil { 19023 return nil, err 19024 } 19025 req.Header = reqHeaders 19026 googleapi.Expand(req.URL, map[string]string{ 19027 "parent": c.parentid, 19028 }) 19029 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19030} 19031 19032// Do executes the "dlp.projects.locations.content.deidentify" call. 19033// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 19034// will be non-nil. Any non-2xx status code is an error. Response 19035// headers are in either 19036// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 19037// (if a response was returned at all) in 19038// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19039// whether the returned error was because http.StatusNotModified was 19040// returned. 19041func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 19042 gensupport.SetOptions(c.urlParams_, opts...) 19043 res, err := c.doRequest("json") 19044 if res != nil && res.StatusCode == http.StatusNotModified { 19045 if res.Body != nil { 19046 res.Body.Close() 19047 } 19048 return nil, &googleapi.Error{ 19049 Code: res.StatusCode, 19050 Header: res.Header, 19051 } 19052 } 19053 if err != nil { 19054 return nil, err 19055 } 19056 defer googleapi.CloseBody(res) 19057 if err := googleapi.CheckResponse(res); err != nil { 19058 return nil, err 19059 } 19060 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 19061 ServerResponse: googleapi.ServerResponse{ 19062 Header: res.Header, 19063 HTTPStatusCode: res.StatusCode, 19064 }, 19065 } 19066 target := &ret 19067 if err := gensupport.DecodeResponse(target, res); err != nil { 19068 return nil, err 19069 } 19070 return ret, nil 19071 // { 19072 // "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.", 19073 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:deidentify", 19074 // "httpMethod": "POST", 19075 // "id": "dlp.projects.locations.content.deidentify", 19076 // "parameterOrder": [ 19077 // "parent" 19078 // ], 19079 // "parameters": { 19080 // "parent": { 19081 // "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", 19082 // "location": "path", 19083 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19084 // "required": true, 19085 // "type": "string" 19086 // } 19087 // }, 19088 // "path": "v2/{+parent}/content:deidentify", 19089 // "request": { 19090 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 19091 // }, 19092 // "response": { 19093 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 19094 // }, 19095 // "scopes": [ 19096 // "https://www.googleapis.com/auth/cloud-platform" 19097 // ] 19098 // } 19099 19100} 19101 19102// method id "dlp.projects.locations.content.inspect": 19103 19104type ProjectsLocationsContentInspectCall struct { 19105 s *Service 19106 parentid string 19107 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 19108 urlParams_ gensupport.URLParams 19109 ctx_ context.Context 19110 header_ http.Header 19111} 19112 19113// Inspect: Finds potentially sensitive info in content. This method has 19114// limits on input size, processing time, and output size. When no 19115// InfoTypes or CustomInfoTypes are specified in this request, the 19116// system will automatically choose what detectors to run. By default 19117// this may be all types, but may change over time as detectors are 19118// updated. For how to guides, see 19119// https://cloud.google.com/dlp/docs/inspecting-images and 19120// https://cloud.google.com/dlp/docs/inspecting-text, 19121// 19122// - parent: Parent resource name. The format of this value varies 19123// depending on whether you have specified a processing location 19124// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 19125// scope, location specified: 19126// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 19127// location specified (defaults to global): `projects/`PROJECT_ID The 19128// following example `parent` string specifies a parent project with 19129// the identifier `example-project`, and specifies the `europe-west3` 19130// location for processing data: 19131// parent=projects/example-project/locations/europe-west3. 19132func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { 19133 c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19134 c.parentid = parentid 19135 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 19136 return c 19137} 19138 19139// Fields allows partial responses to be retrieved. See 19140// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19141// for more information. 19142func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { 19143 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19144 return c 19145} 19146 19147// Context sets the context to be used in this call's Do method. Any 19148// pending HTTP request will be aborted if the provided context is 19149// canceled. 19150func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { 19151 c.ctx_ = ctx 19152 return c 19153} 19154 19155// Header returns an http.Header that can be modified by the caller to 19156// add HTTP headers to the request. 19157func (c *ProjectsLocationsContentInspectCall) Header() http.Header { 19158 if c.header_ == nil { 19159 c.header_ = make(http.Header) 19160 } 19161 return c.header_ 19162} 19163 19164func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { 19165 reqHeaders := make(http.Header) 19166 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19167 for k, v := range c.header_ { 19168 reqHeaders[k] = v 19169 } 19170 reqHeaders.Set("User-Agent", c.s.userAgent()) 19171 var body io.Reader = nil 19172 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 19173 if err != nil { 19174 return nil, err 19175 } 19176 reqHeaders.Set("Content-Type", "application/json") 19177 c.urlParams_.Set("alt", alt) 19178 c.urlParams_.Set("prettyPrint", "false") 19179 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 19180 urls += "?" + c.urlParams_.Encode() 19181 req, err := http.NewRequest("POST", urls, body) 19182 if err != nil { 19183 return nil, err 19184 } 19185 req.Header = reqHeaders 19186 googleapi.Expand(req.URL, map[string]string{ 19187 "parent": c.parentid, 19188 }) 19189 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19190} 19191 19192// Do executes the "dlp.projects.locations.content.inspect" call. 19193// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 19194// will be non-nil. Any non-2xx status code is an error. Response 19195// headers are in either 19196// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 19197// (if a response was returned at all) in 19198// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19199// whether the returned error was because http.StatusNotModified was 19200// returned. 19201func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 19202 gensupport.SetOptions(c.urlParams_, opts...) 19203 res, err := c.doRequest("json") 19204 if res != nil && res.StatusCode == http.StatusNotModified { 19205 if res.Body != nil { 19206 res.Body.Close() 19207 } 19208 return nil, &googleapi.Error{ 19209 Code: res.StatusCode, 19210 Header: res.Header, 19211 } 19212 } 19213 if err != nil { 19214 return nil, err 19215 } 19216 defer googleapi.CloseBody(res) 19217 if err := googleapi.CheckResponse(res); err != nil { 19218 return nil, err 19219 } 19220 ret := &GooglePrivacyDlpV2InspectContentResponse{ 19221 ServerResponse: googleapi.ServerResponse{ 19222 Header: res.Header, 19223 HTTPStatusCode: res.StatusCode, 19224 }, 19225 } 19226 target := &ret 19227 if err := gensupport.DecodeResponse(target, res); err != nil { 19228 return nil, err 19229 } 19230 return ret, nil 19231 // { 19232 // "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,", 19233 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", 19234 // "httpMethod": "POST", 19235 // "id": "dlp.projects.locations.content.inspect", 19236 // "parameterOrder": [ 19237 // "parent" 19238 // ], 19239 // "parameters": { 19240 // "parent": { 19241 // "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", 19242 // "location": "path", 19243 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19244 // "required": true, 19245 // "type": "string" 19246 // } 19247 // }, 19248 // "path": "v2/{+parent}/content:inspect", 19249 // "request": { 19250 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 19251 // }, 19252 // "response": { 19253 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 19254 // }, 19255 // "scopes": [ 19256 // "https://www.googleapis.com/auth/cloud-platform" 19257 // ] 19258 // } 19259 19260} 19261 19262// method id "dlp.projects.locations.content.reidentify": 19263 19264type ProjectsLocationsContentReidentifyCall struct { 19265 s *Service 19266 parentid string 19267 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 19268 urlParams_ gensupport.URLParams 19269 ctx_ context.Context 19270 header_ http.Header 19271} 19272 19273// Reidentify: Re-identifies content that has been de-identified. See 19274// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example 19275// to learn more. 19276// 19277// - parent: Parent resource name. The format of this value varies 19278// depending on whether you have specified a processing location 19279// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 19280// scope, location specified: 19281// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 19282// location specified (defaults to global): `projects/`PROJECT_ID The 19283// following example `parent` string specifies a parent project with 19284// the identifier `example-project`, and specifies the `europe-west3` 19285// location for processing data: 19286// parent=projects/example-project/locations/europe-west3. 19287func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { 19288 c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19289 c.parentid = parentid 19290 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 19291 return c 19292} 19293 19294// Fields allows partial responses to be retrieved. See 19295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19296// for more information. 19297func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { 19298 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19299 return c 19300} 19301 19302// Context sets the context to be used in this call's Do method. Any 19303// pending HTTP request will be aborted if the provided context is 19304// canceled. 19305func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { 19306 c.ctx_ = ctx 19307 return c 19308} 19309 19310// Header returns an http.Header that can be modified by the caller to 19311// add HTTP headers to the request. 19312func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { 19313 if c.header_ == nil { 19314 c.header_ = make(http.Header) 19315 } 19316 return c.header_ 19317} 19318 19319func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 19320 reqHeaders := make(http.Header) 19321 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19322 for k, v := range c.header_ { 19323 reqHeaders[k] = v 19324 } 19325 reqHeaders.Set("User-Agent", c.s.userAgent()) 19326 var body io.Reader = nil 19327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 19328 if err != nil { 19329 return nil, err 19330 } 19331 reqHeaders.Set("Content-Type", "application/json") 19332 c.urlParams_.Set("alt", alt) 19333 c.urlParams_.Set("prettyPrint", "false") 19334 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 19335 urls += "?" + c.urlParams_.Encode() 19336 req, err := http.NewRequest("POST", urls, body) 19337 if err != nil { 19338 return nil, err 19339 } 19340 req.Header = reqHeaders 19341 googleapi.Expand(req.URL, map[string]string{ 19342 "parent": c.parentid, 19343 }) 19344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19345} 19346 19347// Do executes the "dlp.projects.locations.content.reidentify" call. 19348// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 19349// will be non-nil. Any non-2xx status code is an error. Response 19350// headers are in either 19351// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 19352// (if a response was returned at all) in 19353// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19354// whether the returned error was because http.StatusNotModified was 19355// returned. 19356func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 19357 gensupport.SetOptions(c.urlParams_, opts...) 19358 res, err := c.doRequest("json") 19359 if res != nil && res.StatusCode == http.StatusNotModified { 19360 if res.Body != nil { 19361 res.Body.Close() 19362 } 19363 return nil, &googleapi.Error{ 19364 Code: res.StatusCode, 19365 Header: res.Header, 19366 } 19367 } 19368 if err != nil { 19369 return nil, err 19370 } 19371 defer googleapi.CloseBody(res) 19372 if err := googleapi.CheckResponse(res); err != nil { 19373 return nil, err 19374 } 19375 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 19376 ServerResponse: googleapi.ServerResponse{ 19377 Header: res.Header, 19378 HTTPStatusCode: res.StatusCode, 19379 }, 19380 } 19381 target := &ret 19382 if err := gensupport.DecodeResponse(target, res); err != nil { 19383 return nil, err 19384 } 19385 return ret, nil 19386 // { 19387 // "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.", 19388 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:reidentify", 19389 // "httpMethod": "POST", 19390 // "id": "dlp.projects.locations.content.reidentify", 19391 // "parameterOrder": [ 19392 // "parent" 19393 // ], 19394 // "parameters": { 19395 // "parent": { 19396 // "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", 19397 // "location": "path", 19398 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19399 // "required": true, 19400 // "type": "string" 19401 // } 19402 // }, 19403 // "path": "v2/{+parent}/content:reidentify", 19404 // "request": { 19405 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 19406 // }, 19407 // "response": { 19408 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 19409 // }, 19410 // "scopes": [ 19411 // "https://www.googleapis.com/auth/cloud-platform" 19412 // ] 19413 // } 19414 19415} 19416 19417// method id "dlp.projects.locations.deidentifyTemplates.create": 19418 19419type ProjectsLocationsDeidentifyTemplatesCreateCall struct { 19420 s *Service 19421 parentid string 19422 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 19423 urlParams_ gensupport.URLParams 19424 ctx_ context.Context 19425 header_ http.Header 19426} 19427 19428// Create: Creates a DeidentifyTemplate for re-using frequently used 19429// configuration for de-identifying content, images, and storage. See 19430// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 19431// more. 19432// 19433// - parent: Parent resource name. The format of this value varies 19434// depending on the scope of the request (project or organization) and 19435// whether you have specified a processing location 19436// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 19437// scope, location specified: 19438// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 19439// location specified (defaults to global): `projects/`PROJECT_ID + 19440// Organizations scope, location specified: 19441// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 19442// scope, no location specified (defaults to global): 19443// `organizations/`ORG_ID The following example `parent` string 19444// specifies a parent project with the identifier `example-project`, 19445// and specifies the `europe-west3` location for processing data: 19446// parent=projects/example-project/locations/europe-west3. 19447func (r *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { 19448 c := &ProjectsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19449 c.parentid = parentid 19450 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 19451 return c 19452} 19453 19454// Fields allows partial responses to be retrieved. See 19455// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19456// for more information. 19457func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesCreateCall { 19458 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19459 return c 19460} 19461 19462// Context sets the context to be used in this call's Do method. Any 19463// pending HTTP request will be aborted if the provided context is 19464// canceled. 19465func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesCreateCall { 19466 c.ctx_ = ctx 19467 return c 19468} 19469 19470// Header returns an http.Header that can be modified by the caller to 19471// add HTTP headers to the request. 19472func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 19473 if c.header_ == nil { 19474 c.header_ = make(http.Header) 19475 } 19476 return c.header_ 19477} 19478 19479func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 19480 reqHeaders := make(http.Header) 19481 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19482 for k, v := range c.header_ { 19483 reqHeaders[k] = v 19484 } 19485 reqHeaders.Set("User-Agent", c.s.userAgent()) 19486 var body io.Reader = nil 19487 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 19488 if err != nil { 19489 return nil, err 19490 } 19491 reqHeaders.Set("Content-Type", "application/json") 19492 c.urlParams_.Set("alt", alt) 19493 c.urlParams_.Set("prettyPrint", "false") 19494 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 19495 urls += "?" + c.urlParams_.Encode() 19496 req, err := http.NewRequest("POST", urls, body) 19497 if err != nil { 19498 return nil, err 19499 } 19500 req.Header = reqHeaders 19501 googleapi.Expand(req.URL, map[string]string{ 19502 "parent": c.parentid, 19503 }) 19504 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19505} 19506 19507// Do executes the "dlp.projects.locations.deidentifyTemplates.create" call. 19508// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 19509// non-nil. Any non-2xx status code is an error. Response headers are in 19510// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 19511// (if a response was returned at all) in 19512// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19513// whether the returned error was because http.StatusNotModified was 19514// returned. 19515func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 19516 gensupport.SetOptions(c.urlParams_, opts...) 19517 res, err := c.doRequest("json") 19518 if res != nil && res.StatusCode == http.StatusNotModified { 19519 if res.Body != nil { 19520 res.Body.Close() 19521 } 19522 return nil, &googleapi.Error{ 19523 Code: res.StatusCode, 19524 Header: res.Header, 19525 } 19526 } 19527 if err != nil { 19528 return nil, err 19529 } 19530 defer googleapi.CloseBody(res) 19531 if err := googleapi.CheckResponse(res); err != nil { 19532 return nil, err 19533 } 19534 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 19535 ServerResponse: googleapi.ServerResponse{ 19536 Header: res.Header, 19537 HTTPStatusCode: res.StatusCode, 19538 }, 19539 } 19540 target := &ret 19541 if err := gensupport.DecodeResponse(target, res); err != nil { 19542 return nil, err 19543 } 19544 return ret, nil 19545 // { 19546 // "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.", 19547 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 19548 // "httpMethod": "POST", 19549 // "id": "dlp.projects.locations.deidentifyTemplates.create", 19550 // "parameterOrder": [ 19551 // "parent" 19552 // ], 19553 // "parameters": { 19554 // "parent": { 19555 // "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", 19556 // "location": "path", 19557 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19558 // "required": true, 19559 // "type": "string" 19560 // } 19561 // }, 19562 // "path": "v2/{+parent}/deidentifyTemplates", 19563 // "request": { 19564 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 19565 // }, 19566 // "response": { 19567 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 19568 // }, 19569 // "scopes": [ 19570 // "https://www.googleapis.com/auth/cloud-platform" 19571 // ] 19572 // } 19573 19574} 19575 19576// method id "dlp.projects.locations.deidentifyTemplates.delete": 19577 19578type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { 19579 s *Service 19580 name string 19581 urlParams_ gensupport.URLParams 19582 ctx_ context.Context 19583 header_ http.Header 19584} 19585 19586// Delete: Deletes a DeidentifyTemplate. See 19587// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 19588// more. 19589// 19590// - name: Resource name of the organization and deidentify template to 19591// be deleted, for example 19592// `organizations/433245324/deidentifyTemplates/432452342` or 19593// projects/project-id/deidentifyTemplates/432452342. 19594func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 19595 c := &ProjectsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19596 c.name = name 19597 return c 19598} 19599 19600// Fields allows partial responses to be retrieved. See 19601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19602// for more information. 19603func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 19604 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19605 return c 19606} 19607 19608// Context sets the context to be used in this call's Do method. Any 19609// pending HTTP request will be aborted if the provided context is 19610// canceled. 19611func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 19612 c.ctx_ = ctx 19613 return c 19614} 19615 19616// Header returns an http.Header that can be modified by the caller to 19617// add HTTP headers to the request. 19618func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 19619 if c.header_ == nil { 19620 c.header_ = make(http.Header) 19621 } 19622 return c.header_ 19623} 19624 19625func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 19626 reqHeaders := make(http.Header) 19627 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19628 for k, v := range c.header_ { 19629 reqHeaders[k] = v 19630 } 19631 reqHeaders.Set("User-Agent", c.s.userAgent()) 19632 var body io.Reader = nil 19633 c.urlParams_.Set("alt", alt) 19634 c.urlParams_.Set("prettyPrint", "false") 19635 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19636 urls += "?" + c.urlParams_.Encode() 19637 req, err := http.NewRequest("DELETE", urls, body) 19638 if err != nil { 19639 return nil, err 19640 } 19641 req.Header = reqHeaders 19642 googleapi.Expand(req.URL, map[string]string{ 19643 "name": c.name, 19644 }) 19645 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19646} 19647 19648// Do executes the "dlp.projects.locations.deidentifyTemplates.delete" call. 19649// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 19650// non-2xx status code is an error. Response headers are in either 19651// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 19652// returned at all) in error.(*googleapi.Error).Header. Use 19653// googleapi.IsNotModified to check whether the returned error was 19654// because http.StatusNotModified was returned. 19655func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 19656 gensupport.SetOptions(c.urlParams_, opts...) 19657 res, err := c.doRequest("json") 19658 if res != nil && res.StatusCode == http.StatusNotModified { 19659 if res.Body != nil { 19660 res.Body.Close() 19661 } 19662 return nil, &googleapi.Error{ 19663 Code: res.StatusCode, 19664 Header: res.Header, 19665 } 19666 } 19667 if err != nil { 19668 return nil, err 19669 } 19670 defer googleapi.CloseBody(res) 19671 if err := googleapi.CheckResponse(res); err != nil { 19672 return nil, err 19673 } 19674 ret := &GoogleProtobufEmpty{ 19675 ServerResponse: googleapi.ServerResponse{ 19676 Header: res.Header, 19677 HTTPStatusCode: res.StatusCode, 19678 }, 19679 } 19680 target := &ret 19681 if err := gensupport.DecodeResponse(target, res); err != nil { 19682 return nil, err 19683 } 19684 return ret, nil 19685 // { 19686 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 19687 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 19688 // "httpMethod": "DELETE", 19689 // "id": "dlp.projects.locations.deidentifyTemplates.delete", 19690 // "parameterOrder": [ 19691 // "name" 19692 // ], 19693 // "parameters": { 19694 // "name": { 19695 // "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.", 19696 // "location": "path", 19697 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 19698 // "required": true, 19699 // "type": "string" 19700 // } 19701 // }, 19702 // "path": "v2/{+name}", 19703 // "response": { 19704 // "$ref": "GoogleProtobufEmpty" 19705 // }, 19706 // "scopes": [ 19707 // "https://www.googleapis.com/auth/cloud-platform" 19708 // ] 19709 // } 19710 19711} 19712 19713// method id "dlp.projects.locations.deidentifyTemplates.get": 19714 19715type ProjectsLocationsDeidentifyTemplatesGetCall struct { 19716 s *Service 19717 name string 19718 urlParams_ gensupport.URLParams 19719 ifNoneMatch_ string 19720 ctx_ context.Context 19721 header_ http.Header 19722} 19723 19724// Get: Gets a DeidentifyTemplate. See 19725// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 19726// more. 19727// 19728// - name: Resource name of the organization and deidentify template to 19729// be read, for example 19730// `organizations/433245324/deidentifyTemplates/432452342` or 19731// projects/project-id/deidentifyTemplates/432452342. 19732func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *ProjectsLocationsDeidentifyTemplatesGetCall { 19733 c := &ProjectsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19734 c.name = name 19735 return c 19736} 19737 19738// Fields allows partial responses to be retrieved. See 19739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19740// for more information. 19741func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesGetCall { 19742 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19743 return c 19744} 19745 19746// IfNoneMatch sets the optional parameter which makes the operation 19747// fail if the object's ETag matches the given value. This is useful for 19748// getting updates only after the object has changed since the last 19749// request. Use googleapi.IsNotModified to check whether the response 19750// error from Do is the result of In-None-Match. 19751func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesGetCall { 19752 c.ifNoneMatch_ = entityTag 19753 return c 19754} 19755 19756// Context sets the context to be used in this call's Do method. Any 19757// pending HTTP request will be aborted if the provided context is 19758// canceled. 19759func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesGetCall { 19760 c.ctx_ = ctx 19761 return c 19762} 19763 19764// Header returns an http.Header that can be modified by the caller to 19765// add HTTP headers to the request. 19766func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 19767 if c.header_ == nil { 19768 c.header_ = make(http.Header) 19769 } 19770 return c.header_ 19771} 19772 19773func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 19774 reqHeaders := make(http.Header) 19775 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19776 for k, v := range c.header_ { 19777 reqHeaders[k] = v 19778 } 19779 reqHeaders.Set("User-Agent", c.s.userAgent()) 19780 if c.ifNoneMatch_ != "" { 19781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19782 } 19783 var body io.Reader = nil 19784 c.urlParams_.Set("alt", alt) 19785 c.urlParams_.Set("prettyPrint", "false") 19786 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19787 urls += "?" + c.urlParams_.Encode() 19788 req, err := http.NewRequest("GET", urls, body) 19789 if err != nil { 19790 return nil, err 19791 } 19792 req.Header = reqHeaders 19793 googleapi.Expand(req.URL, map[string]string{ 19794 "name": c.name, 19795 }) 19796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19797} 19798 19799// Do executes the "dlp.projects.locations.deidentifyTemplates.get" call. 19800// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 19801// non-nil. Any non-2xx status code is an error. Response headers are in 19802// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 19803// (if a response was returned at all) in 19804// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19805// whether the returned error was because http.StatusNotModified was 19806// returned. 19807func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 19808 gensupport.SetOptions(c.urlParams_, opts...) 19809 res, err := c.doRequest("json") 19810 if res != nil && res.StatusCode == http.StatusNotModified { 19811 if res.Body != nil { 19812 res.Body.Close() 19813 } 19814 return nil, &googleapi.Error{ 19815 Code: res.StatusCode, 19816 Header: res.Header, 19817 } 19818 } 19819 if err != nil { 19820 return nil, err 19821 } 19822 defer googleapi.CloseBody(res) 19823 if err := googleapi.CheckResponse(res); err != nil { 19824 return nil, err 19825 } 19826 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 19827 ServerResponse: googleapi.ServerResponse{ 19828 Header: res.Header, 19829 HTTPStatusCode: res.StatusCode, 19830 }, 19831 } 19832 target := &ret 19833 if err := gensupport.DecodeResponse(target, res); err != nil { 19834 return nil, err 19835 } 19836 return ret, nil 19837 // { 19838 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 19839 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 19840 // "httpMethod": "GET", 19841 // "id": "dlp.projects.locations.deidentifyTemplates.get", 19842 // "parameterOrder": [ 19843 // "name" 19844 // ], 19845 // "parameters": { 19846 // "name": { 19847 // "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.", 19848 // "location": "path", 19849 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 19850 // "required": true, 19851 // "type": "string" 19852 // } 19853 // }, 19854 // "path": "v2/{+name}", 19855 // "response": { 19856 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 19857 // }, 19858 // "scopes": [ 19859 // "https://www.googleapis.com/auth/cloud-platform" 19860 // ] 19861 // } 19862 19863} 19864 19865// method id "dlp.projects.locations.deidentifyTemplates.list": 19866 19867type ProjectsLocationsDeidentifyTemplatesListCall struct { 19868 s *Service 19869 parentid string 19870 urlParams_ gensupport.URLParams 19871 ifNoneMatch_ string 19872 ctx_ context.Context 19873 header_ http.Header 19874} 19875 19876// List: Lists DeidentifyTemplates. See 19877// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 19878// more. 19879// 19880// - parent: Parent resource name. The format of this value varies 19881// depending on the scope of the request (project or organization) and 19882// whether you have specified a processing location 19883// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 19884// scope, location specified: 19885// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 19886// location specified (defaults to global): `projects/`PROJECT_ID + 19887// Organizations scope, location specified: 19888// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 19889// scope, no location specified (defaults to global): 19890// `organizations/`ORG_ID The following example `parent` string 19891// specifies a parent project with the identifier `example-project`, 19892// and specifies the `europe-west3` location for processing data: 19893// parent=projects/example-project/locations/europe-west3. 19894func (r *ProjectsLocationsDeidentifyTemplatesService) List(parentid string) *ProjectsLocationsDeidentifyTemplatesListCall { 19895 c := &ProjectsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19896 c.parentid = parentid 19897 return c 19898} 19899 19900// LocationId sets the optional parameter "locationId": Deprecated. This 19901// field has no effect. 19902func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsLocationsDeidentifyTemplatesListCall { 19903 c.urlParams_.Set("locationId", locationId) 19904 return c 19905} 19906 19907// OrderBy sets the optional parameter "orderBy": Comma separated list 19908// of fields to order by, followed by `asc` or `desc` postfix. This list 19909// is case-insensitive, default sorting order is ascending, redundant 19910// space characters are insignificant. Example: `name asc,update_time, 19911// create_time desc` Supported fields are: - `create_time`: corresponds 19912// to time the template was created. - `update_time`: corresponds to 19913// time the template was last updated. - `name`: corresponds to 19914// template's name. - `display_name`: corresponds to template's display 19915// name. 19916func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { 19917 c.urlParams_.Set("orderBy", orderBy) 19918 return c 19919} 19920 19921// PageSize sets the optional parameter "pageSize": Size of the page, 19922// can be limited by server. If zero server returns a page of max size 19923// 100. 19924func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { 19925 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19926 return c 19927} 19928 19929// PageToken sets the optional parameter "pageToken": Page token to 19930// continue retrieval. Comes from previous call to 19931// `ListDeidentifyTemplates`. 19932func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { 19933 c.urlParams_.Set("pageToken", pageToken) 19934 return c 19935} 19936 19937// Fields allows partial responses to be retrieved. See 19938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19939// for more information. 19940func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesListCall { 19941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19942 return c 19943} 19944 19945// IfNoneMatch sets the optional parameter which makes the operation 19946// fail if the object's ETag matches the given value. This is useful for 19947// getting updates only after the object has changed since the last 19948// request. Use googleapi.IsNotModified to check whether the response 19949// error from Do is the result of In-None-Match. 19950func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesListCall { 19951 c.ifNoneMatch_ = entityTag 19952 return c 19953} 19954 19955// Context sets the context to be used in this call's Do method. Any 19956// pending HTTP request will be aborted if the provided context is 19957// canceled. 19958func (c *ProjectsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesListCall { 19959 c.ctx_ = ctx 19960 return c 19961} 19962 19963// Header returns an http.Header that can be modified by the caller to 19964// add HTTP headers to the request. 19965func (c *ProjectsLocationsDeidentifyTemplatesListCall) Header() http.Header { 19966 if c.header_ == nil { 19967 c.header_ = make(http.Header) 19968 } 19969 return c.header_ 19970} 19971 19972func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 19973 reqHeaders := make(http.Header) 19974 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 19975 for k, v := range c.header_ { 19976 reqHeaders[k] = v 19977 } 19978 reqHeaders.Set("User-Agent", c.s.userAgent()) 19979 if c.ifNoneMatch_ != "" { 19980 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19981 } 19982 var body io.Reader = nil 19983 c.urlParams_.Set("alt", alt) 19984 c.urlParams_.Set("prettyPrint", "false") 19985 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 19986 urls += "?" + c.urlParams_.Encode() 19987 req, err := http.NewRequest("GET", urls, body) 19988 if err != nil { 19989 return nil, err 19990 } 19991 req.Header = reqHeaders 19992 googleapi.Expand(req.URL, map[string]string{ 19993 "parent": c.parentid, 19994 }) 19995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19996} 19997 19998// Do executes the "dlp.projects.locations.deidentifyTemplates.list" call. 19999// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 20000// error will be non-nil. Any non-2xx status code is an error. Response 20001// headers are in either 20002// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 20003// er or (if a response was returned at all) in 20004// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20005// whether the returned error was because http.StatusNotModified was 20006// returned. 20007func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 20008 gensupport.SetOptions(c.urlParams_, opts...) 20009 res, err := c.doRequest("json") 20010 if res != nil && res.StatusCode == http.StatusNotModified { 20011 if res.Body != nil { 20012 res.Body.Close() 20013 } 20014 return nil, &googleapi.Error{ 20015 Code: res.StatusCode, 20016 Header: res.Header, 20017 } 20018 } 20019 if err != nil { 20020 return nil, err 20021 } 20022 defer googleapi.CloseBody(res) 20023 if err := googleapi.CheckResponse(res); err != nil { 20024 return nil, err 20025 } 20026 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 20027 ServerResponse: googleapi.ServerResponse{ 20028 Header: res.Header, 20029 HTTPStatusCode: res.StatusCode, 20030 }, 20031 } 20032 target := &ret 20033 if err := gensupport.DecodeResponse(target, res); err != nil { 20034 return nil, err 20035 } 20036 return ret, nil 20037 // { 20038 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 20039 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 20040 // "httpMethod": "GET", 20041 // "id": "dlp.projects.locations.deidentifyTemplates.list", 20042 // "parameterOrder": [ 20043 // "parent" 20044 // ], 20045 // "parameters": { 20046 // "locationId": { 20047 // "description": "Deprecated. This field has no effect.", 20048 // "location": "query", 20049 // "type": "string" 20050 // }, 20051 // "orderBy": { 20052 // "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.", 20053 // "location": "query", 20054 // "type": "string" 20055 // }, 20056 // "pageSize": { 20057 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 20058 // "format": "int32", 20059 // "location": "query", 20060 // "type": "integer" 20061 // }, 20062 // "pageToken": { 20063 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 20064 // "location": "query", 20065 // "type": "string" 20066 // }, 20067 // "parent": { 20068 // "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", 20069 // "location": "path", 20070 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20071 // "required": true, 20072 // "type": "string" 20073 // } 20074 // }, 20075 // "path": "v2/{+parent}/deidentifyTemplates", 20076 // "response": { 20077 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 20078 // }, 20079 // "scopes": [ 20080 // "https://www.googleapis.com/auth/cloud-platform" 20081 // ] 20082 // } 20083 20084} 20085 20086// Pages invokes f for each page of results. 20087// A non-nil error returned from f will halt the iteration. 20088// The provided context supersedes any context provided to the Context method. 20089func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 20090 c.ctx_ = ctx 20091 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20092 for { 20093 x, err := c.Do() 20094 if err != nil { 20095 return err 20096 } 20097 if err := f(x); err != nil { 20098 return err 20099 } 20100 if x.NextPageToken == "" { 20101 return nil 20102 } 20103 c.PageToken(x.NextPageToken) 20104 } 20105} 20106 20107// method id "dlp.projects.locations.deidentifyTemplates.patch": 20108 20109type ProjectsLocationsDeidentifyTemplatesPatchCall struct { 20110 s *Service 20111 name string 20112 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 20113 urlParams_ gensupport.URLParams 20114 ctx_ context.Context 20115 header_ http.Header 20116} 20117 20118// Patch: Updates the DeidentifyTemplate. See 20119// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 20120// more. 20121// 20122// - name: Resource name of organization and deidentify template to be 20123// updated, for example 20124// `organizations/433245324/deidentifyTemplates/432452342` or 20125// projects/project-id/deidentifyTemplates/432452342. 20126func (r *ProjectsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesPatchCall { 20127 c := &ProjectsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20128 c.name = name 20129 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 20130 return c 20131} 20132 20133// Fields allows partial responses to be retrieved. See 20134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20135// for more information. 20136func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesPatchCall { 20137 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20138 return c 20139} 20140 20141// Context sets the context to be used in this call's Do method. Any 20142// pending HTTP request will be aborted if the provided context is 20143// canceled. 20144func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesPatchCall { 20145 c.ctx_ = ctx 20146 return c 20147} 20148 20149// Header returns an http.Header that can be modified by the caller to 20150// add HTTP headers to the request. 20151func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 20152 if c.header_ == nil { 20153 c.header_ = make(http.Header) 20154 } 20155 return c.header_ 20156} 20157 20158func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 20159 reqHeaders := make(http.Header) 20160 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20161 for k, v := range c.header_ { 20162 reqHeaders[k] = v 20163 } 20164 reqHeaders.Set("User-Agent", c.s.userAgent()) 20165 var body io.Reader = nil 20166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 20167 if err != nil { 20168 return nil, err 20169 } 20170 reqHeaders.Set("Content-Type", "application/json") 20171 c.urlParams_.Set("alt", alt) 20172 c.urlParams_.Set("prettyPrint", "false") 20173 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20174 urls += "?" + c.urlParams_.Encode() 20175 req, err := http.NewRequest("PATCH", urls, body) 20176 if err != nil { 20177 return nil, err 20178 } 20179 req.Header = reqHeaders 20180 googleapi.Expand(req.URL, map[string]string{ 20181 "name": c.name, 20182 }) 20183 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20184} 20185 20186// Do executes the "dlp.projects.locations.deidentifyTemplates.patch" call. 20187// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 20188// non-nil. Any non-2xx status code is an error. Response headers are in 20189// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 20190// (if a response was returned at all) in 20191// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20192// whether the returned error was because http.StatusNotModified was 20193// returned. 20194func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 20195 gensupport.SetOptions(c.urlParams_, opts...) 20196 res, err := c.doRequest("json") 20197 if res != nil && res.StatusCode == http.StatusNotModified { 20198 if res.Body != nil { 20199 res.Body.Close() 20200 } 20201 return nil, &googleapi.Error{ 20202 Code: res.StatusCode, 20203 Header: res.Header, 20204 } 20205 } 20206 if err != nil { 20207 return nil, err 20208 } 20209 defer googleapi.CloseBody(res) 20210 if err := googleapi.CheckResponse(res); err != nil { 20211 return nil, err 20212 } 20213 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 20214 ServerResponse: googleapi.ServerResponse{ 20215 Header: res.Header, 20216 HTTPStatusCode: res.StatusCode, 20217 }, 20218 } 20219 target := &ret 20220 if err := gensupport.DecodeResponse(target, res); err != nil { 20221 return nil, err 20222 } 20223 return ret, nil 20224 // { 20225 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 20226 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 20227 // "httpMethod": "PATCH", 20228 // "id": "dlp.projects.locations.deidentifyTemplates.patch", 20229 // "parameterOrder": [ 20230 // "name" 20231 // ], 20232 // "parameters": { 20233 // "name": { 20234 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 20235 // "location": "path", 20236 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 20237 // "required": true, 20238 // "type": "string" 20239 // } 20240 // }, 20241 // "path": "v2/{+name}", 20242 // "request": { 20243 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 20244 // }, 20245 // "response": { 20246 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 20247 // }, 20248 // "scopes": [ 20249 // "https://www.googleapis.com/auth/cloud-platform" 20250 // ] 20251 // } 20252 20253} 20254 20255// method id "dlp.projects.locations.dlpJobs.cancel": 20256 20257type ProjectsLocationsDlpJobsCancelCall struct { 20258 s *Service 20259 name string 20260 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 20261 urlParams_ gensupport.URLParams 20262 ctx_ context.Context 20263 header_ http.Header 20264} 20265 20266// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 20267// The server makes a best effort to cancel the DlpJob, but success is 20268// not guaranteed. See 20269// https://cloud.google.com/dlp/docs/inspecting-storage and 20270// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 20271// more. 20272// 20273// - name: The name of the DlpJob resource to be cancelled. 20274func (r *ProjectsLocationsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsLocationsDlpJobsCancelCall { 20275 c := &ProjectsLocationsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20276 c.name = name 20277 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 20278 return c 20279} 20280 20281// Fields allows partial responses to be retrieved. See 20282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20283// for more information. 20284func (c *ProjectsLocationsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCancelCall { 20285 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20286 return c 20287} 20288 20289// Context sets the context to be used in this call's Do method. Any 20290// pending HTTP request will be aborted if the provided context is 20291// canceled. 20292func (c *ProjectsLocationsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCancelCall { 20293 c.ctx_ = ctx 20294 return c 20295} 20296 20297// Header returns an http.Header that can be modified by the caller to 20298// add HTTP headers to the request. 20299func (c *ProjectsLocationsDlpJobsCancelCall) Header() http.Header { 20300 if c.header_ == nil { 20301 c.header_ = make(http.Header) 20302 } 20303 return c.header_ 20304} 20305 20306func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 20307 reqHeaders := make(http.Header) 20308 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20309 for k, v := range c.header_ { 20310 reqHeaders[k] = v 20311 } 20312 reqHeaders.Set("User-Agent", c.s.userAgent()) 20313 var body io.Reader = nil 20314 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 20315 if err != nil { 20316 return nil, err 20317 } 20318 reqHeaders.Set("Content-Type", "application/json") 20319 c.urlParams_.Set("alt", alt) 20320 c.urlParams_.Set("prettyPrint", "false") 20321 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 20322 urls += "?" + c.urlParams_.Encode() 20323 req, err := http.NewRequest("POST", urls, body) 20324 if err != nil { 20325 return nil, err 20326 } 20327 req.Header = reqHeaders 20328 googleapi.Expand(req.URL, map[string]string{ 20329 "name": c.name, 20330 }) 20331 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20332} 20333 20334// Do executes the "dlp.projects.locations.dlpJobs.cancel" call. 20335// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20336// non-2xx status code is an error. Response headers are in either 20337// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20338// returned at all) in error.(*googleapi.Error).Header. Use 20339// googleapi.IsNotModified to check whether the returned error was 20340// because http.StatusNotModified was returned. 20341func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20342 gensupport.SetOptions(c.urlParams_, opts...) 20343 res, err := c.doRequest("json") 20344 if res != nil && res.StatusCode == http.StatusNotModified { 20345 if res.Body != nil { 20346 res.Body.Close() 20347 } 20348 return nil, &googleapi.Error{ 20349 Code: res.StatusCode, 20350 Header: res.Header, 20351 } 20352 } 20353 if err != nil { 20354 return nil, err 20355 } 20356 defer googleapi.CloseBody(res) 20357 if err := googleapi.CheckResponse(res); err != nil { 20358 return nil, err 20359 } 20360 ret := &GoogleProtobufEmpty{ 20361 ServerResponse: googleapi.ServerResponse{ 20362 Header: res.Header, 20363 HTTPStatusCode: res.StatusCode, 20364 }, 20365 } 20366 target := &ret 20367 if err := gensupport.DecodeResponse(target, res); err != nil { 20368 return nil, err 20369 } 20370 return ret, nil 20371 // { 20372 // "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.", 20373 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", 20374 // "httpMethod": "POST", 20375 // "id": "dlp.projects.locations.dlpJobs.cancel", 20376 // "parameterOrder": [ 20377 // "name" 20378 // ], 20379 // "parameters": { 20380 // "name": { 20381 // "description": "Required. The name of the DlpJob resource to be cancelled.", 20382 // "location": "path", 20383 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 20384 // "required": true, 20385 // "type": "string" 20386 // } 20387 // }, 20388 // "path": "v2/{+name}:cancel", 20389 // "request": { 20390 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 20391 // }, 20392 // "response": { 20393 // "$ref": "GoogleProtobufEmpty" 20394 // }, 20395 // "scopes": [ 20396 // "https://www.googleapis.com/auth/cloud-platform" 20397 // ] 20398 // } 20399 20400} 20401 20402// method id "dlp.projects.locations.dlpJobs.create": 20403 20404type ProjectsLocationsDlpJobsCreateCall struct { 20405 s *Service 20406 parentid string 20407 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 20408 urlParams_ gensupport.URLParams 20409 ctx_ context.Context 20410 header_ http.Header 20411} 20412 20413// Create: Creates a new job to inspect storage or calculate risk 20414// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 20415// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 20416// more. When no InfoTypes or CustomInfoTypes are specified in inspect 20417// jobs, the system will automatically choose what detectors to run. By 20418// default this may be all types, but may change over time as detectors 20419// are updated. 20420// 20421// - parent: Parent resource name. The format of this value varies 20422// depending on whether you have specified a processing location 20423// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 20424// scope, location specified: 20425// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 20426// location specified (defaults to global): `projects/`PROJECT_ID The 20427// following example `parent` string specifies a parent project with 20428// the identifier `example-project`, and specifies the `europe-west3` 20429// location for processing data: 20430// parent=projects/example-project/locations/europe-west3. 20431func (r *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { 20432 c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20433 c.parentid = parentid 20434 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 20435 return c 20436} 20437 20438// Fields allows partial responses to be retrieved. See 20439// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20440// for more information. 20441func (c *ProjectsLocationsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCreateCall { 20442 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20443 return c 20444} 20445 20446// Context sets the context to be used in this call's Do method. Any 20447// pending HTTP request will be aborted if the provided context is 20448// canceled. 20449func (c *ProjectsLocationsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCreateCall { 20450 c.ctx_ = ctx 20451 return c 20452} 20453 20454// Header returns an http.Header that can be modified by the caller to 20455// add HTTP headers to the request. 20456func (c *ProjectsLocationsDlpJobsCreateCall) Header() http.Header { 20457 if c.header_ == nil { 20458 c.header_ = make(http.Header) 20459 } 20460 return c.header_ 20461} 20462 20463func (c *ProjectsLocationsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 20464 reqHeaders := make(http.Header) 20465 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20466 for k, v := range c.header_ { 20467 reqHeaders[k] = v 20468 } 20469 reqHeaders.Set("User-Agent", c.s.userAgent()) 20470 var body io.Reader = nil 20471 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 20472 if err != nil { 20473 return nil, err 20474 } 20475 reqHeaders.Set("Content-Type", "application/json") 20476 c.urlParams_.Set("alt", alt) 20477 c.urlParams_.Set("prettyPrint", "false") 20478 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 20479 urls += "?" + c.urlParams_.Encode() 20480 req, err := http.NewRequest("POST", urls, body) 20481 if err != nil { 20482 return nil, err 20483 } 20484 req.Header = reqHeaders 20485 googleapi.Expand(req.URL, map[string]string{ 20486 "parent": c.parentid, 20487 }) 20488 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20489} 20490 20491// Do executes the "dlp.projects.locations.dlpJobs.create" call. 20492// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 20493// Any non-2xx status code is an error. Response headers are in either 20494// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 20495// returned at all) in error.(*googleapi.Error).Header. Use 20496// googleapi.IsNotModified to check whether the returned error was 20497// because http.StatusNotModified was returned. 20498func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 20499 gensupport.SetOptions(c.urlParams_, opts...) 20500 res, err := c.doRequest("json") 20501 if res != nil && res.StatusCode == http.StatusNotModified { 20502 if res.Body != nil { 20503 res.Body.Close() 20504 } 20505 return nil, &googleapi.Error{ 20506 Code: res.StatusCode, 20507 Header: res.Header, 20508 } 20509 } 20510 if err != nil { 20511 return nil, err 20512 } 20513 defer googleapi.CloseBody(res) 20514 if err := googleapi.CheckResponse(res); err != nil { 20515 return nil, err 20516 } 20517 ret := &GooglePrivacyDlpV2DlpJob{ 20518 ServerResponse: googleapi.ServerResponse{ 20519 Header: res.Header, 20520 HTTPStatusCode: res.StatusCode, 20521 }, 20522 } 20523 target := &ret 20524 if err := gensupport.DecodeResponse(target, res); err != nil { 20525 return nil, err 20526 } 20527 return ret, nil 20528 // { 20529 // "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.", 20530 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 20531 // "httpMethod": "POST", 20532 // "id": "dlp.projects.locations.dlpJobs.create", 20533 // "parameterOrder": [ 20534 // "parent" 20535 // ], 20536 // "parameters": { 20537 // "parent": { 20538 // "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", 20539 // "location": "path", 20540 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20541 // "required": true, 20542 // "type": "string" 20543 // } 20544 // }, 20545 // "path": "v2/{+parent}/dlpJobs", 20546 // "request": { 20547 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 20548 // }, 20549 // "response": { 20550 // "$ref": "GooglePrivacyDlpV2DlpJob" 20551 // }, 20552 // "scopes": [ 20553 // "https://www.googleapis.com/auth/cloud-platform" 20554 // ] 20555 // } 20556 20557} 20558 20559// method id "dlp.projects.locations.dlpJobs.delete": 20560 20561type ProjectsLocationsDlpJobsDeleteCall struct { 20562 s *Service 20563 name string 20564 urlParams_ gensupport.URLParams 20565 ctx_ context.Context 20566 header_ http.Header 20567} 20568 20569// Delete: Deletes a long-running DlpJob. This method indicates that the 20570// client is no longer interested in the DlpJob result. The job will be 20571// cancelled if possible. See 20572// https://cloud.google.com/dlp/docs/inspecting-storage and 20573// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 20574// more. 20575// 20576// - name: The name of the DlpJob resource to be deleted. 20577func (r *ProjectsLocationsDlpJobsService) Delete(name string) *ProjectsLocationsDlpJobsDeleteCall { 20578 c := &ProjectsLocationsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20579 c.name = name 20580 return c 20581} 20582 20583// Fields allows partial responses to be retrieved. See 20584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20585// for more information. 20586func (c *ProjectsLocationsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsDeleteCall { 20587 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20588 return c 20589} 20590 20591// Context sets the context to be used in this call's Do method. Any 20592// pending HTTP request will be aborted if the provided context is 20593// canceled. 20594func (c *ProjectsLocationsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsDeleteCall { 20595 c.ctx_ = ctx 20596 return c 20597} 20598 20599// Header returns an http.Header that can be modified by the caller to 20600// add HTTP headers to the request. 20601func (c *ProjectsLocationsDlpJobsDeleteCall) Header() http.Header { 20602 if c.header_ == nil { 20603 c.header_ = make(http.Header) 20604 } 20605 return c.header_ 20606} 20607 20608func (c *ProjectsLocationsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 20609 reqHeaders := make(http.Header) 20610 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20611 for k, v := range c.header_ { 20612 reqHeaders[k] = v 20613 } 20614 reqHeaders.Set("User-Agent", c.s.userAgent()) 20615 var body io.Reader = nil 20616 c.urlParams_.Set("alt", alt) 20617 c.urlParams_.Set("prettyPrint", "false") 20618 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20619 urls += "?" + c.urlParams_.Encode() 20620 req, err := http.NewRequest("DELETE", urls, body) 20621 if err != nil { 20622 return nil, err 20623 } 20624 req.Header = reqHeaders 20625 googleapi.Expand(req.URL, map[string]string{ 20626 "name": c.name, 20627 }) 20628 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20629} 20630 20631// Do executes the "dlp.projects.locations.dlpJobs.delete" call. 20632// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20633// non-2xx status code is an error. Response headers are in either 20634// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20635// returned at all) in error.(*googleapi.Error).Header. Use 20636// googleapi.IsNotModified to check whether the returned error was 20637// because http.StatusNotModified was returned. 20638func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20639 gensupport.SetOptions(c.urlParams_, opts...) 20640 res, err := c.doRequest("json") 20641 if res != nil && res.StatusCode == http.StatusNotModified { 20642 if res.Body != nil { 20643 res.Body.Close() 20644 } 20645 return nil, &googleapi.Error{ 20646 Code: res.StatusCode, 20647 Header: res.Header, 20648 } 20649 } 20650 if err != nil { 20651 return nil, err 20652 } 20653 defer googleapi.CloseBody(res) 20654 if err := googleapi.CheckResponse(res); err != nil { 20655 return nil, err 20656 } 20657 ret := &GoogleProtobufEmpty{ 20658 ServerResponse: googleapi.ServerResponse{ 20659 Header: res.Header, 20660 HTTPStatusCode: res.StatusCode, 20661 }, 20662 } 20663 target := &ret 20664 if err := gensupport.DecodeResponse(target, res); err != nil { 20665 return nil, err 20666 } 20667 return ret, nil 20668 // { 20669 // "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.", 20670 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 20671 // "httpMethod": "DELETE", 20672 // "id": "dlp.projects.locations.dlpJobs.delete", 20673 // "parameterOrder": [ 20674 // "name" 20675 // ], 20676 // "parameters": { 20677 // "name": { 20678 // "description": "Required. The name of the DlpJob resource to be deleted.", 20679 // "location": "path", 20680 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 20681 // "required": true, 20682 // "type": "string" 20683 // } 20684 // }, 20685 // "path": "v2/{+name}", 20686 // "response": { 20687 // "$ref": "GoogleProtobufEmpty" 20688 // }, 20689 // "scopes": [ 20690 // "https://www.googleapis.com/auth/cloud-platform" 20691 // ] 20692 // } 20693 20694} 20695 20696// method id "dlp.projects.locations.dlpJobs.finish": 20697 20698type ProjectsLocationsDlpJobsFinishCall struct { 20699 s *Service 20700 name string 20701 googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest 20702 urlParams_ gensupport.URLParams 20703 ctx_ context.Context 20704 header_ http.Header 20705} 20706 20707// Finish: Finish a running hybrid DlpJob. Triggers the finalization 20708// steps and running of any enabled actions that have not yet run. 20709// 20710// - name: The name of the DlpJob resource to be cancelled. 20711func (r *ProjectsLocationsDlpJobsService) Finish(name string, googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest) *ProjectsLocationsDlpJobsFinishCall { 20712 c := &ProjectsLocationsDlpJobsFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20713 c.name = name 20714 c.googleprivacydlpv2finishdlpjobrequest = googleprivacydlpv2finishdlpjobrequest 20715 return c 20716} 20717 20718// Fields allows partial responses to be retrieved. See 20719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20720// for more information. 20721func (c *ProjectsLocationsDlpJobsFinishCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsFinishCall { 20722 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20723 return c 20724} 20725 20726// Context sets the context to be used in this call's Do method. Any 20727// pending HTTP request will be aborted if the provided context is 20728// canceled. 20729func (c *ProjectsLocationsDlpJobsFinishCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsFinishCall { 20730 c.ctx_ = ctx 20731 return c 20732} 20733 20734// Header returns an http.Header that can be modified by the caller to 20735// add HTTP headers to the request. 20736func (c *ProjectsLocationsDlpJobsFinishCall) Header() http.Header { 20737 if c.header_ == nil { 20738 c.header_ = make(http.Header) 20739 } 20740 return c.header_ 20741} 20742 20743func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Response, error) { 20744 reqHeaders := make(http.Header) 20745 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20746 for k, v := range c.header_ { 20747 reqHeaders[k] = v 20748 } 20749 reqHeaders.Set("User-Agent", c.s.userAgent()) 20750 var body io.Reader = nil 20751 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2finishdlpjobrequest) 20752 if err != nil { 20753 return nil, err 20754 } 20755 reqHeaders.Set("Content-Type", "application/json") 20756 c.urlParams_.Set("alt", alt) 20757 c.urlParams_.Set("prettyPrint", "false") 20758 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:finish") 20759 urls += "?" + c.urlParams_.Encode() 20760 req, err := http.NewRequest("POST", urls, body) 20761 if err != nil { 20762 return nil, err 20763 } 20764 req.Header = reqHeaders 20765 googleapi.Expand(req.URL, map[string]string{ 20766 "name": c.name, 20767 }) 20768 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20769} 20770 20771// Do executes the "dlp.projects.locations.dlpJobs.finish" call. 20772// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20773// non-2xx status code is an error. Response headers are in either 20774// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20775// returned at all) in error.(*googleapi.Error).Header. Use 20776// googleapi.IsNotModified to check whether the returned error was 20777// because http.StatusNotModified was returned. 20778func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20779 gensupport.SetOptions(c.urlParams_, opts...) 20780 res, err := c.doRequest("json") 20781 if res != nil && res.StatusCode == http.StatusNotModified { 20782 if res.Body != nil { 20783 res.Body.Close() 20784 } 20785 return nil, &googleapi.Error{ 20786 Code: res.StatusCode, 20787 Header: res.Header, 20788 } 20789 } 20790 if err != nil { 20791 return nil, err 20792 } 20793 defer googleapi.CloseBody(res) 20794 if err := googleapi.CheckResponse(res); err != nil { 20795 return nil, err 20796 } 20797 ret := &GoogleProtobufEmpty{ 20798 ServerResponse: googleapi.ServerResponse{ 20799 Header: res.Header, 20800 HTTPStatusCode: res.StatusCode, 20801 }, 20802 } 20803 target := &ret 20804 if err := gensupport.DecodeResponse(target, res); err != nil { 20805 return nil, err 20806 } 20807 return ret, nil 20808 // { 20809 // "description": "Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.", 20810 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:finish", 20811 // "httpMethod": "POST", 20812 // "id": "dlp.projects.locations.dlpJobs.finish", 20813 // "parameterOrder": [ 20814 // "name" 20815 // ], 20816 // "parameters": { 20817 // "name": { 20818 // "description": "Required. The name of the DlpJob resource to be cancelled.", 20819 // "location": "path", 20820 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 20821 // "required": true, 20822 // "type": "string" 20823 // } 20824 // }, 20825 // "path": "v2/{+name}:finish", 20826 // "request": { 20827 // "$ref": "GooglePrivacyDlpV2FinishDlpJobRequest" 20828 // }, 20829 // "response": { 20830 // "$ref": "GoogleProtobufEmpty" 20831 // }, 20832 // "scopes": [ 20833 // "https://www.googleapis.com/auth/cloud-platform" 20834 // ] 20835 // } 20836 20837} 20838 20839// method id "dlp.projects.locations.dlpJobs.get": 20840 20841type ProjectsLocationsDlpJobsGetCall struct { 20842 s *Service 20843 name string 20844 urlParams_ gensupport.URLParams 20845 ifNoneMatch_ string 20846 ctx_ context.Context 20847 header_ http.Header 20848} 20849 20850// Get: Gets the latest state of a long-running DlpJob. See 20851// https://cloud.google.com/dlp/docs/inspecting-storage and 20852// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 20853// more. 20854// 20855// - name: The name of the DlpJob resource. 20856func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlpJobsGetCall { 20857 c := &ProjectsLocationsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20858 c.name = name 20859 return c 20860} 20861 20862// Fields allows partial responses to be retrieved. See 20863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20864// for more information. 20865func (c *ProjectsLocationsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsGetCall { 20866 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20867 return c 20868} 20869 20870// IfNoneMatch sets the optional parameter which makes the operation 20871// fail if the object's ETag matches the given value. This is useful for 20872// getting updates only after the object has changed since the last 20873// request. Use googleapi.IsNotModified to check whether the response 20874// error from Do is the result of In-None-Match. 20875func (c *ProjectsLocationsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsGetCall { 20876 c.ifNoneMatch_ = entityTag 20877 return c 20878} 20879 20880// Context sets the context to be used in this call's Do method. Any 20881// pending HTTP request will be aborted if the provided context is 20882// canceled. 20883func (c *ProjectsLocationsDlpJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsGetCall { 20884 c.ctx_ = ctx 20885 return c 20886} 20887 20888// Header returns an http.Header that can be modified by the caller to 20889// add HTTP headers to the request. 20890func (c *ProjectsLocationsDlpJobsGetCall) Header() http.Header { 20891 if c.header_ == nil { 20892 c.header_ = make(http.Header) 20893 } 20894 return c.header_ 20895} 20896 20897func (c *ProjectsLocationsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 20898 reqHeaders := make(http.Header) 20899 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 20900 for k, v := range c.header_ { 20901 reqHeaders[k] = v 20902 } 20903 reqHeaders.Set("User-Agent", c.s.userAgent()) 20904 if c.ifNoneMatch_ != "" { 20905 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20906 } 20907 var body io.Reader = nil 20908 c.urlParams_.Set("alt", alt) 20909 c.urlParams_.Set("prettyPrint", "false") 20910 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20911 urls += "?" + c.urlParams_.Encode() 20912 req, err := http.NewRequest("GET", urls, body) 20913 if err != nil { 20914 return nil, err 20915 } 20916 req.Header = reqHeaders 20917 googleapi.Expand(req.URL, map[string]string{ 20918 "name": c.name, 20919 }) 20920 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20921} 20922 20923// Do executes the "dlp.projects.locations.dlpJobs.get" call. 20924// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 20925// Any non-2xx status code is an error. Response headers are in either 20926// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 20927// returned at all) in error.(*googleapi.Error).Header. Use 20928// googleapi.IsNotModified to check whether the returned error was 20929// because http.StatusNotModified was returned. 20930func (c *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 20931 gensupport.SetOptions(c.urlParams_, opts...) 20932 res, err := c.doRequest("json") 20933 if res != nil && res.StatusCode == http.StatusNotModified { 20934 if res.Body != nil { 20935 res.Body.Close() 20936 } 20937 return nil, &googleapi.Error{ 20938 Code: res.StatusCode, 20939 Header: res.Header, 20940 } 20941 } 20942 if err != nil { 20943 return nil, err 20944 } 20945 defer googleapi.CloseBody(res) 20946 if err := googleapi.CheckResponse(res); err != nil { 20947 return nil, err 20948 } 20949 ret := &GooglePrivacyDlpV2DlpJob{ 20950 ServerResponse: googleapi.ServerResponse{ 20951 Header: res.Header, 20952 HTTPStatusCode: res.StatusCode, 20953 }, 20954 } 20955 target := &ret 20956 if err := gensupport.DecodeResponse(target, res); err != nil { 20957 return nil, err 20958 } 20959 return ret, nil 20960 // { 20961 // "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.", 20962 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 20963 // "httpMethod": "GET", 20964 // "id": "dlp.projects.locations.dlpJobs.get", 20965 // "parameterOrder": [ 20966 // "name" 20967 // ], 20968 // "parameters": { 20969 // "name": { 20970 // "description": "Required. The name of the DlpJob resource.", 20971 // "location": "path", 20972 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 20973 // "required": true, 20974 // "type": "string" 20975 // } 20976 // }, 20977 // "path": "v2/{+name}", 20978 // "response": { 20979 // "$ref": "GooglePrivacyDlpV2DlpJob" 20980 // }, 20981 // "scopes": [ 20982 // "https://www.googleapis.com/auth/cloud-platform" 20983 // ] 20984 // } 20985 20986} 20987 20988// method id "dlp.projects.locations.dlpJobs.hybridInspect": 20989 20990type ProjectsLocationsDlpJobsHybridInspectCall struct { 20991 s *Service 20992 name string 20993 googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest 20994 urlParams_ gensupport.URLParams 20995 ctx_ context.Context 20996 header_ http.Header 20997} 20998 20999// HybridInspect: Inspect hybrid content and store findings to a job. To 21000// review the findings, inspect the job. Inspection will occur 21001// asynchronously. 21002// 21003// - name: Resource name of the job to execute a hybrid inspect on, for 21004// example `projects/dlp-test-project/dlpJob/53234423`. 21005func (r *ProjectsLocationsDlpJobsService) HybridInspect(name string, googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest) *ProjectsLocationsDlpJobsHybridInspectCall { 21006 c := &ProjectsLocationsDlpJobsHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21007 c.name = name 21008 c.googleprivacydlpv2hybridinspectdlpjobrequest = googleprivacydlpv2hybridinspectdlpjobrequest 21009 return c 21010} 21011 21012// Fields allows partial responses to be retrieved. See 21013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21014// for more information. 21015func (c *ProjectsLocationsDlpJobsHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsHybridInspectCall { 21016 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21017 return c 21018} 21019 21020// Context sets the context to be used in this call's Do method. Any 21021// pending HTTP request will be aborted if the provided context is 21022// canceled. 21023func (c *ProjectsLocationsDlpJobsHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsHybridInspectCall { 21024 c.ctx_ = ctx 21025 return c 21026} 21027 21028// Header returns an http.Header that can be modified by the caller to 21029// add HTTP headers to the request. 21030func (c *ProjectsLocationsDlpJobsHybridInspectCall) Header() http.Header { 21031 if c.header_ == nil { 21032 c.header_ = make(http.Header) 21033 } 21034 return c.header_ 21035} 21036 21037func (c *ProjectsLocationsDlpJobsHybridInspectCall) doRequest(alt string) (*http.Response, error) { 21038 reqHeaders := make(http.Header) 21039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21040 for k, v := range c.header_ { 21041 reqHeaders[k] = v 21042 } 21043 reqHeaders.Set("User-Agent", c.s.userAgent()) 21044 var body io.Reader = nil 21045 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectdlpjobrequest) 21046 if err != nil { 21047 return nil, err 21048 } 21049 reqHeaders.Set("Content-Type", "application/json") 21050 c.urlParams_.Set("alt", alt) 21051 c.urlParams_.Set("prettyPrint", "false") 21052 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 21053 urls += "?" + c.urlParams_.Encode() 21054 req, err := http.NewRequest("POST", urls, body) 21055 if err != nil { 21056 return nil, err 21057 } 21058 req.Header = reqHeaders 21059 googleapi.Expand(req.URL, map[string]string{ 21060 "name": c.name, 21061 }) 21062 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21063} 21064 21065// Do executes the "dlp.projects.locations.dlpJobs.hybridInspect" call. 21066// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 21067// be non-nil. Any non-2xx status code is an error. Response headers are 21068// in either 21069// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 21070// a response was returned at all) in error.(*googleapi.Error).Header. 21071// Use googleapi.IsNotModified to check whether the returned error was 21072// because http.StatusNotModified was returned. 21073func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 21074 gensupport.SetOptions(c.urlParams_, opts...) 21075 res, err := c.doRequest("json") 21076 if res != nil && res.StatusCode == http.StatusNotModified { 21077 if res.Body != nil { 21078 res.Body.Close() 21079 } 21080 return nil, &googleapi.Error{ 21081 Code: res.StatusCode, 21082 Header: res.Header, 21083 } 21084 } 21085 if err != nil { 21086 return nil, err 21087 } 21088 defer googleapi.CloseBody(res) 21089 if err := googleapi.CheckResponse(res); err != nil { 21090 return nil, err 21091 } 21092 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 21093 ServerResponse: googleapi.ServerResponse{ 21094 Header: res.Header, 21095 HTTPStatusCode: res.StatusCode, 21096 }, 21097 } 21098 target := &ret 21099 if err := gensupport.DecodeResponse(target, res); err != nil { 21100 return nil, err 21101 } 21102 return ret, nil 21103 // { 21104 // "description": "Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.", 21105 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:hybridInspect", 21106 // "httpMethod": "POST", 21107 // "id": "dlp.projects.locations.dlpJobs.hybridInspect", 21108 // "parameterOrder": [ 21109 // "name" 21110 // ], 21111 // "parameters": { 21112 // "name": { 21113 // "description": "Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.", 21114 // "location": "path", 21115 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 21116 // "required": true, 21117 // "type": "string" 21118 // } 21119 // }, 21120 // "path": "v2/{+name}:hybridInspect", 21121 // "request": { 21122 // "$ref": "GooglePrivacyDlpV2HybridInspectDlpJobRequest" 21123 // }, 21124 // "response": { 21125 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 21126 // }, 21127 // "scopes": [ 21128 // "https://www.googleapis.com/auth/cloud-platform" 21129 // ] 21130 // } 21131 21132} 21133 21134// method id "dlp.projects.locations.dlpJobs.list": 21135 21136type ProjectsLocationsDlpJobsListCall struct { 21137 s *Service 21138 parentid string 21139 urlParams_ gensupport.URLParams 21140 ifNoneMatch_ string 21141 ctx_ context.Context 21142 header_ http.Header 21143} 21144 21145// List: Lists DlpJobs that match the specified filter in the request. 21146// See https://cloud.google.com/dlp/docs/inspecting-storage and 21147// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 21148// more. 21149// 21150// - parent: Parent resource name. The format of this value varies 21151// depending on whether you have specified a processing location 21152// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 21153// scope, location specified: 21154// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 21155// location specified (defaults to global): `projects/`PROJECT_ID The 21156// following example `parent` string specifies a parent project with 21157// the identifier `example-project`, and specifies the `europe-west3` 21158// location for processing data: 21159// parent=projects/example-project/locations/europe-west3. 21160func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { 21161 c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21162 c.parentid = parentid 21163 return c 21164} 21165 21166// Filter sets the optional parameter "filter": Allows filtering. 21167// Supported syntax: * Filter expressions are made up of one or more 21168// restrictions. * Restrictions can be combined by `AND` or `OR` logical 21169// operators. A sequence of restrictions implicitly uses `AND`. * A 21170// restriction has the form of `{field} {operator} {value}`. * Supported 21171// fields/values for inspect jobs: - `state` - 21172// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 21173// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 21174// of the trigger that created job. - 'end_time` - Corresponds to time 21175// the job finished. - 'start_time` - Corresponds to time the job 21176// finished. * Supported fields for risk analysis jobs: - `state` - 21177// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 21178// the job finished. - 'start_time` - Corresponds to time the job 21179// finished. * The operator must be `=` or `!=`. Examples: * 21180// inspected_storage = cloud_storage AND state = done * 21181// inspected_storage = cloud_storage OR inspected_storage = bigquery * 21182// inspected_storage = cloud_storage AND (state = done OR state = 21183// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 21184// this field should be no more than 500 characters. 21185func (c *ProjectsLocationsDlpJobsListCall) Filter(filter string) *ProjectsLocationsDlpJobsListCall { 21186 c.urlParams_.Set("filter", filter) 21187 return c 21188} 21189 21190// LocationId sets the optional parameter "locationId": Deprecated. This 21191// field has no effect. 21192func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *ProjectsLocationsDlpJobsListCall { 21193 c.urlParams_.Set("locationId", locationId) 21194 return c 21195} 21196 21197// OrderBy sets the optional parameter "orderBy": Comma separated list 21198// of fields to order by, followed by `asc` or `desc` postfix. This list 21199// is case-insensitive, default sorting order is ascending, redundant 21200// space characters are insignificant. Example: `name asc, end_time asc, 21201// create_time desc` Supported fields are: - `create_time`: corresponds 21202// to time the job was created. - `end_time`: corresponds to time the 21203// job ended. - `name`: corresponds to job's name. - `state`: 21204// corresponds to `state` 21205func (c *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { 21206 c.urlParams_.Set("orderBy", orderBy) 21207 return c 21208} 21209 21210// PageSize sets the optional parameter "pageSize": The standard list 21211// page size. 21212func (c *ProjectsLocationsDlpJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDlpJobsListCall { 21213 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21214 return c 21215} 21216 21217// PageToken sets the optional parameter "pageToken": The standard list 21218// page token. 21219func (c *ProjectsLocationsDlpJobsListCall) PageToken(pageToken string) *ProjectsLocationsDlpJobsListCall { 21220 c.urlParams_.Set("pageToken", pageToken) 21221 return c 21222} 21223 21224// Type sets the optional parameter "type": The type of job. Defaults to 21225// `DlpJobType.INSPECT` 21226// 21227// Possible values: 21228// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 21229// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 21230// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 21231func (c *ProjectsLocationsDlpJobsListCall) Type(type_ string) *ProjectsLocationsDlpJobsListCall { 21232 c.urlParams_.Set("type", type_) 21233 return c 21234} 21235 21236// Fields allows partial responses to be retrieved. See 21237// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21238// for more information. 21239func (c *ProjectsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsListCall { 21240 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21241 return c 21242} 21243 21244// IfNoneMatch sets the optional parameter which makes the operation 21245// fail if the object's ETag matches the given value. This is useful for 21246// getting updates only after the object has changed since the last 21247// request. Use googleapi.IsNotModified to check whether the response 21248// error from Do is the result of In-None-Match. 21249func (c *ProjectsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsListCall { 21250 c.ifNoneMatch_ = entityTag 21251 return c 21252} 21253 21254// Context sets the context to be used in this call's Do method. Any 21255// pending HTTP request will be aborted if the provided context is 21256// canceled. 21257func (c *ProjectsLocationsDlpJobsListCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsListCall { 21258 c.ctx_ = ctx 21259 return c 21260} 21261 21262// Header returns an http.Header that can be modified by the caller to 21263// add HTTP headers to the request. 21264func (c *ProjectsLocationsDlpJobsListCall) Header() http.Header { 21265 if c.header_ == nil { 21266 c.header_ = make(http.Header) 21267 } 21268 return c.header_ 21269} 21270 21271func (c *ProjectsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 21272 reqHeaders := make(http.Header) 21273 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21274 for k, v := range c.header_ { 21275 reqHeaders[k] = v 21276 } 21277 reqHeaders.Set("User-Agent", c.s.userAgent()) 21278 if c.ifNoneMatch_ != "" { 21279 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21280 } 21281 var body io.Reader = nil 21282 c.urlParams_.Set("alt", alt) 21283 c.urlParams_.Set("prettyPrint", "false") 21284 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 21285 urls += "?" + c.urlParams_.Encode() 21286 req, err := http.NewRequest("GET", urls, body) 21287 if err != nil { 21288 return nil, err 21289 } 21290 req.Header = reqHeaders 21291 googleapi.Expand(req.URL, map[string]string{ 21292 "parent": c.parentid, 21293 }) 21294 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21295} 21296 21297// Do executes the "dlp.projects.locations.dlpJobs.list" call. 21298// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 21299// be non-nil. Any non-2xx status code is an error. Response headers are 21300// in either 21301// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 21302// response was returned at all) in error.(*googleapi.Error).Header. Use 21303// googleapi.IsNotModified to check whether the returned error was 21304// because http.StatusNotModified was returned. 21305func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 21306 gensupport.SetOptions(c.urlParams_, opts...) 21307 res, err := c.doRequest("json") 21308 if res != nil && res.StatusCode == http.StatusNotModified { 21309 if res.Body != nil { 21310 res.Body.Close() 21311 } 21312 return nil, &googleapi.Error{ 21313 Code: res.StatusCode, 21314 Header: res.Header, 21315 } 21316 } 21317 if err != nil { 21318 return nil, err 21319 } 21320 defer googleapi.CloseBody(res) 21321 if err := googleapi.CheckResponse(res); err != nil { 21322 return nil, err 21323 } 21324 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 21325 ServerResponse: googleapi.ServerResponse{ 21326 Header: res.Header, 21327 HTTPStatusCode: res.StatusCode, 21328 }, 21329 } 21330 target := &ret 21331 if err := gensupport.DecodeResponse(target, res); err != nil { 21332 return nil, err 21333 } 21334 return ret, nil 21335 // { 21336 // "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.", 21337 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 21338 // "httpMethod": "GET", 21339 // "id": "dlp.projects.locations.dlpJobs.list", 21340 // "parameterOrder": [ 21341 // "parent" 21342 // ], 21343 // "parameters": { 21344 // "filter": { 21345 // "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.", 21346 // "location": "query", 21347 // "type": "string" 21348 // }, 21349 // "locationId": { 21350 // "description": "Deprecated. This field has no effect.", 21351 // "location": "query", 21352 // "type": "string" 21353 // }, 21354 // "orderBy": { 21355 // "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`", 21356 // "location": "query", 21357 // "type": "string" 21358 // }, 21359 // "pageSize": { 21360 // "description": "The standard list page size.", 21361 // "format": "int32", 21362 // "location": "query", 21363 // "type": "integer" 21364 // }, 21365 // "pageToken": { 21366 // "description": "The standard list page token.", 21367 // "location": "query", 21368 // "type": "string" 21369 // }, 21370 // "parent": { 21371 // "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", 21372 // "location": "path", 21373 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21374 // "required": true, 21375 // "type": "string" 21376 // }, 21377 // "type": { 21378 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 21379 // "enum": [ 21380 // "DLP_JOB_TYPE_UNSPECIFIED", 21381 // "INSPECT_JOB", 21382 // "RISK_ANALYSIS_JOB" 21383 // ], 21384 // "enumDescriptions": [ 21385 // "Defaults to INSPECT_JOB.", 21386 // "The job inspected Google Cloud for sensitive data.", 21387 // "The job executed a Risk Analysis computation." 21388 // ], 21389 // "location": "query", 21390 // "type": "string" 21391 // } 21392 // }, 21393 // "path": "v2/{+parent}/dlpJobs", 21394 // "response": { 21395 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 21396 // }, 21397 // "scopes": [ 21398 // "https://www.googleapis.com/auth/cloud-platform" 21399 // ] 21400 // } 21401 21402} 21403 21404// Pages invokes f for each page of results. 21405// A non-nil error returned from f will halt the iteration. 21406// The provided context supersedes any context provided to the Context method. 21407func (c *ProjectsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 21408 c.ctx_ = ctx 21409 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21410 for { 21411 x, err := c.Do() 21412 if err != nil { 21413 return err 21414 } 21415 if err := f(x); err != nil { 21416 return err 21417 } 21418 if x.NextPageToken == "" { 21419 return nil 21420 } 21421 c.PageToken(x.NextPageToken) 21422 } 21423} 21424 21425// method id "dlp.projects.locations.image.redact": 21426 21427type ProjectsLocationsImageRedactCall struct { 21428 s *Service 21429 parentid string 21430 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 21431 urlParams_ gensupport.URLParams 21432 ctx_ context.Context 21433 header_ http.Header 21434} 21435 21436// Redact: Redacts potentially sensitive info from an image. This method 21437// has limits on input size, processing time, and output size. See 21438// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 21439// learn more. When no InfoTypes or CustomInfoTypes are specified in 21440// this request, the system will automatically choose what detectors to 21441// run. By default this may be all types, but may change over time as 21442// detectors are updated. 21443// 21444// - parent: Parent resource name. The format of this value varies 21445// depending on whether you have specified a processing location 21446// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 21447// scope, location specified: 21448// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 21449// location specified (defaults to global): `projects/`PROJECT_ID The 21450// following example `parent` string specifies a parent project with 21451// the identifier `example-project`, and specifies the `europe-west3` 21452// location for processing data: 21453// parent=projects/example-project/locations/europe-west3. 21454func (r *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { 21455 c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21456 c.parentid = parentid 21457 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 21458 return c 21459} 21460 21461// Fields allows partial responses to be retrieved. See 21462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21463// for more information. 21464func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { 21465 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21466 return c 21467} 21468 21469// Context sets the context to be used in this call's Do method. Any 21470// pending HTTP request will be aborted if the provided context is 21471// canceled. 21472func (c *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { 21473 c.ctx_ = ctx 21474 return c 21475} 21476 21477// Header returns an http.Header that can be modified by the caller to 21478// add HTTP headers to the request. 21479func (c *ProjectsLocationsImageRedactCall) Header() http.Header { 21480 if c.header_ == nil { 21481 c.header_ = make(http.Header) 21482 } 21483 return c.header_ 21484} 21485 21486func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response, error) { 21487 reqHeaders := make(http.Header) 21488 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21489 for k, v := range c.header_ { 21490 reqHeaders[k] = v 21491 } 21492 reqHeaders.Set("User-Agent", c.s.userAgent()) 21493 var body io.Reader = nil 21494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 21495 if err != nil { 21496 return nil, err 21497 } 21498 reqHeaders.Set("Content-Type", "application/json") 21499 c.urlParams_.Set("alt", alt) 21500 c.urlParams_.Set("prettyPrint", "false") 21501 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 21502 urls += "?" + c.urlParams_.Encode() 21503 req, err := http.NewRequest("POST", urls, body) 21504 if err != nil { 21505 return nil, err 21506 } 21507 req.Header = reqHeaders 21508 googleapi.Expand(req.URL, map[string]string{ 21509 "parent": c.parentid, 21510 }) 21511 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21512} 21513 21514// Do executes the "dlp.projects.locations.image.redact" call. 21515// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 21516// be non-nil. Any non-2xx status code is an error. Response headers are 21517// in either 21518// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 21519// response was returned at all) in error.(*googleapi.Error).Header. Use 21520// googleapi.IsNotModified to check whether the returned error was 21521// because http.StatusNotModified was returned. 21522func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 21523 gensupport.SetOptions(c.urlParams_, opts...) 21524 res, err := c.doRequest("json") 21525 if res != nil && res.StatusCode == http.StatusNotModified { 21526 if res.Body != nil { 21527 res.Body.Close() 21528 } 21529 return nil, &googleapi.Error{ 21530 Code: res.StatusCode, 21531 Header: res.Header, 21532 } 21533 } 21534 if err != nil { 21535 return nil, err 21536 } 21537 defer googleapi.CloseBody(res) 21538 if err := googleapi.CheckResponse(res); err != nil { 21539 return nil, err 21540 } 21541 ret := &GooglePrivacyDlpV2RedactImageResponse{ 21542 ServerResponse: googleapi.ServerResponse{ 21543 Header: res.Header, 21544 HTTPStatusCode: res.StatusCode, 21545 }, 21546 } 21547 target := &ret 21548 if err := gensupport.DecodeResponse(target, res); err != nil { 21549 return nil, err 21550 } 21551 return ret, nil 21552 // { 21553 // "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.", 21554 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/image:redact", 21555 // "httpMethod": "POST", 21556 // "id": "dlp.projects.locations.image.redact", 21557 // "parameterOrder": [ 21558 // "parent" 21559 // ], 21560 // "parameters": { 21561 // "parent": { 21562 // "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", 21563 // "location": "path", 21564 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21565 // "required": true, 21566 // "type": "string" 21567 // } 21568 // }, 21569 // "path": "v2/{+parent}/image:redact", 21570 // "request": { 21571 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 21572 // }, 21573 // "response": { 21574 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 21575 // }, 21576 // "scopes": [ 21577 // "https://www.googleapis.com/auth/cloud-platform" 21578 // ] 21579 // } 21580 21581} 21582 21583// method id "dlp.projects.locations.inspectTemplates.create": 21584 21585type ProjectsLocationsInspectTemplatesCreateCall struct { 21586 s *Service 21587 parentid string 21588 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 21589 urlParams_ gensupport.URLParams 21590 ctx_ context.Context 21591 header_ http.Header 21592} 21593 21594// Create: Creates an InspectTemplate for re-using frequently used 21595// configuration for inspecting content, images, and storage. See 21596// https://cloud.google.com/dlp/docs/creating-templates to learn more. 21597// 21598// - parent: Parent resource name. The format of this value varies 21599// depending on the scope of the request (project or organization) and 21600// whether you have specified a processing location 21601// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 21602// scope, location specified: 21603// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 21604// location specified (defaults to global): `projects/`PROJECT_ID + 21605// Organizations scope, location specified: 21606// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 21607// scope, no location specified (defaults to global): 21608// `organizations/`ORG_ID The following example `parent` string 21609// specifies a parent project with the identifier `example-project`, 21610// and specifies the `europe-west3` location for processing data: 21611// parent=projects/example-project/locations/europe-west3. 21612func (r *ProjectsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesCreateCall { 21613 c := &ProjectsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21614 c.parentid = parentid 21615 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 21616 return c 21617} 21618 21619// Fields allows partial responses to be retrieved. See 21620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21621// for more information. 21622func (c *ProjectsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesCreateCall { 21623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21624 return c 21625} 21626 21627// Context sets the context to be used in this call's Do method. Any 21628// pending HTTP request will be aborted if the provided context is 21629// canceled. 21630func (c *ProjectsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesCreateCall { 21631 c.ctx_ = ctx 21632 return c 21633} 21634 21635// Header returns an http.Header that can be modified by the caller to 21636// add HTTP headers to the request. 21637func (c *ProjectsLocationsInspectTemplatesCreateCall) Header() http.Header { 21638 if c.header_ == nil { 21639 c.header_ = make(http.Header) 21640 } 21641 return c.header_ 21642} 21643 21644func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 21645 reqHeaders := make(http.Header) 21646 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21647 for k, v := range c.header_ { 21648 reqHeaders[k] = v 21649 } 21650 reqHeaders.Set("User-Agent", c.s.userAgent()) 21651 var body io.Reader = nil 21652 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 21653 if err != nil { 21654 return nil, err 21655 } 21656 reqHeaders.Set("Content-Type", "application/json") 21657 c.urlParams_.Set("alt", alt) 21658 c.urlParams_.Set("prettyPrint", "false") 21659 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 21660 urls += "?" + c.urlParams_.Encode() 21661 req, err := http.NewRequest("POST", urls, body) 21662 if err != nil { 21663 return nil, err 21664 } 21665 req.Header = reqHeaders 21666 googleapi.Expand(req.URL, map[string]string{ 21667 "parent": c.parentid, 21668 }) 21669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21670} 21671 21672// Do executes the "dlp.projects.locations.inspectTemplates.create" call. 21673// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 21674// non-nil. Any non-2xx status code is an error. Response headers are in 21675// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 21676// (if a response was returned at all) in 21677// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21678// whether the returned error was because http.StatusNotModified was 21679// returned. 21680func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 21681 gensupport.SetOptions(c.urlParams_, opts...) 21682 res, err := c.doRequest("json") 21683 if res != nil && res.StatusCode == http.StatusNotModified { 21684 if res.Body != nil { 21685 res.Body.Close() 21686 } 21687 return nil, &googleapi.Error{ 21688 Code: res.StatusCode, 21689 Header: res.Header, 21690 } 21691 } 21692 if err != nil { 21693 return nil, err 21694 } 21695 defer googleapi.CloseBody(res) 21696 if err := googleapi.CheckResponse(res); err != nil { 21697 return nil, err 21698 } 21699 ret := &GooglePrivacyDlpV2InspectTemplate{ 21700 ServerResponse: googleapi.ServerResponse{ 21701 Header: res.Header, 21702 HTTPStatusCode: res.StatusCode, 21703 }, 21704 } 21705 target := &ret 21706 if err := gensupport.DecodeResponse(target, res); err != nil { 21707 return nil, err 21708 } 21709 return ret, nil 21710 // { 21711 // "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.", 21712 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 21713 // "httpMethod": "POST", 21714 // "id": "dlp.projects.locations.inspectTemplates.create", 21715 // "parameterOrder": [ 21716 // "parent" 21717 // ], 21718 // "parameters": { 21719 // "parent": { 21720 // "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", 21721 // "location": "path", 21722 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21723 // "required": true, 21724 // "type": "string" 21725 // } 21726 // }, 21727 // "path": "v2/{+parent}/inspectTemplates", 21728 // "request": { 21729 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 21730 // }, 21731 // "response": { 21732 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 21733 // }, 21734 // "scopes": [ 21735 // "https://www.googleapis.com/auth/cloud-platform" 21736 // ] 21737 // } 21738 21739} 21740 21741// method id "dlp.projects.locations.inspectTemplates.delete": 21742 21743type ProjectsLocationsInspectTemplatesDeleteCall struct { 21744 s *Service 21745 name string 21746 urlParams_ gensupport.URLParams 21747 ctx_ context.Context 21748 header_ http.Header 21749} 21750 21751// Delete: Deletes an InspectTemplate. See 21752// https://cloud.google.com/dlp/docs/creating-templates to learn more. 21753// 21754// - name: Resource name of the organization and inspectTemplate to be 21755// deleted, for example 21756// `organizations/433245324/inspectTemplates/432452342` or 21757// projects/project-id/inspectTemplates/432452342. 21758func (r *ProjectsLocationsInspectTemplatesService) Delete(name string) *ProjectsLocationsInspectTemplatesDeleteCall { 21759 c := &ProjectsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21760 c.name = name 21761 return c 21762} 21763 21764// Fields allows partial responses to be retrieved. See 21765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21766// for more information. 21767func (c *ProjectsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesDeleteCall { 21768 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21769 return c 21770} 21771 21772// Context sets the context to be used in this call's Do method. Any 21773// pending HTTP request will be aborted if the provided context is 21774// canceled. 21775func (c *ProjectsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesDeleteCall { 21776 c.ctx_ = ctx 21777 return c 21778} 21779 21780// Header returns an http.Header that can be modified by the caller to 21781// add HTTP headers to the request. 21782func (c *ProjectsLocationsInspectTemplatesDeleteCall) Header() http.Header { 21783 if c.header_ == nil { 21784 c.header_ = make(http.Header) 21785 } 21786 return c.header_ 21787} 21788 21789func (c *ProjectsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 21790 reqHeaders := make(http.Header) 21791 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21792 for k, v := range c.header_ { 21793 reqHeaders[k] = v 21794 } 21795 reqHeaders.Set("User-Agent", c.s.userAgent()) 21796 var body io.Reader = nil 21797 c.urlParams_.Set("alt", alt) 21798 c.urlParams_.Set("prettyPrint", "false") 21799 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21800 urls += "?" + c.urlParams_.Encode() 21801 req, err := http.NewRequest("DELETE", urls, body) 21802 if err != nil { 21803 return nil, err 21804 } 21805 req.Header = reqHeaders 21806 googleapi.Expand(req.URL, map[string]string{ 21807 "name": c.name, 21808 }) 21809 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21810} 21811 21812// Do executes the "dlp.projects.locations.inspectTemplates.delete" call. 21813// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 21814// non-2xx status code is an error. Response headers are in either 21815// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 21816// returned at all) in error.(*googleapi.Error).Header. Use 21817// googleapi.IsNotModified to check whether the returned error was 21818// because http.StatusNotModified was returned. 21819func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 21820 gensupport.SetOptions(c.urlParams_, opts...) 21821 res, err := c.doRequest("json") 21822 if res != nil && res.StatusCode == http.StatusNotModified { 21823 if res.Body != nil { 21824 res.Body.Close() 21825 } 21826 return nil, &googleapi.Error{ 21827 Code: res.StatusCode, 21828 Header: res.Header, 21829 } 21830 } 21831 if err != nil { 21832 return nil, err 21833 } 21834 defer googleapi.CloseBody(res) 21835 if err := googleapi.CheckResponse(res); err != nil { 21836 return nil, err 21837 } 21838 ret := &GoogleProtobufEmpty{ 21839 ServerResponse: googleapi.ServerResponse{ 21840 Header: res.Header, 21841 HTTPStatusCode: res.StatusCode, 21842 }, 21843 } 21844 target := &ret 21845 if err := gensupport.DecodeResponse(target, res); err != nil { 21846 return nil, err 21847 } 21848 return ret, nil 21849 // { 21850 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 21851 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 21852 // "httpMethod": "DELETE", 21853 // "id": "dlp.projects.locations.inspectTemplates.delete", 21854 // "parameterOrder": [ 21855 // "name" 21856 // ], 21857 // "parameters": { 21858 // "name": { 21859 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 21860 // "location": "path", 21861 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 21862 // "required": true, 21863 // "type": "string" 21864 // } 21865 // }, 21866 // "path": "v2/{+name}", 21867 // "response": { 21868 // "$ref": "GoogleProtobufEmpty" 21869 // }, 21870 // "scopes": [ 21871 // "https://www.googleapis.com/auth/cloud-platform" 21872 // ] 21873 // } 21874 21875} 21876 21877// method id "dlp.projects.locations.inspectTemplates.get": 21878 21879type ProjectsLocationsInspectTemplatesGetCall struct { 21880 s *Service 21881 name string 21882 urlParams_ gensupport.URLParams 21883 ifNoneMatch_ string 21884 ctx_ context.Context 21885 header_ http.Header 21886} 21887 21888// Get: Gets an InspectTemplate. See 21889// https://cloud.google.com/dlp/docs/creating-templates to learn more. 21890// 21891// - name: Resource name of the organization and inspectTemplate to be 21892// read, for example 21893// `organizations/433245324/inspectTemplates/432452342` or 21894// projects/project-id/inspectTemplates/432452342. 21895func (r *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLocationsInspectTemplatesGetCall { 21896 c := &ProjectsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21897 c.name = name 21898 return c 21899} 21900 21901// Fields allows partial responses to be retrieved. See 21902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21903// for more information. 21904func (c *ProjectsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesGetCall { 21905 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21906 return c 21907} 21908 21909// IfNoneMatch sets the optional parameter which makes the operation 21910// fail if the object's ETag matches the given value. This is useful for 21911// getting updates only after the object has changed since the last 21912// request. Use googleapi.IsNotModified to check whether the response 21913// error from Do is the result of In-None-Match. 21914func (c *ProjectsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesGetCall { 21915 c.ifNoneMatch_ = entityTag 21916 return c 21917} 21918 21919// Context sets the context to be used in this call's Do method. Any 21920// pending HTTP request will be aborted if the provided context is 21921// canceled. 21922func (c *ProjectsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesGetCall { 21923 c.ctx_ = ctx 21924 return c 21925} 21926 21927// Header returns an http.Header that can be modified by the caller to 21928// add HTTP headers to the request. 21929func (c *ProjectsLocationsInspectTemplatesGetCall) Header() http.Header { 21930 if c.header_ == nil { 21931 c.header_ = make(http.Header) 21932 } 21933 return c.header_ 21934} 21935 21936func (c *ProjectsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 21937 reqHeaders := make(http.Header) 21938 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 21939 for k, v := range c.header_ { 21940 reqHeaders[k] = v 21941 } 21942 reqHeaders.Set("User-Agent", c.s.userAgent()) 21943 if c.ifNoneMatch_ != "" { 21944 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21945 } 21946 var body io.Reader = nil 21947 c.urlParams_.Set("alt", alt) 21948 c.urlParams_.Set("prettyPrint", "false") 21949 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21950 urls += "?" + c.urlParams_.Encode() 21951 req, err := http.NewRequest("GET", urls, body) 21952 if err != nil { 21953 return nil, err 21954 } 21955 req.Header = reqHeaders 21956 googleapi.Expand(req.URL, map[string]string{ 21957 "name": c.name, 21958 }) 21959 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21960} 21961 21962// Do executes the "dlp.projects.locations.inspectTemplates.get" call. 21963// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 21964// non-nil. Any non-2xx status code is an error. Response headers are in 21965// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 21966// (if a response was returned at all) in 21967// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21968// whether the returned error was because http.StatusNotModified was 21969// returned. 21970func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 21971 gensupport.SetOptions(c.urlParams_, opts...) 21972 res, err := c.doRequest("json") 21973 if res != nil && res.StatusCode == http.StatusNotModified { 21974 if res.Body != nil { 21975 res.Body.Close() 21976 } 21977 return nil, &googleapi.Error{ 21978 Code: res.StatusCode, 21979 Header: res.Header, 21980 } 21981 } 21982 if err != nil { 21983 return nil, err 21984 } 21985 defer googleapi.CloseBody(res) 21986 if err := googleapi.CheckResponse(res); err != nil { 21987 return nil, err 21988 } 21989 ret := &GooglePrivacyDlpV2InspectTemplate{ 21990 ServerResponse: googleapi.ServerResponse{ 21991 Header: res.Header, 21992 HTTPStatusCode: res.StatusCode, 21993 }, 21994 } 21995 target := &ret 21996 if err := gensupport.DecodeResponse(target, res); err != nil { 21997 return nil, err 21998 } 21999 return ret, nil 22000 // { 22001 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 22002 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 22003 // "httpMethod": "GET", 22004 // "id": "dlp.projects.locations.inspectTemplates.get", 22005 // "parameterOrder": [ 22006 // "name" 22007 // ], 22008 // "parameters": { 22009 // "name": { 22010 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 22011 // "location": "path", 22012 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 22013 // "required": true, 22014 // "type": "string" 22015 // } 22016 // }, 22017 // "path": "v2/{+name}", 22018 // "response": { 22019 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 22020 // }, 22021 // "scopes": [ 22022 // "https://www.googleapis.com/auth/cloud-platform" 22023 // ] 22024 // } 22025 22026} 22027 22028// method id "dlp.projects.locations.inspectTemplates.list": 22029 22030type ProjectsLocationsInspectTemplatesListCall struct { 22031 s *Service 22032 parentid string 22033 urlParams_ gensupport.URLParams 22034 ifNoneMatch_ string 22035 ctx_ context.Context 22036 header_ http.Header 22037} 22038 22039// List: Lists InspectTemplates. See 22040// https://cloud.google.com/dlp/docs/creating-templates to learn more. 22041// 22042// - parent: Parent resource name. The format of this value varies 22043// depending on the scope of the request (project or organization) and 22044// whether you have specified a processing location 22045// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 22046// scope, location specified: 22047// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 22048// location specified (defaults to global): `projects/`PROJECT_ID + 22049// Organizations scope, location specified: 22050// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 22051// scope, no location specified (defaults to global): 22052// `organizations/`ORG_ID The following example `parent` string 22053// specifies a parent project with the identifier `example-project`, 22054// and specifies the `europe-west3` location for processing data: 22055// parent=projects/example-project/locations/europe-west3. 22056func (r *ProjectsLocationsInspectTemplatesService) List(parentid string) *ProjectsLocationsInspectTemplatesListCall { 22057 c := &ProjectsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22058 c.parentid = parentid 22059 return c 22060} 22061 22062// LocationId sets the optional parameter "locationId": Deprecated. This 22063// field has no effect. 22064func (c *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string) *ProjectsLocationsInspectTemplatesListCall { 22065 c.urlParams_.Set("locationId", locationId) 22066 return c 22067} 22068 22069// OrderBy sets the optional parameter "orderBy": Comma separated list 22070// of fields to order by, followed by `asc` or `desc` postfix. This list 22071// is case-insensitive, default sorting order is ascending, redundant 22072// space characters are insignificant. Example: `name asc,update_time, 22073// create_time desc` Supported fields are: - `create_time`: corresponds 22074// to time the template was created. - `update_time`: corresponds to 22075// time the template was last updated. - `name`: corresponds to 22076// template's name. - `display_name`: corresponds to template's display 22077// name. 22078func (c *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { 22079 c.urlParams_.Set("orderBy", orderBy) 22080 return c 22081} 22082 22083// PageSize sets the optional parameter "pageSize": Size of the page, 22084// can be limited by server. If zero server returns a page of max size 22085// 100. 22086func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { 22087 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22088 return c 22089} 22090 22091// PageToken sets the optional parameter "pageToken": Page token to 22092// continue retrieval. Comes from previous call to 22093// `ListInspectTemplates`. 22094func (c *ProjectsLocationsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsInspectTemplatesListCall { 22095 c.urlParams_.Set("pageToken", pageToken) 22096 return c 22097} 22098 22099// Fields allows partial responses to be retrieved. See 22100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22101// for more information. 22102func (c *ProjectsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesListCall { 22103 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22104 return c 22105} 22106 22107// IfNoneMatch sets the optional parameter which makes the operation 22108// fail if the object's ETag matches the given value. This is useful for 22109// getting updates only after the object has changed since the last 22110// request. Use googleapi.IsNotModified to check whether the response 22111// error from Do is the result of In-None-Match. 22112func (c *ProjectsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesListCall { 22113 c.ifNoneMatch_ = entityTag 22114 return c 22115} 22116 22117// Context sets the context to be used in this call's Do method. Any 22118// pending HTTP request will be aborted if the provided context is 22119// canceled. 22120func (c *ProjectsLocationsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesListCall { 22121 c.ctx_ = ctx 22122 return c 22123} 22124 22125// Header returns an http.Header that can be modified by the caller to 22126// add HTTP headers to the request. 22127func (c *ProjectsLocationsInspectTemplatesListCall) Header() http.Header { 22128 if c.header_ == nil { 22129 c.header_ = make(http.Header) 22130 } 22131 return c.header_ 22132} 22133 22134func (c *ProjectsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 22135 reqHeaders := make(http.Header) 22136 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 22137 for k, v := range c.header_ { 22138 reqHeaders[k] = v 22139 } 22140 reqHeaders.Set("User-Agent", c.s.userAgent()) 22141 if c.ifNoneMatch_ != "" { 22142 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22143 } 22144 var body io.Reader = nil 22145 c.urlParams_.Set("alt", alt) 22146 c.urlParams_.Set("prettyPrint", "false") 22147 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 22148 urls += "?" + c.urlParams_.Encode() 22149 req, err := http.NewRequest("GET", urls, body) 22150 if err != nil { 22151 return nil, err 22152 } 22153 req.Header = reqHeaders 22154 googleapi.Expand(req.URL, map[string]string{ 22155 "parent": c.parentid, 22156 }) 22157 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22158} 22159 22160// Do executes the "dlp.projects.locations.inspectTemplates.list" call. 22161// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 22162// error will be non-nil. Any non-2xx status code is an error. Response 22163// headers are in either 22164// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 22165// or (if a response was returned at all) in 22166// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22167// whether the returned error was because http.StatusNotModified was 22168// returned. 22169func (c *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 22170 gensupport.SetOptions(c.urlParams_, opts...) 22171 res, err := c.doRequest("json") 22172 if res != nil && res.StatusCode == http.StatusNotModified { 22173 if res.Body != nil { 22174 res.Body.Close() 22175 } 22176 return nil, &googleapi.Error{ 22177 Code: res.StatusCode, 22178 Header: res.Header, 22179 } 22180 } 22181 if err != nil { 22182 return nil, err 22183 } 22184 defer googleapi.CloseBody(res) 22185 if err := googleapi.CheckResponse(res); err != nil { 22186 return nil, err 22187 } 22188 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 22189 ServerResponse: googleapi.ServerResponse{ 22190 Header: res.Header, 22191 HTTPStatusCode: res.StatusCode, 22192 }, 22193 } 22194 target := &ret 22195 if err := gensupport.DecodeResponse(target, res); err != nil { 22196 return nil, err 22197 } 22198 return ret, nil 22199 // { 22200 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 22201 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 22202 // "httpMethod": "GET", 22203 // "id": "dlp.projects.locations.inspectTemplates.list", 22204 // "parameterOrder": [ 22205 // "parent" 22206 // ], 22207 // "parameters": { 22208 // "locationId": { 22209 // "description": "Deprecated. This field has no effect.", 22210 // "location": "query", 22211 // "type": "string" 22212 // }, 22213 // "orderBy": { 22214 // "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.", 22215 // "location": "query", 22216 // "type": "string" 22217 // }, 22218 // "pageSize": { 22219 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 22220 // "format": "int32", 22221 // "location": "query", 22222 // "type": "integer" 22223 // }, 22224 // "pageToken": { 22225 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 22226 // "location": "query", 22227 // "type": "string" 22228 // }, 22229 // "parent": { 22230 // "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", 22231 // "location": "path", 22232 // "pattern": "^projects/[^/]+/locations/[^/]+$", 22233 // "required": true, 22234 // "type": "string" 22235 // } 22236 // }, 22237 // "path": "v2/{+parent}/inspectTemplates", 22238 // "response": { 22239 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 22240 // }, 22241 // "scopes": [ 22242 // "https://www.googleapis.com/auth/cloud-platform" 22243 // ] 22244 // } 22245 22246} 22247 22248// Pages invokes f for each page of results. 22249// A non-nil error returned from f will halt the iteration. 22250// The provided context supersedes any context provided to the Context method. 22251func (c *ProjectsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 22252 c.ctx_ = ctx 22253 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22254 for { 22255 x, err := c.Do() 22256 if err != nil { 22257 return err 22258 } 22259 if err := f(x); err != nil { 22260 return err 22261 } 22262 if x.NextPageToken == "" { 22263 return nil 22264 } 22265 c.PageToken(x.NextPageToken) 22266 } 22267} 22268 22269// method id "dlp.projects.locations.inspectTemplates.patch": 22270 22271type ProjectsLocationsInspectTemplatesPatchCall struct { 22272 s *Service 22273 name string 22274 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 22275 urlParams_ gensupport.URLParams 22276 ctx_ context.Context 22277 header_ http.Header 22278} 22279 22280// Patch: Updates the InspectTemplate. See 22281// https://cloud.google.com/dlp/docs/creating-templates to learn more. 22282// 22283// - name: Resource name of organization and inspectTemplate to be 22284// updated, for example 22285// `organizations/433245324/inspectTemplates/432452342` or 22286// projects/project-id/inspectTemplates/432452342. 22287func (r *ProjectsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesPatchCall { 22288 c := &ProjectsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22289 c.name = name 22290 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 22291 return c 22292} 22293 22294// Fields allows partial responses to be retrieved. See 22295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22296// for more information. 22297func (c *ProjectsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesPatchCall { 22298 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22299 return c 22300} 22301 22302// Context sets the context to be used in this call's Do method. Any 22303// pending HTTP request will be aborted if the provided context is 22304// canceled. 22305func (c *ProjectsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesPatchCall { 22306 c.ctx_ = ctx 22307 return c 22308} 22309 22310// Header returns an http.Header that can be modified by the caller to 22311// add HTTP headers to the request. 22312func (c *ProjectsLocationsInspectTemplatesPatchCall) Header() http.Header { 22313 if c.header_ == nil { 22314 c.header_ = make(http.Header) 22315 } 22316 return c.header_ 22317} 22318 22319func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 22320 reqHeaders := make(http.Header) 22321 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 22322 for k, v := range c.header_ { 22323 reqHeaders[k] = v 22324 } 22325 reqHeaders.Set("User-Agent", c.s.userAgent()) 22326 var body io.Reader = nil 22327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 22328 if err != nil { 22329 return nil, err 22330 } 22331 reqHeaders.Set("Content-Type", "application/json") 22332 c.urlParams_.Set("alt", alt) 22333 c.urlParams_.Set("prettyPrint", "false") 22334 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22335 urls += "?" + c.urlParams_.Encode() 22336 req, err := http.NewRequest("PATCH", urls, body) 22337 if err != nil { 22338 return nil, err 22339 } 22340 req.Header = reqHeaders 22341 googleapi.Expand(req.URL, map[string]string{ 22342 "name": c.name, 22343 }) 22344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22345} 22346 22347// Do executes the "dlp.projects.locations.inspectTemplates.patch" call. 22348// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 22349// non-nil. Any non-2xx status code is an error. Response headers are in 22350// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 22351// (if a response was returned at all) in 22352// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22353// whether the returned error was because http.StatusNotModified was 22354// returned. 22355func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 22356 gensupport.SetOptions(c.urlParams_, opts...) 22357 res, err := c.doRequest("json") 22358 if res != nil && res.StatusCode == http.StatusNotModified { 22359 if res.Body != nil { 22360 res.Body.Close() 22361 } 22362 return nil, &googleapi.Error{ 22363 Code: res.StatusCode, 22364 Header: res.Header, 22365 } 22366 } 22367 if err != nil { 22368 return nil, err 22369 } 22370 defer googleapi.CloseBody(res) 22371 if err := googleapi.CheckResponse(res); err != nil { 22372 return nil, err 22373 } 22374 ret := &GooglePrivacyDlpV2InspectTemplate{ 22375 ServerResponse: googleapi.ServerResponse{ 22376 Header: res.Header, 22377 HTTPStatusCode: res.StatusCode, 22378 }, 22379 } 22380 target := &ret 22381 if err := gensupport.DecodeResponse(target, res); err != nil { 22382 return nil, err 22383 } 22384 return ret, nil 22385 // { 22386 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 22387 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 22388 // "httpMethod": "PATCH", 22389 // "id": "dlp.projects.locations.inspectTemplates.patch", 22390 // "parameterOrder": [ 22391 // "name" 22392 // ], 22393 // "parameters": { 22394 // "name": { 22395 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 22396 // "location": "path", 22397 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 22398 // "required": true, 22399 // "type": "string" 22400 // } 22401 // }, 22402 // "path": "v2/{+name}", 22403 // "request": { 22404 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 22405 // }, 22406 // "response": { 22407 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 22408 // }, 22409 // "scopes": [ 22410 // "https://www.googleapis.com/auth/cloud-platform" 22411 // ] 22412 // } 22413 22414} 22415 22416// method id "dlp.projects.locations.jobTriggers.activate": 22417 22418type ProjectsLocationsJobTriggersActivateCall struct { 22419 s *Service 22420 name string 22421 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 22422 urlParams_ gensupport.URLParams 22423 ctx_ context.Context 22424 header_ http.Header 22425} 22426 22427// Activate: Activate a job trigger. Causes the immediate execute of a 22428// trigger instead of waiting on the trigger event to occur. 22429// 22430// - name: Resource name of the trigger to activate, for example 22431// `projects/dlp-test-project/jobTriggers/53234423`. 22432func (r *ProjectsLocationsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsLocationsJobTriggersActivateCall { 22433 c := &ProjectsLocationsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22434 c.name = name 22435 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 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 *ProjectsLocationsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersActivateCall { 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 *ProjectsLocationsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersActivateCall { 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 *ProjectsLocationsJobTriggersActivateCall) Header() http.Header { 22458 if c.header_ == nil { 22459 c.header_ = make(http.Header) 22460 } 22461 return c.header_ 22462} 22463 22464func (c *ProjectsLocationsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 22465 reqHeaders := make(http.Header) 22466 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 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.googleprivacydlpv2activatejobtriggerrequest) 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/{+name}:activate") 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 "name": c.name, 22488 }) 22489 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22490} 22491 22492// Do executes the "dlp.projects.locations.jobTriggers.activate" call. 22493// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 22494// Any non-2xx status code is an error. Response headers are in either 22495// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 22496// returned at all) in error.(*googleapi.Error).Header. Use 22497// googleapi.IsNotModified to check whether the returned error was 22498// because http.StatusNotModified was returned. 22499func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, 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 := &GooglePrivacyDlpV2DlpJob{ 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": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 22531 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:activate", 22532 // "httpMethod": "POST", 22533 // "id": "dlp.projects.locations.jobTriggers.activate", 22534 // "parameterOrder": [ 22535 // "name" 22536 // ], 22537 // "parameters": { 22538 // "name": { 22539 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 22540 // "location": "path", 22541 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 22542 // "required": true, 22543 // "type": "string" 22544 // } 22545 // }, 22546 // "path": "v2/{+name}:activate", 22547 // "request": { 22548 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 22549 // }, 22550 // "response": { 22551 // "$ref": "GooglePrivacyDlpV2DlpJob" 22552 // }, 22553 // "scopes": [ 22554 // "https://www.googleapis.com/auth/cloud-platform" 22555 // ] 22556 // } 22557 22558} 22559 22560// method id "dlp.projects.locations.jobTriggers.create": 22561 22562type ProjectsLocationsJobTriggersCreateCall struct { 22563 s *Service 22564 parentid string 22565 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 22566 urlParams_ gensupport.URLParams 22567 ctx_ context.Context 22568 header_ http.Header 22569} 22570 22571// Create: Creates a job trigger to run DLP actions such as scanning 22572// storage for sensitive information on a set schedule. See 22573// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 22574// more. 22575// 22576// - parent: Parent resource name. The format of this value varies 22577// depending on whether you have specified a processing location 22578// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 22579// scope, location specified: 22580// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 22581// location specified (defaults to global): `projects/`PROJECT_ID The 22582// following example `parent` string specifies a parent project with 22583// the identifier `example-project`, and specifies the `europe-west3` 22584// location for processing data: 22585// parent=projects/example-project/locations/europe-west3. 22586func (r *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { 22587 c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22588 c.parentid = parentid 22589 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 22590 return c 22591} 22592 22593// Fields allows partial responses to be retrieved. See 22594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22595// for more information. 22596func (c *ProjectsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersCreateCall { 22597 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22598 return c 22599} 22600 22601// Context sets the context to be used in this call's Do method. Any 22602// pending HTTP request will be aborted if the provided context is 22603// canceled. 22604func (c *ProjectsLocationsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersCreateCall { 22605 c.ctx_ = ctx 22606 return c 22607} 22608 22609// Header returns an http.Header that can be modified by the caller to 22610// add HTTP headers to the request. 22611func (c *ProjectsLocationsJobTriggersCreateCall) Header() http.Header { 22612 if c.header_ == nil { 22613 c.header_ = make(http.Header) 22614 } 22615 return c.header_ 22616} 22617 22618func (c *ProjectsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 22619 reqHeaders := make(http.Header) 22620 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 22621 for k, v := range c.header_ { 22622 reqHeaders[k] = v 22623 } 22624 reqHeaders.Set("User-Agent", c.s.userAgent()) 22625 var body io.Reader = nil 22626 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 22627 if err != nil { 22628 return nil, err 22629 } 22630 reqHeaders.Set("Content-Type", "application/json") 22631 c.urlParams_.Set("alt", alt) 22632 c.urlParams_.Set("prettyPrint", "false") 22633 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 22634 urls += "?" + c.urlParams_.Encode() 22635 req, err := http.NewRequest("POST", urls, body) 22636 if err != nil { 22637 return nil, err 22638 } 22639 req.Header = reqHeaders 22640 googleapi.Expand(req.URL, map[string]string{ 22641 "parent": c.parentid, 22642 }) 22643 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22644} 22645 22646// Do executes the "dlp.projects.locations.jobTriggers.create" call. 22647// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 22648// non-nil. Any non-2xx status code is an error. Response headers are in 22649// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 22650// response was returned at all) in error.(*googleapi.Error).Header. Use 22651// googleapi.IsNotModified to check whether the returned error was 22652// because http.StatusNotModified was returned. 22653func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 22654 gensupport.SetOptions(c.urlParams_, opts...) 22655 res, err := c.doRequest("json") 22656 if res != nil && res.StatusCode == http.StatusNotModified { 22657 if res.Body != nil { 22658 res.Body.Close() 22659 } 22660 return nil, &googleapi.Error{ 22661 Code: res.StatusCode, 22662 Header: res.Header, 22663 } 22664 } 22665 if err != nil { 22666 return nil, err 22667 } 22668 defer googleapi.CloseBody(res) 22669 if err := googleapi.CheckResponse(res); err != nil { 22670 return nil, err 22671 } 22672 ret := &GooglePrivacyDlpV2JobTrigger{ 22673 ServerResponse: googleapi.ServerResponse{ 22674 Header: res.Header, 22675 HTTPStatusCode: res.StatusCode, 22676 }, 22677 } 22678 target := &ret 22679 if err := gensupport.DecodeResponse(target, res); err != nil { 22680 return nil, err 22681 } 22682 return ret, nil 22683 // { 22684 // "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.", 22685 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 22686 // "httpMethod": "POST", 22687 // "id": "dlp.projects.locations.jobTriggers.create", 22688 // "parameterOrder": [ 22689 // "parent" 22690 // ], 22691 // "parameters": { 22692 // "parent": { 22693 // "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", 22694 // "location": "path", 22695 // "pattern": "^projects/[^/]+/locations/[^/]+$", 22696 // "required": true, 22697 // "type": "string" 22698 // } 22699 // }, 22700 // "path": "v2/{+parent}/jobTriggers", 22701 // "request": { 22702 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 22703 // }, 22704 // "response": { 22705 // "$ref": "GooglePrivacyDlpV2JobTrigger" 22706 // }, 22707 // "scopes": [ 22708 // "https://www.googleapis.com/auth/cloud-platform" 22709 // ] 22710 // } 22711 22712} 22713 22714// method id "dlp.projects.locations.jobTriggers.delete": 22715 22716type ProjectsLocationsJobTriggersDeleteCall struct { 22717 s *Service 22718 name string 22719 urlParams_ gensupport.URLParams 22720 ctx_ context.Context 22721 header_ http.Header 22722} 22723 22724// Delete: Deletes a job trigger. See 22725// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 22726// more. 22727// 22728// - name: Resource name of the project and the triggeredJob, for 22729// example `projects/dlp-test-project/jobTriggers/53234423`. 22730func (r *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocationsJobTriggersDeleteCall { 22731 c := &ProjectsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22732 c.name = name 22733 return c 22734} 22735 22736// Fields allows partial responses to be retrieved. See 22737// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22738// for more information. 22739func (c *ProjectsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersDeleteCall { 22740 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22741 return c 22742} 22743 22744// Context sets the context to be used in this call's Do method. Any 22745// pending HTTP request will be aborted if the provided context is 22746// canceled. 22747func (c *ProjectsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersDeleteCall { 22748 c.ctx_ = ctx 22749 return c 22750} 22751 22752// Header returns an http.Header that can be modified by the caller to 22753// add HTTP headers to the request. 22754func (c *ProjectsLocationsJobTriggersDeleteCall) Header() http.Header { 22755 if c.header_ == nil { 22756 c.header_ = make(http.Header) 22757 } 22758 return c.header_ 22759} 22760 22761func (c *ProjectsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 22762 reqHeaders := make(http.Header) 22763 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 22764 for k, v := range c.header_ { 22765 reqHeaders[k] = v 22766 } 22767 reqHeaders.Set("User-Agent", c.s.userAgent()) 22768 var body io.Reader = nil 22769 c.urlParams_.Set("alt", alt) 22770 c.urlParams_.Set("prettyPrint", "false") 22771 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22772 urls += "?" + c.urlParams_.Encode() 22773 req, err := http.NewRequest("DELETE", urls, body) 22774 if err != nil { 22775 return nil, err 22776 } 22777 req.Header = reqHeaders 22778 googleapi.Expand(req.URL, map[string]string{ 22779 "name": c.name, 22780 }) 22781 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22782} 22783 22784// Do executes the "dlp.projects.locations.jobTriggers.delete" call. 22785// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 22786// non-2xx status code is an error. Response headers are in either 22787// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 22788// returned at all) in error.(*googleapi.Error).Header. Use 22789// googleapi.IsNotModified to check whether the returned error was 22790// because http.StatusNotModified was returned. 22791func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 22792 gensupport.SetOptions(c.urlParams_, opts...) 22793 res, err := c.doRequest("json") 22794 if res != nil && res.StatusCode == http.StatusNotModified { 22795 if res.Body != nil { 22796 res.Body.Close() 22797 } 22798 return nil, &googleapi.Error{ 22799 Code: res.StatusCode, 22800 Header: res.Header, 22801 } 22802 } 22803 if err != nil { 22804 return nil, err 22805 } 22806 defer googleapi.CloseBody(res) 22807 if err := googleapi.CheckResponse(res); err != nil { 22808 return nil, err 22809 } 22810 ret := &GoogleProtobufEmpty{ 22811 ServerResponse: googleapi.ServerResponse{ 22812 Header: res.Header, 22813 HTTPStatusCode: res.StatusCode, 22814 }, 22815 } 22816 target := &ret 22817 if err := gensupport.DecodeResponse(target, res); err != nil { 22818 return nil, err 22819 } 22820 return ret, nil 22821 // { 22822 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 22823 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 22824 // "httpMethod": "DELETE", 22825 // "id": "dlp.projects.locations.jobTriggers.delete", 22826 // "parameterOrder": [ 22827 // "name" 22828 // ], 22829 // "parameters": { 22830 // "name": { 22831 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 22832 // "location": "path", 22833 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 22834 // "required": true, 22835 // "type": "string" 22836 // } 22837 // }, 22838 // "path": "v2/{+name}", 22839 // "response": { 22840 // "$ref": "GoogleProtobufEmpty" 22841 // }, 22842 // "scopes": [ 22843 // "https://www.googleapis.com/auth/cloud-platform" 22844 // ] 22845 // } 22846 22847} 22848 22849// method id "dlp.projects.locations.jobTriggers.get": 22850 22851type ProjectsLocationsJobTriggersGetCall struct { 22852 s *Service 22853 name string 22854 urlParams_ gensupport.URLParams 22855 ifNoneMatch_ string 22856 ctx_ context.Context 22857 header_ http.Header 22858} 22859 22860// Get: Gets a job trigger. See 22861// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 22862// more. 22863// 22864// - name: Resource name of the project and the triggeredJob, for 22865// example `projects/dlp-test-project/jobTriggers/53234423`. 22866func (r *ProjectsLocationsJobTriggersService) Get(name string) *ProjectsLocationsJobTriggersGetCall { 22867 c := &ProjectsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22868 c.name = name 22869 return c 22870} 22871 22872// Fields allows partial responses to be retrieved. See 22873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22874// for more information. 22875func (c *ProjectsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersGetCall { 22876 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22877 return c 22878} 22879 22880// IfNoneMatch sets the optional parameter which makes the operation 22881// fail if the object's ETag matches the given value. This is useful for 22882// getting updates only after the object has changed since the last 22883// request. Use googleapi.IsNotModified to check whether the response 22884// error from Do is the result of In-None-Match. 22885func (c *ProjectsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersGetCall { 22886 c.ifNoneMatch_ = entityTag 22887 return c 22888} 22889 22890// Context sets the context to be used in this call's Do method. Any 22891// pending HTTP request will be aborted if the provided context is 22892// canceled. 22893func (c *ProjectsLocationsJobTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersGetCall { 22894 c.ctx_ = ctx 22895 return c 22896} 22897 22898// Header returns an http.Header that can be modified by the caller to 22899// add HTTP headers to the request. 22900func (c *ProjectsLocationsJobTriggersGetCall) Header() http.Header { 22901 if c.header_ == nil { 22902 c.header_ = make(http.Header) 22903 } 22904 return c.header_ 22905} 22906 22907func (c *ProjectsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 22908 reqHeaders := make(http.Header) 22909 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 22910 for k, v := range c.header_ { 22911 reqHeaders[k] = v 22912 } 22913 reqHeaders.Set("User-Agent", c.s.userAgent()) 22914 if c.ifNoneMatch_ != "" { 22915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22916 } 22917 var body io.Reader = nil 22918 c.urlParams_.Set("alt", alt) 22919 c.urlParams_.Set("prettyPrint", "false") 22920 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22921 urls += "?" + c.urlParams_.Encode() 22922 req, err := http.NewRequest("GET", urls, body) 22923 if err != nil { 22924 return nil, err 22925 } 22926 req.Header = reqHeaders 22927 googleapi.Expand(req.URL, map[string]string{ 22928 "name": c.name, 22929 }) 22930 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22931} 22932 22933// Do executes the "dlp.projects.locations.jobTriggers.get" call. 22934// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 22935// non-nil. Any non-2xx status code is an error. Response headers are in 22936// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 22937// response was returned at all) in error.(*googleapi.Error).Header. Use 22938// googleapi.IsNotModified to check whether the returned error was 22939// because http.StatusNotModified was returned. 22940func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 22941 gensupport.SetOptions(c.urlParams_, opts...) 22942 res, err := c.doRequest("json") 22943 if res != nil && res.StatusCode == http.StatusNotModified { 22944 if res.Body != nil { 22945 res.Body.Close() 22946 } 22947 return nil, &googleapi.Error{ 22948 Code: res.StatusCode, 22949 Header: res.Header, 22950 } 22951 } 22952 if err != nil { 22953 return nil, err 22954 } 22955 defer googleapi.CloseBody(res) 22956 if err := googleapi.CheckResponse(res); err != nil { 22957 return nil, err 22958 } 22959 ret := &GooglePrivacyDlpV2JobTrigger{ 22960 ServerResponse: googleapi.ServerResponse{ 22961 Header: res.Header, 22962 HTTPStatusCode: res.StatusCode, 22963 }, 22964 } 22965 target := &ret 22966 if err := gensupport.DecodeResponse(target, res); err != nil { 22967 return nil, err 22968 } 22969 return ret, nil 22970 // { 22971 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 22972 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 22973 // "httpMethod": "GET", 22974 // "id": "dlp.projects.locations.jobTriggers.get", 22975 // "parameterOrder": [ 22976 // "name" 22977 // ], 22978 // "parameters": { 22979 // "name": { 22980 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 22981 // "location": "path", 22982 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 22983 // "required": true, 22984 // "type": "string" 22985 // } 22986 // }, 22987 // "path": "v2/{+name}", 22988 // "response": { 22989 // "$ref": "GooglePrivacyDlpV2JobTrigger" 22990 // }, 22991 // "scopes": [ 22992 // "https://www.googleapis.com/auth/cloud-platform" 22993 // ] 22994 // } 22995 22996} 22997 22998// method id "dlp.projects.locations.jobTriggers.hybridInspect": 22999 23000type ProjectsLocationsJobTriggersHybridInspectCall struct { 23001 s *Service 23002 name string 23003 googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest 23004 urlParams_ gensupport.URLParams 23005 ctx_ context.Context 23006 header_ http.Header 23007} 23008 23009// HybridInspect: Inspect hybrid content and store findings to a 23010// trigger. The inspection will be processed asynchronously. To review 23011// the findings monitor the jobs within the trigger. 23012// 23013// - name: Resource name of the trigger to execute a hybrid inspect on, 23014// for example `projects/dlp-test-project/jobTriggers/53234423`. 23015func (r *ProjectsLocationsJobTriggersService) HybridInspect(name string, googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) *ProjectsLocationsJobTriggersHybridInspectCall { 23016 c := &ProjectsLocationsJobTriggersHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23017 c.name = name 23018 c.googleprivacydlpv2hybridinspectjobtriggerrequest = googleprivacydlpv2hybridinspectjobtriggerrequest 23019 return c 23020} 23021 23022// Fields allows partial responses to be retrieved. See 23023// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23024// for more information. 23025func (c *ProjectsLocationsJobTriggersHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersHybridInspectCall { 23026 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23027 return c 23028} 23029 23030// Context sets the context to be used in this call's Do method. Any 23031// pending HTTP request will be aborted if the provided context is 23032// canceled. 23033func (c *ProjectsLocationsJobTriggersHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersHybridInspectCall { 23034 c.ctx_ = ctx 23035 return c 23036} 23037 23038// Header returns an http.Header that can be modified by the caller to 23039// add HTTP headers to the request. 23040func (c *ProjectsLocationsJobTriggersHybridInspectCall) Header() http.Header { 23041 if c.header_ == nil { 23042 c.header_ = make(http.Header) 23043 } 23044 return c.header_ 23045} 23046 23047func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (*http.Response, error) { 23048 reqHeaders := make(http.Header) 23049 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23050 for k, v := range c.header_ { 23051 reqHeaders[k] = v 23052 } 23053 reqHeaders.Set("User-Agent", c.s.userAgent()) 23054 var body io.Reader = nil 23055 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectjobtriggerrequest) 23056 if err != nil { 23057 return nil, err 23058 } 23059 reqHeaders.Set("Content-Type", "application/json") 23060 c.urlParams_.Set("alt", alt) 23061 c.urlParams_.Set("prettyPrint", "false") 23062 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 23063 urls += "?" + c.urlParams_.Encode() 23064 req, err := http.NewRequest("POST", urls, body) 23065 if err != nil { 23066 return nil, err 23067 } 23068 req.Header = reqHeaders 23069 googleapi.Expand(req.URL, map[string]string{ 23070 "name": c.name, 23071 }) 23072 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23073} 23074 23075// Do executes the "dlp.projects.locations.jobTriggers.hybridInspect" call. 23076// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 23077// be non-nil. Any non-2xx status code is an error. Response headers are 23078// in either 23079// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 23080// a response was returned at all) in error.(*googleapi.Error).Header. 23081// Use googleapi.IsNotModified to check whether the returned error was 23082// because http.StatusNotModified was returned. 23083func (c *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 23084 gensupport.SetOptions(c.urlParams_, opts...) 23085 res, err := c.doRequest("json") 23086 if res != nil && res.StatusCode == http.StatusNotModified { 23087 if res.Body != nil { 23088 res.Body.Close() 23089 } 23090 return nil, &googleapi.Error{ 23091 Code: res.StatusCode, 23092 Header: res.Header, 23093 } 23094 } 23095 if err != nil { 23096 return nil, err 23097 } 23098 defer googleapi.CloseBody(res) 23099 if err := googleapi.CheckResponse(res); err != nil { 23100 return nil, err 23101 } 23102 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 23103 ServerResponse: googleapi.ServerResponse{ 23104 Header: res.Header, 23105 HTTPStatusCode: res.StatusCode, 23106 }, 23107 } 23108 target := &ret 23109 if err := gensupport.DecodeResponse(target, res); err != nil { 23110 return nil, err 23111 } 23112 return ret, nil 23113 // { 23114 // "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.", 23115 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:hybridInspect", 23116 // "httpMethod": "POST", 23117 // "id": "dlp.projects.locations.jobTriggers.hybridInspect", 23118 // "parameterOrder": [ 23119 // "name" 23120 // ], 23121 // "parameters": { 23122 // "name": { 23123 // "description": "Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`.", 23124 // "location": "path", 23125 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 23126 // "required": true, 23127 // "type": "string" 23128 // } 23129 // }, 23130 // "path": "v2/{+name}:hybridInspect", 23131 // "request": { 23132 // "$ref": "GooglePrivacyDlpV2HybridInspectJobTriggerRequest" 23133 // }, 23134 // "response": { 23135 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 23136 // }, 23137 // "scopes": [ 23138 // "https://www.googleapis.com/auth/cloud-platform" 23139 // ] 23140 // } 23141 23142} 23143 23144// method id "dlp.projects.locations.jobTriggers.list": 23145 23146type ProjectsLocationsJobTriggersListCall struct { 23147 s *Service 23148 parentid string 23149 urlParams_ gensupport.URLParams 23150 ifNoneMatch_ string 23151 ctx_ context.Context 23152 header_ http.Header 23153} 23154 23155// List: Lists job triggers. See 23156// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 23157// more. 23158// 23159// - parent: Parent resource name. The format of this value varies 23160// depending on whether you have specified a processing location 23161// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 23162// scope, location specified: 23163// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 23164// location specified (defaults to global): `projects/`PROJECT_ID The 23165// following example `parent` string specifies a parent project with 23166// the identifier `example-project`, and specifies the `europe-west3` 23167// location for processing data: 23168// parent=projects/example-project/locations/europe-west3. 23169func (r *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { 23170 c := &ProjectsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23171 c.parentid = parentid 23172 return c 23173} 23174 23175// Filter sets the optional parameter "filter": Allows filtering. 23176// Supported syntax: * Filter expressions are made up of one or more 23177// restrictions. * Restrictions can be combined by `AND` or `OR` logical 23178// operators. A sequence of restrictions implicitly uses `AND`. * A 23179// restriction has the form of `{field} {operator} {value}`. * Supported 23180// fields/values for inspect triggers: - `status` - 23181// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - 23182// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 23183// formatted timestamp, surrounded by quotation marks. Nanoseconds are 23184// ignored. - 'error_count' - Number of errors that have occurred while 23185// running. * The operator must be `=` or `!=` for status and 23186// inspected_storage. Examples: * inspected_storage = cloud_storage AND 23187// status = HEALTHY * inspected_storage = cloud_storage OR 23188// inspected_storage = bigquery * inspected_storage = cloud_storage AND 23189// (state = PAUSED OR state = HEALTHY) * last_run_time > 23190// \"2017-12-12T00:00:00+00:00\" The length of this field should be no 23191// more than 500 characters. 23192func (c *ProjectsLocationsJobTriggersListCall) Filter(filter string) *ProjectsLocationsJobTriggersListCall { 23193 c.urlParams_.Set("filter", filter) 23194 return c 23195} 23196 23197// LocationId sets the optional parameter "locationId": Deprecated. This 23198// field has no effect. 23199func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *ProjectsLocationsJobTriggersListCall { 23200 c.urlParams_.Set("locationId", locationId) 23201 return c 23202} 23203 23204// OrderBy sets the optional parameter "orderBy": Comma separated list 23205// of triggeredJob fields to order by, followed by `asc` or `desc` 23206// postfix. This list is case-insensitive, default sorting order is 23207// ascending, redundant space characters are insignificant. Example: 23208// `name asc,update_time, create_time desc` Supported fields are: - 23209// `create_time`: corresponds to time the JobTrigger was created. - 23210// `update_time`: corresponds to time the JobTrigger was last updated. - 23211// `last_run_time`: corresponds to the last time the JobTrigger ran. - 23212// `name`: corresponds to JobTrigger's name. - `display_name`: 23213// corresponds to JobTrigger's display name. - `status`: corresponds to 23214// JobTrigger's status. 23215func (c *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { 23216 c.urlParams_.Set("orderBy", orderBy) 23217 return c 23218} 23219 23220// PageSize sets the optional parameter "pageSize": Size of the page, 23221// can be limited by a server. 23222func (c *ProjectsLocationsJobTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsJobTriggersListCall { 23223 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 23224 return c 23225} 23226 23227// PageToken sets the optional parameter "pageToken": Page token to 23228// continue retrieval. Comes from previous call to ListJobTriggers. 23229// `order_by` field must not change for subsequent calls. 23230func (c *ProjectsLocationsJobTriggersListCall) PageToken(pageToken string) *ProjectsLocationsJobTriggersListCall { 23231 c.urlParams_.Set("pageToken", pageToken) 23232 return c 23233} 23234 23235// Type sets the optional parameter "type": The type of jobs. Will use 23236// `DlpJobType.INSPECT` if not set. 23237// 23238// Possible values: 23239// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. 23240// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 23241// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 23242func (c *ProjectsLocationsJobTriggersListCall) Type(type_ string) *ProjectsLocationsJobTriggersListCall { 23243 c.urlParams_.Set("type", type_) 23244 return c 23245} 23246 23247// Fields allows partial responses to be retrieved. See 23248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23249// for more information. 23250func (c *ProjectsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersListCall { 23251 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23252 return c 23253} 23254 23255// IfNoneMatch sets the optional parameter which makes the operation 23256// fail if the object's ETag matches the given value. This is useful for 23257// getting updates only after the object has changed since the last 23258// request. Use googleapi.IsNotModified to check whether the response 23259// error from Do is the result of In-None-Match. 23260func (c *ProjectsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersListCall { 23261 c.ifNoneMatch_ = entityTag 23262 return c 23263} 23264 23265// Context sets the context to be used in this call's Do method. Any 23266// pending HTTP request will be aborted if the provided context is 23267// canceled. 23268func (c *ProjectsLocationsJobTriggersListCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersListCall { 23269 c.ctx_ = ctx 23270 return c 23271} 23272 23273// Header returns an http.Header that can be modified by the caller to 23274// add HTTP headers to the request. 23275func (c *ProjectsLocationsJobTriggersListCall) Header() http.Header { 23276 if c.header_ == nil { 23277 c.header_ = make(http.Header) 23278 } 23279 return c.header_ 23280} 23281 23282func (c *ProjectsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 23283 reqHeaders := make(http.Header) 23284 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23285 for k, v := range c.header_ { 23286 reqHeaders[k] = v 23287 } 23288 reqHeaders.Set("User-Agent", c.s.userAgent()) 23289 if c.ifNoneMatch_ != "" { 23290 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23291 } 23292 var body io.Reader = nil 23293 c.urlParams_.Set("alt", alt) 23294 c.urlParams_.Set("prettyPrint", "false") 23295 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 23296 urls += "?" + c.urlParams_.Encode() 23297 req, err := http.NewRequest("GET", urls, body) 23298 if err != nil { 23299 return nil, err 23300 } 23301 req.Header = reqHeaders 23302 googleapi.Expand(req.URL, map[string]string{ 23303 "parent": c.parentid, 23304 }) 23305 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23306} 23307 23308// Do executes the "dlp.projects.locations.jobTriggers.list" call. 23309// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 23310// will be non-nil. Any non-2xx status code is an error. Response 23311// headers are in either 23312// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 23313// (if a response was returned at all) in 23314// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 23315// whether the returned error was because http.StatusNotModified was 23316// returned. 23317func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 23318 gensupport.SetOptions(c.urlParams_, opts...) 23319 res, err := c.doRequest("json") 23320 if res != nil && res.StatusCode == http.StatusNotModified { 23321 if res.Body != nil { 23322 res.Body.Close() 23323 } 23324 return nil, &googleapi.Error{ 23325 Code: res.StatusCode, 23326 Header: res.Header, 23327 } 23328 } 23329 if err != nil { 23330 return nil, err 23331 } 23332 defer googleapi.CloseBody(res) 23333 if err := googleapi.CheckResponse(res); err != nil { 23334 return nil, err 23335 } 23336 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 23337 ServerResponse: googleapi.ServerResponse{ 23338 Header: res.Header, 23339 HTTPStatusCode: res.StatusCode, 23340 }, 23341 } 23342 target := &ret 23343 if err := gensupport.DecodeResponse(target, res); err != nil { 23344 return nil, err 23345 } 23346 return ret, nil 23347 // { 23348 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 23349 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 23350 // "httpMethod": "GET", 23351 // "id": "dlp.projects.locations.jobTriggers.list", 23352 // "parameterOrder": [ 23353 // "parent" 23354 // ], 23355 // "parameters": { 23356 // "filter": { 23357 // "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 triggers: - `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.", 23358 // "location": "query", 23359 // "type": "string" 23360 // }, 23361 // "locationId": { 23362 // "description": "Deprecated. This field has no effect.", 23363 // "location": "query", 23364 // "type": "string" 23365 // }, 23366 // "orderBy": { 23367 // "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.", 23368 // "location": "query", 23369 // "type": "string" 23370 // }, 23371 // "pageSize": { 23372 // "description": "Size of the page, can be limited by a server.", 23373 // "format": "int32", 23374 // "location": "query", 23375 // "type": "integer" 23376 // }, 23377 // "pageToken": { 23378 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 23379 // "location": "query", 23380 // "type": "string" 23381 // }, 23382 // "parent": { 23383 // "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", 23384 // "location": "path", 23385 // "pattern": "^projects/[^/]+/locations/[^/]+$", 23386 // "required": true, 23387 // "type": "string" 23388 // }, 23389 // "type": { 23390 // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", 23391 // "enum": [ 23392 // "DLP_JOB_TYPE_UNSPECIFIED", 23393 // "INSPECT_JOB", 23394 // "RISK_ANALYSIS_JOB" 23395 // ], 23396 // "enumDescriptions": [ 23397 // "Defaults to INSPECT_JOB.", 23398 // "The job inspected Google Cloud for sensitive data.", 23399 // "The job executed a Risk Analysis computation." 23400 // ], 23401 // "location": "query", 23402 // "type": "string" 23403 // } 23404 // }, 23405 // "path": "v2/{+parent}/jobTriggers", 23406 // "response": { 23407 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 23408 // }, 23409 // "scopes": [ 23410 // "https://www.googleapis.com/auth/cloud-platform" 23411 // ] 23412 // } 23413 23414} 23415 23416// Pages invokes f for each page of results. 23417// A non-nil error returned from f will halt the iteration. 23418// The provided context supersedes any context provided to the Context method. 23419func (c *ProjectsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 23420 c.ctx_ = ctx 23421 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23422 for { 23423 x, err := c.Do() 23424 if err != nil { 23425 return err 23426 } 23427 if err := f(x); err != nil { 23428 return err 23429 } 23430 if x.NextPageToken == "" { 23431 return nil 23432 } 23433 c.PageToken(x.NextPageToken) 23434 } 23435} 23436 23437// method id "dlp.projects.locations.jobTriggers.patch": 23438 23439type ProjectsLocationsJobTriggersPatchCall struct { 23440 s *Service 23441 name string 23442 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 23443 urlParams_ gensupport.URLParams 23444 ctx_ context.Context 23445 header_ http.Header 23446} 23447 23448// Patch: Updates a job trigger. See 23449// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 23450// more. 23451// 23452// - name: Resource name of the project and the triggeredJob, for 23453// example `projects/dlp-test-project/jobTriggers/53234423`. 23454func (r *ProjectsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsLocationsJobTriggersPatchCall { 23455 c := &ProjectsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23456 c.name = name 23457 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 23458 return c 23459} 23460 23461// Fields allows partial responses to be retrieved. See 23462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23463// for more information. 23464func (c *ProjectsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersPatchCall { 23465 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23466 return c 23467} 23468 23469// Context sets the context to be used in this call's Do method. Any 23470// pending HTTP request will be aborted if the provided context is 23471// canceled. 23472func (c *ProjectsLocationsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersPatchCall { 23473 c.ctx_ = ctx 23474 return c 23475} 23476 23477// Header returns an http.Header that can be modified by the caller to 23478// add HTTP headers to the request. 23479func (c *ProjectsLocationsJobTriggersPatchCall) Header() http.Header { 23480 if c.header_ == nil { 23481 c.header_ = make(http.Header) 23482 } 23483 return c.header_ 23484} 23485 23486func (c *ProjectsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 23487 reqHeaders := make(http.Header) 23488 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23489 for k, v := range c.header_ { 23490 reqHeaders[k] = v 23491 } 23492 reqHeaders.Set("User-Agent", c.s.userAgent()) 23493 var body io.Reader = nil 23494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 23495 if err != nil { 23496 return nil, err 23497 } 23498 reqHeaders.Set("Content-Type", "application/json") 23499 c.urlParams_.Set("alt", alt) 23500 c.urlParams_.Set("prettyPrint", "false") 23501 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 23502 urls += "?" + c.urlParams_.Encode() 23503 req, err := http.NewRequest("PATCH", urls, body) 23504 if err != nil { 23505 return nil, err 23506 } 23507 req.Header = reqHeaders 23508 googleapi.Expand(req.URL, map[string]string{ 23509 "name": c.name, 23510 }) 23511 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23512} 23513 23514// Do executes the "dlp.projects.locations.jobTriggers.patch" call. 23515// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 23516// non-nil. Any non-2xx status code is an error. Response headers are in 23517// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 23518// response was returned at all) in error.(*googleapi.Error).Header. Use 23519// googleapi.IsNotModified to check whether the returned error was 23520// because http.StatusNotModified was returned. 23521func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 23522 gensupport.SetOptions(c.urlParams_, opts...) 23523 res, err := c.doRequest("json") 23524 if res != nil && res.StatusCode == http.StatusNotModified { 23525 if res.Body != nil { 23526 res.Body.Close() 23527 } 23528 return nil, &googleapi.Error{ 23529 Code: res.StatusCode, 23530 Header: res.Header, 23531 } 23532 } 23533 if err != nil { 23534 return nil, err 23535 } 23536 defer googleapi.CloseBody(res) 23537 if err := googleapi.CheckResponse(res); err != nil { 23538 return nil, err 23539 } 23540 ret := &GooglePrivacyDlpV2JobTrigger{ 23541 ServerResponse: googleapi.ServerResponse{ 23542 Header: res.Header, 23543 HTTPStatusCode: res.StatusCode, 23544 }, 23545 } 23546 target := &ret 23547 if err := gensupport.DecodeResponse(target, res); err != nil { 23548 return nil, err 23549 } 23550 return ret, nil 23551 // { 23552 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 23553 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 23554 // "httpMethod": "PATCH", 23555 // "id": "dlp.projects.locations.jobTriggers.patch", 23556 // "parameterOrder": [ 23557 // "name" 23558 // ], 23559 // "parameters": { 23560 // "name": { 23561 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 23562 // "location": "path", 23563 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 23564 // "required": true, 23565 // "type": "string" 23566 // } 23567 // }, 23568 // "path": "v2/{+name}", 23569 // "request": { 23570 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 23571 // }, 23572 // "response": { 23573 // "$ref": "GooglePrivacyDlpV2JobTrigger" 23574 // }, 23575 // "scopes": [ 23576 // "https://www.googleapis.com/auth/cloud-platform" 23577 // ] 23578 // } 23579 23580} 23581 23582// method id "dlp.projects.locations.storedInfoTypes.create": 23583 23584type ProjectsLocationsStoredInfoTypesCreateCall struct { 23585 s *Service 23586 parentid string 23587 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 23588 urlParams_ gensupport.URLParams 23589 ctx_ context.Context 23590 header_ http.Header 23591} 23592 23593// Create: Creates a pre-built stored infoType to be used for 23594// inspection. See 23595// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 23596// more. 23597// 23598// - parent: Parent resource name. The format of this value varies 23599// depending on the scope of the request (project or organization) and 23600// whether you have specified a processing location 23601// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 23602// scope, location specified: 23603// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 23604// location specified (defaults to global): `projects/`PROJECT_ID + 23605// Organizations scope, location specified: 23606// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 23607// scope, no location specified (defaults to global): 23608// `organizations/`ORG_ID The following example `parent` string 23609// specifies a parent project with the identifier `example-project`, 23610// and specifies the `europe-west3` location for processing data: 23611// parent=projects/example-project/locations/europe-west3. 23612func (r *ProjectsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesCreateCall { 23613 c := &ProjectsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23614 c.parentid = parentid 23615 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 23616 return c 23617} 23618 23619// Fields allows partial responses to be retrieved. See 23620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23621// for more information. 23622func (c *ProjectsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesCreateCall { 23623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23624 return c 23625} 23626 23627// Context sets the context to be used in this call's Do method. Any 23628// pending HTTP request will be aborted if the provided context is 23629// canceled. 23630func (c *ProjectsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesCreateCall { 23631 c.ctx_ = ctx 23632 return c 23633} 23634 23635// Header returns an http.Header that can be modified by the caller to 23636// add HTTP headers to the request. 23637func (c *ProjectsLocationsStoredInfoTypesCreateCall) Header() http.Header { 23638 if c.header_ == nil { 23639 c.header_ = make(http.Header) 23640 } 23641 return c.header_ 23642} 23643 23644func (c *ProjectsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 23645 reqHeaders := make(http.Header) 23646 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23647 for k, v := range c.header_ { 23648 reqHeaders[k] = v 23649 } 23650 reqHeaders.Set("User-Agent", c.s.userAgent()) 23651 var body io.Reader = nil 23652 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 23653 if err != nil { 23654 return nil, err 23655 } 23656 reqHeaders.Set("Content-Type", "application/json") 23657 c.urlParams_.Set("alt", alt) 23658 c.urlParams_.Set("prettyPrint", "false") 23659 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 23660 urls += "?" + c.urlParams_.Encode() 23661 req, err := http.NewRequest("POST", urls, body) 23662 if err != nil { 23663 return nil, err 23664 } 23665 req.Header = reqHeaders 23666 googleapi.Expand(req.URL, map[string]string{ 23667 "parent": c.parentid, 23668 }) 23669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23670} 23671 23672// Do executes the "dlp.projects.locations.storedInfoTypes.create" call. 23673// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 23674// non-nil. Any non-2xx status code is an error. Response headers are in 23675// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 23676// a response was returned at all) in error.(*googleapi.Error).Header. 23677// Use googleapi.IsNotModified to check whether the returned error was 23678// because http.StatusNotModified was returned. 23679func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 23680 gensupport.SetOptions(c.urlParams_, opts...) 23681 res, err := c.doRequest("json") 23682 if res != nil && res.StatusCode == http.StatusNotModified { 23683 if res.Body != nil { 23684 res.Body.Close() 23685 } 23686 return nil, &googleapi.Error{ 23687 Code: res.StatusCode, 23688 Header: res.Header, 23689 } 23690 } 23691 if err != nil { 23692 return nil, err 23693 } 23694 defer googleapi.CloseBody(res) 23695 if err := googleapi.CheckResponse(res); err != nil { 23696 return nil, err 23697 } 23698 ret := &GooglePrivacyDlpV2StoredInfoType{ 23699 ServerResponse: googleapi.ServerResponse{ 23700 Header: res.Header, 23701 HTTPStatusCode: res.StatusCode, 23702 }, 23703 } 23704 target := &ret 23705 if err := gensupport.DecodeResponse(target, res); err != nil { 23706 return nil, err 23707 } 23708 return ret, nil 23709 // { 23710 // "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.", 23711 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 23712 // "httpMethod": "POST", 23713 // "id": "dlp.projects.locations.storedInfoTypes.create", 23714 // "parameterOrder": [ 23715 // "parent" 23716 // ], 23717 // "parameters": { 23718 // "parent": { 23719 // "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", 23720 // "location": "path", 23721 // "pattern": "^projects/[^/]+/locations/[^/]+$", 23722 // "required": true, 23723 // "type": "string" 23724 // } 23725 // }, 23726 // "path": "v2/{+parent}/storedInfoTypes", 23727 // "request": { 23728 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 23729 // }, 23730 // "response": { 23731 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 23732 // }, 23733 // "scopes": [ 23734 // "https://www.googleapis.com/auth/cloud-platform" 23735 // ] 23736 // } 23737 23738} 23739 23740// method id "dlp.projects.locations.storedInfoTypes.delete": 23741 23742type ProjectsLocationsStoredInfoTypesDeleteCall struct { 23743 s *Service 23744 name string 23745 urlParams_ gensupport.URLParams 23746 ctx_ context.Context 23747 header_ http.Header 23748} 23749 23750// Delete: Deletes a stored infoType. See 23751// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 23752// more. 23753// 23754// - name: Resource name of the organization and storedInfoType to be 23755// deleted, for example 23756// `organizations/433245324/storedInfoTypes/432452342` or 23757// projects/project-id/storedInfoTypes/432452342. 23758func (r *ProjectsLocationsStoredInfoTypesService) Delete(name string) *ProjectsLocationsStoredInfoTypesDeleteCall { 23759 c := &ProjectsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23760 c.name = name 23761 return c 23762} 23763 23764// Fields allows partial responses to be retrieved. See 23765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23766// for more information. 23767func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesDeleteCall { 23768 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23769 return c 23770} 23771 23772// Context sets the context to be used in this call's Do method. Any 23773// pending HTTP request will be aborted if the provided context is 23774// canceled. 23775func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesDeleteCall { 23776 c.ctx_ = ctx 23777 return c 23778} 23779 23780// Header returns an http.Header that can be modified by the caller to 23781// add HTTP headers to the request. 23782func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 23783 if c.header_ == nil { 23784 c.header_ = make(http.Header) 23785 } 23786 return c.header_ 23787} 23788 23789func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 23790 reqHeaders := make(http.Header) 23791 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23792 for k, v := range c.header_ { 23793 reqHeaders[k] = v 23794 } 23795 reqHeaders.Set("User-Agent", c.s.userAgent()) 23796 var body io.Reader = nil 23797 c.urlParams_.Set("alt", alt) 23798 c.urlParams_.Set("prettyPrint", "false") 23799 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 23800 urls += "?" + c.urlParams_.Encode() 23801 req, err := http.NewRequest("DELETE", urls, body) 23802 if err != nil { 23803 return nil, err 23804 } 23805 req.Header = reqHeaders 23806 googleapi.Expand(req.URL, map[string]string{ 23807 "name": c.name, 23808 }) 23809 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23810} 23811 23812// Do executes the "dlp.projects.locations.storedInfoTypes.delete" call. 23813// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 23814// non-2xx status code is an error. Response headers are in either 23815// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 23816// returned at all) in error.(*googleapi.Error).Header. Use 23817// googleapi.IsNotModified to check whether the returned error was 23818// because http.StatusNotModified was returned. 23819func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 23820 gensupport.SetOptions(c.urlParams_, opts...) 23821 res, err := c.doRequest("json") 23822 if res != nil && res.StatusCode == http.StatusNotModified { 23823 if res.Body != nil { 23824 res.Body.Close() 23825 } 23826 return nil, &googleapi.Error{ 23827 Code: res.StatusCode, 23828 Header: res.Header, 23829 } 23830 } 23831 if err != nil { 23832 return nil, err 23833 } 23834 defer googleapi.CloseBody(res) 23835 if err := googleapi.CheckResponse(res); err != nil { 23836 return nil, err 23837 } 23838 ret := &GoogleProtobufEmpty{ 23839 ServerResponse: googleapi.ServerResponse{ 23840 Header: res.Header, 23841 HTTPStatusCode: res.StatusCode, 23842 }, 23843 } 23844 target := &ret 23845 if err := gensupport.DecodeResponse(target, res); err != nil { 23846 return nil, err 23847 } 23848 return ret, nil 23849 // { 23850 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 23851 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 23852 // "httpMethod": "DELETE", 23853 // "id": "dlp.projects.locations.storedInfoTypes.delete", 23854 // "parameterOrder": [ 23855 // "name" 23856 // ], 23857 // "parameters": { 23858 // "name": { 23859 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 23860 // "location": "path", 23861 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 23862 // "required": true, 23863 // "type": "string" 23864 // } 23865 // }, 23866 // "path": "v2/{+name}", 23867 // "response": { 23868 // "$ref": "GoogleProtobufEmpty" 23869 // }, 23870 // "scopes": [ 23871 // "https://www.googleapis.com/auth/cloud-platform" 23872 // ] 23873 // } 23874 23875} 23876 23877// method id "dlp.projects.locations.storedInfoTypes.get": 23878 23879type ProjectsLocationsStoredInfoTypesGetCall struct { 23880 s *Service 23881 name string 23882 urlParams_ gensupport.URLParams 23883 ifNoneMatch_ string 23884 ctx_ context.Context 23885 header_ http.Header 23886} 23887 23888// Get: Gets a stored infoType. See 23889// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 23890// more. 23891// 23892// - name: Resource name of the organization and storedInfoType to be 23893// read, for example 23894// `organizations/433245324/storedInfoTypes/432452342` or 23895// projects/project-id/storedInfoTypes/432452342. 23896func (r *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLocationsStoredInfoTypesGetCall { 23897 c := &ProjectsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23898 c.name = name 23899 return c 23900} 23901 23902// Fields allows partial responses to be retrieved. See 23903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23904// for more information. 23905func (c *ProjectsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesGetCall { 23906 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23907 return c 23908} 23909 23910// IfNoneMatch sets the optional parameter which makes the operation 23911// fail if the object's ETag matches the given value. This is useful for 23912// getting updates only after the object has changed since the last 23913// request. Use googleapi.IsNotModified to check whether the response 23914// error from Do is the result of In-None-Match. 23915func (c *ProjectsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesGetCall { 23916 c.ifNoneMatch_ = entityTag 23917 return c 23918} 23919 23920// Context sets the context to be used in this call's Do method. Any 23921// pending HTTP request will be aborted if the provided context is 23922// canceled. 23923func (c *ProjectsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesGetCall { 23924 c.ctx_ = ctx 23925 return c 23926} 23927 23928// Header returns an http.Header that can be modified by the caller to 23929// add HTTP headers to the request. 23930func (c *ProjectsLocationsStoredInfoTypesGetCall) Header() http.Header { 23931 if c.header_ == nil { 23932 c.header_ = make(http.Header) 23933 } 23934 return c.header_ 23935} 23936 23937func (c *ProjectsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 23938 reqHeaders := make(http.Header) 23939 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 23940 for k, v := range c.header_ { 23941 reqHeaders[k] = v 23942 } 23943 reqHeaders.Set("User-Agent", c.s.userAgent()) 23944 if c.ifNoneMatch_ != "" { 23945 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23946 } 23947 var body io.Reader = nil 23948 c.urlParams_.Set("alt", alt) 23949 c.urlParams_.Set("prettyPrint", "false") 23950 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 23951 urls += "?" + c.urlParams_.Encode() 23952 req, err := http.NewRequest("GET", urls, body) 23953 if err != nil { 23954 return nil, err 23955 } 23956 req.Header = reqHeaders 23957 googleapi.Expand(req.URL, map[string]string{ 23958 "name": c.name, 23959 }) 23960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23961} 23962 23963// Do executes the "dlp.projects.locations.storedInfoTypes.get" call. 23964// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 23965// non-nil. Any non-2xx status code is an error. Response headers are in 23966// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 23967// a response was returned at all) in error.(*googleapi.Error).Header. 23968// Use googleapi.IsNotModified to check whether the returned error was 23969// because http.StatusNotModified was returned. 23970func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 23971 gensupport.SetOptions(c.urlParams_, opts...) 23972 res, err := c.doRequest("json") 23973 if res != nil && res.StatusCode == http.StatusNotModified { 23974 if res.Body != nil { 23975 res.Body.Close() 23976 } 23977 return nil, &googleapi.Error{ 23978 Code: res.StatusCode, 23979 Header: res.Header, 23980 } 23981 } 23982 if err != nil { 23983 return nil, err 23984 } 23985 defer googleapi.CloseBody(res) 23986 if err := googleapi.CheckResponse(res); err != nil { 23987 return nil, err 23988 } 23989 ret := &GooglePrivacyDlpV2StoredInfoType{ 23990 ServerResponse: googleapi.ServerResponse{ 23991 Header: res.Header, 23992 HTTPStatusCode: res.StatusCode, 23993 }, 23994 } 23995 target := &ret 23996 if err := gensupport.DecodeResponse(target, res); err != nil { 23997 return nil, err 23998 } 23999 return ret, nil 24000 // { 24001 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 24002 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 24003 // "httpMethod": "GET", 24004 // "id": "dlp.projects.locations.storedInfoTypes.get", 24005 // "parameterOrder": [ 24006 // "name" 24007 // ], 24008 // "parameters": { 24009 // "name": { 24010 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 24011 // "location": "path", 24012 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 24013 // "required": true, 24014 // "type": "string" 24015 // } 24016 // }, 24017 // "path": "v2/{+name}", 24018 // "response": { 24019 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 24020 // }, 24021 // "scopes": [ 24022 // "https://www.googleapis.com/auth/cloud-platform" 24023 // ] 24024 // } 24025 24026} 24027 24028// method id "dlp.projects.locations.storedInfoTypes.list": 24029 24030type ProjectsLocationsStoredInfoTypesListCall struct { 24031 s *Service 24032 parentid string 24033 urlParams_ gensupport.URLParams 24034 ifNoneMatch_ string 24035 ctx_ context.Context 24036 header_ http.Header 24037} 24038 24039// List: Lists stored infoTypes. See 24040// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24041// more. 24042// 24043// - parent: Parent resource name. The format of this value varies 24044// depending on the scope of the request (project or organization) and 24045// whether you have specified a processing location 24046// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 24047// scope, location specified: 24048// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 24049// location specified (defaults to global): `projects/`PROJECT_ID + 24050// Organizations scope, location specified: 24051// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 24052// scope, no location specified (defaults to global): 24053// `organizations/`ORG_ID The following example `parent` string 24054// specifies a parent project with the identifier `example-project`, 24055// and specifies the `europe-west3` location for processing data: 24056// parent=projects/example-project/locations/europe-west3. 24057func (r *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { 24058 c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24059 c.parentid = parentid 24060 return c 24061} 24062 24063// LocationId sets the optional parameter "locationId": Deprecated. This 24064// field has no effect. 24065func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsLocationsStoredInfoTypesListCall { 24066 c.urlParams_.Set("locationId", locationId) 24067 return c 24068} 24069 24070// OrderBy sets the optional parameter "orderBy": Comma separated list 24071// of fields to order by, followed by `asc` or `desc` postfix. This list 24072// is case-insensitive, default sorting order is ascending, redundant 24073// space characters are insignificant. Example: `name asc, display_name, 24074// create_time desc` Supported fields are: - `create_time`: corresponds 24075// to time the most recent version of the resource was created. - 24076// `state`: corresponds to the state of the resource. - `name`: 24077// corresponds to resource name. - `display_name`: corresponds to info 24078// type's display name. 24079func (c *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsLocationsStoredInfoTypesListCall { 24080 c.urlParams_.Set("orderBy", orderBy) 24081 return c 24082} 24083 24084// PageSize sets the optional parameter "pageSize": Size of the page, 24085// can be limited by server. If zero server returns a page of max size 24086// 100. 24087func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { 24088 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 24089 return c 24090} 24091 24092// PageToken sets the optional parameter "pageToken": Page token to 24093// continue retrieval. Comes from previous call to 24094// `ListStoredInfoTypes`. 24095func (c *ProjectsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsLocationsStoredInfoTypesListCall { 24096 c.urlParams_.Set("pageToken", pageToken) 24097 return c 24098} 24099 24100// Fields allows partial responses to be retrieved. See 24101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24102// for more information. 24103func (c *ProjectsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesListCall { 24104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24105 return c 24106} 24107 24108// IfNoneMatch sets the optional parameter which makes the operation 24109// fail if the object's ETag matches the given value. This is useful for 24110// getting updates only after the object has changed since the last 24111// request. Use googleapi.IsNotModified to check whether the response 24112// error from Do is the result of In-None-Match. 24113func (c *ProjectsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesListCall { 24114 c.ifNoneMatch_ = entityTag 24115 return c 24116} 24117 24118// Context sets the context to be used in this call's Do method. Any 24119// pending HTTP request will be aborted if the provided context is 24120// canceled. 24121func (c *ProjectsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesListCall { 24122 c.ctx_ = ctx 24123 return c 24124} 24125 24126// Header returns an http.Header that can be modified by the caller to 24127// add HTTP headers to the request. 24128func (c *ProjectsLocationsStoredInfoTypesListCall) Header() http.Header { 24129 if c.header_ == nil { 24130 c.header_ = make(http.Header) 24131 } 24132 return c.header_ 24133} 24134 24135func (c *ProjectsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 24136 reqHeaders := make(http.Header) 24137 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24138 for k, v := range c.header_ { 24139 reqHeaders[k] = v 24140 } 24141 reqHeaders.Set("User-Agent", c.s.userAgent()) 24142 if c.ifNoneMatch_ != "" { 24143 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24144 } 24145 var body io.Reader = nil 24146 c.urlParams_.Set("alt", alt) 24147 c.urlParams_.Set("prettyPrint", "false") 24148 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 24149 urls += "?" + c.urlParams_.Encode() 24150 req, err := http.NewRequest("GET", urls, body) 24151 if err != nil { 24152 return nil, err 24153 } 24154 req.Header = reqHeaders 24155 googleapi.Expand(req.URL, map[string]string{ 24156 "parent": c.parentid, 24157 }) 24158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24159} 24160 24161// Do executes the "dlp.projects.locations.storedInfoTypes.list" call. 24162// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 24163// error will be non-nil. Any non-2xx status code is an error. Response 24164// headers are in either 24165// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 24166// or (if a response was returned at all) in 24167// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 24168// whether the returned error was because http.StatusNotModified was 24169// returned. 24170func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 24171 gensupport.SetOptions(c.urlParams_, opts...) 24172 res, err := c.doRequest("json") 24173 if res != nil && res.StatusCode == http.StatusNotModified { 24174 if res.Body != nil { 24175 res.Body.Close() 24176 } 24177 return nil, &googleapi.Error{ 24178 Code: res.StatusCode, 24179 Header: res.Header, 24180 } 24181 } 24182 if err != nil { 24183 return nil, err 24184 } 24185 defer googleapi.CloseBody(res) 24186 if err := googleapi.CheckResponse(res); err != nil { 24187 return nil, err 24188 } 24189 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 24190 ServerResponse: googleapi.ServerResponse{ 24191 Header: res.Header, 24192 HTTPStatusCode: res.StatusCode, 24193 }, 24194 } 24195 target := &ret 24196 if err := gensupport.DecodeResponse(target, res); err != nil { 24197 return nil, err 24198 } 24199 return ret, nil 24200 // { 24201 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 24202 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 24203 // "httpMethod": "GET", 24204 // "id": "dlp.projects.locations.storedInfoTypes.list", 24205 // "parameterOrder": [ 24206 // "parent" 24207 // ], 24208 // "parameters": { 24209 // "locationId": { 24210 // "description": "Deprecated. This field has no effect.", 24211 // "location": "query", 24212 // "type": "string" 24213 // }, 24214 // "orderBy": { 24215 // "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.", 24216 // "location": "query", 24217 // "type": "string" 24218 // }, 24219 // "pageSize": { 24220 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 24221 // "format": "int32", 24222 // "location": "query", 24223 // "type": "integer" 24224 // }, 24225 // "pageToken": { 24226 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 24227 // "location": "query", 24228 // "type": "string" 24229 // }, 24230 // "parent": { 24231 // "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", 24232 // "location": "path", 24233 // "pattern": "^projects/[^/]+/locations/[^/]+$", 24234 // "required": true, 24235 // "type": "string" 24236 // } 24237 // }, 24238 // "path": "v2/{+parent}/storedInfoTypes", 24239 // "response": { 24240 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 24241 // }, 24242 // "scopes": [ 24243 // "https://www.googleapis.com/auth/cloud-platform" 24244 // ] 24245 // } 24246 24247} 24248 24249// Pages invokes f for each page of results. 24250// A non-nil error returned from f will halt the iteration. 24251// The provided context supersedes any context provided to the Context method. 24252func (c *ProjectsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 24253 c.ctx_ = ctx 24254 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24255 for { 24256 x, err := c.Do() 24257 if err != nil { 24258 return err 24259 } 24260 if err := f(x); err != nil { 24261 return err 24262 } 24263 if x.NextPageToken == "" { 24264 return nil 24265 } 24266 c.PageToken(x.NextPageToken) 24267 } 24268} 24269 24270// method id "dlp.projects.locations.storedInfoTypes.patch": 24271 24272type ProjectsLocationsStoredInfoTypesPatchCall struct { 24273 s *Service 24274 name string 24275 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 24276 urlParams_ gensupport.URLParams 24277 ctx_ context.Context 24278 header_ http.Header 24279} 24280 24281// Patch: Updates the stored infoType by creating a new version. The 24282// existing version will continue to be used until the new version is 24283// ready. See 24284// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24285// more. 24286// 24287// - name: Resource name of organization and storedInfoType to be 24288// updated, for example 24289// `organizations/433245324/storedInfoTypes/432452342` or 24290// projects/project-id/storedInfoTypes/432452342. 24291func (r *ProjectsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesPatchCall { 24292 c := &ProjectsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24293 c.name = name 24294 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 24295 return c 24296} 24297 24298// Fields allows partial responses to be retrieved. See 24299// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24300// for more information. 24301func (c *ProjectsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesPatchCall { 24302 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24303 return c 24304} 24305 24306// Context sets the context to be used in this call's Do method. Any 24307// pending HTTP request will be aborted if the provided context is 24308// canceled. 24309func (c *ProjectsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesPatchCall { 24310 c.ctx_ = ctx 24311 return c 24312} 24313 24314// Header returns an http.Header that can be modified by the caller to 24315// add HTTP headers to the request. 24316func (c *ProjectsLocationsStoredInfoTypesPatchCall) Header() http.Header { 24317 if c.header_ == nil { 24318 c.header_ = make(http.Header) 24319 } 24320 return c.header_ 24321} 24322 24323func (c *ProjectsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 24324 reqHeaders := make(http.Header) 24325 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24326 for k, v := range c.header_ { 24327 reqHeaders[k] = v 24328 } 24329 reqHeaders.Set("User-Agent", c.s.userAgent()) 24330 var body io.Reader = nil 24331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 24332 if err != nil { 24333 return nil, err 24334 } 24335 reqHeaders.Set("Content-Type", "application/json") 24336 c.urlParams_.Set("alt", alt) 24337 c.urlParams_.Set("prettyPrint", "false") 24338 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 24339 urls += "?" + c.urlParams_.Encode() 24340 req, err := http.NewRequest("PATCH", urls, body) 24341 if err != nil { 24342 return nil, err 24343 } 24344 req.Header = reqHeaders 24345 googleapi.Expand(req.URL, map[string]string{ 24346 "name": c.name, 24347 }) 24348 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24349} 24350 24351// Do executes the "dlp.projects.locations.storedInfoTypes.patch" call. 24352// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 24353// non-nil. Any non-2xx status code is an error. Response headers are in 24354// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 24355// a response was returned at all) in error.(*googleapi.Error).Header. 24356// Use googleapi.IsNotModified to check whether the returned error was 24357// because http.StatusNotModified was returned. 24358func (c *ProjectsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 24359 gensupport.SetOptions(c.urlParams_, opts...) 24360 res, err := c.doRequest("json") 24361 if res != nil && res.StatusCode == http.StatusNotModified { 24362 if res.Body != nil { 24363 res.Body.Close() 24364 } 24365 return nil, &googleapi.Error{ 24366 Code: res.StatusCode, 24367 Header: res.Header, 24368 } 24369 } 24370 if err != nil { 24371 return nil, err 24372 } 24373 defer googleapi.CloseBody(res) 24374 if err := googleapi.CheckResponse(res); err != nil { 24375 return nil, err 24376 } 24377 ret := &GooglePrivacyDlpV2StoredInfoType{ 24378 ServerResponse: googleapi.ServerResponse{ 24379 Header: res.Header, 24380 HTTPStatusCode: res.StatusCode, 24381 }, 24382 } 24383 target := &ret 24384 if err := gensupport.DecodeResponse(target, res); err != nil { 24385 return nil, err 24386 } 24387 return ret, nil 24388 // { 24389 // "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.", 24390 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 24391 // "httpMethod": "PATCH", 24392 // "id": "dlp.projects.locations.storedInfoTypes.patch", 24393 // "parameterOrder": [ 24394 // "name" 24395 // ], 24396 // "parameters": { 24397 // "name": { 24398 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 24399 // "location": "path", 24400 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 24401 // "required": true, 24402 // "type": "string" 24403 // } 24404 // }, 24405 // "path": "v2/{+name}", 24406 // "request": { 24407 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 24408 // }, 24409 // "response": { 24410 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 24411 // }, 24412 // "scopes": [ 24413 // "https://www.googleapis.com/auth/cloud-platform" 24414 // ] 24415 // } 24416 24417} 24418 24419// method id "dlp.projects.storedInfoTypes.create": 24420 24421type ProjectsStoredInfoTypesCreateCall struct { 24422 s *Service 24423 parentid string 24424 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 24425 urlParams_ gensupport.URLParams 24426 ctx_ context.Context 24427 header_ http.Header 24428} 24429 24430// Create: Creates a pre-built stored infoType to be used for 24431// inspection. See 24432// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24433// more. 24434// 24435// - parent: Parent resource name. The format of this value varies 24436// depending on the scope of the request (project or organization) and 24437// whether you have specified a processing location 24438// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 24439// scope, location specified: 24440// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 24441// location specified (defaults to global): `projects/`PROJECT_ID + 24442// Organizations scope, location specified: 24443// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 24444// scope, no location specified (defaults to global): 24445// `organizations/`ORG_ID The following example `parent` string 24446// specifies a parent project with the identifier `example-project`, 24447// and specifies the `europe-west3` location for processing data: 24448// parent=projects/example-project/locations/europe-west3. 24449func (r *ProjectsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsStoredInfoTypesCreateCall { 24450 c := &ProjectsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24451 c.parentid = parentid 24452 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 24453 return c 24454} 24455 24456// Fields allows partial responses to be retrieved. See 24457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24458// for more information. 24459func (c *ProjectsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesCreateCall { 24460 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24461 return c 24462} 24463 24464// Context sets the context to be used in this call's Do method. Any 24465// pending HTTP request will be aborted if the provided context is 24466// canceled. 24467func (c *ProjectsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsStoredInfoTypesCreateCall { 24468 c.ctx_ = ctx 24469 return c 24470} 24471 24472// Header returns an http.Header that can be modified by the caller to 24473// add HTTP headers to the request. 24474func (c *ProjectsStoredInfoTypesCreateCall) Header() http.Header { 24475 if c.header_ == nil { 24476 c.header_ = make(http.Header) 24477 } 24478 return c.header_ 24479} 24480 24481func (c *ProjectsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 24482 reqHeaders := make(http.Header) 24483 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24484 for k, v := range c.header_ { 24485 reqHeaders[k] = v 24486 } 24487 reqHeaders.Set("User-Agent", c.s.userAgent()) 24488 var body io.Reader = nil 24489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 24490 if err != nil { 24491 return nil, err 24492 } 24493 reqHeaders.Set("Content-Type", "application/json") 24494 c.urlParams_.Set("alt", alt) 24495 c.urlParams_.Set("prettyPrint", "false") 24496 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 24497 urls += "?" + c.urlParams_.Encode() 24498 req, err := http.NewRequest("POST", urls, body) 24499 if err != nil { 24500 return nil, err 24501 } 24502 req.Header = reqHeaders 24503 googleapi.Expand(req.URL, map[string]string{ 24504 "parent": c.parentid, 24505 }) 24506 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24507} 24508 24509// Do executes the "dlp.projects.storedInfoTypes.create" call. 24510// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 24511// non-nil. Any non-2xx status code is an error. Response headers are in 24512// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 24513// a response was returned at all) in error.(*googleapi.Error).Header. 24514// Use googleapi.IsNotModified to check whether the returned error was 24515// because http.StatusNotModified was returned. 24516func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 24517 gensupport.SetOptions(c.urlParams_, opts...) 24518 res, err := c.doRequest("json") 24519 if res != nil && res.StatusCode == http.StatusNotModified { 24520 if res.Body != nil { 24521 res.Body.Close() 24522 } 24523 return nil, &googleapi.Error{ 24524 Code: res.StatusCode, 24525 Header: res.Header, 24526 } 24527 } 24528 if err != nil { 24529 return nil, err 24530 } 24531 defer googleapi.CloseBody(res) 24532 if err := googleapi.CheckResponse(res); err != nil { 24533 return nil, err 24534 } 24535 ret := &GooglePrivacyDlpV2StoredInfoType{ 24536 ServerResponse: googleapi.ServerResponse{ 24537 Header: res.Header, 24538 HTTPStatusCode: res.StatusCode, 24539 }, 24540 } 24541 target := &ret 24542 if err := gensupport.DecodeResponse(target, res); err != nil { 24543 return nil, err 24544 } 24545 return ret, nil 24546 // { 24547 // "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.", 24548 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 24549 // "httpMethod": "POST", 24550 // "id": "dlp.projects.storedInfoTypes.create", 24551 // "parameterOrder": [ 24552 // "parent" 24553 // ], 24554 // "parameters": { 24555 // "parent": { 24556 // "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", 24557 // "location": "path", 24558 // "pattern": "^projects/[^/]+$", 24559 // "required": true, 24560 // "type": "string" 24561 // } 24562 // }, 24563 // "path": "v2/{+parent}/storedInfoTypes", 24564 // "request": { 24565 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 24566 // }, 24567 // "response": { 24568 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 24569 // }, 24570 // "scopes": [ 24571 // "https://www.googleapis.com/auth/cloud-platform" 24572 // ] 24573 // } 24574 24575} 24576 24577// method id "dlp.projects.storedInfoTypes.delete": 24578 24579type ProjectsStoredInfoTypesDeleteCall struct { 24580 s *Service 24581 name string 24582 urlParams_ gensupport.URLParams 24583 ctx_ context.Context 24584 header_ http.Header 24585} 24586 24587// Delete: Deletes a stored infoType. See 24588// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24589// more. 24590// 24591// - name: Resource name of the organization and storedInfoType to be 24592// deleted, for example 24593// `organizations/433245324/storedInfoTypes/432452342` or 24594// projects/project-id/storedInfoTypes/432452342. 24595func (r *ProjectsStoredInfoTypesService) Delete(name string) *ProjectsStoredInfoTypesDeleteCall { 24596 c := &ProjectsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24597 c.name = name 24598 return c 24599} 24600 24601// Fields allows partial responses to be retrieved. See 24602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24603// for more information. 24604func (c *ProjectsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesDeleteCall { 24605 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24606 return c 24607} 24608 24609// Context sets the context to be used in this call's Do method. Any 24610// pending HTTP request will be aborted if the provided context is 24611// canceled. 24612func (c *ProjectsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsStoredInfoTypesDeleteCall { 24613 c.ctx_ = ctx 24614 return c 24615} 24616 24617// Header returns an http.Header that can be modified by the caller to 24618// add HTTP headers to the request. 24619func (c *ProjectsStoredInfoTypesDeleteCall) Header() http.Header { 24620 if c.header_ == nil { 24621 c.header_ = make(http.Header) 24622 } 24623 return c.header_ 24624} 24625 24626func (c *ProjectsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 24627 reqHeaders := make(http.Header) 24628 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24629 for k, v := range c.header_ { 24630 reqHeaders[k] = v 24631 } 24632 reqHeaders.Set("User-Agent", c.s.userAgent()) 24633 var body io.Reader = nil 24634 c.urlParams_.Set("alt", alt) 24635 c.urlParams_.Set("prettyPrint", "false") 24636 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 24637 urls += "?" + c.urlParams_.Encode() 24638 req, err := http.NewRequest("DELETE", urls, body) 24639 if err != nil { 24640 return nil, err 24641 } 24642 req.Header = reqHeaders 24643 googleapi.Expand(req.URL, map[string]string{ 24644 "name": c.name, 24645 }) 24646 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24647} 24648 24649// Do executes the "dlp.projects.storedInfoTypes.delete" call. 24650// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 24651// non-2xx status code is an error. Response headers are in either 24652// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 24653// returned at all) in error.(*googleapi.Error).Header. Use 24654// googleapi.IsNotModified to check whether the returned error was 24655// because http.StatusNotModified was returned. 24656func (c *ProjectsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 24657 gensupport.SetOptions(c.urlParams_, opts...) 24658 res, err := c.doRequest("json") 24659 if res != nil && res.StatusCode == http.StatusNotModified { 24660 if res.Body != nil { 24661 res.Body.Close() 24662 } 24663 return nil, &googleapi.Error{ 24664 Code: res.StatusCode, 24665 Header: res.Header, 24666 } 24667 } 24668 if err != nil { 24669 return nil, err 24670 } 24671 defer googleapi.CloseBody(res) 24672 if err := googleapi.CheckResponse(res); err != nil { 24673 return nil, err 24674 } 24675 ret := &GoogleProtobufEmpty{ 24676 ServerResponse: googleapi.ServerResponse{ 24677 Header: res.Header, 24678 HTTPStatusCode: res.StatusCode, 24679 }, 24680 } 24681 target := &ret 24682 if err := gensupport.DecodeResponse(target, res); err != nil { 24683 return nil, err 24684 } 24685 return ret, nil 24686 // { 24687 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 24688 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 24689 // "httpMethod": "DELETE", 24690 // "id": "dlp.projects.storedInfoTypes.delete", 24691 // "parameterOrder": [ 24692 // "name" 24693 // ], 24694 // "parameters": { 24695 // "name": { 24696 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 24697 // "location": "path", 24698 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 24699 // "required": true, 24700 // "type": "string" 24701 // } 24702 // }, 24703 // "path": "v2/{+name}", 24704 // "response": { 24705 // "$ref": "GoogleProtobufEmpty" 24706 // }, 24707 // "scopes": [ 24708 // "https://www.googleapis.com/auth/cloud-platform" 24709 // ] 24710 // } 24711 24712} 24713 24714// method id "dlp.projects.storedInfoTypes.get": 24715 24716type ProjectsStoredInfoTypesGetCall struct { 24717 s *Service 24718 name string 24719 urlParams_ gensupport.URLParams 24720 ifNoneMatch_ string 24721 ctx_ context.Context 24722 header_ http.Header 24723} 24724 24725// Get: Gets a stored infoType. See 24726// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24727// more. 24728// 24729// - name: Resource name of the organization and storedInfoType to be 24730// read, for example 24731// `organizations/433245324/storedInfoTypes/432452342` or 24732// projects/project-id/storedInfoTypes/432452342. 24733func (r *ProjectsStoredInfoTypesService) Get(name string) *ProjectsStoredInfoTypesGetCall { 24734 c := &ProjectsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24735 c.name = name 24736 return c 24737} 24738 24739// Fields allows partial responses to be retrieved. See 24740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24741// for more information. 24742func (c *ProjectsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesGetCall { 24743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24744 return c 24745} 24746 24747// IfNoneMatch sets the optional parameter which makes the operation 24748// fail if the object's ETag matches the given value. This is useful for 24749// getting updates only after the object has changed since the last 24750// request. Use googleapi.IsNotModified to check whether the response 24751// error from Do is the result of In-None-Match. 24752func (c *ProjectsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesGetCall { 24753 c.ifNoneMatch_ = entityTag 24754 return c 24755} 24756 24757// Context sets the context to be used in this call's Do method. Any 24758// pending HTTP request will be aborted if the provided context is 24759// canceled. 24760func (c *ProjectsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsStoredInfoTypesGetCall { 24761 c.ctx_ = ctx 24762 return c 24763} 24764 24765// Header returns an http.Header that can be modified by the caller to 24766// add HTTP headers to the request. 24767func (c *ProjectsStoredInfoTypesGetCall) Header() http.Header { 24768 if c.header_ == nil { 24769 c.header_ = make(http.Header) 24770 } 24771 return c.header_ 24772} 24773 24774func (c *ProjectsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 24775 reqHeaders := make(http.Header) 24776 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24777 for k, v := range c.header_ { 24778 reqHeaders[k] = v 24779 } 24780 reqHeaders.Set("User-Agent", c.s.userAgent()) 24781 if c.ifNoneMatch_ != "" { 24782 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24783 } 24784 var body io.Reader = nil 24785 c.urlParams_.Set("alt", alt) 24786 c.urlParams_.Set("prettyPrint", "false") 24787 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 24788 urls += "?" + c.urlParams_.Encode() 24789 req, err := http.NewRequest("GET", urls, body) 24790 if err != nil { 24791 return nil, err 24792 } 24793 req.Header = reqHeaders 24794 googleapi.Expand(req.URL, map[string]string{ 24795 "name": c.name, 24796 }) 24797 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24798} 24799 24800// Do executes the "dlp.projects.storedInfoTypes.get" call. 24801// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 24802// non-nil. Any non-2xx status code is an error. Response headers are in 24803// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 24804// a response was returned at all) in error.(*googleapi.Error).Header. 24805// Use googleapi.IsNotModified to check whether the returned error was 24806// because http.StatusNotModified was returned. 24807func (c *ProjectsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 24808 gensupport.SetOptions(c.urlParams_, opts...) 24809 res, err := c.doRequest("json") 24810 if res != nil && res.StatusCode == http.StatusNotModified { 24811 if res.Body != nil { 24812 res.Body.Close() 24813 } 24814 return nil, &googleapi.Error{ 24815 Code: res.StatusCode, 24816 Header: res.Header, 24817 } 24818 } 24819 if err != nil { 24820 return nil, err 24821 } 24822 defer googleapi.CloseBody(res) 24823 if err := googleapi.CheckResponse(res); err != nil { 24824 return nil, err 24825 } 24826 ret := &GooglePrivacyDlpV2StoredInfoType{ 24827 ServerResponse: googleapi.ServerResponse{ 24828 Header: res.Header, 24829 HTTPStatusCode: res.StatusCode, 24830 }, 24831 } 24832 target := &ret 24833 if err := gensupport.DecodeResponse(target, res); err != nil { 24834 return nil, err 24835 } 24836 return ret, nil 24837 // { 24838 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 24839 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 24840 // "httpMethod": "GET", 24841 // "id": "dlp.projects.storedInfoTypes.get", 24842 // "parameterOrder": [ 24843 // "name" 24844 // ], 24845 // "parameters": { 24846 // "name": { 24847 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 24848 // "location": "path", 24849 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 24850 // "required": true, 24851 // "type": "string" 24852 // } 24853 // }, 24854 // "path": "v2/{+name}", 24855 // "response": { 24856 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 24857 // }, 24858 // "scopes": [ 24859 // "https://www.googleapis.com/auth/cloud-platform" 24860 // ] 24861 // } 24862 24863} 24864 24865// method id "dlp.projects.storedInfoTypes.list": 24866 24867type ProjectsStoredInfoTypesListCall struct { 24868 s *Service 24869 parentid string 24870 urlParams_ gensupport.URLParams 24871 ifNoneMatch_ string 24872 ctx_ context.Context 24873 header_ http.Header 24874} 24875 24876// List: Lists stored infoTypes. See 24877// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 24878// more. 24879// 24880// - parent: Parent resource name. The format of this value varies 24881// depending on the scope of the request (project or organization) and 24882// whether you have specified a processing location 24883// (https://cloud.google.com/dlp/docs/specifying-location): + Projects 24884// scope, location specified: 24885// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no 24886// location specified (defaults to global): `projects/`PROJECT_ID + 24887// Organizations scope, location specified: 24888// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations 24889// scope, no location specified (defaults to global): 24890// `organizations/`ORG_ID The following example `parent` string 24891// specifies a parent project with the identifier `example-project`, 24892// and specifies the `europe-west3` location for processing data: 24893// parent=projects/example-project/locations/europe-west3. 24894func (r *ProjectsStoredInfoTypesService) List(parentid string) *ProjectsStoredInfoTypesListCall { 24895 c := &ProjectsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24896 c.parentid = parentid 24897 return c 24898} 24899 24900// LocationId sets the optional parameter "locationId": Deprecated. This 24901// field has no effect. 24902func (c *ProjectsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsStoredInfoTypesListCall { 24903 c.urlParams_.Set("locationId", locationId) 24904 return c 24905} 24906 24907// OrderBy sets the optional parameter "orderBy": Comma separated list 24908// of fields to order by, followed by `asc` or `desc` postfix. This list 24909// is case-insensitive, default sorting order is ascending, redundant 24910// space characters are insignificant. Example: `name asc, display_name, 24911// create_time desc` Supported fields are: - `create_time`: corresponds 24912// to time the most recent version of the resource was created. - 24913// `state`: corresponds to the state of the resource. - `name`: 24914// corresponds to resource name. - `display_name`: corresponds to info 24915// type's display name. 24916func (c *ProjectsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsStoredInfoTypesListCall { 24917 c.urlParams_.Set("orderBy", orderBy) 24918 return c 24919} 24920 24921// PageSize sets the optional parameter "pageSize": Size of the page, 24922// can be limited by server. If zero server returns a page of max size 24923// 100. 24924func (c *ProjectsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsStoredInfoTypesListCall { 24925 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 24926 return c 24927} 24928 24929// PageToken sets the optional parameter "pageToken": Page token to 24930// continue retrieval. Comes from previous call to 24931// `ListStoredInfoTypes`. 24932func (c *ProjectsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsStoredInfoTypesListCall { 24933 c.urlParams_.Set("pageToken", pageToken) 24934 return c 24935} 24936 24937// Fields allows partial responses to be retrieved. See 24938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24939// for more information. 24940func (c *ProjectsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesListCall { 24941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24942 return c 24943} 24944 24945// IfNoneMatch sets the optional parameter which makes the operation 24946// fail if the object's ETag matches the given value. This is useful for 24947// getting updates only after the object has changed since the last 24948// request. Use googleapi.IsNotModified to check whether the response 24949// error from Do is the result of In-None-Match. 24950func (c *ProjectsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesListCall { 24951 c.ifNoneMatch_ = entityTag 24952 return c 24953} 24954 24955// Context sets the context to be used in this call's Do method. Any 24956// pending HTTP request will be aborted if the provided context is 24957// canceled. 24958func (c *ProjectsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsStoredInfoTypesListCall { 24959 c.ctx_ = ctx 24960 return c 24961} 24962 24963// Header returns an http.Header that can be modified by the caller to 24964// add HTTP headers to the request. 24965func (c *ProjectsStoredInfoTypesListCall) Header() http.Header { 24966 if c.header_ == nil { 24967 c.header_ = make(http.Header) 24968 } 24969 return c.header_ 24970} 24971 24972func (c *ProjectsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 24973 reqHeaders := make(http.Header) 24974 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 24975 for k, v := range c.header_ { 24976 reqHeaders[k] = v 24977 } 24978 reqHeaders.Set("User-Agent", c.s.userAgent()) 24979 if c.ifNoneMatch_ != "" { 24980 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24981 } 24982 var body io.Reader = nil 24983 c.urlParams_.Set("alt", alt) 24984 c.urlParams_.Set("prettyPrint", "false") 24985 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 24986 urls += "?" + c.urlParams_.Encode() 24987 req, err := http.NewRequest("GET", urls, body) 24988 if err != nil { 24989 return nil, err 24990 } 24991 req.Header = reqHeaders 24992 googleapi.Expand(req.URL, map[string]string{ 24993 "parent": c.parentid, 24994 }) 24995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24996} 24997 24998// Do executes the "dlp.projects.storedInfoTypes.list" call. 24999// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 25000// error will be non-nil. Any non-2xx status code is an error. Response 25001// headers are in either 25002// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 25003// or (if a response was returned at all) in 25004// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25005// whether the returned error was because http.StatusNotModified was 25006// returned. 25007func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 25008 gensupport.SetOptions(c.urlParams_, opts...) 25009 res, err := c.doRequest("json") 25010 if res != nil && res.StatusCode == http.StatusNotModified { 25011 if res.Body != nil { 25012 res.Body.Close() 25013 } 25014 return nil, &googleapi.Error{ 25015 Code: res.StatusCode, 25016 Header: res.Header, 25017 } 25018 } 25019 if err != nil { 25020 return nil, err 25021 } 25022 defer googleapi.CloseBody(res) 25023 if err := googleapi.CheckResponse(res); err != nil { 25024 return nil, err 25025 } 25026 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 25027 ServerResponse: googleapi.ServerResponse{ 25028 Header: res.Header, 25029 HTTPStatusCode: res.StatusCode, 25030 }, 25031 } 25032 target := &ret 25033 if err := gensupport.DecodeResponse(target, res); err != nil { 25034 return nil, err 25035 } 25036 return ret, nil 25037 // { 25038 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 25039 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 25040 // "httpMethod": "GET", 25041 // "id": "dlp.projects.storedInfoTypes.list", 25042 // "parameterOrder": [ 25043 // "parent" 25044 // ], 25045 // "parameters": { 25046 // "locationId": { 25047 // "description": "Deprecated. This field has no effect.", 25048 // "location": "query", 25049 // "type": "string" 25050 // }, 25051 // "orderBy": { 25052 // "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.", 25053 // "location": "query", 25054 // "type": "string" 25055 // }, 25056 // "pageSize": { 25057 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 25058 // "format": "int32", 25059 // "location": "query", 25060 // "type": "integer" 25061 // }, 25062 // "pageToken": { 25063 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 25064 // "location": "query", 25065 // "type": "string" 25066 // }, 25067 // "parent": { 25068 // "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", 25069 // "location": "path", 25070 // "pattern": "^projects/[^/]+$", 25071 // "required": true, 25072 // "type": "string" 25073 // } 25074 // }, 25075 // "path": "v2/{+parent}/storedInfoTypes", 25076 // "response": { 25077 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 25078 // }, 25079 // "scopes": [ 25080 // "https://www.googleapis.com/auth/cloud-platform" 25081 // ] 25082 // } 25083 25084} 25085 25086// Pages invokes f for each page of results. 25087// A non-nil error returned from f will halt the iteration. 25088// The provided context supersedes any context provided to the Context method. 25089func (c *ProjectsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 25090 c.ctx_ = ctx 25091 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25092 for { 25093 x, err := c.Do() 25094 if err != nil { 25095 return err 25096 } 25097 if err := f(x); err != nil { 25098 return err 25099 } 25100 if x.NextPageToken == "" { 25101 return nil 25102 } 25103 c.PageToken(x.NextPageToken) 25104 } 25105} 25106 25107// method id "dlp.projects.storedInfoTypes.patch": 25108 25109type ProjectsStoredInfoTypesPatchCall struct { 25110 s *Service 25111 name string 25112 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 25113 urlParams_ gensupport.URLParams 25114 ctx_ context.Context 25115 header_ http.Header 25116} 25117 25118// Patch: Updates the stored infoType by creating a new version. The 25119// existing version will continue to be used until the new version is 25120// ready. See 25121// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 25122// more. 25123// 25124// - name: Resource name of organization and storedInfoType to be 25125// updated, for example 25126// `organizations/433245324/storedInfoTypes/432452342` or 25127// projects/project-id/storedInfoTypes/432452342. 25128func (r *ProjectsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsStoredInfoTypesPatchCall { 25129 c := &ProjectsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25130 c.name = name 25131 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 25132 return c 25133} 25134 25135// Fields allows partial responses to be retrieved. See 25136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25137// for more information. 25138func (c *ProjectsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesPatchCall { 25139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25140 return c 25141} 25142 25143// Context sets the context to be used in this call's Do method. Any 25144// pending HTTP request will be aborted if the provided context is 25145// canceled. 25146func (c *ProjectsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsStoredInfoTypesPatchCall { 25147 c.ctx_ = ctx 25148 return c 25149} 25150 25151// Header returns an http.Header that can be modified by the caller to 25152// add HTTP headers to the request. 25153func (c *ProjectsStoredInfoTypesPatchCall) Header() http.Header { 25154 if c.header_ == nil { 25155 c.header_ = make(http.Header) 25156 } 25157 return c.header_ 25158} 25159 25160func (c *ProjectsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 25161 reqHeaders := make(http.Header) 25162 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 25163 for k, v := range c.header_ { 25164 reqHeaders[k] = v 25165 } 25166 reqHeaders.Set("User-Agent", c.s.userAgent()) 25167 var body io.Reader = nil 25168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 25169 if err != nil { 25170 return nil, err 25171 } 25172 reqHeaders.Set("Content-Type", "application/json") 25173 c.urlParams_.Set("alt", alt) 25174 c.urlParams_.Set("prettyPrint", "false") 25175 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 25176 urls += "?" + c.urlParams_.Encode() 25177 req, err := http.NewRequest("PATCH", urls, body) 25178 if err != nil { 25179 return nil, err 25180 } 25181 req.Header = reqHeaders 25182 googleapi.Expand(req.URL, map[string]string{ 25183 "name": c.name, 25184 }) 25185 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25186} 25187 25188// Do executes the "dlp.projects.storedInfoTypes.patch" call. 25189// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 25190// non-nil. Any non-2xx status code is an error. Response headers are in 25191// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 25192// a response was returned at all) in error.(*googleapi.Error).Header. 25193// Use googleapi.IsNotModified to check whether the returned error was 25194// because http.StatusNotModified was returned. 25195func (c *ProjectsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 25196 gensupport.SetOptions(c.urlParams_, opts...) 25197 res, err := c.doRequest("json") 25198 if res != nil && res.StatusCode == http.StatusNotModified { 25199 if res.Body != nil { 25200 res.Body.Close() 25201 } 25202 return nil, &googleapi.Error{ 25203 Code: res.StatusCode, 25204 Header: res.Header, 25205 } 25206 } 25207 if err != nil { 25208 return nil, err 25209 } 25210 defer googleapi.CloseBody(res) 25211 if err := googleapi.CheckResponse(res); err != nil { 25212 return nil, err 25213 } 25214 ret := &GooglePrivacyDlpV2StoredInfoType{ 25215 ServerResponse: googleapi.ServerResponse{ 25216 Header: res.Header, 25217 HTTPStatusCode: res.StatusCode, 25218 }, 25219 } 25220 target := &ret 25221 if err := gensupport.DecodeResponse(target, res); err != nil { 25222 return nil, err 25223 } 25224 return ret, nil 25225 // { 25226 // "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.", 25227 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 25228 // "httpMethod": "PATCH", 25229 // "id": "dlp.projects.storedInfoTypes.patch", 25230 // "parameterOrder": [ 25231 // "name" 25232 // ], 25233 // "parameters": { 25234 // "name": { 25235 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 25236 // "location": "path", 25237 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 25238 // "required": true, 25239 // "type": "string" 25240 // } 25241 // }, 25242 // "path": "v2/{+name}", 25243 // "request": { 25244 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 25245 // }, 25246 // "response": { 25247 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 25248 // }, 25249 // "scopes": [ 25250 // "https://www.googleapis.com/auth/cloud-platform" 25251 // ] 25252 // } 25253 25254} 25255