1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package dlp provides access to the Cloud Data Loss Prevention (DLP) API. 8// 9// This package is DEPRECATED. Use package cloud.google.com/go/dlp/apiv2 instead. 10// 11// For product documentation, see: https://cloud.google.com/dlp/docs/ 12// 13// Creating a client 14// 15// Usage example: 16// 17// import "google.golang.org/api/dlp/v2" 18// ... 19// ctx := context.Background() 20// dlpService, err := dlp.NewService(ctx) 21// 22// In this example, Google Application Default Credentials are used for authentication. 23// 24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 25// 26// Other authentication options 27// 28// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 29// 30// dlpService, err := dlp.NewService(ctx, option.WithAPIKey("AIza...")) 31// 32// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 33// 34// config := &oauth2.Config{...} 35// // ... 36// token, err := config.Exchange(ctx, ...) 37// dlpService, err := dlp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 38// 39// See https://godoc.org/google.golang.org/api/option/ for details on options. 40package dlp // import "google.golang.org/api/dlp/v2" 41 42import ( 43 "bytes" 44 "context" 45 "encoding/json" 46 "errors" 47 "fmt" 48 "io" 49 "net/http" 50 "net/url" 51 "strconv" 52 "strings" 53 54 googleapi "google.golang.org/api/googleapi" 55 gensupport "google.golang.org/api/internal/gensupport" 56 option "google.golang.org/api/option" 57 internaloption "google.golang.org/api/option/internaloption" 58 htransport "google.golang.org/api/transport/http" 59) 60 61// Always reference these packages, just in case the auto-generated code 62// below doesn't. 63var _ = bytes.NewBuffer 64var _ = strconv.Itoa 65var _ = fmt.Sprintf 66var _ = json.NewDecoder 67var _ = io.Copy 68var _ = url.Parse 69var _ = gensupport.MarshalJSON 70var _ = googleapi.Version 71var _ = errors.New 72var _ = strings.Replace 73var _ = context.Canceled 74var _ = internaloption.WithDefaultEndpoint 75 76const apiId = "dlp:v2" 77const apiName = "dlp" 78const apiVersion = "v2" 79const basePath = "https://dlp.googleapis.com/" 80const mtlsBasePath = "https://dlp.mtls.googleapis.com/" 81 82// OAuth2 scopes used by this API. 83const ( 84 // View and manage your data across Google Cloud Platform services 85 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 86) 87 88// NewService creates a new Service. 89func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 90 scopesOption := option.WithScopes( 91 "https://www.googleapis.com/auth/cloud-platform", 92 ) 93 // NOTE: prepend, so we don't override user-specified scopes. 94 opts = append([]option.ClientOption{scopesOption}, opts...) 95 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 96 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 97 client, endpoint, err := htransport.NewClient(ctx, opts...) 98 if err != nil { 99 return nil, err 100 } 101 s, err := New(client) 102 if err != nil { 103 return nil, err 104 } 105 if endpoint != "" { 106 s.BasePath = endpoint 107 } 108 return s, nil 109} 110 111// New creates a new Service. It uses the provided http.Client for requests. 112// 113// Deprecated: please use NewService instead. 114// To provide a custom HTTP client, use option.WithHTTPClient. 115// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 116func New(client *http.Client) (*Service, error) { 117 if client == nil { 118 return nil, errors.New("client is nil") 119 } 120 s := &Service{client: client, BasePath: basePath} 121 s.InfoTypes = NewInfoTypesService(s) 122 s.Locations = NewLocationsService(s) 123 s.Organizations = NewOrganizationsService(s) 124 s.Projects = NewProjectsService(s) 125 return s, nil 126} 127 128type Service struct { 129 client *http.Client 130 BasePath string // API endpoint base URL 131 UserAgent string // optional additional User-Agent fragment 132 133 InfoTypes *InfoTypesService 134 135 Locations *LocationsService 136 137 Organizations *OrganizationsService 138 139 Projects *ProjectsService 140} 141 142func (s *Service) userAgent() string { 143 if s.UserAgent == "" { 144 return googleapi.UserAgent 145 } 146 return googleapi.UserAgent + " " + s.UserAgent 147} 148 149func NewInfoTypesService(s *Service) *InfoTypesService { 150 rs := &InfoTypesService{s: s} 151 return rs 152} 153 154type InfoTypesService struct { 155 s *Service 156} 157 158func NewLocationsService(s *Service) *LocationsService { 159 rs := &LocationsService{s: s} 160 rs.InfoTypes = NewLocationsInfoTypesService(s) 161 return rs 162} 163 164type LocationsService struct { 165 s *Service 166 167 InfoTypes *LocationsInfoTypesService 168} 169 170func NewLocationsInfoTypesService(s *Service) *LocationsInfoTypesService { 171 rs := &LocationsInfoTypesService{s: s} 172 return rs 173} 174 175type LocationsInfoTypesService struct { 176 s *Service 177} 178 179func NewOrganizationsService(s *Service) *OrganizationsService { 180 rs := &OrganizationsService{s: s} 181 rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s) 182 rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s) 183 rs.Locations = NewOrganizationsLocationsService(s) 184 rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s) 185 return rs 186} 187 188type OrganizationsService struct { 189 s *Service 190 191 DeidentifyTemplates *OrganizationsDeidentifyTemplatesService 192 193 InspectTemplates *OrganizationsInspectTemplatesService 194 195 Locations *OrganizationsLocationsService 196 197 StoredInfoTypes *OrganizationsStoredInfoTypesService 198} 199 200func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService { 201 rs := &OrganizationsDeidentifyTemplatesService{s: s} 202 return rs 203} 204 205type OrganizationsDeidentifyTemplatesService struct { 206 s *Service 207} 208 209func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService { 210 rs := &OrganizationsInspectTemplatesService{s: s} 211 return rs 212} 213 214type OrganizationsInspectTemplatesService struct { 215 s *Service 216} 217 218func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { 219 rs := &OrganizationsLocationsService{s: s} 220 rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) 221 rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s) 222 rs.StoredInfoTypes = NewOrganizationsLocationsStoredInfoTypesService(s) 223 return rs 224} 225 226type OrganizationsLocationsService struct { 227 s *Service 228 229 DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService 230 231 InspectTemplates *OrganizationsLocationsInspectTemplatesService 232 233 StoredInfoTypes *OrganizationsLocationsStoredInfoTypesService 234} 235 236func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService { 237 rs := &OrganizationsLocationsDeidentifyTemplatesService{s: s} 238 return rs 239} 240 241type OrganizationsLocationsDeidentifyTemplatesService struct { 242 s *Service 243} 244 245func NewOrganizationsLocationsInspectTemplatesService(s *Service) *OrganizationsLocationsInspectTemplatesService { 246 rs := &OrganizationsLocationsInspectTemplatesService{s: s} 247 return rs 248} 249 250type OrganizationsLocationsInspectTemplatesService struct { 251 s *Service 252} 253 254func NewOrganizationsLocationsStoredInfoTypesService(s *Service) *OrganizationsLocationsStoredInfoTypesService { 255 rs := &OrganizationsLocationsStoredInfoTypesService{s: s} 256 return rs 257} 258 259type OrganizationsLocationsStoredInfoTypesService struct { 260 s *Service 261} 262 263func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService { 264 rs := &OrganizationsStoredInfoTypesService{s: s} 265 return rs 266} 267 268type OrganizationsStoredInfoTypesService struct { 269 s *Service 270} 271 272func NewProjectsService(s *Service) *ProjectsService { 273 rs := &ProjectsService{s: s} 274 rs.Content = NewProjectsContentService(s) 275 rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s) 276 rs.DlpJobs = NewProjectsDlpJobsService(s) 277 rs.Image = NewProjectsImageService(s) 278 rs.InspectTemplates = NewProjectsInspectTemplatesService(s) 279 rs.JobTriggers = NewProjectsJobTriggersService(s) 280 rs.Locations = NewProjectsLocationsService(s) 281 rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s) 282 return rs 283} 284 285type ProjectsService struct { 286 s *Service 287 288 Content *ProjectsContentService 289 290 DeidentifyTemplates *ProjectsDeidentifyTemplatesService 291 292 DlpJobs *ProjectsDlpJobsService 293 294 Image *ProjectsImageService 295 296 InspectTemplates *ProjectsInspectTemplatesService 297 298 JobTriggers *ProjectsJobTriggersService 299 300 Locations *ProjectsLocationsService 301 302 StoredInfoTypes *ProjectsStoredInfoTypesService 303} 304 305func NewProjectsContentService(s *Service) *ProjectsContentService { 306 rs := &ProjectsContentService{s: s} 307 return rs 308} 309 310type ProjectsContentService struct { 311 s *Service 312} 313 314func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService { 315 rs := &ProjectsDeidentifyTemplatesService{s: s} 316 return rs 317} 318 319type ProjectsDeidentifyTemplatesService struct { 320 s *Service 321} 322 323func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService { 324 rs := &ProjectsDlpJobsService{s: s} 325 return rs 326} 327 328type ProjectsDlpJobsService struct { 329 s *Service 330} 331 332func NewProjectsImageService(s *Service) *ProjectsImageService { 333 rs := &ProjectsImageService{s: s} 334 return rs 335} 336 337type ProjectsImageService struct { 338 s *Service 339} 340 341func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService { 342 rs := &ProjectsInspectTemplatesService{s: s} 343 return rs 344} 345 346type ProjectsInspectTemplatesService struct { 347 s *Service 348} 349 350func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService { 351 rs := &ProjectsJobTriggersService{s: s} 352 return rs 353} 354 355type ProjectsJobTriggersService struct { 356 s *Service 357} 358 359func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 360 rs := &ProjectsLocationsService{s: s} 361 rs.Content = NewProjectsLocationsContentService(s) 362 rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) 363 rs.DlpJobs = NewProjectsLocationsDlpJobsService(s) 364 rs.Image = NewProjectsLocationsImageService(s) 365 rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s) 366 rs.JobTriggers = NewProjectsLocationsJobTriggersService(s) 367 rs.StoredInfoTypes = NewProjectsLocationsStoredInfoTypesService(s) 368 return rs 369} 370 371type ProjectsLocationsService struct { 372 s *Service 373 374 Content *ProjectsLocationsContentService 375 376 DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService 377 378 DlpJobs *ProjectsLocationsDlpJobsService 379 380 Image *ProjectsLocationsImageService 381 382 InspectTemplates *ProjectsLocationsInspectTemplatesService 383 384 JobTriggers *ProjectsLocationsJobTriggersService 385 386 StoredInfoTypes *ProjectsLocationsStoredInfoTypesService 387} 388 389func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { 390 rs := &ProjectsLocationsContentService{s: s} 391 return rs 392} 393 394type ProjectsLocationsContentService struct { 395 s *Service 396} 397 398func NewProjectsLocationsDeidentifyTemplatesService(s *Service) *ProjectsLocationsDeidentifyTemplatesService { 399 rs := &ProjectsLocationsDeidentifyTemplatesService{s: s} 400 return rs 401} 402 403type ProjectsLocationsDeidentifyTemplatesService struct { 404 s *Service 405} 406 407func NewProjectsLocationsDlpJobsService(s *Service) *ProjectsLocationsDlpJobsService { 408 rs := &ProjectsLocationsDlpJobsService{s: s} 409 return rs 410} 411 412type ProjectsLocationsDlpJobsService struct { 413 s *Service 414} 415 416func NewProjectsLocationsImageService(s *Service) *ProjectsLocationsImageService { 417 rs := &ProjectsLocationsImageService{s: s} 418 return rs 419} 420 421type ProjectsLocationsImageService struct { 422 s *Service 423} 424 425func NewProjectsLocationsInspectTemplatesService(s *Service) *ProjectsLocationsInspectTemplatesService { 426 rs := &ProjectsLocationsInspectTemplatesService{s: s} 427 return rs 428} 429 430type ProjectsLocationsInspectTemplatesService struct { 431 s *Service 432} 433 434func NewProjectsLocationsJobTriggersService(s *Service) *ProjectsLocationsJobTriggersService { 435 rs := &ProjectsLocationsJobTriggersService{s: s} 436 return rs 437} 438 439type ProjectsLocationsJobTriggersService struct { 440 s *Service 441} 442 443func NewProjectsLocationsStoredInfoTypesService(s *Service) *ProjectsLocationsStoredInfoTypesService { 444 rs := &ProjectsLocationsStoredInfoTypesService{s: s} 445 return rs 446} 447 448type ProjectsLocationsStoredInfoTypesService struct { 449 s *Service 450} 451 452func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService { 453 rs := &ProjectsStoredInfoTypesService{s: s} 454 return rs 455} 456 457type ProjectsStoredInfoTypesService struct { 458 s *Service 459} 460 461// GooglePrivacyDlpV2Action: A task to execute on the completion of a 462// job. See https://cloud.google.com/dlp/docs/concepts-actions to learn 463// more. 464type GooglePrivacyDlpV2Action struct { 465 // JobNotificationEmails: Enable email notification for project owners 466 // and editors on job's completion/failure. 467 JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` 468 469 // PubSub: Publish a notification to a pubsub topic. 470 PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"` 471 472 // PublishFindingsToCloudDataCatalog: Publish findings to Cloud Datahub. 473 PublishFindingsToCloudDataCatalog *GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog `json:"publishFindingsToCloudDataCatalog,omitempty"` 474 475 // PublishSummaryToCscc: Publish summary to Cloud Security Command 476 // Center (Alpha). 477 PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"` 478 479 // PublishToStackdriver: Enable Stackdriver metric 480 // dlp.googleapis.com/finding_count. 481 PublishToStackdriver *GooglePrivacyDlpV2PublishToStackdriver `json:"publishToStackdriver,omitempty"` 482 483 // SaveFindings: Save resulting findings in a provided location. 484 SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"` 485 486 // ForceSendFields is a list of field names (e.g. 487 // "JobNotificationEmails") to unconditionally include in API requests. 488 // By default, fields with empty values are omitted from API requests. 489 // However, any non-pointer, non-interface field appearing in 490 // ForceSendFields will be sent to the server regardless of whether the 491 // field is empty or not. This may be used to include empty fields in 492 // Patch requests. 493 ForceSendFields []string `json:"-"` 494 495 // NullFields is a list of field names (e.g. "JobNotificationEmails") to 496 // include in API requests with the JSON null value. By default, fields 497 // with empty values are omitted from API requests. However, any field 498 // with an empty value appearing in NullFields will be sent to the 499 // server as null. It is an error if a field in this list has a 500 // non-empty value. This may be used to include null fields in Patch 501 // requests. 502 NullFields []string `json:"-"` 503} 504 505func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) { 506 type NoMethod GooglePrivacyDlpV2Action 507 raw := NoMethod(*s) 508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 509} 510 511// GooglePrivacyDlpV2ActivateJobTriggerRequest: Request message for 512// ActivateJobTrigger. 513type GooglePrivacyDlpV2ActivateJobTriggerRequest struct { 514} 515 516// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk 517// analysis operation request. 518type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct { 519 // CategoricalStatsResult: Categorical stats result 520 CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"` 521 522 // DeltaPresenceEstimationResult: Delta-presence result 523 DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"` 524 525 // KAnonymityResult: K-anonymity result 526 KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"` 527 528 // KMapEstimationResult: K-map result 529 KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"` 530 531 // LDiversityResult: L-divesity result 532 LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"` 533 534 // NumericalStatsResult: Numerical stats result 535 NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"` 536 537 // RequestedOptions: The configuration used for this job. 538 RequestedOptions *GooglePrivacyDlpV2RequestedRiskAnalysisOptions `json:"requestedOptions,omitempty"` 539 540 // RequestedPrivacyMetric: Privacy metric to compute. 541 RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"` 542 543 // RequestedSourceTable: Input dataset to compute metrics over. 544 RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"` 545 546 // ForceSendFields is a list of field names (e.g. 547 // "CategoricalStatsResult") to unconditionally include in API requests. 548 // By default, fields with empty values are omitted from API requests. 549 // However, any non-pointer, non-interface field appearing in 550 // ForceSendFields will be sent to the server regardless of whether the 551 // field is empty or not. This may be used to include empty fields in 552 // Patch requests. 553 ForceSendFields []string `json:"-"` 554 555 // NullFields is a list of field names (e.g. "CategoricalStatsResult") 556 // to include in API requests with the JSON null value. By default, 557 // fields with empty values are omitted from API requests. However, any 558 // field with an empty value appearing in NullFields will be sent to the 559 // server as null. It is an error if a field in this list has a 560 // non-empty value. This may be used to include null fields in Patch 561 // requests. 562 NullFields []string `json:"-"` 563} 564 565func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) { 566 type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails 567 raw := NoMethod(*s) 568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 569} 570 571// GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains 572// statistical information on the relative frequency of different 573// quasi-identifiers values. It has one or several quasi-identifiers 574// columns, and one column that indicates the relative frequency of each 575// quasi-identifier tuple. If a tuple is present in the data but not in 576// the auxiliary table, the corresponding relative frequency is assumed 577// to be zero (and thus, the tuple is highly reidentifiable). 578type GooglePrivacyDlpV2AuxiliaryTable struct { 579 // QuasiIds: Required. Quasi-identifier columns. 580 QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"` 581 582 // RelativeFrequency: Required. The relative frequency column must 583 // contain a floating-point number between 0 and 1 (inclusive). Null 584 // values are assumed to be zero. 585 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 586 587 // Table: Required. Auxiliary table location. 588 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 589 590 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 591 // unconditionally include in API requests. By default, fields with 592 // empty values are omitted from API requests. However, any non-pointer, 593 // non-interface field appearing in ForceSendFields will be sent to the 594 // server regardless of whether the field is empty or not. This may be 595 // used to include empty fields in Patch requests. 596 ForceSendFields []string `json:"-"` 597 598 // NullFields is a list of field names (e.g. "QuasiIds") to include in 599 // API requests with the JSON null value. By default, fields with empty 600 // values are omitted from API requests. However, any field with an 601 // empty value appearing in NullFields will be sent to the server as 602 // null. It is an error if a field in this list has a non-empty value. 603 // This may be used to include null fields in Patch requests. 604 NullFields []string `json:"-"` 605} 606 607func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) { 608 type NoMethod GooglePrivacyDlpV2AuxiliaryTable 609 raw := NoMethod(*s) 610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 611} 612 613// GooglePrivacyDlpV2BigQueryField: Message defining a field of a 614// BigQuery table. 615type GooglePrivacyDlpV2BigQueryField struct { 616 // Field: Designated field in the BigQuery table. 617 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 618 619 // Table: Source table of the field. 620 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 621 622 // ForceSendFields is a list of field names (e.g. "Field") to 623 // unconditionally include in API requests. By default, fields with 624 // empty values are omitted from API requests. However, any non-pointer, 625 // non-interface field appearing in ForceSendFields will be sent to the 626 // server regardless of whether the field is empty or not. This may be 627 // used to include empty fields in Patch requests. 628 ForceSendFields []string `json:"-"` 629 630 // NullFields is a list of field names (e.g. "Field") to include in API 631 // requests with the JSON null value. By default, fields with empty 632 // values are omitted from API requests. However, any field with an 633 // empty value appearing in NullFields will be sent to the server as 634 // null. It is an error if a field in this list has a non-empty value. 635 // This may be used to include null fields in Patch requests. 636 NullFields []string `json:"-"` 637} 638 639func (s *GooglePrivacyDlpV2BigQueryField) MarshalJSON() ([]byte, error) { 640 type NoMethod GooglePrivacyDlpV2BigQueryField 641 raw := NoMethod(*s) 642 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 643} 644 645// GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in 646// BigQuery table. 647type GooglePrivacyDlpV2BigQueryKey struct { 648 // RowNumber: Row number inferred at the time the table was scanned. 649 // This value is nondeterministic, cannot be queried, and may be null 650 // for inspection jobs. To locate findings within a table, specify 651 // `inspect_job.storage_config.big_query_options.identifying_fields` in 652 // `CreateDlpJobRequest`. 653 RowNumber int64 `json:"rowNumber,omitempty,string"` 654 655 // TableReference: Complete BigQuery table reference. 656 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 657 658 // ForceSendFields is a list of field names (e.g. "RowNumber") to 659 // unconditionally include in API requests. By default, fields with 660 // empty values are omitted from API requests. However, any non-pointer, 661 // non-interface field appearing in ForceSendFields will be sent to the 662 // server regardless of whether the field is empty or not. This may be 663 // used to include empty fields in Patch requests. 664 ForceSendFields []string `json:"-"` 665 666 // NullFields is a list of field names (e.g. "RowNumber") to include in 667 // API requests with the JSON null value. By default, fields with empty 668 // values are omitted from API requests. However, any field with an 669 // empty value appearing in NullFields will be sent to the server as 670 // null. It is an error if a field in this list has a non-empty value. 671 // This may be used to include null fields in Patch requests. 672 NullFields []string `json:"-"` 673} 674 675func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) { 676 type NoMethod GooglePrivacyDlpV2BigQueryKey 677 raw := NoMethod(*s) 678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 679} 680 681// GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table 682// and row identifiers. 683type GooglePrivacyDlpV2BigQueryOptions struct { 684 // ExcludedFields: References to fields excluded from scanning. This 685 // allows you to skip inspection of entire columns which you know have 686 // no findings. 687 ExcludedFields []*GooglePrivacyDlpV2FieldId `json:"excludedFields,omitempty"` 688 689 // IdentifyingFields: Table fields that may uniquely identify a row 690 // within the table. When `actions.saveFindings.outputConfig.table` is 691 // specified, the values of columns specified here are available in the 692 // output table under 693 // `location.content_locations.record_location.record_key.id_values`. 694 // Nested fields such as `person.birthdate.year` are allowed. 695 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 696 697 // RowsLimit: Max number of rows to scan. If the table has more rows 698 // than this value, the rest of the rows are omitted. If not set, or if 699 // set to 0, all rows will be scanned. Only one of rows_limit and 700 // rows_limit_percent can be specified. Cannot be used in conjunction 701 // with TimespanConfig. 702 RowsLimit int64 `json:"rowsLimit,omitempty,string"` 703 704 // RowsLimitPercent: Max percentage of rows to scan. The rest are 705 // omitted. The number of rows scanned is rounded down. Must be between 706 // 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. 707 // Only one of rows_limit and rows_limit_percent can be specified. 708 // Cannot be used in conjunction with TimespanConfig. 709 RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"` 710 711 // Possible values: 712 // "SAMPLE_METHOD_UNSPECIFIED" 713 // "TOP" - Scan groups of rows in the order BigQuery provides 714 // (default). Multiple groups of rows may be scanned in parallel, so 715 // results may not appear in the same order the rows are read. 716 // "RANDOM_START" - Randomly pick groups of rows to scan. 717 SampleMethod string `json:"sampleMethod,omitempty"` 718 719 // TableReference: Complete BigQuery table reference. 720 TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"` 721 722 // ForceSendFields is a list of field names (e.g. "ExcludedFields") to 723 // unconditionally include in API requests. By default, fields with 724 // empty values are omitted from API requests. However, any non-pointer, 725 // non-interface field appearing in ForceSendFields will be sent to the 726 // server regardless of whether the field is empty or not. This may be 727 // used to include empty fields in Patch requests. 728 ForceSendFields []string `json:"-"` 729 730 // NullFields is a list of field names (e.g. "ExcludedFields") to 731 // include in API requests with the JSON null value. By default, fields 732 // with empty values are omitted from API requests. However, any field 733 // with an empty value appearing in NullFields will be sent to the 734 // server as null. It is an error if a field in this list has a 735 // non-empty value. This may be used to include null fields in Patch 736 // requests. 737 NullFields []string `json:"-"` 738} 739 740func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) { 741 type NoMethod GooglePrivacyDlpV2BigQueryOptions 742 raw := NoMethod(*s) 743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 744} 745 746// GooglePrivacyDlpV2BigQueryTable: Message defining the location of a 747// BigQuery table. A table is uniquely identified by its project_id, 748// dataset_id, and table_name. Within a query a table is often 749// referenced with a string in the format of: `:.` or `..`. 750type GooglePrivacyDlpV2BigQueryTable struct { 751 // DatasetId: Dataset ID of the table. 752 DatasetId string `json:"datasetId,omitempty"` 753 754 // ProjectId: The Google Cloud Platform project ID of the project 755 // containing the table. If omitted, project ID is inferred from the API 756 // call. 757 ProjectId string `json:"projectId,omitempty"` 758 759 // TableId: Name of the table. 760 TableId string `json:"tableId,omitempty"` 761 762 // ForceSendFields is a list of field names (e.g. "DatasetId") to 763 // unconditionally include in API requests. By default, fields with 764 // empty values are omitted from API requests. However, any non-pointer, 765 // non-interface field appearing in ForceSendFields will be sent to the 766 // server regardless of whether the field is empty or not. This may be 767 // used to include empty fields in Patch requests. 768 ForceSendFields []string `json:"-"` 769 770 // NullFields is a list of field names (e.g. "DatasetId") to include in 771 // API requests with the JSON null value. By default, fields with empty 772 // values are omitted from API requests. However, any field with an 773 // empty value appearing in NullFields will be sent to the server as 774 // null. It is an error if a field in this list has a non-empty value. 775 // This may be used to include null fields in Patch requests. 776 NullFields []string `json:"-"` 777} 778 779func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) { 780 type NoMethod GooglePrivacyDlpV2BigQueryTable 781 raw := NoMethod(*s) 782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 783} 784 785// GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected 786// text within an image. 787type GooglePrivacyDlpV2BoundingBox struct { 788 // Height: Height of the bounding box in pixels. 789 Height int64 `json:"height,omitempty"` 790 791 // Left: Left coordinate of the bounding box. (0,0) is upper left. 792 Left int64 `json:"left,omitempty"` 793 794 // Top: Top coordinate of the bounding box. (0,0) is upper left. 795 Top int64 `json:"top,omitempty"` 796 797 // Width: Width of the bounding box in pixels. 798 Width int64 `json:"width,omitempty"` 799 800 // ForceSendFields is a list of field names (e.g. "Height") to 801 // unconditionally include in API requests. By default, fields with 802 // empty values are omitted from API requests. However, any non-pointer, 803 // non-interface field appearing in ForceSendFields will be sent to the 804 // server regardless of whether the field is empty or not. This may be 805 // used to include empty fields in Patch requests. 806 ForceSendFields []string `json:"-"` 807 808 // NullFields is a list of field names (e.g. "Height") to include in API 809 // requests with the JSON null value. By default, fields with empty 810 // values are omitted from API requests. However, any field with an 811 // empty value appearing in NullFields will be sent to the server as 812 // null. It is an error if a field in this list has a non-empty value. 813 // This may be used to include null fields in Patch requests. 814 NullFields []string `json:"-"` 815} 816 817func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) { 818 type NoMethod GooglePrivacyDlpV2BoundingBox 819 raw := NoMethod(*s) 820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 821} 822 823// GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along 824// with replacement values. 825type GooglePrivacyDlpV2Bucket struct { 826 // Max: Upper bound of the range, exclusive; type must match min. 827 Max *GooglePrivacyDlpV2Value `json:"max,omitempty"` 828 829 // Min: Lower bound of the range, inclusive. Type should be the same as 830 // max if used. 831 Min *GooglePrivacyDlpV2Value `json:"min,omitempty"` 832 833 // ReplacementValue: Required. Replacement value for this bucket. 834 ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"` 835 836 // ForceSendFields is a list of field names (e.g. "Max") to 837 // unconditionally include in API requests. By default, fields with 838 // empty values are omitted from API requests. However, any non-pointer, 839 // non-interface field appearing in ForceSendFields will be sent to the 840 // server regardless of whether the field is empty or not. This may be 841 // used to include empty fields in Patch requests. 842 ForceSendFields []string `json:"-"` 843 844 // NullFields is a list of field names (e.g. "Max") to include in API 845 // requests with the JSON null value. By default, fields with empty 846 // values are omitted from API requests. However, any field with an 847 // empty value appearing in NullFields will be sent to the server as 848 // null. It is an error if a field in this list has a non-empty value. 849 // This may be used to include null fields in Patch requests. 850 NullFields []string `json:"-"` 851} 852 853func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) { 854 type NoMethod GooglePrivacyDlpV2Bucket 855 raw := NoMethod(*s) 856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 857} 858 859// GooglePrivacyDlpV2BucketingConfig: Generalization function that 860// buckets values based on ranges. The ranges and replacement values are 861// dynamically provided by the user for custom behavior, such as 1-30 -> 862// LOW 31-65 -> MEDIUM 66-100 -> HIGH This can be used on data of type: 863// number, long, string, timestamp. If the bound `Value` type differs 864// from the type of data being transformed, we will first attempt 865// converting the type of the data to be transformed to match the type 866// of the bound before comparing. See 867// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 868type GooglePrivacyDlpV2BucketingConfig struct { 869 // Buckets: Set of buckets. Ranges must be non-overlapping. 870 Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"` 871 872 // ForceSendFields is a list of field names (e.g. "Buckets") to 873 // unconditionally include in API requests. By default, fields with 874 // empty values are omitted from API requests. However, any non-pointer, 875 // non-interface field appearing in ForceSendFields will be sent to the 876 // server regardless of whether the field is empty or not. This may be 877 // used to include empty fields in Patch requests. 878 ForceSendFields []string `json:"-"` 879 880 // NullFields is a list of field names (e.g. "Buckets") to include in 881 // API requests with the JSON null value. By default, fields with empty 882 // values are omitted from API requests. However, any field with an 883 // empty value appearing in NullFields will be sent to the server as 884 // null. It is an error if a field in this list has a non-empty value. 885 // This may be used to include null fields in Patch requests. 886 NullFields []string `json:"-"` 887} 888 889func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) { 890 type NoMethod GooglePrivacyDlpV2BucketingConfig 891 raw := NoMethod(*s) 892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 893} 894 895// GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or 896// redact. 897type GooglePrivacyDlpV2ByteContentItem struct { 898 // Data: Content data to inspect or redact. 899 Data string `json:"data,omitempty"` 900 901 // Type: The type of data stored in the bytes string. Default will be 902 // TEXT_UTF8. 903 // 904 // Possible values: 905 // "BYTES_TYPE_UNSPECIFIED" - Unused 906 // "IMAGE" - Any image type. 907 // "IMAGE_JPEG" - jpeg 908 // "IMAGE_BMP" - bmp 909 // "IMAGE_PNG" - png 910 // "IMAGE_SVG" - svg 911 // "TEXT_UTF8" - plain text 912 // "WORD_DOCUMENT" - docx, docm, dotx, dotm 913 // "PDF" - pdf 914 // "AVRO" - avro 915 // "CSV" - csv 916 // "TSV" - tsv 917 Type string `json:"type,omitempty"` 918 919 // ForceSendFields is a list of field names (e.g. "Data") to 920 // unconditionally include in API requests. By default, fields with 921 // empty values are omitted from API requests. However, any non-pointer, 922 // non-interface field appearing in ForceSendFields will be sent to the 923 // server regardless of whether the field is empty or not. This may be 924 // used to include empty fields in Patch requests. 925 ForceSendFields []string `json:"-"` 926 927 // NullFields is a list of field names (e.g. "Data") to include in API 928 // requests with the JSON null value. By default, fields with empty 929 // values are omitted from API requests. However, any field with an 930 // empty value appearing in NullFields will be sent to the server as 931 // null. It is an error if a field in this list has a non-empty value. 932 // This may be used to include null fields in Patch requests. 933 NullFields []string `json:"-"` 934} 935 936func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) { 937 type NoMethod GooglePrivacyDlpV2ByteContentItem 938 raw := NoMethod(*s) 939 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 940} 941 942// GooglePrivacyDlpV2CancelDlpJobRequest: The request message for 943// canceling a DLP job. 944type GooglePrivacyDlpV2CancelDlpJobRequest struct { 945} 946 947// GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats 948// over an individual column, including number of distinct values and 949// value count distribution. 950type GooglePrivacyDlpV2CategoricalStatsConfig struct { 951 // Field: Field to compute categorical stats on. All column types are 952 // supported except for arrays and structs. However, it may be more 953 // informative to use NumericalStats when the field type is supported, 954 // depending on the data. 955 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 956 957 // ForceSendFields is a list of field names (e.g. "Field") to 958 // unconditionally include in API requests. By default, fields with 959 // empty values are omitted from API requests. However, any non-pointer, 960 // non-interface field appearing in ForceSendFields will be sent to the 961 // server regardless of whether the field is empty or not. This may be 962 // used to include empty fields in Patch requests. 963 ForceSendFields []string `json:"-"` 964 965 // NullFields is a list of field names (e.g. "Field") to include in API 966 // requests with the JSON null value. By default, fields with empty 967 // values are omitted from API requests. However, any field with an 968 // empty value appearing in NullFields will be sent to the server as 969 // null. It is an error if a field in this list has a non-empty value. 970 // This may be used to include null fields in Patch requests. 971 NullFields []string `json:"-"` 972} 973 974func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) { 975 type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig 976 raw := NoMethod(*s) 977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 978} 979 980// GooglePrivacyDlpV2CategoricalStatsHistogramBucket: Histogram of value 981// frequencies in the column. 982type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct { 983 // BucketSize: Total number of values in this bucket. 984 BucketSize int64 `json:"bucketSize,omitempty,string"` 985 986 // BucketValueCount: Total number of distinct values in this bucket. 987 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 988 989 // BucketValues: Sample of value frequencies in this bucket. The total 990 // number of values returned per bucket is capped at 20. 991 BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"` 992 993 // ValueFrequencyLowerBound: Lower bound on the value frequency of the 994 // values in this bucket. 995 ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"` 996 997 // ValueFrequencyUpperBound: Upper bound on the value frequency of the 998 // values in this bucket. 999 ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"` 1000 1001 // ForceSendFields is a list of field names (e.g. "BucketSize") to 1002 // unconditionally include in API requests. By default, fields with 1003 // empty values are omitted from API requests. However, any non-pointer, 1004 // non-interface field appearing in ForceSendFields will be sent to the 1005 // server regardless of whether the field is empty or not. This may be 1006 // used to include empty fields in Patch requests. 1007 ForceSendFields []string `json:"-"` 1008 1009 // NullFields is a list of field names (e.g. "BucketSize") to include in 1010 // API requests with the JSON null value. By default, fields with empty 1011 // values are omitted from API requests. However, any field with an 1012 // empty value appearing in NullFields will be sent to the server as 1013 // null. It is an error if a field in this list has a non-empty value. 1014 // This may be used to include null fields in Patch requests. 1015 NullFields []string `json:"-"` 1016} 1017 1018func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) { 1019 type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket 1020 raw := NoMethod(*s) 1021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1022} 1023 1024// GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical 1025// stats computation. 1026type GooglePrivacyDlpV2CategoricalStatsResult struct { 1027 // ValueFrequencyHistogramBuckets: Histogram of value frequencies in the 1028 // column. 1029 ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"` 1030 1031 // ForceSendFields is a list of field names (e.g. 1032 // "ValueFrequencyHistogramBuckets") to unconditionally include in API 1033 // requests. By default, fields with empty values are omitted from API 1034 // requests. However, any non-pointer, non-interface field appearing in 1035 // ForceSendFields will be sent to the server regardless of whether the 1036 // field is empty or not. This may be used to include empty fields in 1037 // Patch requests. 1038 ForceSendFields []string `json:"-"` 1039 1040 // NullFields is a list of field names (e.g. 1041 // "ValueFrequencyHistogramBuckets") to include in API requests with the 1042 // JSON null value. By default, fields with empty values are omitted 1043 // from API requests. However, any field with an empty value appearing 1044 // in NullFields will be sent to the server as null. It is an error if a 1045 // field in this list has a non-empty value. This may be used to include 1046 // null fields in Patch requests. 1047 NullFields []string `json:"-"` 1048} 1049 1050func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) { 1051 type NoMethod GooglePrivacyDlpV2CategoricalStatsResult 1052 raw := NoMethod(*s) 1053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1054} 1055 1056// GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by 1057// replacing a given number of characters with a fixed character. 1058// Masking can start from the beginning or end of the string. This can 1059// be used on data of any type (numbers, longs, and so on) and when 1060// de-identifying structured data we'll attempt to preserve the original 1061// data's type. (This allows you to take a long like 123 and modify it 1062// to a string like **3. 1063type GooglePrivacyDlpV2CharacterMaskConfig struct { 1064 // CharactersToIgnore: When masking a string, items in this list will be 1065 // skipped when replacing characters. For example, if the input string 1066 // is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 1067 // characters with `*`, Cloud DLP returns `***-**5-5555`. 1068 CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"` 1069 1070 // MaskingCharacter: Character to use to mask the sensitive values—for 1071 // example, `*` for an alphabetic string such as a name, or `0` for a 1072 // numeric string such as ZIP code or credit card number. This string 1073 // must have a length of 1. If not supplied, this value defaults to `*` 1074 // for strings, and `0` for digits. 1075 MaskingCharacter string `json:"maskingCharacter,omitempty"` 1076 1077 // NumberToMask: Number of characters to mask. If not set, all matching 1078 // chars will be masked. Skipped characters do not count towards this 1079 // tally. 1080 NumberToMask int64 `json:"numberToMask,omitempty"` 1081 1082 // ReverseOrder: Mask characters in reverse order. For example, if 1083 // `masking_character` is `0`, `number_to_mask` is `14`, and 1084 // `reverse_order` is `false`, then the input string 1085 // `1234-5678-9012-3456` is masked as `00000000000000-3456`. If 1086 // `masking_character` is `*`, `number_to_mask` is `3`, and 1087 // `reverse_order` is `true`, then the string `12345` is masked as 1088 // `12***`. 1089 ReverseOrder bool `json:"reverseOrder,omitempty"` 1090 1091 // ForceSendFields is a list of field names (e.g. "CharactersToIgnore") 1092 // to unconditionally include in API requests. By default, fields with 1093 // empty values are omitted from API requests. However, any non-pointer, 1094 // non-interface field appearing in ForceSendFields will be sent to the 1095 // server regardless of whether the field is empty or not. This may be 1096 // used to include empty fields in Patch requests. 1097 ForceSendFields []string `json:"-"` 1098 1099 // NullFields is a list of field names (e.g. "CharactersToIgnore") to 1100 // include in API requests with the JSON null value. By default, fields 1101 // with empty values are omitted from API requests. However, any field 1102 // with an empty value appearing in NullFields will be sent to the 1103 // server as null. It is an error if a field in this list has a 1104 // non-empty value. This may be used to include null fields in Patch 1105 // requests. 1106 NullFields []string `json:"-"` 1107} 1108 1109func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) { 1110 type NoMethod GooglePrivacyDlpV2CharacterMaskConfig 1111 raw := NoMethod(*s) 1112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1113} 1114 1115// GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing 1116// deidentification of a value. These will be left alone and skipped. 1117type GooglePrivacyDlpV2CharsToIgnore struct { 1118 // CharactersToSkip: Characters to not transform when masking. 1119 CharactersToSkip string `json:"charactersToSkip,omitempty"` 1120 1121 // CommonCharactersToIgnore: Common characters to not transform when 1122 // masking. Useful to avoid removing punctuation. 1123 // 1124 // Possible values: 1125 // "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" - Unused. 1126 // "NUMERIC" - 0-9 1127 // "ALPHA_UPPER_CASE" - A-Z 1128 // "ALPHA_LOWER_CASE" - a-z 1129 // "PUNCTUATION" - US Punctuation, one of 1130 // !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ 1131 // "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r] 1132 CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"` 1133 1134 // ForceSendFields is a list of field names (e.g. "CharactersToSkip") to 1135 // unconditionally include in API requests. By default, fields with 1136 // empty values are omitted from API requests. However, any non-pointer, 1137 // non-interface field appearing in ForceSendFields will be sent to the 1138 // server regardless of whether the field is empty or not. This may be 1139 // used to include empty fields in Patch requests. 1140 ForceSendFields []string `json:"-"` 1141 1142 // NullFields is a list of field names (e.g. "CharactersToSkip") to 1143 // include in API requests with the JSON null value. By default, fields 1144 // with empty values are omitted from API requests. However, any field 1145 // with an empty value appearing in NullFields will be sent to the 1146 // server as null. It is an error if a field in this list has a 1147 // non-empty value. This may be used to include null fields in Patch 1148 // requests. 1149 NullFields []string `json:"-"` 1150} 1151 1152func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) { 1153 type NoMethod GooglePrivacyDlpV2CharsToIgnore 1154 raw := NoMethod(*s) 1155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1156} 1157 1158// GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of 1159// files in Cloud Storage. 1160type GooglePrivacyDlpV2CloudStorageFileSet struct { 1161 // Url: The url, in the format `gs:///`. Trailing wildcard in the path 1162 // is allowed. 1163 Url string `json:"url,omitempty"` 1164 1165 // ForceSendFields is a list of field names (e.g. "Url") to 1166 // unconditionally include in API requests. By default, fields with 1167 // empty values are omitted from API requests. However, any non-pointer, 1168 // non-interface field appearing in ForceSendFields will be sent to the 1169 // server regardless of whether the field is empty or not. This may be 1170 // used to include empty fields in Patch requests. 1171 ForceSendFields []string `json:"-"` 1172 1173 // NullFields is a list of field names (e.g. "Url") to include in API 1174 // requests with the JSON null value. By default, fields with empty 1175 // values are omitted from API requests. However, any field with an 1176 // empty value appearing in NullFields will be sent to the server as 1177 // null. It is an error if a field in this list has a non-empty value. 1178 // This may be used to include null fields in Patch requests. 1179 NullFields []string `json:"-"` 1180} 1181 1182func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) { 1183 type NoMethod GooglePrivacyDlpV2CloudStorageFileSet 1184 raw := NoMethod(*s) 1185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1186} 1187 1188// GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a 1189// set of files within a Google Cloud Storage bucket. 1190type GooglePrivacyDlpV2CloudStorageOptions struct { 1191 // BytesLimitPerFile: Max number of bytes to scan from a file. If a 1192 // scanned file's size is bigger than this value then the rest of the 1193 // bytes are omitted. Only one of bytes_limit_per_file and 1194 // bytes_limit_per_file_percent can be specified. 1195 BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` 1196 1197 // BytesLimitPerFilePercent: Max percentage of bytes to scan from a 1198 // file. The rest are omitted. The number of bytes scanned is rounded 1199 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1200 // limit. Defaults to 0. Only one of bytes_limit_per_file and 1201 // bytes_limit_per_file_percent can be specified. 1202 BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"` 1203 1204 // FileSet: The set of one or more files to scan. 1205 FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"` 1206 1207 // FileTypes: List of file type groups to include in the scan. If empty, 1208 // all files are scanned and available data format processors are 1209 // applied. In addition, the binary content of the selected files is 1210 // always scanned as well. Images are scanned only as binary if the 1211 // specified region does not support image inspection and no file_types 1212 // were specified. Image inspection is restricted to 'global', 'us', 1213 // 'asia', and 'europe'. 1214 // 1215 // Possible values: 1216 // "FILE_TYPE_UNSPECIFIED" - Includes all files. 1217 // "BINARY_FILE" - Includes all file extensions not covered by another 1218 // entry. Binary scanning attempts to convert the content of the file to 1219 // utf_8 to scan the file. If you wish to avoid this fall back, specify 1220 // one or more of the other FileType's in your storage scan. 1221 // "TEXT_FILE" - Included file extensions: asc, brf, c, cc, cpp, csv, 1222 // cxx, c++, cs, css, dart, eml, go, h, hh, hpp, hxx, h++, hs, html, 1223 // htm, shtml, shtm, xhtml, lhs, ini, java, js, json, ocaml, md, mkd, 1224 // markdown, m, ml, mli, pl, pm, php, phtml, pht, py, pyw, rb, rbw, rs, 1225 // rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs, wml, xml, xsl, 1226 // xsd, yml, yaml. 1227 // "IMAGE" - Included file extensions: bmp, gif, jpg, jpeg, jpe, png. 1228 // bytes_limit_per_file has no effect on image files. Image inspection 1229 // is restricted to 'global', 'us', 'asia', and 'europe'. 1230 // "WORD" - Word files >30 MB will be scanned as binary files. 1231 // Included file extensions: docx, dotx, docm, dotm 1232 // "PDF" - PDF files >30 MB will be scanned as binary files. Included 1233 // file extensions: pdf 1234 // "AVRO" - Included file extensions: avro 1235 // "CSV" - Included file extensions: csv 1236 // "TSV" - Included file extensions: tsv 1237 FileTypes []string `json:"fileTypes,omitempty"` 1238 1239 // FilesLimitPercent: Limits the number of files to scan to this 1240 // percentage of the input FileSet. Number of files scanned is rounded 1241 // down. Must be between 0 and 100, inclusively. Both 0 and 100 means no 1242 // limit. Defaults to 0. 1243 FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"` 1244 1245 // Possible values: 1246 // "SAMPLE_METHOD_UNSPECIFIED" 1247 // "TOP" - Scan from the top (default). 1248 // "RANDOM_START" - For each file larger than bytes_limit_per_file, 1249 // randomly pick the offset to start scanning. The scanned bytes are 1250 // contiguous. 1251 SampleMethod string `json:"sampleMethod,omitempty"` 1252 1253 // ForceSendFields is a list of field names (e.g. "BytesLimitPerFile") 1254 // to unconditionally include in API requests. By default, fields with 1255 // empty values are omitted from API requests. However, any non-pointer, 1256 // non-interface field appearing in ForceSendFields will be sent to the 1257 // server regardless of whether the field is empty or not. This may be 1258 // used to include empty fields in Patch requests. 1259 ForceSendFields []string `json:"-"` 1260 1261 // NullFields is a list of field names (e.g. "BytesLimitPerFile") to 1262 // include in API requests with the JSON null value. By default, fields 1263 // with empty values are omitted from API requests. However, any field 1264 // with an empty value appearing in NullFields will be sent to the 1265 // server as null. It is an error if a field in this list has a 1266 // non-empty value. This may be used to include null fields in Patch 1267 // requests. 1268 NullFields []string `json:"-"` 1269} 1270 1271func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) { 1272 type NoMethod GooglePrivacyDlpV2CloudStorageOptions 1273 raw := NoMethod(*s) 1274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1275} 1276 1277// GooglePrivacyDlpV2CloudStoragePath: Message representing a single 1278// file or path in Cloud Storage. 1279type GooglePrivacyDlpV2CloudStoragePath struct { 1280 // Path: A url representing a file or path (no wildcards) in Cloud 1281 // Storage. Example: gs://[BUCKET_NAME]/dictionary.txt 1282 Path string `json:"path,omitempty"` 1283 1284 // ForceSendFields is a list of field names (e.g. "Path") to 1285 // unconditionally include in API requests. By default, fields with 1286 // empty values are omitted from API requests. However, any non-pointer, 1287 // non-interface field appearing in ForceSendFields will be sent to the 1288 // server regardless of whether the field is empty or not. This may be 1289 // used to include empty fields in Patch requests. 1290 ForceSendFields []string `json:"-"` 1291 1292 // NullFields is a list of field names (e.g. "Path") to include in API 1293 // requests with the JSON null value. By default, fields with empty 1294 // values are omitted from API requests. However, any field with an 1295 // empty value appearing in NullFields will be sent to the server as 1296 // null. It is an error if a field in this list has a non-empty value. 1297 // This may be used to include null fields in Patch requests. 1298 NullFields []string `json:"-"` 1299} 1300 1301func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) { 1302 type NoMethod GooglePrivacyDlpV2CloudStoragePath 1303 raw := NoMethod(*s) 1304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1305} 1306 1307// GooglePrivacyDlpV2CloudStorageRegexFileSet: Message representing a 1308// set of files in a Cloud Storage bucket. Regular expressions are used 1309// to allow fine-grained control over which files in the bucket to 1310// include. Included files are those that match at least one item in 1311// `include_regex` and do not match any items in `exclude_regex`. Note 1312// that a file that matches items from both lists will _not_ be 1313// included. For a match to occur, the entire file path (i.e., 1314// everything in the url after the bucket name) must match the regular 1315// expression. For example, given the input `{bucket_name: "mybucket", 1316// include_regex: ["directory1/.*"], exclude_regex: 1317// ["directory1/excluded.*"]}`: * `gs://mybucket/directory1/myfile` will 1318// be included * `gs://mybucket/directory1/directory2/myfile` will be 1319// included (`.*` matches across `/`) * 1320// `gs://mybucket/directory0/directory1/myfile` will _not_ be included 1321// (the full path doesn't match any items in `include_regex`) * 1322// `gs://mybucket/directory1/excludedfile` will _not_ be included (the 1323// path matches an item in `exclude_regex`) If `include_regex` is left 1324// empty, it will match all files by default (this is equivalent to 1325// setting `include_regex: [".*"]`). Some other common use cases: * 1326// `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include 1327// all files in `mybucket` except for .pdf files * `{bucket_name: 1328// "mybucket", include_regex: ["directory/[^/]+"]}` will include all 1329// files directly under `gs://mybucket/directory/`, without matching 1330// across `/` 1331type GooglePrivacyDlpV2CloudStorageRegexFileSet struct { 1332 // BucketName: The name of a Cloud Storage bucket. Required. 1333 BucketName string `json:"bucketName,omitempty"` 1334 1335 // ExcludeRegex: A list of regular expressions matching file paths to 1336 // exclude. All files in the bucket that match at least one of these 1337 // regular expressions will be excluded from the scan. Regular 1338 // expressions use RE2 1339 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1340 // found under the google/re2 repository on GitHub. 1341 ExcludeRegex []string `json:"excludeRegex,omitempty"` 1342 1343 // IncludeRegex: A list of regular expressions matching file paths to 1344 // include. All files in the bucket that match at least one of these 1345 // regular expressions will be included in the set of files, except for 1346 // those that also match an item in `exclude_regex`. Leaving this field 1347 // empty will match all files by default (this is equivalent to 1348 // including `.*` in the list). Regular expressions use RE2 1349 // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be 1350 // found under the google/re2 repository on GitHub. 1351 IncludeRegex []string `json:"includeRegex,omitempty"` 1352 1353 // ForceSendFields is a list of field names (e.g. "BucketName") to 1354 // unconditionally include in API requests. By default, fields with 1355 // empty values are omitted from API requests. However, any non-pointer, 1356 // non-interface field appearing in ForceSendFields will be sent to the 1357 // server regardless of whether the field is empty or not. This may be 1358 // used to include empty fields in Patch requests. 1359 ForceSendFields []string `json:"-"` 1360 1361 // NullFields is a list of field names (e.g. "BucketName") to include in 1362 // API requests with the JSON null value. By default, fields with empty 1363 // values are omitted from API requests. However, any field with an 1364 // empty value appearing in NullFields will be sent to the server as 1365 // null. It is an error if a field in this list has a non-empty value. 1366 // This may be used to include null fields in Patch requests. 1367 NullFields []string `json:"-"` 1368} 1369 1370func (s *GooglePrivacyDlpV2CloudStorageRegexFileSet) MarshalJSON() ([]byte, error) { 1371 type NoMethod GooglePrivacyDlpV2CloudStorageRegexFileSet 1372 raw := NoMethod(*s) 1373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1374} 1375 1376// GooglePrivacyDlpV2Color: Represents a color in the RGB color space. 1377type GooglePrivacyDlpV2Color struct { 1378 // Blue: The amount of blue in the color as a value in the interval [0, 1379 // 1]. 1380 Blue float64 `json:"blue,omitempty"` 1381 1382 // Green: The amount of green in the color as a value in the interval 1383 // [0, 1]. 1384 Green float64 `json:"green,omitempty"` 1385 1386 // Red: The amount of red in the color as a value in the interval [0, 1387 // 1]. 1388 Red float64 `json:"red,omitempty"` 1389 1390 // ForceSendFields is a list of field names (e.g. "Blue") to 1391 // unconditionally include in API requests. By default, fields with 1392 // empty values are omitted from API requests. However, any non-pointer, 1393 // non-interface field appearing in ForceSendFields will be sent to the 1394 // server regardless of whether the field is empty or not. This may be 1395 // used to include empty fields in Patch requests. 1396 ForceSendFields []string `json:"-"` 1397 1398 // NullFields is a list of field names (e.g. "Blue") to include in API 1399 // requests with the JSON null value. By default, fields with empty 1400 // values are omitted from API requests. However, any field with an 1401 // empty value appearing in NullFields will be sent to the server as 1402 // null. It is an error if a field in this list has a non-empty value. 1403 // This may be used to include null fields in Patch requests. 1404 NullFields []string `json:"-"` 1405} 1406 1407func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) { 1408 type NoMethod GooglePrivacyDlpV2Color 1409 raw := NoMethod(*s) 1410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1411} 1412 1413func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error { 1414 type NoMethod GooglePrivacyDlpV2Color 1415 var s1 struct { 1416 Blue gensupport.JSONFloat64 `json:"blue"` 1417 Green gensupport.JSONFloat64 `json:"green"` 1418 Red gensupport.JSONFloat64 `json:"red"` 1419 *NoMethod 1420 } 1421 s1.NoMethod = (*NoMethod)(s) 1422 if err := json.Unmarshal(data, &s1); err != nil { 1423 return err 1424 } 1425 s.Blue = float64(s1.Blue) 1426 s.Green = float64(s1.Green) 1427 s.Red = float64(s1.Red) 1428 return nil 1429} 1430 1431// GooglePrivacyDlpV2Condition: The field type of `value` and `field` do 1432// not need to match to be considered equal, but not all comparisons are 1433// possible. EQUAL_TO and NOT_EQUAL_TO attempt to compare even with 1434// incompatible types, but all other comparisons are invalid with 1435// incompatible types. A `value` of type: - `string` can be compared 1436// against all other types - `boolean` can only be compared against 1437// other booleans - `integer` can be compared against doubles or a 1438// string if the string value can be parsed as an integer. - `double` 1439// can be compared against integers or a string if the string can be 1440// parsed as a double. - `Timestamp` can be compared against strings in 1441// RFC 3339 date string format. - `TimeOfDay` can be compared against 1442// timestamps and strings in the format of 'HH:mm:ss'. If we fail to 1443// compare do to type mismatch, a warning will be given and the 1444// condition will evaluate to false. 1445type GooglePrivacyDlpV2Condition struct { 1446 // Field: Required. Field within the record this condition is evaluated 1447 // against. 1448 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 1449 1450 // Operator: Required. Operator used to compare the field or infoType to 1451 // the value. 1452 // 1453 // Possible values: 1454 // "RELATIONAL_OPERATOR_UNSPECIFIED" - Unused 1455 // "EQUAL_TO" - Equal. Attempts to match even with incompatible types. 1456 // "NOT_EQUAL_TO" - Not equal to. Attempts to match even with 1457 // incompatible types. 1458 // "GREATER_THAN" - Greater than. 1459 // "LESS_THAN" - Less than. 1460 // "GREATER_THAN_OR_EQUALS" - Greater than or equals. 1461 // "LESS_THAN_OR_EQUALS" - Less than or equals. 1462 // "EXISTS" - Exists 1463 Operator string `json:"operator,omitempty"` 1464 1465 // Value: Value to compare against. [Mandatory, except for `EXISTS` 1466 // tests.] 1467 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 1468 1469 // ForceSendFields is a list of field names (e.g. "Field") to 1470 // unconditionally include in API requests. By default, fields with 1471 // empty values are omitted from API requests. However, any non-pointer, 1472 // non-interface field appearing in ForceSendFields will be sent to the 1473 // server regardless of whether the field is empty or not. This may be 1474 // used to include empty fields in Patch requests. 1475 ForceSendFields []string `json:"-"` 1476 1477 // NullFields is a list of field names (e.g. "Field") to include in API 1478 // requests with the JSON null value. By default, fields with empty 1479 // values are omitted from API requests. However, any field with an 1480 // empty value appearing in NullFields will be sent to the server as 1481 // null. It is an error if a field in this list has a non-empty value. 1482 // This may be used to include null fields in Patch requests. 1483 NullFields []string `json:"-"` 1484} 1485 1486func (s *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) { 1487 type NoMethod GooglePrivacyDlpV2Condition 1488 raw := NoMethod(*s) 1489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1490} 1491 1492// GooglePrivacyDlpV2Conditions: A collection of conditions. 1493type GooglePrivacyDlpV2Conditions struct { 1494 // Conditions: A collection of conditions. 1495 Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"` 1496 1497 // ForceSendFields is a list of field names (e.g. "Conditions") to 1498 // unconditionally include in API requests. By default, fields with 1499 // empty values are omitted from API requests. However, any non-pointer, 1500 // non-interface field appearing in ForceSendFields will be sent to the 1501 // server regardless of whether the field is empty or not. This may be 1502 // used to include empty fields in Patch requests. 1503 ForceSendFields []string `json:"-"` 1504 1505 // NullFields is a list of field names (e.g. "Conditions") to include in 1506 // API requests with the JSON null value. By default, fields with empty 1507 // values are omitted from API requests. However, any field with an 1508 // empty value appearing in NullFields will be sent to the server as 1509 // null. It is an error if a field in this list has a non-empty value. 1510 // This may be used to include null fields in Patch requests. 1511 NullFields []string `json:"-"` 1512} 1513 1514func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) { 1515 type NoMethod GooglePrivacyDlpV2Conditions 1516 raw := NoMethod(*s) 1517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1518} 1519 1520// GooglePrivacyDlpV2Container: Represents a container that may contain 1521// DLP findings. Examples of a container include a file, table, or 1522// database record. 1523type GooglePrivacyDlpV2Container struct { 1524 // FullPath: A string representation of the full container name. 1525 // Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud 1526 // Storage: 'gs://Bucket/folders/filename.txt' 1527 FullPath string `json:"fullPath,omitempty"` 1528 1529 // ProjectId: Project where the finding was found. Can be different from 1530 // the project that owns the finding. 1531 ProjectId string `json:"projectId,omitempty"` 1532 1533 // RelativePath: The rest of the path after the root. Examples: - For 1534 // BigQuery table `project_id:dataset_id.table_id`, the relative path is 1535 // `table_id` - Google Cloud Storage file 1536 // `gs://bucket/folder/filename.txt`, the relative path is 1537 // `folder/filename.txt` 1538 RelativePath string `json:"relativePath,omitempty"` 1539 1540 // RootPath: The root of the container. Examples: - For BigQuery table 1541 // `project_id:dataset_id.table_id`, the root is `dataset_id` - For 1542 // Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root 1543 // is `gs://bucket` 1544 RootPath string `json:"rootPath,omitempty"` 1545 1546 // Type: Container type, for example BigQuery or Google Cloud Storage. 1547 Type string `json:"type,omitempty"` 1548 1549 // UpdateTime: Findings container modification timestamp, if applicable. 1550 // For Google Cloud Storage contains last file modification timestamp. 1551 // For BigQuery table contains last_modified_time property. For 1552 // Datastore - not populated. 1553 UpdateTime string `json:"updateTime,omitempty"` 1554 1555 // Version: Findings container version, if available ("generation" for 1556 // Google Cloud Storage). 1557 Version string `json:"version,omitempty"` 1558 1559 // ForceSendFields is a list of field names (e.g. "FullPath") to 1560 // unconditionally include in API requests. By default, fields with 1561 // empty values are omitted from API requests. However, any non-pointer, 1562 // non-interface field appearing in ForceSendFields will be sent to the 1563 // server regardless of whether the field is empty or not. This may be 1564 // used to include empty fields in Patch requests. 1565 ForceSendFields []string `json:"-"` 1566 1567 // NullFields is a list of field names (e.g. "FullPath") to include in 1568 // API requests with the JSON null value. By default, fields with empty 1569 // values are omitted from API requests. However, any field with an 1570 // empty value appearing in NullFields will be sent to the server as 1571 // null. It is an error if a field in this list has a non-empty value. 1572 // This may be used to include null fields in Patch requests. 1573 NullFields []string `json:"-"` 1574} 1575 1576func (s *GooglePrivacyDlpV2Container) MarshalJSON() ([]byte, error) { 1577 type NoMethod GooglePrivacyDlpV2Container 1578 raw := NoMethod(*s) 1579 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1580} 1581 1582// GooglePrivacyDlpV2ContentItem: Container structure for the content to 1583// inspect. 1584type GooglePrivacyDlpV2ContentItem struct { 1585 // ByteItem: Content data to inspect or redact. Replaces `type` and 1586 // `data`. 1587 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 1588 1589 // Table: Structured content for inspection. See 1590 // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 1591 // to learn more. 1592 Table *GooglePrivacyDlpV2Table `json:"table,omitempty"` 1593 1594 // Value: String data to inspect or redact. 1595 Value string `json:"value,omitempty"` 1596 1597 // ForceSendFields is a list of field names (e.g. "ByteItem") to 1598 // unconditionally include in API requests. By default, fields with 1599 // empty values are omitted from API requests. However, any non-pointer, 1600 // non-interface field appearing in ForceSendFields will be sent to the 1601 // server regardless of whether the field is empty or not. This may be 1602 // used to include empty fields in Patch requests. 1603 ForceSendFields []string `json:"-"` 1604 1605 // NullFields is a list of field names (e.g. "ByteItem") to include in 1606 // API requests with the JSON null value. By default, fields with empty 1607 // values are omitted from API requests. However, any field with an 1608 // empty value appearing in NullFields will be sent to the server as 1609 // null. It is an error if a field in this list has a non-empty value. 1610 // This may be used to include null fields in Patch requests. 1611 NullFields []string `json:"-"` 1612} 1613 1614func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) { 1615 type NoMethod GooglePrivacyDlpV2ContentItem 1616 raw := NoMethod(*s) 1617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1618} 1619 1620// GooglePrivacyDlpV2ContentLocation: Precise location of the finding 1621// within a document, record, image, or metadata container. 1622type GooglePrivacyDlpV2ContentLocation struct { 1623 // ContainerName: Name of the container where the finding is located. 1624 // The top level name is the source file name or table name. Names of 1625 // some common storage containers are formatted as follows: * BigQuery 1626 // tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: 1627 // `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested 1628 // names could be absent if the embedded object has no string identifier 1629 // (for an example an image contained within a document). 1630 ContainerName string `json:"containerName,omitempty"` 1631 1632 // ContainerTimestamp: Findings container modification timestamp, if 1633 // applicable. For Google Cloud Storage contains last file modification 1634 // timestamp. For BigQuery table contains last_modified_time property. 1635 // For Datastore - not populated. 1636 ContainerTimestamp string `json:"containerTimestamp,omitempty"` 1637 1638 // ContainerVersion: Findings container version, if available 1639 // ("generation" for Google Cloud Storage). 1640 ContainerVersion string `json:"containerVersion,omitempty"` 1641 1642 // DocumentLocation: Location data for document files. 1643 DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"` 1644 1645 // ImageLocation: Location within an image's pixels. 1646 ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"` 1647 1648 // MetadataLocation: Location within the metadata for inspected content. 1649 MetadataLocation *GooglePrivacyDlpV2MetadataLocation `json:"metadataLocation,omitempty"` 1650 1651 // RecordLocation: Location within a row or record of a database table. 1652 RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"` 1653 1654 // ForceSendFields is a list of field names (e.g. "ContainerName") to 1655 // unconditionally include in API requests. By default, fields with 1656 // empty values are omitted from API requests. However, any non-pointer, 1657 // non-interface field appearing in ForceSendFields will be sent to the 1658 // server regardless of whether the field is empty or not. This may be 1659 // used to include empty fields in Patch requests. 1660 ForceSendFields []string `json:"-"` 1661 1662 // NullFields is a list of field names (e.g. "ContainerName") to include 1663 // in API requests with the JSON null value. By default, fields with 1664 // empty values are omitted from API requests. However, any field with 1665 // an empty value appearing in NullFields will be sent to the server as 1666 // null. It is an error if a field in this list has a non-empty value. 1667 // This may be used to include null fields in Patch requests. 1668 NullFields []string `json:"-"` 1669} 1670 1671func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) { 1672 type NoMethod GooglePrivacyDlpV2ContentLocation 1673 raw := NoMethod(*s) 1674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1675} 1676 1677// GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message 1678// for CreateDeidentifyTemplate. 1679type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct { 1680 // DeidentifyTemplate: Required. The DeidentifyTemplate to create. 1681 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 1682 1683 // LocationId: Deprecated. This field has no effect. 1684 LocationId string `json:"locationId,omitempty"` 1685 1686 // TemplateId: The template id can contain uppercase and lowercase 1687 // letters, numbers, and hyphens; that is, it must match the regular 1688 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1689 // Can be empty to allow the system to generate one. 1690 TemplateId string `json:"templateId,omitempty"` 1691 1692 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 1693 // to unconditionally include in API requests. By default, fields with 1694 // empty values are omitted from API requests. However, any non-pointer, 1695 // non-interface field appearing in ForceSendFields will be sent to the 1696 // server regardless of whether the field is empty or not. This may be 1697 // used to include empty fields in Patch requests. 1698 ForceSendFields []string `json:"-"` 1699 1700 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 1701 // include in API requests with the JSON null value. By default, fields 1702 // with empty values are omitted from API requests. However, any field 1703 // with an empty value appearing in NullFields will be sent to the 1704 // server as null. It is an error if a field in this list has a 1705 // non-empty value. This may be used to include null fields in Patch 1706 // requests. 1707 NullFields []string `json:"-"` 1708} 1709 1710func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 1711 type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 1712 raw := NoMethod(*s) 1713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1714} 1715 1716// GooglePrivacyDlpV2CreateDlpJobRequest: Request message for 1717// CreateDlpJobRequest. Used to initiate long running jobs such as 1718// calculating risk metrics or inspecting Google Cloud Storage. 1719type GooglePrivacyDlpV2CreateDlpJobRequest struct { 1720 // InspectJob: Set to control what and how to inspect. 1721 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 1722 1723 // JobId: The job id can contain uppercase and lowercase letters, 1724 // numbers, and hyphens; that is, it must match the regular expression: 1725 // `[a-zA-Z\d-_]+`. The maximum length is 100 characters. Can be empty 1726 // to allow the system to generate one. 1727 JobId string `json:"jobId,omitempty"` 1728 1729 // LocationId: Deprecated. This field has no effect. 1730 LocationId string `json:"locationId,omitempty"` 1731 1732 // RiskJob: Set to choose what metric to calculate. 1733 RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"` 1734 1735 // ForceSendFields is a list of field names (e.g. "InspectJob") to 1736 // unconditionally include in API requests. By default, fields with 1737 // empty values are omitted from API requests. However, any non-pointer, 1738 // non-interface field appearing in ForceSendFields will be sent to the 1739 // server regardless of whether the field is empty or not. This may be 1740 // used to include empty fields in Patch requests. 1741 ForceSendFields []string `json:"-"` 1742 1743 // NullFields is a list of field names (e.g. "InspectJob") to include in 1744 // API requests with the JSON null value. By default, fields with empty 1745 // values are omitted from API requests. However, any field with an 1746 // empty value appearing in NullFields will be sent to the server as 1747 // null. It is an error if a field in this list has a non-empty value. 1748 // This may be used to include null fields in Patch requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) { 1753 type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758// GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for 1759// CreateInspectTemplate. 1760type GooglePrivacyDlpV2CreateInspectTemplateRequest struct { 1761 // InspectTemplate: Required. The InspectTemplate to create. 1762 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 1763 1764 // LocationId: Deprecated. This field has no effect. 1765 LocationId string `json:"locationId,omitempty"` 1766 1767 // TemplateId: The template id can contain uppercase and lowercase 1768 // letters, numbers, and hyphens; that is, it must match the regular 1769 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1770 // Can be empty to allow the system to generate one. 1771 TemplateId string `json:"templateId,omitempty"` 1772 1773 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 1774 // unconditionally include in API requests. By default, fields with 1775 // empty values are omitted from API requests. However, any non-pointer, 1776 // non-interface field appearing in ForceSendFields will be sent to the 1777 // server regardless of whether the field is empty or not. This may be 1778 // used to include empty fields in Patch requests. 1779 ForceSendFields []string `json:"-"` 1780 1781 // NullFields is a list of field names (e.g. "InspectTemplate") to 1782 // include in API requests with the JSON null value. By default, fields 1783 // with empty values are omitted from API requests. However, any field 1784 // with an empty value appearing in NullFields will be sent to the 1785 // server as null. It is an error if a field in this list has a 1786 // non-empty value. This may be used to include null fields in Patch 1787 // requests. 1788 NullFields []string `json:"-"` 1789} 1790 1791func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 1792 type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest 1793 raw := NoMethod(*s) 1794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1795} 1796 1797// GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for 1798// CreateJobTrigger. 1799type GooglePrivacyDlpV2CreateJobTriggerRequest struct { 1800 // JobTrigger: Required. The JobTrigger to create. 1801 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 1802 1803 // LocationId: Deprecated. This field has no effect. 1804 LocationId string `json:"locationId,omitempty"` 1805 1806 // TriggerId: The trigger id can contain uppercase and lowercase 1807 // letters, numbers, and hyphens; that is, it must match the regular 1808 // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. 1809 // Can be empty to allow the system to generate one. 1810 TriggerId string `json:"triggerId,omitempty"` 1811 1812 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 1813 // unconditionally include in API requests. By default, fields with 1814 // empty values are omitted from API requests. However, any non-pointer, 1815 // non-interface field appearing in ForceSendFields will be sent to the 1816 // server regardless of whether the field is empty or not. This may be 1817 // used to include empty fields in Patch requests. 1818 ForceSendFields []string `json:"-"` 1819 1820 // NullFields is a list of field names (e.g. "JobTrigger") to include in 1821 // API requests with the JSON null value. By default, fields with empty 1822 // values are omitted from API requests. However, any field with an 1823 // empty value appearing in NullFields will be sent to the server as 1824 // null. It is an error if a field in this list has a non-empty value. 1825 // This may be used to include null fields in Patch requests. 1826 NullFields []string `json:"-"` 1827} 1828 1829func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) { 1830 type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest 1831 raw := NoMethod(*s) 1832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1833} 1834 1835// GooglePrivacyDlpV2CreateStoredInfoTypeRequest: Request message for 1836// CreateStoredInfoType. 1837type GooglePrivacyDlpV2CreateStoredInfoTypeRequest struct { 1838 // Config: Required. Configuration of the storedInfoType to create. 1839 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 1840 1841 // LocationId: Deprecated. This field has no effect. 1842 LocationId string `json:"locationId,omitempty"` 1843 1844 // StoredInfoTypeId: The storedInfoType ID can contain uppercase and 1845 // lowercase letters, numbers, and hyphens; that is, it must match the 1846 // regular expression: `[a-zA-Z\d-_]+`. The maximum length is 100 1847 // characters. Can be empty to allow the system to generate one. 1848 StoredInfoTypeId string `json:"storedInfoTypeId,omitempty"` 1849 1850 // ForceSendFields is a list of field names (e.g. "Config") to 1851 // unconditionally include in API requests. By default, fields with 1852 // empty values are omitted from API requests. However, any non-pointer, 1853 // non-interface field appearing in ForceSendFields will be sent to the 1854 // server regardless of whether the field is empty or not. This may be 1855 // used to include empty fields in Patch requests. 1856 ForceSendFields []string `json:"-"` 1857 1858 // NullFields is a list of field names (e.g. "Config") to include in API 1859 // requests with the JSON null value. By default, fields with empty 1860 // values are omitted from API requests. However, any field with an 1861 // empty value appearing in NullFields will be sent to the server as 1862 // null. It is an error if a field in this list has a non-empty value. 1863 // This may be used to include null fields in Patch requests. 1864 NullFields []string `json:"-"` 1865} 1866 1867func (s *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 1868 type NoMethod GooglePrivacyDlpV2CreateStoredInfoTypeRequest 1869 raw := NoMethod(*s) 1870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1871} 1872 1873// GooglePrivacyDlpV2CryptoDeterministicConfig: Pseudonymization method 1874// that generates deterministic encryption for the given input. Outputs 1875// a base64 encoded representation of the encrypted output. Uses AES-SIV 1876// based on the RFC https://tools.ietf.org/html/rfc5297. 1877type GooglePrivacyDlpV2CryptoDeterministicConfig struct { 1878 // Context: A context may be used for higher security and maintaining 1879 // referential integrity such that the same identifier in two different 1880 // contexts will be given a distinct surrogate. The context is appended 1881 // to plaintext value being encrypted. On decryption the provided 1882 // context is validated against the value used during encryption. If a 1883 // context was provided during encryption, same context must be provided 1884 // during decryption as well. If the context is not set, plaintext would 1885 // be used as is for encryption. If the context is set but: 1. there is 1886 // no record present when transforming a given value or 2. the field is 1887 // not present when transforming a given value, plaintext would be used 1888 // as is for encryption. Note that case (1) is expected when an 1889 // `InfoTypeTransformation` is applied to both structured and 1890 // non-structured `ContentItem`s. 1891 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 1892 1893 // CryptoKey: The key used by the encryption function. 1894 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1895 1896 // SurrogateInfoType: The custom info type to annotate the surrogate 1897 // with. This annotation will be applied to the surrogate by prefixing 1898 // it with the name of the custom info type followed by the number of 1899 // characters comprising the surrogate. The following scheme defines the 1900 // format: {info type name}({surrogate character count}):{surrogate} For 1901 // example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 1902 // the surrogate is 'abc', the full replacement value will be: 1903 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 1904 // when inspecting content using the custom info type 'Surrogate'. This 1905 // facilitates reversal of the surrogate when it occurs in free text. 1906 // Note: For record transformations where the entire cell in a table is 1907 // being transformed, surrogates are not mandatory. Surrogates are used 1908 // to denote the location of the token and are necessary for 1909 // re-identification in free form text. In order for inspection to work 1910 // properly, the name of this info type must not occur naturally 1911 // anywhere in your data; otherwise, inspection may either - reverse a 1912 // surrogate that does not correspond to an actual identifier - be 1913 // unable to parse the surrogate and result in an error Therefore, 1914 // choose your custom info type name carefully after considering what 1915 // your data looks like. One way to select a name that has a high chance 1916 // of yielding reliable detection is to include one or more unicode 1917 // characters that are highly improbable to exist in your data. For 1918 // example, assuming your data is entered from a regular ASCII keyboard, 1919 // the symbol with the hex code point 29DD might be used like so: 1920 // ⧝MY_TOKEN_TYPE. 1921 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 1922 1923 // ForceSendFields is a list of field names (e.g. "Context") to 1924 // unconditionally include in API requests. By default, fields with 1925 // empty values are omitted from API requests. However, any non-pointer, 1926 // non-interface field appearing in ForceSendFields will be sent to the 1927 // server regardless of whether the field is empty or not. This may be 1928 // used to include empty fields in Patch requests. 1929 ForceSendFields []string `json:"-"` 1930 1931 // NullFields is a list of field names (e.g. "Context") to include in 1932 // API requests with the JSON null value. By default, fields with empty 1933 // values are omitted from API requests. However, any field with an 1934 // empty value appearing in NullFields will be sent to the server as 1935 // null. It is an error if a field in this list has a non-empty value. 1936 // This may be used to include null fields in Patch requests. 1937 NullFields []string `json:"-"` 1938} 1939 1940func (s *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, error) { 1941 type NoMethod GooglePrivacyDlpV2CryptoDeterministicConfig 1942 raw := NoMethod(*s) 1943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1944} 1945 1946// GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that 1947// generates surrogates via cryptographic hashing. Uses SHA-256. The key 1948// size must be either 32 or 64 bytes. Outputs a base64 encoded 1949// representation of the hashed output (for example, 1950// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string 1951// and integer values can be hashed. See 1952// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 1953type GooglePrivacyDlpV2CryptoHashConfig struct { 1954 // CryptoKey: The key used by the hash function. 1955 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 1956 1957 // ForceSendFields is a list of field names (e.g. "CryptoKey") to 1958 // unconditionally include in API requests. By default, fields with 1959 // empty values are omitted from API requests. However, any non-pointer, 1960 // non-interface field appearing in ForceSendFields will be sent to the 1961 // server regardless of whether the field is empty or not. This may be 1962 // used to include empty fields in Patch requests. 1963 ForceSendFields []string `json:"-"` 1964 1965 // NullFields is a list of field names (e.g. "CryptoKey") to include in 1966 // API requests with the JSON null value. By default, fields with empty 1967 // values are omitted from API requests. However, any field with an 1968 // empty value appearing in NullFields will be sent to the server as 1969 // null. It is an error if a field in this list has a non-empty value. 1970 // This may be used to include null fields in Patch requests. 1971 NullFields []string `json:"-"` 1972} 1973 1974func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) { 1975 type NoMethod GooglePrivacyDlpV2CryptoHashConfig 1976 raw := NoMethod(*s) 1977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1978} 1979 1980// GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as 1981// opposed to a key encryption key (KEK) stored by KMS). When using KMS 1982// to wrap/unwrap DEKs, be sure to set an appropriate IAM policy on the 1983// KMS CryptoKey (KEK) to ensure an attacker cannot unwrap the data 1984// crypto key. 1985type GooglePrivacyDlpV2CryptoKey struct { 1986 // KmsWrapped: Kms wrapped key 1987 KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` 1988 1989 // Transient: Transient crypto key 1990 Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"` 1991 1992 // Unwrapped: Unwrapped crypto key 1993 Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"` 1994 1995 // ForceSendFields is a list of field names (e.g. "KmsWrapped") to 1996 // unconditionally include in API requests. By default, fields with 1997 // empty values are omitted from API requests. However, any non-pointer, 1998 // non-interface field appearing in ForceSendFields will be sent to the 1999 // server regardless of whether the field is empty or not. This may be 2000 // used to include empty fields in Patch requests. 2001 ForceSendFields []string `json:"-"` 2002 2003 // NullFields is a list of field names (e.g. "KmsWrapped") to include in 2004 // API requests with the JSON null value. By default, fields with empty 2005 // values are omitted from API requests. However, any field with an 2006 // empty value appearing in NullFields will be sent to the server as 2007 // null. It is an error if a field in this list has a non-empty value. 2008 // This may be used to include null fields in Patch requests. 2009 NullFields []string `json:"-"` 2010} 2011 2012func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) { 2013 type NoMethod GooglePrivacyDlpV2CryptoKey 2014 raw := NoMethod(*s) 2015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2016} 2017 2018// GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier 2019// with a surrogate using Format Preserving Encryption (FPE) with the 2020// FFX mode of operation; however when used in the `ReidentifyContent` 2021// API method, it serves the opposite function by reversing the 2022// surrogate back into the original identifier. The identifier must be 2023// encoded as ASCII. For a given crypto key and context, the same 2024// identifier will be replaced with the same surrogate. Identifiers must 2025// be at least two characters long. In the case that the identifier is 2026// the empty string, it will be skipped. See 2027// https://cloud.google.com/dlp/docs/pseudonymization to learn more. 2028// Note: We recommend using CryptoDeterministicConfig for all use cases 2029// which do not require preserving the input alphabet space and size, 2030// plus warrant referential integrity. 2031type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { 2032 // CommonAlphabet: Common alphabets. 2033 // 2034 // Possible values: 2035 // "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - Unused. 2036 // "NUMERIC" - `[0-9]` (radix of 10) 2037 // "HEXADECIMAL" - `[0-9A-F]` (radix of 16) 2038 // "UPPER_CASE_ALPHA_NUMERIC" - `[0-9A-Z]` (radix of 36) 2039 // "ALPHA_NUMERIC" - `[0-9A-Za-z]` (radix of 62) 2040 CommonAlphabet string `json:"commonAlphabet,omitempty"` 2041 2042 // Context: The 'tweak', a context may be used for higher security since 2043 // the same identifier in two different contexts won't be given the same 2044 // surrogate. If the context is not set, a default tweak will be used. 2045 // If the context is set but: 1. there is no record present when 2046 // transforming a given value or 1. the field is not present when 2047 // transforming a given value, a default tweak will be used. Note that 2048 // case (1) is expected when an `InfoTypeTransformation` is applied to 2049 // both structured and non-structured `ContentItem`s. Currently, the 2050 // referenced field may be of value type integer or string. The tweak is 2051 // constructed as a sequence of bytes in big endian byte order such 2052 // that: - a 64 bit integer is encoded followed by a single byte of 2053 // value 1 - a string is encoded in UTF-8 format followed by a single 2054 // byte of value 2 2055 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2056 2057 // CryptoKey: Required. The key used by the encryption algorithm. 2058 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2059 2060 // CustomAlphabet: This is supported by mapping these to the 2061 // alphanumeric characters that the FFX mode natively supports. This 2062 // happens before/after encryption/decryption. Each character listed 2063 // must appear only once. Number of characters must be in the range [2, 2064 // 95]. This must be encoded as ASCII. The order of characters does not 2065 // matter. The full list of allowed characters is: 2066 // 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 2067 // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ 2068 CustomAlphabet string `json:"customAlphabet,omitempty"` 2069 2070 // Radix: The native way to select the alphabet. Must be in the range 2071 // [2, 95]. 2072 Radix int64 `json:"radix,omitempty"` 2073 2074 // SurrogateInfoType: The custom infoType to annotate the surrogate 2075 // with. This annotation will be applied to the surrogate by prefixing 2076 // it with the name of the custom infoType followed by the number of 2077 // characters comprising the surrogate. The following scheme defines the 2078 // format: info_type_name(surrogate_character_count):surrogate For 2079 // example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and 2080 // the surrogate is 'abc', the full replacement value will be: 2081 // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate 2082 // when inspecting content using the custom infoType 2083 // [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/ 2084 // InspectConfig#surrogatetype). This facilitates reversal of the 2085 // surrogate when it occurs in free text. In order for inspection to 2086 // work properly, the name of this infoType must not occur naturally 2087 // anywhere in your data; otherwise, inspection may find a surrogate 2088 // that does not correspond to an actual identifier. Therefore, choose 2089 // your custom infoType name carefully after considering what your data 2090 // looks like. One way to select a name that has a high chance of 2091 // yielding reliable detection is to include one or more unicode 2092 // characters that are highly improbable to exist in your data. For 2093 // example, assuming your data is entered from a regular ASCII keyboard, 2094 // the symbol with the hex code point 29DD might be used like so: 2095 // ⧝MY_TOKEN_TYPE 2096 SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"` 2097 2098 // ForceSendFields is a list of field names (e.g. "CommonAlphabet") to 2099 // unconditionally include in API requests. By default, fields with 2100 // empty values are omitted from API requests. However, any non-pointer, 2101 // non-interface field appearing in ForceSendFields will be sent to the 2102 // server regardless of whether the field is empty or not. This may be 2103 // used to include empty fields in Patch requests. 2104 ForceSendFields []string `json:"-"` 2105 2106 // NullFields is a list of field names (e.g. "CommonAlphabet") to 2107 // include in API requests with the JSON null value. By default, fields 2108 // with empty values are omitted from API requests. However, any field 2109 // with an empty value appearing in NullFields will be sent to the 2110 // server as null. It is an error if a field in this list has a 2111 // non-empty value. This may be used to include null fields in Patch 2112 // requests. 2113 NullFields []string `json:"-"` 2114} 2115 2116func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) { 2117 type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig 2118 raw := NoMethod(*s) 2119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2120} 2121 2122// GooglePrivacyDlpV2CustomInfoType: Custom information type provided by 2123// the user. Used to find domain-specific sensitive information 2124// configurable to the data in question. 2125type GooglePrivacyDlpV2CustomInfoType struct { 2126 // DetectionRules: Set of detection rules to apply to all findings of 2127 // this CustomInfoType. Rules are applied in order that they are 2128 // specified. Not supported for the `surrogate_type` CustomInfoType. 2129 DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"` 2130 2131 // Dictionary: A list of phrases to detect as a CustomInfoType. 2132 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 2133 2134 // ExclusionType: If set to EXCLUSION_TYPE_EXCLUDE this infoType will 2135 // not cause a finding to be returned. It still can be used for rules 2136 // matching. 2137 // 2138 // Possible values: 2139 // "EXCLUSION_TYPE_UNSPECIFIED" - A finding of this custom info type 2140 // will not be excluded from results. 2141 // "EXCLUSION_TYPE_EXCLUDE" - A finding of this custom info type will 2142 // be excluded from final results, but can still affect rule execution. 2143 ExclusionType string `json:"exclusionType,omitempty"` 2144 2145 // InfoType: CustomInfoType can either be a new infoType, or an 2146 // extension of built-in infoType, when the name matches one of existing 2147 // infoTypes and that infoType is specified in 2148 // `InspectContent.info_types` field. Specifying the latter adds 2149 // findings to the one detected by the system. If built-in info type is 2150 // not specified in `InspectContent.info_types` list then the name is 2151 // treated as a custom info type. 2152 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 2153 2154 // Likelihood: Likelihood to return for this CustomInfoType. This base 2155 // value can be altered by a detection rule if the finding meets the 2156 // criteria specified by the rule. Defaults to `VERY_LIKELY` if not 2157 // specified. 2158 // 2159 // Possible values: 2160 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 2161 // "VERY_UNLIKELY" - Few matching elements. 2162 // "UNLIKELY" 2163 // "POSSIBLE" - Some matching elements. 2164 // "LIKELY" 2165 // "VERY_LIKELY" - Many matching elements. 2166 Likelihood string `json:"likelihood,omitempty"` 2167 2168 // Regex: Regular expression based CustomInfoType. 2169 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 2170 2171 // StoredType: Load an existing `StoredInfoType` resource for use in 2172 // `InspectDataSource`. Not currently supported in `InspectContent`. 2173 StoredType *GooglePrivacyDlpV2StoredType `json:"storedType,omitempty"` 2174 2175 // SurrogateType: Message for detecting output from deidentification 2176 // transformations that support reversing. 2177 SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"` 2178 2179 // ForceSendFields is a list of field names (e.g. "DetectionRules") to 2180 // unconditionally include in API requests. By default, fields with 2181 // empty values are omitted from API requests. However, any non-pointer, 2182 // non-interface field appearing in ForceSendFields will be sent to the 2183 // server regardless of whether the field is empty or not. This may be 2184 // used to include empty fields in Patch requests. 2185 ForceSendFields []string `json:"-"` 2186 2187 // NullFields is a list of field names (e.g. "DetectionRules") to 2188 // include in API requests with the JSON null value. By default, fields 2189 // with empty values are omitted from API requests. However, any field 2190 // with an empty value appearing in NullFields will be sent to the 2191 // server as null. It is an error if a field in this list has a 2192 // non-empty value. This may be used to include null fields in Patch 2193 // requests. 2194 NullFields []string `json:"-"` 2195} 2196 2197func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) { 2198 type NoMethod GooglePrivacyDlpV2CustomInfoType 2199 raw := NoMethod(*s) 2200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2201} 2202 2203// GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud 2204// Datastore. 2205type GooglePrivacyDlpV2DatastoreKey struct { 2206 // EntityKey: Datastore entity key. 2207 EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"` 2208 2209 // ForceSendFields is a list of field names (e.g. "EntityKey") to 2210 // unconditionally include in API requests. By default, fields with 2211 // empty values are omitted from API requests. However, any non-pointer, 2212 // non-interface field appearing in ForceSendFields will be sent to the 2213 // server regardless of whether the field is empty or not. This may be 2214 // used to include empty fields in Patch requests. 2215 ForceSendFields []string `json:"-"` 2216 2217 // NullFields is a list of field names (e.g. "EntityKey") to include in 2218 // API requests with the JSON null value. By default, fields with empty 2219 // values are omitted from API requests. However, any field with an 2220 // empty value appearing in NullFields will be sent to the server as 2221 // null. It is an error if a field in this list has a non-empty value. 2222 // This may be used to include null fields in Patch requests. 2223 NullFields []string `json:"-"` 2224} 2225 2226func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) { 2227 type NoMethod GooglePrivacyDlpV2DatastoreKey 2228 raw := NoMethod(*s) 2229 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2230} 2231 2232// GooglePrivacyDlpV2DatastoreOptions: Options defining a data set 2233// within Google Cloud Datastore. 2234type GooglePrivacyDlpV2DatastoreOptions struct { 2235 // Kind: The kind to process. 2236 Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"` 2237 2238 // PartitionId: A partition ID identifies a grouping of entities. The 2239 // grouping is always by project and namespace, however the namespace ID 2240 // may be empty. 2241 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 2242 2243 // ForceSendFields is a list of field names (e.g. "Kind") to 2244 // unconditionally include in API requests. By default, fields with 2245 // empty values are omitted from API requests. However, any non-pointer, 2246 // non-interface field appearing in ForceSendFields will be sent to the 2247 // server regardless of whether the field is empty or not. This may be 2248 // used to include empty fields in Patch requests. 2249 ForceSendFields []string `json:"-"` 2250 2251 // NullFields is a list of field names (e.g. "Kind") to include in API 2252 // requests with the JSON null value. By default, fields with empty 2253 // values are omitted from API requests. However, any field with an 2254 // empty value appearing in NullFields will be sent to the server as 2255 // null. It is an error if a field in this list has a non-empty value. 2256 // This may be used to include null fields in Patch requests. 2257 NullFields []string `json:"-"` 2258} 2259 2260func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) { 2261 type NoMethod GooglePrivacyDlpV2DatastoreOptions 2262 raw := NoMethod(*s) 2263 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2264} 2265 2266// GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of 2267// days, with option to be consistent for the same context. See 2268// https://cloud.google.com/dlp/docs/concepts-date-shifting to learn 2269// more. 2270type GooglePrivacyDlpV2DateShiftConfig struct { 2271 // Context: Points to the field that contains the context, for example, 2272 // an entity id. If set, must also set cryptoKey. If set, shift will be 2273 // consistent for the given context. 2274 Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"` 2275 2276 // CryptoKey: Causes the shift to be computed based on this key and the 2277 // context. This results in the same shift for the same context and 2278 // crypto_key. If set, must also set context. Can only be applied to 2279 // table items. 2280 CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` 2281 2282 // LowerBoundDays: Required. For example, -5 means shift date to at most 2283 // 5 days back in the past. 2284 LowerBoundDays int64 `json:"lowerBoundDays,omitempty"` 2285 2286 // UpperBoundDays: Required. Range of shift in days. Actual shift will 2287 // be selected at random within this range (inclusive ends). Negative 2288 // means shift to earlier in time. Must not be more than 365250 days 2289 // (1000 years) each direction. For example, 3 means shift date to at 2290 // most 3 days into the future. 2291 UpperBoundDays int64 `json:"upperBoundDays,omitempty"` 2292 2293 // ForceSendFields is a list of field names (e.g. "Context") to 2294 // unconditionally include in API requests. By default, fields with 2295 // empty values are omitted from API requests. However, any non-pointer, 2296 // non-interface field appearing in ForceSendFields will be sent to the 2297 // server regardless of whether the field is empty or not. This may be 2298 // used to include empty fields in Patch requests. 2299 ForceSendFields []string `json:"-"` 2300 2301 // NullFields is a list of field names (e.g. "Context") to include in 2302 // API requests with the JSON null value. By default, fields with empty 2303 // values are omitted from API requests. However, any field with an 2304 // empty value appearing in NullFields will be sent to the server as 2305 // null. It is an error if a field in this list has a non-empty value. 2306 // This may be used to include null fields in Patch requests. 2307 NullFields []string `json:"-"` 2308} 2309 2310func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) { 2311 type NoMethod GooglePrivacyDlpV2DateShiftConfig 2312 raw := NoMethod(*s) 2313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2314} 2315 2316// GooglePrivacyDlpV2DateTime: Message for a date time object. e.g. 2317// 2018-01-01, 5th August. 2318type GooglePrivacyDlpV2DateTime struct { 2319 // Date: One or more of the following must be set. Must be a valid date 2320 // or time value. 2321 Date *GoogleTypeDate `json:"date,omitempty"` 2322 2323 // DayOfWeek: Day of week 2324 // 2325 // Possible values: 2326 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 2327 // "MONDAY" - Monday 2328 // "TUESDAY" - Tuesday 2329 // "WEDNESDAY" - Wednesday 2330 // "THURSDAY" - Thursday 2331 // "FRIDAY" - Friday 2332 // "SATURDAY" - Saturday 2333 // "SUNDAY" - Sunday 2334 DayOfWeek string `json:"dayOfWeek,omitempty"` 2335 2336 // Time: Time of day 2337 Time *GoogleTypeTimeOfDay `json:"time,omitempty"` 2338 2339 // TimeZone: Time zone 2340 TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"` 2341 2342 // ForceSendFields is a list of field names (e.g. "Date") to 2343 // unconditionally include in API requests. By default, fields with 2344 // empty values are omitted from API requests. However, any non-pointer, 2345 // non-interface field appearing in ForceSendFields will be sent to the 2346 // server regardless of whether the field is empty or not. This may be 2347 // used to include empty fields in Patch requests. 2348 ForceSendFields []string `json:"-"` 2349 2350 // NullFields is a list of field names (e.g. "Date") to include in API 2351 // requests with the JSON null value. By default, fields with empty 2352 // values are omitted from API requests. However, any field with an 2353 // empty value appearing in NullFields will be sent to the server as 2354 // null. It is an error if a field in this list has a non-empty value. 2355 // This may be used to include null fields in Patch requests. 2356 NullFields []string `json:"-"` 2357} 2358 2359func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) { 2360 type NoMethod GooglePrivacyDlpV2DateTime 2361 raw := NoMethod(*s) 2362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2363} 2364 2365// GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls 2366// how the data will change. 2367type GooglePrivacyDlpV2DeidentifyConfig struct { 2368 // InfoTypeTransformations: Treat the dataset as free-form text and 2369 // apply the same free text transformation everywhere. 2370 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 2371 2372 // RecordTransformations: Treat the dataset as structured. 2373 // Transformations can be applied to specific locations within 2374 // structured datasets, such as transforming a column within a table. 2375 RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"` 2376 2377 // TransformationErrorHandling: Mode for handling transformation errors. 2378 // If left unspecified, the default mode is 2379 // `TransformationErrorHandling.ThrowError`. 2380 TransformationErrorHandling *GooglePrivacyDlpV2TransformationErrorHandling `json:"transformationErrorHandling,omitempty"` 2381 2382 // ForceSendFields is a list of field names (e.g. 2383 // "InfoTypeTransformations") to unconditionally include in API 2384 // requests. By default, fields with empty values are omitted from API 2385 // requests. However, any non-pointer, non-interface field appearing in 2386 // ForceSendFields will be sent to the server regardless of whether the 2387 // field is empty or not. This may be used to include empty fields in 2388 // Patch requests. 2389 ForceSendFields []string `json:"-"` 2390 2391 // NullFields is a list of field names (e.g. "InfoTypeTransformations") 2392 // to include in API requests with the JSON null value. By default, 2393 // fields with empty values are omitted from API requests. However, any 2394 // field with an empty value appearing in NullFields will be sent to the 2395 // server as null. It is an error if a field in this list has a 2396 // non-empty value. This may be used to include null fields in Patch 2397 // requests. 2398 NullFields []string `json:"-"` 2399} 2400 2401func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) { 2402 type NoMethod GooglePrivacyDlpV2DeidentifyConfig 2403 raw := NoMethod(*s) 2404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2405} 2406 2407// GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a 2408// list of items. 2409type GooglePrivacyDlpV2DeidentifyContentRequest struct { 2410 // DeidentifyConfig: Configuration for the de-identification of the 2411 // content item. Items specified here will override the template 2412 // referenced by the deidentify_template_name argument. 2413 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2414 2415 // DeidentifyTemplateName: Template to use. Any configuration directly 2416 // specified in deidentify_config will override those set in the 2417 // template. Singular fields that are set in this request will replace 2418 // their corresponding fields in the template. Repeated fields are 2419 // appended. Singular sub-messages and groups are recursively merged. 2420 DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"` 2421 2422 // InspectConfig: Configuration for the inspector. Items specified here 2423 // will override the template referenced by the inspect_template_name 2424 // argument. 2425 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 2426 2427 // InspectTemplateName: Template to use. Any configuration directly 2428 // specified in inspect_config will override those set in the template. 2429 // Singular fields that are set in this request will replace their 2430 // corresponding fields in the template. Repeated fields are appended. 2431 // Singular sub-messages and groups are recursively merged. 2432 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 2433 2434 // Item: The item to de-identify. Will be treated as text. 2435 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2436 2437 // LocationId: Deprecated. This field has no effect. 2438 LocationId string `json:"locationId,omitempty"` 2439 2440 // ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to 2441 // unconditionally include in API requests. By default, fields with 2442 // empty values are omitted from API requests. However, any non-pointer, 2443 // non-interface field appearing in ForceSendFields will be sent to the 2444 // server regardless of whether the field is empty or not. This may be 2445 // used to include empty fields in Patch requests. 2446 ForceSendFields []string `json:"-"` 2447 2448 // NullFields is a list of field names (e.g. "DeidentifyConfig") to 2449 // include in API requests with the JSON null value. By default, fields 2450 // with empty values are omitted from API requests. However, any field 2451 // with an empty value appearing in NullFields will be sent to the 2452 // server as null. It is an error if a field in this list has a 2453 // non-empty value. This may be used to include null fields in Patch 2454 // requests. 2455 NullFields []string `json:"-"` 2456} 2457 2458func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) { 2459 type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest 2460 raw := NoMethod(*s) 2461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2462} 2463 2464// GooglePrivacyDlpV2DeidentifyContentResponse: Results of 2465// de-identifying a ContentItem. 2466type GooglePrivacyDlpV2DeidentifyContentResponse struct { 2467 // Item: The de-identified item. 2468 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 2469 2470 // Overview: An overview of the changes that were made on the `item`. 2471 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 2472 2473 // ServerResponse contains the HTTP response code and headers from the 2474 // server. 2475 googleapi.ServerResponse `json:"-"` 2476 2477 // ForceSendFields is a list of field names (e.g. "Item") to 2478 // unconditionally include in API requests. By default, fields with 2479 // empty values are omitted from API requests. However, any non-pointer, 2480 // non-interface field appearing in ForceSendFields will be sent to the 2481 // server regardless of whether the field is empty or not. This may be 2482 // used to include empty fields in Patch requests. 2483 ForceSendFields []string `json:"-"` 2484 2485 // NullFields is a list of field names (e.g. "Item") to include in API 2486 // requests with the JSON null value. By default, fields with empty 2487 // values are omitted from API requests. However, any field with an 2488 // empty value appearing in NullFields will be sent to the server as 2489 // null. It is an error if a field in this list has a non-empty value. 2490 // This may be used to include null fields in Patch requests. 2491 NullFields []string `json:"-"` 2492} 2493 2494func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) { 2495 type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse 2496 raw := NoMethod(*s) 2497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2498} 2499 2500// GooglePrivacyDlpV2DeidentifyTemplate: DeidentifyTemplates contains 2501// instructions on how to de-identify content. See 2502// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 2503type GooglePrivacyDlpV2DeidentifyTemplate struct { 2504 // CreateTime: Output only. The creation timestamp of an 2505 // inspectTemplate. 2506 CreateTime string `json:"createTime,omitempty"` 2507 2508 // DeidentifyConfig: ///////////// // The core content of the template 2509 // // /////////////// 2510 DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"` 2511 2512 // Description: Short description (max 256 chars). 2513 Description string `json:"description,omitempty"` 2514 2515 // DisplayName: Display name (max 256 chars). 2516 DisplayName string `json:"displayName,omitempty"` 2517 2518 // Name: Output only. The template name. The template will have one of 2519 // the following formats: 2520 // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR 2521 // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` 2522 Name string `json:"name,omitempty"` 2523 2524 // UpdateTime: Output only. The last update timestamp of an 2525 // inspectTemplate. 2526 UpdateTime string `json:"updateTime,omitempty"` 2527 2528 // ServerResponse contains the HTTP response code and headers from the 2529 // server. 2530 googleapi.ServerResponse `json:"-"` 2531 2532 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2533 // unconditionally include in API requests. By default, fields with 2534 // empty values are omitted from API requests. However, any non-pointer, 2535 // non-interface field appearing in ForceSendFields will be sent to the 2536 // server regardless of whether the field is empty or not. This may be 2537 // used to include empty fields in Patch requests. 2538 ForceSendFields []string `json:"-"` 2539 2540 // NullFields is a list of field names (e.g. "CreateTime") to include in 2541 // API requests with the JSON null value. By default, fields with empty 2542 // values are omitted from API requests. However, any field with an 2543 // empty value appearing in NullFields will be sent to the server as 2544 // null. It is an error if a field in this list has a non-empty value. 2545 // This may be used to include null fields in Patch requests. 2546 NullFields []string `json:"-"` 2547} 2548 2549func (s *GooglePrivacyDlpV2DeidentifyTemplate) MarshalJSON() ([]byte, error) { 2550 type NoMethod GooglePrivacyDlpV2DeidentifyTemplate 2551 raw := NoMethod(*s) 2552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2553} 2554 2555// GooglePrivacyDlpV2DeltaPresenceEstimationConfig: δ-presence metric, 2556// used to estimate how likely it is for an attacker to figure out that 2557// one given individual appears in a de-identified dataset. Similarly to 2558// the k-map metric, we cannot compute δ-presence exactly without 2559// knowing the attack dataset, so we use a statistical model instead. 2560type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct { 2561 // AuxiliaryTables: Several auxiliary tables can be used in the 2562 // analysis. Each custom_tag used to tag a quasi-identifiers field must 2563 // appear in exactly one field of one auxiliary table. 2564 AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"` 2565 2566 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 2567 // fields can have the same tag. 2568 QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"` 2569 2570 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 2571 // modeling. Set if no column is tagged with a region-specific InfoType 2572 // (like US_ZIP_5) or a region code. 2573 RegionCode string `json:"regionCode,omitempty"` 2574 2575 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 2576 // unconditionally include in API requests. By default, fields with 2577 // empty values are omitted from API requests. However, any non-pointer, 2578 // non-interface field appearing in ForceSendFields will be sent to the 2579 // server regardless of whether the field is empty or not. This may be 2580 // used to include empty fields in Patch requests. 2581 ForceSendFields []string `json:"-"` 2582 2583 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 2584 // include in API requests with the JSON null value. By default, fields 2585 // with empty values are omitted from API requests. However, any field 2586 // with an empty value appearing in NullFields will be sent to the 2587 // server as null. It is an error if a field in this list has a 2588 // non-empty value. This may be used to include null fields in Patch 2589 // requests. 2590 NullFields []string `json:"-"` 2591} 2592 2593func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) { 2594 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig 2595 raw := NoMethod(*s) 2596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2597} 2598 2599// GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A 2600// DeltaPresenceEstimationHistogramBucket message with the following 2601// values: min_probability: 0.1 max_probability: 0.2 frequency: 42 means 2602// that there are 42 records for which δ is in [0.1, 0.2). An important 2603// particular case is when min_probability = max_probability = 1: then, 2604// every individual who shares this quasi-identifier combination is in 2605// the dataset. 2606type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct { 2607 // BucketSize: Number of records within these probability bounds. 2608 BucketSize int64 `json:"bucketSize,omitempty,string"` 2609 2610 // BucketValueCount: Total number of distinct quasi-identifier tuple 2611 // values in this bucket. 2612 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 2613 2614 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 2615 // The total number of classes returned per bucket is capped at 20. 2616 BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"` 2617 2618 // MaxProbability: Always greater than or equal to min_probability. 2619 MaxProbability float64 `json:"maxProbability,omitempty"` 2620 2621 // MinProbability: Between 0 and 1. 2622 MinProbability float64 `json:"minProbability,omitempty"` 2623 2624 // ForceSendFields is a list of field names (e.g. "BucketSize") to 2625 // unconditionally include in API requests. By default, fields with 2626 // empty values are omitted from API requests. However, any non-pointer, 2627 // non-interface field appearing in ForceSendFields will be sent to the 2628 // server regardless of whether the field is empty or not. This may be 2629 // used to include empty fields in Patch requests. 2630 ForceSendFields []string `json:"-"` 2631 2632 // NullFields is a list of field names (e.g. "BucketSize") to include in 2633 // API requests with the JSON null value. By default, fields with empty 2634 // values are omitted from API requests. However, any field with an 2635 // empty value appearing in NullFields will be sent to the server as 2636 // null. It is an error if a field in this list has a non-empty value. 2637 // This may be used to include null fields in Patch requests. 2638 NullFields []string `json:"-"` 2639} 2640 2641func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 2642 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2643 raw := NoMethod(*s) 2644 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2645} 2646 2647func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error { 2648 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket 2649 var s1 struct { 2650 MaxProbability gensupport.JSONFloat64 `json:"maxProbability"` 2651 MinProbability gensupport.JSONFloat64 `json:"minProbability"` 2652 *NoMethod 2653 } 2654 s1.NoMethod = (*NoMethod)(s) 2655 if err := json.Unmarshal(data, &s1); err != nil { 2656 return err 2657 } 2658 s.MaxProbability = float64(s1.MaxProbability) 2659 s.MinProbability = float64(s1.MinProbability) 2660 return nil 2661} 2662 2663// GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of 2664// values for the quasi-identifier columns. 2665type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct { 2666 // EstimatedProbability: The estimated probability that a given 2667 // individual sharing these quasi-identifier values is in the dataset. 2668 // This value, typically called δ, is the ratio between the number of 2669 // records in the dataset with these quasi-identifier values, and the 2670 // total number of individuals (inside *and* outside the dataset) with 2671 // these quasi-identifier values. For example, if there are 15 2672 // individuals in the dataset who share the same quasi-identifier 2673 // values, and an estimated 100 people in the entire population with 2674 // these values, then δ is 0.15. 2675 EstimatedProbability float64 `json:"estimatedProbability,omitempty"` 2676 2677 // QuasiIdsValues: The quasi-identifier values. 2678 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 2679 2680 // ForceSendFields is a list of field names (e.g. 2681 // "EstimatedProbability") to unconditionally include in API requests. 2682 // By default, fields with empty values are omitted from API requests. 2683 // However, any non-pointer, non-interface field appearing in 2684 // ForceSendFields will be sent to the server regardless of whether the 2685 // field is empty or not. This may be used to include empty fields in 2686 // Patch requests. 2687 ForceSendFields []string `json:"-"` 2688 2689 // NullFields is a list of field names (e.g. "EstimatedProbability") to 2690 // include in API requests with the JSON null value. By default, fields 2691 // with empty values are omitted from API requests. However, any field 2692 // with an empty value appearing in NullFields will be sent to the 2693 // server as null. It is an error if a field in this list has a 2694 // non-empty value. This may be used to include null fields in Patch 2695 // requests. 2696 NullFields []string `json:"-"` 2697} 2698 2699func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 2700 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2701 raw := NoMethod(*s) 2702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2703} 2704 2705func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error { 2706 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues 2707 var s1 struct { 2708 EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"` 2709 *NoMethod 2710 } 2711 s1.NoMethod = (*NoMethod)(s) 2712 if err := json.Unmarshal(data, &s1); err != nil { 2713 return err 2714 } 2715 s.EstimatedProbability = float64(s1.EstimatedProbability) 2716 return nil 2717} 2718 2719// GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the 2720// δ-presence computation. Note that these results are an estimation, 2721// not exact values. 2722type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct { 2723 // DeltaPresenceEstimationHistogram: The intervals [min_probability, 2724 // max_probability) do not overlap. If a value doesn't correspond to any 2725 // such interval, the associated frequency is zero. For example, the 2726 // following records: {min_probability: 0, max_probability: 0.1, 2727 // frequency: 17} {min_probability: 0.2, max_probability: 0.3, 2728 // frequency: 42} {min_probability: 0.3, max_probability: 0.4, 2729 // frequency: 99} mean that there are no record with an estimated 2730 // probability in [0.1, 0.2) nor larger or equal to 0.4. 2731 DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"` 2732 2733 // ForceSendFields is a list of field names (e.g. 2734 // "DeltaPresenceEstimationHistogram") to unconditionally include in API 2735 // requests. By default, fields with empty values are omitted from API 2736 // requests. However, any non-pointer, non-interface field appearing in 2737 // ForceSendFields will be sent to the server regardless of whether the 2738 // field is empty or not. This may be used to include empty fields in 2739 // Patch requests. 2740 ForceSendFields []string `json:"-"` 2741 2742 // NullFields is a list of field names (e.g. 2743 // "DeltaPresenceEstimationHistogram") to include in API requests with 2744 // the JSON null value. By default, fields with empty values are omitted 2745 // from API requests. However, any field with an empty value appearing 2746 // in NullFields will be sent to the server as null. It is an error if a 2747 // field in this list has a non-empty value. This may be used to include 2748 // null fields in Patch requests. 2749 NullFields []string `json:"-"` 2750} 2751 2752func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) { 2753 type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult 2754 raw := NoMethod(*s) 2755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2756} 2757 2758// GooglePrivacyDlpV2DetectionRule: Deprecated; use `InspectionRuleSet` 2759// instead. Rule for modifying a `CustomInfoType` to alter behavior 2760// under certain circumstances, depending on the specific details of the 2761// rule. Not supported for the `surrogate_type` custom infoType. 2762type GooglePrivacyDlpV2DetectionRule struct { 2763 // HotwordRule: Hotword-based detection rule. 2764 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 2765 2766 // ForceSendFields is a list of field names (e.g. "HotwordRule") to 2767 // unconditionally include in API requests. By default, fields with 2768 // empty values are omitted from API requests. However, any non-pointer, 2769 // non-interface field appearing in ForceSendFields will be sent to the 2770 // server regardless of whether the field is empty or not. This may be 2771 // used to include empty fields in Patch requests. 2772 ForceSendFields []string `json:"-"` 2773 2774 // NullFields is a list of field names (e.g. "HotwordRule") to include 2775 // in API requests with the JSON null value. By default, fields with 2776 // empty values are omitted from API requests. However, any field with 2777 // an empty value appearing in NullFields will be sent to the server as 2778 // null. It is an error if a field in this list has a non-empty value. 2779 // This may be used to include null fields in Patch requests. 2780 NullFields []string `json:"-"` 2781} 2782 2783func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) { 2784 type NoMethod GooglePrivacyDlpV2DetectionRule 2785 raw := NoMethod(*s) 2786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2787} 2788 2789// GooglePrivacyDlpV2Dictionary: Custom information type based on a 2790// dictionary of words or phrases. This can be used to match sensitive 2791// information specific to the data, such as a list of employee IDs or 2792// job titles. Dictionary words are case-insensitive and all characters 2793// other than letters and digits in the unicode [Basic Multilingual 2794// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multili 2795// ngual_Plane) will be replaced with whitespace when scanning for 2796// matches, so the dictionary phrase "Sam Johnson" will match all three 2797// phrases "sam johnson", "Sam, Johnson", and "Sam (Johnson)". 2798// Additionally, the characters surrounding any match must be of a 2799// different type than the adjacent characters within the word, so 2800// letters must be next to non-letters and digits next to non-digits. 2801// For example, the dictionary word "jen" will match the first three 2802// letters of the text "jen123" but will return no matches for 2803// "jennifer". Dictionary words containing a large number of characters 2804// that are not letters or digits may result in unexpected findings 2805// because such characters are treated as whitespace. The 2806// [limits](https://cloud.google.com/dlp/limits) page contains details 2807// about the size limits of dictionaries. For dictionaries that do not 2808// fit within these constraints, consider using 2809// `LargeCustomDictionaryConfig` in the `StoredInfoType` API. 2810type GooglePrivacyDlpV2Dictionary struct { 2811 // CloudStoragePath: Newline-delimited file of words in Cloud Storage. 2812 // Only a single file is accepted. 2813 CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"` 2814 2815 // WordList: List of words or phrases to search for. 2816 WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` 2817 2818 // ForceSendFields is a list of field names (e.g. "CloudStoragePath") to 2819 // unconditionally include in API requests. By default, fields with 2820 // empty values are omitted from API requests. However, any non-pointer, 2821 // non-interface field appearing in ForceSendFields will be sent to the 2822 // server regardless of whether the field is empty or not. This may be 2823 // used to include empty fields in Patch requests. 2824 ForceSendFields []string `json:"-"` 2825 2826 // NullFields is a list of field names (e.g. "CloudStoragePath") to 2827 // include in API requests with the JSON null value. By default, fields 2828 // with empty values are omitted from API requests. However, any field 2829 // with an empty value appearing in NullFields will be sent to the 2830 // server as null. It is an error if a field in this list has a 2831 // non-empty value. This may be used to include null fields in Patch 2832 // requests. 2833 NullFields []string `json:"-"` 2834} 2835 2836func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) { 2837 type NoMethod GooglePrivacyDlpV2Dictionary 2838 raw := NoMethod(*s) 2839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2840} 2841 2842// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP 2843// job. 2844type GooglePrivacyDlpV2DlpJob struct { 2845 // CreateTime: Time when the job was created. 2846 CreateTime string `json:"createTime,omitempty"` 2847 2848 // EndTime: Time when the job finished. 2849 EndTime string `json:"endTime,omitempty"` 2850 2851 // Errors: A stream of errors encountered running the job. 2852 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 2853 2854 // InspectDetails: Results from inspecting a data source. 2855 InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` 2856 2857 // JobTriggerName: If created by a job trigger, the resource name of the 2858 // trigger that instantiated the job. 2859 JobTriggerName string `json:"jobTriggerName,omitempty"` 2860 2861 // Name: The server-assigned name. 2862 Name string `json:"name,omitempty"` 2863 2864 // RiskDetails: Results from analyzing risk of a data source. 2865 RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` 2866 2867 // StartTime: Time when the job started. 2868 StartTime string `json:"startTime,omitempty"` 2869 2870 // State: State of a job. 2871 // 2872 // Possible values: 2873 // "JOB_STATE_UNSPECIFIED" - Unused. 2874 // "PENDING" - The job has not yet started. 2875 // "RUNNING" - The job is currently running. Once a job has finished 2876 // it will transition to FAILED or DONE. 2877 // "DONE" - The job is no longer running. 2878 // "CANCELED" - The job was canceled before it could complete. 2879 // "FAILED" - The job had an error and did not complete. 2880 // "ACTIVE" - The job is currently accepting findings via 2881 // hybridInspect. A hybrid job in ACTIVE state may continue to have 2882 // findings added to it through calling of hybridInspect. After the job 2883 // has finished no more calls to hybridInspect may be made. ACTIVE jobs 2884 // can transition to DONE. 2885 State string `json:"state,omitempty"` 2886 2887 // Type: The type of job. 2888 // 2889 // Possible values: 2890 // "DLP_JOB_TYPE_UNSPECIFIED" - Unused 2891 // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 2892 // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 2893 Type string `json:"type,omitempty"` 2894 2895 // ServerResponse contains the HTTP response code and headers from the 2896 // server. 2897 googleapi.ServerResponse `json:"-"` 2898 2899 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2900 // unconditionally include in API requests. By default, fields with 2901 // empty values are omitted from API requests. However, any non-pointer, 2902 // non-interface field appearing in ForceSendFields will be sent to the 2903 // server regardless of whether the field is empty or not. This may be 2904 // used to include empty fields in Patch requests. 2905 ForceSendFields []string `json:"-"` 2906 2907 // NullFields is a list of field names (e.g. "CreateTime") to include in 2908 // API requests with the JSON null value. By default, fields with empty 2909 // values are omitted from API requests. However, any field with an 2910 // empty value appearing in NullFields will be sent to the server as 2911 // null. It is an error if a field in this list has a non-empty value. 2912 // This may be used to include null fields in Patch requests. 2913 NullFields []string `json:"-"` 2914} 2915 2916func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { 2917 type NoMethod GooglePrivacyDlpV2DlpJob 2918 raw := NoMethod(*s) 2919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2920} 2921 2922// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a 2923// document. 2924type GooglePrivacyDlpV2DocumentLocation struct { 2925 // FileOffset: Offset of the line, from the beginning of the file, where 2926 // the finding is located. 2927 FileOffset int64 `json:"fileOffset,omitempty,string"` 2928 2929 // ForceSendFields is a list of field names (e.g. "FileOffset") to 2930 // unconditionally include in API requests. By default, fields with 2931 // empty values are omitted from API requests. However, any non-pointer, 2932 // non-interface field appearing in ForceSendFields will be sent to the 2933 // server regardless of whether the field is empty or not. This may be 2934 // used to include empty fields in Patch requests. 2935 ForceSendFields []string `json:"-"` 2936 2937 // NullFields is a list of field names (e.g. "FileOffset") to include in 2938 // API requests with the JSON null value. By default, fields with empty 2939 // values are omitted from API requests. However, any field with an 2940 // empty value appearing in NullFields will be sent to the server as 2941 // null. It is an error if a field in this list has a non-empty value. 2942 // This may be used to include null fields in Patch requests. 2943 NullFields []string `json:"-"` 2944} 2945 2946func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { 2947 type NoMethod GooglePrivacyDlpV2DocumentLocation 2948 raw := NoMethod(*s) 2949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2950} 2951 2952// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set 2953// of fields that correspond to a single person. For example, in medical 2954// records the `EntityId` might be a patient identifier, or for 2955// financial records it might be an account identifier. This message is 2956// used when generalizations or analysis must take into account that 2957// multiple rows correspond to the same entity. 2958type GooglePrivacyDlpV2EntityId struct { 2959 // Field: Composite key indicating which field contains the entity 2960 // identifier. 2961 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 2962 2963 // ForceSendFields is a list of field names (e.g. "Field") to 2964 // unconditionally include in API requests. By default, fields with 2965 // empty values are omitted from API requests. However, any non-pointer, 2966 // non-interface field appearing in ForceSendFields will be sent to the 2967 // server regardless of whether the field is empty or not. This may be 2968 // used to include empty fields in Patch requests. 2969 ForceSendFields []string `json:"-"` 2970 2971 // NullFields is a list of field names (e.g. "Field") to include in API 2972 // requests with the JSON null value. By default, fields with empty 2973 // values are omitted from API requests. However, any field with an 2974 // empty value appearing in NullFields will be sent to the server as 2975 // null. It is an error if a field in this list has a non-empty value. 2976 // This may be used to include null fields in Patch requests. 2977 NullFields []string `json:"-"` 2978} 2979 2980func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { 2981 type NoMethod GooglePrivacyDlpV2EntityId 2982 raw := NoMethod(*s) 2983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2984} 2985 2986// GooglePrivacyDlpV2Error: Details information about an error 2987// encountered during job execution or the results of an unsuccessful 2988// activation of the JobTrigger. 2989type GooglePrivacyDlpV2Error struct { 2990 // Details: Detailed error codes and messages. 2991 Details *GoogleRpcStatus `json:"details,omitempty"` 2992 2993 // Timestamps: The times the error occurred. 2994 Timestamps []string `json:"timestamps,omitempty"` 2995 2996 // ForceSendFields is a list of field names (e.g. "Details") to 2997 // unconditionally include in API requests. By default, fields with 2998 // empty values are omitted from API requests. However, any non-pointer, 2999 // non-interface field appearing in ForceSendFields will be sent to the 3000 // server regardless of whether the field is empty or not. This may be 3001 // used to include empty fields in Patch requests. 3002 ForceSendFields []string `json:"-"` 3003 3004 // NullFields is a list of field names (e.g. "Details") to include in 3005 // API requests with the JSON null value. By default, fields with empty 3006 // values are omitted from API requests. However, any field with an 3007 // empty value appearing in NullFields will be sent to the server as 3008 // null. It is an error if a field in this list has a non-empty value. 3009 // This may be used to include null fields in Patch requests. 3010 NullFields []string `json:"-"` 3011} 3012 3013func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { 3014 type NoMethod GooglePrivacyDlpV2Error 3015 raw := NoMethod(*s) 3016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3017} 3018 3019// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes. 3020type GooglePrivacyDlpV2ExcludeInfoTypes struct { 3021 // InfoTypes: InfoType list in ExclusionRule rule drops a finding when 3022 // it overlaps or contained within with a finding of an infoType from 3023 // this list. For example, for `InspectionRuleSet.info_types` containing 3024 // "PHONE_NUMBER" and `exclusion_rule` containing 3025 // `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number 3026 // findings are dropped if they overlap with EMAIL_ADDRESS finding. That 3027 // leads to "555-222-2222@example.org" to generate only a single 3028 // finding, namely email address. 3029 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3030 3031 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3032 // unconditionally include in API requests. By default, fields with 3033 // empty values are omitted from API requests. However, any non-pointer, 3034 // non-interface field appearing in ForceSendFields will be sent to the 3035 // server regardless of whether the field is empty or not. This may be 3036 // used to include empty fields in Patch requests. 3037 ForceSendFields []string `json:"-"` 3038 3039 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3040 // API requests with the JSON null value. By default, fields with empty 3041 // values are omitted from API requests. However, any field with an 3042 // empty value appearing in NullFields will be sent to the server as 3043 // null. It is an error if a field in this list has a non-empty value. 3044 // This may be used to include null fields in Patch requests. 3045 NullFields []string `json:"-"` 3046} 3047 3048func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { 3049 type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes 3050 raw := NoMethod(*s) 3051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3052} 3053 3054// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions 3055// when findings of infoTypes specified in `InspectionRuleSet` are 3056// removed from results. 3057type GooglePrivacyDlpV2ExclusionRule struct { 3058 // Dictionary: Dictionary which defines the rule. 3059 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 3060 3061 // ExcludeInfoTypes: Set of infoTypes for which findings would affect 3062 // this rule. 3063 ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` 3064 3065 // MatchingType: How the rule is applied, see MatchingType documentation 3066 // for details. 3067 // 3068 // Possible values: 3069 // "MATCHING_TYPE_UNSPECIFIED" - Invalid. 3070 // "MATCHING_TYPE_FULL_MATCH" - Full match. - Dictionary: join of 3071 // Dictionary results matched complete finding quote - Regex: all regex 3072 // matches fill a finding quote start to end - Exclude info type: 3073 // completely inside affecting info types findings 3074 // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. - Dictionary: at 3075 // least one of the tokens in the finding matches - Regex: substring of 3076 // the finding matches - Exclude info type: intersects with affecting 3077 // info types findings 3078 // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. - Dictionary: no 3079 // tokens in the finding match the dictionary - Regex: finding doesn't 3080 // match the regex - Exclude info type: no intersection with affecting 3081 // info types findings 3082 MatchingType string `json:"matchingType,omitempty"` 3083 3084 // Regex: Regular expression which defines the rule. 3085 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 3086 3087 // ForceSendFields is a list of field names (e.g. "Dictionary") to 3088 // unconditionally include in API requests. By default, fields with 3089 // empty values are omitted from API requests. However, any non-pointer, 3090 // non-interface field appearing in ForceSendFields will be sent to the 3091 // server regardless of whether the field is empty or not. This may be 3092 // used to include empty fields in Patch requests. 3093 ForceSendFields []string `json:"-"` 3094 3095 // NullFields is a list of field names (e.g. "Dictionary") to include in 3096 // API requests with the JSON null value. By default, fields with empty 3097 // values are omitted from API requests. However, any field with an 3098 // empty value appearing in NullFields will be sent to the server as 3099 // null. It is an error if a field in this list has a non-empty value. 3100 // This may be used to include null fields in Patch requests. 3101 NullFields []string `json:"-"` 3102} 3103 3104func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { 3105 type NoMethod GooglePrivacyDlpV2ExclusionRule 3106 raw := NoMethod(*s) 3107 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3108} 3109 3110// GooglePrivacyDlpV2Expressions: An expression, consisting or an 3111// operator and conditions. 3112type GooglePrivacyDlpV2Expressions struct { 3113 // Conditions: Conditions to apply to the expression. 3114 Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` 3115 3116 // LogicalOperator: The operator to apply to the result of conditions. 3117 // Default and currently only supported value is `AND`. 3118 // 3119 // Possible values: 3120 // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused 3121 // "AND" - Conditional AND 3122 LogicalOperator string `json:"logicalOperator,omitempty"` 3123 3124 // ForceSendFields is a list of field names (e.g. "Conditions") to 3125 // unconditionally include in API requests. By default, fields with 3126 // empty values are omitted from API requests. However, any non-pointer, 3127 // non-interface field appearing in ForceSendFields will be sent to the 3128 // server regardless of whether the field is empty or not. This may be 3129 // used to include empty fields in Patch requests. 3130 ForceSendFields []string `json:"-"` 3131 3132 // NullFields is a list of field names (e.g. "Conditions") to include in 3133 // API requests with the JSON null value. By default, fields with empty 3134 // values are omitted from API requests. However, any field with an 3135 // empty value appearing in NullFields will be sent to the server as 3136 // null. It is an error if a field in this list has a non-empty value. 3137 // This may be used to include null fields in Patch requests. 3138 NullFields []string `json:"-"` 3139} 3140 3141func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { 3142 type NoMethod GooglePrivacyDlpV2Expressions 3143 raw := NoMethod(*s) 3144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3145} 3146 3147// GooglePrivacyDlpV2FieldId: General identifier of a data field in a 3148// storage service. 3149type GooglePrivacyDlpV2FieldId struct { 3150 // Name: Name describing the field. 3151 Name string `json:"name,omitempty"` 3152 3153 // ForceSendFields is a list of field names (e.g. "Name") to 3154 // unconditionally include in API requests. By default, fields with 3155 // empty values are omitted from API requests. However, any non-pointer, 3156 // non-interface field appearing in ForceSendFields will be sent to the 3157 // server regardless of whether the field is empty or not. This may be 3158 // used to include empty fields in Patch requests. 3159 ForceSendFields []string `json:"-"` 3160 3161 // NullFields is a list of field names (e.g. "Name") to include in API 3162 // requests with the JSON null value. By default, fields with empty 3163 // values are omitted from API requests. However, any field with an 3164 // empty value appearing in NullFields will be sent to the server as 3165 // null. It is an error if a field in this list has a non-empty value. 3166 // This may be used to include null fields in Patch requests. 3167 NullFields []string `json:"-"` 3168} 3169 3170func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { 3171 type NoMethod GooglePrivacyDlpV2FieldId 3172 raw := NoMethod(*s) 3173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3174} 3175 3176// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to 3177// the field. 3178type GooglePrivacyDlpV2FieldTransformation struct { 3179 // Condition: Only apply the transformation if the condition evaluates 3180 // to true for the given `RecordCondition`. The conditions are allowed 3181 // to reference fields that are not used in the actual transformation. 3182 // Example Use Cases: - Apply a different bucket transformation to an 3183 // age column if the zip code column for the same record is within a 3184 // specific range. - Redact a field if the date of birth field is 3185 // greater than 85. 3186 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 3187 3188 // Fields: Required. Input field(s) to apply the transformation to. 3189 Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` 3190 3191 // InfoTypeTransformations: Treat the contents of the field as free 3192 // text, and selectively transform content that matches an `InfoType`. 3193 InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` 3194 3195 // PrimitiveTransformation: Apply the transformation to the entire 3196 // field. 3197 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3198 3199 // ForceSendFields is a list of field names (e.g. "Condition") to 3200 // unconditionally include in API requests. By default, fields with 3201 // empty values are omitted from API requests. However, any non-pointer, 3202 // non-interface field appearing in ForceSendFields will be sent to the 3203 // server regardless of whether the field is empty or not. This may be 3204 // used to include empty fields in Patch requests. 3205 ForceSendFields []string `json:"-"` 3206 3207 // NullFields is a list of field names (e.g. "Condition") to include in 3208 // API requests with the JSON null value. By default, fields with empty 3209 // values are omitted from API requests. However, any field with an 3210 // empty value appearing in NullFields will be sent to the server as 3211 // null. It is an error if a field in this list has a non-empty value. 3212 // This may be used to include null fields in Patch requests. 3213 NullFields []string `json:"-"` 3214} 3215 3216func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { 3217 type NoMethod GooglePrivacyDlpV2FieldTransformation 3218 raw := NoMethod(*s) 3219 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3220} 3221 3222// GooglePrivacyDlpV2FileSet: Set of files to scan. 3223type GooglePrivacyDlpV2FileSet struct { 3224 // RegexFileSet: The regex-filtered set of files to scan. Exactly one of 3225 // `url` or `regex_file_set` must be set. 3226 RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` 3227 3228 // Url: The Cloud Storage url of the file(s) to scan, in the format 3229 // `gs:///`. Trailing wildcard in the path is allowed. If the url ends 3230 // in a trailing slash, the bucket or directory represented by the url 3231 // will be scanned non-recursively (content in sub-directories will not 3232 // be scanned). This means that `gs://mybucket/` is equivalent to 3233 // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to 3234 // `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` 3235 // must be set. 3236 Url string `json:"url,omitempty"` 3237 3238 // ForceSendFields is a list of field names (e.g. "RegexFileSet") to 3239 // unconditionally include in API requests. By default, fields with 3240 // empty values are omitted from API requests. However, any non-pointer, 3241 // non-interface field appearing in ForceSendFields will be sent to the 3242 // server regardless of whether the field is empty or not. This may be 3243 // used to include empty fields in Patch requests. 3244 ForceSendFields []string `json:"-"` 3245 3246 // NullFields is a list of field names (e.g. "RegexFileSet") to include 3247 // in API requests with the JSON null value. By default, fields with 3248 // empty values are omitted from API requests. However, any field with 3249 // an empty value appearing in NullFields will be sent to the server as 3250 // null. It is an error if a field in this list has a non-empty value. 3251 // This may be used to include null fields in Patch requests. 3252 NullFields []string `json:"-"` 3253} 3254 3255func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { 3256 type NoMethod GooglePrivacyDlpV2FileSet 3257 raw := NoMethod(*s) 3258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3259} 3260 3261// GooglePrivacyDlpV2Finding: Represents a piece of potentially 3262// sensitive content. 3263type GooglePrivacyDlpV2Finding struct { 3264 // CreateTime: Timestamp when finding was detected. 3265 CreateTime string `json:"createTime,omitempty"` 3266 3267 // InfoType: The type of content that might have been found. Provided if 3268 // `excluded_types` is false. 3269 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3270 3271 // JobCreateTime: Time the job started that produced this finding. 3272 JobCreateTime string `json:"jobCreateTime,omitempty"` 3273 3274 // JobName: The job that stored the finding. 3275 JobName string `json:"jobName,omitempty"` 3276 3277 // Labels: The labels associated with this `Finding`. Label keys must be 3278 // between 1 and 63 characters long and must conform to the following 3279 // regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must 3280 // be between 0 and 63 characters long and must conform to the regular 3281 // expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels 3282 // can be associated with a given finding. Examples: * "environment" : 3283 // "production" * "pipeline" : "etl" 3284 Labels map[string]string `json:"labels,omitempty"` 3285 3286 // Likelihood: Confidence of how likely it is that the `info_type` is 3287 // correct. 3288 // 3289 // Possible values: 3290 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 3291 // "VERY_UNLIKELY" - Few matching elements. 3292 // "UNLIKELY" 3293 // "POSSIBLE" - Some matching elements. 3294 // "LIKELY" 3295 // "VERY_LIKELY" - Many matching elements. 3296 Likelihood string `json:"likelihood,omitempty"` 3297 3298 // Location: Where the content was found. 3299 Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` 3300 3301 // Name: Resource name in format 3302 // projects/{project}/locations/{location}/findings/{finding} Populated 3303 // only when viewing persisted findings. 3304 Name string `json:"name,omitempty"` 3305 3306 // Quote: The content that was found. Even if the content is not 3307 // textual, it may be converted to a textual representation here. 3308 // Provided if `include_quote` is true and the finding is less than or 3309 // equal to 4096 bytes long. If the finding exceeds 4096 bytes in 3310 // length, the quote may be omitted. 3311 Quote string `json:"quote,omitempty"` 3312 3313 // QuoteInfo: Contains data parsed from quotes. Only populated if 3314 // include_quote was set to true and a supported infoType was requested. 3315 // Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. 3316 QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` 3317 3318 // ResourceName: The job that stored the finding. 3319 ResourceName string `json:"resourceName,omitempty"` 3320 3321 // TriggerName: Job trigger name, if applicable, for this finding. 3322 TriggerName string `json:"triggerName,omitempty"` 3323 3324 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3325 // unconditionally include in API requests. By default, fields with 3326 // empty values are omitted from API requests. However, any non-pointer, 3327 // non-interface field appearing in ForceSendFields will be sent to the 3328 // server regardless of whether the field is empty or not. This may be 3329 // used to include empty fields in Patch requests. 3330 ForceSendFields []string `json:"-"` 3331 3332 // NullFields is a list of field names (e.g. "CreateTime") to include in 3333 // API requests with the JSON null value. By default, fields with empty 3334 // values are omitted from API requests. However, any field with an 3335 // empty value appearing in NullFields will be sent to the server as 3336 // null. It is an error if a field in this list has a non-empty value. 3337 // This may be used to include null fields in Patch requests. 3338 NullFields []string `json:"-"` 3339} 3340 3341func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { 3342 type NoMethod GooglePrivacyDlpV2Finding 3343 raw := NoMethod(*s) 3344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3345} 3346 3347// GooglePrivacyDlpV2FindingLimits: Configuration to control the number 3348// of findings returned. 3349type GooglePrivacyDlpV2FindingLimits struct { 3350 // MaxFindingsPerInfoType: Configuration of findings limit given for 3351 // specified infoTypes. 3352 MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` 3353 3354 // MaxFindingsPerItem: Max number of findings that will be returned for 3355 // each item scanned. When set within `InspectJobConfig`, the maximum 3356 // returned is 2000 regardless if this is set higher. When set within 3357 // `InspectContentRequest`, this field is ignored. 3358 MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` 3359 3360 // MaxFindingsPerRequest: Max number of findings that will be returned 3361 // per request/job. When set within `InspectContentRequest`, the maximum 3362 // returned is 2000 regardless if this is set higher. 3363 MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` 3364 3365 // ForceSendFields is a list of field names (e.g. 3366 // "MaxFindingsPerInfoType") to unconditionally include in API requests. 3367 // By default, fields with empty values are omitted from API requests. 3368 // However, any non-pointer, non-interface field appearing in 3369 // ForceSendFields will be sent to the server regardless of whether the 3370 // field is empty or not. This may be used to include empty fields in 3371 // Patch requests. 3372 ForceSendFields []string `json:"-"` 3373 3374 // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") 3375 // to include in API requests with the JSON null value. By default, 3376 // fields with empty values are omitted from API requests. However, any 3377 // field with an empty value appearing in NullFields will be sent to the 3378 // server as null. It is an error if a field in this list has a 3379 // non-empty value. This may be used to include null fields in Patch 3380 // requests. 3381 NullFields []string `json:"-"` 3382} 3383 3384func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { 3385 type NoMethod GooglePrivacyDlpV2FindingLimits 3386 raw := NoMethod(*s) 3387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3388} 3389 3390// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for 3391// finishing a DLP hybrid job. 3392type GooglePrivacyDlpV2FinishDlpJobRequest struct { 3393} 3394 3395// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on 3396// fixed size ranges. The Bucketing transformation can provide all of 3397// this functionality, but requires more configuration. This message is 3398// provided as a convenience to the user for simple bucketing 3399// strategies. The transformed value will be a hyphenated string of 3400// {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound 3401// = 20 all values that are within this bucket will be replaced with 3402// "10-20". This can be used on data of type: double, long. If the bound 3403// Value type differs from the type of data being transformed, we will 3404// first attempt converting the type of the data to be transformed to 3405// match the type of the bound before comparing. See 3406// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. 3407type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { 3408 // BucketSize: Required. Size of each bucket (except for minimum and 3409 // maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and 3410 // `bucket_size` = 10, then the following buckets would be used: -10, 3411 // 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. 3412 // Precision up to 2 decimals works. 3413 BucketSize float64 `json:"bucketSize,omitempty"` 3414 3415 // LowerBound: Required. Lower bound value of buckets. All values less 3416 // than `lower_bound` are grouped together into a single bucket; for 3417 // example if `lower_bound` = 10, then all values less than 10 are 3418 // replaced with the value "-10". 3419 LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` 3420 3421 // UpperBound: Required. Upper bound value of buckets. All values 3422 // greater than upper_bound are grouped together into a single bucket; 3423 // for example if `upper_bound` = 89, then all values greater than 89 3424 // are replaced with the value "89+". 3425 UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` 3426 3427 // ForceSendFields is a list of field names (e.g. "BucketSize") to 3428 // unconditionally include in API requests. By default, fields with 3429 // empty values are omitted from API requests. However, any non-pointer, 3430 // non-interface field appearing in ForceSendFields will be sent to the 3431 // server regardless of whether the field is empty or not. This may be 3432 // used to include empty fields in Patch requests. 3433 ForceSendFields []string `json:"-"` 3434 3435 // NullFields is a list of field names (e.g. "BucketSize") to include in 3436 // API requests with the JSON null value. By default, fields with empty 3437 // values are omitted from API requests. However, any field with an 3438 // empty value appearing in NullFields will be sent to the server as 3439 // null. It is an error if a field in this list has a non-empty value. 3440 // This may be used to include null fields in Patch requests. 3441 NullFields []string `json:"-"` 3442} 3443 3444func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { 3445 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3446 raw := NoMethod(*s) 3447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3448} 3449 3450func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { 3451 type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig 3452 var s1 struct { 3453 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 3454 *NoMethod 3455 } 3456 s1.NoMethod = (*NoMethod)(s) 3457 if err := json.Unmarshal(data, &s1); err != nil { 3458 return err 3459 } 3460 s.BucketSize = float64(s1.BucketSize) 3461 return nil 3462} 3463 3464// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood 3465// of findings within a certain proximity of hotwords. 3466type GooglePrivacyDlpV2HotwordRule struct { 3467 // HotwordRegex: Regular expression pattern defining what qualifies as a 3468 // hotword. 3469 HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` 3470 3471 // LikelihoodAdjustment: Likelihood adjustment to apply to all matching 3472 // findings. 3473 LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` 3474 3475 // Proximity: Proximity of the finding within which the entire hotword 3476 // must reside. The total length of the window cannot exceed 1000 3477 // characters. Note that the finding itself will be included in the 3478 // window, so that hotwords may be used to match substrings of the 3479 // finding itself. For example, the certainty of a phone number regex 3480 // "\(\d{3}\) \d{3}-\d{4}" could be adjusted upwards if the area code is 3481 // known to be the local area code of a company office using the hotword 3482 // regex "\(xxx\)", where "xxx" is the area code in question. 3483 Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` 3484 3485 // ForceSendFields is a list of field names (e.g. "HotwordRegex") to 3486 // unconditionally include in API requests. By default, fields with 3487 // empty values are omitted from API requests. However, any non-pointer, 3488 // non-interface field appearing in ForceSendFields will be sent to the 3489 // server regardless of whether the field is empty or not. This may be 3490 // used to include empty fields in Patch requests. 3491 ForceSendFields []string `json:"-"` 3492 3493 // NullFields is a list of field names (e.g. "HotwordRegex") to include 3494 // in API requests with the JSON null value. By default, fields with 3495 // empty values are omitted from API requests. However, any field with 3496 // an empty value appearing in NullFields will be sent to the server as 3497 // null. It is an error if a field in this list has a non-empty value. 3498 // This may be used to include null fields in Patch requests. 3499 NullFields []string `json:"-"` 3500} 3501 3502func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { 3503 type NoMethod GooglePrivacyDlpV2HotwordRule 3504 raw := NoMethod(*s) 3505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3506} 3507 3508// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to 3509// inspect. Will be stored temporarily during processing. 3510type GooglePrivacyDlpV2HybridContentItem struct { 3511 // FindingDetails: Supplementary information that will be added to each 3512 // finding. 3513 FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"` 3514 3515 // Item: The item to inspect. 3516 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 3517 3518 // ForceSendFields is a list of field names (e.g. "FindingDetails") to 3519 // unconditionally include in API requests. By default, fields with 3520 // empty values are omitted from API requests. However, any non-pointer, 3521 // non-interface field appearing in ForceSendFields will be sent to the 3522 // server regardless of whether the field is empty or not. This may be 3523 // used to include empty fields in Patch requests. 3524 ForceSendFields []string `json:"-"` 3525 3526 // NullFields is a list of field names (e.g. "FindingDetails") to 3527 // include in API requests with the JSON null value. By default, fields 3528 // with empty values are omitted from API requests. However, any field 3529 // with an empty value appearing in NullFields will be sent to the 3530 // server as null. It is an error if a field in this list has a 3531 // non-empty value. This may be used to include null fields in Patch 3532 // requests. 3533 NullFields []string `json:"-"` 3534} 3535 3536func (s *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) { 3537 type NoMethod GooglePrivacyDlpV2HybridContentItem 3538 raw := NoMethod(*s) 3539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3540} 3541 3542// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate 3543// additional data with each finding. 3544type GooglePrivacyDlpV2HybridFindingDetails struct { 3545 // ContainerDetails: Details about the container where the content being 3546 // inspected is from. 3547 ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"` 3548 3549 // FileOffset: Offset in bytes of the line, from the beginning of the 3550 // file, where the finding is located. Populate if the item being 3551 // scanned is only part of a bigger item, such as a shard of a file and 3552 // you want to track the absolute position of the finding. 3553 FileOffset int64 `json:"fileOffset,omitempty,string"` 3554 3555 // Labels: Labels to represent user provided metadata about the data 3556 // being inspected. If configured by the job, some key values may be 3557 // required. The labels associated with `Finding`'s produced by hybrid 3558 // inspection. Label keys must be between 1 and 63 characters long and 3559 // must conform to the following regular expression: 3560 // `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3561 // characters long and must conform to the regular expression 3562 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3563 // associated with a given finding. Examples: * "environment" : 3564 // "production" * "pipeline" : "etl" 3565 Labels map[string]string `json:"labels,omitempty"` 3566 3567 // RowOffset: Offset of the row for tables. Populate if the row(s) being 3568 // scanned are part of a bigger dataset and you want to keep track of 3569 // their absolute position. 3570 RowOffset int64 `json:"rowOffset,omitempty,string"` 3571 3572 // TableOptions: If the container is a table, additional information to 3573 // make findings meaningful such as the columns that are primary keys. 3574 // If not known ahead of time, can also be set within each inspect 3575 // hybrid call and the two will be merged. Note that identifying_fields 3576 // will only be stored to BigQuery, and only if the BigQuery action has 3577 // been included. 3578 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3579 3580 // ForceSendFields is a list of field names (e.g. "ContainerDetails") to 3581 // unconditionally include in API requests. By default, fields with 3582 // empty values are omitted from API requests. However, any non-pointer, 3583 // non-interface field appearing in ForceSendFields will be sent to the 3584 // server regardless of whether the field is empty or not. This may be 3585 // used to include empty fields in Patch requests. 3586 ForceSendFields []string `json:"-"` 3587 3588 // NullFields is a list of field names (e.g. "ContainerDetails") to 3589 // include in API requests with the JSON null value. By default, fields 3590 // with empty values are omitted from API requests. However, any field 3591 // with an empty value appearing in NullFields will be sent to the 3592 // server as null. It is an error if a field in this list has a 3593 // non-empty value. This may be used to include null fields in Patch 3594 // requests. 3595 NullFields []string `json:"-"` 3596} 3597 3598func (s *GooglePrivacyDlpV2HybridFindingDetails) MarshalJSON() ([]byte, error) { 3599 type NoMethod GooglePrivacyDlpV2HybridFindingDetails 3600 raw := NoMethod(*s) 3601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3602} 3603 3604// GooglePrivacyDlpV2HybridInspectDlpJobRequest: Request to search for 3605// potentially sensitive info in a custom location. 3606type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { 3607 // HybridItem: The item to inspect. 3608 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3609 3610 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3611 // unconditionally include in API requests. By default, fields with 3612 // empty values are omitted from API requests. However, any non-pointer, 3613 // non-interface field appearing in ForceSendFields will be sent to the 3614 // server regardless of whether the field is empty or not. This may be 3615 // used to include empty fields in Patch requests. 3616 ForceSendFields []string `json:"-"` 3617 3618 // NullFields is a list of field names (e.g. "HybridItem") to include in 3619 // API requests with the JSON null value. By default, fields with empty 3620 // values are omitted from API requests. However, any field with an 3621 // empty value appearing in NullFields will be sent to the server as 3622 // null. It is an error if a field in this list has a non-empty value. 3623 // This may be used to include null fields in Patch requests. 3624 NullFields []string `json:"-"` 3625} 3626 3627func (s *GooglePrivacyDlpV2HybridInspectDlpJobRequest) MarshalJSON() ([]byte, error) { 3628 type NoMethod GooglePrivacyDlpV2HybridInspectDlpJobRequest 3629 raw := NoMethod(*s) 3630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3631} 3632 3633// GooglePrivacyDlpV2HybridInspectJobTriggerRequest: Request to search 3634// for potentially sensitive info in a custom location. 3635type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { 3636 // HybridItem: The item to inspect. 3637 HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` 3638 3639 // ForceSendFields is a list of field names (e.g. "HybridItem") to 3640 // unconditionally include in API requests. By default, fields with 3641 // empty values are omitted from API requests. However, any non-pointer, 3642 // non-interface field appearing in ForceSendFields will be sent to the 3643 // server regardless of whether the field is empty or not. This may be 3644 // used to include empty fields in Patch requests. 3645 ForceSendFields []string `json:"-"` 3646 3647 // NullFields is a list of field names (e.g. "HybridItem") to include in 3648 // API requests with the JSON null value. By default, fields with empty 3649 // values are omitted from API requests. However, any field with an 3650 // empty value appearing in NullFields will be sent to the server as 3651 // null. It is an error if a field in this list has a non-empty value. 3652 // This may be used to include null fields in Patch requests. 3653 NullFields []string `json:"-"` 3654} 3655 3656func (s *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) MarshalJSON() ([]byte, error) { 3657 type NoMethod GooglePrivacyDlpV2HybridInspectJobTriggerRequest 3658 raw := NoMethod(*s) 3659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3660} 3661 3662// GooglePrivacyDlpV2HybridInspectResponse: Quota exceeded errors will 3663// be thrown once quota has been met. 3664type GooglePrivacyDlpV2HybridInspectResponse struct { 3665 // ServerResponse contains the HTTP response code and headers from the 3666 // server. 3667 googleapi.ServerResponse `json:"-"` 3668} 3669 3670// GooglePrivacyDlpV2HybridInspectStatistics: Statistics related to 3671// processing hybrid inspect requests. 3672type GooglePrivacyDlpV2HybridInspectStatistics struct { 3673 // AbortedCount: The number of hybrid inspection requests aborted 3674 // because the job ran out of quota or was ended before they could be 3675 // processed. 3676 AbortedCount int64 `json:"abortedCount,omitempty,string"` 3677 3678 // PendingCount: The number of hybrid requests currently being 3679 // processed. Only populated when called via method `getDlpJob`. A burst 3680 // of traffic may cause hybrid inspect requests to be enqueued. 3681 // Processing will take place as quickly as possible, but resource 3682 // limitations may impact how long a request is enqueued for. 3683 PendingCount int64 `json:"pendingCount,omitempty,string"` 3684 3685 // ProcessedCount: The number of hybrid inspection requests processed 3686 // within this job. 3687 ProcessedCount int64 `json:"processedCount,omitempty,string"` 3688 3689 // ForceSendFields is a list of field names (e.g. "AbortedCount") to 3690 // unconditionally include in API requests. By default, fields with 3691 // empty values are omitted from API requests. However, any non-pointer, 3692 // non-interface field appearing in ForceSendFields will be sent to the 3693 // server regardless of whether the field is empty or not. This may be 3694 // used to include empty fields in Patch requests. 3695 ForceSendFields []string `json:"-"` 3696 3697 // NullFields is a list of field names (e.g. "AbortedCount") to include 3698 // in API requests with the JSON null value. By default, fields with 3699 // empty values are omitted from API requests. However, any field with 3700 // an empty value appearing in NullFields will be sent to the server as 3701 // null. It is an error if a field in this list has a non-empty value. 3702 // This may be used to include null fields in Patch requests. 3703 NullFields []string `json:"-"` 3704} 3705 3706func (s *GooglePrivacyDlpV2HybridInspectStatistics) MarshalJSON() ([]byte, error) { 3707 type NoMethod GooglePrivacyDlpV2HybridInspectStatistics 3708 raw := NoMethod(*s) 3709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3710} 3711 3712// GooglePrivacyDlpV2HybridOptions: Configuration to control jobs where 3713// the content being inspected is outside of Google Cloud Platform. 3714type GooglePrivacyDlpV2HybridOptions struct { 3715 // Description: A short description of where the data is coming from. 3716 // Will be stored once in the job. 256 max length. 3717 Description string `json:"description,omitempty"` 3718 3719 // Labels: To organize findings, these labels will be added to each 3720 // finding. Label keys must be between 1 and 63 characters long and must 3721 // conform to the following regular expression: 3722 // `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 3723 // characters long and must conform to the regular expression 3724 // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be 3725 // associated with a given finding. Examples: * "environment" : 3726 // "production" * "pipeline" : "etl" 3727 Labels map[string]string `json:"labels,omitempty"` 3728 3729 // RequiredFindingLabelKeys: These are labels that each inspection 3730 // request must include within their 'finding_labels' map. Request may 3731 // contain others, but any missing one of these will be rejected. Label 3732 // keys must be between 1 and 63 characters long and must conform to the 3733 // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more 3734 // than 10 keys can be required. 3735 RequiredFindingLabelKeys []string `json:"requiredFindingLabelKeys,omitempty"` 3736 3737 // TableOptions: If the container is a table, additional information to 3738 // make findings meaningful such as the columns that are primary keys. 3739 TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` 3740 3741 // ForceSendFields is a list of field names (e.g. "Description") to 3742 // unconditionally include in API requests. By default, fields with 3743 // empty values are omitted from API requests. However, any non-pointer, 3744 // non-interface field appearing in ForceSendFields will be sent to the 3745 // server regardless of whether the field is empty or not. This may be 3746 // used to include empty fields in Patch requests. 3747 ForceSendFields []string `json:"-"` 3748 3749 // NullFields is a list of field names (e.g. "Description") to include 3750 // in API requests with the JSON null value. By default, fields with 3751 // empty values are omitted from API requests. However, any field with 3752 // an empty value appearing in NullFields will be sent to the server as 3753 // null. It is an error if a field in this list has a non-empty value. 3754 // This may be used to include null fields in Patch requests. 3755 NullFields []string `json:"-"` 3756} 3757 3758func (s *GooglePrivacyDlpV2HybridOptions) MarshalJSON() ([]byte, error) { 3759 type NoMethod GooglePrivacyDlpV2HybridOptions 3760 raw := NoMethod(*s) 3761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3762} 3763 3764// GooglePrivacyDlpV2ImageLocation: Location of the finding within an 3765// image. 3766type GooglePrivacyDlpV2ImageLocation struct { 3767 // BoundingBoxes: Bounding boxes locating the pixels within the image 3768 // containing the finding. 3769 BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` 3770 3771 // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to 3772 // unconditionally include in API requests. By default, fields with 3773 // empty values are omitted from API requests. However, any non-pointer, 3774 // non-interface field appearing in ForceSendFields will be sent to the 3775 // server regardless of whether the field is empty or not. This may be 3776 // used to include empty fields in Patch requests. 3777 ForceSendFields []string `json:"-"` 3778 3779 // NullFields is a list of field names (e.g. "BoundingBoxes") to include 3780 // in API requests with the JSON null value. By default, fields with 3781 // empty values are omitted from API requests. However, any field with 3782 // an empty value appearing in NullFields will be sent to the server as 3783 // null. It is an error if a field in this list has a non-empty value. 3784 // This may be used to include null fields in Patch requests. 3785 NullFields []string `json:"-"` 3786} 3787 3788func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { 3789 type NoMethod GooglePrivacyDlpV2ImageLocation 3790 raw := NoMethod(*s) 3791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3792} 3793 3794// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining 3795// how redaction of images should occur. 3796type GooglePrivacyDlpV2ImageRedactionConfig struct { 3797 // InfoType: Only one per info_type should be provided per request. If 3798 // not specified, and redact_all_text is false, the DLP API will redact 3799 // all text that it matches against all info_types that are found, but 3800 // not specified in another ImageRedactionConfig. 3801 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3802 3803 // RedactAllText: If true, all text found in the image, regardless 3804 // whether it matches an info_type, is redacted. Only one should be 3805 // provided. 3806 RedactAllText bool `json:"redactAllText,omitempty"` 3807 3808 // RedactionColor: The color to use when redacting content from an 3809 // image. If not specified, the default is black. 3810 RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` 3811 3812 // ForceSendFields is a list of field names (e.g. "InfoType") to 3813 // unconditionally include in API requests. By default, fields with 3814 // empty values are omitted from API requests. However, any non-pointer, 3815 // non-interface field appearing in ForceSendFields will be sent to the 3816 // server regardless of whether the field is empty or not. This may be 3817 // used to include empty fields in Patch requests. 3818 ForceSendFields []string `json:"-"` 3819 3820 // NullFields is a list of field names (e.g. "InfoType") to include in 3821 // API requests with the JSON null value. By default, fields with empty 3822 // values are omitted from API requests. However, any field with an 3823 // empty value appearing in NullFields will be sent to the server as 3824 // null. It is an error if a field in this list has a non-empty value. 3825 // This may be used to include null fields in Patch requests. 3826 NullFields []string `json:"-"` 3827} 3828 3829func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { 3830 type NoMethod GooglePrivacyDlpV2ImageRedactionConfig 3831 raw := NoMethod(*s) 3832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3833} 3834 3835// GooglePrivacyDlpV2InfoType: Type of information detected by the API. 3836type GooglePrivacyDlpV2InfoType struct { 3837 // Name: Name of the information type. Either a name of your choosing 3838 // when creating a CustomInfoType, or one of the names listed at 3839 // https://cloud.google.com/dlp/docs/infotypes-reference when specifying 3840 // a built-in type. When sending Cloud DLP results to Data Catalog, 3841 // infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. 3842 Name string `json:"name,omitempty"` 3843 3844 // ForceSendFields is a list of field names (e.g. "Name") to 3845 // unconditionally include in API requests. By default, fields with 3846 // empty values are omitted from API requests. However, any non-pointer, 3847 // non-interface field appearing in ForceSendFields will be sent to the 3848 // server regardless of whether the field is empty or not. This may be 3849 // used to include empty fields in Patch requests. 3850 ForceSendFields []string `json:"-"` 3851 3852 // NullFields is a list of field names (e.g. "Name") to include in API 3853 // requests with the JSON null value. By default, fields with empty 3854 // values are omitted from API requests. However, any field with an 3855 // empty value appearing in NullFields will be sent to the server as 3856 // null. It is an error if a field in this list has a non-empty value. 3857 // This may be used to include null fields in Patch requests. 3858 NullFields []string `json:"-"` 3859} 3860 3861func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { 3862 type NoMethod GooglePrivacyDlpV2InfoType 3863 raw := NoMethod(*s) 3864 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3865} 3866 3867// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. 3868type GooglePrivacyDlpV2InfoTypeDescription struct { 3869 // Description: Description of the infotype. Translated when language is 3870 // provided in the request. 3871 Description string `json:"description,omitempty"` 3872 3873 // DisplayName: Human readable form of the infoType name. 3874 DisplayName string `json:"displayName,omitempty"` 3875 3876 // Name: Internal name of the infoType. 3877 Name string `json:"name,omitempty"` 3878 3879 // SupportedBy: Which parts of the API supports this InfoType. 3880 // 3881 // Possible values: 3882 // "ENUM_TYPE_UNSPECIFIED" - Unused. 3883 // "INSPECT" - Supported by the inspect operations. 3884 // "RISK_ANALYSIS" - Supported by the risk analysis operations. 3885 SupportedBy []string `json:"supportedBy,omitempty"` 3886 3887 // ForceSendFields is a list of field names (e.g. "Description") to 3888 // unconditionally include in API requests. By default, fields with 3889 // empty values are omitted from API requests. However, any non-pointer, 3890 // non-interface field appearing in ForceSendFields will be sent to the 3891 // server regardless of whether the field is empty or not. This may be 3892 // used to include empty fields in Patch requests. 3893 ForceSendFields []string `json:"-"` 3894 3895 // NullFields is a list of field names (e.g. "Description") to include 3896 // in API requests with the JSON null value. By default, fields with 3897 // empty values are omitted from API requests. However, any field with 3898 // an empty value appearing in NullFields will be sent to the server as 3899 // null. It is an error if a field in this list has a non-empty value. 3900 // This may be used to include null fields in Patch requests. 3901 NullFields []string `json:"-"` 3902} 3903 3904func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { 3905 type NoMethod GooglePrivacyDlpV2InfoTypeDescription 3906 raw := NoMethod(*s) 3907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3908} 3909 3910// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per 3911// infoType, per content item or long running DlpJob. 3912type GooglePrivacyDlpV2InfoTypeLimit struct { 3913 // InfoType: Type of information the findings limit applies to. Only one 3914 // limit per info_type should be provided. If InfoTypeLimit does not 3915 // have an info_type, the DLP API applies the limit against all 3916 // info_types that are found but not specified in another InfoTypeLimit. 3917 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3918 3919 // MaxFindings: Max findings limit for the given infoType. 3920 MaxFindings int64 `json:"maxFindings,omitempty"` 3921 3922 // ForceSendFields is a list of field names (e.g. "InfoType") to 3923 // unconditionally include in API requests. By default, fields with 3924 // empty values are omitted from API requests. However, any non-pointer, 3925 // non-interface field appearing in ForceSendFields will be sent to the 3926 // server regardless of whether the field is empty or not. This may be 3927 // used to include empty fields in Patch requests. 3928 ForceSendFields []string `json:"-"` 3929 3930 // NullFields is a list of field names (e.g. "InfoType") to include in 3931 // API requests with the JSON null value. By default, fields with empty 3932 // values are omitted from API requests. However, any field with an 3933 // empty value appearing in NullFields will be sent to the server as 3934 // null. It is an error if a field in this list has a non-empty value. 3935 // This may be used to include null fields in Patch requests. 3936 NullFields []string `json:"-"` 3937} 3938 3939func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { 3940 type NoMethod GooglePrivacyDlpV2InfoTypeLimit 3941 raw := NoMethod(*s) 3942 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3943} 3944 3945// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific 3946// InfoType. 3947type GooglePrivacyDlpV2InfoTypeStats struct { 3948 // Count: Number of findings for this infoType. 3949 Count int64 `json:"count,omitempty,string"` 3950 3951 // InfoType: The type of finding this stat is for. 3952 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 3953 3954 // ForceSendFields is a list of field names (e.g. "Count") to 3955 // unconditionally include in API requests. By default, fields with 3956 // empty values are omitted from API requests. However, any non-pointer, 3957 // non-interface field appearing in ForceSendFields will be sent to the 3958 // server regardless of whether the field is empty or not. This may be 3959 // used to include empty fields in Patch requests. 3960 ForceSendFields []string `json:"-"` 3961 3962 // NullFields is a list of field names (e.g. "Count") to include in API 3963 // requests with the JSON null value. By default, fields with empty 3964 // values are omitted from API requests. However, any field with an 3965 // empty value appearing in NullFields will be sent to the server as 3966 // null. It is an error if a field in this list has a non-empty value. 3967 // This may be used to include null fields in Patch requests. 3968 NullFields []string `json:"-"` 3969} 3970 3971func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { 3972 type NoMethod GooglePrivacyDlpV2InfoTypeStats 3973 raw := NoMethod(*s) 3974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3975} 3976 3977// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply 3978// to text that is identified as a specific info_type. 3979type GooglePrivacyDlpV2InfoTypeTransformation struct { 3980 // InfoTypes: InfoTypes to apply the transformation to. An empty list 3981 // will cause this transformation to apply to all findings that 3982 // correspond to infoTypes that were requested in `InspectConfig`. 3983 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 3984 3985 // PrimitiveTransformation: Required. Primitive transformation to apply 3986 // to the infoType. 3987 PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` 3988 3989 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 3990 // unconditionally include in API requests. By default, fields with 3991 // empty values are omitted from API requests. However, any non-pointer, 3992 // non-interface field appearing in ForceSendFields will be sent to the 3993 // server regardless of whether the field is empty or not. This may be 3994 // used to include empty fields in Patch requests. 3995 ForceSendFields []string `json:"-"` 3996 3997 // NullFields is a list of field names (e.g. "InfoTypes") to include in 3998 // API requests with the JSON null value. By default, fields with empty 3999 // values are omitted from API requests. However, any field with an 4000 // empty value appearing in NullFields will be sent to the server as 4001 // null. It is an error if a field in this list has a non-empty value. 4002 // This may be used to include null fields in Patch requests. 4003 NullFields []string `json:"-"` 4004} 4005 4006func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { 4007 type NoMethod GooglePrivacyDlpV2InfoTypeTransformation 4008 raw := NoMethod(*s) 4009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4010} 4011 4012// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation 4013// that will scan unstructured text and apply various 4014// `PrimitiveTransformation`s to each finding, where the transformation 4015// is applied to only values that were identified as a specific 4016// info_type. 4017type GooglePrivacyDlpV2InfoTypeTransformations struct { 4018 // Transformations: Required. Transformation for each infoType. Cannot 4019 // specify more than one for a given infoType. 4020 Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` 4021 4022 // ForceSendFields is a list of field names (e.g. "Transformations") to 4023 // unconditionally include in API requests. By default, fields with 4024 // empty values are omitted from API requests. However, any non-pointer, 4025 // non-interface field appearing in ForceSendFields will be sent to the 4026 // server regardless of whether the field is empty or not. This may be 4027 // used to include empty fields in Patch requests. 4028 ForceSendFields []string `json:"-"` 4029 4030 // NullFields is a list of field names (e.g. "Transformations") to 4031 // include in API requests with the JSON null value. By default, fields 4032 // with empty values are omitted from API requests. However, any field 4033 // with an empty value appearing in NullFields will be sent to the 4034 // server as null. It is an error if a field in this list has a 4035 // non-empty value. This may be used to include null fields in Patch 4036 // requests. 4037 NullFields []string `json:"-"` 4038} 4039 4040func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { 4041 type NoMethod GooglePrivacyDlpV2InfoTypeTransformations 4042 raw := NoMethod(*s) 4043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4044} 4045 4046// GooglePrivacyDlpV2InspectConfig: Configuration description of the 4047// scanning process. When used with redactContent only info_types and 4048// min_likelihood are currently used. 4049type GooglePrivacyDlpV2InspectConfig struct { 4050 // ContentOptions: List of options defining data content to scan. If 4051 // empty, text, images, and other content will be included. 4052 // 4053 // Possible values: 4054 // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data 4055 // stream. 4056 // "CONTENT_TEXT" - Text content within the data, excluding any 4057 // metadata. 4058 // "CONTENT_IMAGE" - Images found in the data. 4059 ContentOptions []string `json:"contentOptions,omitempty"` 4060 4061 // CustomInfoTypes: CustomInfoTypes provided by the user. See 4062 // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn 4063 // more. 4064 CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` 4065 4066 // ExcludeInfoTypes: When true, excludes type information of the 4067 // findings. 4068 ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` 4069 4070 // IncludeQuote: When true, a contextual quote from the data that 4071 // triggered a finding is included in the response; see Finding.quote. 4072 IncludeQuote bool `json:"includeQuote,omitempty"` 4073 4074 // InfoTypes: Restricts what info_types to look for. The values must 4075 // correspond to InfoType values returned by ListInfoTypes or listed at 4076 // https://cloud.google.com/dlp/docs/infotypes-reference. When no 4077 // InfoTypes or CustomInfoTypes are specified in a request, the system 4078 // may automatically choose what detectors to run. By default this may 4079 // be all types, but may change over time as detectors are updated. If 4080 // you need precise control and predictability as to what detectors are 4081 // run you should specify specific InfoTypes listed in the reference, 4082 // otherwise a default list will be used, which may change over time. 4083 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4084 4085 // Limits: Configuration to control the number of findings returned. 4086 Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` 4087 4088 // MinLikelihood: Only returns findings equal or above this threshold. 4089 // The default is POSSIBLE. See 4090 // https://cloud.google.com/dlp/docs/likelihood to learn more. 4091 // 4092 // Possible values: 4093 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 4094 // "VERY_UNLIKELY" - Few matching elements. 4095 // "UNLIKELY" 4096 // "POSSIBLE" - Some matching elements. 4097 // "LIKELY" 4098 // "VERY_LIKELY" - Many matching elements. 4099 MinLikelihood string `json:"minLikelihood,omitempty"` 4100 4101 // RuleSet: Set of rules to apply to the findings for this 4102 // InspectConfig. Exclusion rules, contained in the set are executed in 4103 // the end, other rules are executed in the order they are specified for 4104 // each info type. 4105 RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` 4106 4107 // ForceSendFields is a list of field names (e.g. "ContentOptions") to 4108 // unconditionally include in API requests. By default, fields with 4109 // empty values are omitted from API requests. However, any non-pointer, 4110 // non-interface field appearing in ForceSendFields will be sent to the 4111 // server regardless of whether the field is empty or not. This may be 4112 // used to include empty fields in Patch requests. 4113 ForceSendFields []string `json:"-"` 4114 4115 // NullFields is a list of field names (e.g. "ContentOptions") to 4116 // include in API requests with the JSON null value. By default, fields 4117 // with empty values are omitted from API requests. However, any field 4118 // with an empty value appearing in NullFields will be sent to the 4119 // server as null. It is an error if a field in this list has a 4120 // non-empty value. This may be used to include null fields in Patch 4121 // requests. 4122 NullFields []string `json:"-"` 4123} 4124 4125func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { 4126 type NoMethod GooglePrivacyDlpV2InspectConfig 4127 raw := NoMethod(*s) 4128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4129} 4130 4131// GooglePrivacyDlpV2InspectContentRequest: Request to search for 4132// potentially sensitive info in a ContentItem. 4133type GooglePrivacyDlpV2InspectContentRequest struct { 4134 // InspectConfig: Configuration for the inspector. What specified here 4135 // will override the template referenced by the inspect_template_name 4136 // argument. 4137 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4138 4139 // InspectTemplateName: Template to use. Any configuration directly 4140 // specified in inspect_config will override those set in the template. 4141 // Singular fields that are set in this request will replace their 4142 // corresponding fields in the template. Repeated fields are appended. 4143 // Singular sub-messages and groups are recursively merged. 4144 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4145 4146 // Item: The item to inspect. 4147 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 4148 4149 // LocationId: Deprecated. This field has no effect. 4150 LocationId string `json:"locationId,omitempty"` 4151 4152 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 4153 // unconditionally include in API requests. By default, fields with 4154 // empty values are omitted from API requests. However, any non-pointer, 4155 // non-interface field appearing in ForceSendFields will be sent to the 4156 // server regardless of whether the field is empty or not. This may be 4157 // used to include empty fields in Patch requests. 4158 ForceSendFields []string `json:"-"` 4159 4160 // NullFields is a list of field names (e.g. "InspectConfig") to include 4161 // in API requests with the JSON null value. By default, fields with 4162 // empty values are omitted from API requests. However, any field with 4163 // an empty value appearing in NullFields will be sent to the server as 4164 // null. It is an error if a field in this list has a non-empty value. 4165 // This may be used to include null fields in Patch requests. 4166 NullFields []string `json:"-"` 4167} 4168 4169func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { 4170 type NoMethod GooglePrivacyDlpV2InspectContentRequest 4171 raw := NoMethod(*s) 4172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4173} 4174 4175// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an 4176// item. 4177type GooglePrivacyDlpV2InspectContentResponse struct { 4178 // Result: The findings. 4179 Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` 4180 4181 // ServerResponse contains the HTTP response code and headers from the 4182 // server. 4183 googleapi.ServerResponse `json:"-"` 4184 4185 // ForceSendFields is a list of field names (e.g. "Result") to 4186 // unconditionally include in API requests. By default, fields with 4187 // empty values are omitted from API requests. However, any non-pointer, 4188 // non-interface field appearing in ForceSendFields will be sent to the 4189 // server regardless of whether the field is empty or not. This may be 4190 // used to include empty fields in Patch requests. 4191 ForceSendFields []string `json:"-"` 4192 4193 // NullFields is a list of field names (e.g. "Result") to include in API 4194 // requests with the JSON null value. By default, fields with empty 4195 // values are omitted from API requests. However, any field with an 4196 // empty value appearing in NullFields will be sent to the server as 4197 // null. It is an error if a field in this list has a non-empty value. 4198 // This may be used to include null fields in Patch requests. 4199 NullFields []string `json:"-"` 4200} 4201 4202func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { 4203 type NoMethod GooglePrivacyDlpV2InspectContentResponse 4204 raw := NoMethod(*s) 4205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4206} 4207 4208// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect 4209// DataSource job. 4210type GooglePrivacyDlpV2InspectDataSourceDetails struct { 4211 // RequestedOptions: The configuration used for this job. 4212 RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` 4213 4214 // Result: A summary of the outcome of this inspect job. 4215 Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` 4216 4217 // ForceSendFields is a list of field names (e.g. "RequestedOptions") to 4218 // unconditionally include in API requests. By default, fields with 4219 // empty values are omitted from API requests. However, any non-pointer, 4220 // non-interface field appearing in ForceSendFields will be sent to the 4221 // server regardless of whether the field is empty or not. This may be 4222 // used to include empty fields in Patch requests. 4223 ForceSendFields []string `json:"-"` 4224 4225 // NullFields is a list of field names (e.g. "RequestedOptions") to 4226 // include in API requests with the JSON null value. By default, fields 4227 // with empty values are omitted from API requests. However, any field 4228 // with an empty value appearing in NullFields will be sent to the 4229 // server as null. It is an error if a field in this list has a 4230 // non-empty value. This may be used to include null fields in Patch 4231 // requests. 4232 NullFields []string `json:"-"` 4233} 4234 4235func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { 4236 type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails 4237 raw := NoMethod(*s) 4238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4239} 4240 4241// GooglePrivacyDlpV2InspectJobConfig: Controls what and how to inspect 4242// for findings. 4243type GooglePrivacyDlpV2InspectJobConfig struct { 4244 // Actions: Actions to execute at the completion of the job. 4245 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 4246 4247 // InspectConfig: How and what to scan for. 4248 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4249 4250 // InspectTemplateName: If provided, will be used as the default for all 4251 // values in InspectConfig. `inspect_config` will be merged into the 4252 // values persisted as part of the template. 4253 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 4254 4255 // StorageConfig: The data to scan. 4256 StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` 4257 4258 // ForceSendFields is a list of field names (e.g. "Actions") to 4259 // unconditionally include in API requests. By default, fields with 4260 // empty values are omitted from API requests. However, any non-pointer, 4261 // non-interface field appearing in ForceSendFields will be sent to the 4262 // server regardless of whether the field is empty or not. This may be 4263 // used to include empty fields in Patch requests. 4264 ForceSendFields []string `json:"-"` 4265 4266 // NullFields is a list of field names (e.g. "Actions") to include in 4267 // API requests with the JSON null value. By default, fields with empty 4268 // values are omitted from API requests. However, any field with an 4269 // empty value appearing in NullFields will be sent to the server as 4270 // null. It is an error if a field in this list has a non-empty value. 4271 // This may be used to include null fields in Patch requests. 4272 NullFields []string `json:"-"` 4273} 4274 4275func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { 4276 type NoMethod GooglePrivacyDlpV2InspectJobConfig 4277 raw := NoMethod(*s) 4278 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4279} 4280 4281// GooglePrivacyDlpV2InspectResult: All the findings for a single 4282// scanned item. 4283type GooglePrivacyDlpV2InspectResult struct { 4284 // Findings: List of findings for an item. 4285 Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` 4286 4287 // FindingsTruncated: If true, then this item might have more findings 4288 // than were returned, and the findings returned are an arbitrary subset 4289 // of all findings. The findings list might be truncated because the 4290 // input items were too large, or because the server reached the maximum 4291 // amount of resources allowed for a single API call. For best results, 4292 // divide the input into smaller batches. 4293 FindingsTruncated bool `json:"findingsTruncated,omitempty"` 4294 4295 // ForceSendFields is a list of field names (e.g. "Findings") to 4296 // unconditionally include in API requests. By default, fields with 4297 // empty values are omitted from API requests. However, any non-pointer, 4298 // non-interface field appearing in ForceSendFields will be sent to the 4299 // server regardless of whether the field is empty or not. This may be 4300 // used to include empty fields in Patch requests. 4301 ForceSendFields []string `json:"-"` 4302 4303 // NullFields is a list of field names (e.g. "Findings") to include in 4304 // API requests with the JSON null value. By default, fields with empty 4305 // values are omitted from API requests. However, any field with an 4306 // empty value appearing in NullFields will be sent to the server as 4307 // null. It is an error if a field in this list has a non-empty value. 4308 // This may be used to include null fields in Patch requests. 4309 NullFields []string `json:"-"` 4310} 4311 4312func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { 4313 type NoMethod GooglePrivacyDlpV2InspectResult 4314 raw := NoMethod(*s) 4315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4316} 4317 4318// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a 4319// configuration (set of types of sensitive data to be detected) to be 4320// used anywhere you otherwise would normally specify InspectConfig. See 4321// https://cloud.google.com/dlp/docs/concepts-templates to learn more. 4322type GooglePrivacyDlpV2InspectTemplate struct { 4323 // CreateTime: Output only. The creation timestamp of an 4324 // inspectTemplate. 4325 CreateTime string `json:"createTime,omitempty"` 4326 4327 // Description: Short description (max 256 chars). 4328 Description string `json:"description,omitempty"` 4329 4330 // DisplayName: Display name (max 256 chars). 4331 DisplayName string `json:"displayName,omitempty"` 4332 4333 // InspectConfig: The core content of the template. Configuration of the 4334 // scanning process. 4335 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 4336 4337 // Name: Output only. The template name. The template will have one of 4338 // the following formats: 4339 // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR 4340 // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; 4341 Name string `json:"name,omitempty"` 4342 4343 // UpdateTime: Output only. The last update timestamp of an 4344 // inspectTemplate. 4345 UpdateTime string `json:"updateTime,omitempty"` 4346 4347 // ServerResponse contains the HTTP response code and headers from the 4348 // server. 4349 googleapi.ServerResponse `json:"-"` 4350 4351 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4352 // unconditionally include in API requests. By default, fields with 4353 // empty values are omitted from API requests. However, any non-pointer, 4354 // non-interface field appearing in ForceSendFields will be sent to the 4355 // server regardless of whether the field is empty or not. This may be 4356 // used to include empty fields in Patch requests. 4357 ForceSendFields []string `json:"-"` 4358 4359 // NullFields is a list of field names (e.g. "CreateTime") to include in 4360 // API requests with the JSON null value. By default, fields with empty 4361 // values are omitted from API requests. However, any field with an 4362 // empty value appearing in NullFields will be sent to the server as 4363 // null. It is an error if a field in this list has a non-empty value. 4364 // This may be used to include null fields in Patch requests. 4365 NullFields []string `json:"-"` 4366} 4367 4368func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { 4369 type NoMethod GooglePrivacyDlpV2InspectTemplate 4370 raw := NoMethod(*s) 4371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4372} 4373 4374// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be 4375// applied to infoTypes, specified in `InspectionRuleSet`. 4376type GooglePrivacyDlpV2InspectionRule struct { 4377 // ExclusionRule: Exclusion rule. 4378 ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` 4379 4380 // HotwordRule: Hotword-based detection rule. 4381 HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` 4382 4383 // ForceSendFields is a list of field names (e.g. "ExclusionRule") to 4384 // unconditionally include in API requests. By default, fields with 4385 // empty values are omitted from API requests. However, any non-pointer, 4386 // non-interface field appearing in ForceSendFields will be sent to the 4387 // server regardless of whether the field is empty or not. This may be 4388 // used to include empty fields in Patch requests. 4389 ForceSendFields []string `json:"-"` 4390 4391 // NullFields is a list of field names (e.g. "ExclusionRule") to include 4392 // in API requests with the JSON null value. By default, fields with 4393 // empty values are omitted from API requests. However, any field with 4394 // an empty value appearing in NullFields will be sent to the server as 4395 // null. It is an error if a field in this list has a non-empty value. 4396 // This may be used to include null fields in Patch requests. 4397 NullFields []string `json:"-"` 4398} 4399 4400func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { 4401 type NoMethod GooglePrivacyDlpV2InspectionRule 4402 raw := NoMethod(*s) 4403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4404} 4405 4406// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of 4407// infoTypes to alter behavior under certain circumstances, depending on 4408// the specific details of the rules within the set. 4409type GooglePrivacyDlpV2InspectionRuleSet struct { 4410 // InfoTypes: List of infoTypes this rule set is applied to. 4411 InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` 4412 4413 // Rules: Set of rules to be applied to infoTypes. The rules are applied 4414 // in order. 4415 Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` 4416 4417 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 4418 // unconditionally include in API requests. By default, fields with 4419 // empty values are omitted from API requests. However, any non-pointer, 4420 // non-interface field appearing in ForceSendFields will be sent to the 4421 // server regardless of whether the field is empty or not. This may be 4422 // used to include empty fields in Patch requests. 4423 ForceSendFields []string `json:"-"` 4424 4425 // NullFields is a list of field names (e.g. "InfoTypes") to include in 4426 // API requests with the JSON null value. By default, fields with empty 4427 // values are omitted from API requests. However, any field with an 4428 // empty value appearing in NullFields will be sent to the server as 4429 // null. It is an error if a field in this list has a non-empty value. 4430 // This may be used to include null fields in Patch requests. 4431 NullFields []string `json:"-"` 4432} 4433 4434func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { 4435 type NoMethod GooglePrivacyDlpV2InspectionRuleSet 4436 raw := NoMethod(*s) 4437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4438} 4439 4440// GooglePrivacyDlpV2JobNotificationEmails: Enable email notification to 4441// project owners and editors on jobs's completion/failure. 4442type GooglePrivacyDlpV2JobNotificationEmails struct { 4443} 4444 4445// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp 4446// api calls on a repeating basis. See 4447// https://cloud.google.com/dlp/docs/concepts-job-triggers to learn 4448// more. 4449type GooglePrivacyDlpV2JobTrigger struct { 4450 // CreateTime: Output only. The creation timestamp of a triggeredJob. 4451 CreateTime string `json:"createTime,omitempty"` 4452 4453 // Description: User provided description (max 256 chars) 4454 Description string `json:"description,omitempty"` 4455 4456 // DisplayName: Display name (max 100 chars) 4457 DisplayName string `json:"displayName,omitempty"` 4458 4459 // Errors: Output only. A stream of errors encountered when the trigger 4460 // was activated. Repeated errors may result in the JobTrigger 4461 // automatically being paused. Will return the last 100 errors. Whenever 4462 // the JobTrigger is modified this list will be cleared. 4463 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 4464 4465 // InspectJob: For inspect jobs, a snapshot of the configuration. 4466 InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` 4467 4468 // LastRunTime: Output only. The timestamp of the last time this trigger 4469 // executed. 4470 LastRunTime string `json:"lastRunTime,omitempty"` 4471 4472 // Name: Unique resource name for the triggeredJob, assigned by the 4473 // service when the triggeredJob is created, for example 4474 // `projects/dlp-test-project/jobTriggers/53234423`. 4475 Name string `json:"name,omitempty"` 4476 4477 // Status: Required. A status for this trigger. 4478 // 4479 // Possible values: 4480 // "STATUS_UNSPECIFIED" - Unused. 4481 // "HEALTHY" - Trigger is healthy. 4482 // "PAUSED" - Trigger is temporarily paused. 4483 // "CANCELLED" - Trigger is cancelled and can not be resumed. 4484 Status string `json:"status,omitempty"` 4485 4486 // Triggers: A list of triggers which will be OR'ed together. Only one 4487 // in the list needs to trigger for a job to be started. The list may 4488 // contain only a single Schedule trigger and must have at least one 4489 // object. 4490 Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` 4491 4492 // UpdateTime: Output only. The last update timestamp of a triggeredJob. 4493 UpdateTime string `json:"updateTime,omitempty"` 4494 4495 // ServerResponse contains the HTTP response code and headers from the 4496 // server. 4497 googleapi.ServerResponse `json:"-"` 4498 4499 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4500 // unconditionally include in API requests. By default, fields with 4501 // empty values are omitted from API requests. However, any non-pointer, 4502 // non-interface field appearing in ForceSendFields will be sent to the 4503 // server regardless of whether the field is empty or not. This may be 4504 // used to include empty fields in Patch requests. 4505 ForceSendFields []string `json:"-"` 4506 4507 // NullFields is a list of field names (e.g. "CreateTime") to include in 4508 // API requests with the JSON null value. By default, fields with empty 4509 // values are omitted from API requests. However, any field with an 4510 // empty value appearing in NullFields will be sent to the server as 4511 // null. It is an error if a field in this list has a non-empty value. 4512 // This may be used to include null fields in Patch requests. 4513 NullFields []string `json:"-"` 4514} 4515 4516func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { 4517 type NoMethod GooglePrivacyDlpV2JobTrigger 4518 raw := NoMethod(*s) 4519 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4520} 4521 4522// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for 4523// analysis of reidentification risk. 4524type GooglePrivacyDlpV2KAnonymityConfig struct { 4525 // EntityId: Message indicating that multiple rows might be associated 4526 // to a single individual. If the same entity_id is associated to 4527 // multiple quasi-identifier tuples over distinct rows, we consider the 4528 // entire collection of tuples as the composite quasi-identifier. This 4529 // collection is a multiset: the order in which the different tuples 4530 // appear in the dataset is ignored, but their frequency is taken into 4531 // account. Important note: a maximum of 1000 rows can be associated to 4532 // a single entity ID. If more rows are associated with the same entity 4533 // ID, some might be ignored. 4534 EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` 4535 4536 // QuasiIds: Set of fields to compute k-anonymity over. When multiple 4537 // fields are specified, they are considered a single composite key. 4538 // Structs and repeated data types are not supported; however, nested 4539 // fields are supported so long as they are not structs themselves or 4540 // nested within a repeated field. 4541 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4542 4543 // ForceSendFields is a list of field names (e.g. "EntityId") to 4544 // unconditionally include in API requests. By default, fields with 4545 // empty values are omitted from API requests. However, any non-pointer, 4546 // non-interface field appearing in ForceSendFields will be sent to the 4547 // server regardless of whether the field is empty or not. This may be 4548 // used to include empty fields in Patch requests. 4549 ForceSendFields []string `json:"-"` 4550 4551 // NullFields is a list of field names (e.g. "EntityId") to include in 4552 // API requests with the JSON null value. By default, fields with empty 4553 // values are omitted from API requests. However, any field with an 4554 // empty value appearing in NullFields will be sent to the server as 4555 // null. It is an error if a field in this list has a non-empty value. 4556 // This may be used to include null fields in Patch requests. 4557 NullFields []string `json:"-"` 4558} 4559 4560func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { 4561 type NoMethod GooglePrivacyDlpV2KAnonymityConfig 4562 raw := NoMethod(*s) 4563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4564} 4565 4566// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' 4567// values that share the same ldiversity value 4568type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { 4569 // EquivalenceClassSize: Size of the equivalence class, for example 4570 // number of rows with the above set of values. 4571 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4572 4573 // QuasiIdsValues: Set of values defining the equivalence class. One 4574 // value per quasi-identifier column in the original KAnonymity metric 4575 // message. The order is always the same as the original request. 4576 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4577 4578 // ForceSendFields is a list of field names (e.g. 4579 // "EquivalenceClassSize") to unconditionally include in API requests. 4580 // By default, fields with empty values are omitted from API requests. 4581 // However, any non-pointer, non-interface field appearing in 4582 // ForceSendFields will be sent to the server regardless of whether the 4583 // field is empty or not. This may be used to include empty fields in 4584 // Patch requests. 4585 ForceSendFields []string `json:"-"` 4586 4587 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 4588 // include in API requests with the JSON null value. By default, fields 4589 // with empty values are omitted from API requests. However, any field 4590 // with an empty value appearing in NullFields will be sent to the 4591 // server as null. It is an error if a field in this list has a 4592 // non-empty value. This may be used to include null fields in Patch 4593 // requests. 4594 NullFields []string `json:"-"` 4595} 4596 4597func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { 4598 type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass 4599 raw := NoMethod(*s) 4600 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4601} 4602 4603// GooglePrivacyDlpV2KAnonymityHistogramBucket: Histogram of k-anonymity 4604// equivalence classes. 4605type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { 4606 // BucketSize: Total number of equivalence classes in this bucket. 4607 BucketSize int64 `json:"bucketSize,omitempty,string"` 4608 4609 // BucketValueCount: Total number of distinct equivalence classes in 4610 // this bucket. 4611 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4612 4613 // BucketValues: Sample of equivalence classes in this bucket. The total 4614 // number of classes returned per bucket is capped at 20. 4615 BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` 4616 4617 // EquivalenceClassSizeLowerBound: Lower bound on the size of the 4618 // equivalence classes in this bucket. 4619 EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` 4620 4621 // EquivalenceClassSizeUpperBound: Upper bound on the size of the 4622 // equivalence classes in this bucket. 4623 EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` 4624 4625 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4626 // unconditionally include in API requests. By default, fields with 4627 // empty values are omitted from API requests. However, any non-pointer, 4628 // non-interface field appearing in ForceSendFields will be sent to the 4629 // server regardless of whether the field is empty or not. This may be 4630 // used to include empty fields in Patch requests. 4631 ForceSendFields []string `json:"-"` 4632 4633 // NullFields is a list of field names (e.g. "BucketSize") to include in 4634 // API requests with the JSON null value. By default, fields with empty 4635 // values are omitted from API requests. However, any field with an 4636 // empty value appearing in NullFields will be sent to the server as 4637 // null. It is an error if a field in this list has a non-empty value. 4638 // This may be used to include null fields in Patch requests. 4639 NullFields []string `json:"-"` 4640} 4641 4642func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { 4643 type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket 4644 raw := NoMethod(*s) 4645 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4646} 4647 4648// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity 4649// computation. 4650type GooglePrivacyDlpV2KAnonymityResult struct { 4651 // EquivalenceClassHistogramBuckets: Histogram of k-anonymity 4652 // equivalence classes. 4653 EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` 4654 4655 // ForceSendFields is a list of field names (e.g. 4656 // "EquivalenceClassHistogramBuckets") to unconditionally include in API 4657 // requests. By default, fields with empty values are omitted from API 4658 // requests. However, any non-pointer, non-interface field appearing in 4659 // ForceSendFields will be sent to the server regardless of whether the 4660 // field is empty or not. This may be used to include empty fields in 4661 // Patch requests. 4662 ForceSendFields []string `json:"-"` 4663 4664 // NullFields is a list of field names (e.g. 4665 // "EquivalenceClassHistogramBuckets") to include in API requests with 4666 // the JSON null value. By default, fields with empty values are omitted 4667 // from API requests. However, any field with an empty value appearing 4668 // in NullFields will be sent to the server as null. It is an error if a 4669 // field in this list has a non-empty value. This may be used to include 4670 // null fields in Patch requests. 4671 NullFields []string `json:"-"` 4672} 4673 4674func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { 4675 type NoMethod GooglePrivacyDlpV2KAnonymityResult 4676 raw := NoMethod(*s) 4677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4678} 4679 4680// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. 4681// This corresponds to a risk model similar to what is called 4682// "journalist risk" in the literature, except the attack dataset is 4683// statistically modeled instead of being perfectly known. This can be 4684// done using publicly available data (like the US Census), or using a 4685// custom statistical model (indicated as one or several BigQuery 4686// tables), or by extrapolating from the distribution of values in the 4687// input dataset. 4688type GooglePrivacyDlpV2KMapEstimationConfig struct { 4689 // AuxiliaryTables: Several auxiliary tables can be used in the 4690 // analysis. Each custom_tag used to tag a quasi-identifiers column must 4691 // appear in exactly one column of one auxiliary table. 4692 AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` 4693 4694 // QuasiIds: Required. Fields considered to be quasi-identifiers. No two 4695 // columns can have the same tag. 4696 QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` 4697 4698 // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical 4699 // modeling. Set if no column is tagged with a region-specific InfoType 4700 // (like US_ZIP_5) or a region code. 4701 RegionCode string `json:"regionCode,omitempty"` 4702 4703 // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to 4704 // unconditionally include in API requests. By default, fields with 4705 // empty values are omitted from API requests. However, any non-pointer, 4706 // non-interface field appearing in ForceSendFields will be sent to the 4707 // server regardless of whether the field is empty or not. This may be 4708 // used to include empty fields in Patch requests. 4709 ForceSendFields []string `json:"-"` 4710 4711 // NullFields is a list of field names (e.g. "AuxiliaryTables") to 4712 // include in API requests with the JSON null value. By default, fields 4713 // with empty values are omitted from API requests. However, any field 4714 // with an empty value appearing in NullFields will be sent to the 4715 // server as null. It is an error if a field in this list has a 4716 // non-empty value. This may be used to include null fields in Patch 4717 // requests. 4718 NullFields []string `json:"-"` 4719} 4720 4721func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { 4722 type NoMethod GooglePrivacyDlpV2KMapEstimationConfig 4723 raw := NoMethod(*s) 4724 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4725} 4726 4727// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A 4728// KMapEstimationHistogramBucket message with the following values: 4729// min_anonymity: 3 max_anonymity: 5 frequency: 42 means that there are 4730// 42 records whose quasi-identifier values correspond to 3, 4 or 5 4731// people in the overlying population. An important particular case is 4732// when min_anonymity = max_anonymity = 1: the frequency field then 4733// corresponds to the number of uniquely identifiable records. 4734type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { 4735 // BucketSize: Number of records within these anonymity bounds. 4736 BucketSize int64 `json:"bucketSize,omitempty,string"` 4737 4738 // BucketValueCount: Total number of distinct quasi-identifier tuple 4739 // values in this bucket. 4740 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 4741 4742 // BucketValues: Sample of quasi-identifier tuple values in this bucket. 4743 // The total number of classes returned per bucket is capped at 20. 4744 BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` 4745 4746 // MaxAnonymity: Always greater than or equal to min_anonymity. 4747 MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` 4748 4749 // MinAnonymity: Always positive. 4750 MinAnonymity int64 `json:"minAnonymity,omitempty,string"` 4751 4752 // ForceSendFields is a list of field names (e.g. "BucketSize") to 4753 // unconditionally include in API requests. By default, fields with 4754 // empty values are omitted from API requests. However, any non-pointer, 4755 // non-interface field appearing in ForceSendFields will be sent to the 4756 // server regardless of whether the field is empty or not. This may be 4757 // used to include empty fields in Patch requests. 4758 ForceSendFields []string `json:"-"` 4759 4760 // NullFields is a list of field names (e.g. "BucketSize") to include in 4761 // API requests with the JSON null value. By default, fields with empty 4762 // values are omitted from API requests. However, any field with an 4763 // empty value appearing in NullFields will be sent to the server as 4764 // null. It is an error if a field in this list has a non-empty value. 4765 // This may be used to include null fields in Patch requests. 4766 NullFields []string `json:"-"` 4767} 4768 4769func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { 4770 type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket 4771 raw := NoMethod(*s) 4772 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4773} 4774 4775// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for 4776// the quasi-identifier columns. 4777type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { 4778 // EstimatedAnonymity: The estimated anonymity for these 4779 // quasi-identifier values. 4780 EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` 4781 4782 // QuasiIdsValues: The quasi-identifier values. 4783 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 4784 4785 // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") 4786 // to unconditionally include in API requests. By default, fields with 4787 // empty values are omitted from API requests. However, any non-pointer, 4788 // non-interface field appearing in ForceSendFields will be sent to the 4789 // server regardless of whether the field is empty or not. This may be 4790 // used to include empty fields in Patch requests. 4791 ForceSendFields []string `json:"-"` 4792 4793 // NullFields is a list of field names (e.g. "EstimatedAnonymity") to 4794 // include in API requests with the JSON null value. By default, fields 4795 // with empty values are omitted from API requests. However, any field 4796 // with an empty value appearing in NullFields will be sent to the 4797 // server as null. It is an error if a field in this list has a 4798 // non-empty value. This may be used to include null fields in Patch 4799 // requests. 4800 NullFields []string `json:"-"` 4801} 4802 4803func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { 4804 type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues 4805 raw := NoMethod(*s) 4806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4807} 4808 4809// GooglePrivacyDlpV2KMapEstimationResult: Result of the 4810// reidentifiability analysis. Note that these results are an 4811// estimation, not exact values. 4812type GooglePrivacyDlpV2KMapEstimationResult struct { 4813 // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] 4814 // do not overlap. If a value doesn't correspond to any such interval, 4815 // the associated frequency is zero. For example, the following records: 4816 // {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: 4817 // 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: 4818 // 10, frequency: 99} mean that there are no record with an estimated 4819 // anonymity of 4, 5, or larger than 10. 4820 KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` 4821 4822 // ForceSendFields is a list of field names (e.g. 4823 // "KMapEstimationHistogram") to unconditionally include in API 4824 // requests. By default, fields with empty values are omitted from API 4825 // requests. However, any non-pointer, non-interface field appearing in 4826 // ForceSendFields will be sent to the server regardless of whether the 4827 // field is empty or not. This may be used to include empty fields in 4828 // Patch requests. 4829 ForceSendFields []string `json:"-"` 4830 4831 // NullFields is a list of field names (e.g. "KMapEstimationHistogram") 4832 // to include in API requests with the JSON null value. By default, 4833 // fields with empty values are omitted from API requests. However, any 4834 // field with an empty value appearing in NullFields will be sent to the 4835 // server as null. It is an error if a field in this list has a 4836 // non-empty value. This may be used to include null fields in Patch 4837 // requests. 4838 NullFields []string `json:"-"` 4839} 4840 4841func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { 4842 type NoMethod GooglePrivacyDlpV2KMapEstimationResult 4843 raw := NoMethod(*s) 4844 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4845} 4846 4847// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. If 4848// a key's partition ID or any of its path kinds or names are 4849// reserved/read-only, the key is reserved/read-only. A 4850// reserved/read-only key is forbidden in certain documented contexts. 4851type GooglePrivacyDlpV2Key struct { 4852 // PartitionId: Entities are partitioned into subsets, currently 4853 // identified by a project ID and namespace ID. Queries are scoped to a 4854 // single partition. 4855 PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` 4856 4857 // Path: The entity path. An entity path consists of one or more 4858 // elements composed of a kind and a string or numerical identifier, 4859 // which identify entities. The first element identifies a _root 4860 // entity_, the second element identifies a _child_ of the root entity, 4861 // the third element identifies a child of the second entity, and so 4862 // forth. The entities identified by all prefixes of the path are called 4863 // the element's _ancestors_. A path can never be empty, and a path can 4864 // have at most 100 elements. 4865 Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` 4866 4867 // ForceSendFields is a list of field names (e.g. "PartitionId") to 4868 // unconditionally include in API requests. By default, fields with 4869 // empty values are omitted from API requests. However, any non-pointer, 4870 // non-interface field appearing in ForceSendFields will be sent to the 4871 // server regardless of whether the field is empty or not. This may be 4872 // used to include empty fields in Patch requests. 4873 ForceSendFields []string `json:"-"` 4874 4875 // NullFields is a list of field names (e.g. "PartitionId") to include 4876 // in API requests with the JSON null value. By default, fields with 4877 // empty values are omitted from API requests. However, any field with 4878 // an empty value appearing in NullFields will be sent to the server as 4879 // null. It is an error if a field in this list has a non-empty value. 4880 // This may be used to include null fields in Patch requests. 4881 NullFields []string `json:"-"` 4882} 4883 4884func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { 4885 type NoMethod GooglePrivacyDlpV2Key 4886 raw := NoMethod(*s) 4887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4888} 4889 4890// GooglePrivacyDlpV2KindExpression: A representation of a Datastore 4891// kind. 4892type GooglePrivacyDlpV2KindExpression struct { 4893 // Name: The name of the kind. 4894 Name string `json:"name,omitempty"` 4895 4896 // ForceSendFields is a list of field names (e.g. "Name") to 4897 // unconditionally include in API requests. By default, fields with 4898 // empty values are omitted from API requests. However, any non-pointer, 4899 // non-interface field appearing in ForceSendFields will be sent to the 4900 // server regardless of whether the field is empty or not. This may be 4901 // used to include empty fields in Patch requests. 4902 ForceSendFields []string `json:"-"` 4903 4904 // NullFields is a list of field names (e.g. "Name") to include in API 4905 // requests with the JSON null value. By default, fields with empty 4906 // values are omitted from API requests. However, any field with an 4907 // empty value appearing in NullFields will be sent to the server as 4908 // null. It is an error if a field in this list has a non-empty value. 4909 // This may be used to include null fields in Patch requests. 4910 NullFields []string `json:"-"` 4911} 4912 4913func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { 4914 type NoMethod GooglePrivacyDlpV2KindExpression 4915 raw := NoMethod(*s) 4916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4917} 4918 4919// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing 4920// data crypto key wrapped by KMS. The wrapped key must be a 128/192/256 4921// bit key. Authorization requires the following IAM permissions when 4922// sending a request to perform a crypto transformation using a 4923// kms-wrapped crypto key: dlp.kms.encrypt 4924type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { 4925 // CryptoKeyName: Required. The resource name of the KMS CryptoKey to 4926 // use for unwrapping. 4927 CryptoKeyName string `json:"cryptoKeyName,omitempty"` 4928 4929 // WrappedKey: Required. The wrapped data crypto key. 4930 WrappedKey string `json:"wrappedKey,omitempty"` 4931 4932 // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to 4933 // unconditionally include in API requests. By default, fields with 4934 // empty values are omitted from API requests. However, any non-pointer, 4935 // non-interface field appearing in ForceSendFields will be sent to the 4936 // server regardless of whether the field is empty or not. This may be 4937 // used to include empty fields in Patch requests. 4938 ForceSendFields []string `json:"-"` 4939 4940 // NullFields is a list of field names (e.g. "CryptoKeyName") to include 4941 // in API requests with the JSON null value. By default, fields with 4942 // empty values are omitted from API requests. However, any field with 4943 // an empty value appearing in NullFields will be sent to the server as 4944 // null. It is an error if a field in this list has a non-empty value. 4945 // This may be used to include null fields in Patch requests. 4946 NullFields []string `json:"-"` 4947} 4948 4949func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { 4950 type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey 4951 raw := NoMethod(*s) 4952 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4953} 4954 4955// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for 4956// analysis of reidentification risk. 4957type GooglePrivacyDlpV2LDiversityConfig struct { 4958 // QuasiIds: Set of quasi-identifiers indicating how equivalence classes 4959 // are defined for the l-diversity computation. When multiple fields are 4960 // specified, they are considered a single composite key. 4961 QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` 4962 4963 // SensitiveAttribute: Sensitive field for computing the l-value. 4964 SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` 4965 4966 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 4967 // unconditionally include in API requests. By default, fields with 4968 // empty values are omitted from API requests. However, any non-pointer, 4969 // non-interface field appearing in ForceSendFields will be sent to the 4970 // server regardless of whether the field is empty or not. This may be 4971 // used to include empty fields in Patch requests. 4972 ForceSendFields []string `json:"-"` 4973 4974 // NullFields is a list of field names (e.g. "QuasiIds") to include in 4975 // API requests with the JSON null value. By default, fields with empty 4976 // values are omitted from API requests. However, any field with an 4977 // empty value appearing in NullFields will be sent to the server as 4978 // null. It is an error if a field in this list has a non-empty value. 4979 // This may be used to include null fields in Patch requests. 4980 NullFields []string `json:"-"` 4981} 4982 4983func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { 4984 type NoMethod GooglePrivacyDlpV2LDiversityConfig 4985 raw := NoMethod(*s) 4986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4987} 4988 4989// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' 4990// values that share the same ldiversity value. 4991type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { 4992 // EquivalenceClassSize: Size of the k-anonymity equivalence class. 4993 EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` 4994 4995 // NumDistinctSensitiveValues: Number of distinct sensitive values in 4996 // this equivalence class. 4997 NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` 4998 4999 // QuasiIdsValues: Quasi-identifier values defining the k-anonymity 5000 // equivalence class. The order is always the same as the original 5001 // request. 5002 QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` 5003 5004 // TopSensitiveValues: Estimated frequencies of top sensitive values. 5005 TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` 5006 5007 // ForceSendFields is a list of field names (e.g. 5008 // "EquivalenceClassSize") to unconditionally include in API requests. 5009 // By default, fields with empty values are omitted from API requests. 5010 // However, any non-pointer, non-interface field appearing in 5011 // ForceSendFields will be sent to the server regardless of whether the 5012 // field is empty or not. This may be used to include empty fields in 5013 // Patch requests. 5014 ForceSendFields []string `json:"-"` 5015 5016 // NullFields is a list of field names (e.g. "EquivalenceClassSize") to 5017 // include in API requests with the JSON null value. By default, fields 5018 // with empty values are omitted from API requests. However, any field 5019 // with an empty value appearing in NullFields will be sent to the 5020 // server as null. It is an error if a field in this list has a 5021 // non-empty value. This may be used to include null fields in Patch 5022 // requests. 5023 NullFields []string `json:"-"` 5024} 5025 5026func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { 5027 type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass 5028 raw := NoMethod(*s) 5029 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5030} 5031 5032// GooglePrivacyDlpV2LDiversityHistogramBucket: Histogram of l-diversity 5033// equivalence class sensitive value frequencies. 5034type GooglePrivacyDlpV2LDiversityHistogramBucket struct { 5035 // BucketSize: Total number of equivalence classes in this bucket. 5036 BucketSize int64 `json:"bucketSize,omitempty,string"` 5037 5038 // BucketValueCount: Total number of distinct equivalence classes in 5039 // this bucket. 5040 BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` 5041 5042 // BucketValues: Sample of equivalence classes in this bucket. The total 5043 // number of classes returned per bucket is capped at 20. 5044 BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` 5045 5046 // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value 5047 // frequencies of the equivalence classes in this bucket. 5048 SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` 5049 5050 // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value 5051 // frequencies of the equivalence classes in this bucket. 5052 SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` 5053 5054 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5055 // unconditionally include in API requests. By default, fields with 5056 // empty values are omitted from API requests. However, any non-pointer, 5057 // non-interface field appearing in ForceSendFields will be sent to the 5058 // server regardless of whether the field is empty or not. This may be 5059 // used to include empty fields in Patch requests. 5060 ForceSendFields []string `json:"-"` 5061 5062 // NullFields is a list of field names (e.g. "BucketSize") to include in 5063 // API requests with the JSON null value. By default, fields with empty 5064 // values are omitted from API requests. However, any field with an 5065 // empty value appearing in NullFields will be sent to the server as 5066 // null. It is an error if a field in this list has a non-empty value. 5067 // This may be used to include null fields in Patch requests. 5068 NullFields []string `json:"-"` 5069} 5070 5071func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { 5072 type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket 5073 raw := NoMethod(*s) 5074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5075} 5076 5077// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity 5078// computation. 5079type GooglePrivacyDlpV2LDiversityResult struct { 5080 // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity 5081 // equivalence class sensitive value frequencies. 5082 SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` 5083 5084 // ForceSendFields is a list of field names (e.g. 5085 // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include 5086 // in API requests. By default, fields with empty values are omitted 5087 // from API requests. However, any non-pointer, non-interface field 5088 // appearing in ForceSendFields will be sent to the server regardless of 5089 // whether the field is empty or not. This may be used to include empty 5090 // fields in Patch requests. 5091 ForceSendFields []string `json:"-"` 5092 5093 // NullFields is a list of field names (e.g. 5094 // "SensitiveValueFrequencyHistogramBuckets") to include in API requests 5095 // with the JSON null value. By default, fields with empty values are 5096 // omitted from API requests. However, any field with an empty value 5097 // appearing in NullFields will be sent to the server as null. It is an 5098 // error if a field in this list has a non-empty value. This may be used 5099 // to include null fields in Patch requests. 5100 NullFields []string `json:"-"` 5101} 5102 5103func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { 5104 type NoMethod GooglePrivacyDlpV2LDiversityResult 5105 raw := NoMethod(*s) 5106 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5107} 5108 5109// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a 5110// custom dictionary created from a data source of any size up to the 5111// maximum size defined in the 5112// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of 5113// dictionary creation are stored in the specified Google Cloud Storage 5114// location. Consider using `CustomInfoType.Dictionary` for smaller 5115// dictionaries that satisfy the size requirements. 5116type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { 5117 // BigQueryField: Field in a BigQuery table where each cell represents a 5118 // dictionary phrase. 5119 BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` 5120 5121 // CloudStorageFileSet: Set of files containing newline-delimited lists 5122 // of dictionary phrases. 5123 CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` 5124 5125 // OutputPath: Location to store dictionary artifacts in Google Cloud 5126 // Storage. These files will only be accessible by project owners and 5127 // the DLP API. If any of these artifacts are modified, the dictionary 5128 // is considered invalid and can no longer be used. 5129 OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` 5130 5131 // ForceSendFields is a list of field names (e.g. "BigQueryField") to 5132 // unconditionally include in API requests. By default, fields with 5133 // empty values are omitted from API requests. However, any non-pointer, 5134 // non-interface field appearing in ForceSendFields will be sent to the 5135 // server regardless of whether the field is empty or not. This may be 5136 // used to include empty fields in Patch requests. 5137 ForceSendFields []string `json:"-"` 5138 5139 // NullFields is a list of field names (e.g. "BigQueryField") to include 5140 // in API requests with the JSON null value. By default, fields with 5141 // empty values are omitted from API requests. However, any field with 5142 // an empty value appearing in NullFields will be sent to the server as 5143 // null. It is an error if a field in this list has a non-empty value. 5144 // This may be used to include null fields in Patch requests. 5145 NullFields []string `json:"-"` 5146} 5147 5148func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { 5149 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig 5150 raw := NoMethod(*s) 5151 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5152} 5153 5154// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a 5155// custom dictionary. 5156type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { 5157 // ApproxNumPhrases: Approximate number of distinct phrases in the 5158 // dictionary. 5159 ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` 5160 5161 // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to 5162 // unconditionally include in API requests. By default, fields with 5163 // empty values are omitted from API requests. However, any non-pointer, 5164 // non-interface field appearing in ForceSendFields will be sent to the 5165 // server regardless of whether the field is empty or not. This may be 5166 // used to include empty fields in Patch requests. 5167 ForceSendFields []string `json:"-"` 5168 5169 // NullFields is a list of field names (e.g. "ApproxNumPhrases") to 5170 // include in API requests with the JSON null value. By default, fields 5171 // with empty values are omitted from API requests. However, any field 5172 // with an empty value appearing in NullFields will be sent to the 5173 // server as null. It is an error if a field in this list has a 5174 // non-empty value. This may be used to include null fields in Patch 5175 // requests. 5176 NullFields []string `json:"-"` 5177} 5178 5179func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { 5180 type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats 5181 raw := NoMethod(*s) 5182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5183} 5184 5185// GooglePrivacyDlpV2LeaveUntransformed: Skips the data without 5186// modifying it if the requested transformation would cause an error. 5187// For example, if a `DateShift` transformation were applied an an IP 5188// address, this mode would leave the IP address unchanged in the 5189// response. 5190type GooglePrivacyDlpV2LeaveUntransformed struct { 5191} 5192 5193// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an 5194// adjustment to the likelihood of a finding as part of a detection 5195// rule. 5196type GooglePrivacyDlpV2LikelihoodAdjustment struct { 5197 // FixedLikelihood: Set the likelihood of a finding to a fixed value. 5198 // 5199 // Possible values: 5200 // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. 5201 // "VERY_UNLIKELY" - Few matching elements. 5202 // "UNLIKELY" 5203 // "POSSIBLE" - Some matching elements. 5204 // "LIKELY" 5205 // "VERY_LIKELY" - Many matching elements. 5206 FixedLikelihood string `json:"fixedLikelihood,omitempty"` 5207 5208 // RelativeLikelihood: Increase or decrease the likelihood by the 5209 // specified number of levels. For example, if a finding would be 5210 // `POSSIBLE` without the detection rule and `relative_likelihood` is 1, 5211 // then it is upgraded to `LIKELY`, while a value of -1 would downgrade 5212 // it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or 5213 // exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an 5214 // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in 5215 // a final likelihood of `LIKELY`. 5216 RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` 5217 5218 // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to 5219 // unconditionally include in API requests. By default, fields with 5220 // empty values are omitted from API requests. However, any non-pointer, 5221 // non-interface field appearing in ForceSendFields will be sent to the 5222 // server regardless of whether the field is empty or not. This may be 5223 // used to include empty fields in Patch requests. 5224 ForceSendFields []string `json:"-"` 5225 5226 // NullFields is a list of field names (e.g. "FixedLikelihood") to 5227 // include in API requests with the JSON null value. By default, fields 5228 // with empty values are omitted from API requests. However, any field 5229 // with an empty value appearing in NullFields will be sent to the 5230 // server as null. It is an error if a field in this list has a 5231 // non-empty value. This may be used to include null fields in Patch 5232 // requests. 5233 NullFields []string `json:"-"` 5234} 5235 5236func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { 5237 type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment 5238 raw := NoMethod(*s) 5239 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5240} 5241 5242// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message 5243// for ListDeidentifyTemplates. 5244type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { 5245 // DeidentifyTemplates: List of deidentify templates, up to page_size in 5246 // ListDeidentifyTemplatesRequest. 5247 DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` 5248 5249 // NextPageToken: If the next page is available then the next page token 5250 // to be used in following ListDeidentifyTemplates request. 5251 NextPageToken string `json:"nextPageToken,omitempty"` 5252 5253 // ServerResponse contains the HTTP response code and headers from the 5254 // server. 5255 googleapi.ServerResponse `json:"-"` 5256 5257 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") 5258 // to unconditionally include in API requests. By default, fields with 5259 // empty values are omitted from API requests. However, any non-pointer, 5260 // non-interface field appearing in ForceSendFields will be sent to the 5261 // server regardless of whether the field is empty or not. This may be 5262 // used to include empty fields in Patch requests. 5263 ForceSendFields []string `json:"-"` 5264 5265 // NullFields is a list of field names (e.g. "DeidentifyTemplates") to 5266 // include in API requests with the JSON null value. By default, fields 5267 // with empty values are omitted from API requests. However, any field 5268 // with an empty value appearing in NullFields will be sent to the 5269 // server as null. It is an error if a field in this list has a 5270 // non-empty value. This may be used to include null fields in Patch 5271 // requests. 5272 NullFields []string `json:"-"` 5273} 5274 5275func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { 5276 type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse 5277 raw := NoMethod(*s) 5278 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5279} 5280 5281// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for 5282// listing DLP jobs. 5283type GooglePrivacyDlpV2ListDlpJobsResponse struct { 5284 // Jobs: A list of DlpJobs that matches the specified filter in the 5285 // request. 5286 Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` 5287 5288 // NextPageToken: The standard List next-page token. 5289 NextPageToken string `json:"nextPageToken,omitempty"` 5290 5291 // ServerResponse contains the HTTP response code and headers from the 5292 // server. 5293 googleapi.ServerResponse `json:"-"` 5294 5295 // ForceSendFields is a list of field names (e.g. "Jobs") to 5296 // unconditionally include in API requests. By default, fields with 5297 // empty values are omitted from API requests. However, any non-pointer, 5298 // non-interface field appearing in ForceSendFields will be sent to the 5299 // server regardless of whether the field is empty or not. This may be 5300 // used to include empty fields in Patch requests. 5301 ForceSendFields []string `json:"-"` 5302 5303 // NullFields is a list of field names (e.g. "Jobs") to include in API 5304 // requests with the JSON null value. By default, fields with empty 5305 // values are omitted from API requests. However, any field with an 5306 // empty value appearing in NullFields will be sent to the server as 5307 // null. It is an error if a field in this list has a non-empty value. 5308 // This may be used to include null fields in Patch requests. 5309 NullFields []string `json:"-"` 5310} 5311 5312func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { 5313 type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse 5314 raw := NoMethod(*s) 5315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5316} 5317 5318// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the 5319// ListInfoTypes request. 5320type GooglePrivacyDlpV2ListInfoTypesResponse struct { 5321 // InfoTypes: Set of sensitive infoTypes. 5322 InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` 5323 5324 // ServerResponse contains the HTTP response code and headers from the 5325 // server. 5326 googleapi.ServerResponse `json:"-"` 5327 5328 // ForceSendFields is a list of field names (e.g. "InfoTypes") to 5329 // unconditionally include in API requests. By default, fields with 5330 // empty values are omitted from API requests. However, any non-pointer, 5331 // non-interface field appearing in ForceSendFields will be sent to the 5332 // server regardless of whether the field is empty or not. This may be 5333 // used to include empty fields in Patch requests. 5334 ForceSendFields []string `json:"-"` 5335 5336 // NullFields is a list of field names (e.g. "InfoTypes") to include in 5337 // API requests with the JSON null value. By default, fields with empty 5338 // values are omitted from API requests. However, any field with an 5339 // empty value appearing in NullFields will be sent to the server as 5340 // null. It is an error if a field in this list has a non-empty value. 5341 // This may be used to include null fields in Patch requests. 5342 NullFields []string `json:"-"` 5343} 5344 5345func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { 5346 type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse 5347 raw := NoMethod(*s) 5348 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5349} 5350 5351// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for 5352// ListInspectTemplates. 5353type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { 5354 // InspectTemplates: List of inspectTemplates, up to page_size in 5355 // ListInspectTemplatesRequest. 5356 InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` 5357 5358 // NextPageToken: If the next page is available then the next page token 5359 // to be used in following ListInspectTemplates request. 5360 NextPageToken string `json:"nextPageToken,omitempty"` 5361 5362 // ServerResponse contains the HTTP response code and headers from the 5363 // server. 5364 googleapi.ServerResponse `json:"-"` 5365 5366 // ForceSendFields is a list of field names (e.g. "InspectTemplates") to 5367 // unconditionally include in API requests. By default, fields with 5368 // empty values are omitted from API requests. However, any non-pointer, 5369 // non-interface field appearing in ForceSendFields will be sent to the 5370 // server regardless of whether the field is empty or not. This may be 5371 // used to include empty fields in Patch requests. 5372 ForceSendFields []string `json:"-"` 5373 5374 // NullFields is a list of field names (e.g. "InspectTemplates") to 5375 // include in API requests with the JSON null value. By default, fields 5376 // with empty values are omitted from API requests. However, any field 5377 // with an empty value appearing in NullFields will be sent to the 5378 // server as null. It is an error if a field in this list has a 5379 // non-empty value. This may be used to include null fields in Patch 5380 // requests. 5381 NullFields []string `json:"-"` 5382} 5383 5384func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { 5385 type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse 5386 raw := NoMethod(*s) 5387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5388} 5389 5390// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for 5391// ListJobTriggers. 5392type GooglePrivacyDlpV2ListJobTriggersResponse struct { 5393 // JobTriggers: List of triggeredJobs, up to page_size in 5394 // ListJobTriggersRequest. 5395 JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` 5396 5397 // NextPageToken: If the next page is available then the next page token 5398 // to be used in following ListJobTriggers request. 5399 NextPageToken string `json:"nextPageToken,omitempty"` 5400 5401 // ServerResponse contains the HTTP response code and headers from the 5402 // server. 5403 googleapi.ServerResponse `json:"-"` 5404 5405 // ForceSendFields is a list of field names (e.g. "JobTriggers") to 5406 // unconditionally include in API requests. By default, fields with 5407 // empty values are omitted from API requests. However, any non-pointer, 5408 // non-interface field appearing in ForceSendFields will be sent to the 5409 // server regardless of whether the field is empty or not. This may be 5410 // used to include empty fields in Patch requests. 5411 ForceSendFields []string `json:"-"` 5412 5413 // NullFields is a list of field names (e.g. "JobTriggers") to include 5414 // in API requests with the JSON null value. By default, fields with 5415 // empty values are omitted from API requests. However, any field with 5416 // an empty value appearing in NullFields will be sent to the server as 5417 // null. It is an error if a field in this list has a non-empty value. 5418 // This may be used to include null fields in Patch requests. 5419 NullFields []string `json:"-"` 5420} 5421 5422func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { 5423 type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse 5424 raw := NoMethod(*s) 5425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5426} 5427 5428// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for 5429// ListStoredInfoTypes. 5430type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { 5431 // NextPageToken: If the next page is available then the next page token 5432 // to be used in following ListStoredInfoTypes request. 5433 NextPageToken string `json:"nextPageToken,omitempty"` 5434 5435 // StoredInfoTypes: List of storedInfoTypes, up to page_size in 5436 // ListStoredInfoTypesRequest. 5437 StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` 5438 5439 // ServerResponse contains the HTTP response code and headers from the 5440 // server. 5441 googleapi.ServerResponse `json:"-"` 5442 5443 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5444 // unconditionally include in API requests. By default, fields with 5445 // empty values are omitted from API requests. However, any non-pointer, 5446 // non-interface field appearing in ForceSendFields will be sent to the 5447 // server regardless of whether the field is empty or not. This may be 5448 // used to include empty fields in Patch requests. 5449 ForceSendFields []string `json:"-"` 5450 5451 // NullFields is a list of field names (e.g. "NextPageToken") to include 5452 // in API requests with the JSON null value. By default, fields with 5453 // empty values are omitted from API requests. However, any field with 5454 // an empty value appearing in NullFields will be sent to the server as 5455 // null. It is an error if a field in this list has a non-empty value. 5456 // This may be used to include null fields in Patch requests. 5457 NullFields []string `json:"-"` 5458} 5459 5460func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { 5461 type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse 5462 raw := NoMethod(*s) 5463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5464} 5465 5466// GooglePrivacyDlpV2Location: Specifies the location of the finding. 5467type GooglePrivacyDlpV2Location struct { 5468 // ByteRange: Zero-based byte offsets delimiting the finding. These are 5469 // relative to the finding's containing element. Note that when the 5470 // content is not textual, this references the UTF-8 encoded textual 5471 // representation of the content. Omitted if content is an image. 5472 ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` 5473 5474 // CodepointRange: Unicode character offsets delimiting the finding. 5475 // These are relative to the finding's containing element. Provided when 5476 // the content is text. 5477 CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` 5478 5479 // Container: Information about the container where this finding 5480 // occurred, if available. 5481 Container *GooglePrivacyDlpV2Container `json:"container,omitempty"` 5482 5483 // ContentLocations: List of nested objects pointing to the precise 5484 // location of the finding within the file or record. 5485 ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` 5486 5487 // ForceSendFields is a list of field names (e.g. "ByteRange") to 5488 // unconditionally include in API requests. By default, fields with 5489 // empty values are omitted from API requests. However, any non-pointer, 5490 // non-interface field appearing in ForceSendFields will be sent to the 5491 // server regardless of whether the field is empty or not. This may be 5492 // used to include empty fields in Patch requests. 5493 ForceSendFields []string `json:"-"` 5494 5495 // NullFields is a list of field names (e.g. "ByteRange") to include in 5496 // API requests with the JSON null value. By default, fields with empty 5497 // values are omitted from API requests. However, any field with an 5498 // empty value appearing in NullFields will be sent to the server as 5499 // null. It is an error if a field in this list has a non-empty value. 5500 // This may be used to include null fields in Patch requests. 5501 NullFields []string `json:"-"` 5502} 5503 5504func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { 5505 type NoMethod GooglePrivacyDlpV2Location 5506 raw := NoMethod(*s) 5507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5508} 5509 5510// GooglePrivacyDlpV2Manual: Job trigger option for hybrid jobs. Jobs 5511// must be manually created and finished. 5512type GooglePrivacyDlpV2Manual struct { 5513} 5514 5515// GooglePrivacyDlpV2MetadataLocation: Metadata Location 5516type GooglePrivacyDlpV2MetadataLocation struct { 5517 // StorageLabel: Storage metadata. 5518 StorageLabel *GooglePrivacyDlpV2StorageMetadataLabel `json:"storageLabel,omitempty"` 5519 5520 // Type: Type of metadata containing the finding. 5521 // 5522 // Possible values: 5523 // "METADATATYPE_UNSPECIFIED" - Unused 5524 // "STORAGE_METADATA" - General file metadata provided by Cloud 5525 // Storage. 5526 Type string `json:"type,omitempty"` 5527 5528 // ForceSendFields is a list of field names (e.g. "StorageLabel") to 5529 // unconditionally include in API requests. By default, fields with 5530 // empty values are omitted from API requests. However, any non-pointer, 5531 // non-interface field appearing in ForceSendFields will be sent to the 5532 // server regardless of whether the field is empty or not. This may be 5533 // used to include empty fields in Patch requests. 5534 ForceSendFields []string `json:"-"` 5535 5536 // NullFields is a list of field names (e.g. "StorageLabel") to include 5537 // in API requests with the JSON null value. By default, fields with 5538 // empty values are omitted from API requests. However, any field with 5539 // an empty value appearing in NullFields will be sent to the server as 5540 // null. It is an error if a field in this list has a non-empty value. 5541 // This may be used to include null fields in Patch requests. 5542 NullFields []string `json:"-"` 5543} 5544 5545func (s *GooglePrivacyDlpV2MetadataLocation) MarshalJSON() ([]byte, error) { 5546 type NoMethod GooglePrivacyDlpV2MetadataLocation 5547 raw := NoMethod(*s) 5548 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5549} 5550 5551// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over 5552// an individual column, including min, max, and quantiles. 5553type GooglePrivacyDlpV2NumericalStatsConfig struct { 5554 // Field: Field to compute numerical stats on. Supported types are 5555 // integer, float, date, datetime, timestamp, time. 5556 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5557 5558 // ForceSendFields is a list of field names (e.g. "Field") to 5559 // unconditionally include in API requests. By default, fields with 5560 // empty values are omitted from API requests. However, any non-pointer, 5561 // non-interface field appearing in ForceSendFields will be sent to the 5562 // server regardless of whether the field is empty or not. This may be 5563 // used to include empty fields in Patch requests. 5564 ForceSendFields []string `json:"-"` 5565 5566 // NullFields is a list of field names (e.g. "Field") to include in API 5567 // requests with the JSON null value. By default, fields with empty 5568 // values are omitted from API requests. However, any field with an 5569 // empty value appearing in NullFields will be sent to the server as 5570 // null. It is an error if a field in this list has a non-empty value. 5571 // This may be used to include null fields in Patch requests. 5572 NullFields []string `json:"-"` 5573} 5574 5575func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { 5576 type NoMethod GooglePrivacyDlpV2NumericalStatsConfig 5577 raw := NoMethod(*s) 5578 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5579} 5580 5581// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats 5582// computation. 5583type GooglePrivacyDlpV2NumericalStatsResult struct { 5584 // MaxValue: Maximum value appearing in the column. 5585 MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` 5586 5587 // MinValue: Minimum value appearing in the column. 5588 MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` 5589 5590 // QuantileValues: List of 99 values that partition the set of field 5591 // values into 100 equal sized buckets. 5592 QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` 5593 5594 // ForceSendFields is a list of field names (e.g. "MaxValue") to 5595 // unconditionally include in API requests. By default, fields with 5596 // empty values are omitted from API requests. However, any non-pointer, 5597 // non-interface field appearing in ForceSendFields will be sent to the 5598 // server regardless of whether the field is empty or not. This may be 5599 // used to include empty fields in Patch requests. 5600 ForceSendFields []string `json:"-"` 5601 5602 // NullFields is a list of field names (e.g. "MaxValue") to include in 5603 // API requests with the JSON null value. By default, fields with empty 5604 // values are omitted from API requests. However, any field with an 5605 // empty value appearing in NullFields will be sent to the server as 5606 // null. It is an error if a field in this list has a non-empty value. 5607 // This may be used to include null fields in Patch requests. 5608 NullFields []string `json:"-"` 5609} 5610 5611func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { 5612 type NoMethod GooglePrivacyDlpV2NumericalStatsResult 5613 raw := NoMethod(*s) 5614 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5615} 5616 5617// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing 5618// output. 5619type GooglePrivacyDlpV2OutputStorageConfig struct { 5620 // OutputSchema: Schema used for writing the findings for Inspect jobs. 5621 // This field is only used for Inspect and must be unspecified for Risk 5622 // jobs. Columns are derived from the `Finding` object. If appending to 5623 // an existing table, any columns from the predefined schema that are 5624 // missing will be added. No columns in the existing table will be 5625 // deleted. If unspecified, then all available columns will be used for 5626 // a new table or an (existing) table with no schema, and no changes 5627 // will be made to an existing table that has a schema. Only for use 5628 // with external storage. 5629 // 5630 // Possible values: 5631 // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. 5632 // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, 5633 // `certainty`, and `timestamp`. 5634 // "GCS_COLUMNS" - Schema tailored to findings from scanning Google 5635 // Cloud Storage. 5636 // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning 5637 // Google Datastore. 5638 // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning 5639 // Google BigQuery. 5640 // "ALL_COLUMNS" - Schema containing all columns. 5641 OutputSchema string `json:"outputSchema,omitempty"` 5642 5643 // Table: Store findings in an existing table or a new table in an 5644 // existing dataset. If table_id is not set a new one will be generated 5645 // for you with the following format: 5646 // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used 5647 // for generating the date details. For Inspect, each column in an 5648 // existing output table must have the same name, type, and mode of a 5649 // field in the `Finding` object. For Risk, an existing output table 5650 // should be the output of a previous Risk analysis job run on the same 5651 // source table, with the same privacy metric and quasi-identifiers. 5652 // Risk jobs that analyze the same table but compute a different privacy 5653 // metric, or use different sets of quasi-identifiers, cannot store 5654 // their results in the same table. 5655 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 5656 5657 // ForceSendFields is a list of field names (e.g. "OutputSchema") to 5658 // unconditionally include in API requests. By default, fields with 5659 // empty values are omitted from API requests. However, any non-pointer, 5660 // non-interface field appearing in ForceSendFields will be sent to the 5661 // server regardless of whether the field is empty or not. This may be 5662 // used to include empty fields in Patch requests. 5663 ForceSendFields []string `json:"-"` 5664 5665 // NullFields is a list of field names (e.g. "OutputSchema") to include 5666 // in API requests with the JSON null value. By default, fields with 5667 // empty values are omitted from API requests. However, any field with 5668 // an empty value appearing in NullFields will be sent to the server as 5669 // null. It is an error if a field in this list has a non-empty value. 5670 // This may be used to include null fields in Patch requests. 5671 NullFields []string `json:"-"` 5672} 5673 5674func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { 5675 type NoMethod GooglePrivacyDlpV2OutputStorageConfig 5676 raw := NoMethod(*s) 5677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5678} 5679 5680// GooglePrivacyDlpV2PartitionId: Datastore partition ID. A partition ID 5681// identifies a grouping of entities. The grouping is always by project 5682// and namespace, however the namespace ID may be empty. A partition ID 5683// contains several dimensions: project ID and namespace ID. 5684type GooglePrivacyDlpV2PartitionId struct { 5685 // NamespaceId: If not empty, the ID of the namespace to which the 5686 // entities belong. 5687 NamespaceId string `json:"namespaceId,omitempty"` 5688 5689 // ProjectId: The ID of the project to which the entities belong. 5690 ProjectId string `json:"projectId,omitempty"` 5691 5692 // ForceSendFields is a list of field names (e.g. "NamespaceId") to 5693 // unconditionally include in API requests. By default, fields with 5694 // empty values are omitted from API requests. However, any non-pointer, 5695 // non-interface field appearing in ForceSendFields will be sent to the 5696 // server regardless of whether the field is empty or not. This may be 5697 // used to include empty fields in Patch requests. 5698 ForceSendFields []string `json:"-"` 5699 5700 // NullFields is a list of field names (e.g. "NamespaceId") to include 5701 // in API requests with the JSON null value. By default, fields with 5702 // empty values are omitted from API requests. However, any field with 5703 // an empty value appearing in NullFields will be sent to the server as 5704 // null. It is an error if a field in this list has a non-empty value. 5705 // This may be used to include null fields in Patch requests. 5706 NullFields []string `json:"-"` 5707} 5708 5709func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { 5710 type NoMethod GooglePrivacyDlpV2PartitionId 5711 raw := NoMethod(*s) 5712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5713} 5714 5715// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to 5716// construct a key path. If either name or ID is set, the element is 5717// complete. If neither is set, the element is incomplete. 5718type GooglePrivacyDlpV2PathElement struct { 5719 // Id: The auto-allocated ID of the entity. Never equal to zero. Values 5720 // less than zero are discouraged and may not be supported in the 5721 // future. 5722 Id int64 `json:"id,omitempty,string"` 5723 5724 // Kind: The kind of the entity. A kind matching regex `__.*__` is 5725 // reserved/read-only. A kind must not contain more than 1500 bytes when 5726 // UTF-8 encoded. Cannot be "". 5727 Kind string `json:"kind,omitempty"` 5728 5729 // Name: The name of the entity. A name matching regex `__.*__` is 5730 // reserved/read-only. A name must not be more than 1500 bytes when 5731 // UTF-8 encoded. Cannot be "". 5732 Name string `json:"name,omitempty"` 5733 5734 // ForceSendFields is a list of field names (e.g. "Id") to 5735 // unconditionally include in API requests. By default, fields with 5736 // empty values are omitted from API requests. However, any non-pointer, 5737 // non-interface field appearing in ForceSendFields will be sent to the 5738 // server regardless of whether the field is empty or not. This may be 5739 // used to include empty fields in Patch requests. 5740 ForceSendFields []string `json:"-"` 5741 5742 // NullFields is a list of field names (e.g. "Id") to include in API 5743 // requests with the JSON null value. By default, fields with empty 5744 // values are omitted from API requests. However, any field with an 5745 // empty value appearing in NullFields will be sent to the server as 5746 // null. It is an error if a field in this list has a non-empty value. 5747 // This may be used to include null fields in Patch requests. 5748 NullFields []string `json:"-"` 5749} 5750 5751func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { 5752 type NoMethod GooglePrivacyDlpV2PathElement 5753 raw := NoMethod(*s) 5754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5755} 5756 5757// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a 5758// value. 5759type GooglePrivacyDlpV2PrimitiveTransformation struct { 5760 // BucketingConfig: Bucketing 5761 BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` 5762 5763 // CharacterMaskConfig: Mask 5764 CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` 5765 5766 // CryptoDeterministicConfig: Deterministic Crypto 5767 CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` 5768 5769 // CryptoHashConfig: Crypto 5770 CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` 5771 5772 // CryptoReplaceFfxFpeConfig: Ffx-Fpe 5773 CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` 5774 5775 // DateShiftConfig: Date Shift 5776 DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` 5777 5778 // FixedSizeBucketingConfig: Fixed size bucketing 5779 FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` 5780 5781 // RedactConfig: Redact 5782 RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` 5783 5784 // ReplaceConfig: Replace 5785 ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` 5786 5787 // ReplaceWithInfoTypeConfig: Replace with infotype 5788 ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` 5789 5790 // TimePartConfig: Time extraction 5791 TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` 5792 5793 // ForceSendFields is a list of field names (e.g. "BucketingConfig") to 5794 // unconditionally include in API requests. By default, fields with 5795 // empty values are omitted from API requests. However, any non-pointer, 5796 // non-interface field appearing in ForceSendFields will be sent to the 5797 // server regardless of whether the field is empty or not. This may be 5798 // used to include empty fields in Patch requests. 5799 ForceSendFields []string `json:"-"` 5800 5801 // NullFields is a list of field names (e.g. "BucketingConfig") to 5802 // include in API requests with the JSON null value. By default, fields 5803 // with empty values are omitted from API requests. However, any field 5804 // with an empty value appearing in NullFields will be sent to the 5805 // server as null. It is an error if a field in this list has a 5806 // non-empty value. This may be used to include null fields in Patch 5807 // requests. 5808 NullFields []string `json:"-"` 5809} 5810 5811func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { 5812 type NoMethod GooglePrivacyDlpV2PrimitiveTransformation 5813 raw := NoMethod(*s) 5814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5815} 5816 5817// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for 5818// reidentification risk analysis. 5819type GooglePrivacyDlpV2PrivacyMetric struct { 5820 // CategoricalStatsConfig: Categorical stats 5821 CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` 5822 5823 // DeltaPresenceEstimationConfig: delta-presence 5824 DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` 5825 5826 // KAnonymityConfig: K-anonymity 5827 KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` 5828 5829 // KMapEstimationConfig: k-map 5830 KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` 5831 5832 // LDiversityConfig: l-diversity 5833 LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` 5834 5835 // NumericalStatsConfig: Numerical stats 5836 NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` 5837 5838 // ForceSendFields is a list of field names (e.g. 5839 // "CategoricalStatsConfig") to unconditionally include in API requests. 5840 // By default, fields with empty values are omitted from API requests. 5841 // However, any non-pointer, non-interface field appearing in 5842 // ForceSendFields will be sent to the server regardless of whether the 5843 // field is empty or not. This may be used to include empty fields in 5844 // Patch requests. 5845 ForceSendFields []string `json:"-"` 5846 5847 // NullFields is a list of field names (e.g. "CategoricalStatsConfig") 5848 // to include in API requests with the JSON null value. By default, 5849 // fields with empty values are omitted from API requests. However, any 5850 // field with an empty value appearing in NullFields will be sent to the 5851 // server as null. It is an error if a field in this list has a 5852 // non-empty value. This may be used to include null fields in Patch 5853 // requests. 5854 NullFields []string `json:"-"` 5855} 5856 5857func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { 5858 type NoMethod GooglePrivacyDlpV2PrivacyMetric 5859 raw := NoMethod(*s) 5860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5861} 5862 5863// GooglePrivacyDlpV2Proximity: Message for specifying a window around a 5864// finding to apply a detection rule. 5865type GooglePrivacyDlpV2Proximity struct { 5866 // WindowAfter: Number of characters after the finding to consider. 5867 WindowAfter int64 `json:"windowAfter,omitempty"` 5868 5869 // WindowBefore: Number of characters before the finding to consider. 5870 WindowBefore int64 `json:"windowBefore,omitempty"` 5871 5872 // ForceSendFields is a list of field names (e.g. "WindowAfter") to 5873 // unconditionally include in API requests. By default, fields with 5874 // empty values are omitted from API requests. However, any non-pointer, 5875 // non-interface field appearing in ForceSendFields will be sent to the 5876 // server regardless of whether the field is empty or not. This may be 5877 // used to include empty fields in Patch requests. 5878 ForceSendFields []string `json:"-"` 5879 5880 // NullFields is a list of field names (e.g. "WindowAfter") to include 5881 // in API requests with the JSON null value. By default, fields with 5882 // empty values are omitted from API requests. However, any field with 5883 // an empty value appearing in NullFields will be sent to the server as 5884 // null. It is an error if a field in this list has a non-empty value. 5885 // This may be used to include null fields in Patch requests. 5886 NullFields []string `json:"-"` 5887} 5888 5889func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { 5890 type NoMethod GooglePrivacyDlpV2Proximity 5891 raw := NoMethod(*s) 5892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5893} 5894 5895// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings 5896// of a DlpJob to Cloud Data Catalog. Labels summarizing the results of 5897// the DlpJob will be applied to the entry for the resource scanned in 5898// Cloud Data Catalog. Any labels previously written by another DlpJob 5899// will be deleted. InfoType naming patterns are strictly enforced when 5900// using this feature. Note that the findings will be persisted in Cloud 5901// Data Catalog storage and are governed by Data Catalog 5902// service-specific policy, see 5903// https://cloud.google.com/terms/service-terms Only a single instance 5904// of this action can be specified and only allowed if all resources 5905// being scanned are BigQuery tables. Compatible with: Inspect 5906type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { 5907} 5908 5909// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of 5910// a DlpJob to the Cloud Security Command Center (CSCC Alpha). This 5911// action is only available for projects which are parts of an 5912// organization and whitelisted for the alpha Cloud Security Command 5913// Center. The action will publish count of finding instances and their 5914// info types. The summary of findings will be persisted in CSCC and are 5915// governed by CSCC service-specific policy, see 5916// https://cloud.google.com/terms/service-terms Only a single instance 5917// of this action can be specified. Compatible with: Inspect 5918type GooglePrivacyDlpV2PublishSummaryToCscc struct { 5919} 5920 5921// GooglePrivacyDlpV2PublishToPubSub: Publish a message into given 5922// Pub/Sub topic when DlpJob has completed. The message contains a 5923// single field, `DlpJobName`, which is equal to the finished job's 5924// [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/pr 5925// ojects.dlpJobs#DlpJob). Compatible with: Inspect, Risk 5926type GooglePrivacyDlpV2PublishToPubSub struct { 5927 // Topic: Cloud Pub/Sub topic to send notifications to. The topic must 5928 // have given publishing access rights to the DLP API service account 5929 // executing the long running DlpJob sending the notifications. Format 5930 // is projects/{project}/topics/{topic}. 5931 Topic string `json:"topic,omitempty"` 5932 5933 // ForceSendFields is a list of field names (e.g. "Topic") to 5934 // unconditionally include in API requests. By default, fields with 5935 // empty values are omitted from API requests. However, any non-pointer, 5936 // non-interface field appearing in ForceSendFields will be sent to the 5937 // server regardless of whether the field is empty or not. This may be 5938 // used to include empty fields in Patch requests. 5939 ForceSendFields []string `json:"-"` 5940 5941 // NullFields is a list of field names (e.g. "Topic") to include in API 5942 // requests with the JSON null value. By default, fields with empty 5943 // values are omitted from API requests. However, any field with an 5944 // empty value appearing in NullFields will be sent to the server as 5945 // null. It is an error if a field in this list has a non-empty value. 5946 // This may be used to include null fields in Patch requests. 5947 NullFields []string `json:"-"` 5948} 5949 5950func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { 5951 type NoMethod GooglePrivacyDlpV2PublishToPubSub 5952 raw := NoMethod(*s) 5953 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5954} 5955 5956// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric 5957// dlp.googleapis.com/finding_count. This will publish a metric to stack 5958// driver on each infotype requested and how many findings were found 5959// for it. CustomDetectors will be bucketed as 'Custom' under the 5960// Stackdriver label 'info_type'. 5961type GooglePrivacyDlpV2PublishToStackdriver struct { 5962} 5963 5964// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. 5965type GooglePrivacyDlpV2QuasiId struct { 5966 // CustomTag: A column can be tagged with a custom tag. In this case, 5967 // the user must indicate an auxiliary table that contains statistical 5968 // information on the possible values of this column (below). 5969 CustomTag string `json:"customTag,omitempty"` 5970 5971 // Field: Required. Identifies the column. 5972 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 5973 5974 // Inferred: If no semantic tag is indicated, we infer the statistical 5975 // model from the distribution of values in the input data 5976 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 5977 5978 // InfoType: A column can be tagged with a InfoType to use the relevant 5979 // public dataset as a statistical model of population, if available. We 5980 // currently support US ZIP codes, region codes, ages and genders. To 5981 // programmatically obtain the list of supported InfoTypes, use 5982 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 5983 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 5984 5985 // ForceSendFields is a list of field names (e.g. "CustomTag") to 5986 // unconditionally include in API requests. By default, fields with 5987 // empty values are omitted from API requests. However, any non-pointer, 5988 // non-interface field appearing in ForceSendFields will be sent to the 5989 // server regardless of whether the field is empty or not. This may be 5990 // used to include empty fields in Patch requests. 5991 ForceSendFields []string `json:"-"` 5992 5993 // NullFields is a list of field names (e.g. "CustomTag") to include in 5994 // API requests with the JSON null value. By default, fields with empty 5995 // values are omitted from API requests. However, any field with an 5996 // empty value appearing in NullFields will be sent to the server as 5997 // null. It is an error if a field in this list has a non-empty value. 5998 // This may be used to include null fields in Patch requests. 5999 NullFields []string `json:"-"` 6000} 6001 6002func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { 6003 type NoMethod GooglePrivacyDlpV2QuasiId 6004 raw := NoMethod(*s) 6005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6006} 6007 6008// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a 6009// custom_tag, used to know which column in the data corresponds to 6010// which column in the statistical model. 6011type GooglePrivacyDlpV2QuasiIdField struct { 6012 // CustomTag: A auxiliary field. 6013 CustomTag string `json:"customTag,omitempty"` 6014 6015 // Field: Identifies the column. 6016 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6017 6018 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6019 // unconditionally include in API requests. By default, fields with 6020 // empty values are omitted from API requests. However, any non-pointer, 6021 // non-interface field appearing in ForceSendFields will be sent to the 6022 // server regardless of whether the field is empty or not. This may be 6023 // used to include empty fields in Patch requests. 6024 ForceSendFields []string `json:"-"` 6025 6026 // NullFields is a list of field names (e.g. "CustomTag") to include in 6027 // API requests with the JSON null value. By default, fields with empty 6028 // values are omitted from API requests. However, any field with an 6029 // empty value appearing in NullFields will be sent to the server as 6030 // null. It is an error if a field in this list has a non-empty value. 6031 // This may be used to include null fields in Patch requests. 6032 NullFields []string `json:"-"` 6033} 6034 6035func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { 6036 type NoMethod GooglePrivacyDlpV2QuasiIdField 6037 raw := NoMethod(*s) 6038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6039} 6040 6041// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has 6042// a custom_tag, used to know which column in the data corresponds to 6043// which column in the statistical model. 6044type GooglePrivacyDlpV2QuasiIdentifierField struct { 6045 // CustomTag: A column can be tagged with a custom tag. In this case, 6046 // the user must indicate an auxiliary table that contains statistical 6047 // information on the possible values of this column (below). 6048 CustomTag string `json:"customTag,omitempty"` 6049 6050 // Field: Identifies the column. 6051 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 6052 6053 // ForceSendFields is a list of field names (e.g. "CustomTag") to 6054 // unconditionally include in API requests. By default, fields with 6055 // empty values are omitted from API requests. However, any non-pointer, 6056 // non-interface field appearing in ForceSendFields will be sent to the 6057 // server regardless of whether the field is empty or not. This may be 6058 // used to include empty fields in Patch requests. 6059 ForceSendFields []string `json:"-"` 6060 6061 // NullFields is a list of field names (e.g. "CustomTag") to include in 6062 // API requests with the JSON null value. By default, fields with empty 6063 // values are omitted from API requests. However, any field with an 6064 // empty value appearing in NullFields will be sent to the server as 6065 // null. It is an error if a field in this list has a non-empty value. 6066 // This may be used to include null fields in Patch requests. 6067 NullFields []string `json:"-"` 6068} 6069 6070func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { 6071 type NoMethod GooglePrivacyDlpV2QuasiIdentifierField 6072 raw := NoMethod(*s) 6073 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6074} 6075 6076// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details 6077// parsed from quote. 6078type GooglePrivacyDlpV2QuoteInfo struct { 6079 // DateTime: The date time indicated by the quote. 6080 DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` 6081 6082 // ForceSendFields is a list of field names (e.g. "DateTime") to 6083 // unconditionally include in API requests. By default, fields with 6084 // empty values are omitted from API requests. However, any non-pointer, 6085 // non-interface field appearing in ForceSendFields will be sent to the 6086 // server regardless of whether the field is empty or not. This may be 6087 // used to include empty fields in Patch requests. 6088 ForceSendFields []string `json:"-"` 6089 6090 // NullFields is a list of field names (e.g. "DateTime") to include in 6091 // API requests with the JSON null value. By default, fields with empty 6092 // values are omitted from API requests. However, any field with an 6093 // empty value appearing in NullFields will be sent to the server as 6094 // null. It is an error if a field in this list has a non-empty value. 6095 // This may be used to include null fields in Patch requests. 6096 NullFields []string `json:"-"` 6097} 6098 6099func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { 6100 type NoMethod GooglePrivacyDlpV2QuoteInfo 6101 raw := NoMethod(*s) 6102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6103} 6104 6105// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) 6106type GooglePrivacyDlpV2Range struct { 6107 // End: Index of the last character of the range (exclusive). 6108 End int64 `json:"end,omitempty,string"` 6109 6110 // Start: Index of the first character of the range (inclusive). 6111 Start int64 `json:"start,omitempty,string"` 6112 6113 // ForceSendFields is a list of field names (e.g. "End") to 6114 // unconditionally include in API requests. By default, fields with 6115 // empty values are omitted from API requests. However, any non-pointer, 6116 // non-interface field appearing in ForceSendFields will be sent to the 6117 // server regardless of whether the field is empty or not. This may be 6118 // used to include empty fields in Patch requests. 6119 ForceSendFields []string `json:"-"` 6120 6121 // NullFields is a list of field names (e.g. "End") to include in API 6122 // requests with the JSON null value. By default, fields with empty 6123 // values are omitted from API requests. However, any field with an 6124 // empty value appearing in NullFields will be sent to the server as 6125 // null. It is an error if a field in this list has a non-empty value. 6126 // This may be used to include null fields in Patch requests. 6127 NullFields []string `json:"-"` 6128} 6129 6130func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { 6131 type NoMethod GooglePrivacyDlpV2Range 6132 raw := NoMethod(*s) 6133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6134} 6135 6136// GooglePrivacyDlpV2RecordCondition: A condition for determining 6137// whether a transformation should be applied to a field. 6138type GooglePrivacyDlpV2RecordCondition struct { 6139 // Expressions: An expression. 6140 Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` 6141 6142 // ForceSendFields is a list of field names (e.g. "Expressions") to 6143 // unconditionally include in API requests. By default, fields with 6144 // empty values are omitted from API requests. However, any non-pointer, 6145 // non-interface field appearing in ForceSendFields will be sent to the 6146 // server regardless of whether the field is empty or not. This may be 6147 // used to include empty fields in Patch requests. 6148 ForceSendFields []string `json:"-"` 6149 6150 // NullFields is a list of field names (e.g. "Expressions") to include 6151 // in API requests with the JSON null value. By default, fields with 6152 // empty values are omitted from API requests. However, any field with 6153 // an empty value appearing in NullFields will be sent to the server as 6154 // null. It is an error if a field in this list has a non-empty value. 6155 // This may be used to include null fields in Patch requests. 6156 NullFields []string `json:"-"` 6157} 6158 6159func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { 6160 type NoMethod GooglePrivacyDlpV2RecordCondition 6161 raw := NoMethod(*s) 6162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6163} 6164 6165// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a 6166// record that contains a finding. 6167type GooglePrivacyDlpV2RecordKey struct { 6168 BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` 6169 6170 DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` 6171 6172 // IdValues: Values of identifying columns in the given row. Order of 6173 // values matches the order of `identifying_fields` specified in the 6174 // scanning request. 6175 IdValues []string `json:"idValues,omitempty"` 6176 6177 // ForceSendFields is a list of field names (e.g. "BigQueryKey") to 6178 // unconditionally include in API requests. By default, fields with 6179 // empty values are omitted from API requests. However, any non-pointer, 6180 // non-interface field appearing in ForceSendFields will be sent to the 6181 // server regardless of whether the field is empty or not. This may be 6182 // used to include empty fields in Patch requests. 6183 ForceSendFields []string `json:"-"` 6184 6185 // NullFields is a list of field names (e.g. "BigQueryKey") to include 6186 // in API requests with the JSON null value. By default, fields with 6187 // empty values are omitted from API requests. However, any field with 6188 // an empty value appearing in NullFields will be sent to the server as 6189 // null. It is an error if a field in this list has a non-empty value. 6190 // This may be used to include null fields in Patch requests. 6191 NullFields []string `json:"-"` 6192} 6193 6194func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { 6195 type NoMethod GooglePrivacyDlpV2RecordKey 6196 raw := NoMethod(*s) 6197 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6198} 6199 6200// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row 6201// or record. 6202type GooglePrivacyDlpV2RecordLocation struct { 6203 // FieldId: Field id of the field containing the finding. 6204 FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` 6205 6206 // RecordKey: Key of the finding. 6207 RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` 6208 6209 // TableLocation: Location within a `ContentItem.Table`. 6210 TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` 6211 6212 // ForceSendFields is a list of field names (e.g. "FieldId") to 6213 // unconditionally include in API requests. By default, fields with 6214 // empty values are omitted from API requests. However, any non-pointer, 6215 // non-interface field appearing in ForceSendFields will be sent to the 6216 // server regardless of whether the field is empty or not. This may be 6217 // used to include empty fields in Patch requests. 6218 ForceSendFields []string `json:"-"` 6219 6220 // NullFields is a list of field names (e.g. "FieldId") to include in 6221 // API requests with the JSON null value. By default, fields with empty 6222 // values are omitted from API requests. However, any field with an 6223 // empty value appearing in NullFields will be sent to the server as 6224 // null. It is an error if a field in this list has a non-empty value. 6225 // This may be used to include null fields in Patch requests. 6226 NullFields []string `json:"-"` 6227} 6228 6229func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { 6230 type NoMethod GooglePrivacyDlpV2RecordLocation 6231 raw := NoMethod(*s) 6232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6233} 6234 6235// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress 6236// records whose suppression conditions evaluate to true. 6237type GooglePrivacyDlpV2RecordSuppression struct { 6238 // Condition: A condition that when it evaluates to true will result in 6239 // the record being evaluated to be suppressed from the transformed 6240 // content. 6241 Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` 6242 6243 // ForceSendFields is a list of field names (e.g. "Condition") to 6244 // unconditionally include in API requests. By default, fields with 6245 // empty values are omitted from API requests. However, any non-pointer, 6246 // non-interface field appearing in ForceSendFields will be sent to the 6247 // server regardless of whether the field is empty or not. This may be 6248 // used to include empty fields in Patch requests. 6249 ForceSendFields []string `json:"-"` 6250 6251 // NullFields is a list of field names (e.g. "Condition") to include in 6252 // API requests with the JSON null value. By default, fields with empty 6253 // values are omitted from API requests. However, any field with an 6254 // empty value appearing in NullFields will be sent to the server as 6255 // null. It is an error if a field in this list has a non-empty value. 6256 // This may be used to include null fields in Patch requests. 6257 NullFields []string `json:"-"` 6258} 6259 6260func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { 6261 type NoMethod GooglePrivacyDlpV2RecordSuppression 6262 raw := NoMethod(*s) 6263 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6264} 6265 6266// GooglePrivacyDlpV2RecordTransformations: A type of transformation 6267// that is applied over structured data such as a table. 6268type GooglePrivacyDlpV2RecordTransformations struct { 6269 // FieldTransformations: Transform the record by applying various field 6270 // transformations. 6271 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 6272 6273 // RecordSuppressions: Configuration defining which records get 6274 // suppressed entirely. Records that match any suppression rule are 6275 // omitted from the output. 6276 RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` 6277 6278 // ForceSendFields is a list of field names (e.g. 6279 // "FieldTransformations") to unconditionally include in API requests. 6280 // By default, fields with empty values are omitted from API requests. 6281 // However, any non-pointer, non-interface field appearing in 6282 // ForceSendFields will be sent to the server regardless of whether the 6283 // field is empty or not. This may be used to include empty fields in 6284 // Patch requests. 6285 ForceSendFields []string `json:"-"` 6286 6287 // NullFields is a list of field names (e.g. "FieldTransformations") to 6288 // include in API requests with the JSON null value. By default, fields 6289 // with empty values are omitted from API requests. However, any field 6290 // with an empty value appearing in NullFields will be sent to the 6291 // server as null. It is an error if a field in this list has a 6292 // non-empty value. This may be used to include null fields in Patch 6293 // requests. 6294 NullFields []string `json:"-"` 6295} 6296 6297func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { 6298 type NoMethod GooglePrivacyDlpV2RecordTransformations 6299 raw := NoMethod(*s) 6300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6301} 6302 6303// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if 6304// used with an `InfoTypeTransformation` transforming PHONE_NUMBER, and 6305// input 'My phone number is 206-555-0123', the output would be 'My 6306// phone number is '. 6307type GooglePrivacyDlpV2RedactConfig struct { 6308} 6309 6310// GooglePrivacyDlpV2RedactImageRequest: Request to search for 6311// potentially sensitive info in an image and redact it by covering it 6312// with a colored rectangle. 6313type GooglePrivacyDlpV2RedactImageRequest struct { 6314 // ByteItem: The content must be PNG, JPEG, SVG or BMP. 6315 ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` 6316 6317 // ImageRedactionConfigs: The configuration for specifying what content 6318 // to redact from images. 6319 ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` 6320 6321 // IncludeFindings: Whether the response should include findings along 6322 // with the redacted image. 6323 IncludeFindings bool `json:"includeFindings,omitempty"` 6324 6325 // InspectConfig: Configuration for the inspector. 6326 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6327 6328 // LocationId: Deprecated. This field has no effect. 6329 LocationId string `json:"locationId,omitempty"` 6330 6331 // ForceSendFields is a list of field names (e.g. "ByteItem") to 6332 // unconditionally include in API requests. By default, fields with 6333 // empty values are omitted from API requests. However, any non-pointer, 6334 // non-interface field appearing in ForceSendFields will be sent to the 6335 // server regardless of whether the field is empty or not. This may be 6336 // used to include empty fields in Patch requests. 6337 ForceSendFields []string `json:"-"` 6338 6339 // NullFields is a list of field names (e.g. "ByteItem") to include in 6340 // API requests with the JSON null value. By default, fields with empty 6341 // values are omitted from API requests. However, any field with an 6342 // empty value appearing in NullFields will be sent to the server as 6343 // null. It is an error if a field in this list has a non-empty value. 6344 // This may be used to include null fields in Patch requests. 6345 NullFields []string `json:"-"` 6346} 6347 6348func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { 6349 type NoMethod GooglePrivacyDlpV2RedactImageRequest 6350 raw := NoMethod(*s) 6351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6352} 6353 6354// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. 6355type GooglePrivacyDlpV2RedactImageResponse struct { 6356 // ExtractedText: If an image was being inspected and the 6357 // InspectConfig's include_quote was set to true, then this field will 6358 // include all text, if any, that was found in the image. 6359 ExtractedText string `json:"extractedText,omitempty"` 6360 6361 // InspectResult: The findings. Populated when include_findings in the 6362 // request is true. 6363 InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` 6364 6365 // RedactedImage: The redacted image. The type will be the same as the 6366 // original image. 6367 RedactedImage string `json:"redactedImage,omitempty"` 6368 6369 // ServerResponse contains the HTTP response code and headers from the 6370 // server. 6371 googleapi.ServerResponse `json:"-"` 6372 6373 // ForceSendFields is a list of field names (e.g. "ExtractedText") to 6374 // unconditionally include in API requests. By default, fields with 6375 // empty values are omitted from API requests. However, any non-pointer, 6376 // non-interface field appearing in ForceSendFields will be sent to the 6377 // server regardless of whether the field is empty or not. This may be 6378 // used to include empty fields in Patch requests. 6379 ForceSendFields []string `json:"-"` 6380 6381 // NullFields is a list of field names (e.g. "ExtractedText") to include 6382 // in API requests with the JSON null value. By default, fields with 6383 // empty values are omitted from API requests. However, any field with 6384 // an empty value appearing in NullFields will be sent to the server as 6385 // null. It is an error if a field in this list has a non-empty value. 6386 // This may be used to include null fields in Patch requests. 6387 NullFields []string `json:"-"` 6388} 6389 6390func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { 6391 type NoMethod GooglePrivacyDlpV2RedactImageResponse 6392 raw := NoMethod(*s) 6393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6394} 6395 6396// GooglePrivacyDlpV2Regex: Message defining a custom regular 6397// expression. 6398type GooglePrivacyDlpV2Regex struct { 6399 // GroupIndexes: The index of the submatch to extract as findings. When 6400 // not specified, the entire match is returned. No more than 3 may be 6401 // included. 6402 GroupIndexes []int64 `json:"groupIndexes,omitempty"` 6403 6404 // Pattern: Pattern defining the regular expression. Its syntax 6405 // (https://github.com/google/re2/wiki/Syntax) can be found under the 6406 // google/re2 repository on GitHub. 6407 Pattern string `json:"pattern,omitempty"` 6408 6409 // ForceSendFields is a list of field names (e.g. "GroupIndexes") to 6410 // unconditionally include in API requests. By default, fields with 6411 // empty values are omitted from API requests. However, any non-pointer, 6412 // non-interface field appearing in ForceSendFields will be sent to the 6413 // server regardless of whether the field is empty or not. This may be 6414 // used to include empty fields in Patch requests. 6415 ForceSendFields []string `json:"-"` 6416 6417 // NullFields is a list of field names (e.g. "GroupIndexes") to include 6418 // in API requests with the JSON null value. By default, fields with 6419 // empty values are omitted from API requests. However, any field with 6420 // an empty value appearing in NullFields will be sent to the server as 6421 // null. It is an error if a field in this list has a non-empty value. 6422 // This may be used to include null fields in Patch requests. 6423 NullFields []string `json:"-"` 6424} 6425 6426func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { 6427 type NoMethod GooglePrivacyDlpV2Regex 6428 raw := NoMethod(*s) 6429 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6430} 6431 6432// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an 6433// item. 6434type GooglePrivacyDlpV2ReidentifyContentRequest struct { 6435 // InspectConfig: Configuration for the inspector. 6436 InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` 6437 6438 // InspectTemplateName: Template to use. Any configuration directly 6439 // specified in `inspect_config` will override those set in the 6440 // template. Singular fields that are set in this request will replace 6441 // their corresponding fields in the template. Repeated fields are 6442 // appended. Singular sub-messages and groups are recursively merged. 6443 InspectTemplateName string `json:"inspectTemplateName,omitempty"` 6444 6445 // Item: The item to re-identify. Will be treated as text. 6446 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6447 6448 // LocationId: Deprecated. This field has no effect. 6449 LocationId string `json:"locationId,omitempty"` 6450 6451 // ReidentifyConfig: Configuration for the re-identification of the 6452 // content item. This field shares the same proto message type that is 6453 // used for de-identification, however its usage here is for the 6454 // reversal of the previous de-identification. Re-identification is 6455 // performed by examining the transformations used to de-identify the 6456 // items and executing the reverse. This requires that only reversible 6457 // transformations be provided here. The reversible transformations are: 6458 // - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig` 6459 ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` 6460 6461 // ReidentifyTemplateName: Template to use. References an instance of 6462 // `DeidentifyTemplate`. Any configuration directly specified in 6463 // `reidentify_config` or `inspect_config` will override those set in 6464 // the template. The `DeidentifyTemplate` used must include only 6465 // reversible transformations. Singular fields that are set in this 6466 // request will replace their corresponding fields in the template. 6467 // Repeated fields are appended. Singular sub-messages and groups are 6468 // recursively merged. 6469 ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` 6470 6471 // ForceSendFields is a list of field names (e.g. "InspectConfig") to 6472 // unconditionally include in API requests. By default, fields with 6473 // empty values are omitted from API requests. However, any non-pointer, 6474 // non-interface field appearing in ForceSendFields will be sent to the 6475 // server regardless of whether the field is empty or not. This may be 6476 // used to include empty fields in Patch requests. 6477 ForceSendFields []string `json:"-"` 6478 6479 // NullFields is a list of field names (e.g. "InspectConfig") to include 6480 // in API requests with the JSON null value. By default, fields with 6481 // empty values are omitted from API requests. However, any field with 6482 // an empty value appearing in NullFields will be sent to the server as 6483 // null. It is an error if a field in this list has a non-empty value. 6484 // This may be used to include null fields in Patch requests. 6485 NullFields []string `json:"-"` 6486} 6487 6488func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { 6489 type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest 6490 raw := NoMethod(*s) 6491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6492} 6493 6494// GooglePrivacyDlpV2ReidentifyContentResponse: Results of 6495// re-identifying a item. 6496type GooglePrivacyDlpV2ReidentifyContentResponse struct { 6497 // Item: The re-identified item. 6498 Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` 6499 6500 // Overview: An overview of the changes that were made to the `item`. 6501 Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` 6502 6503 // ServerResponse contains the HTTP response code and headers from the 6504 // server. 6505 googleapi.ServerResponse `json:"-"` 6506 6507 // ForceSendFields is a list of field names (e.g. "Item") to 6508 // unconditionally include in API requests. By default, fields with 6509 // empty values are omitted from API requests. However, any non-pointer, 6510 // non-interface field appearing in ForceSendFields will be sent to the 6511 // server regardless of whether the field is empty or not. This may be 6512 // used to include empty fields in Patch requests. 6513 ForceSendFields []string `json:"-"` 6514 6515 // NullFields is a list of field names (e.g. "Item") to include in API 6516 // requests with the JSON null value. By default, fields with empty 6517 // values are omitted from API requests. However, any field with an 6518 // empty value appearing in NullFields will be sent to the server as 6519 // null. It is an error if a field in this list has a non-empty value. 6520 // This may be used to include null fields in Patch requests. 6521 NullFields []string `json:"-"` 6522} 6523 6524func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { 6525 type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse 6526 raw := NoMethod(*s) 6527 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6528} 6529 6530// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a 6531// given `Value`. 6532type GooglePrivacyDlpV2ReplaceValueConfig struct { 6533 // NewValue: Value to replace it with. 6534 NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` 6535 6536 // ForceSendFields is a list of field names (e.g. "NewValue") to 6537 // unconditionally include in API requests. By default, fields with 6538 // empty values are omitted from API requests. However, any non-pointer, 6539 // non-interface field appearing in ForceSendFields will be sent to the 6540 // server regardless of whether the field is empty or not. This may be 6541 // used to include empty fields in Patch requests. 6542 ForceSendFields []string `json:"-"` 6543 6544 // NullFields is a list of field names (e.g. "NewValue") to include in 6545 // API requests with the JSON null value. By default, fields with empty 6546 // values are omitted from API requests. However, any field with an 6547 // empty value appearing in NullFields will be sent to the server as 6548 // null. It is an error if a field in this list has a non-empty value. 6549 // This may be used to include null fields in Patch requests. 6550 NullFields []string `json:"-"` 6551} 6552 6553func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { 6554 type NoMethod GooglePrivacyDlpV2ReplaceValueConfig 6555 raw := NoMethod(*s) 6556 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6557} 6558 6559// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching 6560// finding with the name of the info_type. 6561type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { 6562} 6563 6564// GooglePrivacyDlpV2RequestedOptions: Snapshot of the inspection 6565// configuration. 6566type GooglePrivacyDlpV2RequestedOptions struct { 6567 // JobConfig: Inspect config. 6568 JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` 6569 6570 // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot 6571 // of its state at the time of this run. 6572 SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` 6573 6574 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6575 // unconditionally include in API requests. By default, fields with 6576 // empty values are omitted from API requests. However, any non-pointer, 6577 // non-interface field appearing in ForceSendFields will be sent to the 6578 // server regardless of whether the field is empty or not. This may be 6579 // used to include empty fields in Patch requests. 6580 ForceSendFields []string `json:"-"` 6581 6582 // NullFields is a list of field names (e.g. "JobConfig") to include in 6583 // API requests with the JSON null value. By default, fields with empty 6584 // values are omitted from API requests. However, any field with an 6585 // empty value appearing in NullFields will be sent to the server as 6586 // null. It is an error if a field in this list has a non-empty value. 6587 // This may be used to include null fields in Patch requests. 6588 NullFields []string `json:"-"` 6589} 6590 6591func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { 6592 type NoMethod GooglePrivacyDlpV2RequestedOptions 6593 raw := NoMethod(*s) 6594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6595} 6596 6597// GooglePrivacyDlpV2RequestedRiskAnalysisOptions: Risk analysis 6598// options. 6599type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { 6600 // JobConfig: The job config for the risk job. 6601 JobConfig *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` 6602 6603 // ForceSendFields is a list of field names (e.g. "JobConfig") to 6604 // unconditionally include in API requests. By default, fields with 6605 // empty values are omitted from API requests. However, any non-pointer, 6606 // non-interface field appearing in ForceSendFields will be sent to the 6607 // server regardless of whether the field is empty or not. This may be 6608 // used to include empty fields in Patch requests. 6609 ForceSendFields []string `json:"-"` 6610 6611 // NullFields is a list of field names (e.g. "JobConfig") to include in 6612 // API requests with the JSON null value. By default, fields with empty 6613 // values are omitted from API requests. However, any field with an 6614 // empty value appearing in NullFields will be sent to the server as 6615 // null. It is an error if a field in this list has a non-empty value. 6616 // This may be used to include null fields in Patch requests. 6617 NullFields []string `json:"-"` 6618} 6619 6620func (s *GooglePrivacyDlpV2RequestedRiskAnalysisOptions) MarshalJSON() ([]byte, error) { 6621 type NoMethod GooglePrivacyDlpV2RequestedRiskAnalysisOptions 6622 raw := NoMethod(*s) 6623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6624} 6625 6626// GooglePrivacyDlpV2Result: All result fields mentioned below are 6627// updated while the job is processing. 6628type GooglePrivacyDlpV2Result struct { 6629 // HybridStats: Statistics related to the processing of hybrid inspect. 6630 // Early access feature is in a pre-release state and might change or 6631 // have limited support. For more information, see 6632 // https://cloud.google.com/products#product-launch-stages. 6633 HybridStats *GooglePrivacyDlpV2HybridInspectStatistics `json:"hybridStats,omitempty"` 6634 6635 // InfoTypeStats: Statistics of how many instances of each info type 6636 // were found during inspect job. 6637 InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` 6638 6639 // ProcessedBytes: Total size in bytes that were processed. 6640 ProcessedBytes int64 `json:"processedBytes,omitempty,string"` 6641 6642 // TotalEstimatedBytes: Estimate of the number of bytes to process. 6643 TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` 6644 6645 // ForceSendFields is a list of field names (e.g. "HybridStats") to 6646 // unconditionally include in API requests. By default, fields with 6647 // empty values are omitted from API requests. However, any non-pointer, 6648 // non-interface field appearing in ForceSendFields will be sent to the 6649 // server regardless of whether the field is empty or not. This may be 6650 // used to include empty fields in Patch requests. 6651 ForceSendFields []string `json:"-"` 6652 6653 // NullFields is a list of field names (e.g. "HybridStats") to include 6654 // in API requests with the JSON null value. By default, fields with 6655 // empty values are omitted from API requests. However, any field with 6656 // an empty value appearing in NullFields will be sent to the server as 6657 // null. It is an error if a field in this list has a non-empty value. 6658 // This may be used to include null fields in Patch requests. 6659 NullFields []string `json:"-"` 6660} 6661 6662func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { 6663 type NoMethod GooglePrivacyDlpV2Result 6664 raw := NoMethod(*s) 6665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6666} 6667 6668// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk 6669// analysis job. See 6670// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn 6671// more. 6672type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { 6673 // Actions: Actions to execute at the completion of the job. Are 6674 // executed in the order provided. 6675 Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` 6676 6677 // PrivacyMetric: Privacy metric to compute. 6678 PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` 6679 6680 // SourceTable: Input dataset to compute metrics over. 6681 SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` 6682 6683 // ForceSendFields is a list of field names (e.g. "Actions") to 6684 // unconditionally include in API requests. By default, fields with 6685 // empty values are omitted from API requests. However, any non-pointer, 6686 // non-interface field appearing in ForceSendFields will be sent to the 6687 // server regardless of whether the field is empty or not. This may be 6688 // used to include empty fields in Patch requests. 6689 ForceSendFields []string `json:"-"` 6690 6691 // NullFields is a list of field names (e.g. "Actions") to include in 6692 // API requests with the JSON null value. By default, fields with empty 6693 // values are omitted from API requests. However, any field with an 6694 // empty value appearing in NullFields will be sent to the server as 6695 // null. It is an error if a field in this list has a non-empty value. 6696 // This may be used to include null fields in Patch requests. 6697 NullFields []string `json:"-"` 6698} 6699 6700func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { 6701 type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig 6702 raw := NoMethod(*s) 6703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6704} 6705 6706// GooglePrivacyDlpV2Row: Values of the row. 6707type GooglePrivacyDlpV2Row struct { 6708 // Values: Individual cells. 6709 Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` 6710 6711 // ForceSendFields is a list of field names (e.g. "Values") to 6712 // unconditionally include in API requests. By default, fields with 6713 // empty values are omitted from API requests. However, any non-pointer, 6714 // non-interface field appearing in ForceSendFields will be sent to the 6715 // server regardless of whether the field is empty or not. This may be 6716 // used to include empty fields in Patch requests. 6717 ForceSendFields []string `json:"-"` 6718 6719 // NullFields is a list of field names (e.g. "Values") to include in API 6720 // requests with the JSON null value. By default, fields with empty 6721 // values are omitted from API requests. However, any field with an 6722 // empty value appearing in NullFields will be sent to the server as 6723 // null. It is an error if a field in this list has a non-empty value. 6724 // This may be used to include null fields in Patch requests. 6725 NullFields []string `json:"-"` 6726} 6727 6728func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { 6729 type NoMethod GooglePrivacyDlpV2Row 6730 raw := NoMethod(*s) 6731 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6732} 6733 6734// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be 6735// persisted to the specified OutputStorageConfig. Only a single 6736// instance of this action can be specified. Compatible with: Inspect, 6737// Risk 6738type GooglePrivacyDlpV2SaveFindings struct { 6739 // OutputConfig: Location to store findings outside of DLP. 6740 OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` 6741 6742 // ForceSendFields is a list of field names (e.g. "OutputConfig") to 6743 // unconditionally include in API requests. By default, fields with 6744 // empty values are omitted from API requests. However, any non-pointer, 6745 // non-interface field appearing in ForceSendFields will be sent to the 6746 // server regardless of whether the field is empty or not. This may be 6747 // used to include empty fields in Patch requests. 6748 ForceSendFields []string `json:"-"` 6749 6750 // NullFields is a list of field names (e.g. "OutputConfig") to include 6751 // in API requests with the JSON null value. By default, fields with 6752 // empty values are omitted from API requests. However, any field with 6753 // an empty value appearing in NullFields will be sent to the server as 6754 // null. It is an error if a field in this list has a non-empty value. 6755 // This may be used to include null fields in Patch requests. 6756 NullFields []string `json:"-"` 6757} 6758 6759func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { 6760 type NoMethod GooglePrivacyDlpV2SaveFindings 6761 raw := NoMethod(*s) 6762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6763} 6764 6765// GooglePrivacyDlpV2Schedule: Schedule for triggeredJobs. 6766type GooglePrivacyDlpV2Schedule struct { 6767 // RecurrencePeriodDuration: With this option a job is started a regular 6768 // periodic basis. For example: every day (86400 seconds). A scheduled 6769 // start time will be skipped if the previous execution has not ended 6770 // when its scheduled time occurs. This value must be set to a time 6771 // duration greater than or equal to 1 day and can be no longer than 60 6772 // days. 6773 RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` 6774 6775 // ForceSendFields is a list of field names (e.g. 6776 // "RecurrencePeriodDuration") to unconditionally include in API 6777 // requests. By default, fields with empty values are omitted from API 6778 // requests. However, any non-pointer, non-interface field appearing in 6779 // ForceSendFields will be sent to the server regardless of whether the 6780 // field is empty or not. This may be used to include empty fields in 6781 // Patch requests. 6782 ForceSendFields []string `json:"-"` 6783 6784 // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") 6785 // to include in API requests with the JSON null value. By default, 6786 // fields with empty values are omitted from API requests. However, any 6787 // field with an empty value appearing in NullFields will be sent to the 6788 // server as null. It is an error if a field in this list has a 6789 // non-empty value. This may be used to include null fields in Patch 6790 // requests. 6791 NullFields []string `json:"-"` 6792} 6793 6794func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { 6795 type NoMethod GooglePrivacyDlpV2Schedule 6796 raw := NoMethod(*s) 6797 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6798} 6799 6800// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing 6801// statistical information on the relative frequency of different 6802// quasi-identifiers values. It has one or several quasi-identifiers 6803// columns, and one column that indicates the relative frequency of each 6804// quasi-identifier tuple. If a tuple is present in the data but not in 6805// the auxiliary table, the corresponding relative frequency is assumed 6806// to be zero (and thus, the tuple is highly reidentifiable). 6807type GooglePrivacyDlpV2StatisticalTable struct { 6808 // QuasiIds: Required. Quasi-identifier columns. 6809 QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` 6810 6811 // RelativeFrequency: Required. The relative frequency column must 6812 // contain a floating-point number between 0 and 1 (inclusive). Null 6813 // values are assumed to be zero. 6814 RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` 6815 6816 // Table: Required. Auxiliary table location. 6817 Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` 6818 6819 // ForceSendFields is a list of field names (e.g. "QuasiIds") to 6820 // unconditionally include in API requests. By default, fields with 6821 // empty values are omitted from API requests. However, any non-pointer, 6822 // non-interface field appearing in ForceSendFields will be sent to the 6823 // server regardless of whether the field is empty or not. This may be 6824 // used to include empty fields in Patch requests. 6825 ForceSendFields []string `json:"-"` 6826 6827 // NullFields is a list of field names (e.g. "QuasiIds") to include in 6828 // API requests with the JSON null value. By default, fields with empty 6829 // values are omitted from API requests. However, any field with an 6830 // empty value appearing in NullFields will be sent to the server as 6831 // null. It is an error if a field in this list has a non-empty value. 6832 // This may be used to include null fields in Patch requests. 6833 NullFields []string `json:"-"` 6834} 6835 6836func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { 6837 type NoMethod GooglePrivacyDlpV2StatisticalTable 6838 raw := NoMethod(*s) 6839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6840} 6841 6842// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud 6843// storage type. 6844type GooglePrivacyDlpV2StorageConfig struct { 6845 // BigQueryOptions: BigQuery options. 6846 BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` 6847 6848 // CloudStorageOptions: Google Cloud Storage options. 6849 CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` 6850 6851 // DatastoreOptions: Google Cloud Datastore options. 6852 DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` 6853 6854 // HybridOptions: Hybrid inspection options. Early access feature is in 6855 // a pre-release state and might change or have limited support. For 6856 // more information, see 6857 // https://cloud.google.com/products#product-launch-stages. 6858 HybridOptions *GooglePrivacyDlpV2HybridOptions `json:"hybridOptions,omitempty"` 6859 6860 TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` 6861 6862 // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to 6863 // unconditionally include in API requests. By default, fields with 6864 // empty values are omitted from API requests. However, any non-pointer, 6865 // non-interface field appearing in ForceSendFields will be sent to the 6866 // server regardless of whether the field is empty or not. This may be 6867 // used to include empty fields in Patch requests. 6868 ForceSendFields []string `json:"-"` 6869 6870 // NullFields is a list of field names (e.g. "BigQueryOptions") to 6871 // include in API requests with the JSON null value. By default, fields 6872 // with empty values are omitted from API requests. However, any field 6873 // with an empty value appearing in NullFields will be sent to the 6874 // server as null. It is an error if a field in this list has a 6875 // non-empty value. This may be used to include null fields in Patch 6876 // requests. 6877 NullFields []string `json:"-"` 6878} 6879 6880func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { 6881 type NoMethod GooglePrivacyDlpV2StorageConfig 6882 raw := NoMethod(*s) 6883 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6884} 6885 6886// GooglePrivacyDlpV2StorageMetadataLabel: Storage metadata label to 6887// indicate which metadata entry contains findings. 6888type GooglePrivacyDlpV2StorageMetadataLabel struct { 6889 Key string `json:"key,omitempty"` 6890 6891 // ForceSendFields is a list of field names (e.g. "Key") to 6892 // unconditionally include in API requests. By default, fields with 6893 // empty values are omitted from API requests. However, any non-pointer, 6894 // non-interface field appearing in ForceSendFields will be sent to the 6895 // server regardless of whether the field is empty or not. This may be 6896 // used to include empty fields in Patch requests. 6897 ForceSendFields []string `json:"-"` 6898 6899 // NullFields is a list of field names (e.g. "Key") to include in API 6900 // requests with the JSON null value. By default, fields with empty 6901 // values are omitted from API requests. However, any field with an 6902 // empty value appearing in NullFields will be sent to the server as 6903 // null. It is an error if a field in this list has a non-empty value. 6904 // This may be used to include null fields in Patch requests. 6905 NullFields []string `json:"-"` 6906} 6907 6908func (s *GooglePrivacyDlpV2StorageMetadataLabel) MarshalJSON() ([]byte, error) { 6909 type NoMethod GooglePrivacyDlpV2StorageMetadataLabel 6910 raw := NoMethod(*s) 6911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6912} 6913 6914// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message 6915// that contains information about the current version and any pending 6916// updates. 6917type GooglePrivacyDlpV2StoredInfoType struct { 6918 // CurrentVersion: Current version of the stored info type. 6919 CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` 6920 6921 // Name: Resource name. 6922 Name string `json:"name,omitempty"` 6923 6924 // PendingVersions: Pending versions of the stored info type. Empty if 6925 // no versions are pending. 6926 PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` 6927 6928 // ServerResponse contains the HTTP response code and headers from the 6929 // server. 6930 googleapi.ServerResponse `json:"-"` 6931 6932 // ForceSendFields is a list of field names (e.g. "CurrentVersion") to 6933 // unconditionally include in API requests. By default, fields with 6934 // empty values are omitted from API requests. However, any non-pointer, 6935 // non-interface field appearing in ForceSendFields will be sent to the 6936 // server regardless of whether the field is empty or not. This may be 6937 // used to include empty fields in Patch requests. 6938 ForceSendFields []string `json:"-"` 6939 6940 // NullFields is a list of field names (e.g. "CurrentVersion") to 6941 // include in API requests with the JSON null value. By default, fields 6942 // with empty values are omitted from API requests. However, any field 6943 // with an empty value appearing in NullFields will be sent to the 6944 // server as null. It is an error if a field in this list has a 6945 // non-empty value. This may be used to include null fields in Patch 6946 // requests. 6947 NullFields []string `json:"-"` 6948} 6949 6950func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { 6951 type NoMethod GooglePrivacyDlpV2StoredInfoType 6952 raw := NoMethod(*s) 6953 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6954} 6955 6956// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for stored 6957// infoTypes. All fields and subfield are provided by the user. For more 6958// information, see 6959// https://cloud.google.com/dlp/docs/creating-custom-infotypes. 6960type GooglePrivacyDlpV2StoredInfoTypeConfig struct { 6961 // Description: Description of the StoredInfoType (max 256 characters). 6962 Description string `json:"description,omitempty"` 6963 6964 // Dictionary: Store dictionary-based CustomInfoType. 6965 Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` 6966 6967 // DisplayName: Display name of the StoredInfoType (max 256 characters). 6968 DisplayName string `json:"displayName,omitempty"` 6969 6970 // LargeCustomDictionary: StoredInfoType where findings are defined by a 6971 // dictionary of phrases. 6972 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` 6973 6974 // Regex: Store regular expression-based StoredInfoType. 6975 Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` 6976 6977 // ForceSendFields is a list of field names (e.g. "Description") to 6978 // unconditionally include in API requests. By default, fields with 6979 // empty values are omitted from API requests. However, any non-pointer, 6980 // non-interface field appearing in ForceSendFields will be sent to the 6981 // server regardless of whether the field is empty or not. This may be 6982 // used to include empty fields in Patch requests. 6983 ForceSendFields []string `json:"-"` 6984 6985 // NullFields is a list of field names (e.g. "Description") to include 6986 // in API requests with the JSON null value. By default, fields with 6987 // empty values are omitted from API requests. However, any field with 6988 // an empty value appearing in NullFields will be sent to the server as 6989 // null. It is an error if a field in this list has a non-empty value. 6990 // This may be used to include null fields in Patch requests. 6991 NullFields []string `json:"-"` 6992} 6993 6994func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { 6995 type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig 6996 raw := NoMethod(*s) 6997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6998} 6999 7000// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a 7001// StoredInfoType. 7002type GooglePrivacyDlpV2StoredInfoTypeStats struct { 7003 // LargeCustomDictionary: StoredInfoType where findings are defined by a 7004 // dictionary of phrases. 7005 LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` 7006 7007 // ForceSendFields is a list of field names (e.g. 7008 // "LargeCustomDictionary") to unconditionally include in API requests. 7009 // By default, fields with empty values are omitted from API requests. 7010 // However, any non-pointer, non-interface field appearing in 7011 // ForceSendFields will be sent to the server regardless of whether the 7012 // field is empty or not. This may be used to include empty fields in 7013 // Patch requests. 7014 ForceSendFields []string `json:"-"` 7015 7016 // NullFields is a list of field names (e.g. "LargeCustomDictionary") to 7017 // include in API requests with the JSON null value. By default, fields 7018 // with empty values are omitted from API requests. However, any field 7019 // with an empty value appearing in NullFields will be sent to the 7020 // server as null. It is an error if a field in this list has a 7021 // non-empty value. This may be used to include null fields in Patch 7022 // requests. 7023 NullFields []string `json:"-"` 7024} 7025 7026func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { 7027 type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats 7028 raw := NoMethod(*s) 7029 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7030} 7031 7032// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, 7033// including the configuration used to build it, create timestamp, and 7034// current state. 7035type GooglePrivacyDlpV2StoredInfoTypeVersion struct { 7036 // Config: StoredInfoType configuration. 7037 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7038 7039 // CreateTime: Create timestamp of the version. Read-only, determined by 7040 // the system when the version is created. 7041 CreateTime string `json:"createTime,omitempty"` 7042 7043 // Errors: Errors that occurred when creating this storedInfoType 7044 // version, or anomalies detected in the storedInfoType data that render 7045 // it unusable. Only the five most recent errors will be displayed, with 7046 // the most recent error appearing first. For example, some of the data 7047 // for stored custom dictionaries is put in the user's Google Cloud 7048 // Storage bucket, and if this data is modified or deleted by the user 7049 // or another system, the dictionary becomes invalid. If any errors 7050 // occur, fix the problem indicated by the error message and use the 7051 // UpdateStoredInfoType API method to create another version of the 7052 // storedInfoType to continue using it, reusing the same `config` if it 7053 // was not the source of the error. 7054 Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` 7055 7056 // State: Stored info type version state. Read-only, updated by the 7057 // system during dictionary creation. 7058 // 7059 // Possible values: 7060 // "STORED_INFO_TYPE_STATE_UNSPECIFIED" - Unused 7061 // "PENDING" - StoredInfoType version is being created. 7062 // "READY" - StoredInfoType version is ready for use. 7063 // "FAILED" - StoredInfoType creation failed. All relevant error 7064 // messages are returned in the `StoredInfoTypeVersion` message. 7065 // "INVALID" - StoredInfoType is no longer valid because artifacts 7066 // stored in user-controlled storage were modified. To fix an invalid 7067 // StoredInfoType, use the `UpdateStoredInfoType` method to create a new 7068 // version. 7069 State string `json:"state,omitempty"` 7070 7071 // Stats: Statistics about this storedInfoType version. 7072 Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` 7073 7074 // ForceSendFields is a list of field names (e.g. "Config") to 7075 // unconditionally include in API requests. By default, fields with 7076 // empty values are omitted from API requests. However, any non-pointer, 7077 // non-interface field appearing in ForceSendFields will be sent to the 7078 // server regardless of whether the field is empty or not. This may be 7079 // used to include empty fields in Patch requests. 7080 ForceSendFields []string `json:"-"` 7081 7082 // NullFields is a list of field names (e.g. "Config") to include in API 7083 // requests with the JSON null value. By default, fields with empty 7084 // values are omitted from API requests. However, any field with an 7085 // empty value appearing in NullFields will be sent to the server as 7086 // null. It is an error if a field in this list has a non-empty value. 7087 // This may be used to include null fields in Patch requests. 7088 NullFields []string `json:"-"` 7089} 7090 7091func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { 7092 type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion 7093 raw := NoMethod(*s) 7094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7095} 7096 7097// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use 7098// with scanning. 7099type GooglePrivacyDlpV2StoredType struct { 7100 // CreateTime: Timestamp indicating when the version of the 7101 // `StoredInfoType` used for inspection was created. Output-only field, 7102 // populated by the system. 7103 CreateTime string `json:"createTime,omitempty"` 7104 7105 // Name: Resource name of the requested `StoredInfoType`, for example 7106 // `organizations/433245324/storedInfoTypes/432452342` or 7107 // `projects/project-id/storedInfoTypes/432452342`. 7108 Name string `json:"name,omitempty"` 7109 7110 // ForceSendFields is a list of field names (e.g. "CreateTime") to 7111 // unconditionally include in API requests. By default, fields with 7112 // empty values are omitted from API requests. However, any non-pointer, 7113 // non-interface field appearing in ForceSendFields will be sent to the 7114 // server regardless of whether the field is empty or not. This may be 7115 // used to include empty fields in Patch requests. 7116 ForceSendFields []string `json:"-"` 7117 7118 // NullFields is a list of field names (e.g. "CreateTime") to include in 7119 // API requests with the JSON null value. By default, fields with empty 7120 // values are omitted from API requests. However, any field with an 7121 // empty value appearing in NullFields will be sent to the server as 7122 // null. It is an error if a field in this list has a non-empty value. 7123 // This may be used to include null fields in Patch requests. 7124 NullFields []string `json:"-"` 7125} 7126 7127func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { 7128 type NoMethod GooglePrivacyDlpV2StoredType 7129 raw := NoMethod(*s) 7130 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7131} 7132 7133// GooglePrivacyDlpV2SummaryResult: A collection that informs the user 7134// the number of times a particular `TransformationResultCode` and error 7135// details occurred. 7136type GooglePrivacyDlpV2SummaryResult struct { 7137 // Code: Outcome of the transformation. 7138 // 7139 // Possible values: 7140 // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - Unused 7141 // "SUCCESS" - Transformation completed without an error. 7142 // "ERROR" - Transformation had an error. 7143 Code string `json:"code,omitempty"` 7144 7145 // Count: Number of transformations counted by this result. 7146 Count int64 `json:"count,omitempty,string"` 7147 7148 // Details: A place for warnings or errors to show up if a 7149 // transformation didn't work as expected. 7150 Details string `json:"details,omitempty"` 7151 7152 // ForceSendFields is a list of field names (e.g. "Code") to 7153 // unconditionally include in API requests. By default, fields with 7154 // empty values are omitted from API requests. However, any non-pointer, 7155 // non-interface field appearing in ForceSendFields will be sent to the 7156 // server regardless of whether the field is empty or not. This may be 7157 // used to include empty fields in Patch requests. 7158 ForceSendFields []string `json:"-"` 7159 7160 // NullFields is a list of field names (e.g. "Code") to include in API 7161 // requests with the JSON null value. By default, fields with empty 7162 // values are omitted from API requests. However, any field with an 7163 // empty value appearing in NullFields will be sent to the server as 7164 // null. It is an error if a field in this list has a non-empty value. 7165 // This may be used to include null fields in Patch requests. 7166 NullFields []string `json:"-"` 7167} 7168 7169func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { 7170 type NoMethod GooglePrivacyDlpV2SummaryResult 7171 raw := NoMethod(*s) 7172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7173} 7174 7175// GooglePrivacyDlpV2SurrogateType: Message for detecting output from 7176// deidentification transformations such as 7177// [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/refere 7178// nce/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfi 7179// g). These types of transformations are those that perform 7180// pseudonymization, thereby producing a "surrogate" as output. This 7181// should be used in conjunction with a field on the transformation such 7182// as `surrogate_info_type`. This CustomInfoType does not support the 7183// use of `detection_rules`. 7184type GooglePrivacyDlpV2SurrogateType struct { 7185} 7186 7187// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 7188// `Value`s per request allowed. See 7189// https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table 7190// to learn more. 7191type GooglePrivacyDlpV2Table struct { 7192 // Headers: Headers of the table. 7193 Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` 7194 7195 // Rows: Rows of the table. 7196 Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` 7197 7198 // ForceSendFields is a list of field names (e.g. "Headers") to 7199 // unconditionally include in API requests. By default, fields with 7200 // empty values are omitted from API requests. However, any non-pointer, 7201 // non-interface field appearing in ForceSendFields will be sent to the 7202 // server regardless of whether the field is empty or not. This may be 7203 // used to include empty fields in Patch requests. 7204 ForceSendFields []string `json:"-"` 7205 7206 // NullFields is a list of field names (e.g. "Headers") to include in 7207 // API requests with the JSON null value. By default, fields with empty 7208 // values are omitted from API requests. However, any field with an 7209 // empty value appearing in NullFields will be sent to the server as 7210 // null. It is an error if a field in this list has a non-empty value. 7211 // This may be used to include null fields in Patch requests. 7212 NullFields []string `json:"-"` 7213} 7214 7215func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { 7216 type NoMethod GooglePrivacyDlpV2Table 7217 raw := NoMethod(*s) 7218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7219} 7220 7221// GooglePrivacyDlpV2TableLocation: Location of a finding within a 7222// table. 7223type GooglePrivacyDlpV2TableLocation struct { 7224 // RowIndex: The zero-based index of the row where the finding is 7225 // located. Only populated for resources that have a natural ordering, 7226 // not BigQuery. In BigQuery, to identify the row a finding came from, 7227 // populate BigQueryOptions.identifying_fields with your primary key 7228 // column names and when you store the findings the value of those 7229 // columns will be stored inside of Finding. 7230 RowIndex int64 `json:"rowIndex,omitempty,string"` 7231 7232 // ForceSendFields is a list of field names (e.g. "RowIndex") to 7233 // unconditionally include in API requests. By default, fields with 7234 // empty values are omitted from API requests. However, any non-pointer, 7235 // non-interface field appearing in ForceSendFields will be sent to the 7236 // server regardless of whether the field is empty or not. This may be 7237 // used to include empty fields in Patch requests. 7238 ForceSendFields []string `json:"-"` 7239 7240 // NullFields is a list of field names (e.g. "RowIndex") to include in 7241 // API requests with the JSON null value. By default, fields with empty 7242 // values are omitted from API requests. However, any field with an 7243 // empty value appearing in NullFields will be sent to the server as 7244 // null. It is an error if a field in this list has a non-empty value. 7245 // This may be used to include null fields in Patch requests. 7246 NullFields []string `json:"-"` 7247} 7248 7249func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { 7250 type NoMethod GooglePrivacyDlpV2TableLocation 7251 raw := NoMethod(*s) 7252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7253} 7254 7255// GooglePrivacyDlpV2TableOptions: Instructions regarding the table 7256// content being inspected. 7257type GooglePrivacyDlpV2TableOptions struct { 7258 // IdentifyingFields: The columns that are the primary keys for table 7259 // objects included in ContentItem. A copy of this cell's value will 7260 // stored alongside alongside each finding so that the finding can be 7261 // traced to the specific row it came from. No more than 3 may be 7262 // provided. 7263 IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` 7264 7265 // ForceSendFields is a list of field names (e.g. "IdentifyingFields") 7266 // to unconditionally include in API requests. By default, fields with 7267 // empty values are omitted from API requests. However, any non-pointer, 7268 // non-interface field appearing in ForceSendFields will be sent to the 7269 // server regardless of whether the field is empty or not. This may be 7270 // used to include empty fields in Patch requests. 7271 ForceSendFields []string `json:"-"` 7272 7273 // NullFields is a list of field names (e.g. "IdentifyingFields") to 7274 // include in API requests with the JSON null value. By default, fields 7275 // with empty values are omitted from API requests. However, any field 7276 // with an empty value appearing in NullFields will be sent to the 7277 // server as null. It is an error if a field in this list has a 7278 // non-empty value. This may be used to include null fields in Patch 7279 // requests. 7280 NullFields []string `json:"-"` 7281} 7282 7283func (s *GooglePrivacyDlpV2TableOptions) MarshalJSON() ([]byte, error) { 7284 type NoMethod GooglePrivacyDlpV2TableOptions 7285 raw := NoMethod(*s) 7286 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7287} 7288 7289// GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. 7290type GooglePrivacyDlpV2TaggedField struct { 7291 // CustomTag: A column can be tagged with a custom tag. In this case, 7292 // the user must indicate an auxiliary table that contains statistical 7293 // information on the possible values of this column (below). 7294 CustomTag string `json:"customTag,omitempty"` 7295 7296 // Field: Required. Identifies the column. 7297 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7298 7299 // Inferred: If no semantic tag is indicated, we infer the statistical 7300 // model from the distribution of values in the input data 7301 Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` 7302 7303 // InfoType: A column can be tagged with a InfoType to use the relevant 7304 // public dataset as a statistical model of population, if available. We 7305 // currently support US ZIP codes, region codes, ages and genders. To 7306 // programmatically obtain the list of supported InfoTypes, use 7307 // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. 7308 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7309 7310 // ForceSendFields is a list of field names (e.g. "CustomTag") to 7311 // unconditionally include in API requests. By default, fields with 7312 // empty values are omitted from API requests. However, any non-pointer, 7313 // non-interface field appearing in ForceSendFields will be sent to the 7314 // server regardless of whether the field is empty or not. This may be 7315 // used to include empty fields in Patch requests. 7316 ForceSendFields []string `json:"-"` 7317 7318 // NullFields is a list of field names (e.g. "CustomTag") to include in 7319 // API requests with the JSON null value. By default, fields with empty 7320 // values are omitted from API requests. However, any field with an 7321 // empty value appearing in NullFields will be sent to the server as 7322 // null. It is an error if a field in this list has a non-empty value. 7323 // This may be used to include null fields in Patch requests. 7324 NullFields []string `json:"-"` 7325} 7326 7327func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { 7328 type NoMethod GooglePrivacyDlpV2TaggedField 7329 raw := NoMethod(*s) 7330 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7331} 7332 7333// GooglePrivacyDlpV2ThrowError: Throw an error and fail the request 7334// when a transformation error occurs. 7335type GooglePrivacyDlpV2ThrowError struct { 7336} 7337 7338// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, 7339// and `TimeOfDay`, extract or preserve a portion of the value. 7340type GooglePrivacyDlpV2TimePartConfig struct { 7341 // PartToExtract: The part of the time to keep. 7342 // 7343 // Possible values: 7344 // "TIME_PART_UNSPECIFIED" - Unused 7345 // "YEAR" - [0-9999] 7346 // "MONTH" - [1-12] 7347 // "DAY_OF_MONTH" - [1-31] 7348 // "DAY_OF_WEEK" - [1-7] 7349 // "WEEK_OF_YEAR" - [1-53] 7350 // "HOUR_OF_DAY" - [0-23] 7351 PartToExtract string `json:"partToExtract,omitempty"` 7352 7353 // ForceSendFields is a list of field names (e.g. "PartToExtract") to 7354 // unconditionally include in API requests. By default, fields with 7355 // empty values are omitted from API requests. However, any non-pointer, 7356 // non-interface field appearing in ForceSendFields will be sent to the 7357 // server regardless of whether the field is empty or not. This may be 7358 // used to include empty fields in Patch requests. 7359 ForceSendFields []string `json:"-"` 7360 7361 // NullFields is a list of field names (e.g. "PartToExtract") to include 7362 // in API requests with the JSON null value. By default, fields with 7363 // empty values are omitted from API requests. However, any field with 7364 // an empty value appearing in NullFields will be sent to the server as 7365 // null. It is an error if a field in this list has a non-empty value. 7366 // This may be used to include null fields in Patch requests. 7367 NullFields []string `json:"-"` 7368} 7369 7370func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { 7371 type NoMethod GooglePrivacyDlpV2TimePartConfig 7372 raw := NoMethod(*s) 7373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7374} 7375 7376// GooglePrivacyDlpV2TimeZone: Time zone of the date time object. 7377type GooglePrivacyDlpV2TimeZone struct { 7378 // OffsetMinutes: Set only if the offset can be determined. Positive for 7379 // time ahead of UTC. E.g. For "UTC-9", this value is -540. 7380 OffsetMinutes int64 `json:"offsetMinutes,omitempty"` 7381 7382 // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to 7383 // unconditionally include in API requests. By default, fields with 7384 // empty values are omitted from API requests. However, any non-pointer, 7385 // non-interface field appearing in ForceSendFields will be sent to the 7386 // server regardless of whether the field is empty or not. This may be 7387 // used to include empty fields in Patch requests. 7388 ForceSendFields []string `json:"-"` 7389 7390 // NullFields is a list of field names (e.g. "OffsetMinutes") to include 7391 // in API requests with the JSON null value. By default, fields with 7392 // empty values are omitted from API requests. However, any field with 7393 // an empty value appearing in NullFields will be sent to the server as 7394 // null. It is an error if a field in this list has a non-empty value. 7395 // This may be used to include null fields in Patch requests. 7396 NullFields []string `json:"-"` 7397} 7398 7399func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { 7400 type NoMethod GooglePrivacyDlpV2TimeZone 7401 raw := NoMethod(*s) 7402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7403} 7404 7405// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of 7406// the items to include in scanning. Currently only supported when 7407// inspecting Google Cloud Storage and BigQuery. 7408type GooglePrivacyDlpV2TimespanConfig struct { 7409 // EnableAutoPopulationOfTimespanConfig: When the job is started by a 7410 // JobTrigger we will automatically figure out a valid start_time to 7411 // avoid scanning files that have not been modified since the last time 7412 // the JobTrigger executed. This will be based on the time of the 7413 // execution of the last run of the JobTrigger. 7414 EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` 7415 7416 // EndTime: Exclude files or rows newer than this value. If set to zero, 7417 // no upper time limit is applied. 7418 EndTime string `json:"endTime,omitempty"` 7419 7420 // StartTime: Exclude files or rows older than this value. 7421 StartTime string `json:"startTime,omitempty"` 7422 7423 // TimestampField: Specification of the field containing the timestamp 7424 // of scanned items. Used for data sources like Datastore and BigQuery. 7425 // For BigQuery: Required to filter out rows based on the given start 7426 // and end times. If not specified and the table was modified between 7427 // the given start and end times, the entire table will be scanned. The 7428 // valid data types of the timestamp field are: `INTEGER`, `DATE`, 7429 // `TIMESTAMP`, or `DATETIME` BigQuery column. For Datastore. Valid data 7430 // types of the timestamp field are: `TIMESTAMP`. Datastore entity will 7431 // be scanned if the timestamp property does not exist or its value is 7432 // empty or invalid. 7433 TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` 7434 7435 // ForceSendFields is a list of field names (e.g. 7436 // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in 7437 // API requests. By default, fields with empty values are omitted from 7438 // API requests. However, any non-pointer, non-interface field appearing 7439 // in ForceSendFields will be sent to the server regardless of whether 7440 // the field is empty or not. This may be used to include empty fields 7441 // in Patch requests. 7442 ForceSendFields []string `json:"-"` 7443 7444 // NullFields is a list of field names (e.g. 7445 // "EnableAutoPopulationOfTimespanConfig") to include in API requests 7446 // with the JSON null value. By default, fields with empty values are 7447 // omitted from API requests. However, any field with an empty value 7448 // appearing in NullFields will be sent to the server as null. It is an 7449 // error if a field in this list has a non-empty value. This may be used 7450 // to include null fields in Patch requests. 7451 NullFields []string `json:"-"` 7452} 7453 7454func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { 7455 type NoMethod GooglePrivacyDlpV2TimespanConfig 7456 raw := NoMethod(*s) 7457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7458} 7459 7460// GooglePrivacyDlpV2TransformationErrorHandling: How to handle 7461// transformation errors during de-identification. A transformation 7462// error occurs when the requested transformation is incompatible with 7463// the data. For example, trying to de-identify an IP address using a 7464// `DateShift` transformation would result in a transformation error, 7465// since date info cannot be extracted from an IP address. Information 7466// about any incompatible transformations, and how they were handled, is 7467// returned in the response as part of the `TransformationOverviews`. 7468type GooglePrivacyDlpV2TransformationErrorHandling struct { 7469 // LeaveUntransformed: Ignore errors 7470 LeaveUntransformed *GooglePrivacyDlpV2LeaveUntransformed `json:"leaveUntransformed,omitempty"` 7471 7472 // ThrowError: Throw an error 7473 ThrowError *GooglePrivacyDlpV2ThrowError `json:"throwError,omitempty"` 7474 7475 // ForceSendFields is a list of field names (e.g. "LeaveUntransformed") 7476 // to unconditionally include in API requests. By default, fields with 7477 // empty values are omitted from API requests. However, any non-pointer, 7478 // non-interface field appearing in ForceSendFields will be sent to the 7479 // server regardless of whether the field is empty or not. This may be 7480 // used to include empty fields in Patch requests. 7481 ForceSendFields []string `json:"-"` 7482 7483 // NullFields is a list of field names (e.g. "LeaveUntransformed") to 7484 // include in API requests with the JSON null value. By default, fields 7485 // with empty values are omitted from API requests. However, any field 7486 // with an empty value appearing in NullFields will be sent to the 7487 // server as null. It is an error if a field in this list has a 7488 // non-empty value. This may be used to include null fields in Patch 7489 // requests. 7490 NullFields []string `json:"-"` 7491} 7492 7493func (s *GooglePrivacyDlpV2TransformationErrorHandling) MarshalJSON() ([]byte, error) { 7494 type NoMethod GooglePrivacyDlpV2TransformationErrorHandling 7495 raw := NoMethod(*s) 7496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7497} 7498 7499// GooglePrivacyDlpV2TransformationOverview: Overview of the 7500// modifications that occurred. 7501type GooglePrivacyDlpV2TransformationOverview struct { 7502 // TransformationSummaries: Transformations applied to the dataset. 7503 TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` 7504 7505 // TransformedBytes: Total size in bytes that were transformed in some 7506 // way. 7507 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7508 7509 // ForceSendFields is a list of field names (e.g. 7510 // "TransformationSummaries") to unconditionally include in API 7511 // requests. By default, fields with empty values are omitted from API 7512 // requests. However, any non-pointer, non-interface field appearing in 7513 // ForceSendFields will be sent to the server regardless of whether the 7514 // field is empty or not. This may be used to include empty fields in 7515 // Patch requests. 7516 ForceSendFields []string `json:"-"` 7517 7518 // NullFields is a list of field names (e.g. "TransformationSummaries") 7519 // to include in API requests with the JSON null value. By default, 7520 // fields with empty values are omitted from API requests. However, any 7521 // field with an empty value appearing in NullFields will be sent to the 7522 // server as null. It is an error if a field in this list has a 7523 // non-empty value. This may be used to include null fields in Patch 7524 // requests. 7525 NullFields []string `json:"-"` 7526} 7527 7528func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { 7529 type NoMethod GooglePrivacyDlpV2TransformationOverview 7530 raw := NoMethod(*s) 7531 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7532} 7533 7534// GooglePrivacyDlpV2TransformationSummary: Summary of a single 7535// transformation. Only one of 'transformation', 'field_transformation', 7536// or 'record_suppress' will be set. 7537type GooglePrivacyDlpV2TransformationSummary struct { 7538 // Field: Set if the transformation was limited to a specific FieldId. 7539 Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` 7540 7541 // FieldTransformations: The field transformation that was applied. If 7542 // multiple field transformations are requested for a single field, this 7543 // list will contain all of them; otherwise, only one is supplied. 7544 FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` 7545 7546 // InfoType: Set if the transformation was limited to a specific 7547 // InfoType. 7548 InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` 7549 7550 // RecordSuppress: The specific suppression option these stats apply to. 7551 RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` 7552 7553 // Results: Collection of all transformations that took place or had an 7554 // error. 7555 Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` 7556 7557 // Transformation: The specific transformation these stats apply to. 7558 Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` 7559 7560 // TransformedBytes: Total size in bytes that were transformed in some 7561 // way. 7562 TransformedBytes int64 `json:"transformedBytes,omitempty,string"` 7563 7564 // ForceSendFields is a list of field names (e.g. "Field") to 7565 // unconditionally include in API requests. By default, fields with 7566 // empty values are omitted from API requests. However, any non-pointer, 7567 // non-interface field appearing in ForceSendFields will be sent to the 7568 // server regardless of whether the field is empty or not. This may be 7569 // used to include empty fields in Patch requests. 7570 ForceSendFields []string `json:"-"` 7571 7572 // NullFields is a list of field names (e.g. "Field") to include in API 7573 // requests with the JSON null value. By default, fields with empty 7574 // values are omitted from API requests. However, any field with an 7575 // empty value appearing in NullFields will be sent to the server as 7576 // null. It is an error if a field in this list has a non-empty value. 7577 // This may be used to include null fields in Patch requests. 7578 NullFields []string `json:"-"` 7579} 7580 7581func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { 7582 type NoMethod GooglePrivacyDlpV2TransformationSummary 7583 raw := NoMethod(*s) 7584 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7585} 7586 7587// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data 7588// crypto key generated. It will be discarded after the request 7589// finishes. 7590type GooglePrivacyDlpV2TransientCryptoKey struct { 7591 // Name: Required. Name of the key. This is an arbitrary string used to 7592 // differentiate different keys. A unique key is generated per name: two 7593 // separate `TransientCryptoKey` protos share the same generated key if 7594 // their names are the same. When the data crypto key is generated, this 7595 // name is not used in any way (repeating the api call will result in a 7596 // different key being generated). 7597 Name string `json:"name,omitempty"` 7598 7599 // ForceSendFields is a list of field names (e.g. "Name") to 7600 // unconditionally include in API requests. By default, fields with 7601 // empty values are omitted from API requests. However, any non-pointer, 7602 // non-interface field appearing in ForceSendFields will be sent to the 7603 // server regardless of whether the field is empty or not. This may be 7604 // used to include empty fields in Patch requests. 7605 ForceSendFields []string `json:"-"` 7606 7607 // NullFields is a list of field names (e.g. "Name") to include in API 7608 // requests with the JSON null value. By default, fields with empty 7609 // values are omitted from API requests. However, any field with an 7610 // empty value appearing in NullFields will be sent to the server as 7611 // null. It is an error if a field in this list has a non-empty value. 7612 // This may be used to include null fields in Patch requests. 7613 NullFields []string `json:"-"` 7614} 7615 7616func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { 7617 type NoMethod GooglePrivacyDlpV2TransientCryptoKey 7618 raw := NoMethod(*s) 7619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7620} 7621 7622// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to 7623// be started. 7624type GooglePrivacyDlpV2Trigger struct { 7625 // Manual: For use with hybrid jobs. Jobs must be manually created and 7626 // finished. Early access feature is in a pre-release state and might 7627 // change or have limited support. For more information, see 7628 // https://cloud.google.com/products#product-launch-stages. 7629 Manual *GooglePrivacyDlpV2Manual `json:"manual,omitempty"` 7630 7631 // Schedule: Create a job on a repeating basis based on the elapse of 7632 // time. 7633 Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` 7634 7635 // ForceSendFields is a list of field names (e.g. "Manual") to 7636 // unconditionally include in API requests. By default, fields with 7637 // empty values are omitted from API requests. However, any non-pointer, 7638 // non-interface field appearing in ForceSendFields will be sent to the 7639 // server regardless of whether the field is empty or not. This may be 7640 // used to include empty fields in Patch requests. 7641 ForceSendFields []string `json:"-"` 7642 7643 // NullFields is a list of field names (e.g. "Manual") to include in API 7644 // requests with the JSON null value. By default, fields with empty 7645 // values are omitted from API requests. However, any field with an 7646 // empty value appearing in NullFields will be sent to the server as 7647 // null. It is an error if a field in this list has a non-empty value. 7648 // This may be used to include null fields in Patch requests. 7649 NullFields []string `json:"-"` 7650} 7651 7652func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { 7653 type NoMethod GooglePrivacyDlpV2Trigger 7654 raw := NoMethod(*s) 7655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7656} 7657 7658// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to 7659// security risks due to accidentally leaking the key. Choose another 7660// type of key if possible. 7661type GooglePrivacyDlpV2UnwrappedCryptoKey struct { 7662 // Key: Required. A 128/192/256 bit key. 7663 Key string `json:"key,omitempty"` 7664 7665 // ForceSendFields is a list of field names (e.g. "Key") to 7666 // unconditionally include in API requests. By default, fields with 7667 // empty values are omitted from API requests. However, any non-pointer, 7668 // non-interface field appearing in ForceSendFields will be sent to the 7669 // server regardless of whether the field is empty or not. This may be 7670 // used to include empty fields in Patch requests. 7671 ForceSendFields []string `json:"-"` 7672 7673 // NullFields is a list of field names (e.g. "Key") to include in API 7674 // requests with the JSON null value. By default, fields with empty 7675 // values are omitted from API requests. However, any field with an 7676 // empty value appearing in NullFields will be sent to the server as 7677 // null. It is an error if a field in this list has a non-empty value. 7678 // This may be used to include null fields in Patch requests. 7679 NullFields []string `json:"-"` 7680} 7681 7682func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { 7683 type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey 7684 raw := NoMethod(*s) 7685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7686} 7687 7688// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message 7689// for UpdateDeidentifyTemplate. 7690type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { 7691 // DeidentifyTemplate: New DeidentifyTemplate value. 7692 DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` 7693 7694 // UpdateMask: Mask to control which fields get updated. 7695 UpdateMask string `json:"updateMask,omitempty"` 7696 7697 // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") 7698 // to unconditionally include in API requests. By default, fields with 7699 // empty values are omitted from API requests. However, any non-pointer, 7700 // non-interface field appearing in ForceSendFields will be sent to the 7701 // server regardless of whether the field is empty or not. This may be 7702 // used to include empty fields in Patch requests. 7703 ForceSendFields []string `json:"-"` 7704 7705 // NullFields is a list of field names (e.g. "DeidentifyTemplate") to 7706 // include in API requests with the JSON null value. By default, fields 7707 // with empty values are omitted from API requests. However, any field 7708 // with an empty value appearing in NullFields will be sent to the 7709 // server as null. It is an error if a field in this list has a 7710 // non-empty value. This may be used to include null fields in Patch 7711 // requests. 7712 NullFields []string `json:"-"` 7713} 7714 7715func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { 7716 type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 7717 raw := NoMethod(*s) 7718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7719} 7720 7721// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for 7722// UpdateInspectTemplate. 7723type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { 7724 // InspectTemplate: New InspectTemplate value. 7725 InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` 7726 7727 // UpdateMask: Mask to control which fields get updated. 7728 UpdateMask string `json:"updateMask,omitempty"` 7729 7730 // ForceSendFields is a list of field names (e.g. "InspectTemplate") to 7731 // unconditionally include in API requests. By default, fields with 7732 // empty values are omitted from API requests. However, any non-pointer, 7733 // non-interface field appearing in ForceSendFields will be sent to the 7734 // server regardless of whether the field is empty or not. This may be 7735 // used to include empty fields in Patch requests. 7736 ForceSendFields []string `json:"-"` 7737 7738 // NullFields is a list of field names (e.g. "InspectTemplate") to 7739 // include in API requests with the JSON null value. By default, fields 7740 // with empty values are omitted from API requests. However, any field 7741 // with an empty value appearing in NullFields will be sent to the 7742 // server as null. It is an error if a field in this list has a 7743 // non-empty value. This may be used to include null fields in Patch 7744 // requests. 7745 NullFields []string `json:"-"` 7746} 7747 7748func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { 7749 type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest 7750 raw := NoMethod(*s) 7751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7752} 7753 7754// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for 7755// UpdateJobTrigger. 7756type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { 7757 // JobTrigger: New JobTrigger value. 7758 JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` 7759 7760 // UpdateMask: Mask to control which fields get updated. 7761 UpdateMask string `json:"updateMask,omitempty"` 7762 7763 // ForceSendFields is a list of field names (e.g. "JobTrigger") to 7764 // unconditionally include in API requests. By default, fields with 7765 // empty values are omitted from API requests. However, any non-pointer, 7766 // non-interface field appearing in ForceSendFields will be sent to the 7767 // server regardless of whether the field is empty or not. This may be 7768 // used to include empty fields in Patch requests. 7769 ForceSendFields []string `json:"-"` 7770 7771 // NullFields is a list of field names (e.g. "JobTrigger") to include in 7772 // API requests with the JSON null value. By default, fields with empty 7773 // values are omitted from API requests. However, any field with an 7774 // empty value appearing in NullFields will be sent to the server as 7775 // null. It is an error if a field in this list has a non-empty value. 7776 // This may be used to include null fields in Patch requests. 7777 NullFields []string `json:"-"` 7778} 7779 7780func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { 7781 type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest 7782 raw := NoMethod(*s) 7783 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7784} 7785 7786// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for 7787// UpdateStoredInfoType. 7788type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { 7789 // Config: Updated configuration for the storedInfoType. If not 7790 // provided, a new version of the storedInfoType will be created with 7791 // the existing configuration. 7792 Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` 7793 7794 // UpdateMask: Mask to control which fields get updated. 7795 UpdateMask string `json:"updateMask,omitempty"` 7796 7797 // ForceSendFields is a list of field names (e.g. "Config") to 7798 // unconditionally include in API requests. By default, fields with 7799 // empty values are omitted from API requests. However, any non-pointer, 7800 // non-interface field appearing in ForceSendFields will be sent to the 7801 // server regardless of whether the field is empty or not. This may be 7802 // used to include empty fields in Patch requests. 7803 ForceSendFields []string `json:"-"` 7804 7805 // NullFields is a list of field names (e.g. "Config") to include in API 7806 // requests with the JSON null value. By default, fields with empty 7807 // values are omitted from API requests. However, any field with an 7808 // empty value appearing in NullFields will be sent to the server as 7809 // null. It is an error if a field in this list has a non-empty value. 7810 // This may be used to include null fields in Patch requests. 7811 NullFields []string `json:"-"` 7812} 7813 7814func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { 7815 type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 7816 raw := NoMethod(*s) 7817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7818} 7819 7820// GooglePrivacyDlpV2Value: Set of primitive values supported by the 7821// system. Note that for the purposes of inspection or transformation, 7822// the number of bytes considered to comprise a 'Value' is based on its 7823// representation as a UTF-8 encoded string. For example, if 7824// 'integer_value' is set to 123456789, the number of bytes would be 7825// counted as 9, even though an int64 only holds up to 8 bytes of data. 7826type GooglePrivacyDlpV2Value struct { 7827 // BooleanValue: boolean 7828 BooleanValue bool `json:"booleanValue,omitempty"` 7829 7830 // DateValue: date 7831 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 7832 7833 // DayOfWeekValue: day of week 7834 // 7835 // Possible values: 7836 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 7837 // "MONDAY" - Monday 7838 // "TUESDAY" - Tuesday 7839 // "WEDNESDAY" - Wednesday 7840 // "THURSDAY" - Thursday 7841 // "FRIDAY" - Friday 7842 // "SATURDAY" - Saturday 7843 // "SUNDAY" - Sunday 7844 DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` 7845 7846 // FloatValue: float 7847 FloatValue float64 `json:"floatValue,omitempty"` 7848 7849 // IntegerValue: integer 7850 IntegerValue int64 `json:"integerValue,omitempty,string"` 7851 7852 // StringValue: string 7853 StringValue string `json:"stringValue,omitempty"` 7854 7855 // TimeValue: time of day 7856 TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` 7857 7858 // TimestampValue: timestamp 7859 TimestampValue string `json:"timestampValue,omitempty"` 7860 7861 // ForceSendFields is a list of field names (e.g. "BooleanValue") to 7862 // unconditionally include in API requests. By default, fields with 7863 // empty values are omitted from API requests. However, any non-pointer, 7864 // non-interface field appearing in ForceSendFields will be sent to the 7865 // server regardless of whether the field is empty or not. This may be 7866 // used to include empty fields in Patch requests. 7867 ForceSendFields []string `json:"-"` 7868 7869 // NullFields is a list of field names (e.g. "BooleanValue") to include 7870 // in API requests with the JSON null value. By default, fields with 7871 // empty values are omitted from API requests. However, any field with 7872 // an empty value appearing in NullFields will be sent to the server as 7873 // null. It is an error if a field in this list has a non-empty value. 7874 // This may be used to include null fields in Patch requests. 7875 NullFields []string `json:"-"` 7876} 7877 7878func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { 7879 type NoMethod GooglePrivacyDlpV2Value 7880 raw := NoMethod(*s) 7881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7882} 7883 7884func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { 7885 type NoMethod GooglePrivacyDlpV2Value 7886 var s1 struct { 7887 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 7888 *NoMethod 7889 } 7890 s1.NoMethod = (*NoMethod)(s) 7891 if err := json.Unmarshal(data, &s1); err != nil { 7892 return err 7893 } 7894 s.FloatValue = float64(s1.FloatValue) 7895 return nil 7896} 7897 7898// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its 7899// frequency. 7900type GooglePrivacyDlpV2ValueFrequency struct { 7901 // Count: How many times the value is contained in the field. 7902 Count int64 `json:"count,omitempty,string"` 7903 7904 // Value: A value contained in the field in question. 7905 Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` 7906 7907 // ForceSendFields is a list of field names (e.g. "Count") to 7908 // unconditionally include in API requests. By default, fields with 7909 // empty values are omitted from API requests. However, any non-pointer, 7910 // non-interface field appearing in ForceSendFields will be sent to the 7911 // server regardless of whether the field is empty or not. This may be 7912 // used to include empty fields in Patch requests. 7913 ForceSendFields []string `json:"-"` 7914 7915 // NullFields is a list of field names (e.g. "Count") to include in API 7916 // requests with the JSON null value. By default, fields with empty 7917 // values are omitted from API requests. However, any field with an 7918 // empty value appearing in NullFields will be sent to the server as 7919 // null. It is an error if a field in this list has a non-empty value. 7920 // This may be used to include null fields in Patch requests. 7921 NullFields []string `json:"-"` 7922} 7923 7924func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { 7925 type NoMethod GooglePrivacyDlpV2ValueFrequency 7926 raw := NoMethod(*s) 7927 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7928} 7929 7930// GooglePrivacyDlpV2WordList: Message defining a list of words or 7931// phrases to search for in the data. 7932type GooglePrivacyDlpV2WordList struct { 7933 // Words: Words or phrases defining the dictionary. The dictionary must 7934 // contain at least one phrase and every phrase must contain at least 2 7935 // characters that are letters or digits. [required] 7936 Words []string `json:"words,omitempty"` 7937 7938 // ForceSendFields is a list of field names (e.g. "Words") to 7939 // unconditionally include in API requests. By default, fields with 7940 // empty values are omitted from API requests. However, any non-pointer, 7941 // non-interface field appearing in ForceSendFields will be sent to the 7942 // server regardless of whether the field is empty or not. This may be 7943 // used to include empty fields in Patch requests. 7944 ForceSendFields []string `json:"-"` 7945 7946 // NullFields is a list of field names (e.g. "Words") to include in API 7947 // requests with the JSON null value. By default, fields with empty 7948 // values are omitted from API requests. However, any field with an 7949 // empty value appearing in NullFields will be sent to the server as 7950 // null. It is an error if a field in this list has a non-empty value. 7951 // This may be used to include null fields in Patch requests. 7952 NullFields []string `json:"-"` 7953} 7954 7955func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { 7956 type NoMethod GooglePrivacyDlpV2WordList 7957 raw := NoMethod(*s) 7958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7959} 7960 7961// GoogleProtobufEmpty: A generic empty message that you can re-use to 7962// avoid defining duplicated empty messages in your APIs. A typical 7963// example is to use it as the request or the response type of an API 7964// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) 7965// returns (google.protobuf.Empty); } The JSON representation for 7966// `Empty` is empty JSON object `{}`. 7967type GoogleProtobufEmpty struct { 7968 // ServerResponse contains the HTTP response code and headers from the 7969 // server. 7970 googleapi.ServerResponse `json:"-"` 7971} 7972 7973// GoogleRpcStatus: The `Status` type defines a logical error model that 7974// is suitable for different programming environments, including REST 7975// APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). 7976// Each `Status` message contains three pieces of data: error code, 7977// error message, and error details. You can find out more about this 7978// error model and how to work with it in the [API Design 7979// Guide](https://cloud.google.com/apis/design/errors). 7980type GoogleRpcStatus struct { 7981 // Code: The status code, which should be an enum value of 7982 // google.rpc.Code. 7983 Code int64 `json:"code,omitempty"` 7984 7985 // Details: A list of messages that carry the error details. There is a 7986 // common set of message types for APIs to use. 7987 Details []googleapi.RawMessage `json:"details,omitempty"` 7988 7989 // Message: A developer-facing error message, which should be in 7990 // English. Any user-facing error message should be localized and sent 7991 // in the google.rpc.Status.details field, or localized by the client. 7992 Message string `json:"message,omitempty"` 7993 7994 // ForceSendFields is a list of field names (e.g. "Code") to 7995 // unconditionally include in API requests. By default, fields with 7996 // empty values are omitted from API requests. However, any non-pointer, 7997 // non-interface field appearing in ForceSendFields will be sent to the 7998 // server regardless of whether the field is empty or not. This may be 7999 // used to include empty fields in Patch requests. 8000 ForceSendFields []string `json:"-"` 8001 8002 // NullFields is a list of field names (e.g. "Code") to include in API 8003 // requests with the JSON null value. By default, fields with empty 8004 // values are omitted from API requests. However, any field with an 8005 // empty value appearing in NullFields will be sent to the server as 8006 // null. It is an error if a field in this list has a non-empty value. 8007 // This may be used to include null fields in Patch requests. 8008 NullFields []string `json:"-"` 8009} 8010 8011func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 8012 type NoMethod GoogleRpcStatus 8013 raw := NoMethod(*s) 8014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8015} 8016 8017// GoogleTypeDate: Represents a whole or partial calendar date, e.g. a 8018// birthday. The time of day and time zone are either specified 8019// elsewhere or are not significant. The date is relative to the 8020// Proleptic Gregorian Calendar. This can represent: * A full date, with 8021// non-zero year, month and day values * A month and day value, with a 8022// zero year, e.g. an anniversary * A year on its own, with zero month 8023// and day values * A year and month value, with a zero day, e.g. a 8024// credit card expiration date Related types are google.type.TimeOfDay 8025// and `google.protobuf.Timestamp`. 8026type GoogleTypeDate struct { 8027 // Day: Day of month. Must be from 1 to 31 and valid for the year and 8028 // month, or 0 if specifying a year by itself or a year and month where 8029 // the day is not significant. 8030 Day int64 `json:"day,omitempty"` 8031 8032 // Month: Month of year. Must be from 1 to 12, or 0 if specifying a year 8033 // without a month and day. 8034 Month int64 `json:"month,omitempty"` 8035 8036 // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date 8037 // without a year. 8038 Year int64 `json:"year,omitempty"` 8039 8040 // ForceSendFields is a list of field names (e.g. "Day") to 8041 // unconditionally include in API requests. By default, fields with 8042 // empty values are omitted from API requests. However, any non-pointer, 8043 // non-interface field appearing in ForceSendFields will be sent to the 8044 // server regardless of whether the field is empty or not. This may be 8045 // used to include empty fields in Patch requests. 8046 ForceSendFields []string `json:"-"` 8047 8048 // NullFields is a list of field names (e.g. "Day") to include in API 8049 // requests with the JSON null value. By default, fields with empty 8050 // values are omitted from API requests. However, any field with an 8051 // empty value appearing in NullFields will be sent to the server as 8052 // null. It is an error if a field in this list has a non-empty value. 8053 // This may be used to include null fields in Patch requests. 8054 NullFields []string `json:"-"` 8055} 8056 8057func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 8058 type NoMethod GoogleTypeDate 8059 raw := NoMethod(*s) 8060 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8061} 8062 8063// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone 8064// are either not significant or are specified elsewhere. An API may 8065// choose to allow leap seconds. Related types are google.type.Date and 8066// `google.protobuf.Timestamp`. 8067type GoogleTypeTimeOfDay struct { 8068 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 8069 // may choose to allow the value "24:00:00" for scenarios like business 8070 // closing time. 8071 Hours int64 `json:"hours,omitempty"` 8072 8073 // Minutes: Minutes of hour of day. Must be from 0 to 59. 8074 Minutes int64 `json:"minutes,omitempty"` 8075 8076 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 8077 // 999,999,999. 8078 Nanos int64 `json:"nanos,omitempty"` 8079 8080 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 8081 // 59. An API may allow the value 60 if it allows leap-seconds. 8082 Seconds int64 `json:"seconds,omitempty"` 8083 8084 // ForceSendFields is a list of field names (e.g. "Hours") to 8085 // unconditionally include in API requests. By default, fields with 8086 // empty values are omitted from API requests. However, any non-pointer, 8087 // non-interface field appearing in ForceSendFields will be sent to the 8088 // server regardless of whether the field is empty or not. This may be 8089 // used to include empty fields in Patch requests. 8090 ForceSendFields []string `json:"-"` 8091 8092 // NullFields is a list of field names (e.g. "Hours") to include in API 8093 // requests with the JSON null value. By default, fields with empty 8094 // values are omitted from API requests. However, any field with an 8095 // empty value appearing in NullFields will be sent to the server as 8096 // null. It is an error if a field in this list has a non-empty value. 8097 // This may be used to include null fields in Patch requests. 8098 NullFields []string `json:"-"` 8099} 8100 8101func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { 8102 type NoMethod GoogleTypeTimeOfDay 8103 raw := NoMethod(*s) 8104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8105} 8106 8107// method id "dlp.infoTypes.list": 8108 8109type InfoTypesListCall struct { 8110 s *Service 8111 urlParams_ gensupport.URLParams 8112 ifNoneMatch_ string 8113 ctx_ context.Context 8114 header_ http.Header 8115} 8116 8117// List: Returns a list of the sensitive information types that the DLP 8118// API supports. See 8119// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8120func (r *InfoTypesService) List() *InfoTypesListCall { 8121 c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8122 return c 8123} 8124 8125// Filter sets the optional parameter "filter": filter to only return 8126// infoTypes supported by certain parts of the API. Defaults to 8127// supported_by=INSPECT. 8128func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { 8129 c.urlParams_.Set("filter", filter) 8130 return c 8131} 8132 8133// LanguageCode sets the optional parameter "languageCode": BCP-47 8134// language code for localized infoType friendly names. If omitted, or 8135// if localized strings are not available, en-US strings will be 8136// returned. 8137func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { 8138 c.urlParams_.Set("languageCode", languageCode) 8139 return c 8140} 8141 8142// LocationId sets the optional parameter "locationId": Deprecated. This 8143// field has no effect. 8144func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { 8145 c.urlParams_.Set("locationId", locationId) 8146 return c 8147} 8148 8149// Parent sets the optional parameter "parent": The parent resource 8150// name. The format of this value is as follows: locations/ LOCATION_ID 8151func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { 8152 c.urlParams_.Set("parent", parent) 8153 return c 8154} 8155 8156// Fields allows partial responses to be retrieved. See 8157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8158// for more information. 8159func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { 8160 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8161 return c 8162} 8163 8164// IfNoneMatch sets the optional parameter which makes the operation 8165// fail if the object's ETag matches the given value. This is useful for 8166// getting updates only after the object has changed since the last 8167// request. Use googleapi.IsNotModified to check whether the response 8168// error from Do is the result of In-None-Match. 8169func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { 8170 c.ifNoneMatch_ = entityTag 8171 return c 8172} 8173 8174// Context sets the context to be used in this call's Do method. Any 8175// pending HTTP request will be aborted if the provided context is 8176// canceled. 8177func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { 8178 c.ctx_ = ctx 8179 return c 8180} 8181 8182// Header returns an http.Header that can be modified by the caller to 8183// add HTTP headers to the request. 8184func (c *InfoTypesListCall) Header() http.Header { 8185 if c.header_ == nil { 8186 c.header_ = make(http.Header) 8187 } 8188 return c.header_ 8189} 8190 8191func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8192 reqHeaders := make(http.Header) 8193 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8194 for k, v := range c.header_ { 8195 reqHeaders[k] = v 8196 } 8197 reqHeaders.Set("User-Agent", c.s.userAgent()) 8198 if c.ifNoneMatch_ != "" { 8199 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8200 } 8201 var body io.Reader = nil 8202 c.urlParams_.Set("alt", alt) 8203 c.urlParams_.Set("prettyPrint", "false") 8204 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") 8205 urls += "?" + c.urlParams_.Encode() 8206 req, err := http.NewRequest("GET", urls, body) 8207 if err != nil { 8208 return nil, err 8209 } 8210 req.Header = reqHeaders 8211 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8212} 8213 8214// Do executes the "dlp.infoTypes.list" call. 8215// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8216// be non-nil. Any non-2xx status code is an error. Response headers are 8217// in either 8218// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8219// a response was returned at all) in error.(*googleapi.Error).Header. 8220// Use googleapi.IsNotModified to check whether the returned error was 8221// because http.StatusNotModified was returned. 8222func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8223 gensupport.SetOptions(c.urlParams_, opts...) 8224 res, err := c.doRequest("json") 8225 if res != nil && res.StatusCode == http.StatusNotModified { 8226 if res.Body != nil { 8227 res.Body.Close() 8228 } 8229 return nil, &googleapi.Error{ 8230 Code: res.StatusCode, 8231 Header: res.Header, 8232 } 8233 } 8234 if err != nil { 8235 return nil, err 8236 } 8237 defer googleapi.CloseBody(res) 8238 if err := googleapi.CheckResponse(res); err != nil { 8239 return nil, err 8240 } 8241 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8242 ServerResponse: googleapi.ServerResponse{ 8243 Header: res.Header, 8244 HTTPStatusCode: res.StatusCode, 8245 }, 8246 } 8247 target := &ret 8248 if err := gensupport.DecodeResponse(target, res); err != nil { 8249 return nil, err 8250 } 8251 return ret, nil 8252 // { 8253 // "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.", 8254 // "flatPath": "v2/infoTypes", 8255 // "httpMethod": "GET", 8256 // "id": "dlp.infoTypes.list", 8257 // "parameterOrder": [], 8258 // "parameters": { 8259 // "filter": { 8260 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8261 // "location": "query", 8262 // "type": "string" 8263 // }, 8264 // "languageCode": { 8265 // "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.", 8266 // "location": "query", 8267 // "type": "string" 8268 // }, 8269 // "locationId": { 8270 // "description": "Deprecated. This field has no effect.", 8271 // "location": "query", 8272 // "type": "string" 8273 // }, 8274 // "parent": { 8275 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8276 // "location": "query", 8277 // "type": "string" 8278 // } 8279 // }, 8280 // "path": "v2/infoTypes", 8281 // "response": { 8282 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8283 // }, 8284 // "scopes": [ 8285 // "https://www.googleapis.com/auth/cloud-platform" 8286 // ] 8287 // } 8288 8289} 8290 8291// method id "dlp.locations.infoTypes.list": 8292 8293type LocationsInfoTypesListCall struct { 8294 s *Service 8295 parent string 8296 urlParams_ gensupport.URLParams 8297 ifNoneMatch_ string 8298 ctx_ context.Context 8299 header_ http.Header 8300} 8301 8302// List: Returns a list of the sensitive information types that the DLP 8303// API supports. See 8304// https://cloud.google.com/dlp/docs/infotypes-reference to learn more. 8305func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { 8306 c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8307 c.parent = parent 8308 return c 8309} 8310 8311// Filter sets the optional parameter "filter": filter to only return 8312// infoTypes supported by certain parts of the API. Defaults to 8313// supported_by=INSPECT. 8314func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { 8315 c.urlParams_.Set("filter", filter) 8316 return c 8317} 8318 8319// LanguageCode sets the optional parameter "languageCode": BCP-47 8320// language code for localized infoType friendly names. If omitted, or 8321// if localized strings are not available, en-US strings will be 8322// returned. 8323func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { 8324 c.urlParams_.Set("languageCode", languageCode) 8325 return c 8326} 8327 8328// LocationId sets the optional parameter "locationId": Deprecated. This 8329// field has no effect. 8330func (c *LocationsInfoTypesListCall) LocationId(locationId string) *LocationsInfoTypesListCall { 8331 c.urlParams_.Set("locationId", locationId) 8332 return c 8333} 8334 8335// Fields allows partial responses to be retrieved. See 8336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8337// for more information. 8338func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { 8339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8340 return c 8341} 8342 8343// IfNoneMatch sets the optional parameter which makes the operation 8344// fail if the object's ETag matches the given value. This is useful for 8345// getting updates only after the object has changed since the last 8346// request. Use googleapi.IsNotModified to check whether the response 8347// error from Do is the result of In-None-Match. 8348func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { 8349 c.ifNoneMatch_ = entityTag 8350 return c 8351} 8352 8353// Context sets the context to be used in this call's Do method. Any 8354// pending HTTP request will be aborted if the provided context is 8355// canceled. 8356func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { 8357 c.ctx_ = ctx 8358 return c 8359} 8360 8361// Header returns an http.Header that can be modified by the caller to 8362// add HTTP headers to the request. 8363func (c *LocationsInfoTypesListCall) Header() http.Header { 8364 if c.header_ == nil { 8365 c.header_ = make(http.Header) 8366 } 8367 return c.header_ 8368} 8369 8370func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 8371 reqHeaders := make(http.Header) 8372 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8373 for k, v := range c.header_ { 8374 reqHeaders[k] = v 8375 } 8376 reqHeaders.Set("User-Agent", c.s.userAgent()) 8377 if c.ifNoneMatch_ != "" { 8378 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8379 } 8380 var body io.Reader = nil 8381 c.urlParams_.Set("alt", alt) 8382 c.urlParams_.Set("prettyPrint", "false") 8383 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/infoTypes") 8384 urls += "?" + c.urlParams_.Encode() 8385 req, err := http.NewRequest("GET", urls, body) 8386 if err != nil { 8387 return nil, err 8388 } 8389 req.Header = reqHeaders 8390 googleapi.Expand(req.URL, map[string]string{ 8391 "parent": c.parent, 8392 }) 8393 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8394} 8395 8396// Do executes the "dlp.locations.infoTypes.list" call. 8397// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will 8398// be non-nil. Any non-2xx status code is an error. Response headers are 8399// in either 8400// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if 8401// a response was returned at all) in error.(*googleapi.Error).Header. 8402// Use googleapi.IsNotModified to check whether the returned error was 8403// because http.StatusNotModified was returned. 8404func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { 8405 gensupport.SetOptions(c.urlParams_, opts...) 8406 res, err := c.doRequest("json") 8407 if res != nil && res.StatusCode == http.StatusNotModified { 8408 if res.Body != nil { 8409 res.Body.Close() 8410 } 8411 return nil, &googleapi.Error{ 8412 Code: res.StatusCode, 8413 Header: res.Header, 8414 } 8415 } 8416 if err != nil { 8417 return nil, err 8418 } 8419 defer googleapi.CloseBody(res) 8420 if err := googleapi.CheckResponse(res); err != nil { 8421 return nil, err 8422 } 8423 ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ 8424 ServerResponse: googleapi.ServerResponse{ 8425 Header: res.Header, 8426 HTTPStatusCode: res.StatusCode, 8427 }, 8428 } 8429 target := &ret 8430 if err := gensupport.DecodeResponse(target, res); err != nil { 8431 return nil, err 8432 } 8433 return ret, nil 8434 // { 8435 // "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.", 8436 // "flatPath": "v2/locations/{locationsId}/infoTypes", 8437 // "httpMethod": "GET", 8438 // "id": "dlp.locations.infoTypes.list", 8439 // "parameterOrder": [ 8440 // "parent" 8441 // ], 8442 // "parameters": { 8443 // "filter": { 8444 // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", 8445 // "location": "query", 8446 // "type": "string" 8447 // }, 8448 // "languageCode": { 8449 // "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.", 8450 // "location": "query", 8451 // "type": "string" 8452 // }, 8453 // "locationId": { 8454 // "description": "Deprecated. This field has no effect.", 8455 // "location": "query", 8456 // "type": "string" 8457 // }, 8458 // "parent": { 8459 // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", 8460 // "location": "path", 8461 // "pattern": "^locations/[^/]+$", 8462 // "required": true, 8463 // "type": "string" 8464 // } 8465 // }, 8466 // "path": "v2/{+parent}/infoTypes", 8467 // "response": { 8468 // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" 8469 // }, 8470 // "scopes": [ 8471 // "https://www.googleapis.com/auth/cloud-platform" 8472 // ] 8473 // } 8474 8475} 8476 8477// method id "dlp.organizations.deidentifyTemplates.create": 8478 8479type OrganizationsDeidentifyTemplatesCreateCall struct { 8480 s *Service 8481 parentid string 8482 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 8483 urlParams_ gensupport.URLParams 8484 ctx_ context.Context 8485 header_ http.Header 8486} 8487 8488// Create: Creates a DeidentifyTemplate for re-using frequently used 8489// configuration for de-identifying content, images, and storage. See 8490// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8491// more. 8492func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { 8493 c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8494 c.parentid = parentid 8495 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 8496 return c 8497} 8498 8499// Fields allows partial responses to be retrieved. See 8500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8501// for more information. 8502func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { 8503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8504 return c 8505} 8506 8507// Context sets the context to be used in this call's Do method. Any 8508// pending HTTP request will be aborted if the provided context is 8509// canceled. 8510func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { 8511 c.ctx_ = ctx 8512 return c 8513} 8514 8515// Header returns an http.Header that can be modified by the caller to 8516// add HTTP headers to the request. 8517func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { 8518 if c.header_ == nil { 8519 c.header_ = make(http.Header) 8520 } 8521 return c.header_ 8522} 8523 8524func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 8525 reqHeaders := make(http.Header) 8526 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8527 for k, v := range c.header_ { 8528 reqHeaders[k] = v 8529 } 8530 reqHeaders.Set("User-Agent", c.s.userAgent()) 8531 var body io.Reader = nil 8532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 8533 if err != nil { 8534 return nil, err 8535 } 8536 reqHeaders.Set("Content-Type", "application/json") 8537 c.urlParams_.Set("alt", alt) 8538 c.urlParams_.Set("prettyPrint", "false") 8539 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 8540 urls += "?" + c.urlParams_.Encode() 8541 req, err := http.NewRequest("POST", urls, body) 8542 if err != nil { 8543 return nil, err 8544 } 8545 req.Header = reqHeaders 8546 googleapi.Expand(req.URL, map[string]string{ 8547 "parent": c.parentid, 8548 }) 8549 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8550} 8551 8552// Do executes the "dlp.organizations.deidentifyTemplates.create" call. 8553// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8554// non-nil. Any non-2xx status code is an error. Response headers are in 8555// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8556// (if a response was returned at all) in 8557// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8558// whether the returned error was because http.StatusNotModified was 8559// returned. 8560func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8561 gensupport.SetOptions(c.urlParams_, opts...) 8562 res, err := c.doRequest("json") 8563 if res != nil && res.StatusCode == http.StatusNotModified { 8564 if res.Body != nil { 8565 res.Body.Close() 8566 } 8567 return nil, &googleapi.Error{ 8568 Code: res.StatusCode, 8569 Header: res.Header, 8570 } 8571 } 8572 if err != nil { 8573 return nil, err 8574 } 8575 defer googleapi.CloseBody(res) 8576 if err := googleapi.CheckResponse(res); err != nil { 8577 return nil, err 8578 } 8579 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8580 ServerResponse: googleapi.ServerResponse{ 8581 Header: res.Header, 8582 HTTPStatusCode: res.StatusCode, 8583 }, 8584 } 8585 target := &ret 8586 if err := gensupport.DecodeResponse(target, res); err != nil { 8587 return nil, err 8588 } 8589 return ret, nil 8590 // { 8591 // "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.", 8592 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 8593 // "httpMethod": "POST", 8594 // "id": "dlp.organizations.deidentifyTemplates.create", 8595 // "parameterOrder": [ 8596 // "parent" 8597 // ], 8598 // "parameters": { 8599 // "parent": { 8600 // "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", 8601 // "location": "path", 8602 // "pattern": "^organizations/[^/]+$", 8603 // "required": true, 8604 // "type": "string" 8605 // } 8606 // }, 8607 // "path": "v2/{+parent}/deidentifyTemplates", 8608 // "request": { 8609 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 8610 // }, 8611 // "response": { 8612 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8613 // }, 8614 // "scopes": [ 8615 // "https://www.googleapis.com/auth/cloud-platform" 8616 // ] 8617 // } 8618 8619} 8620 8621// method id "dlp.organizations.deidentifyTemplates.delete": 8622 8623type OrganizationsDeidentifyTemplatesDeleteCall struct { 8624 s *Service 8625 name string 8626 urlParams_ gensupport.URLParams 8627 ctx_ context.Context 8628 header_ http.Header 8629} 8630 8631// Delete: Deletes a DeidentifyTemplate. See 8632// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8633// more. 8634func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { 8635 c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8636 c.name = name 8637 return c 8638} 8639 8640// Fields allows partial responses to be retrieved. See 8641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8642// for more information. 8643func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { 8644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8645 return c 8646} 8647 8648// Context sets the context to be used in this call's Do method. Any 8649// pending HTTP request will be aborted if the provided context is 8650// canceled. 8651func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { 8652 c.ctx_ = ctx 8653 return c 8654} 8655 8656// Header returns an http.Header that can be modified by the caller to 8657// add HTTP headers to the request. 8658func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { 8659 if c.header_ == nil { 8660 c.header_ = make(http.Header) 8661 } 8662 return c.header_ 8663} 8664 8665func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 8666 reqHeaders := make(http.Header) 8667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8668 for k, v := range c.header_ { 8669 reqHeaders[k] = v 8670 } 8671 reqHeaders.Set("User-Agent", c.s.userAgent()) 8672 var body io.Reader = nil 8673 c.urlParams_.Set("alt", alt) 8674 c.urlParams_.Set("prettyPrint", "false") 8675 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8676 urls += "?" + c.urlParams_.Encode() 8677 req, err := http.NewRequest("DELETE", urls, body) 8678 if err != nil { 8679 return nil, err 8680 } 8681 req.Header = reqHeaders 8682 googleapi.Expand(req.URL, map[string]string{ 8683 "name": c.name, 8684 }) 8685 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8686} 8687 8688// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. 8689// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8690// non-2xx status code is an error. Response headers are in either 8691// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8692// returned at all) in error.(*googleapi.Error).Header. Use 8693// googleapi.IsNotModified to check whether the returned error was 8694// because http.StatusNotModified was returned. 8695func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8696 gensupport.SetOptions(c.urlParams_, opts...) 8697 res, err := c.doRequest("json") 8698 if res != nil && res.StatusCode == http.StatusNotModified { 8699 if res.Body != nil { 8700 res.Body.Close() 8701 } 8702 return nil, &googleapi.Error{ 8703 Code: res.StatusCode, 8704 Header: res.Header, 8705 } 8706 } 8707 if err != nil { 8708 return nil, err 8709 } 8710 defer googleapi.CloseBody(res) 8711 if err := googleapi.CheckResponse(res); err != nil { 8712 return nil, err 8713 } 8714 ret := &GoogleProtobufEmpty{ 8715 ServerResponse: googleapi.ServerResponse{ 8716 Header: res.Header, 8717 HTTPStatusCode: res.StatusCode, 8718 }, 8719 } 8720 target := &ret 8721 if err := gensupport.DecodeResponse(target, res); err != nil { 8722 return nil, err 8723 } 8724 return ret, nil 8725 // { 8726 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8727 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8728 // "httpMethod": "DELETE", 8729 // "id": "dlp.organizations.deidentifyTemplates.delete", 8730 // "parameterOrder": [ 8731 // "name" 8732 // ], 8733 // "parameters": { 8734 // "name": { 8735 // "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.", 8736 // "location": "path", 8737 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8738 // "required": true, 8739 // "type": "string" 8740 // } 8741 // }, 8742 // "path": "v2/{+name}", 8743 // "response": { 8744 // "$ref": "GoogleProtobufEmpty" 8745 // }, 8746 // "scopes": [ 8747 // "https://www.googleapis.com/auth/cloud-platform" 8748 // ] 8749 // } 8750 8751} 8752 8753// method id "dlp.organizations.deidentifyTemplates.get": 8754 8755type OrganizationsDeidentifyTemplatesGetCall struct { 8756 s *Service 8757 name string 8758 urlParams_ gensupport.URLParams 8759 ifNoneMatch_ string 8760 ctx_ context.Context 8761 header_ http.Header 8762} 8763 8764// Get: Gets a DeidentifyTemplate. See 8765// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8766// more. 8767func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { 8768 c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8769 c.name = name 8770 return c 8771} 8772 8773// Fields allows partial responses to be retrieved. See 8774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8775// for more information. 8776func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { 8777 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8778 return c 8779} 8780 8781// IfNoneMatch sets the optional parameter which makes the operation 8782// fail if the object's ETag matches the given value. This is useful for 8783// getting updates only after the object has changed since the last 8784// request. Use googleapi.IsNotModified to check whether the response 8785// error from Do is the result of In-None-Match. 8786func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { 8787 c.ifNoneMatch_ = entityTag 8788 return c 8789} 8790 8791// Context sets the context to be used in this call's Do method. Any 8792// pending HTTP request will be aborted if the provided context is 8793// canceled. 8794func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { 8795 c.ctx_ = ctx 8796 return c 8797} 8798 8799// Header returns an http.Header that can be modified by the caller to 8800// add HTTP headers to the request. 8801func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { 8802 if c.header_ == nil { 8803 c.header_ = make(http.Header) 8804 } 8805 return c.header_ 8806} 8807 8808func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 8809 reqHeaders := make(http.Header) 8810 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8811 for k, v := range c.header_ { 8812 reqHeaders[k] = v 8813 } 8814 reqHeaders.Set("User-Agent", c.s.userAgent()) 8815 if c.ifNoneMatch_ != "" { 8816 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8817 } 8818 var body io.Reader = nil 8819 c.urlParams_.Set("alt", alt) 8820 c.urlParams_.Set("prettyPrint", "false") 8821 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 8822 urls += "?" + c.urlParams_.Encode() 8823 req, err := http.NewRequest("GET", urls, body) 8824 if err != nil { 8825 return nil, err 8826 } 8827 req.Header = reqHeaders 8828 googleapi.Expand(req.URL, map[string]string{ 8829 "name": c.name, 8830 }) 8831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8832} 8833 8834// Do executes the "dlp.organizations.deidentifyTemplates.get" call. 8835// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 8836// non-nil. Any non-2xx status code is an error. Response headers are in 8837// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 8838// (if a response was returned at all) in 8839// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8840// whether the returned error was because http.StatusNotModified was 8841// returned. 8842func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 8843 gensupport.SetOptions(c.urlParams_, opts...) 8844 res, err := c.doRequest("json") 8845 if res != nil && res.StatusCode == http.StatusNotModified { 8846 if res.Body != nil { 8847 res.Body.Close() 8848 } 8849 return nil, &googleapi.Error{ 8850 Code: res.StatusCode, 8851 Header: res.Header, 8852 } 8853 } 8854 if err != nil { 8855 return nil, err 8856 } 8857 defer googleapi.CloseBody(res) 8858 if err := googleapi.CheckResponse(res); err != nil { 8859 return nil, err 8860 } 8861 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 8862 ServerResponse: googleapi.ServerResponse{ 8863 Header: res.Header, 8864 HTTPStatusCode: res.StatusCode, 8865 }, 8866 } 8867 target := &ret 8868 if err := gensupport.DecodeResponse(target, res); err != nil { 8869 return nil, err 8870 } 8871 return ret, nil 8872 // { 8873 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 8874 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 8875 // "httpMethod": "GET", 8876 // "id": "dlp.organizations.deidentifyTemplates.get", 8877 // "parameterOrder": [ 8878 // "name" 8879 // ], 8880 // "parameters": { 8881 // "name": { 8882 // "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.", 8883 // "location": "path", 8884 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 8885 // "required": true, 8886 // "type": "string" 8887 // } 8888 // }, 8889 // "path": "v2/{+name}", 8890 // "response": { 8891 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 8892 // }, 8893 // "scopes": [ 8894 // "https://www.googleapis.com/auth/cloud-platform" 8895 // ] 8896 // } 8897 8898} 8899 8900// method id "dlp.organizations.deidentifyTemplates.list": 8901 8902type OrganizationsDeidentifyTemplatesListCall struct { 8903 s *Service 8904 parentid string 8905 urlParams_ gensupport.URLParams 8906 ifNoneMatch_ string 8907 ctx_ context.Context 8908 header_ http.Header 8909} 8910 8911// List: Lists DeidentifyTemplates. See 8912// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 8913// more. 8914func (r *OrganizationsDeidentifyTemplatesService) List(parentid string) *OrganizationsDeidentifyTemplatesListCall { 8915 c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8916 c.parentid = parentid 8917 return c 8918} 8919 8920// LocationId sets the optional parameter "locationId": Deprecated. This 8921// field has no effect. 8922func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsDeidentifyTemplatesListCall { 8923 c.urlParams_.Set("locationId", locationId) 8924 return c 8925} 8926 8927// OrderBy sets the optional parameter "orderBy": Comma separated list 8928// of fields to order by, followed by `asc` or `desc` postfix. This list 8929// is case-insensitive, default sorting order is ascending, redundant 8930// space characters are insignificant. Example: `name asc,update_time, 8931// create_time desc` Supported fields are: - `create_time`: corresponds 8932// to time the template was created. - `update_time`: corresponds to 8933// time the template was last updated. - `name`: corresponds to 8934// template's name. - `display_name`: corresponds to template's display 8935// name. 8936func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { 8937 c.urlParams_.Set("orderBy", orderBy) 8938 return c 8939} 8940 8941// PageSize sets the optional parameter "pageSize": Size of the page, 8942// can be limited by server. If zero server returns a page of max size 8943// 100. 8944func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { 8945 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8946 return c 8947} 8948 8949// PageToken sets the optional parameter "pageToken": Page token to 8950// continue retrieval. Comes from previous call to 8951// `ListDeidentifyTemplates`. 8952func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { 8953 c.urlParams_.Set("pageToken", pageToken) 8954 return c 8955} 8956 8957// Fields allows partial responses to be retrieved. See 8958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8959// for more information. 8960func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { 8961 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8962 return c 8963} 8964 8965// IfNoneMatch sets the optional parameter which makes the operation 8966// fail if the object's ETag matches the given value. This is useful for 8967// getting updates only after the object has changed since the last 8968// request. Use googleapi.IsNotModified to check whether the response 8969// error from Do is the result of In-None-Match. 8970func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { 8971 c.ifNoneMatch_ = entityTag 8972 return c 8973} 8974 8975// Context sets the context to be used in this call's Do method. Any 8976// pending HTTP request will be aborted if the provided context is 8977// canceled. 8978func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { 8979 c.ctx_ = ctx 8980 return c 8981} 8982 8983// Header returns an http.Header that can be modified by the caller to 8984// add HTTP headers to the request. 8985func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { 8986 if c.header_ == nil { 8987 c.header_ = make(http.Header) 8988 } 8989 return c.header_ 8990} 8991 8992func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 8993 reqHeaders := make(http.Header) 8994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8995 for k, v := range c.header_ { 8996 reqHeaders[k] = v 8997 } 8998 reqHeaders.Set("User-Agent", c.s.userAgent()) 8999 if c.ifNoneMatch_ != "" { 9000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9001 } 9002 var body io.Reader = nil 9003 c.urlParams_.Set("alt", alt) 9004 c.urlParams_.Set("prettyPrint", "false") 9005 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 9006 urls += "?" + c.urlParams_.Encode() 9007 req, err := http.NewRequest("GET", urls, body) 9008 if err != nil { 9009 return nil, err 9010 } 9011 req.Header = reqHeaders 9012 googleapi.Expand(req.URL, map[string]string{ 9013 "parent": c.parentid, 9014 }) 9015 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9016} 9017 9018// Do executes the "dlp.organizations.deidentifyTemplates.list" call. 9019// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 9020// error will be non-nil. Any non-2xx status code is an error. Response 9021// headers are in either 9022// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 9023// er or (if a response was returned at all) in 9024// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9025// whether the returned error was because http.StatusNotModified was 9026// returned. 9027func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 9028 gensupport.SetOptions(c.urlParams_, opts...) 9029 res, err := c.doRequest("json") 9030 if res != nil && res.StatusCode == http.StatusNotModified { 9031 if res.Body != nil { 9032 res.Body.Close() 9033 } 9034 return nil, &googleapi.Error{ 9035 Code: res.StatusCode, 9036 Header: res.Header, 9037 } 9038 } 9039 if err != nil { 9040 return nil, err 9041 } 9042 defer googleapi.CloseBody(res) 9043 if err := googleapi.CheckResponse(res); err != nil { 9044 return nil, err 9045 } 9046 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 9047 ServerResponse: googleapi.ServerResponse{ 9048 Header: res.Header, 9049 HTTPStatusCode: res.StatusCode, 9050 }, 9051 } 9052 target := &ret 9053 if err := gensupport.DecodeResponse(target, res); err != nil { 9054 return nil, err 9055 } 9056 return ret, nil 9057 // { 9058 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9059 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", 9060 // "httpMethod": "GET", 9061 // "id": "dlp.organizations.deidentifyTemplates.list", 9062 // "parameterOrder": [ 9063 // "parent" 9064 // ], 9065 // "parameters": { 9066 // "locationId": { 9067 // "description": "Deprecated. This field has no effect.", 9068 // "location": "query", 9069 // "type": "string" 9070 // }, 9071 // "orderBy": { 9072 // "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.", 9073 // "location": "query", 9074 // "type": "string" 9075 // }, 9076 // "pageSize": { 9077 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 9078 // "format": "int32", 9079 // "location": "query", 9080 // "type": "integer" 9081 // }, 9082 // "pageToken": { 9083 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 9084 // "location": "query", 9085 // "type": "string" 9086 // }, 9087 // "parent": { 9088 // "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", 9089 // "location": "path", 9090 // "pattern": "^organizations/[^/]+$", 9091 // "required": true, 9092 // "type": "string" 9093 // } 9094 // }, 9095 // "path": "v2/{+parent}/deidentifyTemplates", 9096 // "response": { 9097 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 9098 // }, 9099 // "scopes": [ 9100 // "https://www.googleapis.com/auth/cloud-platform" 9101 // ] 9102 // } 9103 9104} 9105 9106// Pages invokes f for each page of results. 9107// A non-nil error returned from f will halt the iteration. 9108// The provided context supersedes any context provided to the Context method. 9109func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 9110 c.ctx_ = ctx 9111 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9112 for { 9113 x, err := c.Do() 9114 if err != nil { 9115 return err 9116 } 9117 if err := f(x); err != nil { 9118 return err 9119 } 9120 if x.NextPageToken == "" { 9121 return nil 9122 } 9123 c.PageToken(x.NextPageToken) 9124 } 9125} 9126 9127// method id "dlp.organizations.deidentifyTemplates.patch": 9128 9129type OrganizationsDeidentifyTemplatesPatchCall struct { 9130 s *Service 9131 name string 9132 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 9133 urlParams_ gensupport.URLParams 9134 ctx_ context.Context 9135 header_ http.Header 9136} 9137 9138// Patch: Updates the DeidentifyTemplate. See 9139// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 9140// more. 9141func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { 9142 c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9143 c.name = name 9144 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 9145 return c 9146} 9147 9148// Fields allows partial responses to be retrieved. See 9149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9150// for more information. 9151func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { 9152 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9153 return c 9154} 9155 9156// Context sets the context to be used in this call's Do method. Any 9157// pending HTTP request will be aborted if the provided context is 9158// canceled. 9159func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { 9160 c.ctx_ = ctx 9161 return c 9162} 9163 9164// Header returns an http.Header that can be modified by the caller to 9165// add HTTP headers to the request. 9166func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { 9167 if c.header_ == nil { 9168 c.header_ = make(http.Header) 9169 } 9170 return c.header_ 9171} 9172 9173func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9174 reqHeaders := make(http.Header) 9175 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9176 for k, v := range c.header_ { 9177 reqHeaders[k] = v 9178 } 9179 reqHeaders.Set("User-Agent", c.s.userAgent()) 9180 var body io.Reader = nil 9181 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 9182 if err != nil { 9183 return nil, err 9184 } 9185 reqHeaders.Set("Content-Type", "application/json") 9186 c.urlParams_.Set("alt", alt) 9187 c.urlParams_.Set("prettyPrint", "false") 9188 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9189 urls += "?" + c.urlParams_.Encode() 9190 req, err := http.NewRequest("PATCH", urls, body) 9191 if err != nil { 9192 return nil, err 9193 } 9194 req.Header = reqHeaders 9195 googleapi.Expand(req.URL, map[string]string{ 9196 "name": c.name, 9197 }) 9198 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9199} 9200 9201// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. 9202// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 9203// non-nil. Any non-2xx status code is an error. Response headers are in 9204// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 9205// (if a response was returned at all) in 9206// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9207// whether the returned error was because http.StatusNotModified was 9208// returned. 9209func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 9210 gensupport.SetOptions(c.urlParams_, opts...) 9211 res, err := c.doRequest("json") 9212 if res != nil && res.StatusCode == http.StatusNotModified { 9213 if res.Body != nil { 9214 res.Body.Close() 9215 } 9216 return nil, &googleapi.Error{ 9217 Code: res.StatusCode, 9218 Header: res.Header, 9219 } 9220 } 9221 if err != nil { 9222 return nil, err 9223 } 9224 defer googleapi.CloseBody(res) 9225 if err := googleapi.CheckResponse(res); err != nil { 9226 return nil, err 9227 } 9228 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 9229 ServerResponse: googleapi.ServerResponse{ 9230 Header: res.Header, 9231 HTTPStatusCode: res.StatusCode, 9232 }, 9233 } 9234 target := &ret 9235 if err := gensupport.DecodeResponse(target, res); err != nil { 9236 return nil, err 9237 } 9238 return ret, nil 9239 // { 9240 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 9241 // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 9242 // "httpMethod": "PATCH", 9243 // "id": "dlp.organizations.deidentifyTemplates.patch", 9244 // "parameterOrder": [ 9245 // "name" 9246 // ], 9247 // "parameters": { 9248 // "name": { 9249 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 9250 // "location": "path", 9251 // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", 9252 // "required": true, 9253 // "type": "string" 9254 // } 9255 // }, 9256 // "path": "v2/{+name}", 9257 // "request": { 9258 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 9259 // }, 9260 // "response": { 9261 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 9262 // }, 9263 // "scopes": [ 9264 // "https://www.googleapis.com/auth/cloud-platform" 9265 // ] 9266 // } 9267 9268} 9269 9270// method id "dlp.organizations.inspectTemplates.create": 9271 9272type OrganizationsInspectTemplatesCreateCall struct { 9273 s *Service 9274 parentid string 9275 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 9276 urlParams_ gensupport.URLParams 9277 ctx_ context.Context 9278 header_ http.Header 9279} 9280 9281// Create: Creates an InspectTemplate for re-using frequently used 9282// configuration for inspecting content, images, and storage. See 9283// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9284func (r *OrganizationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { 9285 c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9286 c.parentid = parentid 9287 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 9288 return c 9289} 9290 9291// Fields allows partial responses to be retrieved. See 9292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9293// for more information. 9294func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { 9295 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9296 return c 9297} 9298 9299// Context sets the context to be used in this call's Do method. Any 9300// pending HTTP request will be aborted if the provided context is 9301// canceled. 9302func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { 9303 c.ctx_ = ctx 9304 return c 9305} 9306 9307// Header returns an http.Header that can be modified by the caller to 9308// add HTTP headers to the request. 9309func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { 9310 if c.header_ == nil { 9311 c.header_ = make(http.Header) 9312 } 9313 return c.header_ 9314} 9315 9316func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 9317 reqHeaders := make(http.Header) 9318 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9319 for k, v := range c.header_ { 9320 reqHeaders[k] = v 9321 } 9322 reqHeaders.Set("User-Agent", c.s.userAgent()) 9323 var body io.Reader = nil 9324 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 9325 if err != nil { 9326 return nil, err 9327 } 9328 reqHeaders.Set("Content-Type", "application/json") 9329 c.urlParams_.Set("alt", alt) 9330 c.urlParams_.Set("prettyPrint", "false") 9331 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9332 urls += "?" + c.urlParams_.Encode() 9333 req, err := http.NewRequest("POST", urls, body) 9334 if err != nil { 9335 return nil, err 9336 } 9337 req.Header = reqHeaders 9338 googleapi.Expand(req.URL, map[string]string{ 9339 "parent": c.parentid, 9340 }) 9341 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9342} 9343 9344// Do executes the "dlp.organizations.inspectTemplates.create" call. 9345// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9346// non-nil. Any non-2xx status code is an error. Response headers are in 9347// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9348// (if a response was returned at all) in 9349// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9350// whether the returned error was because http.StatusNotModified was 9351// returned. 9352func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9353 gensupport.SetOptions(c.urlParams_, opts...) 9354 res, err := c.doRequest("json") 9355 if res != nil && res.StatusCode == http.StatusNotModified { 9356 if res.Body != nil { 9357 res.Body.Close() 9358 } 9359 return nil, &googleapi.Error{ 9360 Code: res.StatusCode, 9361 Header: res.Header, 9362 } 9363 } 9364 if err != nil { 9365 return nil, err 9366 } 9367 defer googleapi.CloseBody(res) 9368 if err := googleapi.CheckResponse(res); err != nil { 9369 return nil, err 9370 } 9371 ret := &GooglePrivacyDlpV2InspectTemplate{ 9372 ServerResponse: googleapi.ServerResponse{ 9373 Header: res.Header, 9374 HTTPStatusCode: res.StatusCode, 9375 }, 9376 } 9377 target := &ret 9378 if err := gensupport.DecodeResponse(target, res); err != nil { 9379 return nil, err 9380 } 9381 return ret, nil 9382 // { 9383 // "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.", 9384 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9385 // "httpMethod": "POST", 9386 // "id": "dlp.organizations.inspectTemplates.create", 9387 // "parameterOrder": [ 9388 // "parent" 9389 // ], 9390 // "parameters": { 9391 // "parent": { 9392 // "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", 9393 // "location": "path", 9394 // "pattern": "^organizations/[^/]+$", 9395 // "required": true, 9396 // "type": "string" 9397 // } 9398 // }, 9399 // "path": "v2/{+parent}/inspectTemplates", 9400 // "request": { 9401 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 9402 // }, 9403 // "response": { 9404 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9405 // }, 9406 // "scopes": [ 9407 // "https://www.googleapis.com/auth/cloud-platform" 9408 // ] 9409 // } 9410 9411} 9412 9413// method id "dlp.organizations.inspectTemplates.delete": 9414 9415type OrganizationsInspectTemplatesDeleteCall struct { 9416 s *Service 9417 name string 9418 urlParams_ gensupport.URLParams 9419 ctx_ context.Context 9420 header_ http.Header 9421} 9422 9423// Delete: Deletes an InspectTemplate. See 9424// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9425func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { 9426 c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9427 c.name = name 9428 return c 9429} 9430 9431// Fields allows partial responses to be retrieved. See 9432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9433// for more information. 9434func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { 9435 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9436 return c 9437} 9438 9439// Context sets the context to be used in this call's Do method. Any 9440// pending HTTP request will be aborted if the provided context is 9441// canceled. 9442func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { 9443 c.ctx_ = ctx 9444 return c 9445} 9446 9447// Header returns an http.Header that can be modified by the caller to 9448// add HTTP headers to the request. 9449func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { 9450 if c.header_ == nil { 9451 c.header_ = make(http.Header) 9452 } 9453 return c.header_ 9454} 9455 9456func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 9457 reqHeaders := make(http.Header) 9458 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9459 for k, v := range c.header_ { 9460 reqHeaders[k] = v 9461 } 9462 reqHeaders.Set("User-Agent", c.s.userAgent()) 9463 var body io.Reader = nil 9464 c.urlParams_.Set("alt", alt) 9465 c.urlParams_.Set("prettyPrint", "false") 9466 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9467 urls += "?" + c.urlParams_.Encode() 9468 req, err := http.NewRequest("DELETE", urls, body) 9469 if err != nil { 9470 return nil, err 9471 } 9472 req.Header = reqHeaders 9473 googleapi.Expand(req.URL, map[string]string{ 9474 "name": c.name, 9475 }) 9476 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9477} 9478 9479// Do executes the "dlp.organizations.inspectTemplates.delete" call. 9480// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9481// non-2xx status code is an error. Response headers are in either 9482// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9483// returned at all) in error.(*googleapi.Error).Header. Use 9484// googleapi.IsNotModified to check whether the returned error was 9485// because http.StatusNotModified was returned. 9486func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9487 gensupport.SetOptions(c.urlParams_, opts...) 9488 res, err := c.doRequest("json") 9489 if res != nil && res.StatusCode == http.StatusNotModified { 9490 if res.Body != nil { 9491 res.Body.Close() 9492 } 9493 return nil, &googleapi.Error{ 9494 Code: res.StatusCode, 9495 Header: res.Header, 9496 } 9497 } 9498 if err != nil { 9499 return nil, err 9500 } 9501 defer googleapi.CloseBody(res) 9502 if err := googleapi.CheckResponse(res); err != nil { 9503 return nil, err 9504 } 9505 ret := &GoogleProtobufEmpty{ 9506 ServerResponse: googleapi.ServerResponse{ 9507 Header: res.Header, 9508 HTTPStatusCode: res.StatusCode, 9509 }, 9510 } 9511 target := &ret 9512 if err := gensupport.DecodeResponse(target, res); err != nil { 9513 return nil, err 9514 } 9515 return ret, nil 9516 // { 9517 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9518 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9519 // "httpMethod": "DELETE", 9520 // "id": "dlp.organizations.inspectTemplates.delete", 9521 // "parameterOrder": [ 9522 // "name" 9523 // ], 9524 // "parameters": { 9525 // "name": { 9526 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9527 // "location": "path", 9528 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9529 // "required": true, 9530 // "type": "string" 9531 // } 9532 // }, 9533 // "path": "v2/{+name}", 9534 // "response": { 9535 // "$ref": "GoogleProtobufEmpty" 9536 // }, 9537 // "scopes": [ 9538 // "https://www.googleapis.com/auth/cloud-platform" 9539 // ] 9540 // } 9541 9542} 9543 9544// method id "dlp.organizations.inspectTemplates.get": 9545 9546type OrganizationsInspectTemplatesGetCall struct { 9547 s *Service 9548 name string 9549 urlParams_ gensupport.URLParams 9550 ifNoneMatch_ string 9551 ctx_ context.Context 9552 header_ http.Header 9553} 9554 9555// Get: Gets an InspectTemplate. See 9556// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9557func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { 9558 c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9559 c.name = name 9560 return c 9561} 9562 9563// Fields allows partial responses to be retrieved. See 9564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9565// for more information. 9566func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { 9567 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9568 return c 9569} 9570 9571// IfNoneMatch sets the optional parameter which makes the operation 9572// fail if the object's ETag matches the given value. This is useful for 9573// getting updates only after the object has changed since the last 9574// request. Use googleapi.IsNotModified to check whether the response 9575// error from Do is the result of In-None-Match. 9576func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { 9577 c.ifNoneMatch_ = entityTag 9578 return c 9579} 9580 9581// Context sets the context to be used in this call's Do method. Any 9582// pending HTTP request will be aborted if the provided context is 9583// canceled. 9584func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { 9585 c.ctx_ = ctx 9586 return c 9587} 9588 9589// Header returns an http.Header that can be modified by the caller to 9590// add HTTP headers to the request. 9591func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { 9592 if c.header_ == nil { 9593 c.header_ = make(http.Header) 9594 } 9595 return c.header_ 9596} 9597 9598func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 9599 reqHeaders := make(http.Header) 9600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9601 for k, v := range c.header_ { 9602 reqHeaders[k] = v 9603 } 9604 reqHeaders.Set("User-Agent", c.s.userAgent()) 9605 if c.ifNoneMatch_ != "" { 9606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9607 } 9608 var body io.Reader = nil 9609 c.urlParams_.Set("alt", alt) 9610 c.urlParams_.Set("prettyPrint", "false") 9611 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9612 urls += "?" + c.urlParams_.Encode() 9613 req, err := http.NewRequest("GET", urls, body) 9614 if err != nil { 9615 return nil, err 9616 } 9617 req.Header = reqHeaders 9618 googleapi.Expand(req.URL, map[string]string{ 9619 "name": c.name, 9620 }) 9621 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9622} 9623 9624// Do executes the "dlp.organizations.inspectTemplates.get" call. 9625// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9626// non-nil. Any non-2xx status code is an error. Response headers are in 9627// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9628// (if a response was returned at all) in 9629// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9630// whether the returned error was because http.StatusNotModified was 9631// returned. 9632func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9633 gensupport.SetOptions(c.urlParams_, opts...) 9634 res, err := c.doRequest("json") 9635 if res != nil && res.StatusCode == http.StatusNotModified { 9636 if res.Body != nil { 9637 res.Body.Close() 9638 } 9639 return nil, &googleapi.Error{ 9640 Code: res.StatusCode, 9641 Header: res.Header, 9642 } 9643 } 9644 if err != nil { 9645 return nil, err 9646 } 9647 defer googleapi.CloseBody(res) 9648 if err := googleapi.CheckResponse(res); err != nil { 9649 return nil, err 9650 } 9651 ret := &GooglePrivacyDlpV2InspectTemplate{ 9652 ServerResponse: googleapi.ServerResponse{ 9653 Header: res.Header, 9654 HTTPStatusCode: res.StatusCode, 9655 }, 9656 } 9657 target := &ret 9658 if err := gensupport.DecodeResponse(target, res); err != nil { 9659 return nil, err 9660 } 9661 return ret, nil 9662 // { 9663 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9664 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 9665 // "httpMethod": "GET", 9666 // "id": "dlp.organizations.inspectTemplates.get", 9667 // "parameterOrder": [ 9668 // "name" 9669 // ], 9670 // "parameters": { 9671 // "name": { 9672 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 9673 // "location": "path", 9674 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 9675 // "required": true, 9676 // "type": "string" 9677 // } 9678 // }, 9679 // "path": "v2/{+name}", 9680 // "response": { 9681 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 9682 // }, 9683 // "scopes": [ 9684 // "https://www.googleapis.com/auth/cloud-platform" 9685 // ] 9686 // } 9687 9688} 9689 9690// method id "dlp.organizations.inspectTemplates.list": 9691 9692type OrganizationsInspectTemplatesListCall struct { 9693 s *Service 9694 parentid string 9695 urlParams_ gensupport.URLParams 9696 ifNoneMatch_ string 9697 ctx_ context.Context 9698 header_ http.Header 9699} 9700 9701// List: Lists InspectTemplates. See 9702// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9703func (r *OrganizationsInspectTemplatesService) List(parentid string) *OrganizationsInspectTemplatesListCall { 9704 c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9705 c.parentid = parentid 9706 return c 9707} 9708 9709// LocationId sets the optional parameter "locationId": Deprecated. This 9710// field has no effect. 9711func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsInspectTemplatesListCall { 9712 c.urlParams_.Set("locationId", locationId) 9713 return c 9714} 9715 9716// OrderBy sets the optional parameter "orderBy": Comma separated list 9717// of fields to order by, followed by `asc` or `desc` postfix. This list 9718// is case-insensitive, default sorting order is ascending, redundant 9719// space characters are insignificant. Example: `name asc,update_time, 9720// create_time desc` Supported fields are: - `create_time`: corresponds 9721// to time the template was created. - `update_time`: corresponds to 9722// time the template was last updated. - `name`: corresponds to 9723// template's name. - `display_name`: corresponds to template's display 9724// name. 9725func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { 9726 c.urlParams_.Set("orderBy", orderBy) 9727 return c 9728} 9729 9730// PageSize sets the optional parameter "pageSize": Size of the page, 9731// can be limited by server. If zero server returns a page of max size 9732// 100. 9733func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { 9734 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9735 return c 9736} 9737 9738// PageToken sets the optional parameter "pageToken": Page token to 9739// continue retrieval. Comes from previous call to 9740// `ListInspectTemplates`. 9741func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { 9742 c.urlParams_.Set("pageToken", pageToken) 9743 return c 9744} 9745 9746// Fields allows partial responses to be retrieved. See 9747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9748// for more information. 9749func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { 9750 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9751 return c 9752} 9753 9754// IfNoneMatch sets the optional parameter which makes the operation 9755// fail if the object's ETag matches the given value. This is useful for 9756// getting updates only after the object has changed since the last 9757// request. Use googleapi.IsNotModified to check whether the response 9758// error from Do is the result of In-None-Match. 9759func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { 9760 c.ifNoneMatch_ = entityTag 9761 return c 9762} 9763 9764// Context sets the context to be used in this call's Do method. Any 9765// pending HTTP request will be aborted if the provided context is 9766// canceled. 9767func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { 9768 c.ctx_ = ctx 9769 return c 9770} 9771 9772// Header returns an http.Header that can be modified by the caller to 9773// add HTTP headers to the request. 9774func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { 9775 if c.header_ == nil { 9776 c.header_ = make(http.Header) 9777 } 9778 return c.header_ 9779} 9780 9781func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 9782 reqHeaders := make(http.Header) 9783 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9784 for k, v := range c.header_ { 9785 reqHeaders[k] = v 9786 } 9787 reqHeaders.Set("User-Agent", c.s.userAgent()) 9788 if c.ifNoneMatch_ != "" { 9789 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9790 } 9791 var body io.Reader = nil 9792 c.urlParams_.Set("alt", alt) 9793 c.urlParams_.Set("prettyPrint", "false") 9794 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 9795 urls += "?" + c.urlParams_.Encode() 9796 req, err := http.NewRequest("GET", urls, body) 9797 if err != nil { 9798 return nil, err 9799 } 9800 req.Header = reqHeaders 9801 googleapi.Expand(req.URL, map[string]string{ 9802 "parent": c.parentid, 9803 }) 9804 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9805} 9806 9807// Do executes the "dlp.organizations.inspectTemplates.list" call. 9808// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 9809// error will be non-nil. Any non-2xx status code is an error. Response 9810// headers are in either 9811// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 9812// or (if a response was returned at all) in 9813// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9814// whether the returned error was because http.StatusNotModified was 9815// returned. 9816func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 9817 gensupport.SetOptions(c.urlParams_, opts...) 9818 res, err := c.doRequest("json") 9819 if res != nil && res.StatusCode == http.StatusNotModified { 9820 if res.Body != nil { 9821 res.Body.Close() 9822 } 9823 return nil, &googleapi.Error{ 9824 Code: res.StatusCode, 9825 Header: res.Header, 9826 } 9827 } 9828 if err != nil { 9829 return nil, err 9830 } 9831 defer googleapi.CloseBody(res) 9832 if err := googleapi.CheckResponse(res); err != nil { 9833 return nil, err 9834 } 9835 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 9836 ServerResponse: googleapi.ServerResponse{ 9837 Header: res.Header, 9838 HTTPStatusCode: res.StatusCode, 9839 }, 9840 } 9841 target := &ret 9842 if err := gensupport.DecodeResponse(target, res); err != nil { 9843 return nil, err 9844 } 9845 return ret, nil 9846 // { 9847 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 9848 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", 9849 // "httpMethod": "GET", 9850 // "id": "dlp.organizations.inspectTemplates.list", 9851 // "parameterOrder": [ 9852 // "parent" 9853 // ], 9854 // "parameters": { 9855 // "locationId": { 9856 // "description": "Deprecated. This field has no effect.", 9857 // "location": "query", 9858 // "type": "string" 9859 // }, 9860 // "orderBy": { 9861 // "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.", 9862 // "location": "query", 9863 // "type": "string" 9864 // }, 9865 // "pageSize": { 9866 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 9867 // "format": "int32", 9868 // "location": "query", 9869 // "type": "integer" 9870 // }, 9871 // "pageToken": { 9872 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 9873 // "location": "query", 9874 // "type": "string" 9875 // }, 9876 // "parent": { 9877 // "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", 9878 // "location": "path", 9879 // "pattern": "^organizations/[^/]+$", 9880 // "required": true, 9881 // "type": "string" 9882 // } 9883 // }, 9884 // "path": "v2/{+parent}/inspectTemplates", 9885 // "response": { 9886 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 9887 // }, 9888 // "scopes": [ 9889 // "https://www.googleapis.com/auth/cloud-platform" 9890 // ] 9891 // } 9892 9893} 9894 9895// Pages invokes f for each page of results. 9896// A non-nil error returned from f will halt the iteration. 9897// The provided context supersedes any context provided to the Context method. 9898func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 9899 c.ctx_ = ctx 9900 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9901 for { 9902 x, err := c.Do() 9903 if err != nil { 9904 return err 9905 } 9906 if err := f(x); err != nil { 9907 return err 9908 } 9909 if x.NextPageToken == "" { 9910 return nil 9911 } 9912 c.PageToken(x.NextPageToken) 9913 } 9914} 9915 9916// method id "dlp.organizations.inspectTemplates.patch": 9917 9918type OrganizationsInspectTemplatesPatchCall struct { 9919 s *Service 9920 name string 9921 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 9922 urlParams_ gensupport.URLParams 9923 ctx_ context.Context 9924 header_ http.Header 9925} 9926 9927// Patch: Updates the InspectTemplate. See 9928// https://cloud.google.com/dlp/docs/creating-templates to learn more. 9929func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { 9930 c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9931 c.name = name 9932 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 9933 return c 9934} 9935 9936// Fields allows partial responses to be retrieved. See 9937// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9938// for more information. 9939func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { 9940 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9941 return c 9942} 9943 9944// Context sets the context to be used in this call's Do method. Any 9945// pending HTTP request will be aborted if the provided context is 9946// canceled. 9947func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { 9948 c.ctx_ = ctx 9949 return c 9950} 9951 9952// Header returns an http.Header that can be modified by the caller to 9953// add HTTP headers to the request. 9954func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { 9955 if c.header_ == nil { 9956 c.header_ = make(http.Header) 9957 } 9958 return c.header_ 9959} 9960 9961func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 9962 reqHeaders := make(http.Header) 9963 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9964 for k, v := range c.header_ { 9965 reqHeaders[k] = v 9966 } 9967 reqHeaders.Set("User-Agent", c.s.userAgent()) 9968 var body io.Reader = nil 9969 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 9970 if err != nil { 9971 return nil, err 9972 } 9973 reqHeaders.Set("Content-Type", "application/json") 9974 c.urlParams_.Set("alt", alt) 9975 c.urlParams_.Set("prettyPrint", "false") 9976 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 9977 urls += "?" + c.urlParams_.Encode() 9978 req, err := http.NewRequest("PATCH", urls, body) 9979 if err != nil { 9980 return nil, err 9981 } 9982 req.Header = reqHeaders 9983 googleapi.Expand(req.URL, map[string]string{ 9984 "name": c.name, 9985 }) 9986 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9987} 9988 9989// Do executes the "dlp.organizations.inspectTemplates.patch" call. 9990// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 9991// non-nil. Any non-2xx status code is an error. Response headers are in 9992// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 9993// (if a response was returned at all) in 9994// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9995// whether the returned error was because http.StatusNotModified was 9996// returned. 9997func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 9998 gensupport.SetOptions(c.urlParams_, opts...) 9999 res, err := c.doRequest("json") 10000 if res != nil && res.StatusCode == http.StatusNotModified { 10001 if res.Body != nil { 10002 res.Body.Close() 10003 } 10004 return nil, &googleapi.Error{ 10005 Code: res.StatusCode, 10006 Header: res.Header, 10007 } 10008 } 10009 if err != nil { 10010 return nil, err 10011 } 10012 defer googleapi.CloseBody(res) 10013 if err := googleapi.CheckResponse(res); err != nil { 10014 return nil, err 10015 } 10016 ret := &GooglePrivacyDlpV2InspectTemplate{ 10017 ServerResponse: googleapi.ServerResponse{ 10018 Header: res.Header, 10019 HTTPStatusCode: res.StatusCode, 10020 }, 10021 } 10022 target := &ret 10023 if err := gensupport.DecodeResponse(target, res); err != nil { 10024 return nil, err 10025 } 10026 return ret, nil 10027 // { 10028 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 10029 // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", 10030 // "httpMethod": "PATCH", 10031 // "id": "dlp.organizations.inspectTemplates.patch", 10032 // "parameterOrder": [ 10033 // "name" 10034 // ], 10035 // "parameters": { 10036 // "name": { 10037 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 10038 // "location": "path", 10039 // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", 10040 // "required": true, 10041 // "type": "string" 10042 // } 10043 // }, 10044 // "path": "v2/{+name}", 10045 // "request": { 10046 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 10047 // }, 10048 // "response": { 10049 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 10050 // }, 10051 // "scopes": [ 10052 // "https://www.googleapis.com/auth/cloud-platform" 10053 // ] 10054 // } 10055 10056} 10057 10058// method id "dlp.organizations.locations.deidentifyTemplates.create": 10059 10060type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { 10061 s *Service 10062 parentid string 10063 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 10064 urlParams_ gensupport.URLParams 10065 ctx_ context.Context 10066 header_ http.Header 10067} 10068 10069// Create: Creates a DeidentifyTemplate for re-using frequently used 10070// configuration for de-identifying content, images, and storage. See 10071// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10072// more. 10073func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10074 c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10075 c.parentid = parentid 10076 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 10077 return c 10078} 10079 10080// Fields allows partial responses to be retrieved. See 10081// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10082// for more information. 10083func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10084 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10085 return c 10086} 10087 10088// Context sets the context to be used in this call's Do method. Any 10089// pending HTTP request will be aborted if the provided context is 10090// canceled. 10091func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 10092 c.ctx_ = ctx 10093 return c 10094} 10095 10096// Header returns an http.Header that can be modified by the caller to 10097// add HTTP headers to the request. 10098func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 10099 if c.header_ == nil { 10100 c.header_ = make(http.Header) 10101 } 10102 return c.header_ 10103} 10104 10105func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 10106 reqHeaders := make(http.Header) 10107 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10108 for k, v := range c.header_ { 10109 reqHeaders[k] = v 10110 } 10111 reqHeaders.Set("User-Agent", c.s.userAgent()) 10112 var body io.Reader = nil 10113 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 10114 if err != nil { 10115 return nil, err 10116 } 10117 reqHeaders.Set("Content-Type", "application/json") 10118 c.urlParams_.Set("alt", alt) 10119 c.urlParams_.Set("prettyPrint", "false") 10120 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10121 urls += "?" + c.urlParams_.Encode() 10122 req, err := http.NewRequest("POST", urls, body) 10123 if err != nil { 10124 return nil, err 10125 } 10126 req.Header = reqHeaders 10127 googleapi.Expand(req.URL, map[string]string{ 10128 "parent": c.parentid, 10129 }) 10130 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10131} 10132 10133// Do executes the "dlp.organizations.locations.deidentifyTemplates.create" call. 10134// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10135// non-nil. Any non-2xx status code is an error. Response headers are in 10136// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10137// (if a response was returned at all) in 10138// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10139// whether the returned error was because http.StatusNotModified was 10140// returned. 10141func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10142 gensupport.SetOptions(c.urlParams_, opts...) 10143 res, err := c.doRequest("json") 10144 if res != nil && res.StatusCode == http.StatusNotModified { 10145 if res.Body != nil { 10146 res.Body.Close() 10147 } 10148 return nil, &googleapi.Error{ 10149 Code: res.StatusCode, 10150 Header: res.Header, 10151 } 10152 } 10153 if err != nil { 10154 return nil, err 10155 } 10156 defer googleapi.CloseBody(res) 10157 if err := googleapi.CheckResponse(res); err != nil { 10158 return nil, err 10159 } 10160 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10161 ServerResponse: googleapi.ServerResponse{ 10162 Header: res.Header, 10163 HTTPStatusCode: res.StatusCode, 10164 }, 10165 } 10166 target := &ret 10167 if err := gensupport.DecodeResponse(target, res); err != nil { 10168 return nil, err 10169 } 10170 return ret, nil 10171 // { 10172 // "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.", 10173 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10174 // "httpMethod": "POST", 10175 // "id": "dlp.organizations.locations.deidentifyTemplates.create", 10176 // "parameterOrder": [ 10177 // "parent" 10178 // ], 10179 // "parameters": { 10180 // "parent": { 10181 // "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", 10182 // "location": "path", 10183 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10184 // "required": true, 10185 // "type": "string" 10186 // } 10187 // }, 10188 // "path": "v2/{+parent}/deidentifyTemplates", 10189 // "request": { 10190 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 10191 // }, 10192 // "response": { 10193 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10194 // }, 10195 // "scopes": [ 10196 // "https://www.googleapis.com/auth/cloud-platform" 10197 // ] 10198 // } 10199 10200} 10201 10202// method id "dlp.organizations.locations.deidentifyTemplates.delete": 10203 10204type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { 10205 s *Service 10206 name string 10207 urlParams_ gensupport.URLParams 10208 ctx_ context.Context 10209 header_ http.Header 10210} 10211 10212// Delete: Deletes a DeidentifyTemplate. See 10213// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10214// more. 10215func (r *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10216 c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10217 c.name = name 10218 return c 10219} 10220 10221// Fields allows partial responses to be retrieved. See 10222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10223// for more information. 10224func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10225 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10226 return c 10227} 10228 10229// Context sets the context to be used in this call's Do method. Any 10230// pending HTTP request will be aborted if the provided context is 10231// canceled. 10232func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 10233 c.ctx_ = ctx 10234 return c 10235} 10236 10237// Header returns an http.Header that can be modified by the caller to 10238// add HTTP headers to the request. 10239func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 10240 if c.header_ == nil { 10241 c.header_ = make(http.Header) 10242 } 10243 return c.header_ 10244} 10245 10246func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 10247 reqHeaders := make(http.Header) 10248 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10249 for k, v := range c.header_ { 10250 reqHeaders[k] = v 10251 } 10252 reqHeaders.Set("User-Agent", c.s.userAgent()) 10253 var body io.Reader = nil 10254 c.urlParams_.Set("alt", alt) 10255 c.urlParams_.Set("prettyPrint", "false") 10256 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10257 urls += "?" + c.urlParams_.Encode() 10258 req, err := http.NewRequest("DELETE", urls, body) 10259 if err != nil { 10260 return nil, err 10261 } 10262 req.Header = reqHeaders 10263 googleapi.Expand(req.URL, map[string]string{ 10264 "name": c.name, 10265 }) 10266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10267} 10268 10269// Do executes the "dlp.organizations.locations.deidentifyTemplates.delete" call. 10270// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10271// non-2xx status code is an error. Response headers are in either 10272// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10273// returned at all) in error.(*googleapi.Error).Header. Use 10274// googleapi.IsNotModified to check whether the returned error was 10275// because http.StatusNotModified was returned. 10276func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10277 gensupport.SetOptions(c.urlParams_, opts...) 10278 res, err := c.doRequest("json") 10279 if res != nil && res.StatusCode == http.StatusNotModified { 10280 if res.Body != nil { 10281 res.Body.Close() 10282 } 10283 return nil, &googleapi.Error{ 10284 Code: res.StatusCode, 10285 Header: res.Header, 10286 } 10287 } 10288 if err != nil { 10289 return nil, err 10290 } 10291 defer googleapi.CloseBody(res) 10292 if err := googleapi.CheckResponse(res); err != nil { 10293 return nil, err 10294 } 10295 ret := &GoogleProtobufEmpty{ 10296 ServerResponse: googleapi.ServerResponse{ 10297 Header: res.Header, 10298 HTTPStatusCode: res.StatusCode, 10299 }, 10300 } 10301 target := &ret 10302 if err := gensupport.DecodeResponse(target, res); err != nil { 10303 return nil, err 10304 } 10305 return ret, nil 10306 // { 10307 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10308 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10309 // "httpMethod": "DELETE", 10310 // "id": "dlp.organizations.locations.deidentifyTemplates.delete", 10311 // "parameterOrder": [ 10312 // "name" 10313 // ], 10314 // "parameters": { 10315 // "name": { 10316 // "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.", 10317 // "location": "path", 10318 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10319 // "required": true, 10320 // "type": "string" 10321 // } 10322 // }, 10323 // "path": "v2/{+name}", 10324 // "response": { 10325 // "$ref": "GoogleProtobufEmpty" 10326 // }, 10327 // "scopes": [ 10328 // "https://www.googleapis.com/auth/cloud-platform" 10329 // ] 10330 // } 10331 10332} 10333 10334// method id "dlp.organizations.locations.deidentifyTemplates.get": 10335 10336type OrganizationsLocationsDeidentifyTemplatesGetCall struct { 10337 s *Service 10338 name string 10339 urlParams_ gensupport.URLParams 10340 ifNoneMatch_ string 10341 ctx_ context.Context 10342 header_ http.Header 10343} 10344 10345// Get: Gets a DeidentifyTemplate. See 10346// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10347// more. 10348func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10349 c := &OrganizationsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10350 c.name = name 10351 return c 10352} 10353 10354// Fields allows partial responses to be retrieved. See 10355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10356// for more information. 10357func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10358 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10359 return c 10360} 10361 10362// IfNoneMatch sets the optional parameter which makes the operation 10363// fail if the object's ETag matches the given value. This is useful for 10364// getting updates only after the object has changed since the last 10365// request. Use googleapi.IsNotModified to check whether the response 10366// error from Do is the result of In-None-Match. 10367func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10368 c.ifNoneMatch_ = entityTag 10369 return c 10370} 10371 10372// Context sets the context to be used in this call's Do method. Any 10373// pending HTTP request will be aborted if the provided context is 10374// canceled. 10375func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesGetCall { 10376 c.ctx_ = ctx 10377 return c 10378} 10379 10380// Header returns an http.Header that can be modified by the caller to 10381// add HTTP headers to the request. 10382func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 10383 if c.header_ == nil { 10384 c.header_ = make(http.Header) 10385 } 10386 return c.header_ 10387} 10388 10389func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 10390 reqHeaders := make(http.Header) 10391 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10392 for k, v := range c.header_ { 10393 reqHeaders[k] = v 10394 } 10395 reqHeaders.Set("User-Agent", c.s.userAgent()) 10396 if c.ifNoneMatch_ != "" { 10397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10398 } 10399 var body io.Reader = nil 10400 c.urlParams_.Set("alt", alt) 10401 c.urlParams_.Set("prettyPrint", "false") 10402 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10403 urls += "?" + c.urlParams_.Encode() 10404 req, err := http.NewRequest("GET", urls, body) 10405 if err != nil { 10406 return nil, err 10407 } 10408 req.Header = reqHeaders 10409 googleapi.Expand(req.URL, map[string]string{ 10410 "name": c.name, 10411 }) 10412 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10413} 10414 10415// Do executes the "dlp.organizations.locations.deidentifyTemplates.get" call. 10416// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10417// non-nil. Any non-2xx status code is an error. Response headers are in 10418// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10419// (if a response was returned at all) in 10420// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10421// whether the returned error was because http.StatusNotModified was 10422// returned. 10423func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10424 gensupport.SetOptions(c.urlParams_, opts...) 10425 res, err := c.doRequest("json") 10426 if res != nil && res.StatusCode == http.StatusNotModified { 10427 if res.Body != nil { 10428 res.Body.Close() 10429 } 10430 return nil, &googleapi.Error{ 10431 Code: res.StatusCode, 10432 Header: res.Header, 10433 } 10434 } 10435 if err != nil { 10436 return nil, err 10437 } 10438 defer googleapi.CloseBody(res) 10439 if err := googleapi.CheckResponse(res); err != nil { 10440 return nil, err 10441 } 10442 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10443 ServerResponse: googleapi.ServerResponse{ 10444 Header: res.Header, 10445 HTTPStatusCode: res.StatusCode, 10446 }, 10447 } 10448 target := &ret 10449 if err := gensupport.DecodeResponse(target, res); err != nil { 10450 return nil, err 10451 } 10452 return ret, nil 10453 // { 10454 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10455 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10456 // "httpMethod": "GET", 10457 // "id": "dlp.organizations.locations.deidentifyTemplates.get", 10458 // "parameterOrder": [ 10459 // "name" 10460 // ], 10461 // "parameters": { 10462 // "name": { 10463 // "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.", 10464 // "location": "path", 10465 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10466 // "required": true, 10467 // "type": "string" 10468 // } 10469 // }, 10470 // "path": "v2/{+name}", 10471 // "response": { 10472 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10473 // }, 10474 // "scopes": [ 10475 // "https://www.googleapis.com/auth/cloud-platform" 10476 // ] 10477 // } 10478 10479} 10480 10481// method id "dlp.organizations.locations.deidentifyTemplates.list": 10482 10483type OrganizationsLocationsDeidentifyTemplatesListCall struct { 10484 s *Service 10485 parentid string 10486 urlParams_ gensupport.URLParams 10487 ifNoneMatch_ string 10488 ctx_ context.Context 10489 header_ http.Header 10490} 10491 10492// List: Lists DeidentifyTemplates. See 10493// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10494// more. 10495func (r *OrganizationsLocationsDeidentifyTemplatesService) List(parentid string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10496 c := &OrganizationsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10497 c.parentid = parentid 10498 return c 10499} 10500 10501// LocationId sets the optional parameter "locationId": Deprecated. This 10502// field has no effect. 10503func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10504 c.urlParams_.Set("locationId", locationId) 10505 return c 10506} 10507 10508// OrderBy sets the optional parameter "orderBy": Comma separated list 10509// of fields to order by, followed by `asc` or `desc` postfix. This list 10510// is case-insensitive, default sorting order is ascending, redundant 10511// space characters are insignificant. Example: `name asc,update_time, 10512// create_time desc` Supported fields are: - `create_time`: corresponds 10513// to time the template was created. - `update_time`: corresponds to 10514// time the template was last updated. - `name`: corresponds to 10515// template's name. - `display_name`: corresponds to template's display 10516// name. 10517func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10518 c.urlParams_.Set("orderBy", orderBy) 10519 return c 10520} 10521 10522// PageSize sets the optional parameter "pageSize": Size of the page, 10523// can be limited by server. If zero server returns a page of max size 10524// 100. 10525func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { 10526 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10527 return c 10528} 10529 10530// PageToken sets the optional parameter "pageToken": Page token to 10531// continue retrieval. Comes from previous call to 10532// `ListDeidentifyTemplates`. 10533func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10534 c.urlParams_.Set("pageToken", pageToken) 10535 return c 10536} 10537 10538// Fields allows partial responses to be retrieved. See 10539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10540// for more information. 10541func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { 10542 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10543 return c 10544} 10545 10546// IfNoneMatch sets the optional parameter which makes the operation 10547// fail if the object's ETag matches the given value. This is useful for 10548// getting updates only after the object has changed since the last 10549// request. Use googleapi.IsNotModified to check whether the response 10550// error from Do is the result of In-None-Match. 10551func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { 10552 c.ifNoneMatch_ = entityTag 10553 return c 10554} 10555 10556// Context sets the context to be used in this call's Do method. Any 10557// pending HTTP request will be aborted if the provided context is 10558// canceled. 10559func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { 10560 c.ctx_ = ctx 10561 return c 10562} 10563 10564// Header returns an http.Header that can be modified by the caller to 10565// add HTTP headers to the request. 10566func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { 10567 if c.header_ == nil { 10568 c.header_ = make(http.Header) 10569 } 10570 return c.header_ 10571} 10572 10573func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 10574 reqHeaders := make(http.Header) 10575 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10576 for k, v := range c.header_ { 10577 reqHeaders[k] = v 10578 } 10579 reqHeaders.Set("User-Agent", c.s.userAgent()) 10580 if c.ifNoneMatch_ != "" { 10581 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10582 } 10583 var body io.Reader = nil 10584 c.urlParams_.Set("alt", alt) 10585 c.urlParams_.Set("prettyPrint", "false") 10586 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 10587 urls += "?" + c.urlParams_.Encode() 10588 req, err := http.NewRequest("GET", urls, body) 10589 if err != nil { 10590 return nil, err 10591 } 10592 req.Header = reqHeaders 10593 googleapi.Expand(req.URL, map[string]string{ 10594 "parent": c.parentid, 10595 }) 10596 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10597} 10598 10599// Do executes the "dlp.organizations.locations.deidentifyTemplates.list" call. 10600// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 10601// error will be non-nil. Any non-2xx status code is an error. Response 10602// headers are in either 10603// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 10604// er or (if a response was returned at all) in 10605// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10606// whether the returned error was because http.StatusNotModified was 10607// returned. 10608func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 10609 gensupport.SetOptions(c.urlParams_, opts...) 10610 res, err := c.doRequest("json") 10611 if res != nil && res.StatusCode == http.StatusNotModified { 10612 if res.Body != nil { 10613 res.Body.Close() 10614 } 10615 return nil, &googleapi.Error{ 10616 Code: res.StatusCode, 10617 Header: res.Header, 10618 } 10619 } 10620 if err != nil { 10621 return nil, err 10622 } 10623 defer googleapi.CloseBody(res) 10624 if err := googleapi.CheckResponse(res); err != nil { 10625 return nil, err 10626 } 10627 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 10628 ServerResponse: googleapi.ServerResponse{ 10629 Header: res.Header, 10630 HTTPStatusCode: res.StatusCode, 10631 }, 10632 } 10633 target := &ret 10634 if err := gensupport.DecodeResponse(target, res); err != nil { 10635 return nil, err 10636 } 10637 return ret, nil 10638 // { 10639 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10640 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", 10641 // "httpMethod": "GET", 10642 // "id": "dlp.organizations.locations.deidentifyTemplates.list", 10643 // "parameterOrder": [ 10644 // "parent" 10645 // ], 10646 // "parameters": { 10647 // "locationId": { 10648 // "description": "Deprecated. This field has no effect.", 10649 // "location": "query", 10650 // "type": "string" 10651 // }, 10652 // "orderBy": { 10653 // "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.", 10654 // "location": "query", 10655 // "type": "string" 10656 // }, 10657 // "pageSize": { 10658 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 10659 // "format": "int32", 10660 // "location": "query", 10661 // "type": "integer" 10662 // }, 10663 // "pageToken": { 10664 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 10665 // "location": "query", 10666 // "type": "string" 10667 // }, 10668 // "parent": { 10669 // "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", 10670 // "location": "path", 10671 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10672 // "required": true, 10673 // "type": "string" 10674 // } 10675 // }, 10676 // "path": "v2/{+parent}/deidentifyTemplates", 10677 // "response": { 10678 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 10679 // }, 10680 // "scopes": [ 10681 // "https://www.googleapis.com/auth/cloud-platform" 10682 // ] 10683 // } 10684 10685} 10686 10687// Pages invokes f for each page of results. 10688// A non-nil error returned from f will halt the iteration. 10689// The provided context supersedes any context provided to the Context method. 10690func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 10691 c.ctx_ = ctx 10692 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10693 for { 10694 x, err := c.Do() 10695 if err != nil { 10696 return err 10697 } 10698 if err := f(x); err != nil { 10699 return err 10700 } 10701 if x.NextPageToken == "" { 10702 return nil 10703 } 10704 c.PageToken(x.NextPageToken) 10705 } 10706} 10707 10708// method id "dlp.organizations.locations.deidentifyTemplates.patch": 10709 10710type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { 10711 s *Service 10712 name string 10713 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 10714 urlParams_ gensupport.URLParams 10715 ctx_ context.Context 10716 header_ http.Header 10717} 10718 10719// Patch: Updates the DeidentifyTemplate. See 10720// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 10721// more. 10722func (r *OrganizationsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10723 c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10724 c.name = name 10725 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 10726 return c 10727} 10728 10729// Fields allows partial responses to be retrieved. See 10730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10731// for more information. 10732func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10733 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10734 return c 10735} 10736 10737// Context sets the context to be used in this call's Do method. Any 10738// pending HTTP request will be aborted if the provided context is 10739// canceled. 10740func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { 10741 c.ctx_ = ctx 10742 return c 10743} 10744 10745// Header returns an http.Header that can be modified by the caller to 10746// add HTTP headers to the request. 10747func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 10748 if c.header_ == nil { 10749 c.header_ = make(http.Header) 10750 } 10751 return c.header_ 10752} 10753 10754func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 10755 reqHeaders := make(http.Header) 10756 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10757 for k, v := range c.header_ { 10758 reqHeaders[k] = v 10759 } 10760 reqHeaders.Set("User-Agent", c.s.userAgent()) 10761 var body io.Reader = nil 10762 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 10763 if err != nil { 10764 return nil, err 10765 } 10766 reqHeaders.Set("Content-Type", "application/json") 10767 c.urlParams_.Set("alt", alt) 10768 c.urlParams_.Set("prettyPrint", "false") 10769 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 10770 urls += "?" + c.urlParams_.Encode() 10771 req, err := http.NewRequest("PATCH", urls, body) 10772 if err != nil { 10773 return nil, err 10774 } 10775 req.Header = reqHeaders 10776 googleapi.Expand(req.URL, map[string]string{ 10777 "name": c.name, 10778 }) 10779 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10780} 10781 10782// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" call. 10783// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 10784// non-nil. Any non-2xx status code is an error. Response headers are in 10785// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 10786// (if a response was returned at all) in 10787// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10788// whether the returned error was because http.StatusNotModified was 10789// returned. 10790func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 10791 gensupport.SetOptions(c.urlParams_, opts...) 10792 res, err := c.doRequest("json") 10793 if res != nil && res.StatusCode == http.StatusNotModified { 10794 if res.Body != nil { 10795 res.Body.Close() 10796 } 10797 return nil, &googleapi.Error{ 10798 Code: res.StatusCode, 10799 Header: res.Header, 10800 } 10801 } 10802 if err != nil { 10803 return nil, err 10804 } 10805 defer googleapi.CloseBody(res) 10806 if err := googleapi.CheckResponse(res); err != nil { 10807 return nil, err 10808 } 10809 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 10810 ServerResponse: googleapi.ServerResponse{ 10811 Header: res.Header, 10812 HTTPStatusCode: res.StatusCode, 10813 }, 10814 } 10815 target := &ret 10816 if err := gensupport.DecodeResponse(target, res); err != nil { 10817 return nil, err 10818 } 10819 return ret, nil 10820 // { 10821 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 10822 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 10823 // "httpMethod": "PATCH", 10824 // "id": "dlp.organizations.locations.deidentifyTemplates.patch", 10825 // "parameterOrder": [ 10826 // "name" 10827 // ], 10828 // "parameters": { 10829 // "name": { 10830 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 10831 // "location": "path", 10832 // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 10833 // "required": true, 10834 // "type": "string" 10835 // } 10836 // }, 10837 // "path": "v2/{+name}", 10838 // "request": { 10839 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 10840 // }, 10841 // "response": { 10842 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 10843 // }, 10844 // "scopes": [ 10845 // "https://www.googleapis.com/auth/cloud-platform" 10846 // ] 10847 // } 10848 10849} 10850 10851// method id "dlp.organizations.locations.inspectTemplates.create": 10852 10853type OrganizationsLocationsInspectTemplatesCreateCall struct { 10854 s *Service 10855 parentid string 10856 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 10857 urlParams_ gensupport.URLParams 10858 ctx_ context.Context 10859 header_ http.Header 10860} 10861 10862// Create: Creates an InspectTemplate for re-using frequently used 10863// configuration for inspecting content, images, and storage. See 10864// https://cloud.google.com/dlp/docs/creating-templates to learn more. 10865func (r *OrganizationsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesCreateCall { 10866 c := &OrganizationsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10867 c.parentid = parentid 10868 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 10869 return c 10870} 10871 10872// Fields allows partial responses to be retrieved. See 10873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10874// for more information. 10875func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { 10876 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10877 return c 10878} 10879 10880// Context sets the context to be used in this call's Do method. Any 10881// pending HTTP request will be aborted if the provided context is 10882// canceled. 10883func (c *OrganizationsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesCreateCall { 10884 c.ctx_ = ctx 10885 return c 10886} 10887 10888// Header returns an http.Header that can be modified by the caller to 10889// add HTTP headers to the request. 10890func (c *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { 10891 if c.header_ == nil { 10892 c.header_ = make(http.Header) 10893 } 10894 return c.header_ 10895} 10896 10897func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 10898 reqHeaders := make(http.Header) 10899 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10900 for k, v := range c.header_ { 10901 reqHeaders[k] = v 10902 } 10903 reqHeaders.Set("User-Agent", c.s.userAgent()) 10904 var body io.Reader = nil 10905 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 10906 if err != nil { 10907 return nil, err 10908 } 10909 reqHeaders.Set("Content-Type", "application/json") 10910 c.urlParams_.Set("alt", alt) 10911 c.urlParams_.Set("prettyPrint", "false") 10912 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 10913 urls += "?" + c.urlParams_.Encode() 10914 req, err := http.NewRequest("POST", urls, body) 10915 if err != nil { 10916 return nil, err 10917 } 10918 req.Header = reqHeaders 10919 googleapi.Expand(req.URL, map[string]string{ 10920 "parent": c.parentid, 10921 }) 10922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10923} 10924 10925// Do executes the "dlp.organizations.locations.inspectTemplates.create" call. 10926// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 10927// non-nil. Any non-2xx status code is an error. Response headers are in 10928// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 10929// (if a response was returned at all) in 10930// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10931// whether the returned error was because http.StatusNotModified was 10932// returned. 10933func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 10934 gensupport.SetOptions(c.urlParams_, opts...) 10935 res, err := c.doRequest("json") 10936 if res != nil && res.StatusCode == http.StatusNotModified { 10937 if res.Body != nil { 10938 res.Body.Close() 10939 } 10940 return nil, &googleapi.Error{ 10941 Code: res.StatusCode, 10942 Header: res.Header, 10943 } 10944 } 10945 if err != nil { 10946 return nil, err 10947 } 10948 defer googleapi.CloseBody(res) 10949 if err := googleapi.CheckResponse(res); err != nil { 10950 return nil, err 10951 } 10952 ret := &GooglePrivacyDlpV2InspectTemplate{ 10953 ServerResponse: googleapi.ServerResponse{ 10954 Header: res.Header, 10955 HTTPStatusCode: res.StatusCode, 10956 }, 10957 } 10958 target := &ret 10959 if err := gensupport.DecodeResponse(target, res); err != nil { 10960 return nil, err 10961 } 10962 return ret, nil 10963 // { 10964 // "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.", 10965 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 10966 // "httpMethod": "POST", 10967 // "id": "dlp.organizations.locations.inspectTemplates.create", 10968 // "parameterOrder": [ 10969 // "parent" 10970 // ], 10971 // "parameters": { 10972 // "parent": { 10973 // "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", 10974 // "location": "path", 10975 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 10976 // "required": true, 10977 // "type": "string" 10978 // } 10979 // }, 10980 // "path": "v2/{+parent}/inspectTemplates", 10981 // "request": { 10982 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 10983 // }, 10984 // "response": { 10985 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 10986 // }, 10987 // "scopes": [ 10988 // "https://www.googleapis.com/auth/cloud-platform" 10989 // ] 10990 // } 10991 10992} 10993 10994// method id "dlp.organizations.locations.inspectTemplates.delete": 10995 10996type OrganizationsLocationsInspectTemplatesDeleteCall struct { 10997 s *Service 10998 name string 10999 urlParams_ gensupport.URLParams 11000 ctx_ context.Context 11001 header_ http.Header 11002} 11003 11004// Delete: Deletes an InspectTemplate. See 11005// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11006func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *OrganizationsLocationsInspectTemplatesDeleteCall { 11007 c := &OrganizationsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11008 c.name = name 11009 return c 11010} 11011 11012// Fields allows partial responses to be retrieved. See 11013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11014// for more information. 11015func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { 11016 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11017 return c 11018} 11019 11020// Context sets the context to be used in this call's Do method. Any 11021// pending HTTP request will be aborted if the provided context is 11022// canceled. 11023func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { 11024 c.ctx_ = ctx 11025 return c 11026} 11027 11028// Header returns an http.Header that can be modified by the caller to 11029// add HTTP headers to the request. 11030func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { 11031 if c.header_ == nil { 11032 c.header_ = make(http.Header) 11033 } 11034 return c.header_ 11035} 11036 11037func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 11038 reqHeaders := make(http.Header) 11039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11040 for k, v := range c.header_ { 11041 reqHeaders[k] = v 11042 } 11043 reqHeaders.Set("User-Agent", c.s.userAgent()) 11044 var body io.Reader = nil 11045 c.urlParams_.Set("alt", alt) 11046 c.urlParams_.Set("prettyPrint", "false") 11047 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11048 urls += "?" + c.urlParams_.Encode() 11049 req, err := http.NewRequest("DELETE", urls, body) 11050 if err != nil { 11051 return nil, err 11052 } 11053 req.Header = reqHeaders 11054 googleapi.Expand(req.URL, map[string]string{ 11055 "name": c.name, 11056 }) 11057 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11058} 11059 11060// Do executes the "dlp.organizations.locations.inspectTemplates.delete" call. 11061// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11062// non-2xx status code is an error. Response headers are in either 11063// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11064// returned at all) in error.(*googleapi.Error).Header. Use 11065// googleapi.IsNotModified to check whether the returned error was 11066// because http.StatusNotModified was returned. 11067func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11068 gensupport.SetOptions(c.urlParams_, opts...) 11069 res, err := c.doRequest("json") 11070 if res != nil && res.StatusCode == http.StatusNotModified { 11071 if res.Body != nil { 11072 res.Body.Close() 11073 } 11074 return nil, &googleapi.Error{ 11075 Code: res.StatusCode, 11076 Header: res.Header, 11077 } 11078 } 11079 if err != nil { 11080 return nil, err 11081 } 11082 defer googleapi.CloseBody(res) 11083 if err := googleapi.CheckResponse(res); err != nil { 11084 return nil, err 11085 } 11086 ret := &GoogleProtobufEmpty{ 11087 ServerResponse: googleapi.ServerResponse{ 11088 Header: res.Header, 11089 HTTPStatusCode: res.StatusCode, 11090 }, 11091 } 11092 target := &ret 11093 if err := gensupport.DecodeResponse(target, res); err != nil { 11094 return nil, err 11095 } 11096 return ret, nil 11097 // { 11098 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11099 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11100 // "httpMethod": "DELETE", 11101 // "id": "dlp.organizations.locations.inspectTemplates.delete", 11102 // "parameterOrder": [ 11103 // "name" 11104 // ], 11105 // "parameters": { 11106 // "name": { 11107 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11108 // "location": "path", 11109 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11110 // "required": true, 11111 // "type": "string" 11112 // } 11113 // }, 11114 // "path": "v2/{+name}", 11115 // "response": { 11116 // "$ref": "GoogleProtobufEmpty" 11117 // }, 11118 // "scopes": [ 11119 // "https://www.googleapis.com/auth/cloud-platform" 11120 // ] 11121 // } 11122 11123} 11124 11125// method id "dlp.organizations.locations.inspectTemplates.get": 11126 11127type OrganizationsLocationsInspectTemplatesGetCall struct { 11128 s *Service 11129 name string 11130 urlParams_ gensupport.URLParams 11131 ifNoneMatch_ string 11132 ctx_ context.Context 11133 header_ http.Header 11134} 11135 11136// Get: Gets an InspectTemplate. See 11137// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11138func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { 11139 c := &OrganizationsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11140 c.name = name 11141 return c 11142} 11143 11144// Fields allows partial responses to be retrieved. See 11145// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11146// for more information. 11147func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { 11148 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11149 return c 11150} 11151 11152// IfNoneMatch sets the optional parameter which makes the operation 11153// fail if the object's ETag matches the given value. This is useful for 11154// getting updates only after the object has changed since the last 11155// request. Use googleapi.IsNotModified to check whether the response 11156// error from Do is the result of In-None-Match. 11157func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { 11158 c.ifNoneMatch_ = entityTag 11159 return c 11160} 11161 11162// Context sets the context to be used in this call's Do method. Any 11163// pending HTTP request will be aborted if the provided context is 11164// canceled. 11165func (c *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { 11166 c.ctx_ = ctx 11167 return c 11168} 11169 11170// Header returns an http.Header that can be modified by the caller to 11171// add HTTP headers to the request. 11172func (c *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { 11173 if c.header_ == nil { 11174 c.header_ = make(http.Header) 11175 } 11176 return c.header_ 11177} 11178 11179func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 11180 reqHeaders := make(http.Header) 11181 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11182 for k, v := range c.header_ { 11183 reqHeaders[k] = v 11184 } 11185 reqHeaders.Set("User-Agent", c.s.userAgent()) 11186 if c.ifNoneMatch_ != "" { 11187 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11188 } 11189 var body io.Reader = nil 11190 c.urlParams_.Set("alt", alt) 11191 c.urlParams_.Set("prettyPrint", "false") 11192 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11193 urls += "?" + c.urlParams_.Encode() 11194 req, err := http.NewRequest("GET", urls, body) 11195 if err != nil { 11196 return nil, err 11197 } 11198 req.Header = reqHeaders 11199 googleapi.Expand(req.URL, map[string]string{ 11200 "name": c.name, 11201 }) 11202 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11203} 11204 11205// Do executes the "dlp.organizations.locations.inspectTemplates.get" call. 11206// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11207// non-nil. Any non-2xx status code is an error. Response headers are in 11208// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11209// (if a response was returned at all) in 11210// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11211// whether the returned error was because http.StatusNotModified was 11212// returned. 11213func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11214 gensupport.SetOptions(c.urlParams_, opts...) 11215 res, err := c.doRequest("json") 11216 if res != nil && res.StatusCode == http.StatusNotModified { 11217 if res.Body != nil { 11218 res.Body.Close() 11219 } 11220 return nil, &googleapi.Error{ 11221 Code: res.StatusCode, 11222 Header: res.Header, 11223 } 11224 } 11225 if err != nil { 11226 return nil, err 11227 } 11228 defer googleapi.CloseBody(res) 11229 if err := googleapi.CheckResponse(res); err != nil { 11230 return nil, err 11231 } 11232 ret := &GooglePrivacyDlpV2InspectTemplate{ 11233 ServerResponse: googleapi.ServerResponse{ 11234 Header: res.Header, 11235 HTTPStatusCode: res.StatusCode, 11236 }, 11237 } 11238 target := &ret 11239 if err := gensupport.DecodeResponse(target, res); err != nil { 11240 return nil, err 11241 } 11242 return ret, nil 11243 // { 11244 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11245 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11246 // "httpMethod": "GET", 11247 // "id": "dlp.organizations.locations.inspectTemplates.get", 11248 // "parameterOrder": [ 11249 // "name" 11250 // ], 11251 // "parameters": { 11252 // "name": { 11253 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11254 // "location": "path", 11255 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11256 // "required": true, 11257 // "type": "string" 11258 // } 11259 // }, 11260 // "path": "v2/{+name}", 11261 // "response": { 11262 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11263 // }, 11264 // "scopes": [ 11265 // "https://www.googleapis.com/auth/cloud-platform" 11266 // ] 11267 // } 11268 11269} 11270 11271// method id "dlp.organizations.locations.inspectTemplates.list": 11272 11273type OrganizationsLocationsInspectTemplatesListCall struct { 11274 s *Service 11275 parentid string 11276 urlParams_ gensupport.URLParams 11277 ifNoneMatch_ string 11278 ctx_ context.Context 11279 header_ http.Header 11280} 11281 11282// List: Lists InspectTemplates. See 11283// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11284func (r *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { 11285 c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11286 c.parentid = parentid 11287 return c 11288} 11289 11290// LocationId sets the optional parameter "locationId": Deprecated. This 11291// field has no effect. 11292func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsInspectTemplatesListCall { 11293 c.urlParams_.Set("locationId", locationId) 11294 return c 11295} 11296 11297// OrderBy sets the optional parameter "orderBy": Comma separated list 11298// of fields to order by, followed by `asc` or `desc` postfix. This list 11299// is case-insensitive, default sorting order is ascending, redundant 11300// space characters are insignificant. Example: `name asc,update_time, 11301// create_time desc` Supported fields are: - `create_time`: corresponds 11302// to time the template was created. - `update_time`: corresponds to 11303// time the template was last updated. - `name`: corresponds to 11304// template's name. - `display_name`: corresponds to template's display 11305// name. 11306func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { 11307 c.urlParams_.Set("orderBy", orderBy) 11308 return c 11309} 11310 11311// PageSize sets the optional parameter "pageSize": Size of the page, 11312// can be limited by server. If zero server returns a page of max size 11313// 100. 11314func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { 11315 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11316 return c 11317} 11318 11319// PageToken sets the optional parameter "pageToken": Page token to 11320// continue retrieval. Comes from previous call to 11321// `ListInspectTemplates`. 11322func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { 11323 c.urlParams_.Set("pageToken", pageToken) 11324 return c 11325} 11326 11327// Fields allows partial responses to be retrieved. See 11328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11329// for more information. 11330func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesListCall { 11331 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11332 return c 11333} 11334 11335// IfNoneMatch sets the optional parameter which makes the operation 11336// fail if the object's ETag matches the given value. This is useful for 11337// getting updates only after the object has changed since the last 11338// request. Use googleapi.IsNotModified to check whether the response 11339// error from Do is the result of In-None-Match. 11340func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesListCall { 11341 c.ifNoneMatch_ = entityTag 11342 return c 11343} 11344 11345// Context sets the context to be used in this call's Do method. Any 11346// pending HTTP request will be aborted if the provided context is 11347// canceled. 11348func (c *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { 11349 c.ctx_ = ctx 11350 return c 11351} 11352 11353// Header returns an http.Header that can be modified by the caller to 11354// add HTTP headers to the request. 11355func (c *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { 11356 if c.header_ == nil { 11357 c.header_ = make(http.Header) 11358 } 11359 return c.header_ 11360} 11361 11362func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 11363 reqHeaders := make(http.Header) 11364 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11365 for k, v := range c.header_ { 11366 reqHeaders[k] = v 11367 } 11368 reqHeaders.Set("User-Agent", c.s.userAgent()) 11369 if c.ifNoneMatch_ != "" { 11370 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11371 } 11372 var body io.Reader = nil 11373 c.urlParams_.Set("alt", alt) 11374 c.urlParams_.Set("prettyPrint", "false") 11375 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 11376 urls += "?" + c.urlParams_.Encode() 11377 req, err := http.NewRequest("GET", urls, body) 11378 if err != nil { 11379 return nil, err 11380 } 11381 req.Header = reqHeaders 11382 googleapi.Expand(req.URL, map[string]string{ 11383 "parent": c.parentid, 11384 }) 11385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11386} 11387 11388// Do executes the "dlp.organizations.locations.inspectTemplates.list" call. 11389// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 11390// error will be non-nil. Any non-2xx status code is an error. Response 11391// headers are in either 11392// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 11393// or (if a response was returned at all) in 11394// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11395// whether the returned error was because http.StatusNotModified was 11396// returned. 11397func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 11398 gensupport.SetOptions(c.urlParams_, opts...) 11399 res, err := c.doRequest("json") 11400 if res != nil && res.StatusCode == http.StatusNotModified { 11401 if res.Body != nil { 11402 res.Body.Close() 11403 } 11404 return nil, &googleapi.Error{ 11405 Code: res.StatusCode, 11406 Header: res.Header, 11407 } 11408 } 11409 if err != nil { 11410 return nil, err 11411 } 11412 defer googleapi.CloseBody(res) 11413 if err := googleapi.CheckResponse(res); err != nil { 11414 return nil, err 11415 } 11416 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 11417 ServerResponse: googleapi.ServerResponse{ 11418 Header: res.Header, 11419 HTTPStatusCode: res.StatusCode, 11420 }, 11421 } 11422 target := &ret 11423 if err := gensupport.DecodeResponse(target, res); err != nil { 11424 return nil, err 11425 } 11426 return ret, nil 11427 // { 11428 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11429 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", 11430 // "httpMethod": "GET", 11431 // "id": "dlp.organizations.locations.inspectTemplates.list", 11432 // "parameterOrder": [ 11433 // "parent" 11434 // ], 11435 // "parameters": { 11436 // "locationId": { 11437 // "description": "Deprecated. This field has no effect.", 11438 // "location": "query", 11439 // "type": "string" 11440 // }, 11441 // "orderBy": { 11442 // "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.", 11443 // "location": "query", 11444 // "type": "string" 11445 // }, 11446 // "pageSize": { 11447 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 11448 // "format": "int32", 11449 // "location": "query", 11450 // "type": "integer" 11451 // }, 11452 // "pageToken": { 11453 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 11454 // "location": "query", 11455 // "type": "string" 11456 // }, 11457 // "parent": { 11458 // "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", 11459 // "location": "path", 11460 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11461 // "required": true, 11462 // "type": "string" 11463 // } 11464 // }, 11465 // "path": "v2/{+parent}/inspectTemplates", 11466 // "response": { 11467 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 11468 // }, 11469 // "scopes": [ 11470 // "https://www.googleapis.com/auth/cloud-platform" 11471 // ] 11472 // } 11473 11474} 11475 11476// Pages invokes f for each page of results. 11477// A non-nil error returned from f will halt the iteration. 11478// The provided context supersedes any context provided to the Context method. 11479func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 11480 c.ctx_ = ctx 11481 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11482 for { 11483 x, err := c.Do() 11484 if err != nil { 11485 return err 11486 } 11487 if err := f(x); err != nil { 11488 return err 11489 } 11490 if x.NextPageToken == "" { 11491 return nil 11492 } 11493 c.PageToken(x.NextPageToken) 11494 } 11495} 11496 11497// method id "dlp.organizations.locations.inspectTemplates.patch": 11498 11499type OrganizationsLocationsInspectTemplatesPatchCall struct { 11500 s *Service 11501 name string 11502 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 11503 urlParams_ gensupport.URLParams 11504 ctx_ context.Context 11505 header_ http.Header 11506} 11507 11508// Patch: Updates the InspectTemplate. See 11509// https://cloud.google.com/dlp/docs/creating-templates to learn more. 11510func (r *OrganizationsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { 11511 c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11512 c.name = name 11513 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 11514 return c 11515} 11516 11517// Fields allows partial responses to be retrieved. See 11518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11519// for more information. 11520func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { 11521 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11522 return c 11523} 11524 11525// Context sets the context to be used in this call's Do method. Any 11526// pending HTTP request will be aborted if the provided context is 11527// canceled. 11528func (c *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { 11529 c.ctx_ = ctx 11530 return c 11531} 11532 11533// Header returns an http.Header that can be modified by the caller to 11534// add HTTP headers to the request. 11535func (c *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { 11536 if c.header_ == nil { 11537 c.header_ = make(http.Header) 11538 } 11539 return c.header_ 11540} 11541 11542func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 11543 reqHeaders := make(http.Header) 11544 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11545 for k, v := range c.header_ { 11546 reqHeaders[k] = v 11547 } 11548 reqHeaders.Set("User-Agent", c.s.userAgent()) 11549 var body io.Reader = nil 11550 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 11551 if err != nil { 11552 return nil, err 11553 } 11554 reqHeaders.Set("Content-Type", "application/json") 11555 c.urlParams_.Set("alt", alt) 11556 c.urlParams_.Set("prettyPrint", "false") 11557 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11558 urls += "?" + c.urlParams_.Encode() 11559 req, err := http.NewRequest("PATCH", urls, body) 11560 if err != nil { 11561 return nil, err 11562 } 11563 req.Header = reqHeaders 11564 googleapi.Expand(req.URL, map[string]string{ 11565 "name": c.name, 11566 }) 11567 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11568} 11569 11570// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. 11571// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 11572// non-nil. Any non-2xx status code is an error. Response headers are in 11573// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 11574// (if a response was returned at all) in 11575// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11576// whether the returned error was because http.StatusNotModified was 11577// returned. 11578func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 11579 gensupport.SetOptions(c.urlParams_, opts...) 11580 res, err := c.doRequest("json") 11581 if res != nil && res.StatusCode == http.StatusNotModified { 11582 if res.Body != nil { 11583 res.Body.Close() 11584 } 11585 return nil, &googleapi.Error{ 11586 Code: res.StatusCode, 11587 Header: res.Header, 11588 } 11589 } 11590 if err != nil { 11591 return nil, err 11592 } 11593 defer googleapi.CloseBody(res) 11594 if err := googleapi.CheckResponse(res); err != nil { 11595 return nil, err 11596 } 11597 ret := &GooglePrivacyDlpV2InspectTemplate{ 11598 ServerResponse: googleapi.ServerResponse{ 11599 Header: res.Header, 11600 HTTPStatusCode: res.StatusCode, 11601 }, 11602 } 11603 target := &ret 11604 if err := gensupport.DecodeResponse(target, res); err != nil { 11605 return nil, err 11606 } 11607 return ret, nil 11608 // { 11609 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 11610 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 11611 // "httpMethod": "PATCH", 11612 // "id": "dlp.organizations.locations.inspectTemplates.patch", 11613 // "parameterOrder": [ 11614 // "name" 11615 // ], 11616 // "parameters": { 11617 // "name": { 11618 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 11619 // "location": "path", 11620 // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 11621 // "required": true, 11622 // "type": "string" 11623 // } 11624 // }, 11625 // "path": "v2/{+name}", 11626 // "request": { 11627 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 11628 // }, 11629 // "response": { 11630 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 11631 // }, 11632 // "scopes": [ 11633 // "https://www.googleapis.com/auth/cloud-platform" 11634 // ] 11635 // } 11636 11637} 11638 11639// method id "dlp.organizations.locations.storedInfoTypes.create": 11640 11641type OrganizationsLocationsStoredInfoTypesCreateCall struct { 11642 s *Service 11643 parentid string 11644 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 11645 urlParams_ gensupport.URLParams 11646 ctx_ context.Context 11647 header_ http.Header 11648} 11649 11650// Create: Creates a pre-built stored infoType to be used for 11651// inspection. See 11652// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11653// more. 11654func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { 11655 c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11656 c.parentid = parentid 11657 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 11658 return c 11659} 11660 11661// Fields allows partial responses to be retrieved. See 11662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11663// for more information. 11664func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { 11665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11666 return c 11667} 11668 11669// Context sets the context to be used in this call's Do method. Any 11670// pending HTTP request will be aborted if the provided context is 11671// canceled. 11672func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesCreateCall { 11673 c.ctx_ = ctx 11674 return c 11675} 11676 11677// Header returns an http.Header that can be modified by the caller to 11678// add HTTP headers to the request. 11679func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { 11680 if c.header_ == nil { 11681 c.header_ = make(http.Header) 11682 } 11683 return c.header_ 11684} 11685 11686func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 11687 reqHeaders := make(http.Header) 11688 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11689 for k, v := range c.header_ { 11690 reqHeaders[k] = v 11691 } 11692 reqHeaders.Set("User-Agent", c.s.userAgent()) 11693 var body io.Reader = nil 11694 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 11695 if err != nil { 11696 return nil, err 11697 } 11698 reqHeaders.Set("Content-Type", "application/json") 11699 c.urlParams_.Set("alt", alt) 11700 c.urlParams_.Set("prettyPrint", "false") 11701 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 11702 urls += "?" + c.urlParams_.Encode() 11703 req, err := http.NewRequest("POST", urls, body) 11704 if err != nil { 11705 return nil, err 11706 } 11707 req.Header = reqHeaders 11708 googleapi.Expand(req.URL, map[string]string{ 11709 "parent": c.parentid, 11710 }) 11711 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11712} 11713 11714// Do executes the "dlp.organizations.locations.storedInfoTypes.create" call. 11715// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 11716// non-nil. Any non-2xx status code is an error. Response headers are in 11717// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 11718// a response was returned at all) in error.(*googleapi.Error).Header. 11719// Use googleapi.IsNotModified to check whether the returned error was 11720// because http.StatusNotModified was returned. 11721func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 11722 gensupport.SetOptions(c.urlParams_, opts...) 11723 res, err := c.doRequest("json") 11724 if res != nil && res.StatusCode == http.StatusNotModified { 11725 if res.Body != nil { 11726 res.Body.Close() 11727 } 11728 return nil, &googleapi.Error{ 11729 Code: res.StatusCode, 11730 Header: res.Header, 11731 } 11732 } 11733 if err != nil { 11734 return nil, err 11735 } 11736 defer googleapi.CloseBody(res) 11737 if err := googleapi.CheckResponse(res); err != nil { 11738 return nil, err 11739 } 11740 ret := &GooglePrivacyDlpV2StoredInfoType{ 11741 ServerResponse: googleapi.ServerResponse{ 11742 Header: res.Header, 11743 HTTPStatusCode: res.StatusCode, 11744 }, 11745 } 11746 target := &ret 11747 if err := gensupport.DecodeResponse(target, res); err != nil { 11748 return nil, err 11749 } 11750 return ret, nil 11751 // { 11752 // "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.", 11753 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 11754 // "httpMethod": "POST", 11755 // "id": "dlp.organizations.locations.storedInfoTypes.create", 11756 // "parameterOrder": [ 11757 // "parent" 11758 // ], 11759 // "parameters": { 11760 // "parent": { 11761 // "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", 11762 // "location": "path", 11763 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 11764 // "required": true, 11765 // "type": "string" 11766 // } 11767 // }, 11768 // "path": "v2/{+parent}/storedInfoTypes", 11769 // "request": { 11770 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 11771 // }, 11772 // "response": { 11773 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 11774 // }, 11775 // "scopes": [ 11776 // "https://www.googleapis.com/auth/cloud-platform" 11777 // ] 11778 // } 11779 11780} 11781 11782// method id "dlp.organizations.locations.storedInfoTypes.delete": 11783 11784type OrganizationsLocationsStoredInfoTypesDeleteCall struct { 11785 s *Service 11786 name string 11787 urlParams_ gensupport.URLParams 11788 ctx_ context.Context 11789 header_ http.Header 11790} 11791 11792// Delete: Deletes a stored infoType. See 11793// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11794// more. 11795func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11796 c := &OrganizationsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11797 c.name = name 11798 return c 11799} 11800 11801// Fields allows partial responses to be retrieved. See 11802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11803// for more information. 11804func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11805 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11806 return c 11807} 11808 11809// Context sets the context to be used in this call's Do method. Any 11810// pending HTTP request will be aborted if the provided context is 11811// canceled. 11812func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesDeleteCall { 11813 c.ctx_ = ctx 11814 return c 11815} 11816 11817// Header returns an http.Header that can be modified by the caller to 11818// add HTTP headers to the request. 11819func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 11820 if c.header_ == nil { 11821 c.header_ = make(http.Header) 11822 } 11823 return c.header_ 11824} 11825 11826func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 11827 reqHeaders := make(http.Header) 11828 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11829 for k, v := range c.header_ { 11830 reqHeaders[k] = v 11831 } 11832 reqHeaders.Set("User-Agent", c.s.userAgent()) 11833 var body io.Reader = nil 11834 c.urlParams_.Set("alt", alt) 11835 c.urlParams_.Set("prettyPrint", "false") 11836 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11837 urls += "?" + c.urlParams_.Encode() 11838 req, err := http.NewRequest("DELETE", urls, body) 11839 if err != nil { 11840 return nil, err 11841 } 11842 req.Header = reqHeaders 11843 googleapi.Expand(req.URL, map[string]string{ 11844 "name": c.name, 11845 }) 11846 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11847} 11848 11849// Do executes the "dlp.organizations.locations.storedInfoTypes.delete" call. 11850// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11851// non-2xx status code is an error. Response headers are in either 11852// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11853// returned at all) in error.(*googleapi.Error).Header. Use 11854// googleapi.IsNotModified to check whether the returned error was 11855// because http.StatusNotModified was returned. 11856func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11857 gensupport.SetOptions(c.urlParams_, opts...) 11858 res, err := c.doRequest("json") 11859 if res != nil && res.StatusCode == http.StatusNotModified { 11860 if res.Body != nil { 11861 res.Body.Close() 11862 } 11863 return nil, &googleapi.Error{ 11864 Code: res.StatusCode, 11865 Header: res.Header, 11866 } 11867 } 11868 if err != nil { 11869 return nil, err 11870 } 11871 defer googleapi.CloseBody(res) 11872 if err := googleapi.CheckResponse(res); err != nil { 11873 return nil, err 11874 } 11875 ret := &GoogleProtobufEmpty{ 11876 ServerResponse: googleapi.ServerResponse{ 11877 Header: res.Header, 11878 HTTPStatusCode: res.StatusCode, 11879 }, 11880 } 11881 target := &ret 11882 if err := gensupport.DecodeResponse(target, res); err != nil { 11883 return nil, err 11884 } 11885 return ret, nil 11886 // { 11887 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 11888 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 11889 // "httpMethod": "DELETE", 11890 // "id": "dlp.organizations.locations.storedInfoTypes.delete", 11891 // "parameterOrder": [ 11892 // "name" 11893 // ], 11894 // "parameters": { 11895 // "name": { 11896 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 11897 // "location": "path", 11898 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 11899 // "required": true, 11900 // "type": "string" 11901 // } 11902 // }, 11903 // "path": "v2/{+name}", 11904 // "response": { 11905 // "$ref": "GoogleProtobufEmpty" 11906 // }, 11907 // "scopes": [ 11908 // "https://www.googleapis.com/auth/cloud-platform" 11909 // ] 11910 // } 11911 11912} 11913 11914// method id "dlp.organizations.locations.storedInfoTypes.get": 11915 11916type OrganizationsLocationsStoredInfoTypesGetCall struct { 11917 s *Service 11918 name string 11919 urlParams_ gensupport.URLParams 11920 ifNoneMatch_ string 11921 ctx_ context.Context 11922 header_ http.Header 11923} 11924 11925// Get: Gets a stored infoType. See 11926// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 11927// more. 11928func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { 11929 c := &OrganizationsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11930 c.name = name 11931 return c 11932} 11933 11934// Fields allows partial responses to be retrieved. See 11935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11936// for more information. 11937func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { 11938 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11939 return c 11940} 11941 11942// IfNoneMatch sets the optional parameter which makes the operation 11943// fail if the object's ETag matches the given value. This is useful for 11944// getting updates only after the object has changed since the last 11945// request. Use googleapi.IsNotModified to check whether the response 11946// error from Do is the result of In-None-Match. 11947func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { 11948 c.ifNoneMatch_ = entityTag 11949 return c 11950} 11951 11952// Context sets the context to be used in this call's Do method. Any 11953// pending HTTP request will be aborted if the provided context is 11954// canceled. 11955func (c *OrganizationsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesGetCall { 11956 c.ctx_ = ctx 11957 return c 11958} 11959 11960// Header returns an http.Header that can be modified by the caller to 11961// add HTTP headers to the request. 11962func (c *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { 11963 if c.header_ == nil { 11964 c.header_ = make(http.Header) 11965 } 11966 return c.header_ 11967} 11968 11969func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 11970 reqHeaders := make(http.Header) 11971 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 11972 for k, v := range c.header_ { 11973 reqHeaders[k] = v 11974 } 11975 reqHeaders.Set("User-Agent", c.s.userAgent()) 11976 if c.ifNoneMatch_ != "" { 11977 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11978 } 11979 var body io.Reader = nil 11980 c.urlParams_.Set("alt", alt) 11981 c.urlParams_.Set("prettyPrint", "false") 11982 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 11983 urls += "?" + c.urlParams_.Encode() 11984 req, err := http.NewRequest("GET", urls, body) 11985 if err != nil { 11986 return nil, err 11987 } 11988 req.Header = reqHeaders 11989 googleapi.Expand(req.URL, map[string]string{ 11990 "name": c.name, 11991 }) 11992 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11993} 11994 11995// Do executes the "dlp.organizations.locations.storedInfoTypes.get" call. 11996// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 11997// non-nil. Any non-2xx status code is an error. Response headers are in 11998// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 11999// a response was returned at all) in error.(*googleapi.Error).Header. 12000// Use googleapi.IsNotModified to check whether the returned error was 12001// because http.StatusNotModified was returned. 12002func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12003 gensupport.SetOptions(c.urlParams_, opts...) 12004 res, err := c.doRequest("json") 12005 if res != nil && res.StatusCode == http.StatusNotModified { 12006 if res.Body != nil { 12007 res.Body.Close() 12008 } 12009 return nil, &googleapi.Error{ 12010 Code: res.StatusCode, 12011 Header: res.Header, 12012 } 12013 } 12014 if err != nil { 12015 return nil, err 12016 } 12017 defer googleapi.CloseBody(res) 12018 if err := googleapi.CheckResponse(res); err != nil { 12019 return nil, err 12020 } 12021 ret := &GooglePrivacyDlpV2StoredInfoType{ 12022 ServerResponse: googleapi.ServerResponse{ 12023 Header: res.Header, 12024 HTTPStatusCode: res.StatusCode, 12025 }, 12026 } 12027 target := &ret 12028 if err := gensupport.DecodeResponse(target, res); err != nil { 12029 return nil, err 12030 } 12031 return ret, nil 12032 // { 12033 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12034 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 12035 // "httpMethod": "GET", 12036 // "id": "dlp.organizations.locations.storedInfoTypes.get", 12037 // "parameterOrder": [ 12038 // "name" 12039 // ], 12040 // "parameters": { 12041 // "name": { 12042 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12043 // "location": "path", 12044 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 12045 // "required": true, 12046 // "type": "string" 12047 // } 12048 // }, 12049 // "path": "v2/{+name}", 12050 // "response": { 12051 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12052 // }, 12053 // "scopes": [ 12054 // "https://www.googleapis.com/auth/cloud-platform" 12055 // ] 12056 // } 12057 12058} 12059 12060// method id "dlp.organizations.locations.storedInfoTypes.list": 12061 12062type OrganizationsLocationsStoredInfoTypesListCall struct { 12063 s *Service 12064 parentid string 12065 urlParams_ gensupport.URLParams 12066 ifNoneMatch_ string 12067 ctx_ context.Context 12068 header_ http.Header 12069} 12070 12071// List: Lists stored infoTypes. See 12072// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12073// more. 12074func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { 12075 c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12076 c.parentid = parentid 12077 return c 12078} 12079 12080// LocationId sets the optional parameter "locationId": Deprecated. This 12081// field has no effect. 12082func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsLocationsStoredInfoTypesListCall { 12083 c.urlParams_.Set("locationId", locationId) 12084 return c 12085} 12086 12087// OrderBy sets the optional parameter "orderBy": Comma separated list 12088// of fields to order by, followed by `asc` or `desc` postfix. This list 12089// is case-insensitive, default sorting order is ascending, redundant 12090// space characters are insignificant. Example: `name asc, display_name, 12091// create_time desc` Supported fields are: - `create_time`: corresponds 12092// to time the most recent version of the resource was created. - 12093// `state`: corresponds to the state of the resource. - `name`: 12094// corresponds to resource name. - `display_name`: corresponds to info 12095// type's display name. 12096func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsLocationsStoredInfoTypesListCall { 12097 c.urlParams_.Set("orderBy", orderBy) 12098 return c 12099} 12100 12101// PageSize sets the optional parameter "pageSize": Size of the page, 12102// can be limited by server. If zero server returns a page of max size 12103// 100. 12104func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { 12105 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12106 return c 12107} 12108 12109// PageToken sets the optional parameter "pageToken": Page token to 12110// continue retrieval. Comes from previous call to 12111// `ListStoredInfoTypes`. 12112func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { 12113 c.urlParams_.Set("pageToken", pageToken) 12114 return c 12115} 12116 12117// Fields allows partial responses to be retrieved. See 12118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12119// for more information. 12120func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { 12121 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12122 return c 12123} 12124 12125// IfNoneMatch sets the optional parameter which makes the operation 12126// fail if the object's ETag matches the given value. This is useful for 12127// getting updates only after the object has changed since the last 12128// request. Use googleapi.IsNotModified to check whether the response 12129// error from Do is the result of In-None-Match. 12130func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { 12131 c.ifNoneMatch_ = entityTag 12132 return c 12133} 12134 12135// Context sets the context to be used in this call's Do method. Any 12136// pending HTTP request will be aborted if the provided context is 12137// canceled. 12138func (c *OrganizationsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesListCall { 12139 c.ctx_ = ctx 12140 return c 12141} 12142 12143// Header returns an http.Header that can be modified by the caller to 12144// add HTTP headers to the request. 12145func (c *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { 12146 if c.header_ == nil { 12147 c.header_ = make(http.Header) 12148 } 12149 return c.header_ 12150} 12151 12152func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 12153 reqHeaders := make(http.Header) 12154 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12155 for k, v := range c.header_ { 12156 reqHeaders[k] = v 12157 } 12158 reqHeaders.Set("User-Agent", c.s.userAgent()) 12159 if c.ifNoneMatch_ != "" { 12160 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12161 } 12162 var body io.Reader = nil 12163 c.urlParams_.Set("alt", alt) 12164 c.urlParams_.Set("prettyPrint", "false") 12165 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12166 urls += "?" + c.urlParams_.Encode() 12167 req, err := http.NewRequest("GET", urls, body) 12168 if err != nil { 12169 return nil, err 12170 } 12171 req.Header = reqHeaders 12172 googleapi.Expand(req.URL, map[string]string{ 12173 "parent": c.parentid, 12174 }) 12175 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12176} 12177 12178// Do executes the "dlp.organizations.locations.storedInfoTypes.list" call. 12179// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 12180// error will be non-nil. Any non-2xx status code is an error. Response 12181// headers are in either 12182// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 12183// or (if a response was returned at all) in 12184// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12185// whether the returned error was because http.StatusNotModified was 12186// returned. 12187func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 12188 gensupport.SetOptions(c.urlParams_, opts...) 12189 res, err := c.doRequest("json") 12190 if res != nil && res.StatusCode == http.StatusNotModified { 12191 if res.Body != nil { 12192 res.Body.Close() 12193 } 12194 return nil, &googleapi.Error{ 12195 Code: res.StatusCode, 12196 Header: res.Header, 12197 } 12198 } 12199 if err != nil { 12200 return nil, err 12201 } 12202 defer googleapi.CloseBody(res) 12203 if err := googleapi.CheckResponse(res); err != nil { 12204 return nil, err 12205 } 12206 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 12207 ServerResponse: googleapi.ServerResponse{ 12208 Header: res.Header, 12209 HTTPStatusCode: res.StatusCode, 12210 }, 12211 } 12212 target := &ret 12213 if err := gensupport.DecodeResponse(target, res); err != nil { 12214 return nil, err 12215 } 12216 return ret, nil 12217 // { 12218 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12219 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", 12220 // "httpMethod": "GET", 12221 // "id": "dlp.organizations.locations.storedInfoTypes.list", 12222 // "parameterOrder": [ 12223 // "parent" 12224 // ], 12225 // "parameters": { 12226 // "locationId": { 12227 // "description": "Deprecated. This field has no effect.", 12228 // "location": "query", 12229 // "type": "string" 12230 // }, 12231 // "orderBy": { 12232 // "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.", 12233 // "location": "query", 12234 // "type": "string" 12235 // }, 12236 // "pageSize": { 12237 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 12238 // "format": "int32", 12239 // "location": "query", 12240 // "type": "integer" 12241 // }, 12242 // "pageToken": { 12243 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 12244 // "location": "query", 12245 // "type": "string" 12246 // }, 12247 // "parent": { 12248 // "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", 12249 // "location": "path", 12250 // "pattern": "^organizations/[^/]+/locations/[^/]+$", 12251 // "required": true, 12252 // "type": "string" 12253 // } 12254 // }, 12255 // "path": "v2/{+parent}/storedInfoTypes", 12256 // "response": { 12257 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 12258 // }, 12259 // "scopes": [ 12260 // "https://www.googleapis.com/auth/cloud-platform" 12261 // ] 12262 // } 12263 12264} 12265 12266// Pages invokes f for each page of results. 12267// A non-nil error returned from f will halt the iteration. 12268// The provided context supersedes any context provided to the Context method. 12269func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 12270 c.ctx_ = ctx 12271 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12272 for { 12273 x, err := c.Do() 12274 if err != nil { 12275 return err 12276 } 12277 if err := f(x); err != nil { 12278 return err 12279 } 12280 if x.NextPageToken == "" { 12281 return nil 12282 } 12283 c.PageToken(x.NextPageToken) 12284 } 12285} 12286 12287// method id "dlp.organizations.locations.storedInfoTypes.patch": 12288 12289type OrganizationsLocationsStoredInfoTypesPatchCall struct { 12290 s *Service 12291 name string 12292 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 12293 urlParams_ gensupport.URLParams 12294 ctx_ context.Context 12295 header_ http.Header 12296} 12297 12298// Patch: Updates the stored infoType by creating a new version. The 12299// existing version will continue to be used until the new version is 12300// ready. See 12301// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12302// more. 12303func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { 12304 c := &OrganizationsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12305 c.name = name 12306 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 12307 return c 12308} 12309 12310// Fields allows partial responses to be retrieved. See 12311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12312// for more information. 12313func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { 12314 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12315 return c 12316} 12317 12318// Context sets the context to be used in this call's Do method. Any 12319// pending HTTP request will be aborted if the provided context is 12320// canceled. 12321func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesPatchCall { 12322 c.ctx_ = ctx 12323 return c 12324} 12325 12326// Header returns an http.Header that can be modified by the caller to 12327// add HTTP headers to the request. 12328func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { 12329 if c.header_ == nil { 12330 c.header_ = make(http.Header) 12331 } 12332 return c.header_ 12333} 12334 12335func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 12336 reqHeaders := make(http.Header) 12337 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12338 for k, v := range c.header_ { 12339 reqHeaders[k] = v 12340 } 12341 reqHeaders.Set("User-Agent", c.s.userAgent()) 12342 var body io.Reader = nil 12343 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 12344 if err != nil { 12345 return nil, err 12346 } 12347 reqHeaders.Set("Content-Type", "application/json") 12348 c.urlParams_.Set("alt", alt) 12349 c.urlParams_.Set("prettyPrint", "false") 12350 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12351 urls += "?" + c.urlParams_.Encode() 12352 req, err := http.NewRequest("PATCH", urls, body) 12353 if err != nil { 12354 return nil, err 12355 } 12356 req.Header = reqHeaders 12357 googleapi.Expand(req.URL, map[string]string{ 12358 "name": c.name, 12359 }) 12360 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12361} 12362 12363// Do executes the "dlp.organizations.locations.storedInfoTypes.patch" call. 12364// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12365// non-nil. Any non-2xx status code is an error. Response headers are in 12366// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12367// a response was returned at all) in error.(*googleapi.Error).Header. 12368// Use googleapi.IsNotModified to check whether the returned error was 12369// because http.StatusNotModified was returned. 12370func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12371 gensupport.SetOptions(c.urlParams_, opts...) 12372 res, err := c.doRequest("json") 12373 if res != nil && res.StatusCode == http.StatusNotModified { 12374 if res.Body != nil { 12375 res.Body.Close() 12376 } 12377 return nil, &googleapi.Error{ 12378 Code: res.StatusCode, 12379 Header: res.Header, 12380 } 12381 } 12382 if err != nil { 12383 return nil, err 12384 } 12385 defer googleapi.CloseBody(res) 12386 if err := googleapi.CheckResponse(res); err != nil { 12387 return nil, err 12388 } 12389 ret := &GooglePrivacyDlpV2StoredInfoType{ 12390 ServerResponse: googleapi.ServerResponse{ 12391 Header: res.Header, 12392 HTTPStatusCode: res.StatusCode, 12393 }, 12394 } 12395 target := &ret 12396 if err := gensupport.DecodeResponse(target, res); err != nil { 12397 return nil, err 12398 } 12399 return ret, nil 12400 // { 12401 // "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.", 12402 // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 12403 // "httpMethod": "PATCH", 12404 // "id": "dlp.organizations.locations.storedInfoTypes.patch", 12405 // "parameterOrder": [ 12406 // "name" 12407 // ], 12408 // "parameters": { 12409 // "name": { 12410 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12411 // "location": "path", 12412 // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 12413 // "required": true, 12414 // "type": "string" 12415 // } 12416 // }, 12417 // "path": "v2/{+name}", 12418 // "request": { 12419 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 12420 // }, 12421 // "response": { 12422 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12423 // }, 12424 // "scopes": [ 12425 // "https://www.googleapis.com/auth/cloud-platform" 12426 // ] 12427 // } 12428 12429} 12430 12431// method id "dlp.organizations.storedInfoTypes.create": 12432 12433type OrganizationsStoredInfoTypesCreateCall struct { 12434 s *Service 12435 parentid string 12436 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 12437 urlParams_ gensupport.URLParams 12438 ctx_ context.Context 12439 header_ http.Header 12440} 12441 12442// Create: Creates a pre-built stored infoType to be used for 12443// inspection. See 12444// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12445// more. 12446func (r *OrganizationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { 12447 c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12448 c.parentid = parentid 12449 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 12450 return c 12451} 12452 12453// Fields allows partial responses to be retrieved. See 12454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12455// for more information. 12456func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { 12457 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12458 return c 12459} 12460 12461// Context sets the context to be used in this call's Do method. Any 12462// pending HTTP request will be aborted if the provided context is 12463// canceled. 12464func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { 12465 c.ctx_ = ctx 12466 return c 12467} 12468 12469// Header returns an http.Header that can be modified by the caller to 12470// add HTTP headers to the request. 12471func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { 12472 if c.header_ == nil { 12473 c.header_ = make(http.Header) 12474 } 12475 return c.header_ 12476} 12477 12478func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 12479 reqHeaders := make(http.Header) 12480 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12481 for k, v := range c.header_ { 12482 reqHeaders[k] = v 12483 } 12484 reqHeaders.Set("User-Agent", c.s.userAgent()) 12485 var body io.Reader = nil 12486 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 12487 if err != nil { 12488 return nil, err 12489 } 12490 reqHeaders.Set("Content-Type", "application/json") 12491 c.urlParams_.Set("alt", alt) 12492 c.urlParams_.Set("prettyPrint", "false") 12493 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12494 urls += "?" + c.urlParams_.Encode() 12495 req, err := http.NewRequest("POST", urls, body) 12496 if err != nil { 12497 return nil, err 12498 } 12499 req.Header = reqHeaders 12500 googleapi.Expand(req.URL, map[string]string{ 12501 "parent": c.parentid, 12502 }) 12503 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12504} 12505 12506// Do executes the "dlp.organizations.storedInfoTypes.create" call. 12507// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12508// non-nil. Any non-2xx status code is an error. Response headers are in 12509// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12510// a response was returned at all) in error.(*googleapi.Error).Header. 12511// Use googleapi.IsNotModified to check whether the returned error was 12512// because http.StatusNotModified was returned. 12513func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12514 gensupport.SetOptions(c.urlParams_, opts...) 12515 res, err := c.doRequest("json") 12516 if res != nil && res.StatusCode == http.StatusNotModified { 12517 if res.Body != nil { 12518 res.Body.Close() 12519 } 12520 return nil, &googleapi.Error{ 12521 Code: res.StatusCode, 12522 Header: res.Header, 12523 } 12524 } 12525 if err != nil { 12526 return nil, err 12527 } 12528 defer googleapi.CloseBody(res) 12529 if err := googleapi.CheckResponse(res); err != nil { 12530 return nil, err 12531 } 12532 ret := &GooglePrivacyDlpV2StoredInfoType{ 12533 ServerResponse: googleapi.ServerResponse{ 12534 Header: res.Header, 12535 HTTPStatusCode: res.StatusCode, 12536 }, 12537 } 12538 target := &ret 12539 if err := gensupport.DecodeResponse(target, res); err != nil { 12540 return nil, err 12541 } 12542 return ret, nil 12543 // { 12544 // "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.", 12545 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 12546 // "httpMethod": "POST", 12547 // "id": "dlp.organizations.storedInfoTypes.create", 12548 // "parameterOrder": [ 12549 // "parent" 12550 // ], 12551 // "parameters": { 12552 // "parent": { 12553 // "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", 12554 // "location": "path", 12555 // "pattern": "^organizations/[^/]+$", 12556 // "required": true, 12557 // "type": "string" 12558 // } 12559 // }, 12560 // "path": "v2/{+parent}/storedInfoTypes", 12561 // "request": { 12562 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 12563 // }, 12564 // "response": { 12565 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12566 // }, 12567 // "scopes": [ 12568 // "https://www.googleapis.com/auth/cloud-platform" 12569 // ] 12570 // } 12571 12572} 12573 12574// method id "dlp.organizations.storedInfoTypes.delete": 12575 12576type OrganizationsStoredInfoTypesDeleteCall struct { 12577 s *Service 12578 name string 12579 urlParams_ gensupport.URLParams 12580 ctx_ context.Context 12581 header_ http.Header 12582} 12583 12584// Delete: Deletes a stored infoType. See 12585// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12586// more. 12587func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { 12588 c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12589 c.name = name 12590 return c 12591} 12592 12593// Fields allows partial responses to be retrieved. See 12594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12595// for more information. 12596func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { 12597 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12598 return c 12599} 12600 12601// Context sets the context to be used in this call's Do method. Any 12602// pending HTTP request will be aborted if the provided context is 12603// canceled. 12604func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { 12605 c.ctx_ = ctx 12606 return c 12607} 12608 12609// Header returns an http.Header that can be modified by the caller to 12610// add HTTP headers to the request. 12611func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { 12612 if c.header_ == nil { 12613 c.header_ = make(http.Header) 12614 } 12615 return c.header_ 12616} 12617 12618func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 12619 reqHeaders := make(http.Header) 12620 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12621 for k, v := range c.header_ { 12622 reqHeaders[k] = v 12623 } 12624 reqHeaders.Set("User-Agent", c.s.userAgent()) 12625 var body io.Reader = nil 12626 c.urlParams_.Set("alt", alt) 12627 c.urlParams_.Set("prettyPrint", "false") 12628 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12629 urls += "?" + c.urlParams_.Encode() 12630 req, err := http.NewRequest("DELETE", urls, body) 12631 if err != nil { 12632 return nil, err 12633 } 12634 req.Header = reqHeaders 12635 googleapi.Expand(req.URL, map[string]string{ 12636 "name": c.name, 12637 }) 12638 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12639} 12640 12641// Do executes the "dlp.organizations.storedInfoTypes.delete" call. 12642// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12643// non-2xx status code is an error. Response headers are in either 12644// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12645// returned at all) in error.(*googleapi.Error).Header. Use 12646// googleapi.IsNotModified to check whether the returned error was 12647// because http.StatusNotModified was returned. 12648func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12649 gensupport.SetOptions(c.urlParams_, opts...) 12650 res, err := c.doRequest("json") 12651 if res != nil && res.StatusCode == http.StatusNotModified { 12652 if res.Body != nil { 12653 res.Body.Close() 12654 } 12655 return nil, &googleapi.Error{ 12656 Code: res.StatusCode, 12657 Header: res.Header, 12658 } 12659 } 12660 if err != nil { 12661 return nil, err 12662 } 12663 defer googleapi.CloseBody(res) 12664 if err := googleapi.CheckResponse(res); err != nil { 12665 return nil, err 12666 } 12667 ret := &GoogleProtobufEmpty{ 12668 ServerResponse: googleapi.ServerResponse{ 12669 Header: res.Header, 12670 HTTPStatusCode: res.StatusCode, 12671 }, 12672 } 12673 target := &ret 12674 if err := gensupport.DecodeResponse(target, res); err != nil { 12675 return nil, err 12676 } 12677 return ret, nil 12678 // { 12679 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12680 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 12681 // "httpMethod": "DELETE", 12682 // "id": "dlp.organizations.storedInfoTypes.delete", 12683 // "parameterOrder": [ 12684 // "name" 12685 // ], 12686 // "parameters": { 12687 // "name": { 12688 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12689 // "location": "path", 12690 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 12691 // "required": true, 12692 // "type": "string" 12693 // } 12694 // }, 12695 // "path": "v2/{+name}", 12696 // "response": { 12697 // "$ref": "GoogleProtobufEmpty" 12698 // }, 12699 // "scopes": [ 12700 // "https://www.googleapis.com/auth/cloud-platform" 12701 // ] 12702 // } 12703 12704} 12705 12706// method id "dlp.organizations.storedInfoTypes.get": 12707 12708type OrganizationsStoredInfoTypesGetCall struct { 12709 s *Service 12710 name string 12711 urlParams_ gensupport.URLParams 12712 ifNoneMatch_ string 12713 ctx_ context.Context 12714 header_ http.Header 12715} 12716 12717// Get: Gets a stored infoType. See 12718// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12719// more. 12720func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { 12721 c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12722 c.name = name 12723 return c 12724} 12725 12726// Fields allows partial responses to be retrieved. See 12727// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12728// for more information. 12729func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { 12730 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12731 return c 12732} 12733 12734// IfNoneMatch sets the optional parameter which makes the operation 12735// fail if the object's ETag matches the given value. This is useful for 12736// getting updates only after the object has changed since the last 12737// request. Use googleapi.IsNotModified to check whether the response 12738// error from Do is the result of In-None-Match. 12739func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { 12740 c.ifNoneMatch_ = entityTag 12741 return c 12742} 12743 12744// Context sets the context to be used in this call's Do method. Any 12745// pending HTTP request will be aborted if the provided context is 12746// canceled. 12747func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { 12748 c.ctx_ = ctx 12749 return c 12750} 12751 12752// Header returns an http.Header that can be modified by the caller to 12753// add HTTP headers to the request. 12754func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { 12755 if c.header_ == nil { 12756 c.header_ = make(http.Header) 12757 } 12758 return c.header_ 12759} 12760 12761func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 12762 reqHeaders := make(http.Header) 12763 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12764 for k, v := range c.header_ { 12765 reqHeaders[k] = v 12766 } 12767 reqHeaders.Set("User-Agent", c.s.userAgent()) 12768 if c.ifNoneMatch_ != "" { 12769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12770 } 12771 var body io.Reader = nil 12772 c.urlParams_.Set("alt", alt) 12773 c.urlParams_.Set("prettyPrint", "false") 12774 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 12775 urls += "?" + c.urlParams_.Encode() 12776 req, err := http.NewRequest("GET", urls, body) 12777 if err != nil { 12778 return nil, err 12779 } 12780 req.Header = reqHeaders 12781 googleapi.Expand(req.URL, map[string]string{ 12782 "name": c.name, 12783 }) 12784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12785} 12786 12787// Do executes the "dlp.organizations.storedInfoTypes.get" call. 12788// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 12789// non-nil. Any non-2xx status code is an error. Response headers are in 12790// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 12791// a response was returned at all) in error.(*googleapi.Error).Header. 12792// Use googleapi.IsNotModified to check whether the returned error was 12793// because http.StatusNotModified was returned. 12794func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 12795 gensupport.SetOptions(c.urlParams_, opts...) 12796 res, err := c.doRequest("json") 12797 if res != nil && res.StatusCode == http.StatusNotModified { 12798 if res.Body != nil { 12799 res.Body.Close() 12800 } 12801 return nil, &googleapi.Error{ 12802 Code: res.StatusCode, 12803 Header: res.Header, 12804 } 12805 } 12806 if err != nil { 12807 return nil, err 12808 } 12809 defer googleapi.CloseBody(res) 12810 if err := googleapi.CheckResponse(res); err != nil { 12811 return nil, err 12812 } 12813 ret := &GooglePrivacyDlpV2StoredInfoType{ 12814 ServerResponse: googleapi.ServerResponse{ 12815 Header: res.Header, 12816 HTTPStatusCode: res.StatusCode, 12817 }, 12818 } 12819 target := &ret 12820 if err := gensupport.DecodeResponse(target, res); err != nil { 12821 return nil, err 12822 } 12823 return ret, nil 12824 // { 12825 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 12826 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 12827 // "httpMethod": "GET", 12828 // "id": "dlp.organizations.storedInfoTypes.get", 12829 // "parameterOrder": [ 12830 // "name" 12831 // ], 12832 // "parameters": { 12833 // "name": { 12834 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 12835 // "location": "path", 12836 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 12837 // "required": true, 12838 // "type": "string" 12839 // } 12840 // }, 12841 // "path": "v2/{+name}", 12842 // "response": { 12843 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 12844 // }, 12845 // "scopes": [ 12846 // "https://www.googleapis.com/auth/cloud-platform" 12847 // ] 12848 // } 12849 12850} 12851 12852// method id "dlp.organizations.storedInfoTypes.list": 12853 12854type OrganizationsStoredInfoTypesListCall struct { 12855 s *Service 12856 parentid string 12857 urlParams_ gensupport.URLParams 12858 ifNoneMatch_ string 12859 ctx_ context.Context 12860 header_ http.Header 12861} 12862 12863// List: Lists stored infoTypes. See 12864// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 12865// more. 12866func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { 12867 c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12868 c.parentid = parentid 12869 return c 12870} 12871 12872// LocationId sets the optional parameter "locationId": Deprecated. This 12873// field has no effect. 12874func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsStoredInfoTypesListCall { 12875 c.urlParams_.Set("locationId", locationId) 12876 return c 12877} 12878 12879// OrderBy sets the optional parameter "orderBy": Comma separated list 12880// of fields to order by, followed by `asc` or `desc` postfix. This list 12881// is case-insensitive, default sorting order is ascending, redundant 12882// space characters are insignificant. Example: `name asc, display_name, 12883// create_time desc` Supported fields are: - `create_time`: corresponds 12884// to time the most recent version of the resource was created. - 12885// `state`: corresponds to the state of the resource. - `name`: 12886// corresponds to resource name. - `display_name`: corresponds to info 12887// type's display name. 12888func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { 12889 c.urlParams_.Set("orderBy", orderBy) 12890 return c 12891} 12892 12893// PageSize sets the optional parameter "pageSize": Size of the page, 12894// can be limited by server. If zero server returns a page of max size 12895// 100. 12896func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { 12897 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12898 return c 12899} 12900 12901// PageToken sets the optional parameter "pageToken": Page token to 12902// continue retrieval. Comes from previous call to 12903// `ListStoredInfoTypes`. 12904func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { 12905 c.urlParams_.Set("pageToken", pageToken) 12906 return c 12907} 12908 12909// Fields allows partial responses to be retrieved. See 12910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12911// for more information. 12912func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { 12913 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12914 return c 12915} 12916 12917// IfNoneMatch sets the optional parameter which makes the operation 12918// fail if the object's ETag matches the given value. This is useful for 12919// getting updates only after the object has changed since the last 12920// request. Use googleapi.IsNotModified to check whether the response 12921// error from Do is the result of In-None-Match. 12922func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { 12923 c.ifNoneMatch_ = entityTag 12924 return c 12925} 12926 12927// Context sets the context to be used in this call's Do method. Any 12928// pending HTTP request will be aborted if the provided context is 12929// canceled. 12930func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { 12931 c.ctx_ = ctx 12932 return c 12933} 12934 12935// Header returns an http.Header that can be modified by the caller to 12936// add HTTP headers to the request. 12937func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { 12938 if c.header_ == nil { 12939 c.header_ = make(http.Header) 12940 } 12941 return c.header_ 12942} 12943 12944func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 12945 reqHeaders := make(http.Header) 12946 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 12947 for k, v := range c.header_ { 12948 reqHeaders[k] = v 12949 } 12950 reqHeaders.Set("User-Agent", c.s.userAgent()) 12951 if c.ifNoneMatch_ != "" { 12952 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12953 } 12954 var body io.Reader = nil 12955 c.urlParams_.Set("alt", alt) 12956 c.urlParams_.Set("prettyPrint", "false") 12957 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 12958 urls += "?" + c.urlParams_.Encode() 12959 req, err := http.NewRequest("GET", urls, body) 12960 if err != nil { 12961 return nil, err 12962 } 12963 req.Header = reqHeaders 12964 googleapi.Expand(req.URL, map[string]string{ 12965 "parent": c.parentid, 12966 }) 12967 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12968} 12969 12970// Do executes the "dlp.organizations.storedInfoTypes.list" call. 12971// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 12972// error will be non-nil. Any non-2xx status code is an error. Response 12973// headers are in either 12974// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 12975// or (if a response was returned at all) in 12976// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12977// whether the returned error was because http.StatusNotModified was 12978// returned. 12979func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 12980 gensupport.SetOptions(c.urlParams_, opts...) 12981 res, err := c.doRequest("json") 12982 if res != nil && res.StatusCode == http.StatusNotModified { 12983 if res.Body != nil { 12984 res.Body.Close() 12985 } 12986 return nil, &googleapi.Error{ 12987 Code: res.StatusCode, 12988 Header: res.Header, 12989 } 12990 } 12991 if err != nil { 12992 return nil, err 12993 } 12994 defer googleapi.CloseBody(res) 12995 if err := googleapi.CheckResponse(res); err != nil { 12996 return nil, err 12997 } 12998 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 12999 ServerResponse: googleapi.ServerResponse{ 13000 Header: res.Header, 13001 HTTPStatusCode: res.StatusCode, 13002 }, 13003 } 13004 target := &ret 13005 if err := gensupport.DecodeResponse(target, res); err != nil { 13006 return nil, err 13007 } 13008 return ret, nil 13009 // { 13010 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 13011 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", 13012 // "httpMethod": "GET", 13013 // "id": "dlp.organizations.storedInfoTypes.list", 13014 // "parameterOrder": [ 13015 // "parent" 13016 // ], 13017 // "parameters": { 13018 // "locationId": { 13019 // "description": "Deprecated. This field has no effect.", 13020 // "location": "query", 13021 // "type": "string" 13022 // }, 13023 // "orderBy": { 13024 // "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.", 13025 // "location": "query", 13026 // "type": "string" 13027 // }, 13028 // "pageSize": { 13029 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 13030 // "format": "int32", 13031 // "location": "query", 13032 // "type": "integer" 13033 // }, 13034 // "pageToken": { 13035 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 13036 // "location": "query", 13037 // "type": "string" 13038 // }, 13039 // "parent": { 13040 // "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", 13041 // "location": "path", 13042 // "pattern": "^organizations/[^/]+$", 13043 // "required": true, 13044 // "type": "string" 13045 // } 13046 // }, 13047 // "path": "v2/{+parent}/storedInfoTypes", 13048 // "response": { 13049 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 13050 // }, 13051 // "scopes": [ 13052 // "https://www.googleapis.com/auth/cloud-platform" 13053 // ] 13054 // } 13055 13056} 13057 13058// Pages invokes f for each page of results. 13059// A non-nil error returned from f will halt the iteration. 13060// The provided context supersedes any context provided to the Context method. 13061func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 13062 c.ctx_ = ctx 13063 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13064 for { 13065 x, err := c.Do() 13066 if err != nil { 13067 return err 13068 } 13069 if err := f(x); err != nil { 13070 return err 13071 } 13072 if x.NextPageToken == "" { 13073 return nil 13074 } 13075 c.PageToken(x.NextPageToken) 13076 } 13077} 13078 13079// method id "dlp.organizations.storedInfoTypes.patch": 13080 13081type OrganizationsStoredInfoTypesPatchCall struct { 13082 s *Service 13083 name string 13084 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 13085 urlParams_ gensupport.URLParams 13086 ctx_ context.Context 13087 header_ http.Header 13088} 13089 13090// Patch: Updates the stored infoType by creating a new version. The 13091// existing version will continue to be used until the new version is 13092// ready. See 13093// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 13094// more. 13095func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { 13096 c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13097 c.name = name 13098 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 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 *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { 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 *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { 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 *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { 13121 if c.header_ == nil { 13122 c.header_ = make(http.Header) 13123 } 13124 return c.header_ 13125} 13126 13127func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 13128 reqHeaders := make(http.Header) 13129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 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.googleprivacydlpv2updatestoredinfotyperequest) 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/{+name}") 13143 urls += "?" + c.urlParams_.Encode() 13144 req, err := http.NewRequest("PATCH", urls, body) 13145 if err != nil { 13146 return nil, err 13147 } 13148 req.Header = reqHeaders 13149 googleapi.Expand(req.URL, map[string]string{ 13150 "name": c.name, 13151 }) 13152 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13153} 13154 13155// Do executes the "dlp.organizations.storedInfoTypes.patch" 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 *OrganizationsStoredInfoTypesPatchCall) 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": "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.", 13194 // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", 13195 // "httpMethod": "PATCH", 13196 // "id": "dlp.organizations.storedInfoTypes.patch", 13197 // "parameterOrder": [ 13198 // "name" 13199 // ], 13200 // "parameters": { 13201 // "name": { 13202 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 13203 // "location": "path", 13204 // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", 13205 // "required": true, 13206 // "type": "string" 13207 // } 13208 // }, 13209 // "path": "v2/{+name}", 13210 // "request": { 13211 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 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.projects.content.deidentify": 13224 13225type ProjectsContentDeidentifyCall struct { 13226 s *Service 13227 parentid string 13228 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 13229 urlParams_ gensupport.URLParams 13230 ctx_ context.Context 13231 header_ http.Header 13232} 13233 13234// Deidentify: De-identifies potentially sensitive info from a 13235// ContentItem. This method has limits on input size and output size. 13236// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 13237// learn more. When no InfoTypes or CustomInfoTypes are specified in 13238// this request, the system will automatically choose what detectors to 13239// run. By default this may be all types, but may change over time as 13240// detectors are updated. 13241func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { 13242 c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13243 c.parentid = parentid 13244 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 13245 return c 13246} 13247 13248// Fields allows partial responses to be retrieved. See 13249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13250// for more information. 13251func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { 13252 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13253 return c 13254} 13255 13256// Context sets the context to be used in this call's Do method. Any 13257// pending HTTP request will be aborted if the provided context is 13258// canceled. 13259func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { 13260 c.ctx_ = ctx 13261 return c 13262} 13263 13264// Header returns an http.Header that can be modified by the caller to 13265// add HTTP headers to the request. 13266func (c *ProjectsContentDeidentifyCall) Header() http.Header { 13267 if c.header_ == nil { 13268 c.header_ = make(http.Header) 13269 } 13270 return c.header_ 13271} 13272 13273func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 13274 reqHeaders := make(http.Header) 13275 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13276 for k, v := range c.header_ { 13277 reqHeaders[k] = v 13278 } 13279 reqHeaders.Set("User-Agent", c.s.userAgent()) 13280 var body io.Reader = nil 13281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 13282 if err != nil { 13283 return nil, err 13284 } 13285 reqHeaders.Set("Content-Type", "application/json") 13286 c.urlParams_.Set("alt", alt) 13287 c.urlParams_.Set("prettyPrint", "false") 13288 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 13289 urls += "?" + c.urlParams_.Encode() 13290 req, err := http.NewRequest("POST", urls, body) 13291 if err != nil { 13292 return nil, err 13293 } 13294 req.Header = reqHeaders 13295 googleapi.Expand(req.URL, map[string]string{ 13296 "parent": c.parentid, 13297 }) 13298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13299} 13300 13301// Do executes the "dlp.projects.content.deidentify" call. 13302// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 13303// will be non-nil. Any non-2xx status code is an error. Response 13304// headers are in either 13305// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 13306// (if a response was returned at all) in 13307// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13308// whether the returned error was because http.StatusNotModified was 13309// returned. 13310func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 13311 gensupport.SetOptions(c.urlParams_, opts...) 13312 res, err := c.doRequest("json") 13313 if res != nil && res.StatusCode == http.StatusNotModified { 13314 if res.Body != nil { 13315 res.Body.Close() 13316 } 13317 return nil, &googleapi.Error{ 13318 Code: res.StatusCode, 13319 Header: res.Header, 13320 } 13321 } 13322 if err != nil { 13323 return nil, err 13324 } 13325 defer googleapi.CloseBody(res) 13326 if err := googleapi.CheckResponse(res); err != nil { 13327 return nil, err 13328 } 13329 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 13330 ServerResponse: googleapi.ServerResponse{ 13331 Header: res.Header, 13332 HTTPStatusCode: res.StatusCode, 13333 }, 13334 } 13335 target := &ret 13336 if err := gensupport.DecodeResponse(target, res); err != nil { 13337 return nil, err 13338 } 13339 return ret, nil 13340 // { 13341 // "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.", 13342 // "flatPath": "v2/projects/{projectsId}/content:deidentify", 13343 // "httpMethod": "POST", 13344 // "id": "dlp.projects.content.deidentify", 13345 // "parameterOrder": [ 13346 // "parent" 13347 // ], 13348 // "parameters": { 13349 // "parent": { 13350 // "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", 13351 // "location": "path", 13352 // "pattern": "^projects/[^/]+$", 13353 // "required": true, 13354 // "type": "string" 13355 // } 13356 // }, 13357 // "path": "v2/{+parent}/content:deidentify", 13358 // "request": { 13359 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 13360 // }, 13361 // "response": { 13362 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 13363 // }, 13364 // "scopes": [ 13365 // "https://www.googleapis.com/auth/cloud-platform" 13366 // ] 13367 // } 13368 13369} 13370 13371// method id "dlp.projects.content.inspect": 13372 13373type ProjectsContentInspectCall struct { 13374 s *Service 13375 parentid string 13376 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 13377 urlParams_ gensupport.URLParams 13378 ctx_ context.Context 13379 header_ http.Header 13380} 13381 13382// Inspect: Finds potentially sensitive info in content. This method has 13383// limits on input size, processing time, and output size. When no 13384// InfoTypes or CustomInfoTypes are specified in this request, the 13385// system will automatically choose what detectors to run. By default 13386// this may be all types, but may change over time as detectors are 13387// updated. For how to guides, see 13388// https://cloud.google.com/dlp/docs/inspecting-images and 13389// https://cloud.google.com/dlp/docs/inspecting-text, 13390func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { 13391 c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13392 c.parentid = parentid 13393 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 13394 return c 13395} 13396 13397// Fields allows partial responses to be retrieved. See 13398// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13399// for more information. 13400func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { 13401 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13402 return c 13403} 13404 13405// Context sets the context to be used in this call's Do method. Any 13406// pending HTTP request will be aborted if the provided context is 13407// canceled. 13408func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { 13409 c.ctx_ = ctx 13410 return c 13411} 13412 13413// Header returns an http.Header that can be modified by the caller to 13414// add HTTP headers to the request. 13415func (c *ProjectsContentInspectCall) Header() http.Header { 13416 if c.header_ == nil { 13417 c.header_ = make(http.Header) 13418 } 13419 return c.header_ 13420} 13421 13422func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { 13423 reqHeaders := make(http.Header) 13424 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13425 for k, v := range c.header_ { 13426 reqHeaders[k] = v 13427 } 13428 reqHeaders.Set("User-Agent", c.s.userAgent()) 13429 var body io.Reader = nil 13430 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 13431 if err != nil { 13432 return nil, err 13433 } 13434 reqHeaders.Set("Content-Type", "application/json") 13435 c.urlParams_.Set("alt", alt) 13436 c.urlParams_.Set("prettyPrint", "false") 13437 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 13438 urls += "?" + c.urlParams_.Encode() 13439 req, err := http.NewRequest("POST", urls, body) 13440 if err != nil { 13441 return nil, err 13442 } 13443 req.Header = reqHeaders 13444 googleapi.Expand(req.URL, map[string]string{ 13445 "parent": c.parentid, 13446 }) 13447 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13448} 13449 13450// Do executes the "dlp.projects.content.inspect" call. 13451// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 13452// will be non-nil. Any non-2xx status code is an error. Response 13453// headers are in either 13454// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 13455// (if a response was returned at all) in 13456// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13457// whether the returned error was because http.StatusNotModified was 13458// returned. 13459func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 13460 gensupport.SetOptions(c.urlParams_, opts...) 13461 res, err := c.doRequest("json") 13462 if res != nil && res.StatusCode == http.StatusNotModified { 13463 if res.Body != nil { 13464 res.Body.Close() 13465 } 13466 return nil, &googleapi.Error{ 13467 Code: res.StatusCode, 13468 Header: res.Header, 13469 } 13470 } 13471 if err != nil { 13472 return nil, err 13473 } 13474 defer googleapi.CloseBody(res) 13475 if err := googleapi.CheckResponse(res); err != nil { 13476 return nil, err 13477 } 13478 ret := &GooglePrivacyDlpV2InspectContentResponse{ 13479 ServerResponse: googleapi.ServerResponse{ 13480 Header: res.Header, 13481 HTTPStatusCode: res.StatusCode, 13482 }, 13483 } 13484 target := &ret 13485 if err := gensupport.DecodeResponse(target, res); err != nil { 13486 return nil, err 13487 } 13488 return ret, nil 13489 // { 13490 // "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,", 13491 // "flatPath": "v2/projects/{projectsId}/content:inspect", 13492 // "httpMethod": "POST", 13493 // "id": "dlp.projects.content.inspect", 13494 // "parameterOrder": [ 13495 // "parent" 13496 // ], 13497 // "parameters": { 13498 // "parent": { 13499 // "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", 13500 // "location": "path", 13501 // "pattern": "^projects/[^/]+$", 13502 // "required": true, 13503 // "type": "string" 13504 // } 13505 // }, 13506 // "path": "v2/{+parent}/content:inspect", 13507 // "request": { 13508 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 13509 // }, 13510 // "response": { 13511 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 13512 // }, 13513 // "scopes": [ 13514 // "https://www.googleapis.com/auth/cloud-platform" 13515 // ] 13516 // } 13517 13518} 13519 13520// method id "dlp.projects.content.reidentify": 13521 13522type ProjectsContentReidentifyCall struct { 13523 s *Service 13524 parentid string 13525 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 13526 urlParams_ gensupport.URLParams 13527 ctx_ context.Context 13528 header_ http.Header 13529} 13530 13531// Reidentify: Re-identifies content that has been de-identified. See 13532// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn 13533// more. 13534func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { 13535 c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13536 c.parentid = parentid 13537 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 13538 return c 13539} 13540 13541// Fields allows partial responses to be retrieved. See 13542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13543// for more information. 13544func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { 13545 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13546 return c 13547} 13548 13549// Context sets the context to be used in this call's Do method. Any 13550// pending HTTP request will be aborted if the provided context is 13551// canceled. 13552func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { 13553 c.ctx_ = ctx 13554 return c 13555} 13556 13557// Header returns an http.Header that can be modified by the caller to 13558// add HTTP headers to the request. 13559func (c *ProjectsContentReidentifyCall) Header() http.Header { 13560 if c.header_ == nil { 13561 c.header_ = make(http.Header) 13562 } 13563 return c.header_ 13564} 13565 13566func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 13567 reqHeaders := make(http.Header) 13568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13569 for k, v := range c.header_ { 13570 reqHeaders[k] = v 13571 } 13572 reqHeaders.Set("User-Agent", c.s.userAgent()) 13573 var body io.Reader = nil 13574 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 13575 if err != nil { 13576 return nil, err 13577 } 13578 reqHeaders.Set("Content-Type", "application/json") 13579 c.urlParams_.Set("alt", alt) 13580 c.urlParams_.Set("prettyPrint", "false") 13581 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 13582 urls += "?" + c.urlParams_.Encode() 13583 req, err := http.NewRequest("POST", urls, body) 13584 if err != nil { 13585 return nil, err 13586 } 13587 req.Header = reqHeaders 13588 googleapi.Expand(req.URL, map[string]string{ 13589 "parent": c.parentid, 13590 }) 13591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13592} 13593 13594// Do executes the "dlp.projects.content.reidentify" call. 13595// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 13596// will be non-nil. Any non-2xx status code is an error. Response 13597// headers are in either 13598// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 13599// (if a response was returned at all) in 13600// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13601// whether the returned error was because http.StatusNotModified was 13602// returned. 13603func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 13604 gensupport.SetOptions(c.urlParams_, opts...) 13605 res, err := c.doRequest("json") 13606 if res != nil && res.StatusCode == http.StatusNotModified { 13607 if res.Body != nil { 13608 res.Body.Close() 13609 } 13610 return nil, &googleapi.Error{ 13611 Code: res.StatusCode, 13612 Header: res.Header, 13613 } 13614 } 13615 if err != nil { 13616 return nil, err 13617 } 13618 defer googleapi.CloseBody(res) 13619 if err := googleapi.CheckResponse(res); err != nil { 13620 return nil, err 13621 } 13622 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 13623 ServerResponse: googleapi.ServerResponse{ 13624 Header: res.Header, 13625 HTTPStatusCode: res.StatusCode, 13626 }, 13627 } 13628 target := &ret 13629 if err := gensupport.DecodeResponse(target, res); err != nil { 13630 return nil, err 13631 } 13632 return ret, nil 13633 // { 13634 // "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.", 13635 // "flatPath": "v2/projects/{projectsId}/content:reidentify", 13636 // "httpMethod": "POST", 13637 // "id": "dlp.projects.content.reidentify", 13638 // "parameterOrder": [ 13639 // "parent" 13640 // ], 13641 // "parameters": { 13642 // "parent": { 13643 // "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", 13644 // "location": "path", 13645 // "pattern": "^projects/[^/]+$", 13646 // "required": true, 13647 // "type": "string" 13648 // } 13649 // }, 13650 // "path": "v2/{+parent}/content:reidentify", 13651 // "request": { 13652 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 13653 // }, 13654 // "response": { 13655 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 13656 // }, 13657 // "scopes": [ 13658 // "https://www.googleapis.com/auth/cloud-platform" 13659 // ] 13660 // } 13661 13662} 13663 13664// method id "dlp.projects.deidentifyTemplates.create": 13665 13666type ProjectsDeidentifyTemplatesCreateCall struct { 13667 s *Service 13668 parentid string 13669 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 13670 urlParams_ gensupport.URLParams 13671 ctx_ context.Context 13672 header_ http.Header 13673} 13674 13675// Create: Creates a DeidentifyTemplate for re-using frequently used 13676// configuration for de-identifying content, images, and storage. See 13677// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13678// more. 13679func (r *ProjectsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { 13680 c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13681 c.parentid = parentid 13682 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 13683 return c 13684} 13685 13686// Fields allows partial responses to be retrieved. See 13687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13688// for more information. 13689func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { 13690 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13691 return c 13692} 13693 13694// Context sets the context to be used in this call's Do method. Any 13695// pending HTTP request will be aborted if the provided context is 13696// canceled. 13697func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { 13698 c.ctx_ = ctx 13699 return c 13700} 13701 13702// Header returns an http.Header that can be modified by the caller to 13703// add HTTP headers to the request. 13704func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { 13705 if c.header_ == nil { 13706 c.header_ = make(http.Header) 13707 } 13708 return c.header_ 13709} 13710 13711func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 13712 reqHeaders := make(http.Header) 13713 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13714 for k, v := range c.header_ { 13715 reqHeaders[k] = v 13716 } 13717 reqHeaders.Set("User-Agent", c.s.userAgent()) 13718 var body io.Reader = nil 13719 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 13720 if err != nil { 13721 return nil, err 13722 } 13723 reqHeaders.Set("Content-Type", "application/json") 13724 c.urlParams_.Set("alt", alt) 13725 c.urlParams_.Set("prettyPrint", "false") 13726 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 13727 urls += "?" + c.urlParams_.Encode() 13728 req, err := http.NewRequest("POST", urls, body) 13729 if err != nil { 13730 return nil, err 13731 } 13732 req.Header = reqHeaders 13733 googleapi.Expand(req.URL, map[string]string{ 13734 "parent": c.parentid, 13735 }) 13736 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13737} 13738 13739// Do executes the "dlp.projects.deidentifyTemplates.create" call. 13740// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 13741// non-nil. Any non-2xx status code is an error. Response headers are in 13742// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 13743// (if a response was returned at all) in 13744// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13745// whether the returned error was because http.StatusNotModified was 13746// returned. 13747func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 13748 gensupport.SetOptions(c.urlParams_, opts...) 13749 res, err := c.doRequest("json") 13750 if res != nil && res.StatusCode == http.StatusNotModified { 13751 if res.Body != nil { 13752 res.Body.Close() 13753 } 13754 return nil, &googleapi.Error{ 13755 Code: res.StatusCode, 13756 Header: res.Header, 13757 } 13758 } 13759 if err != nil { 13760 return nil, err 13761 } 13762 defer googleapi.CloseBody(res) 13763 if err := googleapi.CheckResponse(res); err != nil { 13764 return nil, err 13765 } 13766 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 13767 ServerResponse: googleapi.ServerResponse{ 13768 Header: res.Header, 13769 HTTPStatusCode: res.StatusCode, 13770 }, 13771 } 13772 target := &ret 13773 if err := gensupport.DecodeResponse(target, res); err != nil { 13774 return nil, err 13775 } 13776 return ret, nil 13777 // { 13778 // "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.", 13779 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 13780 // "httpMethod": "POST", 13781 // "id": "dlp.projects.deidentifyTemplates.create", 13782 // "parameterOrder": [ 13783 // "parent" 13784 // ], 13785 // "parameters": { 13786 // "parent": { 13787 // "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", 13788 // "location": "path", 13789 // "pattern": "^projects/[^/]+$", 13790 // "required": true, 13791 // "type": "string" 13792 // } 13793 // }, 13794 // "path": "v2/{+parent}/deidentifyTemplates", 13795 // "request": { 13796 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 13797 // }, 13798 // "response": { 13799 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 13800 // }, 13801 // "scopes": [ 13802 // "https://www.googleapis.com/auth/cloud-platform" 13803 // ] 13804 // } 13805 13806} 13807 13808// method id "dlp.projects.deidentifyTemplates.delete": 13809 13810type ProjectsDeidentifyTemplatesDeleteCall struct { 13811 s *Service 13812 name string 13813 urlParams_ gensupport.URLParams 13814 ctx_ context.Context 13815 header_ http.Header 13816} 13817 13818// Delete: Deletes a DeidentifyTemplate. See 13819// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13820// more. 13821func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { 13822 c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13823 c.name = name 13824 return c 13825} 13826 13827// Fields allows partial responses to be retrieved. See 13828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13829// for more information. 13830func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { 13831 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13832 return c 13833} 13834 13835// Context sets the context to be used in this call's Do method. Any 13836// pending HTTP request will be aborted if the provided context is 13837// canceled. 13838func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { 13839 c.ctx_ = ctx 13840 return c 13841} 13842 13843// Header returns an http.Header that can be modified by the caller to 13844// add HTTP headers to the request. 13845func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { 13846 if c.header_ == nil { 13847 c.header_ = make(http.Header) 13848 } 13849 return c.header_ 13850} 13851 13852func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 13853 reqHeaders := make(http.Header) 13854 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13855 for k, v := range c.header_ { 13856 reqHeaders[k] = v 13857 } 13858 reqHeaders.Set("User-Agent", c.s.userAgent()) 13859 var body io.Reader = nil 13860 c.urlParams_.Set("alt", alt) 13861 c.urlParams_.Set("prettyPrint", "false") 13862 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 13863 urls += "?" + c.urlParams_.Encode() 13864 req, err := http.NewRequest("DELETE", urls, body) 13865 if err != nil { 13866 return nil, err 13867 } 13868 req.Header = reqHeaders 13869 googleapi.Expand(req.URL, map[string]string{ 13870 "name": c.name, 13871 }) 13872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13873} 13874 13875// Do executes the "dlp.projects.deidentifyTemplates.delete" call. 13876// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13877// non-2xx status code is an error. Response headers are in either 13878// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13879// returned at all) in error.(*googleapi.Error).Header. Use 13880// googleapi.IsNotModified to check whether the returned error was 13881// because http.StatusNotModified was returned. 13882func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13883 gensupport.SetOptions(c.urlParams_, opts...) 13884 res, err := c.doRequest("json") 13885 if res != nil && res.StatusCode == http.StatusNotModified { 13886 if res.Body != nil { 13887 res.Body.Close() 13888 } 13889 return nil, &googleapi.Error{ 13890 Code: res.StatusCode, 13891 Header: res.Header, 13892 } 13893 } 13894 if err != nil { 13895 return nil, err 13896 } 13897 defer googleapi.CloseBody(res) 13898 if err := googleapi.CheckResponse(res); err != nil { 13899 return nil, err 13900 } 13901 ret := &GoogleProtobufEmpty{ 13902 ServerResponse: googleapi.ServerResponse{ 13903 Header: res.Header, 13904 HTTPStatusCode: res.StatusCode, 13905 }, 13906 } 13907 target := &ret 13908 if err := gensupport.DecodeResponse(target, res); err != nil { 13909 return nil, err 13910 } 13911 return ret, nil 13912 // { 13913 // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 13914 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 13915 // "httpMethod": "DELETE", 13916 // "id": "dlp.projects.deidentifyTemplates.delete", 13917 // "parameterOrder": [ 13918 // "name" 13919 // ], 13920 // "parameters": { 13921 // "name": { 13922 // "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.", 13923 // "location": "path", 13924 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 13925 // "required": true, 13926 // "type": "string" 13927 // } 13928 // }, 13929 // "path": "v2/{+name}", 13930 // "response": { 13931 // "$ref": "GoogleProtobufEmpty" 13932 // }, 13933 // "scopes": [ 13934 // "https://www.googleapis.com/auth/cloud-platform" 13935 // ] 13936 // } 13937 13938} 13939 13940// method id "dlp.projects.deidentifyTemplates.get": 13941 13942type ProjectsDeidentifyTemplatesGetCall struct { 13943 s *Service 13944 name string 13945 urlParams_ gensupport.URLParams 13946 ifNoneMatch_ string 13947 ctx_ context.Context 13948 header_ http.Header 13949} 13950 13951// Get: Gets a DeidentifyTemplate. See 13952// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 13953// more. 13954func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { 13955 c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13956 c.name = name 13957 return c 13958} 13959 13960// Fields allows partial responses to be retrieved. See 13961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13962// for more information. 13963func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { 13964 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13965 return c 13966} 13967 13968// IfNoneMatch sets the optional parameter which makes the operation 13969// fail if the object's ETag matches the given value. This is useful for 13970// getting updates only after the object has changed since the last 13971// request. Use googleapi.IsNotModified to check whether the response 13972// error from Do is the result of In-None-Match. 13973func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { 13974 c.ifNoneMatch_ = entityTag 13975 return c 13976} 13977 13978// Context sets the context to be used in this call's Do method. Any 13979// pending HTTP request will be aborted if the provided context is 13980// canceled. 13981func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { 13982 c.ctx_ = ctx 13983 return c 13984} 13985 13986// Header returns an http.Header that can be modified by the caller to 13987// add HTTP headers to the request. 13988func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { 13989 if c.header_ == nil { 13990 c.header_ = make(http.Header) 13991 } 13992 return c.header_ 13993} 13994 13995func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 13996 reqHeaders := make(http.Header) 13997 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 13998 for k, v := range c.header_ { 13999 reqHeaders[k] = v 14000 } 14001 reqHeaders.Set("User-Agent", c.s.userAgent()) 14002 if c.ifNoneMatch_ != "" { 14003 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14004 } 14005 var body io.Reader = nil 14006 c.urlParams_.Set("alt", alt) 14007 c.urlParams_.Set("prettyPrint", "false") 14008 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14009 urls += "?" + c.urlParams_.Encode() 14010 req, err := http.NewRequest("GET", urls, body) 14011 if err != nil { 14012 return nil, err 14013 } 14014 req.Header = reqHeaders 14015 googleapi.Expand(req.URL, map[string]string{ 14016 "name": c.name, 14017 }) 14018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14019} 14020 14021// Do executes the "dlp.projects.deidentifyTemplates.get" call. 14022// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 14023// non-nil. Any non-2xx status code is an error. Response headers are in 14024// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 14025// (if a response was returned at all) in 14026// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14027// whether the returned error was because http.StatusNotModified was 14028// returned. 14029func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 14030 gensupport.SetOptions(c.urlParams_, opts...) 14031 res, err := c.doRequest("json") 14032 if res != nil && res.StatusCode == http.StatusNotModified { 14033 if res.Body != nil { 14034 res.Body.Close() 14035 } 14036 return nil, &googleapi.Error{ 14037 Code: res.StatusCode, 14038 Header: res.Header, 14039 } 14040 } 14041 if err != nil { 14042 return nil, err 14043 } 14044 defer googleapi.CloseBody(res) 14045 if err := googleapi.CheckResponse(res); err != nil { 14046 return nil, err 14047 } 14048 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 14049 ServerResponse: googleapi.ServerResponse{ 14050 Header: res.Header, 14051 HTTPStatusCode: res.StatusCode, 14052 }, 14053 } 14054 target := &ret 14055 if err := gensupport.DecodeResponse(target, res); err != nil { 14056 return nil, err 14057 } 14058 return ret, nil 14059 // { 14060 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14061 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 14062 // "httpMethod": "GET", 14063 // "id": "dlp.projects.deidentifyTemplates.get", 14064 // "parameterOrder": [ 14065 // "name" 14066 // ], 14067 // "parameters": { 14068 // "name": { 14069 // "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.", 14070 // "location": "path", 14071 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 14072 // "required": true, 14073 // "type": "string" 14074 // } 14075 // }, 14076 // "path": "v2/{+name}", 14077 // "response": { 14078 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 14079 // }, 14080 // "scopes": [ 14081 // "https://www.googleapis.com/auth/cloud-platform" 14082 // ] 14083 // } 14084 14085} 14086 14087// method id "dlp.projects.deidentifyTemplates.list": 14088 14089type ProjectsDeidentifyTemplatesListCall struct { 14090 s *Service 14091 parentid string 14092 urlParams_ gensupport.URLParams 14093 ifNoneMatch_ string 14094 ctx_ context.Context 14095 header_ http.Header 14096} 14097 14098// List: Lists DeidentifyTemplates. See 14099// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 14100// more. 14101func (r *ProjectsDeidentifyTemplatesService) List(parentid string) *ProjectsDeidentifyTemplatesListCall { 14102 c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14103 c.parentid = parentid 14104 return c 14105} 14106 14107// LocationId sets the optional parameter "locationId": Deprecated. This 14108// field has no effect. 14109func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsDeidentifyTemplatesListCall { 14110 c.urlParams_.Set("locationId", locationId) 14111 return c 14112} 14113 14114// OrderBy sets the optional parameter "orderBy": Comma separated list 14115// of fields to order by, followed by `asc` or `desc` postfix. This list 14116// is case-insensitive, default sorting order is ascending, redundant 14117// space characters are insignificant. Example: `name asc,update_time, 14118// create_time desc` Supported fields are: - `create_time`: corresponds 14119// to time the template was created. - `update_time`: corresponds to 14120// time the template was last updated. - `name`: corresponds to 14121// template's name. - `display_name`: corresponds to template's display 14122// name. 14123func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { 14124 c.urlParams_.Set("orderBy", orderBy) 14125 return c 14126} 14127 14128// PageSize sets the optional parameter "pageSize": Size of the page, 14129// can be limited by server. If zero server returns a page of max size 14130// 100. 14131func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { 14132 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14133 return c 14134} 14135 14136// PageToken sets the optional parameter "pageToken": Page token to 14137// continue retrieval. Comes from previous call to 14138// `ListDeidentifyTemplates`. 14139func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { 14140 c.urlParams_.Set("pageToken", pageToken) 14141 return c 14142} 14143 14144// Fields allows partial responses to be retrieved. See 14145// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14146// for more information. 14147func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { 14148 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14149 return c 14150} 14151 14152// IfNoneMatch sets the optional parameter which makes the operation 14153// fail if the object's ETag matches the given value. This is useful for 14154// getting updates only after the object has changed since the last 14155// request. Use googleapi.IsNotModified to check whether the response 14156// error from Do is the result of In-None-Match. 14157func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { 14158 c.ifNoneMatch_ = entityTag 14159 return c 14160} 14161 14162// Context sets the context to be used in this call's Do method. Any 14163// pending HTTP request will be aborted if the provided context is 14164// canceled. 14165func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { 14166 c.ctx_ = ctx 14167 return c 14168} 14169 14170// Header returns an http.Header that can be modified by the caller to 14171// add HTTP headers to the request. 14172func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { 14173 if c.header_ == nil { 14174 c.header_ = make(http.Header) 14175 } 14176 return c.header_ 14177} 14178 14179func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 14180 reqHeaders := make(http.Header) 14181 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14182 for k, v := range c.header_ { 14183 reqHeaders[k] = v 14184 } 14185 reqHeaders.Set("User-Agent", c.s.userAgent()) 14186 if c.ifNoneMatch_ != "" { 14187 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14188 } 14189 var body io.Reader = nil 14190 c.urlParams_.Set("alt", alt) 14191 c.urlParams_.Set("prettyPrint", "false") 14192 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 14193 urls += "?" + c.urlParams_.Encode() 14194 req, err := http.NewRequest("GET", urls, body) 14195 if err != nil { 14196 return nil, err 14197 } 14198 req.Header = reqHeaders 14199 googleapi.Expand(req.URL, map[string]string{ 14200 "parent": c.parentid, 14201 }) 14202 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14203} 14204 14205// Do executes the "dlp.projects.deidentifyTemplates.list" call. 14206// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 14207// error will be non-nil. Any non-2xx status code is an error. Response 14208// headers are in either 14209// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 14210// er or (if a response was returned at all) in 14211// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14212// whether the returned error was because http.StatusNotModified was 14213// returned. 14214func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 14215 gensupport.SetOptions(c.urlParams_, opts...) 14216 res, err := c.doRequest("json") 14217 if res != nil && res.StatusCode == http.StatusNotModified { 14218 if res.Body != nil { 14219 res.Body.Close() 14220 } 14221 return nil, &googleapi.Error{ 14222 Code: res.StatusCode, 14223 Header: res.Header, 14224 } 14225 } 14226 if err != nil { 14227 return nil, err 14228 } 14229 defer googleapi.CloseBody(res) 14230 if err := googleapi.CheckResponse(res); err != nil { 14231 return nil, err 14232 } 14233 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 14234 ServerResponse: googleapi.ServerResponse{ 14235 Header: res.Header, 14236 HTTPStatusCode: res.StatusCode, 14237 }, 14238 } 14239 target := &ret 14240 if err := gensupport.DecodeResponse(target, res); err != nil { 14241 return nil, err 14242 } 14243 return ret, nil 14244 // { 14245 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14246 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", 14247 // "httpMethod": "GET", 14248 // "id": "dlp.projects.deidentifyTemplates.list", 14249 // "parameterOrder": [ 14250 // "parent" 14251 // ], 14252 // "parameters": { 14253 // "locationId": { 14254 // "description": "Deprecated. This field has no effect.", 14255 // "location": "query", 14256 // "type": "string" 14257 // }, 14258 // "orderBy": { 14259 // "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.", 14260 // "location": "query", 14261 // "type": "string" 14262 // }, 14263 // "pageSize": { 14264 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 14265 // "format": "int32", 14266 // "location": "query", 14267 // "type": "integer" 14268 // }, 14269 // "pageToken": { 14270 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 14271 // "location": "query", 14272 // "type": "string" 14273 // }, 14274 // "parent": { 14275 // "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", 14276 // "location": "path", 14277 // "pattern": "^projects/[^/]+$", 14278 // "required": true, 14279 // "type": "string" 14280 // } 14281 // }, 14282 // "path": "v2/{+parent}/deidentifyTemplates", 14283 // "response": { 14284 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 14285 // }, 14286 // "scopes": [ 14287 // "https://www.googleapis.com/auth/cloud-platform" 14288 // ] 14289 // } 14290 14291} 14292 14293// Pages invokes f for each page of results. 14294// A non-nil error returned from f will halt the iteration. 14295// The provided context supersedes any context provided to the Context method. 14296func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 14297 c.ctx_ = ctx 14298 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14299 for { 14300 x, err := c.Do() 14301 if err != nil { 14302 return err 14303 } 14304 if err := f(x); err != nil { 14305 return err 14306 } 14307 if x.NextPageToken == "" { 14308 return nil 14309 } 14310 c.PageToken(x.NextPageToken) 14311 } 14312} 14313 14314// method id "dlp.projects.deidentifyTemplates.patch": 14315 14316type ProjectsDeidentifyTemplatesPatchCall struct { 14317 s *Service 14318 name string 14319 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 14320 urlParams_ gensupport.URLParams 14321 ctx_ context.Context 14322 header_ http.Header 14323} 14324 14325// Patch: Updates the DeidentifyTemplate. See 14326// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 14327// more. 14328func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { 14329 c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14330 c.name = name 14331 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 14332 return c 14333} 14334 14335// Fields allows partial responses to be retrieved. See 14336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14337// for more information. 14338func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { 14339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14340 return c 14341} 14342 14343// Context sets the context to be used in this call's Do method. Any 14344// pending HTTP request will be aborted if the provided context is 14345// canceled. 14346func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { 14347 c.ctx_ = ctx 14348 return c 14349} 14350 14351// Header returns an http.Header that can be modified by the caller to 14352// add HTTP headers to the request. 14353func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { 14354 if c.header_ == nil { 14355 c.header_ = make(http.Header) 14356 } 14357 return c.header_ 14358} 14359 14360func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 14361 reqHeaders := make(http.Header) 14362 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14363 for k, v := range c.header_ { 14364 reqHeaders[k] = v 14365 } 14366 reqHeaders.Set("User-Agent", c.s.userAgent()) 14367 var body io.Reader = nil 14368 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 14369 if err != nil { 14370 return nil, err 14371 } 14372 reqHeaders.Set("Content-Type", "application/json") 14373 c.urlParams_.Set("alt", alt) 14374 c.urlParams_.Set("prettyPrint", "false") 14375 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14376 urls += "?" + c.urlParams_.Encode() 14377 req, err := http.NewRequest("PATCH", urls, body) 14378 if err != nil { 14379 return nil, err 14380 } 14381 req.Header = reqHeaders 14382 googleapi.Expand(req.URL, map[string]string{ 14383 "name": c.name, 14384 }) 14385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14386} 14387 14388// Do executes the "dlp.projects.deidentifyTemplates.patch" call. 14389// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 14390// non-nil. Any non-2xx status code is an error. Response headers are in 14391// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 14392// (if a response was returned at all) in 14393// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14394// whether the returned error was because http.StatusNotModified was 14395// returned. 14396func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 14397 gensupport.SetOptions(c.urlParams_, opts...) 14398 res, err := c.doRequest("json") 14399 if res != nil && res.StatusCode == http.StatusNotModified { 14400 if res.Body != nil { 14401 res.Body.Close() 14402 } 14403 return nil, &googleapi.Error{ 14404 Code: res.StatusCode, 14405 Header: res.Header, 14406 } 14407 } 14408 if err != nil { 14409 return nil, err 14410 } 14411 defer googleapi.CloseBody(res) 14412 if err := googleapi.CheckResponse(res); err != nil { 14413 return nil, err 14414 } 14415 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 14416 ServerResponse: googleapi.ServerResponse{ 14417 Header: res.Header, 14418 HTTPStatusCode: res.StatusCode, 14419 }, 14420 } 14421 target := &ret 14422 if err := gensupport.DecodeResponse(target, res); err != nil { 14423 return nil, err 14424 } 14425 return ret, nil 14426 // { 14427 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 14428 // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", 14429 // "httpMethod": "PATCH", 14430 // "id": "dlp.projects.deidentifyTemplates.patch", 14431 // "parameterOrder": [ 14432 // "name" 14433 // ], 14434 // "parameters": { 14435 // "name": { 14436 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 14437 // "location": "path", 14438 // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", 14439 // "required": true, 14440 // "type": "string" 14441 // } 14442 // }, 14443 // "path": "v2/{+name}", 14444 // "request": { 14445 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 14446 // }, 14447 // "response": { 14448 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 14449 // }, 14450 // "scopes": [ 14451 // "https://www.googleapis.com/auth/cloud-platform" 14452 // ] 14453 // } 14454 14455} 14456 14457// method id "dlp.projects.dlpJobs.cancel": 14458 14459type ProjectsDlpJobsCancelCall struct { 14460 s *Service 14461 name string 14462 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 14463 urlParams_ gensupport.URLParams 14464 ctx_ context.Context 14465 header_ http.Header 14466} 14467 14468// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 14469// The server makes a best effort to cancel the DlpJob, but success is 14470// not guaranteed. See 14471// https://cloud.google.com/dlp/docs/inspecting-storage and 14472// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14473// more. 14474func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { 14475 c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14476 c.name = name 14477 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 14478 return c 14479} 14480 14481// Fields allows partial responses to be retrieved. See 14482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14483// for more information. 14484func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { 14485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14486 return c 14487} 14488 14489// Context sets the context to be used in this call's Do method. Any 14490// pending HTTP request will be aborted if the provided context is 14491// canceled. 14492func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { 14493 c.ctx_ = ctx 14494 return c 14495} 14496 14497// Header returns an http.Header that can be modified by the caller to 14498// add HTTP headers to the request. 14499func (c *ProjectsDlpJobsCancelCall) Header() http.Header { 14500 if c.header_ == nil { 14501 c.header_ = make(http.Header) 14502 } 14503 return c.header_ 14504} 14505 14506func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 14507 reqHeaders := make(http.Header) 14508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14509 for k, v := range c.header_ { 14510 reqHeaders[k] = v 14511 } 14512 reqHeaders.Set("User-Agent", c.s.userAgent()) 14513 var body io.Reader = nil 14514 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 14515 if err != nil { 14516 return nil, err 14517 } 14518 reqHeaders.Set("Content-Type", "application/json") 14519 c.urlParams_.Set("alt", alt) 14520 c.urlParams_.Set("prettyPrint", "false") 14521 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 14522 urls += "?" + c.urlParams_.Encode() 14523 req, err := http.NewRequest("POST", urls, body) 14524 if err != nil { 14525 return nil, err 14526 } 14527 req.Header = reqHeaders 14528 googleapi.Expand(req.URL, map[string]string{ 14529 "name": c.name, 14530 }) 14531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14532} 14533 14534// Do executes the "dlp.projects.dlpJobs.cancel" call. 14535// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14536// non-2xx status code is an error. Response headers are in either 14537// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14538// returned at all) in error.(*googleapi.Error).Header. Use 14539// googleapi.IsNotModified to check whether the returned error was 14540// because http.StatusNotModified was returned. 14541func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14542 gensupport.SetOptions(c.urlParams_, opts...) 14543 res, err := c.doRequest("json") 14544 if res != nil && res.StatusCode == http.StatusNotModified { 14545 if res.Body != nil { 14546 res.Body.Close() 14547 } 14548 return nil, &googleapi.Error{ 14549 Code: res.StatusCode, 14550 Header: res.Header, 14551 } 14552 } 14553 if err != nil { 14554 return nil, err 14555 } 14556 defer googleapi.CloseBody(res) 14557 if err := googleapi.CheckResponse(res); err != nil { 14558 return nil, err 14559 } 14560 ret := &GoogleProtobufEmpty{ 14561 ServerResponse: googleapi.ServerResponse{ 14562 Header: res.Header, 14563 HTTPStatusCode: res.StatusCode, 14564 }, 14565 } 14566 target := &ret 14567 if err := gensupport.DecodeResponse(target, res); err != nil { 14568 return nil, err 14569 } 14570 return ret, nil 14571 // { 14572 // "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.", 14573 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", 14574 // "httpMethod": "POST", 14575 // "id": "dlp.projects.dlpJobs.cancel", 14576 // "parameterOrder": [ 14577 // "name" 14578 // ], 14579 // "parameters": { 14580 // "name": { 14581 // "description": "Required. The name of the DlpJob resource to be cancelled.", 14582 // "location": "path", 14583 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 14584 // "required": true, 14585 // "type": "string" 14586 // } 14587 // }, 14588 // "path": "v2/{+name}:cancel", 14589 // "request": { 14590 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 14591 // }, 14592 // "response": { 14593 // "$ref": "GoogleProtobufEmpty" 14594 // }, 14595 // "scopes": [ 14596 // "https://www.googleapis.com/auth/cloud-platform" 14597 // ] 14598 // } 14599 14600} 14601 14602// method id "dlp.projects.dlpJobs.create": 14603 14604type ProjectsDlpJobsCreateCall struct { 14605 s *Service 14606 parentid string 14607 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 14608 urlParams_ gensupport.URLParams 14609 ctx_ context.Context 14610 header_ http.Header 14611} 14612 14613// Create: Creates a new job to inspect storage or calculate risk 14614// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 14615// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14616// more. When no InfoTypes or CustomInfoTypes are specified in inspect 14617// jobs, the system will automatically choose what detectors to run. By 14618// default this may be all types, but may change over time as detectors 14619// are updated. 14620func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { 14621 c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14622 c.parentid = parentid 14623 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 14624 return c 14625} 14626 14627// Fields allows partial responses to be retrieved. See 14628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14629// for more information. 14630func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { 14631 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14632 return c 14633} 14634 14635// Context sets the context to be used in this call's Do method. Any 14636// pending HTTP request will be aborted if the provided context is 14637// canceled. 14638func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { 14639 c.ctx_ = ctx 14640 return c 14641} 14642 14643// Header returns an http.Header that can be modified by the caller to 14644// add HTTP headers to the request. 14645func (c *ProjectsDlpJobsCreateCall) Header() http.Header { 14646 if c.header_ == nil { 14647 c.header_ = make(http.Header) 14648 } 14649 return c.header_ 14650} 14651 14652func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 14653 reqHeaders := make(http.Header) 14654 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14655 for k, v := range c.header_ { 14656 reqHeaders[k] = v 14657 } 14658 reqHeaders.Set("User-Agent", c.s.userAgent()) 14659 var body io.Reader = nil 14660 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 14661 if err != nil { 14662 return nil, err 14663 } 14664 reqHeaders.Set("Content-Type", "application/json") 14665 c.urlParams_.Set("alt", alt) 14666 c.urlParams_.Set("prettyPrint", "false") 14667 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 14668 urls += "?" + c.urlParams_.Encode() 14669 req, err := http.NewRequest("POST", urls, body) 14670 if err != nil { 14671 return nil, err 14672 } 14673 req.Header = reqHeaders 14674 googleapi.Expand(req.URL, map[string]string{ 14675 "parent": c.parentid, 14676 }) 14677 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14678} 14679 14680// Do executes the "dlp.projects.dlpJobs.create" call. 14681// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 14682// Any non-2xx status code is an error. Response headers are in either 14683// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 14684// returned at all) in error.(*googleapi.Error).Header. Use 14685// googleapi.IsNotModified to check whether the returned error was 14686// because http.StatusNotModified was returned. 14687func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 14688 gensupport.SetOptions(c.urlParams_, opts...) 14689 res, err := c.doRequest("json") 14690 if res != nil && res.StatusCode == http.StatusNotModified { 14691 if res.Body != nil { 14692 res.Body.Close() 14693 } 14694 return nil, &googleapi.Error{ 14695 Code: res.StatusCode, 14696 Header: res.Header, 14697 } 14698 } 14699 if err != nil { 14700 return nil, err 14701 } 14702 defer googleapi.CloseBody(res) 14703 if err := googleapi.CheckResponse(res); err != nil { 14704 return nil, err 14705 } 14706 ret := &GooglePrivacyDlpV2DlpJob{ 14707 ServerResponse: googleapi.ServerResponse{ 14708 Header: res.Header, 14709 HTTPStatusCode: res.StatusCode, 14710 }, 14711 } 14712 target := &ret 14713 if err := gensupport.DecodeResponse(target, res); err != nil { 14714 return nil, err 14715 } 14716 return ret, nil 14717 // { 14718 // "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.", 14719 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 14720 // "httpMethod": "POST", 14721 // "id": "dlp.projects.dlpJobs.create", 14722 // "parameterOrder": [ 14723 // "parent" 14724 // ], 14725 // "parameters": { 14726 // "parent": { 14727 // "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", 14728 // "location": "path", 14729 // "pattern": "^projects/[^/]+$", 14730 // "required": true, 14731 // "type": "string" 14732 // } 14733 // }, 14734 // "path": "v2/{+parent}/dlpJobs", 14735 // "request": { 14736 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 14737 // }, 14738 // "response": { 14739 // "$ref": "GooglePrivacyDlpV2DlpJob" 14740 // }, 14741 // "scopes": [ 14742 // "https://www.googleapis.com/auth/cloud-platform" 14743 // ] 14744 // } 14745 14746} 14747 14748// method id "dlp.projects.dlpJobs.delete": 14749 14750type ProjectsDlpJobsDeleteCall struct { 14751 s *Service 14752 name string 14753 urlParams_ gensupport.URLParams 14754 ctx_ context.Context 14755 header_ http.Header 14756} 14757 14758// Delete: Deletes a long-running DlpJob. This method indicates that the 14759// client is no longer interested in the DlpJob result. The job will be 14760// cancelled if possible. See 14761// https://cloud.google.com/dlp/docs/inspecting-storage and 14762// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14763// more. 14764func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { 14765 c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14766 c.name = name 14767 return c 14768} 14769 14770// Fields allows partial responses to be retrieved. See 14771// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14772// for more information. 14773func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { 14774 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14775 return c 14776} 14777 14778// Context sets the context to be used in this call's Do method. Any 14779// pending HTTP request will be aborted if the provided context is 14780// canceled. 14781func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { 14782 c.ctx_ = ctx 14783 return c 14784} 14785 14786// Header returns an http.Header that can be modified by the caller to 14787// add HTTP headers to the request. 14788func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { 14789 if c.header_ == nil { 14790 c.header_ = make(http.Header) 14791 } 14792 return c.header_ 14793} 14794 14795func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 14796 reqHeaders := make(http.Header) 14797 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14798 for k, v := range c.header_ { 14799 reqHeaders[k] = v 14800 } 14801 reqHeaders.Set("User-Agent", c.s.userAgent()) 14802 var body io.Reader = nil 14803 c.urlParams_.Set("alt", alt) 14804 c.urlParams_.Set("prettyPrint", "false") 14805 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14806 urls += "?" + c.urlParams_.Encode() 14807 req, err := http.NewRequest("DELETE", urls, body) 14808 if err != nil { 14809 return nil, err 14810 } 14811 req.Header = reqHeaders 14812 googleapi.Expand(req.URL, map[string]string{ 14813 "name": c.name, 14814 }) 14815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14816} 14817 14818// Do executes the "dlp.projects.dlpJobs.delete" call. 14819// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14820// non-2xx status code is an error. Response headers are in either 14821// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14822// returned at all) in error.(*googleapi.Error).Header. Use 14823// googleapi.IsNotModified to check whether the returned error was 14824// because http.StatusNotModified was returned. 14825func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14826 gensupport.SetOptions(c.urlParams_, opts...) 14827 res, err := c.doRequest("json") 14828 if res != nil && res.StatusCode == http.StatusNotModified { 14829 if res.Body != nil { 14830 res.Body.Close() 14831 } 14832 return nil, &googleapi.Error{ 14833 Code: res.StatusCode, 14834 Header: res.Header, 14835 } 14836 } 14837 if err != nil { 14838 return nil, err 14839 } 14840 defer googleapi.CloseBody(res) 14841 if err := googleapi.CheckResponse(res); err != nil { 14842 return nil, err 14843 } 14844 ret := &GoogleProtobufEmpty{ 14845 ServerResponse: googleapi.ServerResponse{ 14846 Header: res.Header, 14847 HTTPStatusCode: res.StatusCode, 14848 }, 14849 } 14850 target := &ret 14851 if err := gensupport.DecodeResponse(target, res); err != nil { 14852 return nil, err 14853 } 14854 return ret, nil 14855 // { 14856 // "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.", 14857 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 14858 // "httpMethod": "DELETE", 14859 // "id": "dlp.projects.dlpJobs.delete", 14860 // "parameterOrder": [ 14861 // "name" 14862 // ], 14863 // "parameters": { 14864 // "name": { 14865 // "description": "Required. The name of the DlpJob resource to be deleted.", 14866 // "location": "path", 14867 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 14868 // "required": true, 14869 // "type": "string" 14870 // } 14871 // }, 14872 // "path": "v2/{+name}", 14873 // "response": { 14874 // "$ref": "GoogleProtobufEmpty" 14875 // }, 14876 // "scopes": [ 14877 // "https://www.googleapis.com/auth/cloud-platform" 14878 // ] 14879 // } 14880 14881} 14882 14883// method id "dlp.projects.dlpJobs.get": 14884 14885type ProjectsDlpJobsGetCall struct { 14886 s *Service 14887 name string 14888 urlParams_ gensupport.URLParams 14889 ifNoneMatch_ string 14890 ctx_ context.Context 14891 header_ http.Header 14892} 14893 14894// Get: Gets the latest state of a long-running DlpJob. See 14895// https://cloud.google.com/dlp/docs/inspecting-storage and 14896// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 14897// more. 14898func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { 14899 c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14900 c.name = name 14901 return c 14902} 14903 14904// Fields allows partial responses to be retrieved. See 14905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14906// for more information. 14907func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { 14908 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14909 return c 14910} 14911 14912// IfNoneMatch sets the optional parameter which makes the operation 14913// fail if the object's ETag matches the given value. This is useful for 14914// getting updates only after the object has changed since the last 14915// request. Use googleapi.IsNotModified to check whether the response 14916// error from Do is the result of In-None-Match. 14917func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { 14918 c.ifNoneMatch_ = entityTag 14919 return c 14920} 14921 14922// Context sets the context to be used in this call's Do method. Any 14923// pending HTTP request will be aborted if the provided context is 14924// canceled. 14925func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { 14926 c.ctx_ = ctx 14927 return c 14928} 14929 14930// Header returns an http.Header that can be modified by the caller to 14931// add HTTP headers to the request. 14932func (c *ProjectsDlpJobsGetCall) Header() http.Header { 14933 if c.header_ == nil { 14934 c.header_ = make(http.Header) 14935 } 14936 return c.header_ 14937} 14938 14939func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 14940 reqHeaders := make(http.Header) 14941 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 14942 for k, v := range c.header_ { 14943 reqHeaders[k] = v 14944 } 14945 reqHeaders.Set("User-Agent", c.s.userAgent()) 14946 if c.ifNoneMatch_ != "" { 14947 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14948 } 14949 var body io.Reader = nil 14950 c.urlParams_.Set("alt", alt) 14951 c.urlParams_.Set("prettyPrint", "false") 14952 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 14953 urls += "?" + c.urlParams_.Encode() 14954 req, err := http.NewRequest("GET", urls, body) 14955 if err != nil { 14956 return nil, err 14957 } 14958 req.Header = reqHeaders 14959 googleapi.Expand(req.URL, map[string]string{ 14960 "name": c.name, 14961 }) 14962 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14963} 14964 14965// Do executes the "dlp.projects.dlpJobs.get" call. 14966// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 14967// Any non-2xx status code is an error. Response headers are in either 14968// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 14969// returned at all) in error.(*googleapi.Error).Header. Use 14970// googleapi.IsNotModified to check whether the returned error was 14971// because http.StatusNotModified was returned. 14972func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 14973 gensupport.SetOptions(c.urlParams_, opts...) 14974 res, err := c.doRequest("json") 14975 if res != nil && res.StatusCode == http.StatusNotModified { 14976 if res.Body != nil { 14977 res.Body.Close() 14978 } 14979 return nil, &googleapi.Error{ 14980 Code: res.StatusCode, 14981 Header: res.Header, 14982 } 14983 } 14984 if err != nil { 14985 return nil, err 14986 } 14987 defer googleapi.CloseBody(res) 14988 if err := googleapi.CheckResponse(res); err != nil { 14989 return nil, err 14990 } 14991 ret := &GooglePrivacyDlpV2DlpJob{ 14992 ServerResponse: googleapi.ServerResponse{ 14993 Header: res.Header, 14994 HTTPStatusCode: res.StatusCode, 14995 }, 14996 } 14997 target := &ret 14998 if err := gensupport.DecodeResponse(target, res); err != nil { 14999 return nil, err 15000 } 15001 return ret, nil 15002 // { 15003 // "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.", 15004 // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", 15005 // "httpMethod": "GET", 15006 // "id": "dlp.projects.dlpJobs.get", 15007 // "parameterOrder": [ 15008 // "name" 15009 // ], 15010 // "parameters": { 15011 // "name": { 15012 // "description": "Required. The name of the DlpJob resource.", 15013 // "location": "path", 15014 // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", 15015 // "required": true, 15016 // "type": "string" 15017 // } 15018 // }, 15019 // "path": "v2/{+name}", 15020 // "response": { 15021 // "$ref": "GooglePrivacyDlpV2DlpJob" 15022 // }, 15023 // "scopes": [ 15024 // "https://www.googleapis.com/auth/cloud-platform" 15025 // ] 15026 // } 15027 15028} 15029 15030// method id "dlp.projects.dlpJobs.list": 15031 15032type ProjectsDlpJobsListCall struct { 15033 s *Service 15034 parentid string 15035 urlParams_ gensupport.URLParams 15036 ifNoneMatch_ string 15037 ctx_ context.Context 15038 header_ http.Header 15039} 15040 15041// List: Lists DlpJobs that match the specified filter in the request. 15042// See https://cloud.google.com/dlp/docs/inspecting-storage and 15043// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 15044// more. 15045func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { 15046 c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15047 c.parentid = parentid 15048 return c 15049} 15050 15051// Filter sets the optional parameter "filter": Allows filtering. 15052// Supported syntax: * Filter expressions are made up of one or more 15053// restrictions. * Restrictions can be combined by `AND` or `OR` logical 15054// operators. A sequence of restrictions implicitly uses `AND`. * A 15055// restriction has the form of `{field} {operator} {value}`. * Supported 15056// fields/values for inspect jobs: - `state` - 15057// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 15058// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 15059// of the trigger that created job. - 'end_time` - Corresponds to time 15060// the job finished. - 'start_time` - Corresponds to time the job 15061// finished. * Supported fields for risk analysis jobs: - `state` - 15062// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 15063// the job finished. - 'start_time` - Corresponds to time the job 15064// finished. * The operator must be `=` or `!=`. Examples: * 15065// inspected_storage = cloud_storage AND state = done * 15066// inspected_storage = cloud_storage OR inspected_storage = bigquery * 15067// inspected_storage = cloud_storage AND (state = done OR state = 15068// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 15069// this field should be no more than 500 characters. 15070func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { 15071 c.urlParams_.Set("filter", filter) 15072 return c 15073} 15074 15075// LocationId sets the optional parameter "locationId": Deprecated. This 15076// field has no effect. 15077func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobsListCall { 15078 c.urlParams_.Set("locationId", locationId) 15079 return c 15080} 15081 15082// OrderBy sets the optional parameter "orderBy": Comma separated list 15083// of fields to order by, followed by `asc` or `desc` postfix. This list 15084// is case-insensitive, default sorting order is ascending, redundant 15085// space characters are insignificant. Example: `name asc, end_time asc, 15086// create_time desc` Supported fields are: - `create_time`: corresponds 15087// to time the job was created. - `end_time`: corresponds to time the 15088// job ended. - `name`: corresponds to job's name. - `state`: 15089// corresponds to `state` 15090func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { 15091 c.urlParams_.Set("orderBy", orderBy) 15092 return c 15093} 15094 15095// PageSize sets the optional parameter "pageSize": The standard list 15096// page size. 15097func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { 15098 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15099 return c 15100} 15101 15102// PageToken sets the optional parameter "pageToken": The standard list 15103// page token. 15104func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { 15105 c.urlParams_.Set("pageToken", pageToken) 15106 return c 15107} 15108 15109// Type sets the optional parameter "type": The type of job. Defaults to 15110// `DlpJobType.INSPECT` 15111// 15112// Possible values: 15113// "DLP_JOB_TYPE_UNSPECIFIED" - Unused 15114// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 15115// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 15116func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { 15117 c.urlParams_.Set("type", type_) 15118 return c 15119} 15120 15121// Fields allows partial responses to be retrieved. See 15122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15123// for more information. 15124func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { 15125 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15126 return c 15127} 15128 15129// IfNoneMatch sets the optional parameter which makes the operation 15130// fail if the object's ETag matches the given value. This is useful for 15131// getting updates only after the object has changed since the last 15132// request. Use googleapi.IsNotModified to check whether the response 15133// error from Do is the result of In-None-Match. 15134func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { 15135 c.ifNoneMatch_ = entityTag 15136 return c 15137} 15138 15139// Context sets the context to be used in this call's Do method. Any 15140// pending HTTP request will be aborted if the provided context is 15141// canceled. 15142func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { 15143 c.ctx_ = ctx 15144 return c 15145} 15146 15147// Header returns an http.Header that can be modified by the caller to 15148// add HTTP headers to the request. 15149func (c *ProjectsDlpJobsListCall) Header() http.Header { 15150 if c.header_ == nil { 15151 c.header_ = make(http.Header) 15152 } 15153 return c.header_ 15154} 15155 15156func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 15157 reqHeaders := make(http.Header) 15158 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15159 for k, v := range c.header_ { 15160 reqHeaders[k] = v 15161 } 15162 reqHeaders.Set("User-Agent", c.s.userAgent()) 15163 if c.ifNoneMatch_ != "" { 15164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15165 } 15166 var body io.Reader = nil 15167 c.urlParams_.Set("alt", alt) 15168 c.urlParams_.Set("prettyPrint", "false") 15169 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 15170 urls += "?" + c.urlParams_.Encode() 15171 req, err := http.NewRequest("GET", urls, body) 15172 if err != nil { 15173 return nil, err 15174 } 15175 req.Header = reqHeaders 15176 googleapi.Expand(req.URL, map[string]string{ 15177 "parent": c.parentid, 15178 }) 15179 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15180} 15181 15182// Do executes the "dlp.projects.dlpJobs.list" call. 15183// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 15184// be non-nil. Any non-2xx status code is an error. Response headers are 15185// in either 15186// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 15187// response was returned at all) in error.(*googleapi.Error).Header. Use 15188// googleapi.IsNotModified to check whether the returned error was 15189// because http.StatusNotModified was returned. 15190func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 15191 gensupport.SetOptions(c.urlParams_, opts...) 15192 res, err := c.doRequest("json") 15193 if res != nil && res.StatusCode == http.StatusNotModified { 15194 if res.Body != nil { 15195 res.Body.Close() 15196 } 15197 return nil, &googleapi.Error{ 15198 Code: res.StatusCode, 15199 Header: res.Header, 15200 } 15201 } 15202 if err != nil { 15203 return nil, err 15204 } 15205 defer googleapi.CloseBody(res) 15206 if err := googleapi.CheckResponse(res); err != nil { 15207 return nil, err 15208 } 15209 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 15210 ServerResponse: googleapi.ServerResponse{ 15211 Header: res.Header, 15212 HTTPStatusCode: res.StatusCode, 15213 }, 15214 } 15215 target := &ret 15216 if err := gensupport.DecodeResponse(target, res); err != nil { 15217 return nil, err 15218 } 15219 return ret, nil 15220 // { 15221 // "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.", 15222 // "flatPath": "v2/projects/{projectsId}/dlpJobs", 15223 // "httpMethod": "GET", 15224 // "id": "dlp.projects.dlpJobs.list", 15225 // "parameterOrder": [ 15226 // "parent" 15227 // ], 15228 // "parameters": { 15229 // "filter": { 15230 // "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.", 15231 // "location": "query", 15232 // "type": "string" 15233 // }, 15234 // "locationId": { 15235 // "description": "Deprecated. This field has no effect.", 15236 // "location": "query", 15237 // "type": "string" 15238 // }, 15239 // "orderBy": { 15240 // "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`", 15241 // "location": "query", 15242 // "type": "string" 15243 // }, 15244 // "pageSize": { 15245 // "description": "The standard list page size.", 15246 // "format": "int32", 15247 // "location": "query", 15248 // "type": "integer" 15249 // }, 15250 // "pageToken": { 15251 // "description": "The standard list page token.", 15252 // "location": "query", 15253 // "type": "string" 15254 // }, 15255 // "parent": { 15256 // "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", 15257 // "location": "path", 15258 // "pattern": "^projects/[^/]+$", 15259 // "required": true, 15260 // "type": "string" 15261 // }, 15262 // "type": { 15263 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 15264 // "enum": [ 15265 // "DLP_JOB_TYPE_UNSPECIFIED", 15266 // "INSPECT_JOB", 15267 // "RISK_ANALYSIS_JOB" 15268 // ], 15269 // "enumDescriptions": [ 15270 // "Unused", 15271 // "The job inspected Google Cloud for sensitive data.", 15272 // "The job executed a Risk Analysis computation." 15273 // ], 15274 // "location": "query", 15275 // "type": "string" 15276 // } 15277 // }, 15278 // "path": "v2/{+parent}/dlpJobs", 15279 // "response": { 15280 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 15281 // }, 15282 // "scopes": [ 15283 // "https://www.googleapis.com/auth/cloud-platform" 15284 // ] 15285 // } 15286 15287} 15288 15289// Pages invokes f for each page of results. 15290// A non-nil error returned from f will halt the iteration. 15291// The provided context supersedes any context provided to the Context method. 15292func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 15293 c.ctx_ = ctx 15294 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15295 for { 15296 x, err := c.Do() 15297 if err != nil { 15298 return err 15299 } 15300 if err := f(x); err != nil { 15301 return err 15302 } 15303 if x.NextPageToken == "" { 15304 return nil 15305 } 15306 c.PageToken(x.NextPageToken) 15307 } 15308} 15309 15310// method id "dlp.projects.image.redact": 15311 15312type ProjectsImageRedactCall struct { 15313 s *Service 15314 parentid string 15315 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 15316 urlParams_ gensupport.URLParams 15317 ctx_ context.Context 15318 header_ http.Header 15319} 15320 15321// Redact: Redacts potentially sensitive info from an image. This method 15322// has limits on input size, processing time, and output size. See 15323// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 15324// learn more. When no InfoTypes or CustomInfoTypes are specified in 15325// this request, the system will automatically choose what detectors to 15326// run. By default this may be all types, but may change over time as 15327// detectors are updated. 15328func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { 15329 c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15330 c.parentid = parentid 15331 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 15332 return c 15333} 15334 15335// Fields allows partial responses to be retrieved. See 15336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15337// for more information. 15338func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { 15339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15340 return c 15341} 15342 15343// Context sets the context to be used in this call's Do method. Any 15344// pending HTTP request will be aborted if the provided context is 15345// canceled. 15346func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { 15347 c.ctx_ = ctx 15348 return c 15349} 15350 15351// Header returns an http.Header that can be modified by the caller to 15352// add HTTP headers to the request. 15353func (c *ProjectsImageRedactCall) Header() http.Header { 15354 if c.header_ == nil { 15355 c.header_ = make(http.Header) 15356 } 15357 return c.header_ 15358} 15359 15360func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { 15361 reqHeaders := make(http.Header) 15362 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15363 for k, v := range c.header_ { 15364 reqHeaders[k] = v 15365 } 15366 reqHeaders.Set("User-Agent", c.s.userAgent()) 15367 var body io.Reader = nil 15368 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 15369 if err != nil { 15370 return nil, err 15371 } 15372 reqHeaders.Set("Content-Type", "application/json") 15373 c.urlParams_.Set("alt", alt) 15374 c.urlParams_.Set("prettyPrint", "false") 15375 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 15376 urls += "?" + c.urlParams_.Encode() 15377 req, err := http.NewRequest("POST", urls, body) 15378 if err != nil { 15379 return nil, err 15380 } 15381 req.Header = reqHeaders 15382 googleapi.Expand(req.URL, map[string]string{ 15383 "parent": c.parentid, 15384 }) 15385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15386} 15387 15388// Do executes the "dlp.projects.image.redact" call. 15389// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 15390// be non-nil. Any non-2xx status code is an error. Response headers are 15391// in either 15392// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 15393// response was returned at all) in error.(*googleapi.Error).Header. Use 15394// googleapi.IsNotModified to check whether the returned error was 15395// because http.StatusNotModified was returned. 15396func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 15397 gensupport.SetOptions(c.urlParams_, opts...) 15398 res, err := c.doRequest("json") 15399 if res != nil && res.StatusCode == http.StatusNotModified { 15400 if res.Body != nil { 15401 res.Body.Close() 15402 } 15403 return nil, &googleapi.Error{ 15404 Code: res.StatusCode, 15405 Header: res.Header, 15406 } 15407 } 15408 if err != nil { 15409 return nil, err 15410 } 15411 defer googleapi.CloseBody(res) 15412 if err := googleapi.CheckResponse(res); err != nil { 15413 return nil, err 15414 } 15415 ret := &GooglePrivacyDlpV2RedactImageResponse{ 15416 ServerResponse: googleapi.ServerResponse{ 15417 Header: res.Header, 15418 HTTPStatusCode: res.StatusCode, 15419 }, 15420 } 15421 target := &ret 15422 if err := gensupport.DecodeResponse(target, res); err != nil { 15423 return nil, err 15424 } 15425 return ret, nil 15426 // { 15427 // "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.", 15428 // "flatPath": "v2/projects/{projectsId}/image:redact", 15429 // "httpMethod": "POST", 15430 // "id": "dlp.projects.image.redact", 15431 // "parameterOrder": [ 15432 // "parent" 15433 // ], 15434 // "parameters": { 15435 // "parent": { 15436 // "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", 15437 // "location": "path", 15438 // "pattern": "^projects/[^/]+$", 15439 // "required": true, 15440 // "type": "string" 15441 // } 15442 // }, 15443 // "path": "v2/{+parent}/image:redact", 15444 // "request": { 15445 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 15446 // }, 15447 // "response": { 15448 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 15449 // }, 15450 // "scopes": [ 15451 // "https://www.googleapis.com/auth/cloud-platform" 15452 // ] 15453 // } 15454 15455} 15456 15457// method id "dlp.projects.inspectTemplates.create": 15458 15459type ProjectsInspectTemplatesCreateCall struct { 15460 s *Service 15461 parentid string 15462 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 15463 urlParams_ gensupport.URLParams 15464 ctx_ context.Context 15465 header_ http.Header 15466} 15467 15468// Create: Creates an InspectTemplate for re-using frequently used 15469// configuration for inspecting content, images, and storage. See 15470// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15471func (r *ProjectsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { 15472 c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15473 c.parentid = parentid 15474 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 15475 return c 15476} 15477 15478// Fields allows partial responses to be retrieved. See 15479// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15480// for more information. 15481func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { 15482 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15483 return c 15484} 15485 15486// Context sets the context to be used in this call's Do method. Any 15487// pending HTTP request will be aborted if the provided context is 15488// canceled. 15489func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { 15490 c.ctx_ = ctx 15491 return c 15492} 15493 15494// Header returns an http.Header that can be modified by the caller to 15495// add HTTP headers to the request. 15496func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { 15497 if c.header_ == nil { 15498 c.header_ = make(http.Header) 15499 } 15500 return c.header_ 15501} 15502 15503func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 15504 reqHeaders := make(http.Header) 15505 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15506 for k, v := range c.header_ { 15507 reqHeaders[k] = v 15508 } 15509 reqHeaders.Set("User-Agent", c.s.userAgent()) 15510 var body io.Reader = nil 15511 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 15512 if err != nil { 15513 return nil, err 15514 } 15515 reqHeaders.Set("Content-Type", "application/json") 15516 c.urlParams_.Set("alt", alt) 15517 c.urlParams_.Set("prettyPrint", "false") 15518 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 15519 urls += "?" + c.urlParams_.Encode() 15520 req, err := http.NewRequest("POST", urls, body) 15521 if err != nil { 15522 return nil, err 15523 } 15524 req.Header = reqHeaders 15525 googleapi.Expand(req.URL, map[string]string{ 15526 "parent": c.parentid, 15527 }) 15528 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15529} 15530 15531// Do executes the "dlp.projects.inspectTemplates.create" call. 15532// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 15533// non-nil. Any non-2xx status code is an error. Response headers are in 15534// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 15535// (if a response was returned at all) in 15536// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15537// whether the returned error was because http.StatusNotModified was 15538// returned. 15539func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 15540 gensupport.SetOptions(c.urlParams_, opts...) 15541 res, err := c.doRequest("json") 15542 if res != nil && res.StatusCode == http.StatusNotModified { 15543 if res.Body != nil { 15544 res.Body.Close() 15545 } 15546 return nil, &googleapi.Error{ 15547 Code: res.StatusCode, 15548 Header: res.Header, 15549 } 15550 } 15551 if err != nil { 15552 return nil, err 15553 } 15554 defer googleapi.CloseBody(res) 15555 if err := googleapi.CheckResponse(res); err != nil { 15556 return nil, err 15557 } 15558 ret := &GooglePrivacyDlpV2InspectTemplate{ 15559 ServerResponse: googleapi.ServerResponse{ 15560 Header: res.Header, 15561 HTTPStatusCode: res.StatusCode, 15562 }, 15563 } 15564 target := &ret 15565 if err := gensupport.DecodeResponse(target, res); err != nil { 15566 return nil, err 15567 } 15568 return ret, nil 15569 // { 15570 // "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.", 15571 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 15572 // "httpMethod": "POST", 15573 // "id": "dlp.projects.inspectTemplates.create", 15574 // "parameterOrder": [ 15575 // "parent" 15576 // ], 15577 // "parameters": { 15578 // "parent": { 15579 // "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", 15580 // "location": "path", 15581 // "pattern": "^projects/[^/]+$", 15582 // "required": true, 15583 // "type": "string" 15584 // } 15585 // }, 15586 // "path": "v2/{+parent}/inspectTemplates", 15587 // "request": { 15588 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 15589 // }, 15590 // "response": { 15591 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 15592 // }, 15593 // "scopes": [ 15594 // "https://www.googleapis.com/auth/cloud-platform" 15595 // ] 15596 // } 15597 15598} 15599 15600// method id "dlp.projects.inspectTemplates.delete": 15601 15602type ProjectsInspectTemplatesDeleteCall struct { 15603 s *Service 15604 name string 15605 urlParams_ gensupport.URLParams 15606 ctx_ context.Context 15607 header_ http.Header 15608} 15609 15610// Delete: Deletes an InspectTemplate. See 15611// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15612func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { 15613 c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15614 c.name = name 15615 return c 15616} 15617 15618// Fields allows partial responses to be retrieved. See 15619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15620// for more information. 15621func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { 15622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15623 return c 15624} 15625 15626// Context sets the context to be used in this call's Do method. Any 15627// pending HTTP request will be aborted if the provided context is 15628// canceled. 15629func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { 15630 c.ctx_ = ctx 15631 return c 15632} 15633 15634// Header returns an http.Header that can be modified by the caller to 15635// add HTTP headers to the request. 15636func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { 15637 if c.header_ == nil { 15638 c.header_ = make(http.Header) 15639 } 15640 return c.header_ 15641} 15642 15643func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 15644 reqHeaders := make(http.Header) 15645 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15646 for k, v := range c.header_ { 15647 reqHeaders[k] = v 15648 } 15649 reqHeaders.Set("User-Agent", c.s.userAgent()) 15650 var body io.Reader = nil 15651 c.urlParams_.Set("alt", alt) 15652 c.urlParams_.Set("prettyPrint", "false") 15653 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15654 urls += "?" + c.urlParams_.Encode() 15655 req, err := http.NewRequest("DELETE", urls, body) 15656 if err != nil { 15657 return nil, err 15658 } 15659 req.Header = reqHeaders 15660 googleapi.Expand(req.URL, map[string]string{ 15661 "name": c.name, 15662 }) 15663 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15664} 15665 15666// Do executes the "dlp.projects.inspectTemplates.delete" call. 15667// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15668// non-2xx status code is an error. Response headers are in either 15669// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15670// returned at all) in error.(*googleapi.Error).Header. Use 15671// googleapi.IsNotModified to check whether the returned error was 15672// because http.StatusNotModified was returned. 15673func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15674 gensupport.SetOptions(c.urlParams_, opts...) 15675 res, err := c.doRequest("json") 15676 if res != nil && res.StatusCode == http.StatusNotModified { 15677 if res.Body != nil { 15678 res.Body.Close() 15679 } 15680 return nil, &googleapi.Error{ 15681 Code: res.StatusCode, 15682 Header: res.Header, 15683 } 15684 } 15685 if err != nil { 15686 return nil, err 15687 } 15688 defer googleapi.CloseBody(res) 15689 if err := googleapi.CheckResponse(res); err != nil { 15690 return nil, err 15691 } 15692 ret := &GoogleProtobufEmpty{ 15693 ServerResponse: googleapi.ServerResponse{ 15694 Header: res.Header, 15695 HTTPStatusCode: res.StatusCode, 15696 }, 15697 } 15698 target := &ret 15699 if err := gensupport.DecodeResponse(target, res); err != nil { 15700 return nil, err 15701 } 15702 return ret, nil 15703 // { 15704 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 15705 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 15706 // "httpMethod": "DELETE", 15707 // "id": "dlp.projects.inspectTemplates.delete", 15708 // "parameterOrder": [ 15709 // "name" 15710 // ], 15711 // "parameters": { 15712 // "name": { 15713 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 15714 // "location": "path", 15715 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 15716 // "required": true, 15717 // "type": "string" 15718 // } 15719 // }, 15720 // "path": "v2/{+name}", 15721 // "response": { 15722 // "$ref": "GoogleProtobufEmpty" 15723 // }, 15724 // "scopes": [ 15725 // "https://www.googleapis.com/auth/cloud-platform" 15726 // ] 15727 // } 15728 15729} 15730 15731// method id "dlp.projects.inspectTemplates.get": 15732 15733type ProjectsInspectTemplatesGetCall struct { 15734 s *Service 15735 name string 15736 urlParams_ gensupport.URLParams 15737 ifNoneMatch_ string 15738 ctx_ context.Context 15739 header_ http.Header 15740} 15741 15742// Get: Gets an InspectTemplate. See 15743// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15744func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { 15745 c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15746 c.name = name 15747 return c 15748} 15749 15750// Fields allows partial responses to be retrieved. See 15751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15752// for more information. 15753func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { 15754 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15755 return c 15756} 15757 15758// IfNoneMatch sets the optional parameter which makes the operation 15759// fail if the object's ETag matches the given value. This is useful for 15760// getting updates only after the object has changed since the last 15761// request. Use googleapi.IsNotModified to check whether the response 15762// error from Do is the result of In-None-Match. 15763func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { 15764 c.ifNoneMatch_ = entityTag 15765 return c 15766} 15767 15768// Context sets the context to be used in this call's Do method. Any 15769// pending HTTP request will be aborted if the provided context is 15770// canceled. 15771func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { 15772 c.ctx_ = ctx 15773 return c 15774} 15775 15776// Header returns an http.Header that can be modified by the caller to 15777// add HTTP headers to the request. 15778func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { 15779 if c.header_ == nil { 15780 c.header_ = make(http.Header) 15781 } 15782 return c.header_ 15783} 15784 15785func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 15786 reqHeaders := make(http.Header) 15787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15788 for k, v := range c.header_ { 15789 reqHeaders[k] = v 15790 } 15791 reqHeaders.Set("User-Agent", c.s.userAgent()) 15792 if c.ifNoneMatch_ != "" { 15793 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15794 } 15795 var body io.Reader = nil 15796 c.urlParams_.Set("alt", alt) 15797 c.urlParams_.Set("prettyPrint", "false") 15798 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 15799 urls += "?" + c.urlParams_.Encode() 15800 req, err := http.NewRequest("GET", urls, body) 15801 if err != nil { 15802 return nil, err 15803 } 15804 req.Header = reqHeaders 15805 googleapi.Expand(req.URL, map[string]string{ 15806 "name": c.name, 15807 }) 15808 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15809} 15810 15811// Do executes the "dlp.projects.inspectTemplates.get" call. 15812// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 15813// non-nil. Any non-2xx status code is an error. Response headers are in 15814// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 15815// (if a response was returned at all) in 15816// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15817// whether the returned error was because http.StatusNotModified was 15818// returned. 15819func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 15820 gensupport.SetOptions(c.urlParams_, opts...) 15821 res, err := c.doRequest("json") 15822 if res != nil && res.StatusCode == http.StatusNotModified { 15823 if res.Body != nil { 15824 res.Body.Close() 15825 } 15826 return nil, &googleapi.Error{ 15827 Code: res.StatusCode, 15828 Header: res.Header, 15829 } 15830 } 15831 if err != nil { 15832 return nil, err 15833 } 15834 defer googleapi.CloseBody(res) 15835 if err := googleapi.CheckResponse(res); err != nil { 15836 return nil, err 15837 } 15838 ret := &GooglePrivacyDlpV2InspectTemplate{ 15839 ServerResponse: googleapi.ServerResponse{ 15840 Header: res.Header, 15841 HTTPStatusCode: res.StatusCode, 15842 }, 15843 } 15844 target := &ret 15845 if err := gensupport.DecodeResponse(target, res); err != nil { 15846 return nil, err 15847 } 15848 return ret, nil 15849 // { 15850 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 15851 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 15852 // "httpMethod": "GET", 15853 // "id": "dlp.projects.inspectTemplates.get", 15854 // "parameterOrder": [ 15855 // "name" 15856 // ], 15857 // "parameters": { 15858 // "name": { 15859 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 15860 // "location": "path", 15861 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 15862 // "required": true, 15863 // "type": "string" 15864 // } 15865 // }, 15866 // "path": "v2/{+name}", 15867 // "response": { 15868 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 15869 // }, 15870 // "scopes": [ 15871 // "https://www.googleapis.com/auth/cloud-platform" 15872 // ] 15873 // } 15874 15875} 15876 15877// method id "dlp.projects.inspectTemplates.list": 15878 15879type ProjectsInspectTemplatesListCall struct { 15880 s *Service 15881 parentid string 15882 urlParams_ gensupport.URLParams 15883 ifNoneMatch_ string 15884 ctx_ context.Context 15885 header_ http.Header 15886} 15887 15888// List: Lists InspectTemplates. See 15889// https://cloud.google.com/dlp/docs/creating-templates to learn more. 15890func (r *ProjectsInspectTemplatesService) List(parentid string) *ProjectsInspectTemplatesListCall { 15891 c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15892 c.parentid = parentid 15893 return c 15894} 15895 15896// LocationId sets the optional parameter "locationId": Deprecated. This 15897// field has no effect. 15898func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *ProjectsInspectTemplatesListCall { 15899 c.urlParams_.Set("locationId", locationId) 15900 return c 15901} 15902 15903// OrderBy sets the optional parameter "orderBy": Comma separated list 15904// of fields to order by, followed by `asc` or `desc` postfix. This list 15905// is case-insensitive, default sorting order is ascending, redundant 15906// space characters are insignificant. Example: `name asc,update_time, 15907// create_time desc` Supported fields are: - `create_time`: corresponds 15908// to time the template was created. - `update_time`: corresponds to 15909// time the template was last updated. - `name`: corresponds to 15910// template's name. - `display_name`: corresponds to template's display 15911// name. 15912func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { 15913 c.urlParams_.Set("orderBy", orderBy) 15914 return c 15915} 15916 15917// PageSize sets the optional parameter "pageSize": Size of the page, 15918// can be limited by server. If zero server returns a page of max size 15919// 100. 15920func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { 15921 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15922 return c 15923} 15924 15925// PageToken sets the optional parameter "pageToken": Page token to 15926// continue retrieval. Comes from previous call to 15927// `ListInspectTemplates`. 15928func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { 15929 c.urlParams_.Set("pageToken", pageToken) 15930 return c 15931} 15932 15933// Fields allows partial responses to be retrieved. See 15934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15935// for more information. 15936func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { 15937 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15938 return c 15939} 15940 15941// IfNoneMatch sets the optional parameter which makes the operation 15942// fail if the object's ETag matches the given value. This is useful for 15943// getting updates only after the object has changed since the last 15944// request. Use googleapi.IsNotModified to check whether the response 15945// error from Do is the result of In-None-Match. 15946func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { 15947 c.ifNoneMatch_ = entityTag 15948 return c 15949} 15950 15951// Context sets the context to be used in this call's Do method. Any 15952// pending HTTP request will be aborted if the provided context is 15953// canceled. 15954func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { 15955 c.ctx_ = ctx 15956 return c 15957} 15958 15959// Header returns an http.Header that can be modified by the caller to 15960// add HTTP headers to the request. 15961func (c *ProjectsInspectTemplatesListCall) Header() http.Header { 15962 if c.header_ == nil { 15963 c.header_ = make(http.Header) 15964 } 15965 return c.header_ 15966} 15967 15968func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 15969 reqHeaders := make(http.Header) 15970 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 15971 for k, v := range c.header_ { 15972 reqHeaders[k] = v 15973 } 15974 reqHeaders.Set("User-Agent", c.s.userAgent()) 15975 if c.ifNoneMatch_ != "" { 15976 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15977 } 15978 var body io.Reader = nil 15979 c.urlParams_.Set("alt", alt) 15980 c.urlParams_.Set("prettyPrint", "false") 15981 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 15982 urls += "?" + c.urlParams_.Encode() 15983 req, err := http.NewRequest("GET", urls, body) 15984 if err != nil { 15985 return nil, err 15986 } 15987 req.Header = reqHeaders 15988 googleapi.Expand(req.URL, map[string]string{ 15989 "parent": c.parentid, 15990 }) 15991 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15992} 15993 15994// Do executes the "dlp.projects.inspectTemplates.list" call. 15995// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 15996// error will be non-nil. Any non-2xx status code is an error. Response 15997// headers are in either 15998// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 15999// or (if a response was returned at all) in 16000// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16001// whether the returned error was because http.StatusNotModified was 16002// returned. 16003func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 16004 gensupport.SetOptions(c.urlParams_, opts...) 16005 res, err := c.doRequest("json") 16006 if res != nil && res.StatusCode == http.StatusNotModified { 16007 if res.Body != nil { 16008 res.Body.Close() 16009 } 16010 return nil, &googleapi.Error{ 16011 Code: res.StatusCode, 16012 Header: res.Header, 16013 } 16014 } 16015 if err != nil { 16016 return nil, err 16017 } 16018 defer googleapi.CloseBody(res) 16019 if err := googleapi.CheckResponse(res); err != nil { 16020 return nil, err 16021 } 16022 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 16023 ServerResponse: googleapi.ServerResponse{ 16024 Header: res.Header, 16025 HTTPStatusCode: res.StatusCode, 16026 }, 16027 } 16028 target := &ret 16029 if err := gensupport.DecodeResponse(target, res); err != nil { 16030 return nil, err 16031 } 16032 return ret, nil 16033 // { 16034 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 16035 // "flatPath": "v2/projects/{projectsId}/inspectTemplates", 16036 // "httpMethod": "GET", 16037 // "id": "dlp.projects.inspectTemplates.list", 16038 // "parameterOrder": [ 16039 // "parent" 16040 // ], 16041 // "parameters": { 16042 // "locationId": { 16043 // "description": "Deprecated. This field has no effect.", 16044 // "location": "query", 16045 // "type": "string" 16046 // }, 16047 // "orderBy": { 16048 // "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.", 16049 // "location": "query", 16050 // "type": "string" 16051 // }, 16052 // "pageSize": { 16053 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 16054 // "format": "int32", 16055 // "location": "query", 16056 // "type": "integer" 16057 // }, 16058 // "pageToken": { 16059 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 16060 // "location": "query", 16061 // "type": "string" 16062 // }, 16063 // "parent": { 16064 // "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", 16065 // "location": "path", 16066 // "pattern": "^projects/[^/]+$", 16067 // "required": true, 16068 // "type": "string" 16069 // } 16070 // }, 16071 // "path": "v2/{+parent}/inspectTemplates", 16072 // "response": { 16073 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 16074 // }, 16075 // "scopes": [ 16076 // "https://www.googleapis.com/auth/cloud-platform" 16077 // ] 16078 // } 16079 16080} 16081 16082// Pages invokes f for each page of results. 16083// A non-nil error returned from f will halt the iteration. 16084// The provided context supersedes any context provided to the Context method. 16085func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 16086 c.ctx_ = ctx 16087 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16088 for { 16089 x, err := c.Do() 16090 if err != nil { 16091 return err 16092 } 16093 if err := f(x); err != nil { 16094 return err 16095 } 16096 if x.NextPageToken == "" { 16097 return nil 16098 } 16099 c.PageToken(x.NextPageToken) 16100 } 16101} 16102 16103// method id "dlp.projects.inspectTemplates.patch": 16104 16105type ProjectsInspectTemplatesPatchCall struct { 16106 s *Service 16107 name string 16108 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 16109 urlParams_ gensupport.URLParams 16110 ctx_ context.Context 16111 header_ http.Header 16112} 16113 16114// Patch: Updates the InspectTemplate. See 16115// https://cloud.google.com/dlp/docs/creating-templates to learn more. 16116func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { 16117 c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16118 c.name = name 16119 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 16120 return c 16121} 16122 16123// Fields allows partial responses to be retrieved. See 16124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16125// for more information. 16126func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { 16127 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16128 return c 16129} 16130 16131// Context sets the context to be used in this call's Do method. Any 16132// pending HTTP request will be aborted if the provided context is 16133// canceled. 16134func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { 16135 c.ctx_ = ctx 16136 return c 16137} 16138 16139// Header returns an http.Header that can be modified by the caller to 16140// add HTTP headers to the request. 16141func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { 16142 if c.header_ == nil { 16143 c.header_ = make(http.Header) 16144 } 16145 return c.header_ 16146} 16147 16148func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 16149 reqHeaders := make(http.Header) 16150 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16151 for k, v := range c.header_ { 16152 reqHeaders[k] = v 16153 } 16154 reqHeaders.Set("User-Agent", c.s.userAgent()) 16155 var body io.Reader = nil 16156 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 16157 if err != nil { 16158 return nil, err 16159 } 16160 reqHeaders.Set("Content-Type", "application/json") 16161 c.urlParams_.Set("alt", alt) 16162 c.urlParams_.Set("prettyPrint", "false") 16163 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16164 urls += "?" + c.urlParams_.Encode() 16165 req, err := http.NewRequest("PATCH", urls, body) 16166 if err != nil { 16167 return nil, err 16168 } 16169 req.Header = reqHeaders 16170 googleapi.Expand(req.URL, map[string]string{ 16171 "name": c.name, 16172 }) 16173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16174} 16175 16176// Do executes the "dlp.projects.inspectTemplates.patch" call. 16177// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 16178// non-nil. Any non-2xx status code is an error. Response headers are in 16179// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 16180// (if a response was returned at all) in 16181// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16182// whether the returned error was because http.StatusNotModified was 16183// returned. 16184func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 16185 gensupport.SetOptions(c.urlParams_, opts...) 16186 res, err := c.doRequest("json") 16187 if res != nil && res.StatusCode == http.StatusNotModified { 16188 if res.Body != nil { 16189 res.Body.Close() 16190 } 16191 return nil, &googleapi.Error{ 16192 Code: res.StatusCode, 16193 Header: res.Header, 16194 } 16195 } 16196 if err != nil { 16197 return nil, err 16198 } 16199 defer googleapi.CloseBody(res) 16200 if err := googleapi.CheckResponse(res); err != nil { 16201 return nil, err 16202 } 16203 ret := &GooglePrivacyDlpV2InspectTemplate{ 16204 ServerResponse: googleapi.ServerResponse{ 16205 Header: res.Header, 16206 HTTPStatusCode: res.StatusCode, 16207 }, 16208 } 16209 target := &ret 16210 if err := gensupport.DecodeResponse(target, res); err != nil { 16211 return nil, err 16212 } 16213 return ret, nil 16214 // { 16215 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 16216 // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", 16217 // "httpMethod": "PATCH", 16218 // "id": "dlp.projects.inspectTemplates.patch", 16219 // "parameterOrder": [ 16220 // "name" 16221 // ], 16222 // "parameters": { 16223 // "name": { 16224 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 16225 // "location": "path", 16226 // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", 16227 // "required": true, 16228 // "type": "string" 16229 // } 16230 // }, 16231 // "path": "v2/{+name}", 16232 // "request": { 16233 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 16234 // }, 16235 // "response": { 16236 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 16237 // }, 16238 // "scopes": [ 16239 // "https://www.googleapis.com/auth/cloud-platform" 16240 // ] 16241 // } 16242 16243} 16244 16245// method id "dlp.projects.jobTriggers.activate": 16246 16247type ProjectsJobTriggersActivateCall struct { 16248 s *Service 16249 name string 16250 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 16251 urlParams_ gensupport.URLParams 16252 ctx_ context.Context 16253 header_ http.Header 16254} 16255 16256// Activate: Activate a job trigger. Causes the immediate execute of a 16257// trigger instead of waiting on the trigger event to occur. 16258func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { 16259 c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16260 c.name = name 16261 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 16262 return c 16263} 16264 16265// Fields allows partial responses to be retrieved. See 16266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16267// for more information. 16268func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { 16269 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16270 return c 16271} 16272 16273// Context sets the context to be used in this call's Do method. Any 16274// pending HTTP request will be aborted if the provided context is 16275// canceled. 16276func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { 16277 c.ctx_ = ctx 16278 return c 16279} 16280 16281// Header returns an http.Header that can be modified by the caller to 16282// add HTTP headers to the request. 16283func (c *ProjectsJobTriggersActivateCall) Header() http.Header { 16284 if c.header_ == nil { 16285 c.header_ = make(http.Header) 16286 } 16287 return c.header_ 16288} 16289 16290func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 16291 reqHeaders := make(http.Header) 16292 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16293 for k, v := range c.header_ { 16294 reqHeaders[k] = v 16295 } 16296 reqHeaders.Set("User-Agent", c.s.userAgent()) 16297 var body io.Reader = nil 16298 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 16299 if err != nil { 16300 return nil, err 16301 } 16302 reqHeaders.Set("Content-Type", "application/json") 16303 c.urlParams_.Set("alt", alt) 16304 c.urlParams_.Set("prettyPrint", "false") 16305 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 16306 urls += "?" + c.urlParams_.Encode() 16307 req, err := http.NewRequest("POST", urls, body) 16308 if err != nil { 16309 return nil, err 16310 } 16311 req.Header = reqHeaders 16312 googleapi.Expand(req.URL, map[string]string{ 16313 "name": c.name, 16314 }) 16315 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16316} 16317 16318// Do executes the "dlp.projects.jobTriggers.activate" call. 16319// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 16320// Any non-2xx status code is an error. Response headers are in either 16321// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 16322// returned at all) in error.(*googleapi.Error).Header. Use 16323// googleapi.IsNotModified to check whether the returned error was 16324// because http.StatusNotModified was returned. 16325func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 16326 gensupport.SetOptions(c.urlParams_, opts...) 16327 res, err := c.doRequest("json") 16328 if res != nil && res.StatusCode == http.StatusNotModified { 16329 if res.Body != nil { 16330 res.Body.Close() 16331 } 16332 return nil, &googleapi.Error{ 16333 Code: res.StatusCode, 16334 Header: res.Header, 16335 } 16336 } 16337 if err != nil { 16338 return nil, err 16339 } 16340 defer googleapi.CloseBody(res) 16341 if err := googleapi.CheckResponse(res); err != nil { 16342 return nil, err 16343 } 16344 ret := &GooglePrivacyDlpV2DlpJob{ 16345 ServerResponse: googleapi.ServerResponse{ 16346 Header: res.Header, 16347 HTTPStatusCode: res.StatusCode, 16348 }, 16349 } 16350 target := &ret 16351 if err := gensupport.DecodeResponse(target, res); err != nil { 16352 return nil, err 16353 } 16354 return ret, nil 16355 // { 16356 // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 16357 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", 16358 // "httpMethod": "POST", 16359 // "id": "dlp.projects.jobTriggers.activate", 16360 // "parameterOrder": [ 16361 // "name" 16362 // ], 16363 // "parameters": { 16364 // "name": { 16365 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16366 // "location": "path", 16367 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16368 // "required": true, 16369 // "type": "string" 16370 // } 16371 // }, 16372 // "path": "v2/{+name}:activate", 16373 // "request": { 16374 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 16375 // }, 16376 // "response": { 16377 // "$ref": "GooglePrivacyDlpV2DlpJob" 16378 // }, 16379 // "scopes": [ 16380 // "https://www.googleapis.com/auth/cloud-platform" 16381 // ] 16382 // } 16383 16384} 16385 16386// method id "dlp.projects.jobTriggers.create": 16387 16388type ProjectsJobTriggersCreateCall struct { 16389 s *Service 16390 parentid string 16391 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 16392 urlParams_ gensupport.URLParams 16393 ctx_ context.Context 16394 header_ http.Header 16395} 16396 16397// Create: Creates a job trigger to run DLP actions such as scanning 16398// storage for sensitive information on a set schedule. See 16399// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16400// more. 16401func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { 16402 c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16403 c.parentid = parentid 16404 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 16405 return c 16406} 16407 16408// Fields allows partial responses to be retrieved. See 16409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16410// for more information. 16411func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { 16412 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16413 return c 16414} 16415 16416// Context sets the context to be used in this call's Do method. Any 16417// pending HTTP request will be aborted if the provided context is 16418// canceled. 16419func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { 16420 c.ctx_ = ctx 16421 return c 16422} 16423 16424// Header returns an http.Header that can be modified by the caller to 16425// add HTTP headers to the request. 16426func (c *ProjectsJobTriggersCreateCall) Header() http.Header { 16427 if c.header_ == nil { 16428 c.header_ = make(http.Header) 16429 } 16430 return c.header_ 16431} 16432 16433func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 16434 reqHeaders := make(http.Header) 16435 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16436 for k, v := range c.header_ { 16437 reqHeaders[k] = v 16438 } 16439 reqHeaders.Set("User-Agent", c.s.userAgent()) 16440 var body io.Reader = nil 16441 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 16442 if err != nil { 16443 return nil, err 16444 } 16445 reqHeaders.Set("Content-Type", "application/json") 16446 c.urlParams_.Set("alt", alt) 16447 c.urlParams_.Set("prettyPrint", "false") 16448 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 16449 urls += "?" + c.urlParams_.Encode() 16450 req, err := http.NewRequest("POST", urls, body) 16451 if err != nil { 16452 return nil, err 16453 } 16454 req.Header = reqHeaders 16455 googleapi.Expand(req.URL, map[string]string{ 16456 "parent": c.parentid, 16457 }) 16458 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16459} 16460 16461// Do executes the "dlp.projects.jobTriggers.create" call. 16462// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 16463// non-nil. Any non-2xx status code is an error. Response headers are in 16464// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 16465// response was returned at all) in error.(*googleapi.Error).Header. Use 16466// googleapi.IsNotModified to check whether the returned error was 16467// because http.StatusNotModified was returned. 16468func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 16469 gensupport.SetOptions(c.urlParams_, opts...) 16470 res, err := c.doRequest("json") 16471 if res != nil && res.StatusCode == http.StatusNotModified { 16472 if res.Body != nil { 16473 res.Body.Close() 16474 } 16475 return nil, &googleapi.Error{ 16476 Code: res.StatusCode, 16477 Header: res.Header, 16478 } 16479 } 16480 if err != nil { 16481 return nil, err 16482 } 16483 defer googleapi.CloseBody(res) 16484 if err := googleapi.CheckResponse(res); err != nil { 16485 return nil, err 16486 } 16487 ret := &GooglePrivacyDlpV2JobTrigger{ 16488 ServerResponse: googleapi.ServerResponse{ 16489 Header: res.Header, 16490 HTTPStatusCode: res.StatusCode, 16491 }, 16492 } 16493 target := &ret 16494 if err := gensupport.DecodeResponse(target, res); err != nil { 16495 return nil, err 16496 } 16497 return ret, nil 16498 // { 16499 // "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.", 16500 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 16501 // "httpMethod": "POST", 16502 // "id": "dlp.projects.jobTriggers.create", 16503 // "parameterOrder": [ 16504 // "parent" 16505 // ], 16506 // "parameters": { 16507 // "parent": { 16508 // "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", 16509 // "location": "path", 16510 // "pattern": "^projects/[^/]+$", 16511 // "required": true, 16512 // "type": "string" 16513 // } 16514 // }, 16515 // "path": "v2/{+parent}/jobTriggers", 16516 // "request": { 16517 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 16518 // }, 16519 // "response": { 16520 // "$ref": "GooglePrivacyDlpV2JobTrigger" 16521 // }, 16522 // "scopes": [ 16523 // "https://www.googleapis.com/auth/cloud-platform" 16524 // ] 16525 // } 16526 16527} 16528 16529// method id "dlp.projects.jobTriggers.delete": 16530 16531type ProjectsJobTriggersDeleteCall struct { 16532 s *Service 16533 name string 16534 urlParams_ gensupport.URLParams 16535 ctx_ context.Context 16536 header_ http.Header 16537} 16538 16539// Delete: Deletes a job trigger. See 16540// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16541// more. 16542func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { 16543 c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16544 c.name = name 16545 return c 16546} 16547 16548// Fields allows partial responses to be retrieved. See 16549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16550// for more information. 16551func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { 16552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16553 return c 16554} 16555 16556// Context sets the context to be used in this call's Do method. Any 16557// pending HTTP request will be aborted if the provided context is 16558// canceled. 16559func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { 16560 c.ctx_ = ctx 16561 return c 16562} 16563 16564// Header returns an http.Header that can be modified by the caller to 16565// add HTTP headers to the request. 16566func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { 16567 if c.header_ == nil { 16568 c.header_ = make(http.Header) 16569 } 16570 return c.header_ 16571} 16572 16573func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 16574 reqHeaders := make(http.Header) 16575 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16576 for k, v := range c.header_ { 16577 reqHeaders[k] = v 16578 } 16579 reqHeaders.Set("User-Agent", c.s.userAgent()) 16580 var body io.Reader = nil 16581 c.urlParams_.Set("alt", alt) 16582 c.urlParams_.Set("prettyPrint", "false") 16583 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16584 urls += "?" + c.urlParams_.Encode() 16585 req, err := http.NewRequest("DELETE", urls, body) 16586 if err != nil { 16587 return nil, err 16588 } 16589 req.Header = reqHeaders 16590 googleapi.Expand(req.URL, map[string]string{ 16591 "name": c.name, 16592 }) 16593 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16594} 16595 16596// Do executes the "dlp.projects.jobTriggers.delete" call. 16597// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 16598// non-2xx status code is an error. Response headers are in either 16599// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 16600// returned at all) in error.(*googleapi.Error).Header. Use 16601// googleapi.IsNotModified to check whether the returned error was 16602// because http.StatusNotModified was returned. 16603func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 16604 gensupport.SetOptions(c.urlParams_, opts...) 16605 res, err := c.doRequest("json") 16606 if res != nil && res.StatusCode == http.StatusNotModified { 16607 if res.Body != nil { 16608 res.Body.Close() 16609 } 16610 return nil, &googleapi.Error{ 16611 Code: res.StatusCode, 16612 Header: res.Header, 16613 } 16614 } 16615 if err != nil { 16616 return nil, err 16617 } 16618 defer googleapi.CloseBody(res) 16619 if err := googleapi.CheckResponse(res); err != nil { 16620 return nil, err 16621 } 16622 ret := &GoogleProtobufEmpty{ 16623 ServerResponse: googleapi.ServerResponse{ 16624 Header: res.Header, 16625 HTTPStatusCode: res.StatusCode, 16626 }, 16627 } 16628 target := &ret 16629 if err := gensupport.DecodeResponse(target, res); err != nil { 16630 return nil, err 16631 } 16632 return ret, nil 16633 // { 16634 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16635 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 16636 // "httpMethod": "DELETE", 16637 // "id": "dlp.projects.jobTriggers.delete", 16638 // "parameterOrder": [ 16639 // "name" 16640 // ], 16641 // "parameters": { 16642 // "name": { 16643 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16644 // "location": "path", 16645 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16646 // "required": true, 16647 // "type": "string" 16648 // } 16649 // }, 16650 // "path": "v2/{+name}", 16651 // "response": { 16652 // "$ref": "GoogleProtobufEmpty" 16653 // }, 16654 // "scopes": [ 16655 // "https://www.googleapis.com/auth/cloud-platform" 16656 // ] 16657 // } 16658 16659} 16660 16661// method id "dlp.projects.jobTriggers.get": 16662 16663type ProjectsJobTriggersGetCall struct { 16664 s *Service 16665 name string 16666 urlParams_ gensupport.URLParams 16667 ifNoneMatch_ string 16668 ctx_ context.Context 16669 header_ http.Header 16670} 16671 16672// Get: Gets a job trigger. See 16673// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16674// more. 16675func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { 16676 c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16677 c.name = name 16678 return c 16679} 16680 16681// Fields allows partial responses to be retrieved. See 16682// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16683// for more information. 16684func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { 16685 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16686 return c 16687} 16688 16689// IfNoneMatch sets the optional parameter which makes the operation 16690// fail if the object's ETag matches the given value. This is useful for 16691// getting updates only after the object has changed since the last 16692// request. Use googleapi.IsNotModified to check whether the response 16693// error from Do is the result of In-None-Match. 16694func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { 16695 c.ifNoneMatch_ = entityTag 16696 return c 16697} 16698 16699// Context sets the context to be used in this call's Do method. Any 16700// pending HTTP request will be aborted if the provided context is 16701// canceled. 16702func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { 16703 c.ctx_ = ctx 16704 return c 16705} 16706 16707// Header returns an http.Header that can be modified by the caller to 16708// add HTTP headers to the request. 16709func (c *ProjectsJobTriggersGetCall) Header() http.Header { 16710 if c.header_ == nil { 16711 c.header_ = make(http.Header) 16712 } 16713 return c.header_ 16714} 16715 16716func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 16717 reqHeaders := make(http.Header) 16718 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16719 for k, v := range c.header_ { 16720 reqHeaders[k] = v 16721 } 16722 reqHeaders.Set("User-Agent", c.s.userAgent()) 16723 if c.ifNoneMatch_ != "" { 16724 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16725 } 16726 var body io.Reader = nil 16727 c.urlParams_.Set("alt", alt) 16728 c.urlParams_.Set("prettyPrint", "false") 16729 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 16730 urls += "?" + c.urlParams_.Encode() 16731 req, err := http.NewRequest("GET", urls, body) 16732 if err != nil { 16733 return nil, err 16734 } 16735 req.Header = reqHeaders 16736 googleapi.Expand(req.URL, map[string]string{ 16737 "name": c.name, 16738 }) 16739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16740} 16741 16742// Do executes the "dlp.projects.jobTriggers.get" call. 16743// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 16744// non-nil. Any non-2xx status code is an error. Response headers are in 16745// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 16746// response was returned at all) in error.(*googleapi.Error).Header. Use 16747// googleapi.IsNotModified to check whether the returned error was 16748// because http.StatusNotModified was returned. 16749func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 16750 gensupport.SetOptions(c.urlParams_, opts...) 16751 res, err := c.doRequest("json") 16752 if res != nil && res.StatusCode == http.StatusNotModified { 16753 if res.Body != nil { 16754 res.Body.Close() 16755 } 16756 return nil, &googleapi.Error{ 16757 Code: res.StatusCode, 16758 Header: res.Header, 16759 } 16760 } 16761 if err != nil { 16762 return nil, err 16763 } 16764 defer googleapi.CloseBody(res) 16765 if err := googleapi.CheckResponse(res); err != nil { 16766 return nil, err 16767 } 16768 ret := &GooglePrivacyDlpV2JobTrigger{ 16769 ServerResponse: googleapi.ServerResponse{ 16770 Header: res.Header, 16771 HTTPStatusCode: res.StatusCode, 16772 }, 16773 } 16774 target := &ret 16775 if err := gensupport.DecodeResponse(target, res); err != nil { 16776 return nil, err 16777 } 16778 return ret, nil 16779 // { 16780 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16781 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 16782 // "httpMethod": "GET", 16783 // "id": "dlp.projects.jobTriggers.get", 16784 // "parameterOrder": [ 16785 // "name" 16786 // ], 16787 // "parameters": { 16788 // "name": { 16789 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 16790 // "location": "path", 16791 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 16792 // "required": true, 16793 // "type": "string" 16794 // } 16795 // }, 16796 // "path": "v2/{+name}", 16797 // "response": { 16798 // "$ref": "GooglePrivacyDlpV2JobTrigger" 16799 // }, 16800 // "scopes": [ 16801 // "https://www.googleapis.com/auth/cloud-platform" 16802 // ] 16803 // } 16804 16805} 16806 16807// method id "dlp.projects.jobTriggers.list": 16808 16809type ProjectsJobTriggersListCall struct { 16810 s *Service 16811 parentid string 16812 urlParams_ gensupport.URLParams 16813 ifNoneMatch_ string 16814 ctx_ context.Context 16815 header_ http.Header 16816} 16817 16818// List: Lists job triggers. See 16819// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 16820// more. 16821func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { 16822 c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16823 c.parentid = parentid 16824 return c 16825} 16826 16827// Filter sets the optional parameter "filter": Allows filtering. 16828// Supported syntax: * Filter expressions are made up of one or more 16829// restrictions. * Restrictions can be combined by `AND` or `OR` logical 16830// operators. A sequence of restrictions implicitly uses `AND`. * A 16831// restriction has the form of `{field} {operator} {value}`. * Supported 16832// fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED 16833// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 16834// 'last_run_time` - RFC 3339 formatted timestamp, surrounded by 16835// quotation marks. Nanoseconds are ignored. - 'error_count' - Number of 16836// errors that have occurred while running. * The operator must be `=` 16837// or `!=` for status and inspected_storage. Examples: * 16838// inspected_storage = cloud_storage AND status = HEALTHY * 16839// inspected_storage = cloud_storage OR inspected_storage = bigquery * 16840// inspected_storage = cloud_storage AND (state = PAUSED OR state = 16841// HEALTHY) * last_run_time > \"2017-12-12T00:00:00+00:00\" The length 16842// of this field should be no more than 500 characters. 16843func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { 16844 c.urlParams_.Set("filter", filter) 16845 return c 16846} 16847 16848// LocationId sets the optional parameter "locationId": Deprecated. This 16849// field has no effect. 16850func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJobTriggersListCall { 16851 c.urlParams_.Set("locationId", locationId) 16852 return c 16853} 16854 16855// OrderBy sets the optional parameter "orderBy": Comma separated list 16856// of triggeredJob fields to order by, followed by `asc` or `desc` 16857// postfix. This list is case-insensitive, default sorting order is 16858// ascending, redundant space characters are insignificant. Example: 16859// `name asc,update_time, create_time desc` Supported fields are: - 16860// `create_time`: corresponds to time the JobTrigger was created. - 16861// `update_time`: corresponds to time the JobTrigger was last updated. - 16862// `last_run_time`: corresponds to the last time the JobTrigger ran. - 16863// `name`: corresponds to JobTrigger's name. - `display_name`: 16864// corresponds to JobTrigger's display name. - `status`: corresponds to 16865// JobTrigger's status. 16866func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { 16867 c.urlParams_.Set("orderBy", orderBy) 16868 return c 16869} 16870 16871// PageSize sets the optional parameter "pageSize": Size of the page, 16872// can be limited by a server. 16873func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { 16874 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16875 return c 16876} 16877 16878// PageToken sets the optional parameter "pageToken": Page token to 16879// continue retrieval. Comes from previous call to ListJobTriggers. 16880// `order_by` field must not change for subsequent calls. 16881func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { 16882 c.urlParams_.Set("pageToken", pageToken) 16883 return c 16884} 16885 16886// Fields allows partial responses to be retrieved. See 16887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16888// for more information. 16889func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { 16890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16891 return c 16892} 16893 16894// IfNoneMatch sets the optional parameter which makes the operation 16895// fail if the object's ETag matches the given value. This is useful for 16896// getting updates only after the object has changed since the last 16897// request. Use googleapi.IsNotModified to check whether the response 16898// error from Do is the result of In-None-Match. 16899func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { 16900 c.ifNoneMatch_ = entityTag 16901 return c 16902} 16903 16904// Context sets the context to be used in this call's Do method. Any 16905// pending HTTP request will be aborted if the provided context is 16906// canceled. 16907func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { 16908 c.ctx_ = ctx 16909 return c 16910} 16911 16912// Header returns an http.Header that can be modified by the caller to 16913// add HTTP headers to the request. 16914func (c *ProjectsJobTriggersListCall) Header() http.Header { 16915 if c.header_ == nil { 16916 c.header_ = make(http.Header) 16917 } 16918 return c.header_ 16919} 16920 16921func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 16922 reqHeaders := make(http.Header) 16923 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 16924 for k, v := range c.header_ { 16925 reqHeaders[k] = v 16926 } 16927 reqHeaders.Set("User-Agent", c.s.userAgent()) 16928 if c.ifNoneMatch_ != "" { 16929 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16930 } 16931 var body io.Reader = nil 16932 c.urlParams_.Set("alt", alt) 16933 c.urlParams_.Set("prettyPrint", "false") 16934 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 16935 urls += "?" + c.urlParams_.Encode() 16936 req, err := http.NewRequest("GET", urls, body) 16937 if err != nil { 16938 return nil, err 16939 } 16940 req.Header = reqHeaders 16941 googleapi.Expand(req.URL, map[string]string{ 16942 "parent": c.parentid, 16943 }) 16944 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16945} 16946 16947// Do executes the "dlp.projects.jobTriggers.list" call. 16948// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 16949// will be non-nil. Any non-2xx status code is an error. Response 16950// headers are in either 16951// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 16952// (if a response was returned at all) in 16953// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16954// whether the returned error was because http.StatusNotModified was 16955// returned. 16956func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 16957 gensupport.SetOptions(c.urlParams_, opts...) 16958 res, err := c.doRequest("json") 16959 if res != nil && res.StatusCode == http.StatusNotModified { 16960 if res.Body != nil { 16961 res.Body.Close() 16962 } 16963 return nil, &googleapi.Error{ 16964 Code: res.StatusCode, 16965 Header: res.Header, 16966 } 16967 } 16968 if err != nil { 16969 return nil, err 16970 } 16971 defer googleapi.CloseBody(res) 16972 if err := googleapi.CheckResponse(res); err != nil { 16973 return nil, err 16974 } 16975 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 16976 ServerResponse: googleapi.ServerResponse{ 16977 Header: res.Header, 16978 HTTPStatusCode: res.StatusCode, 16979 }, 16980 } 16981 target := &ret 16982 if err := gensupport.DecodeResponse(target, res); err != nil { 16983 return nil, err 16984 } 16985 return ret, nil 16986 // { 16987 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 16988 // "flatPath": "v2/projects/{projectsId}/jobTriggers", 16989 // "httpMethod": "GET", 16990 // "id": "dlp.projects.jobTriggers.list", 16991 // "parameterOrder": [ 16992 // "parent" 16993 // ], 16994 // "parameters": { 16995 // "filter": { 16996 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 16997 // "location": "query", 16998 // "type": "string" 16999 // }, 17000 // "locationId": { 17001 // "description": "Deprecated. This field has no effect.", 17002 // "location": "query", 17003 // "type": "string" 17004 // }, 17005 // "orderBy": { 17006 // "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.", 17007 // "location": "query", 17008 // "type": "string" 17009 // }, 17010 // "pageSize": { 17011 // "description": "Size of the page, can be limited by a server.", 17012 // "format": "int32", 17013 // "location": "query", 17014 // "type": "integer" 17015 // }, 17016 // "pageToken": { 17017 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 17018 // "location": "query", 17019 // "type": "string" 17020 // }, 17021 // "parent": { 17022 // "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", 17023 // "location": "path", 17024 // "pattern": "^projects/[^/]+$", 17025 // "required": true, 17026 // "type": "string" 17027 // } 17028 // }, 17029 // "path": "v2/{+parent}/jobTriggers", 17030 // "response": { 17031 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 17032 // }, 17033 // "scopes": [ 17034 // "https://www.googleapis.com/auth/cloud-platform" 17035 // ] 17036 // } 17037 17038} 17039 17040// Pages invokes f for each page of results. 17041// A non-nil error returned from f will halt the iteration. 17042// The provided context supersedes any context provided to the Context method. 17043func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 17044 c.ctx_ = ctx 17045 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17046 for { 17047 x, err := c.Do() 17048 if err != nil { 17049 return err 17050 } 17051 if err := f(x); err != nil { 17052 return err 17053 } 17054 if x.NextPageToken == "" { 17055 return nil 17056 } 17057 c.PageToken(x.NextPageToken) 17058 } 17059} 17060 17061// method id "dlp.projects.jobTriggers.patch": 17062 17063type ProjectsJobTriggersPatchCall struct { 17064 s *Service 17065 name string 17066 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 17067 urlParams_ gensupport.URLParams 17068 ctx_ context.Context 17069 header_ http.Header 17070} 17071 17072// Patch: Updates a job trigger. See 17073// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 17074// more. 17075func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { 17076 c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17077 c.name = name 17078 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 17079 return c 17080} 17081 17082// Fields allows partial responses to be retrieved. See 17083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17084// for more information. 17085func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { 17086 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17087 return c 17088} 17089 17090// Context sets the context to be used in this call's Do method. Any 17091// pending HTTP request will be aborted if the provided context is 17092// canceled. 17093func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { 17094 c.ctx_ = ctx 17095 return c 17096} 17097 17098// Header returns an http.Header that can be modified by the caller to 17099// add HTTP headers to the request. 17100func (c *ProjectsJobTriggersPatchCall) Header() http.Header { 17101 if c.header_ == nil { 17102 c.header_ = make(http.Header) 17103 } 17104 return c.header_ 17105} 17106 17107func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 17108 reqHeaders := make(http.Header) 17109 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17110 for k, v := range c.header_ { 17111 reqHeaders[k] = v 17112 } 17113 reqHeaders.Set("User-Agent", c.s.userAgent()) 17114 var body io.Reader = nil 17115 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 17116 if err != nil { 17117 return nil, err 17118 } 17119 reqHeaders.Set("Content-Type", "application/json") 17120 c.urlParams_.Set("alt", alt) 17121 c.urlParams_.Set("prettyPrint", "false") 17122 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17123 urls += "?" + c.urlParams_.Encode() 17124 req, err := http.NewRequest("PATCH", urls, body) 17125 if err != nil { 17126 return nil, err 17127 } 17128 req.Header = reqHeaders 17129 googleapi.Expand(req.URL, map[string]string{ 17130 "name": c.name, 17131 }) 17132 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17133} 17134 17135// Do executes the "dlp.projects.jobTriggers.patch" call. 17136// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 17137// non-nil. Any non-2xx status code is an error. Response headers are in 17138// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 17139// response was returned at all) in error.(*googleapi.Error).Header. Use 17140// googleapi.IsNotModified to check whether the returned error was 17141// because http.StatusNotModified was returned. 17142func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 17143 gensupport.SetOptions(c.urlParams_, opts...) 17144 res, err := c.doRequest("json") 17145 if res != nil && res.StatusCode == http.StatusNotModified { 17146 if res.Body != nil { 17147 res.Body.Close() 17148 } 17149 return nil, &googleapi.Error{ 17150 Code: res.StatusCode, 17151 Header: res.Header, 17152 } 17153 } 17154 if err != nil { 17155 return nil, err 17156 } 17157 defer googleapi.CloseBody(res) 17158 if err := googleapi.CheckResponse(res); err != nil { 17159 return nil, err 17160 } 17161 ret := &GooglePrivacyDlpV2JobTrigger{ 17162 ServerResponse: googleapi.ServerResponse{ 17163 Header: res.Header, 17164 HTTPStatusCode: res.StatusCode, 17165 }, 17166 } 17167 target := &ret 17168 if err := gensupport.DecodeResponse(target, res); err != nil { 17169 return nil, err 17170 } 17171 return ret, nil 17172 // { 17173 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 17174 // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", 17175 // "httpMethod": "PATCH", 17176 // "id": "dlp.projects.jobTriggers.patch", 17177 // "parameterOrder": [ 17178 // "name" 17179 // ], 17180 // "parameters": { 17181 // "name": { 17182 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 17183 // "location": "path", 17184 // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", 17185 // "required": true, 17186 // "type": "string" 17187 // } 17188 // }, 17189 // "path": "v2/{+name}", 17190 // "request": { 17191 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 17192 // }, 17193 // "response": { 17194 // "$ref": "GooglePrivacyDlpV2JobTrigger" 17195 // }, 17196 // "scopes": [ 17197 // "https://www.googleapis.com/auth/cloud-platform" 17198 // ] 17199 // } 17200 17201} 17202 17203// method id "dlp.projects.locations.content.deidentify": 17204 17205type ProjectsLocationsContentDeidentifyCall struct { 17206 s *Service 17207 parentid string 17208 googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest 17209 urlParams_ gensupport.URLParams 17210 ctx_ context.Context 17211 header_ http.Header 17212} 17213 17214// Deidentify: De-identifies potentially sensitive info from a 17215// ContentItem. This method has limits on input size and output size. 17216// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to 17217// learn more. When no InfoTypes or CustomInfoTypes are specified in 17218// this request, the system will automatically choose what detectors to 17219// run. By default this may be all types, but may change over time as 17220// detectors are updated. 17221func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { 17222 c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17223 c.parentid = parentid 17224 c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest 17225 return c 17226} 17227 17228// Fields allows partial responses to be retrieved. See 17229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17230// for more information. 17231func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { 17232 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17233 return c 17234} 17235 17236// Context sets the context to be used in this call's Do method. Any 17237// pending HTTP request will be aborted if the provided context is 17238// canceled. 17239func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { 17240 c.ctx_ = ctx 17241 return c 17242} 17243 17244// Header returns an http.Header that can be modified by the caller to 17245// add HTTP headers to the request. 17246func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { 17247 if c.header_ == nil { 17248 c.header_ = make(http.Header) 17249 } 17250 return c.header_ 17251} 17252 17253func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { 17254 reqHeaders := make(http.Header) 17255 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17256 for k, v := range c.header_ { 17257 reqHeaders[k] = v 17258 } 17259 reqHeaders.Set("User-Agent", c.s.userAgent()) 17260 var body io.Reader = nil 17261 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) 17262 if err != nil { 17263 return nil, err 17264 } 17265 reqHeaders.Set("Content-Type", "application/json") 17266 c.urlParams_.Set("alt", alt) 17267 c.urlParams_.Set("prettyPrint", "false") 17268 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") 17269 urls += "?" + c.urlParams_.Encode() 17270 req, err := http.NewRequest("POST", urls, body) 17271 if err != nil { 17272 return nil, err 17273 } 17274 req.Header = reqHeaders 17275 googleapi.Expand(req.URL, map[string]string{ 17276 "parent": c.parentid, 17277 }) 17278 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17279} 17280 17281// Do executes the "dlp.projects.locations.content.deidentify" call. 17282// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error 17283// will be non-nil. Any non-2xx status code is an error. Response 17284// headers are in either 17285// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or 17286// (if a response was returned at all) in 17287// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17288// whether the returned error was because http.StatusNotModified was 17289// returned. 17290func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { 17291 gensupport.SetOptions(c.urlParams_, opts...) 17292 res, err := c.doRequest("json") 17293 if res != nil && res.StatusCode == http.StatusNotModified { 17294 if res.Body != nil { 17295 res.Body.Close() 17296 } 17297 return nil, &googleapi.Error{ 17298 Code: res.StatusCode, 17299 Header: res.Header, 17300 } 17301 } 17302 if err != nil { 17303 return nil, err 17304 } 17305 defer googleapi.CloseBody(res) 17306 if err := googleapi.CheckResponse(res); err != nil { 17307 return nil, err 17308 } 17309 ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ 17310 ServerResponse: googleapi.ServerResponse{ 17311 Header: res.Header, 17312 HTTPStatusCode: res.StatusCode, 17313 }, 17314 } 17315 target := &ret 17316 if err := gensupport.DecodeResponse(target, res); err != nil { 17317 return nil, err 17318 } 17319 return ret, nil 17320 // { 17321 // "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.", 17322 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:deidentify", 17323 // "httpMethod": "POST", 17324 // "id": "dlp.projects.locations.content.deidentify", 17325 // "parameterOrder": [ 17326 // "parent" 17327 // ], 17328 // "parameters": { 17329 // "parent": { 17330 // "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", 17331 // "location": "path", 17332 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17333 // "required": true, 17334 // "type": "string" 17335 // } 17336 // }, 17337 // "path": "v2/{+parent}/content:deidentify", 17338 // "request": { 17339 // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" 17340 // }, 17341 // "response": { 17342 // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" 17343 // }, 17344 // "scopes": [ 17345 // "https://www.googleapis.com/auth/cloud-platform" 17346 // ] 17347 // } 17348 17349} 17350 17351// method id "dlp.projects.locations.content.inspect": 17352 17353type ProjectsLocationsContentInspectCall struct { 17354 s *Service 17355 parentid string 17356 googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest 17357 urlParams_ gensupport.URLParams 17358 ctx_ context.Context 17359 header_ http.Header 17360} 17361 17362// Inspect: Finds potentially sensitive info in content. This method has 17363// limits on input size, processing time, and output size. When no 17364// InfoTypes or CustomInfoTypes are specified in this request, the 17365// system will automatically choose what detectors to run. By default 17366// this may be all types, but may change over time as detectors are 17367// updated. For how to guides, see 17368// https://cloud.google.com/dlp/docs/inspecting-images and 17369// https://cloud.google.com/dlp/docs/inspecting-text, 17370func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { 17371 c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17372 c.parentid = parentid 17373 c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest 17374 return c 17375} 17376 17377// Fields allows partial responses to be retrieved. See 17378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17379// for more information. 17380func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { 17381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17382 return c 17383} 17384 17385// Context sets the context to be used in this call's Do method. Any 17386// pending HTTP request will be aborted if the provided context is 17387// canceled. 17388func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { 17389 c.ctx_ = ctx 17390 return c 17391} 17392 17393// Header returns an http.Header that can be modified by the caller to 17394// add HTTP headers to the request. 17395func (c *ProjectsLocationsContentInspectCall) Header() http.Header { 17396 if c.header_ == nil { 17397 c.header_ = make(http.Header) 17398 } 17399 return c.header_ 17400} 17401 17402func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { 17403 reqHeaders := make(http.Header) 17404 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17405 for k, v := range c.header_ { 17406 reqHeaders[k] = v 17407 } 17408 reqHeaders.Set("User-Agent", c.s.userAgent()) 17409 var body io.Reader = nil 17410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) 17411 if err != nil { 17412 return nil, err 17413 } 17414 reqHeaders.Set("Content-Type", "application/json") 17415 c.urlParams_.Set("alt", alt) 17416 c.urlParams_.Set("prettyPrint", "false") 17417 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") 17418 urls += "?" + c.urlParams_.Encode() 17419 req, err := http.NewRequest("POST", urls, body) 17420 if err != nil { 17421 return nil, err 17422 } 17423 req.Header = reqHeaders 17424 googleapi.Expand(req.URL, map[string]string{ 17425 "parent": c.parentid, 17426 }) 17427 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17428} 17429 17430// Do executes the "dlp.projects.locations.content.inspect" call. 17431// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error 17432// will be non-nil. Any non-2xx status code is an error. Response 17433// headers are in either 17434// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or 17435// (if a response was returned at all) in 17436// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17437// whether the returned error was because http.StatusNotModified was 17438// returned. 17439func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { 17440 gensupport.SetOptions(c.urlParams_, opts...) 17441 res, err := c.doRequest("json") 17442 if res != nil && res.StatusCode == http.StatusNotModified { 17443 if res.Body != nil { 17444 res.Body.Close() 17445 } 17446 return nil, &googleapi.Error{ 17447 Code: res.StatusCode, 17448 Header: res.Header, 17449 } 17450 } 17451 if err != nil { 17452 return nil, err 17453 } 17454 defer googleapi.CloseBody(res) 17455 if err := googleapi.CheckResponse(res); err != nil { 17456 return nil, err 17457 } 17458 ret := &GooglePrivacyDlpV2InspectContentResponse{ 17459 ServerResponse: googleapi.ServerResponse{ 17460 Header: res.Header, 17461 HTTPStatusCode: res.StatusCode, 17462 }, 17463 } 17464 target := &ret 17465 if err := gensupport.DecodeResponse(target, res); err != nil { 17466 return nil, err 17467 } 17468 return ret, nil 17469 // { 17470 // "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,", 17471 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", 17472 // "httpMethod": "POST", 17473 // "id": "dlp.projects.locations.content.inspect", 17474 // "parameterOrder": [ 17475 // "parent" 17476 // ], 17477 // "parameters": { 17478 // "parent": { 17479 // "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", 17480 // "location": "path", 17481 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17482 // "required": true, 17483 // "type": "string" 17484 // } 17485 // }, 17486 // "path": "v2/{+parent}/content:inspect", 17487 // "request": { 17488 // "$ref": "GooglePrivacyDlpV2InspectContentRequest" 17489 // }, 17490 // "response": { 17491 // "$ref": "GooglePrivacyDlpV2InspectContentResponse" 17492 // }, 17493 // "scopes": [ 17494 // "https://www.googleapis.com/auth/cloud-platform" 17495 // ] 17496 // } 17497 17498} 17499 17500// method id "dlp.projects.locations.content.reidentify": 17501 17502type ProjectsLocationsContentReidentifyCall struct { 17503 s *Service 17504 parentid string 17505 googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest 17506 urlParams_ gensupport.URLParams 17507 ctx_ context.Context 17508 header_ http.Header 17509} 17510 17511// Reidentify: Re-identifies content that has been de-identified. See 17512// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn 17513// more. 17514func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { 17515 c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17516 c.parentid = parentid 17517 c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest 17518 return c 17519} 17520 17521// Fields allows partial responses to be retrieved. See 17522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17523// for more information. 17524func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { 17525 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17526 return c 17527} 17528 17529// Context sets the context to be used in this call's Do method. Any 17530// pending HTTP request will be aborted if the provided context is 17531// canceled. 17532func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { 17533 c.ctx_ = ctx 17534 return c 17535} 17536 17537// Header returns an http.Header that can be modified by the caller to 17538// add HTTP headers to the request. 17539func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { 17540 if c.header_ == nil { 17541 c.header_ = make(http.Header) 17542 } 17543 return c.header_ 17544} 17545 17546func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { 17547 reqHeaders := make(http.Header) 17548 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17549 for k, v := range c.header_ { 17550 reqHeaders[k] = v 17551 } 17552 reqHeaders.Set("User-Agent", c.s.userAgent()) 17553 var body io.Reader = nil 17554 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) 17555 if err != nil { 17556 return nil, err 17557 } 17558 reqHeaders.Set("Content-Type", "application/json") 17559 c.urlParams_.Set("alt", alt) 17560 c.urlParams_.Set("prettyPrint", "false") 17561 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") 17562 urls += "?" + c.urlParams_.Encode() 17563 req, err := http.NewRequest("POST", urls, body) 17564 if err != nil { 17565 return nil, err 17566 } 17567 req.Header = reqHeaders 17568 googleapi.Expand(req.URL, map[string]string{ 17569 "parent": c.parentid, 17570 }) 17571 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17572} 17573 17574// Do executes the "dlp.projects.locations.content.reidentify" call. 17575// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error 17576// will be non-nil. Any non-2xx status code is an error. Response 17577// headers are in either 17578// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or 17579// (if a response was returned at all) in 17580// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17581// whether the returned error was because http.StatusNotModified was 17582// returned. 17583func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { 17584 gensupport.SetOptions(c.urlParams_, opts...) 17585 res, err := c.doRequest("json") 17586 if res != nil && res.StatusCode == http.StatusNotModified { 17587 if res.Body != nil { 17588 res.Body.Close() 17589 } 17590 return nil, &googleapi.Error{ 17591 Code: res.StatusCode, 17592 Header: res.Header, 17593 } 17594 } 17595 if err != nil { 17596 return nil, err 17597 } 17598 defer googleapi.CloseBody(res) 17599 if err := googleapi.CheckResponse(res); err != nil { 17600 return nil, err 17601 } 17602 ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ 17603 ServerResponse: googleapi.ServerResponse{ 17604 Header: res.Header, 17605 HTTPStatusCode: res.StatusCode, 17606 }, 17607 } 17608 target := &ret 17609 if err := gensupport.DecodeResponse(target, res); err != nil { 17610 return nil, err 17611 } 17612 return ret, nil 17613 // { 17614 // "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.", 17615 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:reidentify", 17616 // "httpMethod": "POST", 17617 // "id": "dlp.projects.locations.content.reidentify", 17618 // "parameterOrder": [ 17619 // "parent" 17620 // ], 17621 // "parameters": { 17622 // "parent": { 17623 // "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", 17624 // "location": "path", 17625 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17626 // "required": true, 17627 // "type": "string" 17628 // } 17629 // }, 17630 // "path": "v2/{+parent}/content:reidentify", 17631 // "request": { 17632 // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" 17633 // }, 17634 // "response": { 17635 // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" 17636 // }, 17637 // "scopes": [ 17638 // "https://www.googleapis.com/auth/cloud-platform" 17639 // ] 17640 // } 17641 17642} 17643 17644// method id "dlp.projects.locations.deidentifyTemplates.create": 17645 17646type ProjectsLocationsDeidentifyTemplatesCreateCall struct { 17647 s *Service 17648 parentid string 17649 googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest 17650 urlParams_ gensupport.URLParams 17651 ctx_ context.Context 17652 header_ http.Header 17653} 17654 17655// Create: Creates a DeidentifyTemplate for re-using frequently used 17656// configuration for de-identifying content, images, and storage. See 17657// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17658// more. 17659func (r *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17660 c := &ProjectsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17661 c.parentid = parentid 17662 c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest 17663 return c 17664} 17665 17666// Fields allows partial responses to be retrieved. See 17667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17668// for more information. 17669func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17670 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17671 return c 17672} 17673 17674// Context sets the context to be used in this call's Do method. Any 17675// pending HTTP request will be aborted if the provided context is 17676// canceled. 17677func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesCreateCall { 17678 c.ctx_ = ctx 17679 return c 17680} 17681 17682// Header returns an http.Header that can be modified by the caller to 17683// add HTTP headers to the request. 17684func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { 17685 if c.header_ == nil { 17686 c.header_ = make(http.Header) 17687 } 17688 return c.header_ 17689} 17690 17691func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 17692 reqHeaders := make(http.Header) 17693 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17694 for k, v := range c.header_ { 17695 reqHeaders[k] = v 17696 } 17697 reqHeaders.Set("User-Agent", c.s.userAgent()) 17698 var body io.Reader = nil 17699 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) 17700 if err != nil { 17701 return nil, err 17702 } 17703 reqHeaders.Set("Content-Type", "application/json") 17704 c.urlParams_.Set("alt", alt) 17705 c.urlParams_.Set("prettyPrint", "false") 17706 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 17707 urls += "?" + c.urlParams_.Encode() 17708 req, err := http.NewRequest("POST", urls, body) 17709 if err != nil { 17710 return nil, err 17711 } 17712 req.Header = reqHeaders 17713 googleapi.Expand(req.URL, map[string]string{ 17714 "parent": c.parentid, 17715 }) 17716 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17717} 17718 17719// Do executes the "dlp.projects.locations.deidentifyTemplates.create" call. 17720// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 17721// non-nil. Any non-2xx status code is an error. Response headers are in 17722// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 17723// (if a response was returned at all) in 17724// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17725// whether the returned error was because http.StatusNotModified was 17726// returned. 17727func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 17728 gensupport.SetOptions(c.urlParams_, opts...) 17729 res, err := c.doRequest("json") 17730 if res != nil && res.StatusCode == http.StatusNotModified { 17731 if res.Body != nil { 17732 res.Body.Close() 17733 } 17734 return nil, &googleapi.Error{ 17735 Code: res.StatusCode, 17736 Header: res.Header, 17737 } 17738 } 17739 if err != nil { 17740 return nil, err 17741 } 17742 defer googleapi.CloseBody(res) 17743 if err := googleapi.CheckResponse(res); err != nil { 17744 return nil, err 17745 } 17746 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 17747 ServerResponse: googleapi.ServerResponse{ 17748 Header: res.Header, 17749 HTTPStatusCode: res.StatusCode, 17750 }, 17751 } 17752 target := &ret 17753 if err := gensupport.DecodeResponse(target, res); err != nil { 17754 return nil, err 17755 } 17756 return ret, nil 17757 // { 17758 // "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.", 17759 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 17760 // "httpMethod": "POST", 17761 // "id": "dlp.projects.locations.deidentifyTemplates.create", 17762 // "parameterOrder": [ 17763 // "parent" 17764 // ], 17765 // "parameters": { 17766 // "parent": { 17767 // "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", 17768 // "location": "path", 17769 // "pattern": "^projects/[^/]+/locations/[^/]+$", 17770 // "required": true, 17771 // "type": "string" 17772 // } 17773 // }, 17774 // "path": "v2/{+parent}/deidentifyTemplates", 17775 // "request": { 17776 // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" 17777 // }, 17778 // "response": { 17779 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 17780 // }, 17781 // "scopes": [ 17782 // "https://www.googleapis.com/auth/cloud-platform" 17783 // ] 17784 // } 17785 17786} 17787 17788// method id "dlp.projects.locations.deidentifyTemplates.delete": 17789 17790type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { 17791 s *Service 17792 name string 17793 urlParams_ gensupport.URLParams 17794 ctx_ context.Context 17795 header_ http.Header 17796} 17797 17798// Delete: Deletes a DeidentifyTemplate. See 17799// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17800// more. 17801func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17802 c := &ProjectsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17803 c.name = name 17804 return c 17805} 17806 17807// Fields allows partial responses to be retrieved. See 17808// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17809// for more information. 17810func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17811 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17812 return c 17813} 17814 17815// Context sets the context to be used in this call's Do method. Any 17816// pending HTTP request will be aborted if the provided context is 17817// canceled. 17818func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesDeleteCall { 17819 c.ctx_ = ctx 17820 return c 17821} 17822 17823// Header returns an http.Header that can be modified by the caller to 17824// add HTTP headers to the request. 17825func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { 17826 if c.header_ == nil { 17827 c.header_ = make(http.Header) 17828 } 17829 return c.header_ 17830} 17831 17832func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 17833 reqHeaders := make(http.Header) 17834 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17835 for k, v := range c.header_ { 17836 reqHeaders[k] = v 17837 } 17838 reqHeaders.Set("User-Agent", c.s.userAgent()) 17839 var body io.Reader = nil 17840 c.urlParams_.Set("alt", alt) 17841 c.urlParams_.Set("prettyPrint", "false") 17842 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17843 urls += "?" + c.urlParams_.Encode() 17844 req, err := http.NewRequest("DELETE", urls, body) 17845 if err != nil { 17846 return nil, err 17847 } 17848 req.Header = reqHeaders 17849 googleapi.Expand(req.URL, map[string]string{ 17850 "name": c.name, 17851 }) 17852 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17853} 17854 17855// Do executes the "dlp.projects.locations.deidentifyTemplates.delete" call. 17856// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 17857// non-2xx status code is an error. Response headers are in either 17858// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 17859// returned at all) in error.(*googleapi.Error).Header. Use 17860// googleapi.IsNotModified to check whether the returned error was 17861// because http.StatusNotModified was returned. 17862func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ 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": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 17894 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 17895 // "httpMethod": "DELETE", 17896 // "id": "dlp.projects.locations.deidentifyTemplates.delete", 17897 // "parameterOrder": [ 17898 // "name" 17899 // ], 17900 // "parameters": { 17901 // "name": { 17902 // "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.", 17903 // "location": "path", 17904 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 17905 // "required": true, 17906 // "type": "string" 17907 // } 17908 // }, 17909 // "path": "v2/{+name}", 17910 // "response": { 17911 // "$ref": "GoogleProtobufEmpty" 17912 // }, 17913 // "scopes": [ 17914 // "https://www.googleapis.com/auth/cloud-platform" 17915 // ] 17916 // } 17917 17918} 17919 17920// method id "dlp.projects.locations.deidentifyTemplates.get": 17921 17922type ProjectsLocationsDeidentifyTemplatesGetCall struct { 17923 s *Service 17924 name string 17925 urlParams_ gensupport.URLParams 17926 ifNoneMatch_ string 17927 ctx_ context.Context 17928 header_ http.Header 17929} 17930 17931// Get: Gets a DeidentifyTemplate. See 17932// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 17933// more. 17934func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *ProjectsLocationsDeidentifyTemplatesGetCall { 17935 c := &ProjectsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17936 c.name = name 17937 return c 17938} 17939 17940// Fields allows partial responses to be retrieved. See 17941// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17942// for more information. 17943func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesGetCall { 17944 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17945 return c 17946} 17947 17948// IfNoneMatch sets the optional parameter which makes the operation 17949// fail if the object's ETag matches the given value. This is useful for 17950// getting updates only after the object has changed since the last 17951// request. Use googleapi.IsNotModified to check whether the response 17952// error from Do is the result of In-None-Match. 17953func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesGetCall { 17954 c.ifNoneMatch_ = entityTag 17955 return c 17956} 17957 17958// Context sets the context to be used in this call's Do method. Any 17959// pending HTTP request will be aborted if the provided context is 17960// canceled. 17961func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesGetCall { 17962 c.ctx_ = ctx 17963 return c 17964} 17965 17966// Header returns an http.Header that can be modified by the caller to 17967// add HTTP headers to the request. 17968func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Header() http.Header { 17969 if c.header_ == nil { 17970 c.header_ = make(http.Header) 17971 } 17972 return c.header_ 17973} 17974 17975func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 17976 reqHeaders := make(http.Header) 17977 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 17978 for k, v := range c.header_ { 17979 reqHeaders[k] = v 17980 } 17981 reqHeaders.Set("User-Agent", c.s.userAgent()) 17982 if c.ifNoneMatch_ != "" { 17983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17984 } 17985 var body io.Reader = nil 17986 c.urlParams_.Set("alt", alt) 17987 c.urlParams_.Set("prettyPrint", "false") 17988 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 17989 urls += "?" + c.urlParams_.Encode() 17990 req, err := http.NewRequest("GET", urls, body) 17991 if err != nil { 17992 return nil, err 17993 } 17994 req.Header = reqHeaders 17995 googleapi.Expand(req.URL, map[string]string{ 17996 "name": c.name, 17997 }) 17998 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17999} 18000 18001// Do executes the "dlp.projects.locations.deidentifyTemplates.get" call. 18002// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 18003// non-nil. Any non-2xx status code is an error. Response headers are in 18004// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 18005// (if a response was returned at all) in 18006// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18007// whether the returned error was because http.StatusNotModified was 18008// returned. 18009func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 18010 gensupport.SetOptions(c.urlParams_, opts...) 18011 res, err := c.doRequest("json") 18012 if res != nil && res.StatusCode == http.StatusNotModified { 18013 if res.Body != nil { 18014 res.Body.Close() 18015 } 18016 return nil, &googleapi.Error{ 18017 Code: res.StatusCode, 18018 Header: res.Header, 18019 } 18020 } 18021 if err != nil { 18022 return nil, err 18023 } 18024 defer googleapi.CloseBody(res) 18025 if err := googleapi.CheckResponse(res); err != nil { 18026 return nil, err 18027 } 18028 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 18029 ServerResponse: googleapi.ServerResponse{ 18030 Header: res.Header, 18031 HTTPStatusCode: res.StatusCode, 18032 }, 18033 } 18034 target := &ret 18035 if err := gensupport.DecodeResponse(target, res); err != nil { 18036 return nil, err 18037 } 18038 return ret, nil 18039 // { 18040 // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18041 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 18042 // "httpMethod": "GET", 18043 // "id": "dlp.projects.locations.deidentifyTemplates.get", 18044 // "parameterOrder": [ 18045 // "name" 18046 // ], 18047 // "parameters": { 18048 // "name": { 18049 // "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.", 18050 // "location": "path", 18051 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 18052 // "required": true, 18053 // "type": "string" 18054 // } 18055 // }, 18056 // "path": "v2/{+name}", 18057 // "response": { 18058 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 18059 // }, 18060 // "scopes": [ 18061 // "https://www.googleapis.com/auth/cloud-platform" 18062 // ] 18063 // } 18064 18065} 18066 18067// method id "dlp.projects.locations.deidentifyTemplates.list": 18068 18069type ProjectsLocationsDeidentifyTemplatesListCall struct { 18070 s *Service 18071 parentid string 18072 urlParams_ gensupport.URLParams 18073 ifNoneMatch_ string 18074 ctx_ context.Context 18075 header_ http.Header 18076} 18077 18078// List: Lists DeidentifyTemplates. See 18079// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 18080// more. 18081func (r *ProjectsLocationsDeidentifyTemplatesService) List(parentid string) *ProjectsLocationsDeidentifyTemplatesListCall { 18082 c := &ProjectsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18083 c.parentid = parentid 18084 return c 18085} 18086 18087// LocationId sets the optional parameter "locationId": Deprecated. This 18088// field has no effect. 18089func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsLocationsDeidentifyTemplatesListCall { 18090 c.urlParams_.Set("locationId", locationId) 18091 return c 18092} 18093 18094// OrderBy sets the optional parameter "orderBy": Comma separated list 18095// of fields to order by, followed by `asc` or `desc` postfix. This list 18096// is case-insensitive, default sorting order is ascending, redundant 18097// space characters are insignificant. Example: `name asc,update_time, 18098// create_time desc` Supported fields are: - `create_time`: corresponds 18099// to time the template was created. - `update_time`: corresponds to 18100// time the template was last updated. - `name`: corresponds to 18101// template's name. - `display_name`: corresponds to template's display 18102// name. 18103func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { 18104 c.urlParams_.Set("orderBy", orderBy) 18105 return c 18106} 18107 18108// PageSize sets the optional parameter "pageSize": Size of the page, 18109// can be limited by server. If zero server returns a page of max size 18110// 100. 18111func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { 18112 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18113 return c 18114} 18115 18116// PageToken sets the optional parameter "pageToken": Page token to 18117// continue retrieval. Comes from previous call to 18118// `ListDeidentifyTemplates`. 18119func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { 18120 c.urlParams_.Set("pageToken", pageToken) 18121 return c 18122} 18123 18124// Fields allows partial responses to be retrieved. See 18125// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18126// for more information. 18127func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesListCall { 18128 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18129 return c 18130} 18131 18132// IfNoneMatch sets the optional parameter which makes the operation 18133// fail if the object's ETag matches the given value. This is useful for 18134// getting updates only after the object has changed since the last 18135// request. Use googleapi.IsNotModified to check whether the response 18136// error from Do is the result of In-None-Match. 18137func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesListCall { 18138 c.ifNoneMatch_ = entityTag 18139 return c 18140} 18141 18142// Context sets the context to be used in this call's Do method. Any 18143// pending HTTP request will be aborted if the provided context is 18144// canceled. 18145func (c *ProjectsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesListCall { 18146 c.ctx_ = ctx 18147 return c 18148} 18149 18150// Header returns an http.Header that can be modified by the caller to 18151// add HTTP headers to the request. 18152func (c *ProjectsLocationsDeidentifyTemplatesListCall) Header() http.Header { 18153 if c.header_ == nil { 18154 c.header_ = make(http.Header) 18155 } 18156 return c.header_ 18157} 18158 18159func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { 18160 reqHeaders := make(http.Header) 18161 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18162 for k, v := range c.header_ { 18163 reqHeaders[k] = v 18164 } 18165 reqHeaders.Set("User-Agent", c.s.userAgent()) 18166 if c.ifNoneMatch_ != "" { 18167 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18168 } 18169 var body io.Reader = nil 18170 c.urlParams_.Set("alt", alt) 18171 c.urlParams_.Set("prettyPrint", "false") 18172 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") 18173 urls += "?" + c.urlParams_.Encode() 18174 req, err := http.NewRequest("GET", urls, body) 18175 if err != nil { 18176 return nil, err 18177 } 18178 req.Header = reqHeaders 18179 googleapi.Expand(req.URL, map[string]string{ 18180 "parent": c.parentid, 18181 }) 18182 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18183} 18184 18185// Do executes the "dlp.projects.locations.deidentifyTemplates.list" call. 18186// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or 18187// error will be non-nil. Any non-2xx status code is an error. Response 18188// headers are in either 18189// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head 18190// er or (if a response was returned at all) in 18191// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18192// whether the returned error was because http.StatusNotModified was 18193// returned. 18194func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { 18195 gensupport.SetOptions(c.urlParams_, opts...) 18196 res, err := c.doRequest("json") 18197 if res != nil && res.StatusCode == http.StatusNotModified { 18198 if res.Body != nil { 18199 res.Body.Close() 18200 } 18201 return nil, &googleapi.Error{ 18202 Code: res.StatusCode, 18203 Header: res.Header, 18204 } 18205 } 18206 if err != nil { 18207 return nil, err 18208 } 18209 defer googleapi.CloseBody(res) 18210 if err := googleapi.CheckResponse(res); err != nil { 18211 return nil, err 18212 } 18213 ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ 18214 ServerResponse: googleapi.ServerResponse{ 18215 Header: res.Header, 18216 HTTPStatusCode: res.StatusCode, 18217 }, 18218 } 18219 target := &ret 18220 if err := gensupport.DecodeResponse(target, res); err != nil { 18221 return nil, err 18222 } 18223 return ret, nil 18224 // { 18225 // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18226 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", 18227 // "httpMethod": "GET", 18228 // "id": "dlp.projects.locations.deidentifyTemplates.list", 18229 // "parameterOrder": [ 18230 // "parent" 18231 // ], 18232 // "parameters": { 18233 // "locationId": { 18234 // "description": "Deprecated. This field has no effect.", 18235 // "location": "query", 18236 // "type": "string" 18237 // }, 18238 // "orderBy": { 18239 // "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.", 18240 // "location": "query", 18241 // "type": "string" 18242 // }, 18243 // "pageSize": { 18244 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 18245 // "format": "int32", 18246 // "location": "query", 18247 // "type": "integer" 18248 // }, 18249 // "pageToken": { 18250 // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", 18251 // "location": "query", 18252 // "type": "string" 18253 // }, 18254 // "parent": { 18255 // "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", 18256 // "location": "path", 18257 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18258 // "required": true, 18259 // "type": "string" 18260 // } 18261 // }, 18262 // "path": "v2/{+parent}/deidentifyTemplates", 18263 // "response": { 18264 // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" 18265 // }, 18266 // "scopes": [ 18267 // "https://www.googleapis.com/auth/cloud-platform" 18268 // ] 18269 // } 18270 18271} 18272 18273// Pages invokes f for each page of results. 18274// A non-nil error returned from f will halt the iteration. 18275// The provided context supersedes any context provided to the Context method. 18276func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { 18277 c.ctx_ = ctx 18278 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18279 for { 18280 x, err := c.Do() 18281 if err != nil { 18282 return err 18283 } 18284 if err := f(x); err != nil { 18285 return err 18286 } 18287 if x.NextPageToken == "" { 18288 return nil 18289 } 18290 c.PageToken(x.NextPageToken) 18291 } 18292} 18293 18294// method id "dlp.projects.locations.deidentifyTemplates.patch": 18295 18296type ProjectsLocationsDeidentifyTemplatesPatchCall struct { 18297 s *Service 18298 name string 18299 googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest 18300 urlParams_ gensupport.URLParams 18301 ctx_ context.Context 18302 header_ http.Header 18303} 18304 18305// Patch: Updates the DeidentifyTemplate. See 18306// https://cloud.google.com/dlp/docs/creating-templates-deid to learn 18307// more. 18308func (r *ProjectsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18309 c := &ProjectsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18310 c.name = name 18311 c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest 18312 return c 18313} 18314 18315// Fields allows partial responses to be retrieved. See 18316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18317// for more information. 18318func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18319 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18320 return c 18321} 18322 18323// Context sets the context to be used in this call's Do method. Any 18324// pending HTTP request will be aborted if the provided context is 18325// canceled. 18326func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesPatchCall { 18327 c.ctx_ = ctx 18328 return c 18329} 18330 18331// Header returns an http.Header that can be modified by the caller to 18332// add HTTP headers to the request. 18333func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { 18334 if c.header_ == nil { 18335 c.header_ = make(http.Header) 18336 } 18337 return c.header_ 18338} 18339 18340func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 18341 reqHeaders := make(http.Header) 18342 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18343 for k, v := range c.header_ { 18344 reqHeaders[k] = v 18345 } 18346 reqHeaders.Set("User-Agent", c.s.userAgent()) 18347 var body io.Reader = nil 18348 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) 18349 if err != nil { 18350 return nil, err 18351 } 18352 reqHeaders.Set("Content-Type", "application/json") 18353 c.urlParams_.Set("alt", alt) 18354 c.urlParams_.Set("prettyPrint", "false") 18355 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18356 urls += "?" + c.urlParams_.Encode() 18357 req, err := http.NewRequest("PATCH", urls, body) 18358 if err != nil { 18359 return nil, err 18360 } 18361 req.Header = reqHeaders 18362 googleapi.Expand(req.URL, map[string]string{ 18363 "name": c.name, 18364 }) 18365 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18366} 18367 18368// Do executes the "dlp.projects.locations.deidentifyTemplates.patch" call. 18369// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be 18370// non-nil. Any non-2xx status code is an error. Response headers are in 18371// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or 18372// (if a response was returned at all) in 18373// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18374// whether the returned error was because http.StatusNotModified was 18375// returned. 18376func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { 18377 gensupport.SetOptions(c.urlParams_, opts...) 18378 res, err := c.doRequest("json") 18379 if res != nil && res.StatusCode == http.StatusNotModified { 18380 if res.Body != nil { 18381 res.Body.Close() 18382 } 18383 return nil, &googleapi.Error{ 18384 Code: res.StatusCode, 18385 Header: res.Header, 18386 } 18387 } 18388 if err != nil { 18389 return nil, err 18390 } 18391 defer googleapi.CloseBody(res) 18392 if err := googleapi.CheckResponse(res); err != nil { 18393 return nil, err 18394 } 18395 ret := &GooglePrivacyDlpV2DeidentifyTemplate{ 18396 ServerResponse: googleapi.ServerResponse{ 18397 Header: res.Header, 18398 HTTPStatusCode: res.StatusCode, 18399 }, 18400 } 18401 target := &ret 18402 if err := gensupport.DecodeResponse(target, res); err != nil { 18403 return nil, err 18404 } 18405 return ret, nil 18406 // { 18407 // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", 18408 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", 18409 // "httpMethod": "PATCH", 18410 // "id": "dlp.projects.locations.deidentifyTemplates.patch", 18411 // "parameterOrder": [ 18412 // "name" 18413 // ], 18414 // "parameters": { 18415 // "name": { 18416 // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", 18417 // "location": "path", 18418 // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", 18419 // "required": true, 18420 // "type": "string" 18421 // } 18422 // }, 18423 // "path": "v2/{+name}", 18424 // "request": { 18425 // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" 18426 // }, 18427 // "response": { 18428 // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" 18429 // }, 18430 // "scopes": [ 18431 // "https://www.googleapis.com/auth/cloud-platform" 18432 // ] 18433 // } 18434 18435} 18436 18437// method id "dlp.projects.locations.dlpJobs.cancel": 18438 18439type ProjectsLocationsDlpJobsCancelCall struct { 18440 s *Service 18441 name string 18442 googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest 18443 urlParams_ gensupport.URLParams 18444 ctx_ context.Context 18445 header_ http.Header 18446} 18447 18448// Cancel: Starts asynchronous cancellation on a long-running DlpJob. 18449// The server makes a best effort to cancel the DlpJob, but success is 18450// not guaranteed. See 18451// https://cloud.google.com/dlp/docs/inspecting-storage and 18452// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18453// more. 18454func (r *ProjectsLocationsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsLocationsDlpJobsCancelCall { 18455 c := &ProjectsLocationsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18456 c.name = name 18457 c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest 18458 return c 18459} 18460 18461// Fields allows partial responses to be retrieved. See 18462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18463// for more information. 18464func (c *ProjectsLocationsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCancelCall { 18465 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18466 return c 18467} 18468 18469// Context sets the context to be used in this call's Do method. Any 18470// pending HTTP request will be aborted if the provided context is 18471// canceled. 18472func (c *ProjectsLocationsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCancelCall { 18473 c.ctx_ = ctx 18474 return c 18475} 18476 18477// Header returns an http.Header that can be modified by the caller to 18478// add HTTP headers to the request. 18479func (c *ProjectsLocationsDlpJobsCancelCall) Header() http.Header { 18480 if c.header_ == nil { 18481 c.header_ = make(http.Header) 18482 } 18483 return c.header_ 18484} 18485 18486func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { 18487 reqHeaders := make(http.Header) 18488 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18489 for k, v := range c.header_ { 18490 reqHeaders[k] = v 18491 } 18492 reqHeaders.Set("User-Agent", c.s.userAgent()) 18493 var body io.Reader = nil 18494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) 18495 if err != nil { 18496 return nil, err 18497 } 18498 reqHeaders.Set("Content-Type", "application/json") 18499 c.urlParams_.Set("alt", alt) 18500 c.urlParams_.Set("prettyPrint", "false") 18501 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 18502 urls += "?" + c.urlParams_.Encode() 18503 req, err := http.NewRequest("POST", urls, body) 18504 if err != nil { 18505 return nil, err 18506 } 18507 req.Header = reqHeaders 18508 googleapi.Expand(req.URL, map[string]string{ 18509 "name": c.name, 18510 }) 18511 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18512} 18513 18514// Do executes the "dlp.projects.locations.dlpJobs.cancel" call. 18515// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18516// non-2xx status code is an error. Response headers are in either 18517// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18518// returned at all) in error.(*googleapi.Error).Header. Use 18519// googleapi.IsNotModified to check whether the returned error was 18520// because http.StatusNotModified was returned. 18521func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18522 gensupport.SetOptions(c.urlParams_, opts...) 18523 res, err := c.doRequest("json") 18524 if res != nil && res.StatusCode == http.StatusNotModified { 18525 if res.Body != nil { 18526 res.Body.Close() 18527 } 18528 return nil, &googleapi.Error{ 18529 Code: res.StatusCode, 18530 Header: res.Header, 18531 } 18532 } 18533 if err != nil { 18534 return nil, err 18535 } 18536 defer googleapi.CloseBody(res) 18537 if err := googleapi.CheckResponse(res); err != nil { 18538 return nil, err 18539 } 18540 ret := &GoogleProtobufEmpty{ 18541 ServerResponse: googleapi.ServerResponse{ 18542 Header: res.Header, 18543 HTTPStatusCode: res.StatusCode, 18544 }, 18545 } 18546 target := &ret 18547 if err := gensupport.DecodeResponse(target, res); err != nil { 18548 return nil, err 18549 } 18550 return ret, nil 18551 // { 18552 // "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.", 18553 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", 18554 // "httpMethod": "POST", 18555 // "id": "dlp.projects.locations.dlpJobs.cancel", 18556 // "parameterOrder": [ 18557 // "name" 18558 // ], 18559 // "parameters": { 18560 // "name": { 18561 // "description": "Required. The name of the DlpJob resource to be cancelled.", 18562 // "location": "path", 18563 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18564 // "required": true, 18565 // "type": "string" 18566 // } 18567 // }, 18568 // "path": "v2/{+name}:cancel", 18569 // "request": { 18570 // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" 18571 // }, 18572 // "response": { 18573 // "$ref": "GoogleProtobufEmpty" 18574 // }, 18575 // "scopes": [ 18576 // "https://www.googleapis.com/auth/cloud-platform" 18577 // ] 18578 // } 18579 18580} 18581 18582// method id "dlp.projects.locations.dlpJobs.create": 18583 18584type ProjectsLocationsDlpJobsCreateCall struct { 18585 s *Service 18586 parentid string 18587 googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest 18588 urlParams_ gensupport.URLParams 18589 ctx_ context.Context 18590 header_ http.Header 18591} 18592 18593// Create: Creates a new job to inspect storage or calculate risk 18594// metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and 18595// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18596// more. When no InfoTypes or CustomInfoTypes are specified in inspect 18597// jobs, the system will automatically choose what detectors to run. By 18598// default this may be all types, but may change over time as detectors 18599// are updated. 18600func (r *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { 18601 c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18602 c.parentid = parentid 18603 c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest 18604 return c 18605} 18606 18607// Fields allows partial responses to be retrieved. See 18608// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18609// for more information. 18610func (c *ProjectsLocationsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCreateCall { 18611 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18612 return c 18613} 18614 18615// Context sets the context to be used in this call's Do method. Any 18616// pending HTTP request will be aborted if the provided context is 18617// canceled. 18618func (c *ProjectsLocationsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCreateCall { 18619 c.ctx_ = ctx 18620 return c 18621} 18622 18623// Header returns an http.Header that can be modified by the caller to 18624// add HTTP headers to the request. 18625func (c *ProjectsLocationsDlpJobsCreateCall) Header() http.Header { 18626 if c.header_ == nil { 18627 c.header_ = make(http.Header) 18628 } 18629 return c.header_ 18630} 18631 18632func (c *ProjectsLocationsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { 18633 reqHeaders := make(http.Header) 18634 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18635 for k, v := range c.header_ { 18636 reqHeaders[k] = v 18637 } 18638 reqHeaders.Set("User-Agent", c.s.userAgent()) 18639 var body io.Reader = nil 18640 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) 18641 if err != nil { 18642 return nil, err 18643 } 18644 reqHeaders.Set("Content-Type", "application/json") 18645 c.urlParams_.Set("alt", alt) 18646 c.urlParams_.Set("prettyPrint", "false") 18647 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 18648 urls += "?" + c.urlParams_.Encode() 18649 req, err := http.NewRequest("POST", urls, body) 18650 if err != nil { 18651 return nil, err 18652 } 18653 req.Header = reqHeaders 18654 googleapi.Expand(req.URL, map[string]string{ 18655 "parent": c.parentid, 18656 }) 18657 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18658} 18659 18660// Do executes the "dlp.projects.locations.dlpJobs.create" call. 18661// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 18662// Any non-2xx status code is an error. Response headers are in either 18663// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 18664// returned at all) in error.(*googleapi.Error).Header. Use 18665// googleapi.IsNotModified to check whether the returned error was 18666// because http.StatusNotModified was returned. 18667func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 18668 gensupport.SetOptions(c.urlParams_, opts...) 18669 res, err := c.doRequest("json") 18670 if res != nil && res.StatusCode == http.StatusNotModified { 18671 if res.Body != nil { 18672 res.Body.Close() 18673 } 18674 return nil, &googleapi.Error{ 18675 Code: res.StatusCode, 18676 Header: res.Header, 18677 } 18678 } 18679 if err != nil { 18680 return nil, err 18681 } 18682 defer googleapi.CloseBody(res) 18683 if err := googleapi.CheckResponse(res); err != nil { 18684 return nil, err 18685 } 18686 ret := &GooglePrivacyDlpV2DlpJob{ 18687 ServerResponse: googleapi.ServerResponse{ 18688 Header: res.Header, 18689 HTTPStatusCode: res.StatusCode, 18690 }, 18691 } 18692 target := &ret 18693 if err := gensupport.DecodeResponse(target, res); err != nil { 18694 return nil, err 18695 } 18696 return ret, nil 18697 // { 18698 // "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.", 18699 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 18700 // "httpMethod": "POST", 18701 // "id": "dlp.projects.locations.dlpJobs.create", 18702 // "parameterOrder": [ 18703 // "parent" 18704 // ], 18705 // "parameters": { 18706 // "parent": { 18707 // "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", 18708 // "location": "path", 18709 // "pattern": "^projects/[^/]+/locations/[^/]+$", 18710 // "required": true, 18711 // "type": "string" 18712 // } 18713 // }, 18714 // "path": "v2/{+parent}/dlpJobs", 18715 // "request": { 18716 // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" 18717 // }, 18718 // "response": { 18719 // "$ref": "GooglePrivacyDlpV2DlpJob" 18720 // }, 18721 // "scopes": [ 18722 // "https://www.googleapis.com/auth/cloud-platform" 18723 // ] 18724 // } 18725 18726} 18727 18728// method id "dlp.projects.locations.dlpJobs.delete": 18729 18730type ProjectsLocationsDlpJobsDeleteCall struct { 18731 s *Service 18732 name string 18733 urlParams_ gensupport.URLParams 18734 ctx_ context.Context 18735 header_ http.Header 18736} 18737 18738// Delete: Deletes a long-running DlpJob. This method indicates that the 18739// client is no longer interested in the DlpJob result. The job will be 18740// cancelled if possible. See 18741// https://cloud.google.com/dlp/docs/inspecting-storage and 18742// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 18743// more. 18744func (r *ProjectsLocationsDlpJobsService) Delete(name string) *ProjectsLocationsDlpJobsDeleteCall { 18745 c := &ProjectsLocationsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18746 c.name = name 18747 return c 18748} 18749 18750// Fields allows partial responses to be retrieved. See 18751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18752// for more information. 18753func (c *ProjectsLocationsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsDeleteCall { 18754 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18755 return c 18756} 18757 18758// Context sets the context to be used in this call's Do method. Any 18759// pending HTTP request will be aborted if the provided context is 18760// canceled. 18761func (c *ProjectsLocationsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsDeleteCall { 18762 c.ctx_ = ctx 18763 return c 18764} 18765 18766// Header returns an http.Header that can be modified by the caller to 18767// add HTTP headers to the request. 18768func (c *ProjectsLocationsDlpJobsDeleteCall) Header() http.Header { 18769 if c.header_ == nil { 18770 c.header_ = make(http.Header) 18771 } 18772 return c.header_ 18773} 18774 18775func (c *ProjectsLocationsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { 18776 reqHeaders := make(http.Header) 18777 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18778 for k, v := range c.header_ { 18779 reqHeaders[k] = v 18780 } 18781 reqHeaders.Set("User-Agent", c.s.userAgent()) 18782 var body io.Reader = nil 18783 c.urlParams_.Set("alt", alt) 18784 c.urlParams_.Set("prettyPrint", "false") 18785 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 18786 urls += "?" + c.urlParams_.Encode() 18787 req, err := http.NewRequest("DELETE", urls, body) 18788 if err != nil { 18789 return nil, err 18790 } 18791 req.Header = reqHeaders 18792 googleapi.Expand(req.URL, map[string]string{ 18793 "name": c.name, 18794 }) 18795 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18796} 18797 18798// Do executes the "dlp.projects.locations.dlpJobs.delete" call. 18799// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18800// non-2xx status code is an error. Response headers are in either 18801// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18802// returned at all) in error.(*googleapi.Error).Header. Use 18803// googleapi.IsNotModified to check whether the returned error was 18804// because http.StatusNotModified was returned. 18805func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18806 gensupport.SetOptions(c.urlParams_, opts...) 18807 res, err := c.doRequest("json") 18808 if res != nil && res.StatusCode == http.StatusNotModified { 18809 if res.Body != nil { 18810 res.Body.Close() 18811 } 18812 return nil, &googleapi.Error{ 18813 Code: res.StatusCode, 18814 Header: res.Header, 18815 } 18816 } 18817 if err != nil { 18818 return nil, err 18819 } 18820 defer googleapi.CloseBody(res) 18821 if err := googleapi.CheckResponse(res); err != nil { 18822 return nil, err 18823 } 18824 ret := &GoogleProtobufEmpty{ 18825 ServerResponse: googleapi.ServerResponse{ 18826 Header: res.Header, 18827 HTTPStatusCode: res.StatusCode, 18828 }, 18829 } 18830 target := &ret 18831 if err := gensupport.DecodeResponse(target, res); err != nil { 18832 return nil, err 18833 } 18834 return ret, nil 18835 // { 18836 // "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.", 18837 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 18838 // "httpMethod": "DELETE", 18839 // "id": "dlp.projects.locations.dlpJobs.delete", 18840 // "parameterOrder": [ 18841 // "name" 18842 // ], 18843 // "parameters": { 18844 // "name": { 18845 // "description": "Required. The name of the DlpJob resource to be deleted.", 18846 // "location": "path", 18847 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18848 // "required": true, 18849 // "type": "string" 18850 // } 18851 // }, 18852 // "path": "v2/{+name}", 18853 // "response": { 18854 // "$ref": "GoogleProtobufEmpty" 18855 // }, 18856 // "scopes": [ 18857 // "https://www.googleapis.com/auth/cloud-platform" 18858 // ] 18859 // } 18860 18861} 18862 18863// method id "dlp.projects.locations.dlpJobs.finish": 18864 18865type ProjectsLocationsDlpJobsFinishCall struct { 18866 s *Service 18867 name string 18868 googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest 18869 urlParams_ gensupport.URLParams 18870 ctx_ context.Context 18871 header_ http.Header 18872} 18873 18874// Finish: Finish a running hybrid DlpJob. Triggers the finalization 18875// steps and running of any enabled actions that have not yet run. Early 18876// access feature is in a pre-release state and might change or have 18877// limited support. For more information, see 18878// https://cloud.google.com/products#product-launch-stages. 18879func (r *ProjectsLocationsDlpJobsService) Finish(name string, googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest) *ProjectsLocationsDlpJobsFinishCall { 18880 c := &ProjectsLocationsDlpJobsFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18881 c.name = name 18882 c.googleprivacydlpv2finishdlpjobrequest = googleprivacydlpv2finishdlpjobrequest 18883 return c 18884} 18885 18886// Fields allows partial responses to be retrieved. See 18887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18888// for more information. 18889func (c *ProjectsLocationsDlpJobsFinishCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsFinishCall { 18890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18891 return c 18892} 18893 18894// Context sets the context to be used in this call's Do method. Any 18895// pending HTTP request will be aborted if the provided context is 18896// canceled. 18897func (c *ProjectsLocationsDlpJobsFinishCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsFinishCall { 18898 c.ctx_ = ctx 18899 return c 18900} 18901 18902// Header returns an http.Header that can be modified by the caller to 18903// add HTTP headers to the request. 18904func (c *ProjectsLocationsDlpJobsFinishCall) Header() http.Header { 18905 if c.header_ == nil { 18906 c.header_ = make(http.Header) 18907 } 18908 return c.header_ 18909} 18910 18911func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Response, error) { 18912 reqHeaders := make(http.Header) 18913 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 18914 for k, v := range c.header_ { 18915 reqHeaders[k] = v 18916 } 18917 reqHeaders.Set("User-Agent", c.s.userAgent()) 18918 var body io.Reader = nil 18919 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2finishdlpjobrequest) 18920 if err != nil { 18921 return nil, err 18922 } 18923 reqHeaders.Set("Content-Type", "application/json") 18924 c.urlParams_.Set("alt", alt) 18925 c.urlParams_.Set("prettyPrint", "false") 18926 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:finish") 18927 urls += "?" + c.urlParams_.Encode() 18928 req, err := http.NewRequest("POST", urls, body) 18929 if err != nil { 18930 return nil, err 18931 } 18932 req.Header = reqHeaders 18933 googleapi.Expand(req.URL, map[string]string{ 18934 "name": c.name, 18935 }) 18936 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18937} 18938 18939// Do executes the "dlp.projects.locations.dlpJobs.finish" call. 18940// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 18941// non-2xx status code is an error. Response headers are in either 18942// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 18943// returned at all) in error.(*googleapi.Error).Header. Use 18944// googleapi.IsNotModified to check whether the returned error was 18945// because http.StatusNotModified was returned. 18946func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 18947 gensupport.SetOptions(c.urlParams_, opts...) 18948 res, err := c.doRequest("json") 18949 if res != nil && res.StatusCode == http.StatusNotModified { 18950 if res.Body != nil { 18951 res.Body.Close() 18952 } 18953 return nil, &googleapi.Error{ 18954 Code: res.StatusCode, 18955 Header: res.Header, 18956 } 18957 } 18958 if err != nil { 18959 return nil, err 18960 } 18961 defer googleapi.CloseBody(res) 18962 if err := googleapi.CheckResponse(res); err != nil { 18963 return nil, err 18964 } 18965 ret := &GoogleProtobufEmpty{ 18966 ServerResponse: googleapi.ServerResponse{ 18967 Header: res.Header, 18968 HTTPStatusCode: res.StatusCode, 18969 }, 18970 } 18971 target := &ret 18972 if err := gensupport.DecodeResponse(target, res); err != nil { 18973 return nil, err 18974 } 18975 return ret, nil 18976 // { 18977 // "description": "Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 18978 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:finish", 18979 // "httpMethod": "POST", 18980 // "id": "dlp.projects.locations.dlpJobs.finish", 18981 // "parameterOrder": [ 18982 // "name" 18983 // ], 18984 // "parameters": { 18985 // "name": { 18986 // "description": "Required. The name of the DlpJob resource to be cancelled.", 18987 // "location": "path", 18988 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 18989 // "required": true, 18990 // "type": "string" 18991 // } 18992 // }, 18993 // "path": "v2/{+name}:finish", 18994 // "request": { 18995 // "$ref": "GooglePrivacyDlpV2FinishDlpJobRequest" 18996 // }, 18997 // "response": { 18998 // "$ref": "GoogleProtobufEmpty" 18999 // }, 19000 // "scopes": [ 19001 // "https://www.googleapis.com/auth/cloud-platform" 19002 // ] 19003 // } 19004 19005} 19006 19007// method id "dlp.projects.locations.dlpJobs.get": 19008 19009type ProjectsLocationsDlpJobsGetCall struct { 19010 s *Service 19011 name string 19012 urlParams_ gensupport.URLParams 19013 ifNoneMatch_ string 19014 ctx_ context.Context 19015 header_ http.Header 19016} 19017 19018// Get: Gets the latest state of a long-running DlpJob. See 19019// https://cloud.google.com/dlp/docs/inspecting-storage and 19020// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 19021// more. 19022func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlpJobsGetCall { 19023 c := &ProjectsLocationsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19024 c.name = name 19025 return c 19026} 19027 19028// Fields allows partial responses to be retrieved. See 19029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19030// for more information. 19031func (c *ProjectsLocationsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsGetCall { 19032 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19033 return c 19034} 19035 19036// IfNoneMatch sets the optional parameter which makes the operation 19037// fail if the object's ETag matches the given value. This is useful for 19038// getting updates only after the object has changed since the last 19039// request. Use googleapi.IsNotModified to check whether the response 19040// error from Do is the result of In-None-Match. 19041func (c *ProjectsLocationsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsGetCall { 19042 c.ifNoneMatch_ = entityTag 19043 return c 19044} 19045 19046// Context sets the context to be used in this call's Do method. Any 19047// pending HTTP request will be aborted if the provided context is 19048// canceled. 19049func (c *ProjectsLocationsDlpJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsGetCall { 19050 c.ctx_ = ctx 19051 return c 19052} 19053 19054// Header returns an http.Header that can be modified by the caller to 19055// add HTTP headers to the request. 19056func (c *ProjectsLocationsDlpJobsGetCall) Header() http.Header { 19057 if c.header_ == nil { 19058 c.header_ = make(http.Header) 19059 } 19060 return c.header_ 19061} 19062 19063func (c *ProjectsLocationsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { 19064 reqHeaders := make(http.Header) 19065 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19066 for k, v := range c.header_ { 19067 reqHeaders[k] = v 19068 } 19069 reqHeaders.Set("User-Agent", c.s.userAgent()) 19070 if c.ifNoneMatch_ != "" { 19071 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19072 } 19073 var body io.Reader = nil 19074 c.urlParams_.Set("alt", alt) 19075 c.urlParams_.Set("prettyPrint", "false") 19076 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19077 urls += "?" + c.urlParams_.Encode() 19078 req, err := http.NewRequest("GET", urls, body) 19079 if err != nil { 19080 return nil, err 19081 } 19082 req.Header = reqHeaders 19083 googleapi.Expand(req.URL, map[string]string{ 19084 "name": c.name, 19085 }) 19086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19087} 19088 19089// Do executes the "dlp.projects.locations.dlpJobs.get" call. 19090// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 19091// Any non-2xx status code is an error. Response headers are in either 19092// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 19093// returned at all) in error.(*googleapi.Error).Header. Use 19094// googleapi.IsNotModified to check whether the returned error was 19095// because http.StatusNotModified was returned. 19096func (c *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 19097 gensupport.SetOptions(c.urlParams_, opts...) 19098 res, err := c.doRequest("json") 19099 if res != nil && res.StatusCode == http.StatusNotModified { 19100 if res.Body != nil { 19101 res.Body.Close() 19102 } 19103 return nil, &googleapi.Error{ 19104 Code: res.StatusCode, 19105 Header: res.Header, 19106 } 19107 } 19108 if err != nil { 19109 return nil, err 19110 } 19111 defer googleapi.CloseBody(res) 19112 if err := googleapi.CheckResponse(res); err != nil { 19113 return nil, err 19114 } 19115 ret := &GooglePrivacyDlpV2DlpJob{ 19116 ServerResponse: googleapi.ServerResponse{ 19117 Header: res.Header, 19118 HTTPStatusCode: res.StatusCode, 19119 }, 19120 } 19121 target := &ret 19122 if err := gensupport.DecodeResponse(target, res); err != nil { 19123 return nil, err 19124 } 19125 return ret, nil 19126 // { 19127 // "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.", 19128 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", 19129 // "httpMethod": "GET", 19130 // "id": "dlp.projects.locations.dlpJobs.get", 19131 // "parameterOrder": [ 19132 // "name" 19133 // ], 19134 // "parameters": { 19135 // "name": { 19136 // "description": "Required. The name of the DlpJob resource.", 19137 // "location": "path", 19138 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 19139 // "required": true, 19140 // "type": "string" 19141 // } 19142 // }, 19143 // "path": "v2/{+name}", 19144 // "response": { 19145 // "$ref": "GooglePrivacyDlpV2DlpJob" 19146 // }, 19147 // "scopes": [ 19148 // "https://www.googleapis.com/auth/cloud-platform" 19149 // ] 19150 // } 19151 19152} 19153 19154// method id "dlp.projects.locations.dlpJobs.hybridInspect": 19155 19156type ProjectsLocationsDlpJobsHybridInspectCall struct { 19157 s *Service 19158 name string 19159 googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest 19160 urlParams_ gensupport.URLParams 19161 ctx_ context.Context 19162 header_ http.Header 19163} 19164 19165// HybridInspect: Inspect hybrid content and store findings to a job. To 19166// review the findings inspect the job. Inspection will occur 19167// asynchronously. Early access feature is in a pre-release state and 19168// might change or have limited support. For more information, see 19169// https://cloud.google.com/products#product-launch-stages. 19170func (r *ProjectsLocationsDlpJobsService) HybridInspect(name string, googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest) *ProjectsLocationsDlpJobsHybridInspectCall { 19171 c := &ProjectsLocationsDlpJobsHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19172 c.name = name 19173 c.googleprivacydlpv2hybridinspectdlpjobrequest = googleprivacydlpv2hybridinspectdlpjobrequest 19174 return c 19175} 19176 19177// Fields allows partial responses to be retrieved. See 19178// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19179// for more information. 19180func (c *ProjectsLocationsDlpJobsHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsHybridInspectCall { 19181 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19182 return c 19183} 19184 19185// Context sets the context to be used in this call's Do method. Any 19186// pending HTTP request will be aborted if the provided context is 19187// canceled. 19188func (c *ProjectsLocationsDlpJobsHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsHybridInspectCall { 19189 c.ctx_ = ctx 19190 return c 19191} 19192 19193// Header returns an http.Header that can be modified by the caller to 19194// add HTTP headers to the request. 19195func (c *ProjectsLocationsDlpJobsHybridInspectCall) Header() http.Header { 19196 if c.header_ == nil { 19197 c.header_ = make(http.Header) 19198 } 19199 return c.header_ 19200} 19201 19202func (c *ProjectsLocationsDlpJobsHybridInspectCall) doRequest(alt string) (*http.Response, error) { 19203 reqHeaders := make(http.Header) 19204 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19205 for k, v := range c.header_ { 19206 reqHeaders[k] = v 19207 } 19208 reqHeaders.Set("User-Agent", c.s.userAgent()) 19209 var body io.Reader = nil 19210 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectdlpjobrequest) 19211 if err != nil { 19212 return nil, err 19213 } 19214 reqHeaders.Set("Content-Type", "application/json") 19215 c.urlParams_.Set("alt", alt) 19216 c.urlParams_.Set("prettyPrint", "false") 19217 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 19218 urls += "?" + c.urlParams_.Encode() 19219 req, err := http.NewRequest("POST", urls, body) 19220 if err != nil { 19221 return nil, err 19222 } 19223 req.Header = reqHeaders 19224 googleapi.Expand(req.URL, map[string]string{ 19225 "name": c.name, 19226 }) 19227 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19228} 19229 19230// Do executes the "dlp.projects.locations.dlpJobs.hybridInspect" call. 19231// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 19232// be non-nil. Any non-2xx status code is an error. Response headers are 19233// in either 19234// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 19235// a response was returned at all) in error.(*googleapi.Error).Header. 19236// Use googleapi.IsNotModified to check whether the returned error was 19237// because http.StatusNotModified was returned. 19238func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 19239 gensupport.SetOptions(c.urlParams_, opts...) 19240 res, err := c.doRequest("json") 19241 if res != nil && res.StatusCode == http.StatusNotModified { 19242 if res.Body != nil { 19243 res.Body.Close() 19244 } 19245 return nil, &googleapi.Error{ 19246 Code: res.StatusCode, 19247 Header: res.Header, 19248 } 19249 } 19250 if err != nil { 19251 return nil, err 19252 } 19253 defer googleapi.CloseBody(res) 19254 if err := googleapi.CheckResponse(res); err != nil { 19255 return nil, err 19256 } 19257 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 19258 ServerResponse: googleapi.ServerResponse{ 19259 Header: res.Header, 19260 HTTPStatusCode: res.StatusCode, 19261 }, 19262 } 19263 target := &ret 19264 if err := gensupport.DecodeResponse(target, res); err != nil { 19265 return nil, err 19266 } 19267 return ret, nil 19268 // { 19269 // "description": "Inspect hybrid content and store findings to a job. To review the findings inspect the job. Inspection will occur asynchronously. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 19270 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:hybridInspect", 19271 // "httpMethod": "POST", 19272 // "id": "dlp.projects.locations.dlpJobs.hybridInspect", 19273 // "parameterOrder": [ 19274 // "name" 19275 // ], 19276 // "parameters": { 19277 // "name": { 19278 // "description": "Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.", 19279 // "location": "path", 19280 // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", 19281 // "required": true, 19282 // "type": "string" 19283 // } 19284 // }, 19285 // "path": "v2/{+name}:hybridInspect", 19286 // "request": { 19287 // "$ref": "GooglePrivacyDlpV2HybridInspectDlpJobRequest" 19288 // }, 19289 // "response": { 19290 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 19291 // }, 19292 // "scopes": [ 19293 // "https://www.googleapis.com/auth/cloud-platform" 19294 // ] 19295 // } 19296 19297} 19298 19299// method id "dlp.projects.locations.dlpJobs.list": 19300 19301type ProjectsLocationsDlpJobsListCall struct { 19302 s *Service 19303 parentid string 19304 urlParams_ gensupport.URLParams 19305 ifNoneMatch_ string 19306 ctx_ context.Context 19307 header_ http.Header 19308} 19309 19310// List: Lists DlpJobs that match the specified filter in the request. 19311// See https://cloud.google.com/dlp/docs/inspecting-storage and 19312// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn 19313// more. 19314func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { 19315 c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19316 c.parentid = parentid 19317 return c 19318} 19319 19320// Filter sets the optional parameter "filter": Allows filtering. 19321// Supported syntax: * Filter expressions are made up of one or more 19322// restrictions. * Restrictions can be combined by `AND` or `OR` logical 19323// operators. A sequence of restrictions implicitly uses `AND`. * A 19324// restriction has the form of `{field} {operator} {value}`. * Supported 19325// fields/values for inspect jobs: - `state` - 19326// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - 19327// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name 19328// of the trigger that created job. - 'end_time` - Corresponds to time 19329// the job finished. - 'start_time` - Corresponds to time the job 19330// finished. * Supported fields for risk analysis jobs: - `state` - 19331// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to time 19332// the job finished. - 'start_time` - Corresponds to time the job 19333// finished. * The operator must be `=` or `!=`. Examples: * 19334// inspected_storage = cloud_storage AND state = done * 19335// inspected_storage = cloud_storage OR inspected_storage = bigquery * 19336// inspected_storage = cloud_storage AND (state = done OR state = 19337// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of 19338// this field should be no more than 500 characters. 19339func (c *ProjectsLocationsDlpJobsListCall) Filter(filter string) *ProjectsLocationsDlpJobsListCall { 19340 c.urlParams_.Set("filter", filter) 19341 return c 19342} 19343 19344// LocationId sets the optional parameter "locationId": Deprecated. This 19345// field has no effect. 19346func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *ProjectsLocationsDlpJobsListCall { 19347 c.urlParams_.Set("locationId", locationId) 19348 return c 19349} 19350 19351// OrderBy sets the optional parameter "orderBy": Comma separated list 19352// of fields to order by, followed by `asc` or `desc` postfix. This list 19353// is case-insensitive, default sorting order is ascending, redundant 19354// space characters are insignificant. Example: `name asc, end_time asc, 19355// create_time desc` Supported fields are: - `create_time`: corresponds 19356// to time the job was created. - `end_time`: corresponds to time the 19357// job ended. - `name`: corresponds to job's name. - `state`: 19358// corresponds to `state` 19359func (c *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { 19360 c.urlParams_.Set("orderBy", orderBy) 19361 return c 19362} 19363 19364// PageSize sets the optional parameter "pageSize": The standard list 19365// page size. 19366func (c *ProjectsLocationsDlpJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDlpJobsListCall { 19367 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19368 return c 19369} 19370 19371// PageToken sets the optional parameter "pageToken": The standard list 19372// page token. 19373func (c *ProjectsLocationsDlpJobsListCall) PageToken(pageToken string) *ProjectsLocationsDlpJobsListCall { 19374 c.urlParams_.Set("pageToken", pageToken) 19375 return c 19376} 19377 19378// Type sets the optional parameter "type": The type of job. Defaults to 19379// `DlpJobType.INSPECT` 19380// 19381// Possible values: 19382// "DLP_JOB_TYPE_UNSPECIFIED" - Unused 19383// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. 19384// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. 19385func (c *ProjectsLocationsDlpJobsListCall) Type(type_ string) *ProjectsLocationsDlpJobsListCall { 19386 c.urlParams_.Set("type", type_) 19387 return c 19388} 19389 19390// Fields allows partial responses to be retrieved. See 19391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19392// for more information. 19393func (c *ProjectsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsListCall { 19394 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19395 return c 19396} 19397 19398// IfNoneMatch sets the optional parameter which makes the operation 19399// fail if the object's ETag matches the given value. This is useful for 19400// getting updates only after the object has changed since the last 19401// request. Use googleapi.IsNotModified to check whether the response 19402// error from Do is the result of In-None-Match. 19403func (c *ProjectsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsListCall { 19404 c.ifNoneMatch_ = entityTag 19405 return c 19406} 19407 19408// Context sets the context to be used in this call's Do method. Any 19409// pending HTTP request will be aborted if the provided context is 19410// canceled. 19411func (c *ProjectsLocationsDlpJobsListCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsListCall { 19412 c.ctx_ = ctx 19413 return c 19414} 19415 19416// Header returns an http.Header that can be modified by the caller to 19417// add HTTP headers to the request. 19418func (c *ProjectsLocationsDlpJobsListCall) Header() http.Header { 19419 if c.header_ == nil { 19420 c.header_ = make(http.Header) 19421 } 19422 return c.header_ 19423} 19424 19425func (c *ProjectsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { 19426 reqHeaders := make(http.Header) 19427 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19428 for k, v := range c.header_ { 19429 reqHeaders[k] = v 19430 } 19431 reqHeaders.Set("User-Agent", c.s.userAgent()) 19432 if c.ifNoneMatch_ != "" { 19433 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19434 } 19435 var body io.Reader = nil 19436 c.urlParams_.Set("alt", alt) 19437 c.urlParams_.Set("prettyPrint", "false") 19438 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 19439 urls += "?" + c.urlParams_.Encode() 19440 req, err := http.NewRequest("GET", urls, body) 19441 if err != nil { 19442 return nil, err 19443 } 19444 req.Header = reqHeaders 19445 googleapi.Expand(req.URL, map[string]string{ 19446 "parent": c.parentid, 19447 }) 19448 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19449} 19450 19451// Do executes the "dlp.projects.locations.dlpJobs.list" call. 19452// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will 19453// be non-nil. Any non-2xx status code is an error. Response headers are 19454// in either 19455// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a 19456// response was returned at all) in error.(*googleapi.Error).Header. Use 19457// googleapi.IsNotModified to check whether the returned error was 19458// because http.StatusNotModified was returned. 19459func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { 19460 gensupport.SetOptions(c.urlParams_, opts...) 19461 res, err := c.doRequest("json") 19462 if res != nil && res.StatusCode == http.StatusNotModified { 19463 if res.Body != nil { 19464 res.Body.Close() 19465 } 19466 return nil, &googleapi.Error{ 19467 Code: res.StatusCode, 19468 Header: res.Header, 19469 } 19470 } 19471 if err != nil { 19472 return nil, err 19473 } 19474 defer googleapi.CloseBody(res) 19475 if err := googleapi.CheckResponse(res); err != nil { 19476 return nil, err 19477 } 19478 ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ 19479 ServerResponse: googleapi.ServerResponse{ 19480 Header: res.Header, 19481 HTTPStatusCode: res.StatusCode, 19482 }, 19483 } 19484 target := &ret 19485 if err := gensupport.DecodeResponse(target, res); err != nil { 19486 return nil, err 19487 } 19488 return ret, nil 19489 // { 19490 // "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.", 19491 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", 19492 // "httpMethod": "GET", 19493 // "id": "dlp.projects.locations.dlpJobs.list", 19494 // "parameterOrder": [ 19495 // "parent" 19496 // ], 19497 // "parameters": { 19498 // "filter": { 19499 // "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.", 19500 // "location": "query", 19501 // "type": "string" 19502 // }, 19503 // "locationId": { 19504 // "description": "Deprecated. This field has no effect.", 19505 // "location": "query", 19506 // "type": "string" 19507 // }, 19508 // "orderBy": { 19509 // "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`", 19510 // "location": "query", 19511 // "type": "string" 19512 // }, 19513 // "pageSize": { 19514 // "description": "The standard list page size.", 19515 // "format": "int32", 19516 // "location": "query", 19517 // "type": "integer" 19518 // }, 19519 // "pageToken": { 19520 // "description": "The standard list page token.", 19521 // "location": "query", 19522 // "type": "string" 19523 // }, 19524 // "parent": { 19525 // "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", 19526 // "location": "path", 19527 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19528 // "required": true, 19529 // "type": "string" 19530 // }, 19531 // "type": { 19532 // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", 19533 // "enum": [ 19534 // "DLP_JOB_TYPE_UNSPECIFIED", 19535 // "INSPECT_JOB", 19536 // "RISK_ANALYSIS_JOB" 19537 // ], 19538 // "enumDescriptions": [ 19539 // "Unused", 19540 // "The job inspected Google Cloud for sensitive data.", 19541 // "The job executed a Risk Analysis computation." 19542 // ], 19543 // "location": "query", 19544 // "type": "string" 19545 // } 19546 // }, 19547 // "path": "v2/{+parent}/dlpJobs", 19548 // "response": { 19549 // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" 19550 // }, 19551 // "scopes": [ 19552 // "https://www.googleapis.com/auth/cloud-platform" 19553 // ] 19554 // } 19555 19556} 19557 19558// Pages invokes f for each page of results. 19559// A non-nil error returned from f will halt the iteration. 19560// The provided context supersedes any context provided to the Context method. 19561func (c *ProjectsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { 19562 c.ctx_ = ctx 19563 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19564 for { 19565 x, err := c.Do() 19566 if err != nil { 19567 return err 19568 } 19569 if err := f(x); err != nil { 19570 return err 19571 } 19572 if x.NextPageToken == "" { 19573 return nil 19574 } 19575 c.PageToken(x.NextPageToken) 19576 } 19577} 19578 19579// method id "dlp.projects.locations.image.redact": 19580 19581type ProjectsLocationsImageRedactCall struct { 19582 s *Service 19583 parentid string 19584 googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest 19585 urlParams_ gensupport.URLParams 19586 ctx_ context.Context 19587 header_ http.Header 19588} 19589 19590// Redact: Redacts potentially sensitive info from an image. This method 19591// has limits on input size, processing time, and output size. See 19592// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to 19593// learn more. When no InfoTypes or CustomInfoTypes are specified in 19594// this request, the system will automatically choose what detectors to 19595// run. By default this may be all types, but may change over time as 19596// detectors are updated. 19597func (r *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { 19598 c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19599 c.parentid = parentid 19600 c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest 19601 return c 19602} 19603 19604// Fields allows partial responses to be retrieved. See 19605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19606// for more information. 19607func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { 19608 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19609 return c 19610} 19611 19612// Context sets the context to be used in this call's Do method. Any 19613// pending HTTP request will be aborted if the provided context is 19614// canceled. 19615func (c *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { 19616 c.ctx_ = ctx 19617 return c 19618} 19619 19620// Header returns an http.Header that can be modified by the caller to 19621// add HTTP headers to the request. 19622func (c *ProjectsLocationsImageRedactCall) Header() http.Header { 19623 if c.header_ == nil { 19624 c.header_ = make(http.Header) 19625 } 19626 return c.header_ 19627} 19628 19629func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response, error) { 19630 reqHeaders := make(http.Header) 19631 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19632 for k, v := range c.header_ { 19633 reqHeaders[k] = v 19634 } 19635 reqHeaders.Set("User-Agent", c.s.userAgent()) 19636 var body io.Reader = nil 19637 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) 19638 if err != nil { 19639 return nil, err 19640 } 19641 reqHeaders.Set("Content-Type", "application/json") 19642 c.urlParams_.Set("alt", alt) 19643 c.urlParams_.Set("prettyPrint", "false") 19644 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") 19645 urls += "?" + c.urlParams_.Encode() 19646 req, err := http.NewRequest("POST", urls, body) 19647 if err != nil { 19648 return nil, err 19649 } 19650 req.Header = reqHeaders 19651 googleapi.Expand(req.URL, map[string]string{ 19652 "parent": c.parentid, 19653 }) 19654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19655} 19656 19657// Do executes the "dlp.projects.locations.image.redact" call. 19658// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will 19659// be non-nil. Any non-2xx status code is an error. Response headers are 19660// in either 19661// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a 19662// response was returned at all) in error.(*googleapi.Error).Header. Use 19663// googleapi.IsNotModified to check whether the returned error was 19664// because http.StatusNotModified was returned. 19665func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { 19666 gensupport.SetOptions(c.urlParams_, opts...) 19667 res, err := c.doRequest("json") 19668 if res != nil && res.StatusCode == http.StatusNotModified { 19669 if res.Body != nil { 19670 res.Body.Close() 19671 } 19672 return nil, &googleapi.Error{ 19673 Code: res.StatusCode, 19674 Header: res.Header, 19675 } 19676 } 19677 if err != nil { 19678 return nil, err 19679 } 19680 defer googleapi.CloseBody(res) 19681 if err := googleapi.CheckResponse(res); err != nil { 19682 return nil, err 19683 } 19684 ret := &GooglePrivacyDlpV2RedactImageResponse{ 19685 ServerResponse: googleapi.ServerResponse{ 19686 Header: res.Header, 19687 HTTPStatusCode: res.StatusCode, 19688 }, 19689 } 19690 target := &ret 19691 if err := gensupport.DecodeResponse(target, res); err != nil { 19692 return nil, err 19693 } 19694 return ret, nil 19695 // { 19696 // "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.", 19697 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/image:redact", 19698 // "httpMethod": "POST", 19699 // "id": "dlp.projects.locations.image.redact", 19700 // "parameterOrder": [ 19701 // "parent" 19702 // ], 19703 // "parameters": { 19704 // "parent": { 19705 // "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", 19706 // "location": "path", 19707 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19708 // "required": true, 19709 // "type": "string" 19710 // } 19711 // }, 19712 // "path": "v2/{+parent}/image:redact", 19713 // "request": { 19714 // "$ref": "GooglePrivacyDlpV2RedactImageRequest" 19715 // }, 19716 // "response": { 19717 // "$ref": "GooglePrivacyDlpV2RedactImageResponse" 19718 // }, 19719 // "scopes": [ 19720 // "https://www.googleapis.com/auth/cloud-platform" 19721 // ] 19722 // } 19723 19724} 19725 19726// method id "dlp.projects.locations.inspectTemplates.create": 19727 19728type ProjectsLocationsInspectTemplatesCreateCall struct { 19729 s *Service 19730 parentid string 19731 googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest 19732 urlParams_ gensupport.URLParams 19733 ctx_ context.Context 19734 header_ http.Header 19735} 19736 19737// Create: Creates an InspectTemplate for re-using frequently used 19738// configuration for inspecting content, images, and storage. See 19739// https://cloud.google.com/dlp/docs/creating-templates to learn more. 19740func (r *ProjectsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesCreateCall { 19741 c := &ProjectsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19742 c.parentid = parentid 19743 c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest 19744 return c 19745} 19746 19747// Fields allows partial responses to be retrieved. See 19748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19749// for more information. 19750func (c *ProjectsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesCreateCall { 19751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19752 return c 19753} 19754 19755// Context sets the context to be used in this call's Do method. Any 19756// pending HTTP request will be aborted if the provided context is 19757// canceled. 19758func (c *ProjectsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesCreateCall { 19759 c.ctx_ = ctx 19760 return c 19761} 19762 19763// Header returns an http.Header that can be modified by the caller to 19764// add HTTP headers to the request. 19765func (c *ProjectsLocationsInspectTemplatesCreateCall) Header() http.Header { 19766 if c.header_ == nil { 19767 c.header_ = make(http.Header) 19768 } 19769 return c.header_ 19770} 19771 19772func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 19773 reqHeaders := make(http.Header) 19774 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19775 for k, v := range c.header_ { 19776 reqHeaders[k] = v 19777 } 19778 reqHeaders.Set("User-Agent", c.s.userAgent()) 19779 var body io.Reader = nil 19780 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) 19781 if err != nil { 19782 return nil, err 19783 } 19784 reqHeaders.Set("Content-Type", "application/json") 19785 c.urlParams_.Set("alt", alt) 19786 c.urlParams_.Set("prettyPrint", "false") 19787 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 19788 urls += "?" + c.urlParams_.Encode() 19789 req, err := http.NewRequest("POST", urls, body) 19790 if err != nil { 19791 return nil, err 19792 } 19793 req.Header = reqHeaders 19794 googleapi.Expand(req.URL, map[string]string{ 19795 "parent": c.parentid, 19796 }) 19797 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19798} 19799 19800// Do executes the "dlp.projects.locations.inspectTemplates.create" call. 19801// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 19802// non-nil. Any non-2xx status code is an error. Response headers are in 19803// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 19804// (if a response was returned at all) in 19805// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19806// whether the returned error was because http.StatusNotModified was 19807// returned. 19808func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 19809 gensupport.SetOptions(c.urlParams_, opts...) 19810 res, err := c.doRequest("json") 19811 if res != nil && res.StatusCode == http.StatusNotModified { 19812 if res.Body != nil { 19813 res.Body.Close() 19814 } 19815 return nil, &googleapi.Error{ 19816 Code: res.StatusCode, 19817 Header: res.Header, 19818 } 19819 } 19820 if err != nil { 19821 return nil, err 19822 } 19823 defer googleapi.CloseBody(res) 19824 if err := googleapi.CheckResponse(res); err != nil { 19825 return nil, err 19826 } 19827 ret := &GooglePrivacyDlpV2InspectTemplate{ 19828 ServerResponse: googleapi.ServerResponse{ 19829 Header: res.Header, 19830 HTTPStatusCode: res.StatusCode, 19831 }, 19832 } 19833 target := &ret 19834 if err := gensupport.DecodeResponse(target, res); err != nil { 19835 return nil, err 19836 } 19837 return ret, nil 19838 // { 19839 // "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.", 19840 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 19841 // "httpMethod": "POST", 19842 // "id": "dlp.projects.locations.inspectTemplates.create", 19843 // "parameterOrder": [ 19844 // "parent" 19845 // ], 19846 // "parameters": { 19847 // "parent": { 19848 // "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", 19849 // "location": "path", 19850 // "pattern": "^projects/[^/]+/locations/[^/]+$", 19851 // "required": true, 19852 // "type": "string" 19853 // } 19854 // }, 19855 // "path": "v2/{+parent}/inspectTemplates", 19856 // "request": { 19857 // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" 19858 // }, 19859 // "response": { 19860 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 19861 // }, 19862 // "scopes": [ 19863 // "https://www.googleapis.com/auth/cloud-platform" 19864 // ] 19865 // } 19866 19867} 19868 19869// method id "dlp.projects.locations.inspectTemplates.delete": 19870 19871type ProjectsLocationsInspectTemplatesDeleteCall struct { 19872 s *Service 19873 name string 19874 urlParams_ gensupport.URLParams 19875 ctx_ context.Context 19876 header_ http.Header 19877} 19878 19879// Delete: Deletes an InspectTemplate. See 19880// https://cloud.google.com/dlp/docs/creating-templates to learn more. 19881func (r *ProjectsLocationsInspectTemplatesService) Delete(name string) *ProjectsLocationsInspectTemplatesDeleteCall { 19882 c := &ProjectsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19883 c.name = name 19884 return c 19885} 19886 19887// Fields allows partial responses to be retrieved. See 19888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19889// for more information. 19890func (c *ProjectsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesDeleteCall { 19891 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19892 return c 19893} 19894 19895// Context sets the context to be used in this call's Do method. Any 19896// pending HTTP request will be aborted if the provided context is 19897// canceled. 19898func (c *ProjectsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesDeleteCall { 19899 c.ctx_ = ctx 19900 return c 19901} 19902 19903// Header returns an http.Header that can be modified by the caller to 19904// add HTTP headers to the request. 19905func (c *ProjectsLocationsInspectTemplatesDeleteCall) Header() http.Header { 19906 if c.header_ == nil { 19907 c.header_ = make(http.Header) 19908 } 19909 return c.header_ 19910} 19911 19912func (c *ProjectsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 19913 reqHeaders := make(http.Header) 19914 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 19915 for k, v := range c.header_ { 19916 reqHeaders[k] = v 19917 } 19918 reqHeaders.Set("User-Agent", c.s.userAgent()) 19919 var body io.Reader = nil 19920 c.urlParams_.Set("alt", alt) 19921 c.urlParams_.Set("prettyPrint", "false") 19922 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 19923 urls += "?" + c.urlParams_.Encode() 19924 req, err := http.NewRequest("DELETE", urls, body) 19925 if err != nil { 19926 return nil, err 19927 } 19928 req.Header = reqHeaders 19929 googleapi.Expand(req.URL, map[string]string{ 19930 "name": c.name, 19931 }) 19932 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19933} 19934 19935// Do executes the "dlp.projects.locations.inspectTemplates.delete" call. 19936// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 19937// non-2xx status code is an error. Response headers are in either 19938// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 19939// returned at all) in error.(*googleapi.Error).Header. Use 19940// googleapi.IsNotModified to check whether the returned error was 19941// because http.StatusNotModified was returned. 19942func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 19943 gensupport.SetOptions(c.urlParams_, opts...) 19944 res, err := c.doRequest("json") 19945 if res != nil && res.StatusCode == http.StatusNotModified { 19946 if res.Body != nil { 19947 res.Body.Close() 19948 } 19949 return nil, &googleapi.Error{ 19950 Code: res.StatusCode, 19951 Header: res.Header, 19952 } 19953 } 19954 if err != nil { 19955 return nil, err 19956 } 19957 defer googleapi.CloseBody(res) 19958 if err := googleapi.CheckResponse(res); err != nil { 19959 return nil, err 19960 } 19961 ret := &GoogleProtobufEmpty{ 19962 ServerResponse: googleapi.ServerResponse{ 19963 Header: res.Header, 19964 HTTPStatusCode: res.StatusCode, 19965 }, 19966 } 19967 target := &ret 19968 if err := gensupport.DecodeResponse(target, res); err != nil { 19969 return nil, err 19970 } 19971 return ret, nil 19972 // { 19973 // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 19974 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 19975 // "httpMethod": "DELETE", 19976 // "id": "dlp.projects.locations.inspectTemplates.delete", 19977 // "parameterOrder": [ 19978 // "name" 19979 // ], 19980 // "parameters": { 19981 // "name": { 19982 // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 19983 // "location": "path", 19984 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 19985 // "required": true, 19986 // "type": "string" 19987 // } 19988 // }, 19989 // "path": "v2/{+name}", 19990 // "response": { 19991 // "$ref": "GoogleProtobufEmpty" 19992 // }, 19993 // "scopes": [ 19994 // "https://www.googleapis.com/auth/cloud-platform" 19995 // ] 19996 // } 19997 19998} 19999 20000// method id "dlp.projects.locations.inspectTemplates.get": 20001 20002type ProjectsLocationsInspectTemplatesGetCall struct { 20003 s *Service 20004 name string 20005 urlParams_ gensupport.URLParams 20006 ifNoneMatch_ string 20007 ctx_ context.Context 20008 header_ http.Header 20009} 20010 20011// Get: Gets an InspectTemplate. See 20012// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20013func (r *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLocationsInspectTemplatesGetCall { 20014 c := &ProjectsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20015 c.name = name 20016 return c 20017} 20018 20019// Fields allows partial responses to be retrieved. See 20020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20021// for more information. 20022func (c *ProjectsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesGetCall { 20023 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20024 return c 20025} 20026 20027// IfNoneMatch sets the optional parameter which makes the operation 20028// fail if the object's ETag matches the given value. This is useful for 20029// getting updates only after the object has changed since the last 20030// request. Use googleapi.IsNotModified to check whether the response 20031// error from Do is the result of In-None-Match. 20032func (c *ProjectsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesGetCall { 20033 c.ifNoneMatch_ = entityTag 20034 return c 20035} 20036 20037// Context sets the context to be used in this call's Do method. Any 20038// pending HTTP request will be aborted if the provided context is 20039// canceled. 20040func (c *ProjectsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesGetCall { 20041 c.ctx_ = ctx 20042 return c 20043} 20044 20045// Header returns an http.Header that can be modified by the caller to 20046// add HTTP headers to the request. 20047func (c *ProjectsLocationsInspectTemplatesGetCall) Header() http.Header { 20048 if c.header_ == nil { 20049 c.header_ = make(http.Header) 20050 } 20051 return c.header_ 20052} 20053 20054func (c *ProjectsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 20055 reqHeaders := make(http.Header) 20056 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20057 for k, v := range c.header_ { 20058 reqHeaders[k] = v 20059 } 20060 reqHeaders.Set("User-Agent", c.s.userAgent()) 20061 if c.ifNoneMatch_ != "" { 20062 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20063 } 20064 var body io.Reader = nil 20065 c.urlParams_.Set("alt", alt) 20066 c.urlParams_.Set("prettyPrint", "false") 20067 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20068 urls += "?" + c.urlParams_.Encode() 20069 req, err := http.NewRequest("GET", urls, body) 20070 if err != nil { 20071 return nil, err 20072 } 20073 req.Header = reqHeaders 20074 googleapi.Expand(req.URL, map[string]string{ 20075 "name": c.name, 20076 }) 20077 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20078} 20079 20080// Do executes the "dlp.projects.locations.inspectTemplates.get" call. 20081// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 20082// non-nil. Any non-2xx status code is an error. Response headers are in 20083// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 20084// (if a response was returned at all) in 20085// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20086// whether the returned error was because http.StatusNotModified was 20087// returned. 20088func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 20089 gensupport.SetOptions(c.urlParams_, opts...) 20090 res, err := c.doRequest("json") 20091 if res != nil && res.StatusCode == http.StatusNotModified { 20092 if res.Body != nil { 20093 res.Body.Close() 20094 } 20095 return nil, &googleapi.Error{ 20096 Code: res.StatusCode, 20097 Header: res.Header, 20098 } 20099 } 20100 if err != nil { 20101 return nil, err 20102 } 20103 defer googleapi.CloseBody(res) 20104 if err := googleapi.CheckResponse(res); err != nil { 20105 return nil, err 20106 } 20107 ret := &GooglePrivacyDlpV2InspectTemplate{ 20108 ServerResponse: googleapi.ServerResponse{ 20109 Header: res.Header, 20110 HTTPStatusCode: res.StatusCode, 20111 }, 20112 } 20113 target := &ret 20114 if err := gensupport.DecodeResponse(target, res); err != nil { 20115 return nil, err 20116 } 20117 return ret, nil 20118 // { 20119 // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20120 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 20121 // "httpMethod": "GET", 20122 // "id": "dlp.projects.locations.inspectTemplates.get", 20123 // "parameterOrder": [ 20124 // "name" 20125 // ], 20126 // "parameters": { 20127 // "name": { 20128 // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 20129 // "location": "path", 20130 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 20131 // "required": true, 20132 // "type": "string" 20133 // } 20134 // }, 20135 // "path": "v2/{+name}", 20136 // "response": { 20137 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 20138 // }, 20139 // "scopes": [ 20140 // "https://www.googleapis.com/auth/cloud-platform" 20141 // ] 20142 // } 20143 20144} 20145 20146// method id "dlp.projects.locations.inspectTemplates.list": 20147 20148type ProjectsLocationsInspectTemplatesListCall struct { 20149 s *Service 20150 parentid string 20151 urlParams_ gensupport.URLParams 20152 ifNoneMatch_ string 20153 ctx_ context.Context 20154 header_ http.Header 20155} 20156 20157// List: Lists InspectTemplates. See 20158// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20159func (r *ProjectsLocationsInspectTemplatesService) List(parentid string) *ProjectsLocationsInspectTemplatesListCall { 20160 c := &ProjectsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20161 c.parentid = parentid 20162 return c 20163} 20164 20165// LocationId sets the optional parameter "locationId": Deprecated. This 20166// field has no effect. 20167func (c *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string) *ProjectsLocationsInspectTemplatesListCall { 20168 c.urlParams_.Set("locationId", locationId) 20169 return c 20170} 20171 20172// OrderBy sets the optional parameter "orderBy": Comma separated list 20173// of fields to order by, followed by `asc` or `desc` postfix. This list 20174// is case-insensitive, default sorting order is ascending, redundant 20175// space characters are insignificant. Example: `name asc,update_time, 20176// create_time desc` Supported fields are: - `create_time`: corresponds 20177// to time the template was created. - `update_time`: corresponds to 20178// time the template was last updated. - `name`: corresponds to 20179// template's name. - `display_name`: corresponds to template's display 20180// name. 20181func (c *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { 20182 c.urlParams_.Set("orderBy", orderBy) 20183 return c 20184} 20185 20186// PageSize sets the optional parameter "pageSize": Size of the page, 20187// can be limited by server. If zero server returns a page of max size 20188// 100. 20189func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { 20190 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 20191 return c 20192} 20193 20194// PageToken sets the optional parameter "pageToken": Page token to 20195// continue retrieval. Comes from previous call to 20196// `ListInspectTemplates`. 20197func (c *ProjectsLocationsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsInspectTemplatesListCall { 20198 c.urlParams_.Set("pageToken", pageToken) 20199 return c 20200} 20201 20202// Fields allows partial responses to be retrieved. See 20203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20204// for more information. 20205func (c *ProjectsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesListCall { 20206 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20207 return c 20208} 20209 20210// IfNoneMatch sets the optional parameter which makes the operation 20211// fail if the object's ETag matches the given value. This is useful for 20212// getting updates only after the object has changed since the last 20213// request. Use googleapi.IsNotModified to check whether the response 20214// error from Do is the result of In-None-Match. 20215func (c *ProjectsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesListCall { 20216 c.ifNoneMatch_ = entityTag 20217 return c 20218} 20219 20220// Context sets the context to be used in this call's Do method. Any 20221// pending HTTP request will be aborted if the provided context is 20222// canceled. 20223func (c *ProjectsLocationsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesListCall { 20224 c.ctx_ = ctx 20225 return c 20226} 20227 20228// Header returns an http.Header that can be modified by the caller to 20229// add HTTP headers to the request. 20230func (c *ProjectsLocationsInspectTemplatesListCall) Header() http.Header { 20231 if c.header_ == nil { 20232 c.header_ = make(http.Header) 20233 } 20234 return c.header_ 20235} 20236 20237func (c *ProjectsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { 20238 reqHeaders := make(http.Header) 20239 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20240 for k, v := range c.header_ { 20241 reqHeaders[k] = v 20242 } 20243 reqHeaders.Set("User-Agent", c.s.userAgent()) 20244 if c.ifNoneMatch_ != "" { 20245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20246 } 20247 var body io.Reader = nil 20248 c.urlParams_.Set("alt", alt) 20249 c.urlParams_.Set("prettyPrint", "false") 20250 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") 20251 urls += "?" + c.urlParams_.Encode() 20252 req, err := http.NewRequest("GET", urls, body) 20253 if err != nil { 20254 return nil, err 20255 } 20256 req.Header = reqHeaders 20257 googleapi.Expand(req.URL, map[string]string{ 20258 "parent": c.parentid, 20259 }) 20260 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20261} 20262 20263// Do executes the "dlp.projects.locations.inspectTemplates.list" call. 20264// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or 20265// error will be non-nil. Any non-2xx status code is an error. Response 20266// headers are in either 20267// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header 20268// or (if a response was returned at all) in 20269// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20270// whether the returned error was because http.StatusNotModified was 20271// returned. 20272func (c *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { 20273 gensupport.SetOptions(c.urlParams_, opts...) 20274 res, err := c.doRequest("json") 20275 if res != nil && res.StatusCode == http.StatusNotModified { 20276 if res.Body != nil { 20277 res.Body.Close() 20278 } 20279 return nil, &googleapi.Error{ 20280 Code: res.StatusCode, 20281 Header: res.Header, 20282 } 20283 } 20284 if err != nil { 20285 return nil, err 20286 } 20287 defer googleapi.CloseBody(res) 20288 if err := googleapi.CheckResponse(res); err != nil { 20289 return nil, err 20290 } 20291 ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ 20292 ServerResponse: googleapi.ServerResponse{ 20293 Header: res.Header, 20294 HTTPStatusCode: res.StatusCode, 20295 }, 20296 } 20297 target := &ret 20298 if err := gensupport.DecodeResponse(target, res); err != nil { 20299 return nil, err 20300 } 20301 return ret, nil 20302 // { 20303 // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20304 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", 20305 // "httpMethod": "GET", 20306 // "id": "dlp.projects.locations.inspectTemplates.list", 20307 // "parameterOrder": [ 20308 // "parent" 20309 // ], 20310 // "parameters": { 20311 // "locationId": { 20312 // "description": "Deprecated. This field has no effect.", 20313 // "location": "query", 20314 // "type": "string" 20315 // }, 20316 // "orderBy": { 20317 // "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.", 20318 // "location": "query", 20319 // "type": "string" 20320 // }, 20321 // "pageSize": { 20322 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 20323 // "format": "int32", 20324 // "location": "query", 20325 // "type": "integer" 20326 // }, 20327 // "pageToken": { 20328 // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", 20329 // "location": "query", 20330 // "type": "string" 20331 // }, 20332 // "parent": { 20333 // "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", 20334 // "location": "path", 20335 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20336 // "required": true, 20337 // "type": "string" 20338 // } 20339 // }, 20340 // "path": "v2/{+parent}/inspectTemplates", 20341 // "response": { 20342 // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" 20343 // }, 20344 // "scopes": [ 20345 // "https://www.googleapis.com/auth/cloud-platform" 20346 // ] 20347 // } 20348 20349} 20350 20351// Pages invokes f for each page of results. 20352// A non-nil error returned from f will halt the iteration. 20353// The provided context supersedes any context provided to the Context method. 20354func (c *ProjectsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { 20355 c.ctx_ = ctx 20356 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20357 for { 20358 x, err := c.Do() 20359 if err != nil { 20360 return err 20361 } 20362 if err := f(x); err != nil { 20363 return err 20364 } 20365 if x.NextPageToken == "" { 20366 return nil 20367 } 20368 c.PageToken(x.NextPageToken) 20369 } 20370} 20371 20372// method id "dlp.projects.locations.inspectTemplates.patch": 20373 20374type ProjectsLocationsInspectTemplatesPatchCall struct { 20375 s *Service 20376 name string 20377 googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest 20378 urlParams_ gensupport.URLParams 20379 ctx_ context.Context 20380 header_ http.Header 20381} 20382 20383// Patch: Updates the InspectTemplate. See 20384// https://cloud.google.com/dlp/docs/creating-templates to learn more. 20385func (r *ProjectsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesPatchCall { 20386 c := &ProjectsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20387 c.name = name 20388 c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest 20389 return c 20390} 20391 20392// Fields allows partial responses to be retrieved. See 20393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20394// for more information. 20395func (c *ProjectsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesPatchCall { 20396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20397 return c 20398} 20399 20400// Context sets the context to be used in this call's Do method. Any 20401// pending HTTP request will be aborted if the provided context is 20402// canceled. 20403func (c *ProjectsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesPatchCall { 20404 c.ctx_ = ctx 20405 return c 20406} 20407 20408// Header returns an http.Header that can be modified by the caller to 20409// add HTTP headers to the request. 20410func (c *ProjectsLocationsInspectTemplatesPatchCall) Header() http.Header { 20411 if c.header_ == nil { 20412 c.header_ = make(http.Header) 20413 } 20414 return c.header_ 20415} 20416 20417func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 20418 reqHeaders := make(http.Header) 20419 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20420 for k, v := range c.header_ { 20421 reqHeaders[k] = v 20422 } 20423 reqHeaders.Set("User-Agent", c.s.userAgent()) 20424 var body io.Reader = nil 20425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) 20426 if err != nil { 20427 return nil, err 20428 } 20429 reqHeaders.Set("Content-Type", "application/json") 20430 c.urlParams_.Set("alt", alt) 20431 c.urlParams_.Set("prettyPrint", "false") 20432 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20433 urls += "?" + c.urlParams_.Encode() 20434 req, err := http.NewRequest("PATCH", urls, body) 20435 if err != nil { 20436 return nil, err 20437 } 20438 req.Header = reqHeaders 20439 googleapi.Expand(req.URL, map[string]string{ 20440 "name": c.name, 20441 }) 20442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20443} 20444 20445// Do executes the "dlp.projects.locations.inspectTemplates.patch" call. 20446// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be 20447// non-nil. Any non-2xx status code is an error. Response headers are in 20448// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or 20449// (if a response was returned at all) in 20450// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20451// whether the returned error was because http.StatusNotModified was 20452// returned. 20453func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { 20454 gensupport.SetOptions(c.urlParams_, opts...) 20455 res, err := c.doRequest("json") 20456 if res != nil && res.StatusCode == http.StatusNotModified { 20457 if res.Body != nil { 20458 res.Body.Close() 20459 } 20460 return nil, &googleapi.Error{ 20461 Code: res.StatusCode, 20462 Header: res.Header, 20463 } 20464 } 20465 if err != nil { 20466 return nil, err 20467 } 20468 defer googleapi.CloseBody(res) 20469 if err := googleapi.CheckResponse(res); err != nil { 20470 return nil, err 20471 } 20472 ret := &GooglePrivacyDlpV2InspectTemplate{ 20473 ServerResponse: googleapi.ServerResponse{ 20474 Header: res.Header, 20475 HTTPStatusCode: res.StatusCode, 20476 }, 20477 } 20478 target := &ret 20479 if err := gensupport.DecodeResponse(target, res); err != nil { 20480 return nil, err 20481 } 20482 return ret, nil 20483 // { 20484 // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", 20485 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", 20486 // "httpMethod": "PATCH", 20487 // "id": "dlp.projects.locations.inspectTemplates.patch", 20488 // "parameterOrder": [ 20489 // "name" 20490 // ], 20491 // "parameters": { 20492 // "name": { 20493 // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", 20494 // "location": "path", 20495 // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", 20496 // "required": true, 20497 // "type": "string" 20498 // } 20499 // }, 20500 // "path": "v2/{+name}", 20501 // "request": { 20502 // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" 20503 // }, 20504 // "response": { 20505 // "$ref": "GooglePrivacyDlpV2InspectTemplate" 20506 // }, 20507 // "scopes": [ 20508 // "https://www.googleapis.com/auth/cloud-platform" 20509 // ] 20510 // } 20511 20512} 20513 20514// method id "dlp.projects.locations.jobTriggers.activate": 20515 20516type ProjectsLocationsJobTriggersActivateCall struct { 20517 s *Service 20518 name string 20519 googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest 20520 urlParams_ gensupport.URLParams 20521 ctx_ context.Context 20522 header_ http.Header 20523} 20524 20525// Activate: Activate a job trigger. Causes the immediate execute of a 20526// trigger instead of waiting on the trigger event to occur. 20527func (r *ProjectsLocationsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsLocationsJobTriggersActivateCall { 20528 c := &ProjectsLocationsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20529 c.name = name 20530 c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest 20531 return c 20532} 20533 20534// Fields allows partial responses to be retrieved. See 20535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20536// for more information. 20537func (c *ProjectsLocationsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersActivateCall { 20538 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20539 return c 20540} 20541 20542// Context sets the context to be used in this call's Do method. Any 20543// pending HTTP request will be aborted if the provided context is 20544// canceled. 20545func (c *ProjectsLocationsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersActivateCall { 20546 c.ctx_ = ctx 20547 return c 20548} 20549 20550// Header returns an http.Header that can be modified by the caller to 20551// add HTTP headers to the request. 20552func (c *ProjectsLocationsJobTriggersActivateCall) Header() http.Header { 20553 if c.header_ == nil { 20554 c.header_ = make(http.Header) 20555 } 20556 return c.header_ 20557} 20558 20559func (c *ProjectsLocationsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 20560 reqHeaders := make(http.Header) 20561 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20562 for k, v := range c.header_ { 20563 reqHeaders[k] = v 20564 } 20565 reqHeaders.Set("User-Agent", c.s.userAgent()) 20566 var body io.Reader = nil 20567 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) 20568 if err != nil { 20569 return nil, err 20570 } 20571 reqHeaders.Set("Content-Type", "application/json") 20572 c.urlParams_.Set("alt", alt) 20573 c.urlParams_.Set("prettyPrint", "false") 20574 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") 20575 urls += "?" + c.urlParams_.Encode() 20576 req, err := http.NewRequest("POST", urls, body) 20577 if err != nil { 20578 return nil, err 20579 } 20580 req.Header = reqHeaders 20581 googleapi.Expand(req.URL, map[string]string{ 20582 "name": c.name, 20583 }) 20584 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20585} 20586 20587// Do executes the "dlp.projects.locations.jobTriggers.activate" call. 20588// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. 20589// Any non-2xx status code is an error. Response headers are in either 20590// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was 20591// returned at all) in error.(*googleapi.Error).Header. Use 20592// googleapi.IsNotModified to check whether the returned error was 20593// because http.StatusNotModified was returned. 20594func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { 20595 gensupport.SetOptions(c.urlParams_, opts...) 20596 res, err := c.doRequest("json") 20597 if res != nil && res.StatusCode == http.StatusNotModified { 20598 if res.Body != nil { 20599 res.Body.Close() 20600 } 20601 return nil, &googleapi.Error{ 20602 Code: res.StatusCode, 20603 Header: res.Header, 20604 } 20605 } 20606 if err != nil { 20607 return nil, err 20608 } 20609 defer googleapi.CloseBody(res) 20610 if err := googleapi.CheckResponse(res); err != nil { 20611 return nil, err 20612 } 20613 ret := &GooglePrivacyDlpV2DlpJob{ 20614 ServerResponse: googleapi.ServerResponse{ 20615 Header: res.Header, 20616 HTTPStatusCode: res.StatusCode, 20617 }, 20618 } 20619 target := &ret 20620 if err := gensupport.DecodeResponse(target, res); err != nil { 20621 return nil, err 20622 } 20623 return ret, nil 20624 // { 20625 // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", 20626 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:activate", 20627 // "httpMethod": "POST", 20628 // "id": "dlp.projects.locations.jobTriggers.activate", 20629 // "parameterOrder": [ 20630 // "name" 20631 // ], 20632 // "parameters": { 20633 // "name": { 20634 // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", 20635 // "location": "path", 20636 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 20637 // "required": true, 20638 // "type": "string" 20639 // } 20640 // }, 20641 // "path": "v2/{+name}:activate", 20642 // "request": { 20643 // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" 20644 // }, 20645 // "response": { 20646 // "$ref": "GooglePrivacyDlpV2DlpJob" 20647 // }, 20648 // "scopes": [ 20649 // "https://www.googleapis.com/auth/cloud-platform" 20650 // ] 20651 // } 20652 20653} 20654 20655// method id "dlp.projects.locations.jobTriggers.create": 20656 20657type ProjectsLocationsJobTriggersCreateCall struct { 20658 s *Service 20659 parentid string 20660 googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest 20661 urlParams_ gensupport.URLParams 20662 ctx_ context.Context 20663 header_ http.Header 20664} 20665 20666// Create: Creates a job trigger to run DLP actions such as scanning 20667// storage for sensitive information on a set schedule. See 20668// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20669// more. 20670func (r *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { 20671 c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20672 c.parentid = parentid 20673 c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest 20674 return c 20675} 20676 20677// Fields allows partial responses to be retrieved. See 20678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20679// for more information. 20680func (c *ProjectsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersCreateCall { 20681 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20682 return c 20683} 20684 20685// Context sets the context to be used in this call's Do method. Any 20686// pending HTTP request will be aborted if the provided context is 20687// canceled. 20688func (c *ProjectsLocationsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersCreateCall { 20689 c.ctx_ = ctx 20690 return c 20691} 20692 20693// Header returns an http.Header that can be modified by the caller to 20694// add HTTP headers to the request. 20695func (c *ProjectsLocationsJobTriggersCreateCall) Header() http.Header { 20696 if c.header_ == nil { 20697 c.header_ = make(http.Header) 20698 } 20699 return c.header_ 20700} 20701 20702func (c *ProjectsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 20703 reqHeaders := make(http.Header) 20704 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20705 for k, v := range c.header_ { 20706 reqHeaders[k] = v 20707 } 20708 reqHeaders.Set("User-Agent", c.s.userAgent()) 20709 var body io.Reader = nil 20710 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) 20711 if err != nil { 20712 return nil, err 20713 } 20714 reqHeaders.Set("Content-Type", "application/json") 20715 c.urlParams_.Set("alt", alt) 20716 c.urlParams_.Set("prettyPrint", "false") 20717 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 20718 urls += "?" + c.urlParams_.Encode() 20719 req, err := http.NewRequest("POST", urls, body) 20720 if err != nil { 20721 return nil, err 20722 } 20723 req.Header = reqHeaders 20724 googleapi.Expand(req.URL, map[string]string{ 20725 "parent": c.parentid, 20726 }) 20727 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20728} 20729 20730// Do executes the "dlp.projects.locations.jobTriggers.create" call. 20731// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 20732// non-nil. Any non-2xx status code is an error. Response headers are in 20733// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 20734// response was returned at all) in error.(*googleapi.Error).Header. Use 20735// googleapi.IsNotModified to check whether the returned error was 20736// because http.StatusNotModified was returned. 20737func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 20738 gensupport.SetOptions(c.urlParams_, opts...) 20739 res, err := c.doRequest("json") 20740 if res != nil && res.StatusCode == http.StatusNotModified { 20741 if res.Body != nil { 20742 res.Body.Close() 20743 } 20744 return nil, &googleapi.Error{ 20745 Code: res.StatusCode, 20746 Header: res.Header, 20747 } 20748 } 20749 if err != nil { 20750 return nil, err 20751 } 20752 defer googleapi.CloseBody(res) 20753 if err := googleapi.CheckResponse(res); err != nil { 20754 return nil, err 20755 } 20756 ret := &GooglePrivacyDlpV2JobTrigger{ 20757 ServerResponse: googleapi.ServerResponse{ 20758 Header: res.Header, 20759 HTTPStatusCode: res.StatusCode, 20760 }, 20761 } 20762 target := &ret 20763 if err := gensupport.DecodeResponse(target, res); err != nil { 20764 return nil, err 20765 } 20766 return ret, nil 20767 // { 20768 // "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.", 20769 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 20770 // "httpMethod": "POST", 20771 // "id": "dlp.projects.locations.jobTriggers.create", 20772 // "parameterOrder": [ 20773 // "parent" 20774 // ], 20775 // "parameters": { 20776 // "parent": { 20777 // "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", 20778 // "location": "path", 20779 // "pattern": "^projects/[^/]+/locations/[^/]+$", 20780 // "required": true, 20781 // "type": "string" 20782 // } 20783 // }, 20784 // "path": "v2/{+parent}/jobTriggers", 20785 // "request": { 20786 // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" 20787 // }, 20788 // "response": { 20789 // "$ref": "GooglePrivacyDlpV2JobTrigger" 20790 // }, 20791 // "scopes": [ 20792 // "https://www.googleapis.com/auth/cloud-platform" 20793 // ] 20794 // } 20795 20796} 20797 20798// method id "dlp.projects.locations.jobTriggers.delete": 20799 20800type ProjectsLocationsJobTriggersDeleteCall struct { 20801 s *Service 20802 name string 20803 urlParams_ gensupport.URLParams 20804 ctx_ context.Context 20805 header_ http.Header 20806} 20807 20808// Delete: Deletes a job trigger. See 20809// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20810// more. 20811func (r *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocationsJobTriggersDeleteCall { 20812 c := &ProjectsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20813 c.name = name 20814 return c 20815} 20816 20817// Fields allows partial responses to be retrieved. See 20818// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20819// for more information. 20820func (c *ProjectsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersDeleteCall { 20821 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20822 return c 20823} 20824 20825// Context sets the context to be used in this call's Do method. Any 20826// pending HTTP request will be aborted if the provided context is 20827// canceled. 20828func (c *ProjectsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersDeleteCall { 20829 c.ctx_ = ctx 20830 return c 20831} 20832 20833// Header returns an http.Header that can be modified by the caller to 20834// add HTTP headers to the request. 20835func (c *ProjectsLocationsJobTriggersDeleteCall) Header() http.Header { 20836 if c.header_ == nil { 20837 c.header_ = make(http.Header) 20838 } 20839 return c.header_ 20840} 20841 20842func (c *ProjectsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { 20843 reqHeaders := make(http.Header) 20844 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20845 for k, v := range c.header_ { 20846 reqHeaders[k] = v 20847 } 20848 reqHeaders.Set("User-Agent", c.s.userAgent()) 20849 var body io.Reader = nil 20850 c.urlParams_.Set("alt", alt) 20851 c.urlParams_.Set("prettyPrint", "false") 20852 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20853 urls += "?" + c.urlParams_.Encode() 20854 req, err := http.NewRequest("DELETE", urls, body) 20855 if err != nil { 20856 return nil, err 20857 } 20858 req.Header = reqHeaders 20859 googleapi.Expand(req.URL, map[string]string{ 20860 "name": c.name, 20861 }) 20862 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20863} 20864 20865// Do executes the "dlp.projects.locations.jobTriggers.delete" call. 20866// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 20867// non-2xx status code is an error. Response headers are in either 20868// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 20869// returned at all) in error.(*googleapi.Error).Header. Use 20870// googleapi.IsNotModified to check whether the returned error was 20871// because http.StatusNotModified was returned. 20872func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 20873 gensupport.SetOptions(c.urlParams_, opts...) 20874 res, err := c.doRequest("json") 20875 if res != nil && res.StatusCode == http.StatusNotModified { 20876 if res.Body != nil { 20877 res.Body.Close() 20878 } 20879 return nil, &googleapi.Error{ 20880 Code: res.StatusCode, 20881 Header: res.Header, 20882 } 20883 } 20884 if err != nil { 20885 return nil, err 20886 } 20887 defer googleapi.CloseBody(res) 20888 if err := googleapi.CheckResponse(res); err != nil { 20889 return nil, err 20890 } 20891 ret := &GoogleProtobufEmpty{ 20892 ServerResponse: googleapi.ServerResponse{ 20893 Header: res.Header, 20894 HTTPStatusCode: res.StatusCode, 20895 }, 20896 } 20897 target := &ret 20898 if err := gensupport.DecodeResponse(target, res); err != nil { 20899 return nil, err 20900 } 20901 return ret, nil 20902 // { 20903 // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 20904 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 20905 // "httpMethod": "DELETE", 20906 // "id": "dlp.projects.locations.jobTriggers.delete", 20907 // "parameterOrder": [ 20908 // "name" 20909 // ], 20910 // "parameters": { 20911 // "name": { 20912 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 20913 // "location": "path", 20914 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 20915 // "required": true, 20916 // "type": "string" 20917 // } 20918 // }, 20919 // "path": "v2/{+name}", 20920 // "response": { 20921 // "$ref": "GoogleProtobufEmpty" 20922 // }, 20923 // "scopes": [ 20924 // "https://www.googleapis.com/auth/cloud-platform" 20925 // ] 20926 // } 20927 20928} 20929 20930// method id "dlp.projects.locations.jobTriggers.get": 20931 20932type ProjectsLocationsJobTriggersGetCall struct { 20933 s *Service 20934 name string 20935 urlParams_ gensupport.URLParams 20936 ifNoneMatch_ string 20937 ctx_ context.Context 20938 header_ http.Header 20939} 20940 20941// Get: Gets a job trigger. See 20942// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 20943// more. 20944func (r *ProjectsLocationsJobTriggersService) Get(name string) *ProjectsLocationsJobTriggersGetCall { 20945 c := &ProjectsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20946 c.name = name 20947 return c 20948} 20949 20950// Fields allows partial responses to be retrieved. See 20951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20952// for more information. 20953func (c *ProjectsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersGetCall { 20954 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20955 return c 20956} 20957 20958// IfNoneMatch sets the optional parameter which makes the operation 20959// fail if the object's ETag matches the given value. This is useful for 20960// getting updates only after the object has changed since the last 20961// request. Use googleapi.IsNotModified to check whether the response 20962// error from Do is the result of In-None-Match. 20963func (c *ProjectsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersGetCall { 20964 c.ifNoneMatch_ = entityTag 20965 return c 20966} 20967 20968// Context sets the context to be used in this call's Do method. Any 20969// pending HTTP request will be aborted if the provided context is 20970// canceled. 20971func (c *ProjectsLocationsJobTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersGetCall { 20972 c.ctx_ = ctx 20973 return c 20974} 20975 20976// Header returns an http.Header that can be modified by the caller to 20977// add HTTP headers to the request. 20978func (c *ProjectsLocationsJobTriggersGetCall) Header() http.Header { 20979 if c.header_ == nil { 20980 c.header_ = make(http.Header) 20981 } 20982 return c.header_ 20983} 20984 20985func (c *ProjectsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { 20986 reqHeaders := make(http.Header) 20987 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 20988 for k, v := range c.header_ { 20989 reqHeaders[k] = v 20990 } 20991 reqHeaders.Set("User-Agent", c.s.userAgent()) 20992 if c.ifNoneMatch_ != "" { 20993 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20994 } 20995 var body io.Reader = nil 20996 c.urlParams_.Set("alt", alt) 20997 c.urlParams_.Set("prettyPrint", "false") 20998 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 20999 urls += "?" + c.urlParams_.Encode() 21000 req, err := http.NewRequest("GET", urls, body) 21001 if err != nil { 21002 return nil, err 21003 } 21004 req.Header = reqHeaders 21005 googleapi.Expand(req.URL, map[string]string{ 21006 "name": c.name, 21007 }) 21008 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21009} 21010 21011// Do executes the "dlp.projects.locations.jobTriggers.get" call. 21012// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 21013// non-nil. Any non-2xx status code is an error. Response headers are in 21014// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 21015// response was returned at all) in error.(*googleapi.Error).Header. Use 21016// googleapi.IsNotModified to check whether the returned error was 21017// because http.StatusNotModified was returned. 21018func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 21019 gensupport.SetOptions(c.urlParams_, opts...) 21020 res, err := c.doRequest("json") 21021 if res != nil && res.StatusCode == http.StatusNotModified { 21022 if res.Body != nil { 21023 res.Body.Close() 21024 } 21025 return nil, &googleapi.Error{ 21026 Code: res.StatusCode, 21027 Header: res.Header, 21028 } 21029 } 21030 if err != nil { 21031 return nil, err 21032 } 21033 defer googleapi.CloseBody(res) 21034 if err := googleapi.CheckResponse(res); err != nil { 21035 return nil, err 21036 } 21037 ret := &GooglePrivacyDlpV2JobTrigger{ 21038 ServerResponse: googleapi.ServerResponse{ 21039 Header: res.Header, 21040 HTTPStatusCode: res.StatusCode, 21041 }, 21042 } 21043 target := &ret 21044 if err := gensupport.DecodeResponse(target, res); err != nil { 21045 return nil, err 21046 } 21047 return ret, nil 21048 // { 21049 // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21050 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 21051 // "httpMethod": "GET", 21052 // "id": "dlp.projects.locations.jobTriggers.get", 21053 // "parameterOrder": [ 21054 // "name" 21055 // ], 21056 // "parameters": { 21057 // "name": { 21058 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21059 // "location": "path", 21060 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21061 // "required": true, 21062 // "type": "string" 21063 // } 21064 // }, 21065 // "path": "v2/{+name}", 21066 // "response": { 21067 // "$ref": "GooglePrivacyDlpV2JobTrigger" 21068 // }, 21069 // "scopes": [ 21070 // "https://www.googleapis.com/auth/cloud-platform" 21071 // ] 21072 // } 21073 21074} 21075 21076// method id "dlp.projects.locations.jobTriggers.hybridInspect": 21077 21078type ProjectsLocationsJobTriggersHybridInspectCall struct { 21079 s *Service 21080 name string 21081 googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest 21082 urlParams_ gensupport.URLParams 21083 ctx_ context.Context 21084 header_ http.Header 21085} 21086 21087// HybridInspect: Inspect hybrid content and store findings to a 21088// trigger. The inspection will be processed asynchronously. To review 21089// the findings monitor the jobs within the trigger. Early access 21090// feature is in a pre-release state and might change or have limited 21091// support. For more information, see 21092// https://cloud.google.com/products#product-launch-stages. 21093func (r *ProjectsLocationsJobTriggersService) HybridInspect(name string, googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) *ProjectsLocationsJobTriggersHybridInspectCall { 21094 c := &ProjectsLocationsJobTriggersHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21095 c.name = name 21096 c.googleprivacydlpv2hybridinspectjobtriggerrequest = googleprivacydlpv2hybridinspectjobtriggerrequest 21097 return c 21098} 21099 21100// Fields allows partial responses to be retrieved. See 21101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21102// for more information. 21103func (c *ProjectsLocationsJobTriggersHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersHybridInspectCall { 21104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21105 return c 21106} 21107 21108// Context sets the context to be used in this call's Do method. Any 21109// pending HTTP request will be aborted if the provided context is 21110// canceled. 21111func (c *ProjectsLocationsJobTriggersHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersHybridInspectCall { 21112 c.ctx_ = ctx 21113 return c 21114} 21115 21116// Header returns an http.Header that can be modified by the caller to 21117// add HTTP headers to the request. 21118func (c *ProjectsLocationsJobTriggersHybridInspectCall) Header() http.Header { 21119 if c.header_ == nil { 21120 c.header_ = make(http.Header) 21121 } 21122 return c.header_ 21123} 21124 21125func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (*http.Response, error) { 21126 reqHeaders := make(http.Header) 21127 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21128 for k, v := range c.header_ { 21129 reqHeaders[k] = v 21130 } 21131 reqHeaders.Set("User-Agent", c.s.userAgent()) 21132 var body io.Reader = nil 21133 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectjobtriggerrequest) 21134 if err != nil { 21135 return nil, err 21136 } 21137 reqHeaders.Set("Content-Type", "application/json") 21138 c.urlParams_.Set("alt", alt) 21139 c.urlParams_.Set("prettyPrint", "false") 21140 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:hybridInspect") 21141 urls += "?" + c.urlParams_.Encode() 21142 req, err := http.NewRequest("POST", urls, body) 21143 if err != nil { 21144 return nil, err 21145 } 21146 req.Header = reqHeaders 21147 googleapi.Expand(req.URL, map[string]string{ 21148 "name": c.name, 21149 }) 21150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21151} 21152 21153// Do executes the "dlp.projects.locations.jobTriggers.hybridInspect" call. 21154// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will 21155// be non-nil. Any non-2xx status code is an error. Response headers are 21156// in either 21157// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if 21158// a response was returned at all) in error.(*googleapi.Error).Header. 21159// Use googleapi.IsNotModified to check whether the returned error was 21160// because http.StatusNotModified was returned. 21161func (c *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { 21162 gensupport.SetOptions(c.urlParams_, opts...) 21163 res, err := c.doRequest("json") 21164 if res != nil && res.StatusCode == http.StatusNotModified { 21165 if res.Body != nil { 21166 res.Body.Close() 21167 } 21168 return nil, &googleapi.Error{ 21169 Code: res.StatusCode, 21170 Header: res.Header, 21171 } 21172 } 21173 if err != nil { 21174 return nil, err 21175 } 21176 defer googleapi.CloseBody(res) 21177 if err := googleapi.CheckResponse(res); err != nil { 21178 return nil, err 21179 } 21180 ret := &GooglePrivacyDlpV2HybridInspectResponse{ 21181 ServerResponse: googleapi.ServerResponse{ 21182 Header: res.Header, 21183 HTTPStatusCode: res.StatusCode, 21184 }, 21185 } 21186 target := &ret 21187 if err := gensupport.DecodeResponse(target, res); err != nil { 21188 return nil, err 21189 } 21190 return ret, nil 21191 // { 21192 // "description": "Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages.", 21193 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:hybridInspect", 21194 // "httpMethod": "POST", 21195 // "id": "dlp.projects.locations.jobTriggers.hybridInspect", 21196 // "parameterOrder": [ 21197 // "name" 21198 // ], 21199 // "parameters": { 21200 // "name": { 21201 // "description": "Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21202 // "location": "path", 21203 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21204 // "required": true, 21205 // "type": "string" 21206 // } 21207 // }, 21208 // "path": "v2/{+name}:hybridInspect", 21209 // "request": { 21210 // "$ref": "GooglePrivacyDlpV2HybridInspectJobTriggerRequest" 21211 // }, 21212 // "response": { 21213 // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" 21214 // }, 21215 // "scopes": [ 21216 // "https://www.googleapis.com/auth/cloud-platform" 21217 // ] 21218 // } 21219 21220} 21221 21222// method id "dlp.projects.locations.jobTriggers.list": 21223 21224type ProjectsLocationsJobTriggersListCall struct { 21225 s *Service 21226 parentid string 21227 urlParams_ gensupport.URLParams 21228 ifNoneMatch_ string 21229 ctx_ context.Context 21230 header_ http.Header 21231} 21232 21233// List: Lists job triggers. See 21234// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 21235// more. 21236func (r *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { 21237 c := &ProjectsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21238 c.parentid = parentid 21239 return c 21240} 21241 21242// Filter sets the optional parameter "filter": Allows filtering. 21243// Supported syntax: * Filter expressions are made up of one or more 21244// restrictions. * Restrictions can be combined by `AND` or `OR` logical 21245// operators. A sequence of restrictions implicitly uses `AND`. * A 21246// restriction has the form of `{field} {operator} {value}`. * Supported 21247// fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED 21248// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 21249// 'last_run_time` - RFC 3339 formatted timestamp, surrounded by 21250// quotation marks. Nanoseconds are ignored. - 'error_count' - Number of 21251// errors that have occurred while running. * The operator must be `=` 21252// or `!=` for status and inspected_storage. Examples: * 21253// inspected_storage = cloud_storage AND status = HEALTHY * 21254// inspected_storage = cloud_storage OR inspected_storage = bigquery * 21255// inspected_storage = cloud_storage AND (state = PAUSED OR state = 21256// HEALTHY) * last_run_time > \"2017-12-12T00:00:00+00:00\" The length 21257// of this field should be no more than 500 characters. 21258func (c *ProjectsLocationsJobTriggersListCall) Filter(filter string) *ProjectsLocationsJobTriggersListCall { 21259 c.urlParams_.Set("filter", filter) 21260 return c 21261} 21262 21263// LocationId sets the optional parameter "locationId": Deprecated. This 21264// field has no effect. 21265func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *ProjectsLocationsJobTriggersListCall { 21266 c.urlParams_.Set("locationId", locationId) 21267 return c 21268} 21269 21270// OrderBy sets the optional parameter "orderBy": Comma separated list 21271// of triggeredJob fields to order by, followed by `asc` or `desc` 21272// postfix. This list is case-insensitive, default sorting order is 21273// ascending, redundant space characters are insignificant. Example: 21274// `name asc,update_time, create_time desc` Supported fields are: - 21275// `create_time`: corresponds to time the JobTrigger was created. - 21276// `update_time`: corresponds to time the JobTrigger was last updated. - 21277// `last_run_time`: corresponds to the last time the JobTrigger ran. - 21278// `name`: corresponds to JobTrigger's name. - `display_name`: 21279// corresponds to JobTrigger's display name. - `status`: corresponds to 21280// JobTrigger's status. 21281func (c *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { 21282 c.urlParams_.Set("orderBy", orderBy) 21283 return c 21284} 21285 21286// PageSize sets the optional parameter "pageSize": Size of the page, 21287// can be limited by a server. 21288func (c *ProjectsLocationsJobTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsJobTriggersListCall { 21289 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21290 return c 21291} 21292 21293// PageToken sets the optional parameter "pageToken": Page token to 21294// continue retrieval. Comes from previous call to ListJobTriggers. 21295// `order_by` field must not change for subsequent calls. 21296func (c *ProjectsLocationsJobTriggersListCall) PageToken(pageToken string) *ProjectsLocationsJobTriggersListCall { 21297 c.urlParams_.Set("pageToken", pageToken) 21298 return c 21299} 21300 21301// Fields allows partial responses to be retrieved. See 21302// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21303// for more information. 21304func (c *ProjectsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersListCall { 21305 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21306 return c 21307} 21308 21309// IfNoneMatch sets the optional parameter which makes the operation 21310// fail if the object's ETag matches the given value. This is useful for 21311// getting updates only after the object has changed since the last 21312// request. Use googleapi.IsNotModified to check whether the response 21313// error from Do is the result of In-None-Match. 21314func (c *ProjectsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersListCall { 21315 c.ifNoneMatch_ = entityTag 21316 return c 21317} 21318 21319// Context sets the context to be used in this call's Do method. Any 21320// pending HTTP request will be aborted if the provided context is 21321// canceled. 21322func (c *ProjectsLocationsJobTriggersListCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersListCall { 21323 c.ctx_ = ctx 21324 return c 21325} 21326 21327// Header returns an http.Header that can be modified by the caller to 21328// add HTTP headers to the request. 21329func (c *ProjectsLocationsJobTriggersListCall) Header() http.Header { 21330 if c.header_ == nil { 21331 c.header_ = make(http.Header) 21332 } 21333 return c.header_ 21334} 21335 21336func (c *ProjectsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { 21337 reqHeaders := make(http.Header) 21338 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21339 for k, v := range c.header_ { 21340 reqHeaders[k] = v 21341 } 21342 reqHeaders.Set("User-Agent", c.s.userAgent()) 21343 if c.ifNoneMatch_ != "" { 21344 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21345 } 21346 var body io.Reader = nil 21347 c.urlParams_.Set("alt", alt) 21348 c.urlParams_.Set("prettyPrint", "false") 21349 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 21350 urls += "?" + c.urlParams_.Encode() 21351 req, err := http.NewRequest("GET", urls, body) 21352 if err != nil { 21353 return nil, err 21354 } 21355 req.Header = reqHeaders 21356 googleapi.Expand(req.URL, map[string]string{ 21357 "parent": c.parentid, 21358 }) 21359 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21360} 21361 21362// Do executes the "dlp.projects.locations.jobTriggers.list" call. 21363// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error 21364// will be non-nil. Any non-2xx status code is an error. Response 21365// headers are in either 21366// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or 21367// (if a response was returned at all) in 21368// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21369// whether the returned error was because http.StatusNotModified was 21370// returned. 21371func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { 21372 gensupport.SetOptions(c.urlParams_, opts...) 21373 res, err := c.doRequest("json") 21374 if res != nil && res.StatusCode == http.StatusNotModified { 21375 if res.Body != nil { 21376 res.Body.Close() 21377 } 21378 return nil, &googleapi.Error{ 21379 Code: res.StatusCode, 21380 Header: res.Header, 21381 } 21382 } 21383 if err != nil { 21384 return nil, err 21385 } 21386 defer googleapi.CloseBody(res) 21387 if err := googleapi.CheckResponse(res); err != nil { 21388 return nil, err 21389 } 21390 ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ 21391 ServerResponse: googleapi.ServerResponse{ 21392 Header: res.Header, 21393 HTTPStatusCode: res.StatusCode, 21394 }, 21395 } 21396 target := &ret 21397 if err := gensupport.DecodeResponse(target, res); err != nil { 21398 return nil, err 21399 } 21400 return ret, nil 21401 // { 21402 // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21403 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", 21404 // "httpMethod": "GET", 21405 // "id": "dlp.projects.locations.jobTriggers.list", 21406 // "parameterOrder": [ 21407 // "parent" 21408 // ], 21409 // "parameters": { 21410 // "filter": { 21411 // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", 21412 // "location": "query", 21413 // "type": "string" 21414 // }, 21415 // "locationId": { 21416 // "description": "Deprecated. This field has no effect.", 21417 // "location": "query", 21418 // "type": "string" 21419 // }, 21420 // "orderBy": { 21421 // "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.", 21422 // "location": "query", 21423 // "type": "string" 21424 // }, 21425 // "pageSize": { 21426 // "description": "Size of the page, can be limited by a server.", 21427 // "format": "int32", 21428 // "location": "query", 21429 // "type": "integer" 21430 // }, 21431 // "pageToken": { 21432 // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", 21433 // "location": "query", 21434 // "type": "string" 21435 // }, 21436 // "parent": { 21437 // "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", 21438 // "location": "path", 21439 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21440 // "required": true, 21441 // "type": "string" 21442 // } 21443 // }, 21444 // "path": "v2/{+parent}/jobTriggers", 21445 // "response": { 21446 // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" 21447 // }, 21448 // "scopes": [ 21449 // "https://www.googleapis.com/auth/cloud-platform" 21450 // ] 21451 // } 21452 21453} 21454 21455// Pages invokes f for each page of results. 21456// A non-nil error returned from f will halt the iteration. 21457// The provided context supersedes any context provided to the Context method. 21458func (c *ProjectsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { 21459 c.ctx_ = ctx 21460 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21461 for { 21462 x, err := c.Do() 21463 if err != nil { 21464 return err 21465 } 21466 if err := f(x); err != nil { 21467 return err 21468 } 21469 if x.NextPageToken == "" { 21470 return nil 21471 } 21472 c.PageToken(x.NextPageToken) 21473 } 21474} 21475 21476// method id "dlp.projects.locations.jobTriggers.patch": 21477 21478type ProjectsLocationsJobTriggersPatchCall struct { 21479 s *Service 21480 name string 21481 googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 21482 urlParams_ gensupport.URLParams 21483 ctx_ context.Context 21484 header_ http.Header 21485} 21486 21487// Patch: Updates a job trigger. See 21488// https://cloud.google.com/dlp/docs/creating-job-triggers to learn 21489// more. 21490func (r *ProjectsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsLocationsJobTriggersPatchCall { 21491 c := &ProjectsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21492 c.name = name 21493 c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest 21494 return c 21495} 21496 21497// Fields allows partial responses to be retrieved. See 21498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21499// for more information. 21500func (c *ProjectsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersPatchCall { 21501 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21502 return c 21503} 21504 21505// Context sets the context to be used in this call's Do method. Any 21506// pending HTTP request will be aborted if the provided context is 21507// canceled. 21508func (c *ProjectsLocationsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersPatchCall { 21509 c.ctx_ = ctx 21510 return c 21511} 21512 21513// Header returns an http.Header that can be modified by the caller to 21514// add HTTP headers to the request. 21515func (c *ProjectsLocationsJobTriggersPatchCall) Header() http.Header { 21516 if c.header_ == nil { 21517 c.header_ = make(http.Header) 21518 } 21519 return c.header_ 21520} 21521 21522func (c *ProjectsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 21523 reqHeaders := make(http.Header) 21524 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21525 for k, v := range c.header_ { 21526 reqHeaders[k] = v 21527 } 21528 reqHeaders.Set("User-Agent", c.s.userAgent()) 21529 var body io.Reader = nil 21530 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) 21531 if err != nil { 21532 return nil, err 21533 } 21534 reqHeaders.Set("Content-Type", "application/json") 21535 c.urlParams_.Set("alt", alt) 21536 c.urlParams_.Set("prettyPrint", "false") 21537 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21538 urls += "?" + c.urlParams_.Encode() 21539 req, err := http.NewRequest("PATCH", urls, body) 21540 if err != nil { 21541 return nil, err 21542 } 21543 req.Header = reqHeaders 21544 googleapi.Expand(req.URL, map[string]string{ 21545 "name": c.name, 21546 }) 21547 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21548} 21549 21550// Do executes the "dlp.projects.locations.jobTriggers.patch" call. 21551// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be 21552// non-nil. Any non-2xx status code is an error. Response headers are in 21553// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a 21554// response was returned at all) in error.(*googleapi.Error).Header. Use 21555// googleapi.IsNotModified to check whether the returned error was 21556// because http.StatusNotModified was returned. 21557func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { 21558 gensupport.SetOptions(c.urlParams_, opts...) 21559 res, err := c.doRequest("json") 21560 if res != nil && res.StatusCode == http.StatusNotModified { 21561 if res.Body != nil { 21562 res.Body.Close() 21563 } 21564 return nil, &googleapi.Error{ 21565 Code: res.StatusCode, 21566 Header: res.Header, 21567 } 21568 } 21569 if err != nil { 21570 return nil, err 21571 } 21572 defer googleapi.CloseBody(res) 21573 if err := googleapi.CheckResponse(res); err != nil { 21574 return nil, err 21575 } 21576 ret := &GooglePrivacyDlpV2JobTrigger{ 21577 ServerResponse: googleapi.ServerResponse{ 21578 Header: res.Header, 21579 HTTPStatusCode: res.StatusCode, 21580 }, 21581 } 21582 target := &ret 21583 if err := gensupport.DecodeResponse(target, res); err != nil { 21584 return nil, err 21585 } 21586 return ret, nil 21587 // { 21588 // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", 21589 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", 21590 // "httpMethod": "PATCH", 21591 // "id": "dlp.projects.locations.jobTriggers.patch", 21592 // "parameterOrder": [ 21593 // "name" 21594 // ], 21595 // "parameters": { 21596 // "name": { 21597 // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", 21598 // "location": "path", 21599 // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", 21600 // "required": true, 21601 // "type": "string" 21602 // } 21603 // }, 21604 // "path": "v2/{+name}", 21605 // "request": { 21606 // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" 21607 // }, 21608 // "response": { 21609 // "$ref": "GooglePrivacyDlpV2JobTrigger" 21610 // }, 21611 // "scopes": [ 21612 // "https://www.googleapis.com/auth/cloud-platform" 21613 // ] 21614 // } 21615 21616} 21617 21618// method id "dlp.projects.locations.storedInfoTypes.create": 21619 21620type ProjectsLocationsStoredInfoTypesCreateCall struct { 21621 s *Service 21622 parentid string 21623 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 21624 urlParams_ gensupport.URLParams 21625 ctx_ context.Context 21626 header_ http.Header 21627} 21628 21629// Create: Creates a pre-built stored infoType to be used for 21630// inspection. See 21631// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21632// more. 21633func (r *ProjectsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesCreateCall { 21634 c := &ProjectsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21635 c.parentid = parentid 21636 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 21637 return c 21638} 21639 21640// Fields allows partial responses to be retrieved. See 21641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21642// for more information. 21643func (c *ProjectsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesCreateCall { 21644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21645 return c 21646} 21647 21648// Context sets the context to be used in this call's Do method. Any 21649// pending HTTP request will be aborted if the provided context is 21650// canceled. 21651func (c *ProjectsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesCreateCall { 21652 c.ctx_ = ctx 21653 return c 21654} 21655 21656// Header returns an http.Header that can be modified by the caller to 21657// add HTTP headers to the request. 21658func (c *ProjectsLocationsStoredInfoTypesCreateCall) Header() http.Header { 21659 if c.header_ == nil { 21660 c.header_ = make(http.Header) 21661 } 21662 return c.header_ 21663} 21664 21665func (c *ProjectsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 21666 reqHeaders := make(http.Header) 21667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21668 for k, v := range c.header_ { 21669 reqHeaders[k] = v 21670 } 21671 reqHeaders.Set("User-Agent", c.s.userAgent()) 21672 var body io.Reader = nil 21673 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 21674 if err != nil { 21675 return nil, err 21676 } 21677 reqHeaders.Set("Content-Type", "application/json") 21678 c.urlParams_.Set("alt", alt) 21679 c.urlParams_.Set("prettyPrint", "false") 21680 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 21681 urls += "?" + c.urlParams_.Encode() 21682 req, err := http.NewRequest("POST", urls, body) 21683 if err != nil { 21684 return nil, err 21685 } 21686 req.Header = reqHeaders 21687 googleapi.Expand(req.URL, map[string]string{ 21688 "parent": c.parentid, 21689 }) 21690 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21691} 21692 21693// Do executes the "dlp.projects.locations.storedInfoTypes.create" call. 21694// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 21695// non-nil. Any non-2xx status code is an error. Response headers are in 21696// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 21697// a response was returned at all) in error.(*googleapi.Error).Header. 21698// Use googleapi.IsNotModified to check whether the returned error was 21699// because http.StatusNotModified was returned. 21700func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 21701 gensupport.SetOptions(c.urlParams_, opts...) 21702 res, err := c.doRequest("json") 21703 if res != nil && res.StatusCode == http.StatusNotModified { 21704 if res.Body != nil { 21705 res.Body.Close() 21706 } 21707 return nil, &googleapi.Error{ 21708 Code: res.StatusCode, 21709 Header: res.Header, 21710 } 21711 } 21712 if err != nil { 21713 return nil, err 21714 } 21715 defer googleapi.CloseBody(res) 21716 if err := googleapi.CheckResponse(res); err != nil { 21717 return nil, err 21718 } 21719 ret := &GooglePrivacyDlpV2StoredInfoType{ 21720 ServerResponse: googleapi.ServerResponse{ 21721 Header: res.Header, 21722 HTTPStatusCode: res.StatusCode, 21723 }, 21724 } 21725 target := &ret 21726 if err := gensupport.DecodeResponse(target, res); err != nil { 21727 return nil, err 21728 } 21729 return ret, nil 21730 // { 21731 // "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.", 21732 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 21733 // "httpMethod": "POST", 21734 // "id": "dlp.projects.locations.storedInfoTypes.create", 21735 // "parameterOrder": [ 21736 // "parent" 21737 // ], 21738 // "parameters": { 21739 // "parent": { 21740 // "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", 21741 // "location": "path", 21742 // "pattern": "^projects/[^/]+/locations/[^/]+$", 21743 // "required": true, 21744 // "type": "string" 21745 // } 21746 // }, 21747 // "path": "v2/{+parent}/storedInfoTypes", 21748 // "request": { 21749 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 21750 // }, 21751 // "response": { 21752 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 21753 // }, 21754 // "scopes": [ 21755 // "https://www.googleapis.com/auth/cloud-platform" 21756 // ] 21757 // } 21758 21759} 21760 21761// method id "dlp.projects.locations.storedInfoTypes.delete": 21762 21763type ProjectsLocationsStoredInfoTypesDeleteCall struct { 21764 s *Service 21765 name string 21766 urlParams_ gensupport.URLParams 21767 ctx_ context.Context 21768 header_ http.Header 21769} 21770 21771// Delete: Deletes a stored infoType. See 21772// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21773// more. 21774func (r *ProjectsLocationsStoredInfoTypesService) Delete(name string) *ProjectsLocationsStoredInfoTypesDeleteCall { 21775 c := &ProjectsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21776 c.name = name 21777 return c 21778} 21779 21780// Fields allows partial responses to be retrieved. See 21781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21782// for more information. 21783func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesDeleteCall { 21784 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21785 return c 21786} 21787 21788// Context sets the context to be used in this call's Do method. Any 21789// pending HTTP request will be aborted if the provided context is 21790// canceled. 21791func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesDeleteCall { 21792 c.ctx_ = ctx 21793 return c 21794} 21795 21796// Header returns an http.Header that can be modified by the caller to 21797// add HTTP headers to the request. 21798func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Header() http.Header { 21799 if c.header_ == nil { 21800 c.header_ = make(http.Header) 21801 } 21802 return c.header_ 21803} 21804 21805func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 21806 reqHeaders := make(http.Header) 21807 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21808 for k, v := range c.header_ { 21809 reqHeaders[k] = v 21810 } 21811 reqHeaders.Set("User-Agent", c.s.userAgent()) 21812 var body io.Reader = nil 21813 c.urlParams_.Set("alt", alt) 21814 c.urlParams_.Set("prettyPrint", "false") 21815 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21816 urls += "?" + c.urlParams_.Encode() 21817 req, err := http.NewRequest("DELETE", urls, body) 21818 if err != nil { 21819 return nil, err 21820 } 21821 req.Header = reqHeaders 21822 googleapi.Expand(req.URL, map[string]string{ 21823 "name": c.name, 21824 }) 21825 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21826} 21827 21828// Do executes the "dlp.projects.locations.storedInfoTypes.delete" call. 21829// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 21830// non-2xx status code is an error. Response headers are in either 21831// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 21832// returned at all) in error.(*googleapi.Error).Header. Use 21833// googleapi.IsNotModified to check whether the returned error was 21834// because http.StatusNotModified was returned. 21835func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 21836 gensupport.SetOptions(c.urlParams_, opts...) 21837 res, err := c.doRequest("json") 21838 if res != nil && res.StatusCode == http.StatusNotModified { 21839 if res.Body != nil { 21840 res.Body.Close() 21841 } 21842 return nil, &googleapi.Error{ 21843 Code: res.StatusCode, 21844 Header: res.Header, 21845 } 21846 } 21847 if err != nil { 21848 return nil, err 21849 } 21850 defer googleapi.CloseBody(res) 21851 if err := googleapi.CheckResponse(res); err != nil { 21852 return nil, err 21853 } 21854 ret := &GoogleProtobufEmpty{ 21855 ServerResponse: googleapi.ServerResponse{ 21856 Header: res.Header, 21857 HTTPStatusCode: res.StatusCode, 21858 }, 21859 } 21860 target := &ret 21861 if err := gensupport.DecodeResponse(target, res); err != nil { 21862 return nil, err 21863 } 21864 return ret, nil 21865 // { 21866 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 21867 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 21868 // "httpMethod": "DELETE", 21869 // "id": "dlp.projects.locations.storedInfoTypes.delete", 21870 // "parameterOrder": [ 21871 // "name" 21872 // ], 21873 // "parameters": { 21874 // "name": { 21875 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 21876 // "location": "path", 21877 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 21878 // "required": true, 21879 // "type": "string" 21880 // } 21881 // }, 21882 // "path": "v2/{+name}", 21883 // "response": { 21884 // "$ref": "GoogleProtobufEmpty" 21885 // }, 21886 // "scopes": [ 21887 // "https://www.googleapis.com/auth/cloud-platform" 21888 // ] 21889 // } 21890 21891} 21892 21893// method id "dlp.projects.locations.storedInfoTypes.get": 21894 21895type ProjectsLocationsStoredInfoTypesGetCall struct { 21896 s *Service 21897 name string 21898 urlParams_ gensupport.URLParams 21899 ifNoneMatch_ string 21900 ctx_ context.Context 21901 header_ http.Header 21902} 21903 21904// Get: Gets a stored infoType. See 21905// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 21906// more. 21907func (r *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLocationsStoredInfoTypesGetCall { 21908 c := &ProjectsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21909 c.name = name 21910 return c 21911} 21912 21913// Fields allows partial responses to be retrieved. See 21914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21915// for more information. 21916func (c *ProjectsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesGetCall { 21917 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21918 return c 21919} 21920 21921// IfNoneMatch sets the optional parameter which makes the operation 21922// fail if the object's ETag matches the given value. This is useful for 21923// getting updates only after the object has changed since the last 21924// request. Use googleapi.IsNotModified to check whether the response 21925// error from Do is the result of In-None-Match. 21926func (c *ProjectsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesGetCall { 21927 c.ifNoneMatch_ = entityTag 21928 return c 21929} 21930 21931// Context sets the context to be used in this call's Do method. Any 21932// pending HTTP request will be aborted if the provided context is 21933// canceled. 21934func (c *ProjectsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesGetCall { 21935 c.ctx_ = ctx 21936 return c 21937} 21938 21939// Header returns an http.Header that can be modified by the caller to 21940// add HTTP headers to the request. 21941func (c *ProjectsLocationsStoredInfoTypesGetCall) Header() http.Header { 21942 if c.header_ == nil { 21943 c.header_ = make(http.Header) 21944 } 21945 return c.header_ 21946} 21947 21948func (c *ProjectsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 21949 reqHeaders := make(http.Header) 21950 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 21951 for k, v := range c.header_ { 21952 reqHeaders[k] = v 21953 } 21954 reqHeaders.Set("User-Agent", c.s.userAgent()) 21955 if c.ifNoneMatch_ != "" { 21956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21957 } 21958 var body io.Reader = nil 21959 c.urlParams_.Set("alt", alt) 21960 c.urlParams_.Set("prettyPrint", "false") 21961 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 21962 urls += "?" + c.urlParams_.Encode() 21963 req, err := http.NewRequest("GET", urls, body) 21964 if err != nil { 21965 return nil, err 21966 } 21967 req.Header = reqHeaders 21968 googleapi.Expand(req.URL, map[string]string{ 21969 "name": c.name, 21970 }) 21971 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21972} 21973 21974// Do executes the "dlp.projects.locations.storedInfoTypes.get" call. 21975// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 21976// non-nil. Any non-2xx status code is an error. Response headers are in 21977// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 21978// a response was returned at all) in error.(*googleapi.Error).Header. 21979// Use googleapi.IsNotModified to check whether the returned error was 21980// because http.StatusNotModified was returned. 21981func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 21982 gensupport.SetOptions(c.urlParams_, opts...) 21983 res, err := c.doRequest("json") 21984 if res != nil && res.StatusCode == http.StatusNotModified { 21985 if res.Body != nil { 21986 res.Body.Close() 21987 } 21988 return nil, &googleapi.Error{ 21989 Code: res.StatusCode, 21990 Header: res.Header, 21991 } 21992 } 21993 if err != nil { 21994 return nil, err 21995 } 21996 defer googleapi.CloseBody(res) 21997 if err := googleapi.CheckResponse(res); err != nil { 21998 return nil, err 21999 } 22000 ret := &GooglePrivacyDlpV2StoredInfoType{ 22001 ServerResponse: googleapi.ServerResponse{ 22002 Header: res.Header, 22003 HTTPStatusCode: res.StatusCode, 22004 }, 22005 } 22006 target := &ret 22007 if err := gensupport.DecodeResponse(target, res); err != nil { 22008 return nil, err 22009 } 22010 return ret, nil 22011 // { 22012 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22013 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 22014 // "httpMethod": "GET", 22015 // "id": "dlp.projects.locations.storedInfoTypes.get", 22016 // "parameterOrder": [ 22017 // "name" 22018 // ], 22019 // "parameters": { 22020 // "name": { 22021 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22022 // "location": "path", 22023 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 22024 // "required": true, 22025 // "type": "string" 22026 // } 22027 // }, 22028 // "path": "v2/{+name}", 22029 // "response": { 22030 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22031 // }, 22032 // "scopes": [ 22033 // "https://www.googleapis.com/auth/cloud-platform" 22034 // ] 22035 // } 22036 22037} 22038 22039// method id "dlp.projects.locations.storedInfoTypes.list": 22040 22041type ProjectsLocationsStoredInfoTypesListCall struct { 22042 s *Service 22043 parentid string 22044 urlParams_ gensupport.URLParams 22045 ifNoneMatch_ string 22046 ctx_ context.Context 22047 header_ http.Header 22048} 22049 22050// List: Lists stored infoTypes. See 22051// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22052// more. 22053func (r *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { 22054 c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22055 c.parentid = parentid 22056 return c 22057} 22058 22059// LocationId sets the optional parameter "locationId": Deprecated. This 22060// field has no effect. 22061func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsLocationsStoredInfoTypesListCall { 22062 c.urlParams_.Set("locationId", locationId) 22063 return c 22064} 22065 22066// OrderBy sets the optional parameter "orderBy": Comma separated list 22067// of fields to order by, followed by `asc` or `desc` postfix. This list 22068// is case-insensitive, default sorting order is ascending, redundant 22069// space characters are insignificant. Example: `name asc, display_name, 22070// create_time desc` Supported fields are: - `create_time`: corresponds 22071// to time the most recent version of the resource was created. - 22072// `state`: corresponds to the state of the resource. - `name`: 22073// corresponds to resource name. - `display_name`: corresponds to info 22074// type's display name. 22075func (c *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsLocationsStoredInfoTypesListCall { 22076 c.urlParams_.Set("orderBy", orderBy) 22077 return c 22078} 22079 22080// PageSize sets the optional parameter "pageSize": Size of the page, 22081// can be limited by server. If zero server returns a page of max size 22082// 100. 22083func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { 22084 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22085 return c 22086} 22087 22088// PageToken sets the optional parameter "pageToken": Page token to 22089// continue retrieval. Comes from previous call to 22090// `ListStoredInfoTypes`. 22091func (c *ProjectsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsLocationsStoredInfoTypesListCall { 22092 c.urlParams_.Set("pageToken", pageToken) 22093 return c 22094} 22095 22096// Fields allows partial responses to be retrieved. See 22097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22098// for more information. 22099func (c *ProjectsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesListCall { 22100 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22101 return c 22102} 22103 22104// IfNoneMatch sets the optional parameter which makes the operation 22105// fail if the object's ETag matches the given value. This is useful for 22106// getting updates only after the object has changed since the last 22107// request. Use googleapi.IsNotModified to check whether the response 22108// error from Do is the result of In-None-Match. 22109func (c *ProjectsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesListCall { 22110 c.ifNoneMatch_ = entityTag 22111 return c 22112} 22113 22114// Context sets the context to be used in this call's Do method. Any 22115// pending HTTP request will be aborted if the provided context is 22116// canceled. 22117func (c *ProjectsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesListCall { 22118 c.ctx_ = ctx 22119 return c 22120} 22121 22122// Header returns an http.Header that can be modified by the caller to 22123// add HTTP headers to the request. 22124func (c *ProjectsLocationsStoredInfoTypesListCall) Header() http.Header { 22125 if c.header_ == nil { 22126 c.header_ = make(http.Header) 22127 } 22128 return c.header_ 22129} 22130 22131func (c *ProjectsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 22132 reqHeaders := make(http.Header) 22133 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22134 for k, v := range c.header_ { 22135 reqHeaders[k] = v 22136 } 22137 reqHeaders.Set("User-Agent", c.s.userAgent()) 22138 if c.ifNoneMatch_ != "" { 22139 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22140 } 22141 var body io.Reader = nil 22142 c.urlParams_.Set("alt", alt) 22143 c.urlParams_.Set("prettyPrint", "false") 22144 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22145 urls += "?" + c.urlParams_.Encode() 22146 req, err := http.NewRequest("GET", urls, body) 22147 if err != nil { 22148 return nil, err 22149 } 22150 req.Header = reqHeaders 22151 googleapi.Expand(req.URL, map[string]string{ 22152 "parent": c.parentid, 22153 }) 22154 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22155} 22156 22157// Do executes the "dlp.projects.locations.storedInfoTypes.list" call. 22158// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 22159// error will be non-nil. Any non-2xx status code is an error. Response 22160// headers are in either 22161// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 22162// or (if a response was returned at all) in 22163// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22164// whether the returned error was because http.StatusNotModified was 22165// returned. 22166func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 22167 gensupport.SetOptions(c.urlParams_, opts...) 22168 res, err := c.doRequest("json") 22169 if res != nil && res.StatusCode == http.StatusNotModified { 22170 if res.Body != nil { 22171 res.Body.Close() 22172 } 22173 return nil, &googleapi.Error{ 22174 Code: res.StatusCode, 22175 Header: res.Header, 22176 } 22177 } 22178 if err != nil { 22179 return nil, err 22180 } 22181 defer googleapi.CloseBody(res) 22182 if err := googleapi.CheckResponse(res); err != nil { 22183 return nil, err 22184 } 22185 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 22186 ServerResponse: googleapi.ServerResponse{ 22187 Header: res.Header, 22188 HTTPStatusCode: res.StatusCode, 22189 }, 22190 } 22191 target := &ret 22192 if err := gensupport.DecodeResponse(target, res); err != nil { 22193 return nil, err 22194 } 22195 return ret, nil 22196 // { 22197 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22198 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", 22199 // "httpMethod": "GET", 22200 // "id": "dlp.projects.locations.storedInfoTypes.list", 22201 // "parameterOrder": [ 22202 // "parent" 22203 // ], 22204 // "parameters": { 22205 // "locationId": { 22206 // "description": "Deprecated. This field has no effect.", 22207 // "location": "query", 22208 // "type": "string" 22209 // }, 22210 // "orderBy": { 22211 // "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.", 22212 // "location": "query", 22213 // "type": "string" 22214 // }, 22215 // "pageSize": { 22216 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 22217 // "format": "int32", 22218 // "location": "query", 22219 // "type": "integer" 22220 // }, 22221 // "pageToken": { 22222 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 22223 // "location": "query", 22224 // "type": "string" 22225 // }, 22226 // "parent": { 22227 // "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", 22228 // "location": "path", 22229 // "pattern": "^projects/[^/]+/locations/[^/]+$", 22230 // "required": true, 22231 // "type": "string" 22232 // } 22233 // }, 22234 // "path": "v2/{+parent}/storedInfoTypes", 22235 // "response": { 22236 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 22237 // }, 22238 // "scopes": [ 22239 // "https://www.googleapis.com/auth/cloud-platform" 22240 // ] 22241 // } 22242 22243} 22244 22245// Pages invokes f for each page of results. 22246// A non-nil error returned from f will halt the iteration. 22247// The provided context supersedes any context provided to the Context method. 22248func (c *ProjectsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 22249 c.ctx_ = ctx 22250 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22251 for { 22252 x, err := c.Do() 22253 if err != nil { 22254 return err 22255 } 22256 if err := f(x); err != nil { 22257 return err 22258 } 22259 if x.NextPageToken == "" { 22260 return nil 22261 } 22262 c.PageToken(x.NextPageToken) 22263 } 22264} 22265 22266// method id "dlp.projects.locations.storedInfoTypes.patch": 22267 22268type ProjectsLocationsStoredInfoTypesPatchCall struct { 22269 s *Service 22270 name string 22271 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 22272 urlParams_ gensupport.URLParams 22273 ctx_ context.Context 22274 header_ http.Header 22275} 22276 22277// Patch: Updates the stored infoType by creating a new version. The 22278// existing version will continue to be used until the new version is 22279// ready. See 22280// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22281// more. 22282func (r *ProjectsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesPatchCall { 22283 c := &ProjectsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22284 c.name = name 22285 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 22286 return c 22287} 22288 22289// Fields allows partial responses to be retrieved. See 22290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22291// for more information. 22292func (c *ProjectsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesPatchCall { 22293 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22294 return c 22295} 22296 22297// Context sets the context to be used in this call's Do method. Any 22298// pending HTTP request will be aborted if the provided context is 22299// canceled. 22300func (c *ProjectsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesPatchCall { 22301 c.ctx_ = ctx 22302 return c 22303} 22304 22305// Header returns an http.Header that can be modified by the caller to 22306// add HTTP headers to the request. 22307func (c *ProjectsLocationsStoredInfoTypesPatchCall) Header() http.Header { 22308 if c.header_ == nil { 22309 c.header_ = make(http.Header) 22310 } 22311 return c.header_ 22312} 22313 22314func (c *ProjectsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 22315 reqHeaders := make(http.Header) 22316 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22317 for k, v := range c.header_ { 22318 reqHeaders[k] = v 22319 } 22320 reqHeaders.Set("User-Agent", c.s.userAgent()) 22321 var body io.Reader = nil 22322 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 22323 if err != nil { 22324 return nil, err 22325 } 22326 reqHeaders.Set("Content-Type", "application/json") 22327 c.urlParams_.Set("alt", alt) 22328 c.urlParams_.Set("prettyPrint", "false") 22329 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22330 urls += "?" + c.urlParams_.Encode() 22331 req, err := http.NewRequest("PATCH", urls, body) 22332 if err != nil { 22333 return nil, err 22334 } 22335 req.Header = reqHeaders 22336 googleapi.Expand(req.URL, map[string]string{ 22337 "name": c.name, 22338 }) 22339 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22340} 22341 22342// Do executes the "dlp.projects.locations.storedInfoTypes.patch" call. 22343// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22344// non-nil. Any non-2xx status code is an error. Response headers are in 22345// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22346// a response was returned at all) in error.(*googleapi.Error).Header. 22347// Use googleapi.IsNotModified to check whether the returned error was 22348// because http.StatusNotModified was returned. 22349func (c *ProjectsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22350 gensupport.SetOptions(c.urlParams_, opts...) 22351 res, err := c.doRequest("json") 22352 if res != nil && res.StatusCode == http.StatusNotModified { 22353 if res.Body != nil { 22354 res.Body.Close() 22355 } 22356 return nil, &googleapi.Error{ 22357 Code: res.StatusCode, 22358 Header: res.Header, 22359 } 22360 } 22361 if err != nil { 22362 return nil, err 22363 } 22364 defer googleapi.CloseBody(res) 22365 if err := googleapi.CheckResponse(res); err != nil { 22366 return nil, err 22367 } 22368 ret := &GooglePrivacyDlpV2StoredInfoType{ 22369 ServerResponse: googleapi.ServerResponse{ 22370 Header: res.Header, 22371 HTTPStatusCode: res.StatusCode, 22372 }, 22373 } 22374 target := &ret 22375 if err := gensupport.DecodeResponse(target, res); err != nil { 22376 return nil, err 22377 } 22378 return ret, nil 22379 // { 22380 // "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.", 22381 // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", 22382 // "httpMethod": "PATCH", 22383 // "id": "dlp.projects.locations.storedInfoTypes.patch", 22384 // "parameterOrder": [ 22385 // "name" 22386 // ], 22387 // "parameters": { 22388 // "name": { 22389 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22390 // "location": "path", 22391 // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", 22392 // "required": true, 22393 // "type": "string" 22394 // } 22395 // }, 22396 // "path": "v2/{+name}", 22397 // "request": { 22398 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 22399 // }, 22400 // "response": { 22401 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22402 // }, 22403 // "scopes": [ 22404 // "https://www.googleapis.com/auth/cloud-platform" 22405 // ] 22406 // } 22407 22408} 22409 22410// method id "dlp.projects.storedInfoTypes.create": 22411 22412type ProjectsStoredInfoTypesCreateCall struct { 22413 s *Service 22414 parentid string 22415 googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest 22416 urlParams_ gensupport.URLParams 22417 ctx_ context.Context 22418 header_ http.Header 22419} 22420 22421// Create: Creates a pre-built stored infoType to be used for 22422// inspection. See 22423// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22424// more. 22425func (r *ProjectsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsStoredInfoTypesCreateCall { 22426 c := &ProjectsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22427 c.parentid = parentid 22428 c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest 22429 return c 22430} 22431 22432// Fields allows partial responses to be retrieved. See 22433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22434// for more information. 22435func (c *ProjectsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesCreateCall { 22436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22437 return c 22438} 22439 22440// Context sets the context to be used in this call's Do method. Any 22441// pending HTTP request will be aborted if the provided context is 22442// canceled. 22443func (c *ProjectsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsStoredInfoTypesCreateCall { 22444 c.ctx_ = ctx 22445 return c 22446} 22447 22448// Header returns an http.Header that can be modified by the caller to 22449// add HTTP headers to the request. 22450func (c *ProjectsStoredInfoTypesCreateCall) Header() http.Header { 22451 if c.header_ == nil { 22452 c.header_ = make(http.Header) 22453 } 22454 return c.header_ 22455} 22456 22457func (c *ProjectsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { 22458 reqHeaders := make(http.Header) 22459 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22460 for k, v := range c.header_ { 22461 reqHeaders[k] = v 22462 } 22463 reqHeaders.Set("User-Agent", c.s.userAgent()) 22464 var body io.Reader = nil 22465 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) 22466 if err != nil { 22467 return nil, err 22468 } 22469 reqHeaders.Set("Content-Type", "application/json") 22470 c.urlParams_.Set("alt", alt) 22471 c.urlParams_.Set("prettyPrint", "false") 22472 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22473 urls += "?" + c.urlParams_.Encode() 22474 req, err := http.NewRequest("POST", urls, body) 22475 if err != nil { 22476 return nil, err 22477 } 22478 req.Header = reqHeaders 22479 googleapi.Expand(req.URL, map[string]string{ 22480 "parent": c.parentid, 22481 }) 22482 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22483} 22484 22485// Do executes the "dlp.projects.storedInfoTypes.create" call. 22486// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22487// non-nil. Any non-2xx status code is an error. Response headers are in 22488// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22489// a response was returned at all) in error.(*googleapi.Error).Header. 22490// Use googleapi.IsNotModified to check whether the returned error was 22491// because http.StatusNotModified was returned. 22492func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22493 gensupport.SetOptions(c.urlParams_, opts...) 22494 res, err := c.doRequest("json") 22495 if res != nil && res.StatusCode == http.StatusNotModified { 22496 if res.Body != nil { 22497 res.Body.Close() 22498 } 22499 return nil, &googleapi.Error{ 22500 Code: res.StatusCode, 22501 Header: res.Header, 22502 } 22503 } 22504 if err != nil { 22505 return nil, err 22506 } 22507 defer googleapi.CloseBody(res) 22508 if err := googleapi.CheckResponse(res); err != nil { 22509 return nil, err 22510 } 22511 ret := &GooglePrivacyDlpV2StoredInfoType{ 22512 ServerResponse: googleapi.ServerResponse{ 22513 Header: res.Header, 22514 HTTPStatusCode: res.StatusCode, 22515 }, 22516 } 22517 target := &ret 22518 if err := gensupport.DecodeResponse(target, res); err != nil { 22519 return nil, err 22520 } 22521 return ret, nil 22522 // { 22523 // "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.", 22524 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 22525 // "httpMethod": "POST", 22526 // "id": "dlp.projects.storedInfoTypes.create", 22527 // "parameterOrder": [ 22528 // "parent" 22529 // ], 22530 // "parameters": { 22531 // "parent": { 22532 // "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", 22533 // "location": "path", 22534 // "pattern": "^projects/[^/]+$", 22535 // "required": true, 22536 // "type": "string" 22537 // } 22538 // }, 22539 // "path": "v2/{+parent}/storedInfoTypes", 22540 // "request": { 22541 // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" 22542 // }, 22543 // "response": { 22544 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22545 // }, 22546 // "scopes": [ 22547 // "https://www.googleapis.com/auth/cloud-platform" 22548 // ] 22549 // } 22550 22551} 22552 22553// method id "dlp.projects.storedInfoTypes.delete": 22554 22555type ProjectsStoredInfoTypesDeleteCall struct { 22556 s *Service 22557 name string 22558 urlParams_ gensupport.URLParams 22559 ctx_ context.Context 22560 header_ http.Header 22561} 22562 22563// Delete: Deletes a stored infoType. See 22564// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22565// more. 22566func (r *ProjectsStoredInfoTypesService) Delete(name string) *ProjectsStoredInfoTypesDeleteCall { 22567 c := &ProjectsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22568 c.name = name 22569 return c 22570} 22571 22572// Fields allows partial responses to be retrieved. See 22573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22574// for more information. 22575func (c *ProjectsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesDeleteCall { 22576 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22577 return c 22578} 22579 22580// Context sets the context to be used in this call's Do method. Any 22581// pending HTTP request will be aborted if the provided context is 22582// canceled. 22583func (c *ProjectsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsStoredInfoTypesDeleteCall { 22584 c.ctx_ = ctx 22585 return c 22586} 22587 22588// Header returns an http.Header that can be modified by the caller to 22589// add HTTP headers to the request. 22590func (c *ProjectsStoredInfoTypesDeleteCall) Header() http.Header { 22591 if c.header_ == nil { 22592 c.header_ = make(http.Header) 22593 } 22594 return c.header_ 22595} 22596 22597func (c *ProjectsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 22598 reqHeaders := make(http.Header) 22599 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22600 for k, v := range c.header_ { 22601 reqHeaders[k] = v 22602 } 22603 reqHeaders.Set("User-Agent", c.s.userAgent()) 22604 var body io.Reader = nil 22605 c.urlParams_.Set("alt", alt) 22606 c.urlParams_.Set("prettyPrint", "false") 22607 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22608 urls += "?" + c.urlParams_.Encode() 22609 req, err := http.NewRequest("DELETE", urls, body) 22610 if err != nil { 22611 return nil, err 22612 } 22613 req.Header = reqHeaders 22614 googleapi.Expand(req.URL, map[string]string{ 22615 "name": c.name, 22616 }) 22617 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22618} 22619 22620// Do executes the "dlp.projects.storedInfoTypes.delete" call. 22621// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 22622// non-2xx status code is an error. Response headers are in either 22623// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 22624// returned at all) in error.(*googleapi.Error).Header. Use 22625// googleapi.IsNotModified to check whether the returned error was 22626// because http.StatusNotModified was returned. 22627func (c *ProjectsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 22628 gensupport.SetOptions(c.urlParams_, opts...) 22629 res, err := c.doRequest("json") 22630 if res != nil && res.StatusCode == http.StatusNotModified { 22631 if res.Body != nil { 22632 res.Body.Close() 22633 } 22634 return nil, &googleapi.Error{ 22635 Code: res.StatusCode, 22636 Header: res.Header, 22637 } 22638 } 22639 if err != nil { 22640 return nil, err 22641 } 22642 defer googleapi.CloseBody(res) 22643 if err := googleapi.CheckResponse(res); err != nil { 22644 return nil, err 22645 } 22646 ret := &GoogleProtobufEmpty{ 22647 ServerResponse: googleapi.ServerResponse{ 22648 Header: res.Header, 22649 HTTPStatusCode: res.StatusCode, 22650 }, 22651 } 22652 target := &ret 22653 if err := gensupport.DecodeResponse(target, res); err != nil { 22654 return nil, err 22655 } 22656 return ret, nil 22657 // { 22658 // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22659 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 22660 // "httpMethod": "DELETE", 22661 // "id": "dlp.projects.storedInfoTypes.delete", 22662 // "parameterOrder": [ 22663 // "name" 22664 // ], 22665 // "parameters": { 22666 // "name": { 22667 // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22668 // "location": "path", 22669 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 22670 // "required": true, 22671 // "type": "string" 22672 // } 22673 // }, 22674 // "path": "v2/{+name}", 22675 // "response": { 22676 // "$ref": "GoogleProtobufEmpty" 22677 // }, 22678 // "scopes": [ 22679 // "https://www.googleapis.com/auth/cloud-platform" 22680 // ] 22681 // } 22682 22683} 22684 22685// method id "dlp.projects.storedInfoTypes.get": 22686 22687type ProjectsStoredInfoTypesGetCall struct { 22688 s *Service 22689 name string 22690 urlParams_ gensupport.URLParams 22691 ifNoneMatch_ string 22692 ctx_ context.Context 22693 header_ http.Header 22694} 22695 22696// Get: Gets a stored infoType. See 22697// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22698// more. 22699func (r *ProjectsStoredInfoTypesService) Get(name string) *ProjectsStoredInfoTypesGetCall { 22700 c := &ProjectsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22701 c.name = name 22702 return c 22703} 22704 22705// Fields allows partial responses to be retrieved. See 22706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22707// for more information. 22708func (c *ProjectsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesGetCall { 22709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22710 return c 22711} 22712 22713// IfNoneMatch sets the optional parameter which makes the operation 22714// fail if the object's ETag matches the given value. This is useful for 22715// getting updates only after the object has changed since the last 22716// request. Use googleapi.IsNotModified to check whether the response 22717// error from Do is the result of In-None-Match. 22718func (c *ProjectsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesGetCall { 22719 c.ifNoneMatch_ = entityTag 22720 return c 22721} 22722 22723// Context sets the context to be used in this call's Do method. Any 22724// pending HTTP request will be aborted if the provided context is 22725// canceled. 22726func (c *ProjectsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsStoredInfoTypesGetCall { 22727 c.ctx_ = ctx 22728 return c 22729} 22730 22731// Header returns an http.Header that can be modified by the caller to 22732// add HTTP headers to the request. 22733func (c *ProjectsStoredInfoTypesGetCall) Header() http.Header { 22734 if c.header_ == nil { 22735 c.header_ = make(http.Header) 22736 } 22737 return c.header_ 22738} 22739 22740func (c *ProjectsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { 22741 reqHeaders := make(http.Header) 22742 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22743 for k, v := range c.header_ { 22744 reqHeaders[k] = v 22745 } 22746 reqHeaders.Set("User-Agent", c.s.userAgent()) 22747 if c.ifNoneMatch_ != "" { 22748 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22749 } 22750 var body io.Reader = nil 22751 c.urlParams_.Set("alt", alt) 22752 c.urlParams_.Set("prettyPrint", "false") 22753 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 22754 urls += "?" + c.urlParams_.Encode() 22755 req, err := http.NewRequest("GET", urls, body) 22756 if err != nil { 22757 return nil, err 22758 } 22759 req.Header = reqHeaders 22760 googleapi.Expand(req.URL, map[string]string{ 22761 "name": c.name, 22762 }) 22763 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22764} 22765 22766// Do executes the "dlp.projects.storedInfoTypes.get" call. 22767// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 22768// non-nil. Any non-2xx status code is an error. Response headers are in 22769// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 22770// a response was returned at all) in error.(*googleapi.Error).Header. 22771// Use googleapi.IsNotModified to check whether the returned error was 22772// because http.StatusNotModified was returned. 22773func (c *ProjectsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 22774 gensupport.SetOptions(c.urlParams_, opts...) 22775 res, err := c.doRequest("json") 22776 if res != nil && res.StatusCode == http.StatusNotModified { 22777 if res.Body != nil { 22778 res.Body.Close() 22779 } 22780 return nil, &googleapi.Error{ 22781 Code: res.StatusCode, 22782 Header: res.Header, 22783 } 22784 } 22785 if err != nil { 22786 return nil, err 22787 } 22788 defer googleapi.CloseBody(res) 22789 if err := googleapi.CheckResponse(res); err != nil { 22790 return nil, err 22791 } 22792 ret := &GooglePrivacyDlpV2StoredInfoType{ 22793 ServerResponse: googleapi.ServerResponse{ 22794 Header: res.Header, 22795 HTTPStatusCode: res.StatusCode, 22796 }, 22797 } 22798 target := &ret 22799 if err := gensupport.DecodeResponse(target, res); err != nil { 22800 return nil, err 22801 } 22802 return ret, nil 22803 // { 22804 // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22805 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 22806 // "httpMethod": "GET", 22807 // "id": "dlp.projects.storedInfoTypes.get", 22808 // "parameterOrder": [ 22809 // "name" 22810 // ], 22811 // "parameters": { 22812 // "name": { 22813 // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 22814 // "location": "path", 22815 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 22816 // "required": true, 22817 // "type": "string" 22818 // } 22819 // }, 22820 // "path": "v2/{+name}", 22821 // "response": { 22822 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 22823 // }, 22824 // "scopes": [ 22825 // "https://www.googleapis.com/auth/cloud-platform" 22826 // ] 22827 // } 22828 22829} 22830 22831// method id "dlp.projects.storedInfoTypes.list": 22832 22833type ProjectsStoredInfoTypesListCall struct { 22834 s *Service 22835 parentid string 22836 urlParams_ gensupport.URLParams 22837 ifNoneMatch_ string 22838 ctx_ context.Context 22839 header_ http.Header 22840} 22841 22842// List: Lists stored infoTypes. See 22843// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 22844// more. 22845func (r *ProjectsStoredInfoTypesService) List(parentid string) *ProjectsStoredInfoTypesListCall { 22846 c := &ProjectsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22847 c.parentid = parentid 22848 return c 22849} 22850 22851// LocationId sets the optional parameter "locationId": Deprecated. This 22852// field has no effect. 22853func (c *ProjectsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsStoredInfoTypesListCall { 22854 c.urlParams_.Set("locationId", locationId) 22855 return c 22856} 22857 22858// OrderBy sets the optional parameter "orderBy": Comma separated list 22859// of fields to order by, followed by `asc` or `desc` postfix. This list 22860// is case-insensitive, default sorting order is ascending, redundant 22861// space characters are insignificant. Example: `name asc, display_name, 22862// create_time desc` Supported fields are: - `create_time`: corresponds 22863// to time the most recent version of the resource was created. - 22864// `state`: corresponds to the state of the resource. - `name`: 22865// corresponds to resource name. - `display_name`: corresponds to info 22866// type's display name. 22867func (c *ProjectsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsStoredInfoTypesListCall { 22868 c.urlParams_.Set("orderBy", orderBy) 22869 return c 22870} 22871 22872// PageSize sets the optional parameter "pageSize": Size of the page, 22873// can be limited by server. If zero server returns a page of max size 22874// 100. 22875func (c *ProjectsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsStoredInfoTypesListCall { 22876 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22877 return c 22878} 22879 22880// PageToken sets the optional parameter "pageToken": Page token to 22881// continue retrieval. Comes from previous call to 22882// `ListStoredInfoTypes`. 22883func (c *ProjectsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsStoredInfoTypesListCall { 22884 c.urlParams_.Set("pageToken", pageToken) 22885 return c 22886} 22887 22888// Fields allows partial responses to be retrieved. See 22889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22890// for more information. 22891func (c *ProjectsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesListCall { 22892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22893 return c 22894} 22895 22896// IfNoneMatch sets the optional parameter which makes the operation 22897// fail if the object's ETag matches the given value. This is useful for 22898// getting updates only after the object has changed since the last 22899// request. Use googleapi.IsNotModified to check whether the response 22900// error from Do is the result of In-None-Match. 22901func (c *ProjectsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsStoredInfoTypesListCall { 22902 c.ifNoneMatch_ = entityTag 22903 return c 22904} 22905 22906// Context sets the context to be used in this call's Do method. Any 22907// pending HTTP request will be aborted if the provided context is 22908// canceled. 22909func (c *ProjectsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsStoredInfoTypesListCall { 22910 c.ctx_ = ctx 22911 return c 22912} 22913 22914// Header returns an http.Header that can be modified by the caller to 22915// add HTTP headers to the request. 22916func (c *ProjectsStoredInfoTypesListCall) Header() http.Header { 22917 if c.header_ == nil { 22918 c.header_ = make(http.Header) 22919 } 22920 return c.header_ 22921} 22922 22923func (c *ProjectsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { 22924 reqHeaders := make(http.Header) 22925 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 22926 for k, v := range c.header_ { 22927 reqHeaders[k] = v 22928 } 22929 reqHeaders.Set("User-Agent", c.s.userAgent()) 22930 if c.ifNoneMatch_ != "" { 22931 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22932 } 22933 var body io.Reader = nil 22934 c.urlParams_.Set("alt", alt) 22935 c.urlParams_.Set("prettyPrint", "false") 22936 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") 22937 urls += "?" + c.urlParams_.Encode() 22938 req, err := http.NewRequest("GET", urls, body) 22939 if err != nil { 22940 return nil, err 22941 } 22942 req.Header = reqHeaders 22943 googleapi.Expand(req.URL, map[string]string{ 22944 "parent": c.parentid, 22945 }) 22946 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22947} 22948 22949// Do executes the "dlp.projects.storedInfoTypes.list" call. 22950// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or 22951// error will be non-nil. Any non-2xx status code is an error. Response 22952// headers are in either 22953// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header 22954// or (if a response was returned at all) in 22955// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22956// whether the returned error was because http.StatusNotModified was 22957// returned. 22958func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { 22959 gensupport.SetOptions(c.urlParams_, opts...) 22960 res, err := c.doRequest("json") 22961 if res != nil && res.StatusCode == http.StatusNotModified { 22962 if res.Body != nil { 22963 res.Body.Close() 22964 } 22965 return nil, &googleapi.Error{ 22966 Code: res.StatusCode, 22967 Header: res.Header, 22968 } 22969 } 22970 if err != nil { 22971 return nil, err 22972 } 22973 defer googleapi.CloseBody(res) 22974 if err := googleapi.CheckResponse(res); err != nil { 22975 return nil, err 22976 } 22977 ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ 22978 ServerResponse: googleapi.ServerResponse{ 22979 Header: res.Header, 22980 HTTPStatusCode: res.StatusCode, 22981 }, 22982 } 22983 target := &ret 22984 if err := gensupport.DecodeResponse(target, res); err != nil { 22985 return nil, err 22986 } 22987 return ret, nil 22988 // { 22989 // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", 22990 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", 22991 // "httpMethod": "GET", 22992 // "id": "dlp.projects.storedInfoTypes.list", 22993 // "parameterOrder": [ 22994 // "parent" 22995 // ], 22996 // "parameters": { 22997 // "locationId": { 22998 // "description": "Deprecated. This field has no effect.", 22999 // "location": "query", 23000 // "type": "string" 23001 // }, 23002 // "orderBy": { 23003 // "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.", 23004 // "location": "query", 23005 // "type": "string" 23006 // }, 23007 // "pageSize": { 23008 // "description": "Size of the page, can be limited by server. If zero server returns a page of max size 100.", 23009 // "format": "int32", 23010 // "location": "query", 23011 // "type": "integer" 23012 // }, 23013 // "pageToken": { 23014 // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", 23015 // "location": "query", 23016 // "type": "string" 23017 // }, 23018 // "parent": { 23019 // "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", 23020 // "location": "path", 23021 // "pattern": "^projects/[^/]+$", 23022 // "required": true, 23023 // "type": "string" 23024 // } 23025 // }, 23026 // "path": "v2/{+parent}/storedInfoTypes", 23027 // "response": { 23028 // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" 23029 // }, 23030 // "scopes": [ 23031 // "https://www.googleapis.com/auth/cloud-platform" 23032 // ] 23033 // } 23034 23035} 23036 23037// Pages invokes f for each page of results. 23038// A non-nil error returned from f will halt the iteration. 23039// The provided context supersedes any context provided to the Context method. 23040func (c *ProjectsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { 23041 c.ctx_ = ctx 23042 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23043 for { 23044 x, err := c.Do() 23045 if err != nil { 23046 return err 23047 } 23048 if err := f(x); err != nil { 23049 return err 23050 } 23051 if x.NextPageToken == "" { 23052 return nil 23053 } 23054 c.PageToken(x.NextPageToken) 23055 } 23056} 23057 23058// method id "dlp.projects.storedInfoTypes.patch": 23059 23060type ProjectsStoredInfoTypesPatchCall struct { 23061 s *Service 23062 name string 23063 googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest 23064 urlParams_ gensupport.URLParams 23065 ctx_ context.Context 23066 header_ http.Header 23067} 23068 23069// Patch: Updates the stored infoType by creating a new version. The 23070// existing version will continue to be used until the new version is 23071// ready. See 23072// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn 23073// more. 23074func (r *ProjectsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsStoredInfoTypesPatchCall { 23075 c := &ProjectsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23076 c.name = name 23077 c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest 23078 return c 23079} 23080 23081// Fields allows partial responses to be retrieved. See 23082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23083// for more information. 23084func (c *ProjectsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsStoredInfoTypesPatchCall { 23085 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23086 return c 23087} 23088 23089// Context sets the context to be used in this call's Do method. Any 23090// pending HTTP request will be aborted if the provided context is 23091// canceled. 23092func (c *ProjectsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsStoredInfoTypesPatchCall { 23093 c.ctx_ = ctx 23094 return c 23095} 23096 23097// Header returns an http.Header that can be modified by the caller to 23098// add HTTP headers to the request. 23099func (c *ProjectsStoredInfoTypesPatchCall) Header() http.Header { 23100 if c.header_ == nil { 23101 c.header_ = make(http.Header) 23102 } 23103 return c.header_ 23104} 23105 23106func (c *ProjectsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { 23107 reqHeaders := make(http.Header) 23108 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 23109 for k, v := range c.header_ { 23110 reqHeaders[k] = v 23111 } 23112 reqHeaders.Set("User-Agent", c.s.userAgent()) 23113 var body io.Reader = nil 23114 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) 23115 if err != nil { 23116 return nil, err 23117 } 23118 reqHeaders.Set("Content-Type", "application/json") 23119 c.urlParams_.Set("alt", alt) 23120 c.urlParams_.Set("prettyPrint", "false") 23121 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 23122 urls += "?" + c.urlParams_.Encode() 23123 req, err := http.NewRequest("PATCH", urls, body) 23124 if err != nil { 23125 return nil, err 23126 } 23127 req.Header = reqHeaders 23128 googleapi.Expand(req.URL, map[string]string{ 23129 "name": c.name, 23130 }) 23131 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23132} 23133 23134// Do executes the "dlp.projects.storedInfoTypes.patch" call. 23135// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be 23136// non-nil. Any non-2xx status code is an error. Response headers are in 23137// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if 23138// a response was returned at all) in error.(*googleapi.Error).Header. 23139// Use googleapi.IsNotModified to check whether the returned error was 23140// because http.StatusNotModified was returned. 23141func (c *ProjectsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { 23142 gensupport.SetOptions(c.urlParams_, opts...) 23143 res, err := c.doRequest("json") 23144 if res != nil && res.StatusCode == http.StatusNotModified { 23145 if res.Body != nil { 23146 res.Body.Close() 23147 } 23148 return nil, &googleapi.Error{ 23149 Code: res.StatusCode, 23150 Header: res.Header, 23151 } 23152 } 23153 if err != nil { 23154 return nil, err 23155 } 23156 defer googleapi.CloseBody(res) 23157 if err := googleapi.CheckResponse(res); err != nil { 23158 return nil, err 23159 } 23160 ret := &GooglePrivacyDlpV2StoredInfoType{ 23161 ServerResponse: googleapi.ServerResponse{ 23162 Header: res.Header, 23163 HTTPStatusCode: res.StatusCode, 23164 }, 23165 } 23166 target := &ret 23167 if err := gensupport.DecodeResponse(target, res); err != nil { 23168 return nil, err 23169 } 23170 return ret, nil 23171 // { 23172 // "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.", 23173 // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", 23174 // "httpMethod": "PATCH", 23175 // "id": "dlp.projects.storedInfoTypes.patch", 23176 // "parameterOrder": [ 23177 // "name" 23178 // ], 23179 // "parameters": { 23180 // "name": { 23181 // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", 23182 // "location": "path", 23183 // "pattern": "^projects/[^/]+/storedInfoTypes/[^/]+$", 23184 // "required": true, 23185 // "type": "string" 23186 // } 23187 // }, 23188 // "path": "v2/{+name}", 23189 // "request": { 23190 // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" 23191 // }, 23192 // "response": { 23193 // "$ref": "GooglePrivacyDlpV2StoredInfoType" 23194 // }, 23195 // "scopes": [ 23196 // "https://www.googleapis.com/auth/cloud-platform" 23197 // ] 23198 // } 23199 23200} 23201