1// Copyright 2021 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package datacatalog provides access to the Google Cloud Data Catalog API. 8// 9// For product documentation, see: https://cloud.google.com/data-catalog/docs/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/datacatalog/v1beta1" 16// ... 17// ctx := context.Background() 18// datacatalogService, err := datacatalog.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// datacatalogService, err := datacatalog.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// datacatalogService, err := datacatalog.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package datacatalog // import "google.golang.org/api/datacatalog/v1beta1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "datacatalog:v1beta1" 75const apiName = "datacatalog" 76const apiVersion = "v1beta1" 77const basePath = "https://datacatalog.googleapis.com/" 78const mtlsBasePath = "https://datacatalog.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // See, edit, configure, and delete your Google Cloud Platform data 83 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 84) 85 86// NewService creates a new Service. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/cloud-platform", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new Service. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Catalog = NewCatalogService(s) 120 s.Entries = NewEntriesService(s) 121 s.Projects = NewProjectsService(s) 122 return s, nil 123} 124 125type Service struct { 126 client *http.Client 127 BasePath string // API endpoint base URL 128 UserAgent string // optional additional User-Agent fragment 129 130 Catalog *CatalogService 131 132 Entries *EntriesService 133 134 Projects *ProjectsService 135} 136 137func (s *Service) userAgent() string { 138 if s.UserAgent == "" { 139 return googleapi.UserAgent 140 } 141 return googleapi.UserAgent + " " + s.UserAgent 142} 143 144func NewCatalogService(s *Service) *CatalogService { 145 rs := &CatalogService{s: s} 146 return rs 147} 148 149type CatalogService struct { 150 s *Service 151} 152 153func NewEntriesService(s *Service) *EntriesService { 154 rs := &EntriesService{s: s} 155 return rs 156} 157 158type EntriesService struct { 159 s *Service 160} 161 162func NewProjectsService(s *Service) *ProjectsService { 163 rs := &ProjectsService{s: s} 164 rs.Locations = NewProjectsLocationsService(s) 165 return rs 166} 167 168type ProjectsService struct { 169 s *Service 170 171 Locations *ProjectsLocationsService 172} 173 174func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 175 rs := &ProjectsLocationsService{s: s} 176 rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) 177 rs.TagTemplates = NewProjectsLocationsTagTemplatesService(s) 178 rs.Taxonomies = NewProjectsLocationsTaxonomiesService(s) 179 return rs 180} 181 182type ProjectsLocationsService struct { 183 s *Service 184 185 EntryGroups *ProjectsLocationsEntryGroupsService 186 187 TagTemplates *ProjectsLocationsTagTemplatesService 188 189 Taxonomies *ProjectsLocationsTaxonomiesService 190} 191 192func NewProjectsLocationsEntryGroupsService(s *Service) *ProjectsLocationsEntryGroupsService { 193 rs := &ProjectsLocationsEntryGroupsService{s: s} 194 rs.Entries = NewProjectsLocationsEntryGroupsEntriesService(s) 195 rs.Tags = NewProjectsLocationsEntryGroupsTagsService(s) 196 return rs 197} 198 199type ProjectsLocationsEntryGroupsService struct { 200 s *Service 201 202 Entries *ProjectsLocationsEntryGroupsEntriesService 203 204 Tags *ProjectsLocationsEntryGroupsTagsService 205} 206 207func NewProjectsLocationsEntryGroupsEntriesService(s *Service) *ProjectsLocationsEntryGroupsEntriesService { 208 rs := &ProjectsLocationsEntryGroupsEntriesService{s: s} 209 rs.Tags = NewProjectsLocationsEntryGroupsEntriesTagsService(s) 210 return rs 211} 212 213type ProjectsLocationsEntryGroupsEntriesService struct { 214 s *Service 215 216 Tags *ProjectsLocationsEntryGroupsEntriesTagsService 217} 218 219func NewProjectsLocationsEntryGroupsEntriesTagsService(s *Service) *ProjectsLocationsEntryGroupsEntriesTagsService { 220 rs := &ProjectsLocationsEntryGroupsEntriesTagsService{s: s} 221 return rs 222} 223 224type ProjectsLocationsEntryGroupsEntriesTagsService struct { 225 s *Service 226} 227 228func NewProjectsLocationsEntryGroupsTagsService(s *Service) *ProjectsLocationsEntryGroupsTagsService { 229 rs := &ProjectsLocationsEntryGroupsTagsService{s: s} 230 return rs 231} 232 233type ProjectsLocationsEntryGroupsTagsService struct { 234 s *Service 235} 236 237func NewProjectsLocationsTagTemplatesService(s *Service) *ProjectsLocationsTagTemplatesService { 238 rs := &ProjectsLocationsTagTemplatesService{s: s} 239 rs.Fields = NewProjectsLocationsTagTemplatesFieldsService(s) 240 return rs 241} 242 243type ProjectsLocationsTagTemplatesService struct { 244 s *Service 245 246 Fields *ProjectsLocationsTagTemplatesFieldsService 247} 248 249func NewProjectsLocationsTagTemplatesFieldsService(s *Service) *ProjectsLocationsTagTemplatesFieldsService { 250 rs := &ProjectsLocationsTagTemplatesFieldsService{s: s} 251 rs.EnumValues = NewProjectsLocationsTagTemplatesFieldsEnumValuesService(s) 252 return rs 253} 254 255type ProjectsLocationsTagTemplatesFieldsService struct { 256 s *Service 257 258 EnumValues *ProjectsLocationsTagTemplatesFieldsEnumValuesService 259} 260 261func NewProjectsLocationsTagTemplatesFieldsEnumValuesService(s *Service) *ProjectsLocationsTagTemplatesFieldsEnumValuesService { 262 rs := &ProjectsLocationsTagTemplatesFieldsEnumValuesService{s: s} 263 return rs 264} 265 266type ProjectsLocationsTagTemplatesFieldsEnumValuesService struct { 267 s *Service 268} 269 270func NewProjectsLocationsTaxonomiesService(s *Service) *ProjectsLocationsTaxonomiesService { 271 rs := &ProjectsLocationsTaxonomiesService{s: s} 272 rs.PolicyTags = NewProjectsLocationsTaxonomiesPolicyTagsService(s) 273 return rs 274} 275 276type ProjectsLocationsTaxonomiesService struct { 277 s *Service 278 279 PolicyTags *ProjectsLocationsTaxonomiesPolicyTagsService 280} 281 282func NewProjectsLocationsTaxonomiesPolicyTagsService(s *Service) *ProjectsLocationsTaxonomiesPolicyTagsService { 283 rs := &ProjectsLocationsTaxonomiesPolicyTagsService{s: s} 284 return rs 285} 286 287type ProjectsLocationsTaxonomiesPolicyTagsService struct { 288 s *Service 289} 290 291// Binding: Associates `members` with a `role`. 292type Binding struct { 293 // Condition: The condition that is associated with this binding. If the 294 // condition evaluates to `true`, then this binding applies to the 295 // current request. If the condition evaluates to `false`, then this 296 // binding does not apply to the current request. However, a different 297 // role binding might grant the same role to one or more of the members 298 // in this binding. To learn which resources support conditions in their 299 // IAM policies, see the IAM documentation 300 // (https://cloud.google.com/iam/help/conditions/resource-policies). 301 Condition *Expr `json:"condition,omitempty"` 302 303 // Members: Specifies the identities requesting access for a Cloud 304 // Platform resource. `members` can have the following values: * 305 // `allUsers`: A special identifier that represents anyone who is on the 306 // internet; with or without a Google account. * 307 // `allAuthenticatedUsers`: A special identifier that represents anyone 308 // who is authenticated with a Google account or a service account. * 309 // `user:{emailid}`: An email address that represents a specific Google 310 // account. For example, `alice@example.com` . * 311 // `serviceAccount:{emailid}`: An email address that represents a 312 // service account. For example, 313 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 314 // email address that represents a Google group. For example, 315 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 316 // email address (plus unique identifier) representing a user that has 317 // been recently deleted. For example, 318 // `alice@example.com?uid=123456789012345678901`. If the user is 319 // recovered, this value reverts to `user:{emailid}` and the recovered 320 // user retains the role in the binding. * 321 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 322 // (plus unique identifier) representing a service account that has been 323 // recently deleted. For example, 324 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 325 // If the service account is undeleted, this value reverts to 326 // `serviceAccount:{emailid}` and the undeleted service account retains 327 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 328 // An email address (plus unique identifier) representing a Google group 329 // that has been recently deleted. For example, 330 // `admins@example.com?uid=123456789012345678901`. If the group is 331 // recovered, this value reverts to `group:{emailid}` and the recovered 332 // group retains the role in the binding. * `domain:{domain}`: The G 333 // Suite domain (primary) that represents all the users of that domain. 334 // For example, `google.com` or `example.com`. 335 Members []string `json:"members,omitempty"` 336 337 // Role: Role that is assigned to `members`. For example, 338 // `roles/viewer`, `roles/editor`, or `roles/owner`. 339 Role string `json:"role,omitempty"` 340 341 // ForceSendFields is a list of field names (e.g. "Condition") to 342 // unconditionally include in API requests. By default, fields with 343 // empty values are omitted from API requests. However, any non-pointer, 344 // non-interface field appearing in ForceSendFields will be sent to the 345 // server regardless of whether the field is empty or not. This may be 346 // used to include empty fields in Patch requests. 347 ForceSendFields []string `json:"-"` 348 349 // NullFields is a list of field names (e.g. "Condition") to include in 350 // API requests with the JSON null value. By default, fields with empty 351 // values are omitted from API requests. However, any field with an 352 // empty value appearing in NullFields will be sent to the server as 353 // null. It is an error if a field in this list has a non-empty value. 354 // This may be used to include null fields in Patch requests. 355 NullFields []string `json:"-"` 356} 357 358func (s *Binding) MarshalJSON() ([]byte, error) { 359 type NoMethod Binding 360 raw := NoMethod(*s) 361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 362} 363 364// Empty: A generic empty message that you can re-use to avoid defining 365// duplicated empty messages in your APIs. A typical example is to use 366// it as the request or the response type of an API method. For 367// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 368// (google.protobuf.Empty); } The JSON representation for `Empty` is 369// empty JSON object `{}`. 370type Empty struct { 371 // ServerResponse contains the HTTP response code and headers from the 372 // server. 373 googleapi.ServerResponse `json:"-"` 374} 375 376// Expr: Represents a textual expression in the Common Expression 377// Language (CEL) syntax. CEL is a C-like expression language. The 378// syntax and semantics of CEL are documented at 379// https://github.com/google/cel-spec. Example (Comparison): title: 380// "Summary size limit" description: "Determines if a summary is less 381// than 100 chars" expression: "document.summary.size() < 100" Example 382// (Equality): title: "Requestor is owner" description: "Determines if 383// requestor is the document owner" expression: "document.owner == 384// request.auth.claims.email" Example (Logic): title: "Public documents" 385// description: "Determine whether the document should be publicly 386// visible" expression: "document.type != 'private' && document.type != 387// 'internal'" Example (Data Manipulation): title: "Notification string" 388// description: "Create a notification string with a timestamp." 389// expression: "'New message received at ' + 390// string(document.create_time)" The exact variables and functions that 391// may be referenced within an expression are determined by the service 392// that evaluates it. See the service documentation for additional 393// information. 394type Expr struct { 395 // Description: Optional. Description of the expression. This is a 396 // longer text which describes the expression, e.g. when hovered over it 397 // in a UI. 398 Description string `json:"description,omitempty"` 399 400 // Expression: Textual representation of an expression in Common 401 // Expression Language syntax. 402 Expression string `json:"expression,omitempty"` 403 404 // Location: Optional. String indicating the location of the expression 405 // for error reporting, e.g. a file name and a position in the file. 406 Location string `json:"location,omitempty"` 407 408 // Title: Optional. Title for the expression, i.e. a short string 409 // describing its purpose. This can be used e.g. in UIs which allow to 410 // enter the expression. 411 Title string `json:"title,omitempty"` 412 413 // ForceSendFields is a list of field names (e.g. "Description") to 414 // unconditionally include in API requests. By default, fields with 415 // empty values are omitted from API requests. However, any non-pointer, 416 // non-interface field appearing in ForceSendFields will be sent to the 417 // server regardless of whether the field is empty or not. This may be 418 // used to include empty fields in Patch requests. 419 ForceSendFields []string `json:"-"` 420 421 // NullFields is a list of field names (e.g. "Description") to include 422 // in API requests with the JSON null value. By default, fields with 423 // empty values are omitted from API requests. However, any field with 424 // an empty value appearing in NullFields will be sent to the server as 425 // null. It is an error if a field in this list has a non-empty value. 426 // This may be used to include null fields in Patch requests. 427 NullFields []string `json:"-"` 428} 429 430func (s *Expr) MarshalJSON() ([]byte, error) { 431 type NoMethod Expr 432 raw := NoMethod(*s) 433 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 434} 435 436// GetIamPolicyRequest: Request message for `GetIamPolicy` method. 437type GetIamPolicyRequest struct { 438 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options 439 // to `GetIamPolicy`. 440 Options *GetPolicyOptions `json:"options,omitempty"` 441 442 // ForceSendFields is a list of field names (e.g. "Options") to 443 // unconditionally include in API requests. By default, fields with 444 // empty values are omitted from API requests. However, any non-pointer, 445 // non-interface field appearing in ForceSendFields will be sent to the 446 // server regardless of whether the field is empty or not. This may be 447 // used to include empty fields in Patch requests. 448 ForceSendFields []string `json:"-"` 449 450 // NullFields is a list of field names (e.g. "Options") to include in 451 // API requests with the JSON null value. By default, fields with empty 452 // values are omitted from API requests. However, any field with an 453 // empty value appearing in NullFields will be sent to the server as 454 // null. It is an error if a field in this list has a non-empty value. 455 // This may be used to include null fields in Patch requests. 456 NullFields []string `json:"-"` 457} 458 459func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 460 type NoMethod GetIamPolicyRequest 461 raw := NoMethod(*s) 462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 463} 464 465// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 466type GetPolicyOptions struct { 467 // RequestedPolicyVersion: Optional. The policy format version to be 468 // returned. Valid values are 0, 1, and 3. Requests specifying an 469 // invalid value will be rejected. Requests for policies with any 470 // conditional bindings must specify version 3. Policies without any 471 // conditional bindings may specify any valid value or leave the field 472 // unset. To learn which resources support conditions in their IAM 473 // policies, see the IAM documentation 474 // (https://cloud.google.com/iam/help/conditions/resource-policies). 475 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 476 477 // ForceSendFields is a list of field names (e.g. 478 // "RequestedPolicyVersion") to unconditionally include in API requests. 479 // By default, fields with empty values are omitted from API requests. 480 // However, any non-pointer, non-interface field appearing in 481 // ForceSendFields will be sent to the server regardless of whether the 482 // field is empty or not. This may be used to include empty fields in 483 // Patch requests. 484 ForceSendFields []string `json:"-"` 485 486 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") 487 // to include in API requests with the JSON null value. By default, 488 // fields with empty values are omitted from API requests. However, any 489 // field with an empty value appearing in NullFields will be sent to the 490 // server as null. It is an error if a field in this list has a 491 // non-empty value. This may be used to include null fields in Patch 492 // requests. 493 NullFields []string `json:"-"` 494} 495 496func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 497 type NoMethod GetPolicyOptions 498 raw := NoMethod(*s) 499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 500} 501 502// GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec: Spec for a 503// group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. 504// Context: 505// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding 506type GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec struct { 507 // Dataset: Output only. The Data Catalog resource name of the dataset 508 // entry the current table belongs to, for example, 509 // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_i 510 // d}/entries/{entry_id}`. 511 Dataset string `json:"dataset,omitempty"` 512 513 // ShardCount: Output only. Total number of shards. 514 ShardCount int64 `json:"shardCount,omitempty,string"` 515 516 // TablePrefix: Output only. The table name prefix of the shards. The 517 // name of any given shard is `[table_prefix]YYYYMMDD`, for example, for 518 // shard `MyTable20180101`, the `table_prefix` is `MyTable`. 519 TablePrefix string `json:"tablePrefix,omitempty"` 520 521 // ForceSendFields is a list of field names (e.g. "Dataset") to 522 // unconditionally include in API requests. By default, fields with 523 // empty values are omitted from API requests. However, any non-pointer, 524 // non-interface field appearing in ForceSendFields will be sent to the 525 // server regardless of whether the field is empty or not. This may be 526 // used to include empty fields in Patch requests. 527 ForceSendFields []string `json:"-"` 528 529 // NullFields is a list of field names (e.g. "Dataset") to include in 530 // API requests with the JSON null value. By default, fields with empty 531 // values are omitted from API requests. However, any field with an 532 // empty value appearing in NullFields will be sent to the server as 533 // null. It is an error if a field in this list has a non-empty value. 534 // This may be used to include null fields in Patch requests. 535 NullFields []string `json:"-"` 536} 537 538func (s *GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec) MarshalJSON() ([]byte, error) { 539 type NoMethod GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec 540 raw := NoMethod(*s) 541 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 542} 543 544// GoogleCloudDatacatalogV1beta1BigQueryTableSpec: Describes a BigQuery 545// table. 546type GoogleCloudDatacatalogV1beta1BigQueryTableSpec struct { 547 // TableSourceType: Output only. The table source type. 548 // 549 // Possible values: 550 // "TABLE_SOURCE_TYPE_UNSPECIFIED" - Default unknown type. 551 // "BIGQUERY_VIEW" - Table view. 552 // "BIGQUERY_TABLE" - BigQuery native table. 553 // "BIGQUERY_MATERIALIZED_VIEW" - BigQuery materialized view. 554 TableSourceType string `json:"tableSourceType,omitempty"` 555 556 // TableSpec: Spec of a BigQuery table. This field should only be 557 // populated if `table_source_type` is `BIGQUERY_TABLE`. 558 TableSpec *GoogleCloudDatacatalogV1beta1TableSpec `json:"tableSpec,omitempty"` 559 560 // ViewSpec: Table view specification. This field should only be 561 // populated if `table_source_type` is `BIGQUERY_VIEW`. 562 ViewSpec *GoogleCloudDatacatalogV1beta1ViewSpec `json:"viewSpec,omitempty"` 563 564 // ForceSendFields is a list of field names (e.g. "TableSourceType") to 565 // unconditionally include in API requests. By default, fields with 566 // empty values are omitted from API requests. However, any non-pointer, 567 // non-interface field appearing in ForceSendFields will be sent to the 568 // server regardless of whether the field is empty or not. This may be 569 // used to include empty fields in Patch requests. 570 ForceSendFields []string `json:"-"` 571 572 // NullFields is a list of field names (e.g. "TableSourceType") to 573 // include in API requests with the JSON null value. By default, fields 574 // with empty values are omitted from API requests. However, any field 575 // with an empty value appearing in NullFields will be sent to the 576 // server as null. It is an error if a field in this list has a 577 // non-empty value. This may be used to include null fields in Patch 578 // requests. 579 NullFields []string `json:"-"` 580} 581 582func (s *GoogleCloudDatacatalogV1beta1BigQueryTableSpec) MarshalJSON() ([]byte, error) { 583 type NoMethod GoogleCloudDatacatalogV1beta1BigQueryTableSpec 584 raw := NoMethod(*s) 585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 586} 587 588// GoogleCloudDatacatalogV1beta1ColumnSchema: Representation of a column 589// within a schema. Columns could be nested inside other columns. 590type GoogleCloudDatacatalogV1beta1ColumnSchema struct { 591 // Column: Required. Name of the column. 592 Column string `json:"column,omitempty"` 593 594 // Description: Optional. Description of the column. Default value is an 595 // empty string. 596 Description string `json:"description,omitempty"` 597 598 // Mode: Optional. A column's mode indicates whether the values in this 599 // column are required, nullable, etc. Only `NULLABLE`, `REQUIRED` and 600 // `REPEATED` are supported. Default mode is `NULLABLE`. 601 Mode string `json:"mode,omitempty"` 602 603 // Subcolumns: Optional. Schema of sub-columns. A column can have zero 604 // or more sub-columns. 605 Subcolumns []*GoogleCloudDatacatalogV1beta1ColumnSchema `json:"subcolumns,omitempty"` 606 607 // Type: Required. Type of the column. 608 Type string `json:"type,omitempty"` 609 610 // ForceSendFields is a list of field names (e.g. "Column") to 611 // unconditionally include in API requests. By default, fields with 612 // empty values are omitted from API requests. However, any non-pointer, 613 // non-interface field appearing in ForceSendFields will be sent to the 614 // server regardless of whether the field is empty or not. This may be 615 // used to include empty fields in Patch requests. 616 ForceSendFields []string `json:"-"` 617 618 // NullFields is a list of field names (e.g. "Column") to include in API 619 // requests with the JSON null value. By default, fields with empty 620 // values are omitted from API requests. However, any field with an 621 // empty value appearing in NullFields will be sent to the server as 622 // null. It is an error if a field in this list has a non-empty value. 623 // This may be used to include null fields in Patch requests. 624 NullFields []string `json:"-"` 625} 626 627func (s *GoogleCloudDatacatalogV1beta1ColumnSchema) MarshalJSON() ([]byte, error) { 628 type NoMethod GoogleCloudDatacatalogV1beta1ColumnSchema 629 raw := NoMethod(*s) 630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 631} 632 633// GoogleCloudDatacatalogV1beta1Entry: Entry Metadata. A Data Catalog 634// Entry resource represents another resource in Google Cloud Platform 635// (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google 636// Cloud Platform. Clients can use the `linked_resource` field in the 637// Entry resource to refer to the original resource ID of the source 638// system. An Entry resource contains resource details, such as its 639// schema. An Entry can also be used to attach flexible metadata, such 640// as a Tag. 641type GoogleCloudDatacatalogV1beta1Entry struct { 642 // BigqueryDateShardedSpec: Specification for a group of BigQuery tables 643 // with name pattern `[prefix]YYYYMMDD`. Context: 644 // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. 645 BigqueryDateShardedSpec *GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec `json:"bigqueryDateShardedSpec,omitempty"` 646 647 // BigqueryTableSpec: Specification that applies to a BigQuery table. 648 // This is only valid on entries of type `TABLE`. 649 BigqueryTableSpec *GoogleCloudDatacatalogV1beta1BigQueryTableSpec `json:"bigqueryTableSpec,omitempty"` 650 651 // Description: Entry description, which can consist of several 652 // sentences or paragraphs that describe entry contents. Default value 653 // is an empty string. 654 Description string `json:"description,omitempty"` 655 656 // DisplayName: Display information such as title and description. A 657 // short name to identify the entry, for example, "Analytics Data - Jan 658 // 2011". Default value is an empty string. 659 DisplayName string `json:"displayName,omitempty"` 660 661 // GcsFilesetSpec: Specification that applies to a Cloud Storage 662 // fileset. This is only valid on entries of type FILESET. 663 GcsFilesetSpec *GoogleCloudDatacatalogV1beta1GcsFilesetSpec `json:"gcsFilesetSpec,omitempty"` 664 665 // IntegratedSystem: Output only. This field indicates the entry's 666 // source system that Data Catalog integrates with, such as BigQuery or 667 // Pub/Sub. 668 // 669 // Possible values: 670 // "INTEGRATED_SYSTEM_UNSPECIFIED" - Default unknown system. 671 // "BIGQUERY" - BigQuery. 672 // "CLOUD_PUBSUB" - Cloud Pub/Sub. 673 IntegratedSystem string `json:"integratedSystem,omitempty"` 674 675 // LinkedResource: The resource this metadata entry refers to. For 676 // Google Cloud Platform resources, `linked_resource` is the full name 677 // of the resource 678 // (https://cloud.google.com/apis/design/resource_names#full_resource_name). 679 // For example, the `linked_resource` for a table resource from BigQuery 680 // is: * 681 // //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables 682 // /tableId Output only when Entry is of type in the EntryType enum. For 683 // entries with user_specified_type, this field is optional and defaults 684 // to an empty string. 685 LinkedResource string `json:"linkedResource,omitempty"` 686 687 // Name: Output only. The Data Catalog resource name of the entry in URL 688 // format. Example: * 689 // projects/{project_id}/locations/{location}/entryGroups/{entry_group_id 690 // }/entries/{entry_id} Note that this Entry and its child resources may 691 // not actually be stored in the location in this name. 692 Name string `json:"name,omitempty"` 693 694 // Schema: Schema of the entry. An entry might not have any schema 695 // attached to it. 696 Schema *GoogleCloudDatacatalogV1beta1Schema `json:"schema,omitempty"` 697 698 // SourceSystemTimestamps: Output only. Timestamps about the underlying 699 // resource, not about this Data Catalog entry. Output only when Entry 700 // is of type in the EntryType enum. For entries with 701 // user_specified_type, this field is optional and defaults to an empty 702 // timestamp. 703 SourceSystemTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"sourceSystemTimestamps,omitempty"` 704 705 // Type: The type of the entry. Only used for Entries with types in the 706 // EntryType enum. 707 // 708 // Possible values: 709 // "ENTRY_TYPE_UNSPECIFIED" - Default unknown type. 710 // "TABLE" - Output only. The type of entry that has a GoogleSQL 711 // schema, including logical views. 712 // "MODEL" - Output only. The type of models. 713 // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro 714 // "DATA_STREAM" - Output only. An entry type which is used for 715 // streaming entries. Example: Pub/Sub topic. 716 // "FILESET" - An entry type which is a set of files or objects. 717 // Example: Cloud Storage fileset. 718 Type string `json:"type,omitempty"` 719 720 // UsageSignal: Output only. Statistics on the usage level of the 721 // resource. 722 UsageSignal *GoogleCloudDatacatalogV1beta1UsageSignal `json:"usageSignal,omitempty"` 723 724 // UserSpecifiedSystem: This field indicates the entry's source system 725 // that Data Catalog does not integrate with. `user_specified_system` 726 // strings must begin with a letter or underscore and can only contain 727 // letters, numbers, and underscores; are case insensitive; must be at 728 // least 1 character and at most 64 characters long. 729 UserSpecifiedSystem string `json:"userSpecifiedSystem,omitempty"` 730 731 // UserSpecifiedType: Entry type if it does not fit any of the 732 // input-allowed values listed in `EntryType` enum above. When creating 733 // an entry, users should check the enum values first, if nothing 734 // matches the entry to be created, then provide a custom value, for 735 // example "my_special_type". `user_specified_type` strings must begin 736 // with a letter or underscore and can only contain letters, numbers, 737 // and underscores; are case insensitive; must be at least 1 character 738 // and at most 64 characters long. Currently, only FILESET enum value is 739 // allowed. All other entries created through Data Catalog must use 740 // `user_specified_type`. 741 UserSpecifiedType string `json:"userSpecifiedType,omitempty"` 742 743 // ServerResponse contains the HTTP response code and headers from the 744 // server. 745 googleapi.ServerResponse `json:"-"` 746 747 // ForceSendFields is a list of field names (e.g. 748 // "BigqueryDateShardedSpec") to unconditionally include in API 749 // requests. By default, fields with empty values are omitted from API 750 // requests. However, any non-pointer, non-interface field appearing in 751 // ForceSendFields will be sent to the server regardless of whether the 752 // field is empty or not. This may be used to include empty fields in 753 // Patch requests. 754 ForceSendFields []string `json:"-"` 755 756 // NullFields is a list of field names (e.g. "BigqueryDateShardedSpec") 757 // to include in API requests with the JSON null value. By default, 758 // fields with empty values are omitted from API requests. However, any 759 // field with an empty value appearing in NullFields will be sent to the 760 // server as null. It is an error if a field in this list has a 761 // non-empty value. This may be used to include null fields in Patch 762 // requests. 763 NullFields []string `json:"-"` 764} 765 766func (s *GoogleCloudDatacatalogV1beta1Entry) MarshalJSON() ([]byte, error) { 767 type NoMethod GoogleCloudDatacatalogV1beta1Entry 768 raw := NoMethod(*s) 769 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 770} 771 772// GoogleCloudDatacatalogV1beta1EntryGroup: EntryGroup Metadata. An 773// EntryGroup resource represents a logical grouping of zero or more 774// Data Catalog Entry resources. 775type GoogleCloudDatacatalogV1beta1EntryGroup struct { 776 // DataCatalogTimestamps: Output only. Timestamps about this EntryGroup. 777 // Default value is empty timestamps. 778 DataCatalogTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"dataCatalogTimestamps,omitempty"` 779 780 // Description: Entry group description, which can consist of several 781 // sentences or paragraphs that describe entry group contents. Default 782 // value is an empty string. 783 Description string `json:"description,omitempty"` 784 785 // DisplayName: A short name to identify the entry group, for example, 786 // "analytics data - jan 2011". Default value is an empty string. 787 DisplayName string `json:"displayName,omitempty"` 788 789 // Name: The resource name of the entry group in URL format. Example: * 790 // projects/{project_id}/locations/{location}/entryGroups/{entry_group_id 791 // } Note that this EntryGroup and its child resources may not actually 792 // be stored in the location in this name. 793 Name string `json:"name,omitempty"` 794 795 // ServerResponse contains the HTTP response code and headers from the 796 // server. 797 googleapi.ServerResponse `json:"-"` 798 799 // ForceSendFields is a list of field names (e.g. 800 // "DataCatalogTimestamps") to unconditionally include in API requests. 801 // By default, fields with empty values are omitted from API requests. 802 // However, any non-pointer, non-interface field appearing in 803 // ForceSendFields will be sent to the server regardless of whether the 804 // field is empty or not. This may be used to include empty fields in 805 // Patch requests. 806 ForceSendFields []string `json:"-"` 807 808 // NullFields is a list of field names (e.g. "DataCatalogTimestamps") to 809 // include in API requests with the JSON null value. By default, fields 810 // with empty values are omitted from API requests. However, any field 811 // with an empty value appearing in NullFields will be sent to the 812 // server as null. It is an error if a field in this list has a 813 // non-empty value. This may be used to include null fields in Patch 814 // requests. 815 NullFields []string `json:"-"` 816} 817 818func (s *GoogleCloudDatacatalogV1beta1EntryGroup) MarshalJSON() ([]byte, error) { 819 type NoMethod GoogleCloudDatacatalogV1beta1EntryGroup 820 raw := NoMethod(*s) 821 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 822} 823 824// GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse: Response 825// message for ExportTaxonomies. 826type GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse struct { 827 // Taxonomies: List of taxonomies and policy tags in a tree structure. 828 Taxonomies []*GoogleCloudDatacatalogV1beta1SerializedTaxonomy `json:"taxonomies,omitempty"` 829 830 // ServerResponse contains the HTTP response code and headers from the 831 // server. 832 googleapi.ServerResponse `json:"-"` 833 834 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 835 // unconditionally include in API requests. By default, fields with 836 // empty values are omitted from API requests. However, any non-pointer, 837 // non-interface field appearing in ForceSendFields will be sent to the 838 // server regardless of whether the field is empty or not. This may be 839 // used to include empty fields in Patch requests. 840 ForceSendFields []string `json:"-"` 841 842 // NullFields is a list of field names (e.g. "Taxonomies") to include in 843 // API requests with the JSON null value. By default, fields with empty 844 // values are omitted from API requests. However, any field with an 845 // empty value appearing in NullFields will be sent to the server as 846 // null. It is an error if a field in this list has a non-empty value. 847 // This may be used to include null fields in Patch requests. 848 NullFields []string `json:"-"` 849} 850 851func (s *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse) MarshalJSON() ([]byte, error) { 852 type NoMethod GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse 853 raw := NoMethod(*s) 854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 855} 856 857type GoogleCloudDatacatalogV1beta1FieldType struct { 858 // EnumType: Represents an enum type. 859 EnumType *GoogleCloudDatacatalogV1beta1FieldTypeEnumType `json:"enumType,omitempty"` 860 861 // PrimitiveType: Represents primitive types - string, bool etc. 862 // 863 // Possible values: 864 // "PRIMITIVE_TYPE_UNSPECIFIED" - This is the default invalid value 865 // for a type. 866 // "DOUBLE" - A double precision number. 867 // "STRING" - An UTF-8 string. 868 // "BOOL" - A boolean value. 869 // "TIMESTAMP" - A timestamp. 870 PrimitiveType string `json:"primitiveType,omitempty"` 871 872 // ForceSendFields is a list of field names (e.g. "EnumType") 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. "EnumType") 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 *GoogleCloudDatacatalogV1beta1FieldType) MarshalJSON() ([]byte, error) { 890 type NoMethod GoogleCloudDatacatalogV1beta1FieldType 891 raw := NoMethod(*s) 892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 893} 894 895type GoogleCloudDatacatalogV1beta1FieldTypeEnumType struct { 896 AllowedValues []*GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue `json:"allowedValues,omitempty"` 897 898 // ForceSendFields is a list of field names (e.g. "AllowedValues") to 899 // unconditionally include in API requests. By default, fields with 900 // empty values are omitted from API requests. However, any non-pointer, 901 // non-interface field appearing in ForceSendFields will be sent to the 902 // server regardless of whether the field is empty or not. This may be 903 // used to include empty fields in Patch requests. 904 ForceSendFields []string `json:"-"` 905 906 // NullFields is a list of field names (e.g. "AllowedValues") to include 907 // in API requests with the JSON null value. By default, fields with 908 // empty values are omitted from API requests. However, any field with 909 // an empty value appearing in NullFields will be sent to the server as 910 // null. It is an error if a field in this list has a non-empty value. 911 // This may be used to include null fields in Patch requests. 912 NullFields []string `json:"-"` 913} 914 915func (s *GoogleCloudDatacatalogV1beta1FieldTypeEnumType) MarshalJSON() ([]byte, error) { 916 type NoMethod GoogleCloudDatacatalogV1beta1FieldTypeEnumType 917 raw := NoMethod(*s) 918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 919} 920 921type GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue struct { 922 // DisplayName: Required. The display name of the enum value. Must not 923 // be an empty string. 924 DisplayName string `json:"displayName,omitempty"` 925 926 // ForceSendFields is a list of field names (e.g. "DisplayName") to 927 // unconditionally include in API requests. By default, fields with 928 // empty values are omitted from API requests. However, any non-pointer, 929 // non-interface field appearing in ForceSendFields will be sent to the 930 // server regardless of whether the field is empty or not. This may be 931 // used to include empty fields in Patch requests. 932 ForceSendFields []string `json:"-"` 933 934 // NullFields is a list of field names (e.g. "DisplayName") to include 935 // in API requests with the JSON null value. By default, fields with 936 // empty values are omitted from API requests. However, any field with 937 // an empty value appearing in NullFields will be sent to the server as 938 // null. It is an error if a field in this list has a non-empty value. 939 // This may be used to include null fields in Patch requests. 940 NullFields []string `json:"-"` 941} 942 943func (s *GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue) MarshalJSON() ([]byte, error) { 944 type NoMethod GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue 945 raw := NoMethod(*s) 946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 947} 948 949// GoogleCloudDatacatalogV1beta1GcsFileSpec: Specifications of a single 950// file in Cloud Storage. 951type GoogleCloudDatacatalogV1beta1GcsFileSpec struct { 952 // FilePath: Required. The full file path. Example: 953 // `gs://bucket_name/a/b.txt`. 954 FilePath string `json:"filePath,omitempty"` 955 956 // GcsTimestamps: Output only. Timestamps about the Cloud Storage file. 957 GcsTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"gcsTimestamps,omitempty"` 958 959 // SizeBytes: Output only. The size of the file, in bytes. 960 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 961 962 // ForceSendFields is a list of field names (e.g. "FilePath") to 963 // unconditionally include in API requests. By default, fields with 964 // empty values are omitted from API requests. However, any non-pointer, 965 // non-interface field appearing in ForceSendFields will be sent to the 966 // server regardless of whether the field is empty or not. This may be 967 // used to include empty fields in Patch requests. 968 ForceSendFields []string `json:"-"` 969 970 // NullFields is a list of field names (e.g. "FilePath") to include in 971 // API requests with the JSON null value. By default, fields with empty 972 // values are omitted from API requests. However, any field with an 973 // empty value appearing in NullFields will be sent to the server as 974 // null. It is an error if a field in this list has a non-empty value. 975 // This may be used to include null fields in Patch requests. 976 NullFields []string `json:"-"` 977} 978 979func (s *GoogleCloudDatacatalogV1beta1GcsFileSpec) MarshalJSON() ([]byte, error) { 980 type NoMethod GoogleCloudDatacatalogV1beta1GcsFileSpec 981 raw := NoMethod(*s) 982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 983} 984 985// GoogleCloudDatacatalogV1beta1GcsFilesetSpec: Describes a Cloud 986// Storage fileset entry. 987type GoogleCloudDatacatalogV1beta1GcsFilesetSpec struct { 988 // FilePatterns: Required. Patterns to identify a set of files in Google 989 // Cloud Storage. See Cloud Storage documentation 990 // (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames) 991 // for more information. Note that bucket wildcards are currently not 992 // supported. Examples of valid file_patterns: * 993 // `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` 994 // directory. * `gs://bucket_name/dir/**`: matches all files in 995 // `bucket_name/dir` spanning all subdirectories. * 996 // `gs://bucket_name/file*`: matches files prefixed by `file` in 997 // `bucket_name` * `gs://bucket_name/??.txt`: matches files with two 998 // characters followed by `.txt` in `bucket_name` * 999 // `gs://bucket_name/[aeiou].txt`: matches files that contain a single 1000 // vowel character followed by `.txt` in `bucket_name` * 1001 // `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, 1002 // ... or `m` followed by `.txt` in `bucket_name` * 1003 // `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that 1004 // match `a/*/b` pattern, such as `a/c/b`, `a/d/b` * 1005 // `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` You 1006 // can combine wildcards to provide more powerful matches, for example: 1007 // * `gs://bucket_name/[a-m]??.j*g` 1008 FilePatterns []string `json:"filePatterns,omitempty"` 1009 1010 // SampleGcsFileSpecs: Output only. Sample files contained in this 1011 // fileset, not all files contained in this fileset are represented 1012 // here. 1013 SampleGcsFileSpecs []*GoogleCloudDatacatalogV1beta1GcsFileSpec `json:"sampleGcsFileSpecs,omitempty"` 1014 1015 // ForceSendFields is a list of field names (e.g. "FilePatterns") to 1016 // unconditionally include in API requests. By default, fields with 1017 // empty values are omitted from API requests. However, any non-pointer, 1018 // non-interface field appearing in ForceSendFields will be sent to the 1019 // server regardless of whether the field is empty or not. This may be 1020 // used to include empty fields in Patch requests. 1021 ForceSendFields []string `json:"-"` 1022 1023 // NullFields is a list of field names (e.g. "FilePatterns") to include 1024 // in API requests with the JSON null value. By default, fields with 1025 // empty values are omitted from API requests. However, any field with 1026 // an empty value appearing in NullFields will be sent to the server as 1027 // null. It is an error if a field in this list has a non-empty value. 1028 // This may be used to include null fields in Patch requests. 1029 NullFields []string `json:"-"` 1030} 1031 1032func (s *GoogleCloudDatacatalogV1beta1GcsFilesetSpec) MarshalJSON() ([]byte, error) { 1033 type NoMethod GoogleCloudDatacatalogV1beta1GcsFilesetSpec 1034 raw := NoMethod(*s) 1035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1036} 1037 1038// GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest: Request message 1039// for ImportTaxonomies. 1040type GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest struct { 1041 // InlineSource: Inline source used for taxonomies to be imported. 1042 InlineSource *GoogleCloudDatacatalogV1beta1InlineSource `json:"inlineSource,omitempty"` 1043 1044 // ForceSendFields is a list of field names (e.g. "InlineSource") to 1045 // unconditionally include in API requests. By default, fields with 1046 // empty values are omitted from API requests. However, any non-pointer, 1047 // non-interface field appearing in ForceSendFields will be sent to the 1048 // server regardless of whether the field is empty or not. This may be 1049 // used to include empty fields in Patch requests. 1050 ForceSendFields []string `json:"-"` 1051 1052 // NullFields is a list of field names (e.g. "InlineSource") to include 1053 // in API requests with the JSON null value. By default, fields with 1054 // empty values are omitted from API requests. However, any field with 1055 // an empty value appearing in NullFields will be sent to the server as 1056 // null. It is an error if a field in this list has a non-empty value. 1057 // This may be used to include null fields in Patch requests. 1058 NullFields []string `json:"-"` 1059} 1060 1061func (s *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest) MarshalJSON() ([]byte, error) { 1062 type NoMethod GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest 1063 raw := NoMethod(*s) 1064 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1065} 1066 1067// GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse: Response 1068// message for ImportTaxonomies. 1069type GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse struct { 1070 // Taxonomies: Taxonomies that were imported. 1071 Taxonomies []*GoogleCloudDatacatalogV1beta1Taxonomy `json:"taxonomies,omitempty"` 1072 1073 // ServerResponse contains the HTTP response code and headers from the 1074 // server. 1075 googleapi.ServerResponse `json:"-"` 1076 1077 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 1078 // unconditionally include in API requests. By default, fields with 1079 // empty values are omitted from API requests. However, any non-pointer, 1080 // non-interface field appearing in ForceSendFields will be sent to the 1081 // server regardless of whether the field is empty or not. This may be 1082 // used to include empty fields in Patch requests. 1083 ForceSendFields []string `json:"-"` 1084 1085 // NullFields is a list of field names (e.g. "Taxonomies") to include in 1086 // API requests with the JSON null value. By default, fields with empty 1087 // values are omitted from API requests. However, any field with an 1088 // empty value appearing in NullFields will be sent to the server as 1089 // null. It is an error if a field in this list has a non-empty value. 1090 // This may be used to include null fields in Patch requests. 1091 NullFields []string `json:"-"` 1092} 1093 1094func (s *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse) MarshalJSON() ([]byte, error) { 1095 type NoMethod GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse 1096 raw := NoMethod(*s) 1097 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1098} 1099 1100// GoogleCloudDatacatalogV1beta1InlineSource: Inline source used for 1101// taxonomies import. 1102type GoogleCloudDatacatalogV1beta1InlineSource struct { 1103 // Taxonomies: Required. Taxonomies to be imported. 1104 Taxonomies []*GoogleCloudDatacatalogV1beta1SerializedTaxonomy `json:"taxonomies,omitempty"` 1105 1106 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 1107 // unconditionally include in API requests. By default, fields with 1108 // empty values are omitted from API requests. However, any non-pointer, 1109 // non-interface field appearing in ForceSendFields will be sent to the 1110 // server regardless of whether the field is empty or not. This may be 1111 // used to include empty fields in Patch requests. 1112 ForceSendFields []string `json:"-"` 1113 1114 // NullFields is a list of field names (e.g. "Taxonomies") to include in 1115 // API requests with the JSON null value. By default, fields with empty 1116 // values are omitted from API requests. However, any field with an 1117 // empty value appearing in NullFields will be sent to the server as 1118 // null. It is an error if a field in this list has a non-empty value. 1119 // This may be used to include null fields in Patch requests. 1120 NullFields []string `json:"-"` 1121} 1122 1123func (s *GoogleCloudDatacatalogV1beta1InlineSource) MarshalJSON() ([]byte, error) { 1124 type NoMethod GoogleCloudDatacatalogV1beta1InlineSource 1125 raw := NoMethod(*s) 1126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1127} 1128 1129// GoogleCloudDatacatalogV1beta1ListEntriesResponse: Response message 1130// for ListEntries. 1131type GoogleCloudDatacatalogV1beta1ListEntriesResponse struct { 1132 // Entries: Entry details. 1133 Entries []*GoogleCloudDatacatalogV1beta1Entry `json:"entries,omitempty"` 1134 1135 // NextPageToken: Token to retrieve the next page of results. It is set 1136 // to empty if no items remain in results. 1137 NextPageToken string `json:"nextPageToken,omitempty"` 1138 1139 // ServerResponse contains the HTTP response code and headers from the 1140 // server. 1141 googleapi.ServerResponse `json:"-"` 1142 1143 // ForceSendFields is a list of field names (e.g. "Entries") to 1144 // unconditionally include in API requests. By default, fields with 1145 // empty values are omitted from API requests. However, any non-pointer, 1146 // non-interface field appearing in ForceSendFields will be sent to the 1147 // server regardless of whether the field is empty or not. This may be 1148 // used to include empty fields in Patch requests. 1149 ForceSendFields []string `json:"-"` 1150 1151 // NullFields is a list of field names (e.g. "Entries") to include in 1152 // API requests with the JSON null value. By default, fields with empty 1153 // values are omitted from API requests. However, any field with an 1154 // empty value appearing in NullFields will be sent to the server as 1155 // null. It is an error if a field in this list has a non-empty value. 1156 // This may be used to include null fields in Patch requests. 1157 NullFields []string `json:"-"` 1158} 1159 1160func (s *GoogleCloudDatacatalogV1beta1ListEntriesResponse) MarshalJSON() ([]byte, error) { 1161 type NoMethod GoogleCloudDatacatalogV1beta1ListEntriesResponse 1162 raw := NoMethod(*s) 1163 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1164} 1165 1166// GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse: Response 1167// message for ListEntryGroups. 1168type GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse struct { 1169 // EntryGroups: EntryGroup details. 1170 EntryGroups []*GoogleCloudDatacatalogV1beta1EntryGroup `json:"entryGroups,omitempty"` 1171 1172 // NextPageToken: Token to retrieve the next page of results. It is set 1173 // to empty if no items remain in results. 1174 NextPageToken string `json:"nextPageToken,omitempty"` 1175 1176 // ServerResponse contains the HTTP response code and headers from the 1177 // server. 1178 googleapi.ServerResponse `json:"-"` 1179 1180 // ForceSendFields is a list of field names (e.g. "EntryGroups") to 1181 // unconditionally include in API requests. By default, fields with 1182 // empty values are omitted from API requests. However, any non-pointer, 1183 // non-interface field appearing in ForceSendFields will be sent to the 1184 // server regardless of whether the field is empty or not. This may be 1185 // used to include empty fields in Patch requests. 1186 ForceSendFields []string `json:"-"` 1187 1188 // NullFields is a list of field names (e.g. "EntryGroups") to include 1189 // in API requests with the JSON null value. By default, fields with 1190 // empty values are omitted from API requests. However, any field with 1191 // an empty value appearing in NullFields will be sent to the server as 1192 // null. It is an error if a field in this list has a non-empty value. 1193 // This may be used to include null fields in Patch requests. 1194 NullFields []string `json:"-"` 1195} 1196 1197func (s *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse) MarshalJSON() ([]byte, error) { 1198 type NoMethod GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse 1199 raw := NoMethod(*s) 1200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1201} 1202 1203// GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse: Response message 1204// for ListPolicyTags. 1205type GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse struct { 1206 // NextPageToken: Token used to retrieve the next page of results, or 1207 // empty if there are no more results in the list. 1208 NextPageToken string `json:"nextPageToken,omitempty"` 1209 1210 // PolicyTags: The policy tags that are in the requested taxonomy. 1211 PolicyTags []*GoogleCloudDatacatalogV1beta1PolicyTag `json:"policyTags,omitempty"` 1212 1213 // ServerResponse contains the HTTP response code and headers from the 1214 // server. 1215 googleapi.ServerResponse `json:"-"` 1216 1217 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1218 // unconditionally include in API requests. By default, fields with 1219 // empty values are omitted from API requests. However, any non-pointer, 1220 // non-interface field appearing in ForceSendFields will be sent to the 1221 // server regardless of whether the field is empty or not. This may be 1222 // used to include empty fields in Patch requests. 1223 ForceSendFields []string `json:"-"` 1224 1225 // NullFields is a list of field names (e.g. "NextPageToken") to include 1226 // in API requests with the JSON null value. By default, fields with 1227 // empty values are omitted from API requests. However, any field with 1228 // an empty value appearing in NullFields will be sent to the server as 1229 // null. It is an error if a field in this list has a non-empty value. 1230 // This may be used to include null fields in Patch requests. 1231 NullFields []string `json:"-"` 1232} 1233 1234func (s *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse) MarshalJSON() ([]byte, error) { 1235 type NoMethod GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse 1236 raw := NoMethod(*s) 1237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1238} 1239 1240// GoogleCloudDatacatalogV1beta1ListTagsResponse: Response message for 1241// ListTags. 1242type GoogleCloudDatacatalogV1beta1ListTagsResponse struct { 1243 // NextPageToken: Token to retrieve the next page of results. It is set 1244 // to empty if no items remain in results. 1245 NextPageToken string `json:"nextPageToken,omitempty"` 1246 1247 // Tags: Tag details. 1248 Tags []*GoogleCloudDatacatalogV1beta1Tag `json:"tags,omitempty"` 1249 1250 // ServerResponse contains the HTTP response code and headers from the 1251 // server. 1252 googleapi.ServerResponse `json:"-"` 1253 1254 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1255 // unconditionally include in API requests. By default, fields with 1256 // empty values are omitted from API requests. However, any non-pointer, 1257 // non-interface field appearing in ForceSendFields will be sent to the 1258 // server regardless of whether the field is empty or not. This may be 1259 // used to include empty fields in Patch requests. 1260 ForceSendFields []string `json:"-"` 1261 1262 // NullFields is a list of field names (e.g. "NextPageToken") to include 1263 // in API requests with the JSON null value. By default, fields with 1264 // empty values are omitted from API requests. However, any field with 1265 // an empty value appearing in NullFields will be sent to the server as 1266 // null. It is an error if a field in this list has a non-empty value. 1267 // This may be used to include null fields in Patch requests. 1268 NullFields []string `json:"-"` 1269} 1270 1271func (s *GoogleCloudDatacatalogV1beta1ListTagsResponse) MarshalJSON() ([]byte, error) { 1272 type NoMethod GoogleCloudDatacatalogV1beta1ListTagsResponse 1273 raw := NoMethod(*s) 1274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1275} 1276 1277// GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse: Response message 1278// for ListTaxonomies. 1279type GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse struct { 1280 // NextPageToken: Token used to retrieve the next page of results, or 1281 // empty if there are no more results in the list. 1282 NextPageToken string `json:"nextPageToken,omitempty"` 1283 1284 // Taxonomies: Taxonomies that the project contains. 1285 Taxonomies []*GoogleCloudDatacatalogV1beta1Taxonomy `json:"taxonomies,omitempty"` 1286 1287 // ServerResponse contains the HTTP response code and headers from the 1288 // server. 1289 googleapi.ServerResponse `json:"-"` 1290 1291 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1292 // unconditionally include in API requests. By default, fields with 1293 // empty values are omitted from API requests. However, any non-pointer, 1294 // non-interface field appearing in ForceSendFields will be sent to the 1295 // server regardless of whether the field is empty or not. This may be 1296 // used to include empty fields in Patch requests. 1297 ForceSendFields []string `json:"-"` 1298 1299 // NullFields is a list of field names (e.g. "NextPageToken") to include 1300 // in API requests with the JSON null value. By default, fields with 1301 // empty values are omitted from API requests. However, any field with 1302 // an empty value appearing in NullFields will be sent to the server as 1303 // null. It is an error if a field in this list has a non-empty value. 1304 // This may be used to include null fields in Patch requests. 1305 NullFields []string `json:"-"` 1306} 1307 1308func (s *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse) MarshalJSON() ([]byte, error) { 1309 type NoMethod GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse 1310 raw := NoMethod(*s) 1311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1312} 1313 1314// GoogleCloudDatacatalogV1beta1PolicyTag: Denotes one policy tag in a 1315// taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For 1316// example, consider the following hierarchy: Geolocation -> (LatLong, 1317// City, ZipCode). PolicyTag "Geolocation" contains three child policy 1318// tags: "LatLong", "City", and "ZipCode". 1319type GoogleCloudDatacatalogV1beta1PolicyTag struct { 1320 // ChildPolicyTags: Output only. Resource names of child policy tags of 1321 // this policy tag. 1322 ChildPolicyTags []string `json:"childPolicyTags,omitempty"` 1323 1324 // Description: Description of this policy tag. It must: contain only 1325 // unicode characters, tabs, newlines, carriage returns and page breaks; 1326 // and be at most 2000 bytes long when encoded in UTF-8. If not set, 1327 // defaults to an empty description. If not set, defaults to an empty 1328 // description. 1329 Description string `json:"description,omitempty"` 1330 1331 // DisplayName: Required. User defined name of this policy tag. It must: 1332 // be unique within the parent taxonomy; contain only unicode letters, 1333 // numbers, underscores, dashes and spaces; not start or end with 1334 // spaces; and be at most 200 bytes long when encoded in UTF-8. 1335 DisplayName string `json:"displayName,omitempty"` 1336 1337 // Name: Output only. Resource name of this policy tag, whose format is: 1338 // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonom 1339 // y_id}/policyTags/{id}". 1340 Name string `json:"name,omitempty"` 1341 1342 // ParentPolicyTag: Resource name of this policy tag's parent policy tag 1343 // (e.g. for the "LatLong" policy tag in the example above, this field 1344 // contains the resource name of the "Geolocation" policy tag). If 1345 // empty, it means this policy tag is a top level policy tag (e.g. this 1346 // field is empty for the "Geolocation" policy tag in the example 1347 // above). If not set, defaults to an empty string. 1348 ParentPolicyTag string `json:"parentPolicyTag,omitempty"` 1349 1350 // ServerResponse contains the HTTP response code and headers from the 1351 // server. 1352 googleapi.ServerResponse `json:"-"` 1353 1354 // ForceSendFields is a list of field names (e.g. "ChildPolicyTags") to 1355 // unconditionally include in API requests. By default, fields with 1356 // empty values are omitted from API requests. However, any non-pointer, 1357 // non-interface field appearing in ForceSendFields will be sent to the 1358 // server regardless of whether the field is empty or not. This may be 1359 // used to include empty fields in Patch requests. 1360 ForceSendFields []string `json:"-"` 1361 1362 // NullFields is a list of field names (e.g. "ChildPolicyTags") to 1363 // include in API requests with the JSON null value. By default, fields 1364 // with empty values are omitted from API requests. However, any field 1365 // with an empty value appearing in NullFields will be sent to the 1366 // server as null. It is an error if a field in this list has a 1367 // non-empty value. This may be used to include null fields in Patch 1368 // requests. 1369 NullFields []string `json:"-"` 1370} 1371 1372func (s *GoogleCloudDatacatalogV1beta1PolicyTag) MarshalJSON() ([]byte, error) { 1373 type NoMethod GoogleCloudDatacatalogV1beta1PolicyTag 1374 raw := NoMethod(*s) 1375 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1376} 1377 1378// GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest: 1379// Request message for RenameTagTemplateFieldEnumValue. 1380type GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest struct { 1381 // NewEnumValueDisplayName: Required. The new display name of the enum 1382 // value. For example, `my_new_enum_value`. 1383 NewEnumValueDisplayName string `json:"newEnumValueDisplayName,omitempty"` 1384 1385 // ForceSendFields is a list of field names (e.g. 1386 // "NewEnumValueDisplayName") to unconditionally include in API 1387 // requests. By default, fields with empty values are omitted from API 1388 // requests. However, any non-pointer, non-interface field appearing in 1389 // ForceSendFields will be sent to the server regardless of whether the 1390 // field is empty or not. This may be used to include empty fields in 1391 // Patch requests. 1392 ForceSendFields []string `json:"-"` 1393 1394 // NullFields is a list of field names (e.g. "NewEnumValueDisplayName") 1395 // to include in API requests with the JSON null value. By default, 1396 // fields with empty values are omitted from API requests. However, any 1397 // field with an empty value appearing in NullFields will be sent to the 1398 // server as null. It is an error if a field in this list has a 1399 // non-empty value. This may be used to include null fields in Patch 1400 // requests. 1401 NullFields []string `json:"-"` 1402} 1403 1404func (s *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest) MarshalJSON() ([]byte, error) { 1405 type NoMethod GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest 1406 raw := NoMethod(*s) 1407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1408} 1409 1410// GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest: Request 1411// message for RenameTagTemplateField. 1412type GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest struct { 1413 // NewTagTemplateFieldId: Required. The new ID of this tag template 1414 // field. For example, `my_new_field`. 1415 NewTagTemplateFieldId string `json:"newTagTemplateFieldId,omitempty"` 1416 1417 // ForceSendFields is a list of field names (e.g. 1418 // "NewTagTemplateFieldId") to unconditionally include in API requests. 1419 // By default, fields with empty values are omitted from API requests. 1420 // However, any non-pointer, non-interface field appearing in 1421 // ForceSendFields will be sent to the server regardless of whether the 1422 // field is empty or not. This may be used to include empty fields in 1423 // Patch requests. 1424 ForceSendFields []string `json:"-"` 1425 1426 // NullFields is a list of field names (e.g. "NewTagTemplateFieldId") to 1427 // include in API requests with the JSON null value. By default, fields 1428 // with empty values are omitted from API requests. However, any field 1429 // with an empty value appearing in NullFields will be sent to the 1430 // server as null. It is an error if a field in this list has a 1431 // non-empty value. This may be used to include null fields in Patch 1432 // requests. 1433 NullFields []string `json:"-"` 1434} 1435 1436func (s *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest) MarshalJSON() ([]byte, error) { 1437 type NoMethod GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest 1438 raw := NoMethod(*s) 1439 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1440} 1441 1442// GoogleCloudDatacatalogV1beta1Schema: Represents a schema (e.g. 1443// BigQuery, GoogleSQL, Avro schema). 1444type GoogleCloudDatacatalogV1beta1Schema struct { 1445 // Columns: Required. Schema of columns. A maximum of 10,000 columns and 1446 // sub-columns can be specified. 1447 Columns []*GoogleCloudDatacatalogV1beta1ColumnSchema `json:"columns,omitempty"` 1448 1449 // ForceSendFields is a list of field names (e.g. "Columns") to 1450 // unconditionally include in API requests. By default, fields with 1451 // empty values are omitted from API requests. However, any non-pointer, 1452 // non-interface field appearing in ForceSendFields will be sent to the 1453 // server regardless of whether the field is empty or not. This may be 1454 // used to include empty fields in Patch requests. 1455 ForceSendFields []string `json:"-"` 1456 1457 // NullFields is a list of field names (e.g. "Columns") to include in 1458 // API requests with the JSON null value. By default, fields with empty 1459 // values are omitted from API requests. However, any field with an 1460 // empty value appearing in NullFields will be sent to the server as 1461 // null. It is an error if a field in this list has a non-empty value. 1462 // This may be used to include null fields in Patch requests. 1463 NullFields []string `json:"-"` 1464} 1465 1466func (s *GoogleCloudDatacatalogV1beta1Schema) MarshalJSON() ([]byte, error) { 1467 type NoMethod GoogleCloudDatacatalogV1beta1Schema 1468 raw := NoMethod(*s) 1469 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1470} 1471 1472// GoogleCloudDatacatalogV1beta1SearchCatalogRequest: Request message 1473// for SearchCatalog. 1474type GoogleCloudDatacatalogV1beta1SearchCatalogRequest struct { 1475 // OrderBy: Specifies the ordering of results, currently supported 1476 // case-sensitive choices are: * `relevance`, only supports descending * 1477 // `last_modified_timestamp [asc|desc]`, defaults to descending if not 1478 // specified If not specified, defaults to `relevance` descending. 1479 OrderBy string `json:"orderBy,omitempty"` 1480 1481 // PageSize: Number of results in the search page. If <=0 then defaults 1482 // to 10. Max limit for page_size is 1000. Throws an invalid argument 1483 // for page_size > 1000. 1484 PageSize int64 `json:"pageSize,omitempty"` 1485 1486 // PageToken: Optional. Pagination token returned in an earlier 1487 // SearchCatalogResponse.next_page_token, which indicates that this is a 1488 // continuation of a prior SearchCatalogRequest call, and that the 1489 // system should return the next page of data. If empty, the first page 1490 // is returned. 1491 PageToken string `json:"pageToken,omitempty"` 1492 1493 // Query: Optional. The query string in search query syntax. An empty 1494 // query string will result in all data assets (in the specified scope) 1495 // that the user has access to. Query strings can be simple as "x" or 1496 // more qualified as: * name:x * column:x * description:y Note: Query 1497 // tokens need to have a minimum of 3 characters for substring matching 1498 // to work correctly. See Data Catalog Search Syntax 1499 // (https://cloud.google.com/data-catalog/docs/how-to/search-reference) 1500 // for more information. 1501 Query string `json:"query,omitempty"` 1502 1503 // Scope: Required. The scope of this search request. A `scope` that has 1504 // empty `include_org_ids`, `include_project_ids` AND false 1505 // `include_gcp_public_datasets` is considered invalid. Data Catalog 1506 // will return an error in such a case. 1507 Scope *GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope `json:"scope,omitempty"` 1508 1509 // ForceSendFields is a list of field names (e.g. "OrderBy") to 1510 // unconditionally include in API requests. By default, fields with 1511 // empty values are omitted from API requests. However, any non-pointer, 1512 // non-interface field appearing in ForceSendFields will be sent to the 1513 // server regardless of whether the field is empty or not. This may be 1514 // used to include empty fields in Patch requests. 1515 ForceSendFields []string `json:"-"` 1516 1517 // NullFields is a list of field names (e.g. "OrderBy") to include in 1518 // API requests with the JSON null value. By default, fields with empty 1519 // values are omitted from API requests. However, any field with an 1520 // empty value appearing in NullFields will be sent to the server as 1521 // null. It is an error if a field in this list has a non-empty value. 1522 // This may be used to include null fields in Patch requests. 1523 NullFields []string `json:"-"` 1524} 1525 1526func (s *GoogleCloudDatacatalogV1beta1SearchCatalogRequest) MarshalJSON() ([]byte, error) { 1527 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogRequest 1528 raw := NoMethod(*s) 1529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1530} 1531 1532// GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope: The criteria 1533// that select the subspace used for query matching. 1534type GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope struct { 1535 // IncludeGcpPublicDatasets: If `true`, include Google Cloud Platform 1536 // (GCP) public datasets in the search results. Info on GCP public 1537 // datasets is available at https://cloud.google.com/public-datasets/. 1538 // By default, GCP public datasets are excluded. 1539 IncludeGcpPublicDatasets bool `json:"includeGcpPublicDatasets,omitempty"` 1540 1541 // IncludeOrgIds: The list of organization IDs to search within. To find 1542 // your organization ID, follow instructions in 1543 // https://cloud.google.com/resource-manager/docs/creating-managing-organization. 1544 IncludeOrgIds []string `json:"includeOrgIds,omitempty"` 1545 1546 // IncludeProjectIds: The list of project IDs to search within. To learn 1547 // more about the distinction between project names/IDs/numbers, go to 1548 // https://cloud.google.com/docs/overview/#projects. 1549 IncludeProjectIds []string `json:"includeProjectIds,omitempty"` 1550 1551 // RestrictedLocations: Optional. The list of locations to search 1552 // within. 1. If empty, search will be performed in all locations; 2. If 1553 // any of the locations are NOT in the valid locations list, error will 1554 // be returned; 3. Otherwise, search only the given locations for 1555 // matching results. Typical usage is to leave this field empty. When a 1556 // location is unreachable as returned in the 1557 // `SearchCatalogResponse.unreachable` field, users can repeat the 1558 // search request with this parameter set to get additional information 1559 // on the error. Valid locations: * asia-east1 * asia-east2 * 1560 // asia-northeast1 * asia-northeast2 * asia-northeast3 * asia-south1 * 1561 // asia-southeast1 * australia-southeast1 * eu * europe-north1 * 1562 // europe-west1 * europe-west2 * europe-west3 * europe-west4 * 1563 // europe-west6 * global * northamerica-northeast1 * southamerica-east1 1564 // * us * us-central1 * us-east1 * us-east4 * us-west1 * us-west2 1565 RestrictedLocations []string `json:"restrictedLocations,omitempty"` 1566 1567 // ForceSendFields is a list of field names (e.g. 1568 // "IncludeGcpPublicDatasets") to unconditionally include in API 1569 // requests. By default, fields with empty values are omitted from API 1570 // requests. However, any non-pointer, non-interface field appearing in 1571 // ForceSendFields will be sent to the server regardless of whether the 1572 // field is empty or not. This may be used to include empty fields in 1573 // Patch requests. 1574 ForceSendFields []string `json:"-"` 1575 1576 // NullFields is a list of field names (e.g. "IncludeGcpPublicDatasets") 1577 // to include in API requests with the JSON null value. By default, 1578 // fields with empty values are omitted from API requests. However, any 1579 // field with an empty value appearing in NullFields will be sent to the 1580 // server as null. It is an error if a field in this list has a 1581 // non-empty value. This may be used to include null fields in Patch 1582 // requests. 1583 NullFields []string `json:"-"` 1584} 1585 1586func (s *GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope) MarshalJSON() ([]byte, error) { 1587 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope 1588 raw := NoMethod(*s) 1589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1590} 1591 1592// GoogleCloudDatacatalogV1beta1SearchCatalogResponse: Response message 1593// for SearchCatalog. 1594type GoogleCloudDatacatalogV1beta1SearchCatalogResponse struct { 1595 // NextPageToken: The token that can be used to retrieve the next page 1596 // of results. 1597 NextPageToken string `json:"nextPageToken,omitempty"` 1598 1599 // Results: Search results. 1600 Results []*GoogleCloudDatacatalogV1beta1SearchCatalogResult `json:"results,omitempty"` 1601 1602 // Unreachable: Unreachable locations. Search result does not include 1603 // data from those locations. Users can get additional information on 1604 // the error by repeating the search request with a more restrictive 1605 // parameter -- setting the value for 1606 // `SearchDataCatalogRequest.scope.restricted_locations`. 1607 Unreachable []string `json:"unreachable,omitempty"` 1608 1609 // ServerResponse contains the HTTP response code and headers from the 1610 // server. 1611 googleapi.ServerResponse `json:"-"` 1612 1613 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1614 // unconditionally include in API requests. By default, fields with 1615 // empty values are omitted from API requests. However, any non-pointer, 1616 // non-interface field appearing in ForceSendFields will be sent to the 1617 // server regardless of whether the field is empty or not. This may be 1618 // used to include empty fields in Patch requests. 1619 ForceSendFields []string `json:"-"` 1620 1621 // NullFields is a list of field names (e.g. "NextPageToken") to include 1622 // in API requests with the JSON null value. By default, fields with 1623 // empty values are omitted from API requests. However, any field with 1624 // an empty value appearing in NullFields will be sent to the server as 1625 // null. It is an error if a field in this list has a non-empty value. 1626 // This may be used to include null fields in Patch requests. 1627 NullFields []string `json:"-"` 1628} 1629 1630func (s *GoogleCloudDatacatalogV1beta1SearchCatalogResponse) MarshalJSON() ([]byte, error) { 1631 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogResponse 1632 raw := NoMethod(*s) 1633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1634} 1635 1636// GoogleCloudDatacatalogV1beta1SearchCatalogResult: A result that 1637// appears in the response of a search request. Each result captures 1638// details of one entry that matches the search. 1639type GoogleCloudDatacatalogV1beta1SearchCatalogResult struct { 1640 // LinkedResource: The full name of the cloud resource the entry belongs 1641 // to. See: 1642 // https://cloud.google.com/apis/design/resource_names#full_resource_name. 1643 // Example: * 1644 // `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/table 1645 // s/tableId` 1646 LinkedResource string `json:"linkedResource,omitempty"` 1647 1648 // ModifyTime: Last-modified timestamp of the entry from the managing 1649 // system. 1650 ModifyTime string `json:"modifyTime,omitempty"` 1651 1652 // RelativeResourceName: The relative resource name of the resource in 1653 // URL format. Examples: * 1654 // `projects/{project_id}/locations/{location_id}/entryGroups/{entry_grou 1655 // p_id}/entries/{entry_id}` * 1656 // `projects/{project_id}/tagTemplates/{tag_template_id}` 1657 RelativeResourceName string `json:"relativeResourceName,omitempty"` 1658 1659 // SearchResultSubtype: Sub-type of the search result. This is a 1660 // dot-delimited description of the resource's full type, and is the 1661 // same as the value callers would provide in the "type" search facet. 1662 // Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. 1663 SearchResultSubtype string `json:"searchResultSubtype,omitempty"` 1664 1665 // SearchResultType: Type of the search result. This field can be used 1666 // to determine which Get method to call to fetch the full resource. 1667 // 1668 // Possible values: 1669 // "SEARCH_RESULT_TYPE_UNSPECIFIED" - Default unknown type. 1670 // "ENTRY" - An Entry. 1671 // "TAG_TEMPLATE" - A TagTemplate. 1672 // "ENTRY_GROUP" - An EntryGroup. 1673 SearchResultType string `json:"searchResultType,omitempty"` 1674 1675 // ForceSendFields is a list of field names (e.g. "LinkedResource") to 1676 // unconditionally include in API requests. By default, fields with 1677 // empty values are omitted from API requests. However, any non-pointer, 1678 // non-interface field appearing in ForceSendFields will be sent to the 1679 // server regardless of whether the field is empty or not. This may be 1680 // used to include empty fields in Patch requests. 1681 ForceSendFields []string `json:"-"` 1682 1683 // NullFields is a list of field names (e.g. "LinkedResource") to 1684 // include in API requests with the JSON null value. By default, fields 1685 // with empty values are omitted from API requests. However, any field 1686 // with an empty value appearing in NullFields will be sent to the 1687 // server as null. It is an error if a field in this list has a 1688 // non-empty value. This may be used to include null fields in Patch 1689 // requests. 1690 NullFields []string `json:"-"` 1691} 1692 1693func (s *GoogleCloudDatacatalogV1beta1SearchCatalogResult) MarshalJSON() ([]byte, error) { 1694 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogResult 1695 raw := NoMethod(*s) 1696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1697} 1698 1699// GoogleCloudDatacatalogV1beta1SerializedPolicyTag: Message 1700// representing one policy tag when exported as a nested proto. 1701type GoogleCloudDatacatalogV1beta1SerializedPolicyTag struct { 1702 // ChildPolicyTags: Children of the policy tag if any. 1703 ChildPolicyTags []*GoogleCloudDatacatalogV1beta1SerializedPolicyTag `json:"childPolicyTags,omitempty"` 1704 1705 // Description: Description of the serialized policy tag. The length of 1706 // the description is limited to 2000 bytes when encoded in UTF-8. If 1707 // not set, defaults to an empty description. 1708 Description string `json:"description,omitempty"` 1709 1710 // DisplayName: Required. Display name of the policy tag. Max 200 bytes 1711 // when encoded in UTF-8. 1712 DisplayName string `json:"displayName,omitempty"` 1713 1714 // PolicyTag: Resource name of the policy tag. This field will be 1715 // ignored when calling ImportTaxonomies. 1716 PolicyTag string `json:"policyTag,omitempty"` 1717 1718 // ForceSendFields is a list of field names (e.g. "ChildPolicyTags") to 1719 // unconditionally include in API requests. By default, fields with 1720 // empty values are omitted from API requests. However, any non-pointer, 1721 // non-interface field appearing in ForceSendFields will be sent to the 1722 // server regardless of whether the field is empty or not. This may be 1723 // used to include empty fields in Patch requests. 1724 ForceSendFields []string `json:"-"` 1725 1726 // NullFields is a list of field names (e.g. "ChildPolicyTags") to 1727 // include in API requests with the JSON null value. By default, fields 1728 // with empty values are omitted from API requests. However, any field 1729 // with an empty value appearing in NullFields will be sent to the 1730 // server as null. It is an error if a field in this list has a 1731 // non-empty value. This may be used to include null fields in Patch 1732 // requests. 1733 NullFields []string `json:"-"` 1734} 1735 1736func (s *GoogleCloudDatacatalogV1beta1SerializedPolicyTag) MarshalJSON() ([]byte, error) { 1737 type NoMethod GoogleCloudDatacatalogV1beta1SerializedPolicyTag 1738 raw := NoMethod(*s) 1739 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1740} 1741 1742// GoogleCloudDatacatalogV1beta1SerializedTaxonomy: Message capturing a 1743// taxonomy and its policy tag hierarchy as a nested proto. Used for 1744// taxonomy import/export and mutation. 1745type GoogleCloudDatacatalogV1beta1SerializedTaxonomy struct { 1746 // ActivatedPolicyTypes: A list of policy types that are activated for a 1747 // taxonomy. 1748 // 1749 // Possible values: 1750 // "POLICY_TYPE_UNSPECIFIED" - Unspecified policy type. 1751 // "FINE_GRAINED_ACCESS_CONTROL" - Fine grained access control policy, 1752 // which enables access control on tagged resources. 1753 ActivatedPolicyTypes []string `json:"activatedPolicyTypes,omitempty"` 1754 1755 // Description: Description of the serialized taxonomy. The length of 1756 // the description is limited to 2000 bytes when encoded in UTF-8. If 1757 // not set, defaults to an empty description. 1758 Description string `json:"description,omitempty"` 1759 1760 // DisplayName: Required. Display name of the taxonomy. Max 200 bytes 1761 // when encoded in UTF-8. 1762 DisplayName string `json:"displayName,omitempty"` 1763 1764 // PolicyTags: Top level policy tags associated with the taxonomy if 1765 // any. 1766 PolicyTags []*GoogleCloudDatacatalogV1beta1SerializedPolicyTag `json:"policyTags,omitempty"` 1767 1768 // ForceSendFields is a list of field names (e.g. 1769 // "ActivatedPolicyTypes") to unconditionally include in API requests. 1770 // By default, fields with empty values are omitted from API requests. 1771 // However, any non-pointer, non-interface field appearing in 1772 // ForceSendFields will be sent to the server regardless of whether the 1773 // field is empty or not. This may be used to include empty fields in 1774 // Patch requests. 1775 ForceSendFields []string `json:"-"` 1776 1777 // NullFields is a list of field names (e.g. "ActivatedPolicyTypes") to 1778 // include in API requests with the JSON null value. By default, fields 1779 // with empty values are omitted from API requests. However, any field 1780 // with an empty value appearing in NullFields will be sent to the 1781 // server as null. It is an error if a field in this list has a 1782 // non-empty value. This may be used to include null fields in Patch 1783 // requests. 1784 NullFields []string `json:"-"` 1785} 1786 1787func (s *GoogleCloudDatacatalogV1beta1SerializedTaxonomy) MarshalJSON() ([]byte, error) { 1788 type NoMethod GoogleCloudDatacatalogV1beta1SerializedTaxonomy 1789 raw := NoMethod(*s) 1790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1791} 1792 1793// GoogleCloudDatacatalogV1beta1SystemTimestamps: Timestamps about this 1794// resource according to a particular system. 1795type GoogleCloudDatacatalogV1beta1SystemTimestamps struct { 1796 // CreateTime: The creation time of the resource within the given 1797 // system. 1798 CreateTime string `json:"createTime,omitempty"` 1799 1800 // ExpireTime: Output only. The expiration time of the resource within 1801 // the given system. Currently only apllicable to BigQuery resources. 1802 ExpireTime string `json:"expireTime,omitempty"` 1803 1804 // UpdateTime: The last-modified time of the resource within the given 1805 // system. 1806 UpdateTime string `json:"updateTime,omitempty"` 1807 1808 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1809 // unconditionally include in API requests. By default, fields with 1810 // empty values are omitted from API requests. However, any non-pointer, 1811 // non-interface field appearing in ForceSendFields will be sent to the 1812 // server regardless of whether the field is empty or not. This may be 1813 // used to include empty fields in Patch requests. 1814 ForceSendFields []string `json:"-"` 1815 1816 // NullFields is a list of field names (e.g. "CreateTime") to include in 1817 // API requests with the JSON null value. By default, fields with empty 1818 // values are omitted from API requests. However, any field with an 1819 // empty value appearing in NullFields will be sent to the server as 1820 // null. It is an error if a field in this list has a non-empty value. 1821 // This may be used to include null fields in Patch requests. 1822 NullFields []string `json:"-"` 1823} 1824 1825func (s *GoogleCloudDatacatalogV1beta1SystemTimestamps) MarshalJSON() ([]byte, error) { 1826 type NoMethod GoogleCloudDatacatalogV1beta1SystemTimestamps 1827 raw := NoMethod(*s) 1828 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1829} 1830 1831// GoogleCloudDatacatalogV1beta1TableSpec: Normal BigQuery table spec. 1832type GoogleCloudDatacatalogV1beta1TableSpec struct { 1833 // GroupedEntry: Output only. If the table is a dated shard, i.e., with 1834 // name pattern `[prefix]YYYYMMDD`, `grouped_entry` is the Data Catalog 1835 // resource name of the date sharded grouped entry, for example, 1836 // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_i 1837 // d}/entries/{entry_id}`. Otherwise, `grouped_entry` is empty. 1838 GroupedEntry string `json:"groupedEntry,omitempty"` 1839 1840 // ForceSendFields is a list of field names (e.g. "GroupedEntry") to 1841 // unconditionally include in API requests. By default, fields with 1842 // empty values are omitted from API requests. However, any non-pointer, 1843 // non-interface field appearing in ForceSendFields will be sent to the 1844 // server regardless of whether the field is empty or not. This may be 1845 // used to include empty fields in Patch requests. 1846 ForceSendFields []string `json:"-"` 1847 1848 // NullFields is a list of field names (e.g. "GroupedEntry") to include 1849 // in API requests with the JSON null value. By default, fields with 1850 // empty values are omitted from API requests. However, any field with 1851 // an empty value appearing in NullFields will be sent to the server as 1852 // null. It is an error if a field in this list has a non-empty value. 1853 // This may be used to include null fields in Patch requests. 1854 NullFields []string `json:"-"` 1855} 1856 1857func (s *GoogleCloudDatacatalogV1beta1TableSpec) MarshalJSON() ([]byte, error) { 1858 type NoMethod GoogleCloudDatacatalogV1beta1TableSpec 1859 raw := NoMethod(*s) 1860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1861} 1862 1863// GoogleCloudDatacatalogV1beta1Tag: Tags are used to attach custom 1864// metadata to Data Catalog resources. Tags conform to the 1865// specifications within their tag template. See Data Catalog IAM 1866// (https://cloud.google.com/data-catalog/docs/concepts/iam) for 1867// information on the permissions needed to create or view tags. 1868type GoogleCloudDatacatalogV1beta1Tag struct { 1869 // Column: Resources like Entry can have schemas associated with them. 1870 // This scope allows users to attach tags to an individual column based 1871 // on that schema. For attaching a tag to a nested column, use `.` to 1872 // separate the column names. Example: * `outer_column.inner_column` 1873 Column string `json:"column,omitempty"` 1874 1875 // Fields: Required. This maps the ID of a tag field to the value of and 1876 // additional information about that field. Valid field IDs are defined 1877 // by the tag's template. A tag must have at least 1 field and at most 1878 // 500 fields. 1879 Fields map[string]GoogleCloudDatacatalogV1beta1TagField `json:"fields,omitempty"` 1880 1881 // Name: The resource name of the tag in URL format. Example: * 1882 // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id 1883 // }/entries/{entry_id}/tags/{tag_id} where `tag_id` is a 1884 // system-generated identifier. Note that this Tag may not actually be 1885 // stored in the location in this name. 1886 Name string `json:"name,omitempty"` 1887 1888 // Template: Required. The resource name of the tag template that this 1889 // tag uses. Example: * 1890 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_ 1891 // id} This field cannot be modified after creation. 1892 Template string `json:"template,omitempty"` 1893 1894 // TemplateDisplayName: Output only. The display name of the tag 1895 // template. 1896 TemplateDisplayName string `json:"templateDisplayName,omitempty"` 1897 1898 // ServerResponse contains the HTTP response code and headers from the 1899 // server. 1900 googleapi.ServerResponse `json:"-"` 1901 1902 // ForceSendFields is a list of field names (e.g. "Column") to 1903 // unconditionally include in API requests. By default, fields with 1904 // empty values are omitted from API requests. However, any non-pointer, 1905 // non-interface field appearing in ForceSendFields will be sent to the 1906 // server regardless of whether the field is empty or not. This may be 1907 // used to include empty fields in Patch requests. 1908 ForceSendFields []string `json:"-"` 1909 1910 // NullFields is a list of field names (e.g. "Column") to include in API 1911 // requests with the JSON null value. By default, fields with empty 1912 // values are omitted from API requests. However, any field with an 1913 // empty value appearing in NullFields will be sent to the server as 1914 // null. It is an error if a field in this list has a non-empty value. 1915 // This may be used to include null fields in Patch requests. 1916 NullFields []string `json:"-"` 1917} 1918 1919func (s *GoogleCloudDatacatalogV1beta1Tag) MarshalJSON() ([]byte, error) { 1920 type NoMethod GoogleCloudDatacatalogV1beta1Tag 1921 raw := NoMethod(*s) 1922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1923} 1924 1925// GoogleCloudDatacatalogV1beta1TagField: Contains the value and 1926// supporting information for a field within a Tag. 1927type GoogleCloudDatacatalogV1beta1TagField struct { 1928 // BoolValue: Holds the value for a tag field with boolean type. 1929 BoolValue bool `json:"boolValue,omitempty"` 1930 1931 // DisplayName: Output only. The display name of this field. 1932 DisplayName string `json:"displayName,omitempty"` 1933 1934 // DoubleValue: Holds the value for a tag field with double type. 1935 DoubleValue float64 `json:"doubleValue,omitempty"` 1936 1937 // EnumValue: Holds the value for a tag field with enum type. This value 1938 // must be one of the allowed values in the definition of this enum. 1939 EnumValue *GoogleCloudDatacatalogV1beta1TagFieldEnumValue `json:"enumValue,omitempty"` 1940 1941 // Order: Output only. The order of this field with respect to other 1942 // fields in this tag. It can be set in Tag. For example, a higher value 1943 // can indicate a more important field. The value can be negative. 1944 // Multiple fields can have the same order, and field orders within a 1945 // tag do not have to be sequential. 1946 Order int64 `json:"order,omitempty"` 1947 1948 // StringValue: Holds the value for a tag field with string type. 1949 StringValue string `json:"stringValue,omitempty"` 1950 1951 // TimestampValue: Holds the value for a tag field with timestamp type. 1952 TimestampValue string `json:"timestampValue,omitempty"` 1953 1954 // ForceSendFields is a list of field names (e.g. "BoolValue") to 1955 // unconditionally include in API requests. By default, fields with 1956 // empty values are omitted from API requests. However, any non-pointer, 1957 // non-interface field appearing in ForceSendFields will be sent to the 1958 // server regardless of whether the field is empty or not. This may be 1959 // used to include empty fields in Patch requests. 1960 ForceSendFields []string `json:"-"` 1961 1962 // NullFields is a list of field names (e.g. "BoolValue") to include in 1963 // API requests with the JSON null value. By default, fields with empty 1964 // values are omitted from API requests. However, any field with an 1965 // empty value appearing in NullFields will be sent to the server as 1966 // null. It is an error if a field in this list has a non-empty value. 1967 // This may be used to include null fields in Patch requests. 1968 NullFields []string `json:"-"` 1969} 1970 1971func (s *GoogleCloudDatacatalogV1beta1TagField) MarshalJSON() ([]byte, error) { 1972 type NoMethod GoogleCloudDatacatalogV1beta1TagField 1973 raw := NoMethod(*s) 1974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1975} 1976 1977func (s *GoogleCloudDatacatalogV1beta1TagField) UnmarshalJSON(data []byte) error { 1978 type NoMethod GoogleCloudDatacatalogV1beta1TagField 1979 var s1 struct { 1980 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` 1981 *NoMethod 1982 } 1983 s1.NoMethod = (*NoMethod)(s) 1984 if err := json.Unmarshal(data, &s1); err != nil { 1985 return err 1986 } 1987 s.DoubleValue = float64(s1.DoubleValue) 1988 return nil 1989} 1990 1991// GoogleCloudDatacatalogV1beta1TagFieldEnumValue: Holds an enum value. 1992type GoogleCloudDatacatalogV1beta1TagFieldEnumValue struct { 1993 // DisplayName: The display name of the enum value. 1994 DisplayName string `json:"displayName,omitempty"` 1995 1996 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1997 // unconditionally include in API requests. By default, fields with 1998 // empty values are omitted from API requests. However, any non-pointer, 1999 // non-interface field appearing in ForceSendFields will be sent to the 2000 // server regardless of whether the field is empty or not. This may be 2001 // used to include empty fields in Patch requests. 2002 ForceSendFields []string `json:"-"` 2003 2004 // NullFields is a list of field names (e.g. "DisplayName") to include 2005 // in API requests with the JSON null value. By default, fields with 2006 // empty values are omitted from API requests. However, any field with 2007 // an empty value appearing in NullFields will be sent to the server as 2008 // null. It is an error if a field in this list has a non-empty value. 2009 // This may be used to include null fields in Patch requests. 2010 NullFields []string `json:"-"` 2011} 2012 2013func (s *GoogleCloudDatacatalogV1beta1TagFieldEnumValue) MarshalJSON() ([]byte, error) { 2014 type NoMethod GoogleCloudDatacatalogV1beta1TagFieldEnumValue 2015 raw := NoMethod(*s) 2016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2017} 2018 2019// GoogleCloudDatacatalogV1beta1TagTemplate: A tag template defines a 2020// tag, which can have one or more typed fields. The template is used to 2021// create and attach the tag to GCP resources. Tag template roles 2022// (https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) 2023// provide permissions to create, edit, and use the template. See, for 2024// example, the TagTemplate User 2025// (https://cloud.google.com/data-catalog/docs/how-to/template-user) 2026// role, which includes permission to use the tag template to tag 2027// resources. 2028type GoogleCloudDatacatalogV1beta1TagTemplate struct { 2029 // DisplayName: The display name for this template. Defaults to an empty 2030 // string. 2031 DisplayName string `json:"displayName,omitempty"` 2032 2033 // Fields: Required. Map of tag template field IDs to the settings for 2034 // the field. This map is an exhaustive list of the allowed fields. This 2035 // map must contain at least one field and at most 500 fields. The keys 2036 // to this map are tag template field IDs. Field IDs can contain letters 2037 // (both uppercase and lowercase), numbers (0-9) and underscores (_). 2038 // Field IDs must be at least 1 character long and at most 64 characters 2039 // long. Field IDs must start with a letter or underscore. 2040 Fields map[string]GoogleCloudDatacatalogV1beta1TagTemplateField `json:"fields,omitempty"` 2041 2042 // Name: The resource name of the tag template in URL format. Example: * 2043 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_ 2044 // id} Note that this TagTemplate and its child resources may not 2045 // actually be stored in the location in this name. 2046 Name string `json:"name,omitempty"` 2047 2048 // ServerResponse contains the HTTP response code and headers from the 2049 // server. 2050 googleapi.ServerResponse `json:"-"` 2051 2052 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2053 // unconditionally include in API requests. By default, fields with 2054 // empty values are omitted from API requests. However, any non-pointer, 2055 // non-interface field appearing in ForceSendFields will be sent to the 2056 // server regardless of whether the field is empty or not. This may be 2057 // used to include empty fields in Patch requests. 2058 ForceSendFields []string `json:"-"` 2059 2060 // NullFields is a list of field names (e.g. "DisplayName") to include 2061 // in API requests with the JSON null value. By default, fields with 2062 // empty values are omitted from API requests. However, any field with 2063 // an empty value appearing in NullFields will be sent to the server as 2064 // null. It is an error if a field in this list has a non-empty value. 2065 // This may be used to include null fields in Patch requests. 2066 NullFields []string `json:"-"` 2067} 2068 2069func (s *GoogleCloudDatacatalogV1beta1TagTemplate) MarshalJSON() ([]byte, error) { 2070 type NoMethod GoogleCloudDatacatalogV1beta1TagTemplate 2071 raw := NoMethod(*s) 2072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2073} 2074 2075// GoogleCloudDatacatalogV1beta1TagTemplateField: The template for an 2076// individual field within a tag template. 2077type GoogleCloudDatacatalogV1beta1TagTemplateField struct { 2078 // Description: The description for this field. Defaults to an empty 2079 // string. 2080 Description string `json:"description,omitempty"` 2081 2082 // DisplayName: The display name for this field. Defaults to an empty 2083 // string. 2084 DisplayName string `json:"displayName,omitempty"` 2085 2086 // IsRequired: Whether this is a required field. Defaults to false. 2087 IsRequired bool `json:"isRequired,omitempty"` 2088 2089 // Name: Output only. The resource name of the tag template field in URL 2090 // format. Example: * 2091 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template} 2092 // /fields/{field} Note that this TagTemplateField may not actually be 2093 // stored in the location in this name. 2094 Name string `json:"name,omitempty"` 2095 2096 // Order: The order of this field with respect to other fields in this 2097 // tag template. A higher value indicates a more important field. The 2098 // value can be negative. Multiple fields can have the same order, and 2099 // field orders within a tag do not have to be sequential. 2100 Order int64 `json:"order,omitempty"` 2101 2102 // Type: Required. The type of value this tag field can contain. 2103 Type *GoogleCloudDatacatalogV1beta1FieldType `json:"type,omitempty"` 2104 2105 // ServerResponse contains the HTTP response code and headers from the 2106 // server. 2107 googleapi.ServerResponse `json:"-"` 2108 2109 // ForceSendFields is a list of field names (e.g. "Description") to 2110 // unconditionally include in API requests. By default, fields with 2111 // empty values are omitted from API requests. However, any non-pointer, 2112 // non-interface field appearing in ForceSendFields will be sent to the 2113 // server regardless of whether the field is empty or not. This may be 2114 // used to include empty fields in Patch requests. 2115 ForceSendFields []string `json:"-"` 2116 2117 // NullFields is a list of field names (e.g. "Description") to include 2118 // in API requests with the JSON null value. By default, fields with 2119 // empty values are omitted from API requests. However, any field with 2120 // an empty value appearing in NullFields will be sent to the server as 2121 // null. It is an error if a field in this list has a non-empty value. 2122 // This may be used to include null fields in Patch requests. 2123 NullFields []string `json:"-"` 2124} 2125 2126func (s *GoogleCloudDatacatalogV1beta1TagTemplateField) MarshalJSON() ([]byte, error) { 2127 type NoMethod GoogleCloudDatacatalogV1beta1TagTemplateField 2128 raw := NoMethod(*s) 2129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2130} 2131 2132// GoogleCloudDatacatalogV1beta1Taxonomy: A taxonomy is a collection of 2133// policy tags that classify data along a common axis. For instance a 2134// data *sensitivity* taxonomy could contain policy tags denoting PII 2135// such as age, zipcode, and SSN. A data *origin* taxonomy could contain 2136// policy tags to distinguish user data, employee data, partner data, 2137// public data. 2138type GoogleCloudDatacatalogV1beta1Taxonomy struct { 2139 // ActivatedPolicyTypes: Optional. A list of policy types that are 2140 // activated for this taxonomy. If not set, defaults to an empty list. 2141 // 2142 // Possible values: 2143 // "POLICY_TYPE_UNSPECIFIED" - Unspecified policy type. 2144 // "FINE_GRAINED_ACCESS_CONTROL" - Fine grained access control policy, 2145 // which enables access control on tagged resources. 2146 ActivatedPolicyTypes []string `json:"activatedPolicyTypes,omitempty"` 2147 2148 // Description: Optional. Description of this taxonomy. It must: contain 2149 // only unicode characters, tabs, newlines, carriage returns and page 2150 // breaks; and be at most 2000 bytes long when encoded in UTF-8. If not 2151 // set, defaults to an empty description. 2152 Description string `json:"description,omitempty"` 2153 2154 // DisplayName: Required. User defined name of this taxonomy. It must: 2155 // contain only unicode letters, numbers, underscores, dashes and 2156 // spaces; not start or end with spaces; and be at most 200 bytes long 2157 // when encoded in UTF-8. 2158 DisplayName string `json:"displayName,omitempty"` 2159 2160 // Name: Output only. Resource name of this taxonomy, whose format is: 2161 // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". 2162 Name string `json:"name,omitempty"` 2163 2164 // PolicyTagCount: Output only. Number of policy tags contained in this 2165 // taxonomy. 2166 PolicyTagCount int64 `json:"policyTagCount,omitempty"` 2167 2168 // TaxonomyTimestamps: Output only. Timestamps about this taxonomy. Only 2169 // create_time and update_time are used. 2170 TaxonomyTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"taxonomyTimestamps,omitempty"` 2171 2172 // ServerResponse contains the HTTP response code and headers from the 2173 // server. 2174 googleapi.ServerResponse `json:"-"` 2175 2176 // ForceSendFields is a list of field names (e.g. 2177 // "ActivatedPolicyTypes") to unconditionally include in API requests. 2178 // By default, fields with empty values are omitted from API requests. 2179 // However, any non-pointer, non-interface field appearing in 2180 // ForceSendFields will be sent to the server regardless of whether the 2181 // field is empty or not. This may be used to include empty fields in 2182 // Patch requests. 2183 ForceSendFields []string `json:"-"` 2184 2185 // NullFields is a list of field names (e.g. "ActivatedPolicyTypes") to 2186 // include in API requests with the JSON null value. By default, fields 2187 // with empty values are omitted from API requests. However, any field 2188 // with an empty value appearing in NullFields will be sent to the 2189 // server as null. It is an error if a field in this list has a 2190 // non-empty value. This may be used to include null fields in Patch 2191 // requests. 2192 NullFields []string `json:"-"` 2193} 2194 2195func (s *GoogleCloudDatacatalogV1beta1Taxonomy) MarshalJSON() ([]byte, error) { 2196 type NoMethod GoogleCloudDatacatalogV1beta1Taxonomy 2197 raw := NoMethod(*s) 2198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2199} 2200 2201// GoogleCloudDatacatalogV1beta1UsageSignal: The set of all usage 2202// signals that we store in Data Catalog. 2203type GoogleCloudDatacatalogV1beta1UsageSignal struct { 2204 // UpdateTime: The timestamp of the end of the usage statistics 2205 // duration. 2206 UpdateTime string `json:"updateTime,omitempty"` 2207 2208 // UsageWithinTimeRange: Usage statistics over each of the pre-defined 2209 // time ranges, supported strings for time ranges are {"24H", "7D", 2210 // "30D"}. 2211 UsageWithinTimeRange map[string]GoogleCloudDatacatalogV1beta1UsageStats `json:"usageWithinTimeRange,omitempty"` 2212 2213 // ForceSendFields is a list of field names (e.g. "UpdateTime") to 2214 // unconditionally include in API requests. By default, fields with 2215 // empty values are omitted from API requests. However, any non-pointer, 2216 // non-interface field appearing in ForceSendFields will be sent to the 2217 // server regardless of whether the field is empty or not. This may be 2218 // used to include empty fields in Patch requests. 2219 ForceSendFields []string `json:"-"` 2220 2221 // NullFields is a list of field names (e.g. "UpdateTime") to include in 2222 // API requests with the JSON null value. By default, fields with empty 2223 // values are omitted from API requests. However, any field with an 2224 // empty value appearing in NullFields will be sent to the server as 2225 // null. It is an error if a field in this list has a non-empty value. 2226 // This may be used to include null fields in Patch requests. 2227 NullFields []string `json:"-"` 2228} 2229 2230func (s *GoogleCloudDatacatalogV1beta1UsageSignal) MarshalJSON() ([]byte, error) { 2231 type NoMethod GoogleCloudDatacatalogV1beta1UsageSignal 2232 raw := NoMethod(*s) 2233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2234} 2235 2236// GoogleCloudDatacatalogV1beta1UsageStats: Detailed counts on the 2237// entry's usage. Caveats: - Only BigQuery tables have usage stats - The 2238// usage stats only inlude BigQuery query jobs - The usage stats might 2239// be underestimated, e.g. wildcard table references are not yet counted 2240// in usage computation 2241// https://cloud.google.com/bigquery/docs/querying-wildcard-tables 2242type GoogleCloudDatacatalogV1beta1UsageStats struct { 2243 // TotalCancellations: The number of times that the underlying entry was 2244 // attempted to be used but was cancelled by the user. 2245 TotalCancellations float64 `json:"totalCancellations,omitempty"` 2246 2247 // TotalCompletions: The number of times that the underlying entry was 2248 // successfully used. 2249 TotalCompletions float64 `json:"totalCompletions,omitempty"` 2250 2251 // TotalExecutionTimeForCompletionsMillis: Total time spent (in 2252 // milliseconds) during uses the resulted in completions. 2253 TotalExecutionTimeForCompletionsMillis float64 `json:"totalExecutionTimeForCompletionsMillis,omitempty"` 2254 2255 // TotalFailures: The number of times that the underlying entry was 2256 // attempted to be used but failed. 2257 TotalFailures float64 `json:"totalFailures,omitempty"` 2258 2259 // ForceSendFields is a list of field names (e.g. "TotalCancellations") 2260 // to unconditionally include in API requests. By default, fields with 2261 // empty values are omitted from API requests. However, any non-pointer, 2262 // non-interface field appearing in ForceSendFields will be sent to the 2263 // server regardless of whether the field is empty or not. This may be 2264 // used to include empty fields in Patch requests. 2265 ForceSendFields []string `json:"-"` 2266 2267 // NullFields is a list of field names (e.g. "TotalCancellations") to 2268 // include in API requests with the JSON null value. By default, fields 2269 // with empty values are omitted from API requests. However, any field 2270 // with an empty value appearing in NullFields will be sent to the 2271 // server as null. It is an error if a field in this list has a 2272 // non-empty value. This may be used to include null fields in Patch 2273 // requests. 2274 NullFields []string `json:"-"` 2275} 2276 2277func (s *GoogleCloudDatacatalogV1beta1UsageStats) MarshalJSON() ([]byte, error) { 2278 type NoMethod GoogleCloudDatacatalogV1beta1UsageStats 2279 raw := NoMethod(*s) 2280 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2281} 2282 2283func (s *GoogleCloudDatacatalogV1beta1UsageStats) UnmarshalJSON(data []byte) error { 2284 type NoMethod GoogleCloudDatacatalogV1beta1UsageStats 2285 var s1 struct { 2286 TotalCancellations gensupport.JSONFloat64 `json:"totalCancellations"` 2287 TotalCompletions gensupport.JSONFloat64 `json:"totalCompletions"` 2288 TotalExecutionTimeForCompletionsMillis gensupport.JSONFloat64 `json:"totalExecutionTimeForCompletionsMillis"` 2289 TotalFailures gensupport.JSONFloat64 `json:"totalFailures"` 2290 *NoMethod 2291 } 2292 s1.NoMethod = (*NoMethod)(s) 2293 if err := json.Unmarshal(data, &s1); err != nil { 2294 return err 2295 } 2296 s.TotalCancellations = float64(s1.TotalCancellations) 2297 s.TotalCompletions = float64(s1.TotalCompletions) 2298 s.TotalExecutionTimeForCompletionsMillis = float64(s1.TotalExecutionTimeForCompletionsMillis) 2299 s.TotalFailures = float64(s1.TotalFailures) 2300 return nil 2301} 2302 2303// GoogleCloudDatacatalogV1beta1ViewSpec: Table view specification. 2304type GoogleCloudDatacatalogV1beta1ViewSpec struct { 2305 // ViewQuery: Output only. The query that defines the table view. 2306 ViewQuery string `json:"viewQuery,omitempty"` 2307 2308 // ForceSendFields is a list of field names (e.g. "ViewQuery") to 2309 // unconditionally include in API requests. By default, fields with 2310 // empty values are omitted from API requests. However, any non-pointer, 2311 // non-interface field appearing in ForceSendFields will be sent to the 2312 // server regardless of whether the field is empty or not. This may be 2313 // used to include empty fields in Patch requests. 2314 ForceSendFields []string `json:"-"` 2315 2316 // NullFields is a list of field names (e.g. "ViewQuery") to include in 2317 // API requests with the JSON null value. By default, fields with empty 2318 // values are omitted from API requests. However, any field with an 2319 // empty value appearing in NullFields will be sent to the server as 2320 // null. It is an error if a field in this list has a non-empty value. 2321 // This may be used to include null fields in Patch requests. 2322 NullFields []string `json:"-"` 2323} 2324 2325func (s *GoogleCloudDatacatalogV1beta1ViewSpec) MarshalJSON() ([]byte, error) { 2326 type NoMethod GoogleCloudDatacatalogV1beta1ViewSpec 2327 raw := NoMethod(*s) 2328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2329} 2330 2331// Policy: An Identity and Access Management (IAM) policy, which 2332// specifies access controls for Google Cloud resources. A `Policy` is a 2333// collection of `bindings`. A `binding` binds one or more `members` to 2334// a single `role`. Members can be user accounts, service accounts, 2335// Google groups, and domains (such as G Suite). A `role` is a named 2336// list of permissions; each `role` can be an IAM predefined role or a 2337// user-created custom role. For some types of Google Cloud resources, a 2338// `binding` can also specify a `condition`, which is a logical 2339// expression that allows access to a resource only if the expression 2340// evaluates to `true`. A condition can add constraints based on 2341// attributes of the request, the resource, or both. To learn which 2342// resources support conditions in their IAM policies, see the IAM 2343// documentation 2344// (https://cloud.google.com/iam/help/conditions/resource-policies). 2345// **JSON example:** { "bindings": [ { "role": 2346// "roles/resourcemanager.organizationAdmin", "members": [ 2347// "user:mike@example.com", "group:admins@example.com", 2348// "domain:google.com", 2349// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 2350// "role": "roles/resourcemanager.organizationViewer", "members": [ 2351// "user:eve@example.com" ], "condition": { "title": "expirable access", 2352// "description": "Does not grant access after Sep 2020", "expression": 2353// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 2354// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 2355// members: - user:mike@example.com - group:admins@example.com - 2356// domain:google.com - 2357// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 2358// roles/resourcemanager.organizationAdmin - members: - 2359// user:eve@example.com role: roles/resourcemanager.organizationViewer 2360// condition: title: expirable access description: Does not grant access 2361// after Sep 2020 expression: request.time < 2362// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 2363// 3 For a description of IAM and its features, see the IAM 2364// documentation (https://cloud.google.com/iam/docs/). 2365type Policy struct { 2366 // Bindings: Associates a list of `members` to a `role`. Optionally, may 2367 // specify a `condition` that determines how and when the `bindings` are 2368 // applied. Each of the `bindings` must contain at least one member. 2369 Bindings []*Binding `json:"bindings,omitempty"` 2370 2371 // Etag: `etag` is used for optimistic concurrency control as a way to 2372 // help prevent simultaneous updates of a policy from overwriting each 2373 // other. It is strongly suggested that systems make use of the `etag` 2374 // in the read-modify-write cycle to perform policy updates in order to 2375 // avoid race conditions: An `etag` is returned in the response to 2376 // `getIamPolicy`, and systems are expected to put that etag in the 2377 // request to `setIamPolicy` to ensure that their change will be applied 2378 // to the same version of the policy. **Important:** If you use IAM 2379 // Conditions, you must include the `etag` field whenever you call 2380 // `setIamPolicy`. If you omit this field, then IAM allows you to 2381 // overwrite a version `3` policy with a version `1` policy, and all of 2382 // the conditions in the version `3` policy are lost. 2383 Etag string `json:"etag,omitempty"` 2384 2385 // Version: Specifies the format of the policy. Valid values are `0`, 2386 // `1`, and `3`. Requests that specify an invalid value are rejected. 2387 // Any operation that affects conditional role bindings must specify 2388 // version `3`. This requirement applies to the following operations: * 2389 // Getting a policy that includes a conditional role binding * Adding a 2390 // conditional role binding to a policy * Changing a conditional role 2391 // binding in a policy * Removing any role binding, with or without a 2392 // condition, from a policy that includes conditions **Important:** If 2393 // you use IAM Conditions, you must include the `etag` field whenever 2394 // you call `setIamPolicy`. If you omit this field, then IAM allows you 2395 // to overwrite a version `3` policy with a version `1` policy, and all 2396 // of the conditions in the version `3` policy are lost. If a policy 2397 // does not include any conditions, operations on that policy may 2398 // specify any valid version or leave the field unset. To learn which 2399 // resources support conditions in their IAM policies, see the IAM 2400 // documentation 2401 // (https://cloud.google.com/iam/help/conditions/resource-policies). 2402 Version int64 `json:"version,omitempty"` 2403 2404 // ServerResponse contains the HTTP response code and headers from the 2405 // server. 2406 googleapi.ServerResponse `json:"-"` 2407 2408 // ForceSendFields is a list of field names (e.g. "Bindings") to 2409 // unconditionally include in API requests. By default, fields with 2410 // empty values are omitted from API requests. However, any non-pointer, 2411 // non-interface field appearing in ForceSendFields will be sent to the 2412 // server regardless of whether the field is empty or not. This may be 2413 // used to include empty fields in Patch requests. 2414 ForceSendFields []string `json:"-"` 2415 2416 // NullFields is a list of field names (e.g. "Bindings") to include in 2417 // API requests with the JSON null value. By default, fields with empty 2418 // values are omitted from API requests. However, any field with an 2419 // empty value appearing in NullFields will be sent to the server as 2420 // null. It is an error if a field in this list has a non-empty value. 2421 // This may be used to include null fields in Patch requests. 2422 NullFields []string `json:"-"` 2423} 2424 2425func (s *Policy) MarshalJSON() ([]byte, error) { 2426 type NoMethod Policy 2427 raw := NoMethod(*s) 2428 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2429} 2430 2431// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2432type SetIamPolicyRequest struct { 2433 // Policy: REQUIRED: The complete policy to be applied to the 2434 // `resource`. The size of the policy is limited to a few 10s of KB. An 2435 // empty policy is a valid policy but certain Cloud Platform services 2436 // (such as Projects) might reject them. 2437 Policy *Policy `json:"policy,omitempty"` 2438 2439 // ForceSendFields is a list of field names (e.g. "Policy") to 2440 // unconditionally include in API requests. By default, fields with 2441 // empty values are omitted from API requests. However, any non-pointer, 2442 // non-interface field appearing in ForceSendFields will be sent to the 2443 // server regardless of whether the field is empty or not. This may be 2444 // used to include empty fields in Patch requests. 2445 ForceSendFields []string `json:"-"` 2446 2447 // NullFields is a list of field names (e.g. "Policy") to include in API 2448 // requests with the JSON null value. By default, fields with empty 2449 // values are omitted from API requests. However, any field with an 2450 // empty value appearing in NullFields will be sent to the server as 2451 // null. It is an error if a field in this list has a non-empty value. 2452 // This may be used to include null fields in Patch requests. 2453 NullFields []string `json:"-"` 2454} 2455 2456func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2457 type NoMethod SetIamPolicyRequest 2458 raw := NoMethod(*s) 2459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2460} 2461 2462// TestIamPermissionsRequest: Request message for `TestIamPermissions` 2463// method. 2464type TestIamPermissionsRequest struct { 2465 // Permissions: The set of permissions to check for the `resource`. 2466 // Permissions with wildcards (such as '*' or 'storage.*') are not 2467 // allowed. For more information see IAM Overview 2468 // (https://cloud.google.com/iam/docs/overview#permissions). 2469 Permissions []string `json:"permissions,omitempty"` 2470 2471 // ForceSendFields is a list of field names (e.g. "Permissions") to 2472 // unconditionally include in API requests. By default, fields with 2473 // empty values are omitted from API requests. However, any non-pointer, 2474 // non-interface field appearing in ForceSendFields will be sent to the 2475 // server regardless of whether the field is empty or not. This may be 2476 // used to include empty fields in Patch requests. 2477 ForceSendFields []string `json:"-"` 2478 2479 // NullFields is a list of field names (e.g. "Permissions") to include 2480 // in API requests with the JSON null value. By default, fields with 2481 // empty values are omitted from API requests. However, any field with 2482 // an empty value appearing in NullFields will be sent to the server as 2483 // null. It is an error if a field in this list has a non-empty value. 2484 // This may be used to include null fields in Patch requests. 2485 NullFields []string `json:"-"` 2486} 2487 2488func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2489 type NoMethod TestIamPermissionsRequest 2490 raw := NoMethod(*s) 2491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2492} 2493 2494// TestIamPermissionsResponse: Response message for `TestIamPermissions` 2495// method. 2496type TestIamPermissionsResponse struct { 2497 // Permissions: A subset of `TestPermissionsRequest.permissions` that 2498 // the caller is allowed. 2499 Permissions []string `json:"permissions,omitempty"` 2500 2501 // ServerResponse contains the HTTP response code and headers from the 2502 // server. 2503 googleapi.ServerResponse `json:"-"` 2504 2505 // ForceSendFields is a list of field names (e.g. "Permissions") to 2506 // unconditionally include in API requests. By default, fields with 2507 // empty values are omitted from API requests. However, any non-pointer, 2508 // non-interface field appearing in ForceSendFields will be sent to the 2509 // server regardless of whether the field is empty or not. This may be 2510 // used to include empty fields in Patch requests. 2511 ForceSendFields []string `json:"-"` 2512 2513 // NullFields is a list of field names (e.g. "Permissions") to include 2514 // in API requests with the JSON null value. By default, fields with 2515 // empty values are omitted from API requests. However, any field with 2516 // an empty value appearing in NullFields will be sent to the server as 2517 // null. It is an error if a field in this list has a non-empty value. 2518 // This may be used to include null fields in Patch requests. 2519 NullFields []string `json:"-"` 2520} 2521 2522func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2523 type NoMethod TestIamPermissionsResponse 2524 raw := NoMethod(*s) 2525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2526} 2527 2528// method id "datacatalog.catalog.search": 2529 2530type CatalogSearchCall struct { 2531 s *Service 2532 googleclouddatacatalogv1beta1searchcatalogrequest *GoogleCloudDatacatalogV1beta1SearchCatalogRequest 2533 urlParams_ gensupport.URLParams 2534 ctx_ context.Context 2535 header_ http.Header 2536} 2537 2538// Search: Searches Data Catalog for multiple resources like entries, 2539// tags that match a query. This is a custom method 2540// (https://cloud.google.com/apis/design/custom_methods) and does not 2541// return the complete resource, only the resource identifier and high 2542// level fields. Clients can subsequently call `Get` methods. Note that 2543// Data Catalog search queries do not guarantee full recall. Query 2544// results that match your query may not be returned, even in subsequent 2545// result pages. Also note that results returned (and not returned) can 2546// vary across repeated search queries. See Data Catalog Search Syntax 2547// (https://cloud.google.com/data-catalog/docs/how-to/search-reference) 2548// for more information. 2549func (r *CatalogService) Search(googleclouddatacatalogv1beta1searchcatalogrequest *GoogleCloudDatacatalogV1beta1SearchCatalogRequest) *CatalogSearchCall { 2550 c := &CatalogSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2551 c.googleclouddatacatalogv1beta1searchcatalogrequest = googleclouddatacatalogv1beta1searchcatalogrequest 2552 return c 2553} 2554 2555// Fields allows partial responses to be retrieved. See 2556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2557// for more information. 2558func (c *CatalogSearchCall) Fields(s ...googleapi.Field) *CatalogSearchCall { 2559 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2560 return c 2561} 2562 2563// Context sets the context to be used in this call's Do method. Any 2564// pending HTTP request will be aborted if the provided context is 2565// canceled. 2566func (c *CatalogSearchCall) Context(ctx context.Context) *CatalogSearchCall { 2567 c.ctx_ = ctx 2568 return c 2569} 2570 2571// Header returns an http.Header that can be modified by the caller to 2572// add HTTP headers to the request. 2573func (c *CatalogSearchCall) Header() http.Header { 2574 if c.header_ == nil { 2575 c.header_ = make(http.Header) 2576 } 2577 return c.header_ 2578} 2579 2580func (c *CatalogSearchCall) doRequest(alt string) (*http.Response, error) { 2581 reqHeaders := make(http.Header) 2582 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 2583 for k, v := range c.header_ { 2584 reqHeaders[k] = v 2585 } 2586 reqHeaders.Set("User-Agent", c.s.userAgent()) 2587 var body io.Reader = nil 2588 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1searchcatalogrequest) 2589 if err != nil { 2590 return nil, err 2591 } 2592 reqHeaders.Set("Content-Type", "application/json") 2593 c.urlParams_.Set("alt", alt) 2594 c.urlParams_.Set("prettyPrint", "false") 2595 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/catalog:search") 2596 urls += "?" + c.urlParams_.Encode() 2597 req, err := http.NewRequest("POST", urls, body) 2598 if err != nil { 2599 return nil, err 2600 } 2601 req.Header = reqHeaders 2602 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2603} 2604 2605// Do executes the "datacatalog.catalog.search" call. 2606// Exactly one of *GoogleCloudDatacatalogV1beta1SearchCatalogResponse or 2607// error will be non-nil. Any non-2xx status code is an error. Response 2608// headers are in either 2609// *GoogleCloudDatacatalogV1beta1SearchCatalogResponse.ServerResponse.Hea 2610// der or (if a response was returned at all) in 2611// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2612// whether the returned error was because http.StatusNotModified was 2613// returned. 2614func (c *CatalogSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1SearchCatalogResponse, error) { 2615 gensupport.SetOptions(c.urlParams_, opts...) 2616 res, err := c.doRequest("json") 2617 if res != nil && res.StatusCode == http.StatusNotModified { 2618 if res.Body != nil { 2619 res.Body.Close() 2620 } 2621 return nil, &googleapi.Error{ 2622 Code: res.StatusCode, 2623 Header: res.Header, 2624 } 2625 } 2626 if err != nil { 2627 return nil, err 2628 } 2629 defer googleapi.CloseBody(res) 2630 if err := googleapi.CheckResponse(res); err != nil { 2631 return nil, err 2632 } 2633 ret := &GoogleCloudDatacatalogV1beta1SearchCatalogResponse{ 2634 ServerResponse: googleapi.ServerResponse{ 2635 Header: res.Header, 2636 HTTPStatusCode: res.StatusCode, 2637 }, 2638 } 2639 target := &ret 2640 if err := gensupport.DecodeResponse(target, res); err != nil { 2641 return nil, err 2642 } 2643 return ret, nil 2644 // { 2645 // "description": "Searches Data Catalog for multiple resources like entries, tags that match a query. This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequently call `Get` methods. Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries. See [Data Catalog Search Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information.", 2646 // "flatPath": "v1beta1/catalog:search", 2647 // "httpMethod": "POST", 2648 // "id": "datacatalog.catalog.search", 2649 // "parameterOrder": [], 2650 // "parameters": {}, 2651 // "path": "v1beta1/catalog:search", 2652 // "request": { 2653 // "$ref": "GoogleCloudDatacatalogV1beta1SearchCatalogRequest" 2654 // }, 2655 // "response": { 2656 // "$ref": "GoogleCloudDatacatalogV1beta1SearchCatalogResponse" 2657 // }, 2658 // "scopes": [ 2659 // "https://www.googleapis.com/auth/cloud-platform" 2660 // ] 2661 // } 2662 2663} 2664 2665// Pages invokes f for each page of results. 2666// A non-nil error returned from f will halt the iteration. 2667// The provided context supersedes any context provided to the Context method. 2668func (c *CatalogSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1SearchCatalogResponse) error) error { 2669 c.ctx_ = ctx 2670 defer func(pt string) { c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken = pt }(c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken) // reset paging to original point 2671 for { 2672 x, err := c.Do() 2673 if err != nil { 2674 return err 2675 } 2676 if err := f(x); err != nil { 2677 return err 2678 } 2679 if x.NextPageToken == "" { 2680 return nil 2681 } 2682 c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken = x.NextPageToken 2683 } 2684} 2685 2686// method id "datacatalog.entries.lookup": 2687 2688type EntriesLookupCall struct { 2689 s *Service 2690 urlParams_ gensupport.URLParams 2691 ifNoneMatch_ string 2692 ctx_ context.Context 2693 header_ http.Header 2694} 2695 2696// Lookup: Get an entry by target resource name. This method allows 2697// clients to use the resource name from the source Google Cloud 2698// Platform service to get the Data Catalog Entry. 2699func (r *EntriesService) Lookup() *EntriesLookupCall { 2700 c := &EntriesLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2701 return c 2702} 2703 2704// LinkedResource sets the optional parameter "linkedResource": The full 2705// name of the Google Cloud Platform resource the Data Catalog entry 2706// represents. See: 2707// https://cloud.google.com/apis/design/resource_names#full_resource_name. 2708// Full names are case-sensitive. Examples: * 2709// //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables 2710// /tableId * //pubsub.googleapis.com/projects/projectId/topics/topicId 2711func (c *EntriesLookupCall) LinkedResource(linkedResource string) *EntriesLookupCall { 2712 c.urlParams_.Set("linkedResource", linkedResource) 2713 return c 2714} 2715 2716// SqlResource sets the optional parameter "sqlResource": The SQL name 2717// of the entry. SQL names are case-sensitive. Examples: * 2718// `pubsub.project_id.topic_id` * 2719// ``pubsub.project_id.`topic.id.with.dots` `` * 2720// `bigquery.table.project_id.dataset_id.table_id` * 2721// `bigquery.dataset.project_id.dataset_id` * 2722// `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` 2723// `*_id`s shoud satisfy the standard SQL rules for identifiers. 2724// https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. 2725func (c *EntriesLookupCall) SqlResource(sqlResource string) *EntriesLookupCall { 2726 c.urlParams_.Set("sqlResource", sqlResource) 2727 return c 2728} 2729 2730// Fields allows partial responses to be retrieved. See 2731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2732// for more information. 2733func (c *EntriesLookupCall) Fields(s ...googleapi.Field) *EntriesLookupCall { 2734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2735 return c 2736} 2737 2738// IfNoneMatch sets the optional parameter which makes the operation 2739// fail if the object's ETag matches the given value. This is useful for 2740// getting updates only after the object has changed since the last 2741// request. Use googleapi.IsNotModified to check whether the response 2742// error from Do is the result of In-None-Match. 2743func (c *EntriesLookupCall) IfNoneMatch(entityTag string) *EntriesLookupCall { 2744 c.ifNoneMatch_ = entityTag 2745 return c 2746} 2747 2748// Context sets the context to be used in this call's Do method. Any 2749// pending HTTP request will be aborted if the provided context is 2750// canceled. 2751func (c *EntriesLookupCall) Context(ctx context.Context) *EntriesLookupCall { 2752 c.ctx_ = ctx 2753 return c 2754} 2755 2756// Header returns an http.Header that can be modified by the caller to 2757// add HTTP headers to the request. 2758func (c *EntriesLookupCall) Header() http.Header { 2759 if c.header_ == nil { 2760 c.header_ = make(http.Header) 2761 } 2762 return c.header_ 2763} 2764 2765func (c *EntriesLookupCall) doRequest(alt string) (*http.Response, error) { 2766 reqHeaders := make(http.Header) 2767 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 2768 for k, v := range c.header_ { 2769 reqHeaders[k] = v 2770 } 2771 reqHeaders.Set("User-Agent", c.s.userAgent()) 2772 if c.ifNoneMatch_ != "" { 2773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2774 } 2775 var body io.Reader = nil 2776 c.urlParams_.Set("alt", alt) 2777 c.urlParams_.Set("prettyPrint", "false") 2778 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/entries:lookup") 2779 urls += "?" + c.urlParams_.Encode() 2780 req, err := http.NewRequest("GET", urls, body) 2781 if err != nil { 2782 return nil, err 2783 } 2784 req.Header = reqHeaders 2785 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2786} 2787 2788// Do executes the "datacatalog.entries.lookup" call. 2789// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 2790// non-nil. Any non-2xx status code is an error. Response headers are in 2791// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 2792// (if a response was returned at all) in 2793// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2794// whether the returned error was because http.StatusNotModified was 2795// returned. 2796func (c *EntriesLookupCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 2797 gensupport.SetOptions(c.urlParams_, opts...) 2798 res, err := c.doRequest("json") 2799 if res != nil && res.StatusCode == http.StatusNotModified { 2800 if res.Body != nil { 2801 res.Body.Close() 2802 } 2803 return nil, &googleapi.Error{ 2804 Code: res.StatusCode, 2805 Header: res.Header, 2806 } 2807 } 2808 if err != nil { 2809 return nil, err 2810 } 2811 defer googleapi.CloseBody(res) 2812 if err := googleapi.CheckResponse(res); err != nil { 2813 return nil, err 2814 } 2815 ret := &GoogleCloudDatacatalogV1beta1Entry{ 2816 ServerResponse: googleapi.ServerResponse{ 2817 Header: res.Header, 2818 HTTPStatusCode: res.StatusCode, 2819 }, 2820 } 2821 target := &ret 2822 if err := gensupport.DecodeResponse(target, res); err != nil { 2823 return nil, err 2824 } 2825 return ret, nil 2826 // { 2827 // "description": "Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.", 2828 // "flatPath": "v1beta1/entries:lookup", 2829 // "httpMethod": "GET", 2830 // "id": "datacatalog.entries.lookup", 2831 // "parameterOrder": [], 2832 // "parameters": { 2833 // "linkedResource": { 2834 // "description": "The full name of the Google Cloud Platform resource the Data Catalog entry represents. See: https://cloud.google.com/apis/design/resource_names#full_resource_name. Full names are case-sensitive. Examples: * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId * //pubsub.googleapis.com/projects/projectId/topics/topicId", 2835 // "location": "query", 2836 // "type": "string" 2837 // }, 2838 // "sqlResource": { 2839 // "description": "The SQL name of the entry. SQL names are case-sensitive. Examples: * `pubsub.project_id.topic_id` * ``pubsub.project_id.`topic.id.with.dots` `` * `bigquery.table.project_id.dataset_id.table_id` * `bigquery.dataset.project_id.dataset_id` * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` `*_id`s shoud satisfy the standard SQL rules for identifiers. https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.", 2840 // "location": "query", 2841 // "type": "string" 2842 // } 2843 // }, 2844 // "path": "v1beta1/entries:lookup", 2845 // "response": { 2846 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 2847 // }, 2848 // "scopes": [ 2849 // "https://www.googleapis.com/auth/cloud-platform" 2850 // ] 2851 // } 2852 2853} 2854 2855// method id "datacatalog.projects.locations.entryGroups.create": 2856 2857type ProjectsLocationsEntryGroupsCreateCall struct { 2858 s *Service 2859 parent string 2860 googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup 2861 urlParams_ gensupport.URLParams 2862 ctx_ context.Context 2863 header_ http.Header 2864} 2865 2866// Create: A maximum of 10,000 entry groups may be created per 2867// organization across all locations. Users should enable the Data 2868// Catalog API in the project identified by the `parent` parameter (see 2869// [Data Catalog Resource Project] 2870// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 2871// for more information). 2872// 2873// - parent: The name of the project this entry group is in. Example: * 2874// projects/{project_id}/locations/{location} Note that this 2875// EntryGroup and its child resources may not actually be stored in 2876// the location in this name. 2877func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { 2878 c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2879 c.parent = parent 2880 c.googleclouddatacatalogv1beta1entrygroup = googleclouddatacatalogv1beta1entrygroup 2881 return c 2882} 2883 2884// EntryGroupId sets the optional parameter "entryGroupId": Required. 2885// The id of the entry group to create. The id must begin with a letter 2886// or underscore, contain only English letters, numbers and underscores, 2887// and be at most 64 characters. 2888func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { 2889 c.urlParams_.Set("entryGroupId", entryGroupId) 2890 return c 2891} 2892 2893// Fields allows partial responses to be retrieved. See 2894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2895// for more information. 2896func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { 2897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2898 return c 2899} 2900 2901// Context sets the context to be used in this call's Do method. Any 2902// pending HTTP request will be aborted if the provided context is 2903// canceled. 2904func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { 2905 c.ctx_ = ctx 2906 return c 2907} 2908 2909// Header returns an http.Header that can be modified by the caller to 2910// add HTTP headers to the request. 2911func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { 2912 if c.header_ == nil { 2913 c.header_ = make(http.Header) 2914 } 2915 return c.header_ 2916} 2917 2918func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Response, error) { 2919 reqHeaders := make(http.Header) 2920 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 2921 for k, v := range c.header_ { 2922 reqHeaders[k] = v 2923 } 2924 reqHeaders.Set("User-Agent", c.s.userAgent()) 2925 var body io.Reader = nil 2926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entrygroup) 2927 if err != nil { 2928 return nil, err 2929 } 2930 reqHeaders.Set("Content-Type", "application/json") 2931 c.urlParams_.Set("alt", alt) 2932 c.urlParams_.Set("prettyPrint", "false") 2933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entryGroups") 2934 urls += "?" + c.urlParams_.Encode() 2935 req, err := http.NewRequest("POST", urls, body) 2936 if err != nil { 2937 return nil, err 2938 } 2939 req.Header = reqHeaders 2940 googleapi.Expand(req.URL, map[string]string{ 2941 "parent": c.parent, 2942 }) 2943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2944} 2945 2946// Do executes the "datacatalog.projects.locations.entryGroups.create" call. 2947// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 2948// be non-nil. Any non-2xx status code is an error. Response headers are 2949// in either 2950// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 2951// a response was returned at all) in error.(*googleapi.Error).Header. 2952// Use googleapi.IsNotModified to check whether the returned error was 2953// because http.StatusNotModified was returned. 2954func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 2955 gensupport.SetOptions(c.urlParams_, opts...) 2956 res, err := c.doRequest("json") 2957 if res != nil && res.StatusCode == http.StatusNotModified { 2958 if res.Body != nil { 2959 res.Body.Close() 2960 } 2961 return nil, &googleapi.Error{ 2962 Code: res.StatusCode, 2963 Header: res.Header, 2964 } 2965 } 2966 if err != nil { 2967 return nil, err 2968 } 2969 defer googleapi.CloseBody(res) 2970 if err := googleapi.CheckResponse(res); err != nil { 2971 return nil, err 2972 } 2973 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 2974 ServerResponse: googleapi.ServerResponse{ 2975 Header: res.Header, 2976 HTTPStatusCode: res.StatusCode, 2977 }, 2978 } 2979 target := &ret 2980 if err := gensupport.DecodeResponse(target, res); err != nil { 2981 return nil, err 2982 } 2983 return ret, nil 2984 // { 2985 // "description": "A maximum of 10,000 entry groups may be created per organization across all locations. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 2986 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups", 2987 // "httpMethod": "POST", 2988 // "id": "datacatalog.projects.locations.entryGroups.create", 2989 // "parameterOrder": [ 2990 // "parent" 2991 // ], 2992 // "parameters": { 2993 // "entryGroupId": { 2994 // "description": "Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters.", 2995 // "location": "query", 2996 // "type": "string" 2997 // }, 2998 // "parent": { 2999 // "description": "Required. The name of the project this entry group is in. Example: * projects/{project_id}/locations/{location} Note that this EntryGroup and its child resources may not actually be stored in the location in this name.", 3000 // "location": "path", 3001 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3002 // "required": true, 3003 // "type": "string" 3004 // } 3005 // }, 3006 // "path": "v1beta1/{+parent}/entryGroups", 3007 // "request": { 3008 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3009 // }, 3010 // "response": { 3011 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3012 // }, 3013 // "scopes": [ 3014 // "https://www.googleapis.com/auth/cloud-platform" 3015 // ] 3016 // } 3017 3018} 3019 3020// method id "datacatalog.projects.locations.entryGroups.delete": 3021 3022type ProjectsLocationsEntryGroupsDeleteCall struct { 3023 s *Service 3024 name string 3025 urlParams_ gensupport.URLParams 3026 ctx_ context.Context 3027 header_ http.Header 3028} 3029 3030// Delete: Deletes an EntryGroup. Only entry groups that do not contain 3031// entries can be deleted. Users should enable the Data Catalog API in 3032// the project identified by the `name` parameter (see [Data Catalog 3033// Resource Project] 3034// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 3035// for more information). 3036// 3037// - name: The name of the entry group. For example, 3038// `projects/{project_id}/locations/{location}/entryGroups/{entry_group 3039// _id}`. 3040func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { 3041 c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3042 c.name = name 3043 return c 3044} 3045 3046// Force sets the optional parameter "force": If true, deletes all 3047// entries in the entry group. 3048func (c *ProjectsLocationsEntryGroupsDeleteCall) Force(force bool) *ProjectsLocationsEntryGroupsDeleteCall { 3049 c.urlParams_.Set("force", fmt.Sprint(force)) 3050 return c 3051} 3052 3053// Fields allows partial responses to be retrieved. See 3054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3055// for more information. 3056func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { 3057 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3058 return c 3059} 3060 3061// Context sets the context to be used in this call's Do method. Any 3062// pending HTTP request will be aborted if the provided context is 3063// canceled. 3064func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { 3065 c.ctx_ = ctx 3066 return c 3067} 3068 3069// Header returns an http.Header that can be modified by the caller to 3070// add HTTP headers to the request. 3071func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { 3072 if c.header_ == nil { 3073 c.header_ = make(http.Header) 3074 } 3075 return c.header_ 3076} 3077 3078func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 3079 reqHeaders := make(http.Header) 3080 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3081 for k, v := range c.header_ { 3082 reqHeaders[k] = v 3083 } 3084 reqHeaders.Set("User-Agent", c.s.userAgent()) 3085 var body io.Reader = nil 3086 c.urlParams_.Set("alt", alt) 3087 c.urlParams_.Set("prettyPrint", "false") 3088 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3089 urls += "?" + c.urlParams_.Encode() 3090 req, err := http.NewRequest("DELETE", urls, body) 3091 if err != nil { 3092 return nil, err 3093 } 3094 req.Header = reqHeaders 3095 googleapi.Expand(req.URL, map[string]string{ 3096 "name": c.name, 3097 }) 3098 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3099} 3100 3101// Do executes the "datacatalog.projects.locations.entryGroups.delete" call. 3102// Exactly one of *Empty or error will be non-nil. Any non-2xx status 3103// code is an error. Response headers are in either 3104// *Empty.ServerResponse.Header or (if a response was returned at all) 3105// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3106// check whether the returned error was because http.StatusNotModified 3107// was returned. 3108func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 3109 gensupport.SetOptions(c.urlParams_, opts...) 3110 res, err := c.doRequest("json") 3111 if res != nil && res.StatusCode == http.StatusNotModified { 3112 if res.Body != nil { 3113 res.Body.Close() 3114 } 3115 return nil, &googleapi.Error{ 3116 Code: res.StatusCode, 3117 Header: res.Header, 3118 } 3119 } 3120 if err != nil { 3121 return nil, err 3122 } 3123 defer googleapi.CloseBody(res) 3124 if err := googleapi.CheckResponse(res); err != nil { 3125 return nil, err 3126 } 3127 ret := &Empty{ 3128 ServerResponse: googleapi.ServerResponse{ 3129 Header: res.Header, 3130 HTTPStatusCode: res.StatusCode, 3131 }, 3132 } 3133 target := &ret 3134 if err := gensupport.DecodeResponse(target, res); err != nil { 3135 return nil, err 3136 } 3137 return ret, nil 3138 // { 3139 // "description": "Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 3140 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3141 // "httpMethod": "DELETE", 3142 // "id": "datacatalog.projects.locations.entryGroups.delete", 3143 // "parameterOrder": [ 3144 // "name" 3145 // ], 3146 // "parameters": { 3147 // "force": { 3148 // "description": "Optional. If true, deletes all entries in the entry group.", 3149 // "location": "query", 3150 // "type": "boolean" 3151 // }, 3152 // "name": { 3153 // "description": "Required. The name of the entry group. For example, `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.", 3154 // "location": "path", 3155 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3156 // "required": true, 3157 // "type": "string" 3158 // } 3159 // }, 3160 // "path": "v1beta1/{+name}", 3161 // "response": { 3162 // "$ref": "Empty" 3163 // }, 3164 // "scopes": [ 3165 // "https://www.googleapis.com/auth/cloud-platform" 3166 // ] 3167 // } 3168 3169} 3170 3171// method id "datacatalog.projects.locations.entryGroups.get": 3172 3173type ProjectsLocationsEntryGroupsGetCall struct { 3174 s *Service 3175 name string 3176 urlParams_ gensupport.URLParams 3177 ifNoneMatch_ string 3178 ctx_ context.Context 3179 header_ http.Header 3180} 3181 3182// Get: Gets an EntryGroup. 3183// 3184// - name: The name of the entry group. For example, 3185// `projects/{project_id}/locations/{location}/entryGroups/{entry_group 3186// _id}`. 3187func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { 3188 c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3189 c.name = name 3190 return c 3191} 3192 3193// ReadMask sets the optional parameter "readMask": The fields to 3194// return. If not set or empty, all fields are returned. 3195func (c *ProjectsLocationsEntryGroupsGetCall) ReadMask(readMask string) *ProjectsLocationsEntryGroupsGetCall { 3196 c.urlParams_.Set("readMask", readMask) 3197 return c 3198} 3199 3200// Fields allows partial responses to be retrieved. See 3201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3202// for more information. 3203func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { 3204 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3205 return c 3206} 3207 3208// IfNoneMatch sets the optional parameter which makes the operation 3209// fail if the object's ETag matches the given value. This is useful for 3210// getting updates only after the object has changed since the last 3211// request. Use googleapi.IsNotModified to check whether the response 3212// error from Do is the result of In-None-Match. 3213func (c *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { 3214 c.ifNoneMatch_ = entityTag 3215 return c 3216} 3217 3218// Context sets the context to be used in this call's Do method. Any 3219// pending HTTP request will be aborted if the provided context is 3220// canceled. 3221func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { 3222 c.ctx_ = ctx 3223 return c 3224} 3225 3226// Header returns an http.Header that can be modified by the caller to 3227// add HTTP headers to the request. 3228func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { 3229 if c.header_ == nil { 3230 c.header_ = make(http.Header) 3231 } 3232 return c.header_ 3233} 3234 3235func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { 3236 reqHeaders := make(http.Header) 3237 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3238 for k, v := range c.header_ { 3239 reqHeaders[k] = v 3240 } 3241 reqHeaders.Set("User-Agent", c.s.userAgent()) 3242 if c.ifNoneMatch_ != "" { 3243 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3244 } 3245 var body io.Reader = nil 3246 c.urlParams_.Set("alt", alt) 3247 c.urlParams_.Set("prettyPrint", "false") 3248 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3249 urls += "?" + c.urlParams_.Encode() 3250 req, err := http.NewRequest("GET", urls, body) 3251 if err != nil { 3252 return nil, err 3253 } 3254 req.Header = reqHeaders 3255 googleapi.Expand(req.URL, map[string]string{ 3256 "name": c.name, 3257 }) 3258 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3259} 3260 3261// Do executes the "datacatalog.projects.locations.entryGroups.get" call. 3262// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 3263// be non-nil. Any non-2xx status code is an error. Response headers are 3264// in either 3265// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 3266// a response was returned at all) in error.(*googleapi.Error).Header. 3267// Use googleapi.IsNotModified to check whether the returned error was 3268// because http.StatusNotModified was returned. 3269func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 3270 gensupport.SetOptions(c.urlParams_, opts...) 3271 res, err := c.doRequest("json") 3272 if res != nil && res.StatusCode == http.StatusNotModified { 3273 if res.Body != nil { 3274 res.Body.Close() 3275 } 3276 return nil, &googleapi.Error{ 3277 Code: res.StatusCode, 3278 Header: res.Header, 3279 } 3280 } 3281 if err != nil { 3282 return nil, err 3283 } 3284 defer googleapi.CloseBody(res) 3285 if err := googleapi.CheckResponse(res); err != nil { 3286 return nil, err 3287 } 3288 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 3289 ServerResponse: googleapi.ServerResponse{ 3290 Header: res.Header, 3291 HTTPStatusCode: res.StatusCode, 3292 }, 3293 } 3294 target := &ret 3295 if err := gensupport.DecodeResponse(target, res); err != nil { 3296 return nil, err 3297 } 3298 return ret, nil 3299 // { 3300 // "description": "Gets an EntryGroup.", 3301 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3302 // "httpMethod": "GET", 3303 // "id": "datacatalog.projects.locations.entryGroups.get", 3304 // "parameterOrder": [ 3305 // "name" 3306 // ], 3307 // "parameters": { 3308 // "name": { 3309 // "description": "Required. The name of the entry group. For example, `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.", 3310 // "location": "path", 3311 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3312 // "required": true, 3313 // "type": "string" 3314 // }, 3315 // "readMask": { 3316 // "description": "The fields to return. If not set or empty, all fields are returned.", 3317 // "format": "google-fieldmask", 3318 // "location": "query", 3319 // "type": "string" 3320 // } 3321 // }, 3322 // "path": "v1beta1/{+name}", 3323 // "response": { 3324 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3325 // }, 3326 // "scopes": [ 3327 // "https://www.googleapis.com/auth/cloud-platform" 3328 // ] 3329 // } 3330 3331} 3332 3333// method id "datacatalog.projects.locations.entryGroups.getIamPolicy": 3334 3335type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { 3336 s *Service 3337 resource string 3338 getiampolicyrequest *GetIamPolicyRequest 3339 urlParams_ gensupport.URLParams 3340 ctx_ context.Context 3341 header_ http.Header 3342} 3343 3344// GetIamPolicy: Gets the access control policy for a resource. A 3345// `NOT_FOUND` error is returned if the resource does not exist. An 3346// empty policy is returned if the resource exists but does not have a 3347// policy set on it. Supported resources are: - Tag templates. - 3348// Entries. - Entry groups. Note, this method cannot be used to manage 3349// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 3350// resources synced to Data Catalog. Callers must have following Google 3351// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 3352// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 3353// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 3354// get policies on entry groups. 3355// 3356// - resource: REQUIRED: The resource for which the policy is being 3357// requested. See the operation documentation for the appropriate 3358// value for this field. 3359func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3360 c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3361 c.resource = resource 3362 c.getiampolicyrequest = getiampolicyrequest 3363 return c 3364} 3365 3366// Fields allows partial responses to be retrieved. See 3367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3368// for more information. 3369func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3370 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3371 return c 3372} 3373 3374// Context sets the context to be used in this call's Do method. Any 3375// pending HTTP request will be aborted if the provided context is 3376// canceled. 3377func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3378 c.ctx_ = ctx 3379 return c 3380} 3381 3382// Header returns an http.Header that can be modified by the caller to 3383// add HTTP headers to the request. 3384func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { 3385 if c.header_ == nil { 3386 c.header_ = make(http.Header) 3387 } 3388 return c.header_ 3389} 3390 3391func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3392 reqHeaders := make(http.Header) 3393 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3394 for k, v := range c.header_ { 3395 reqHeaders[k] = v 3396 } 3397 reqHeaders.Set("User-Agent", c.s.userAgent()) 3398 var body io.Reader = nil 3399 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 3400 if err != nil { 3401 return nil, err 3402 } 3403 reqHeaders.Set("Content-Type", "application/json") 3404 c.urlParams_.Set("alt", alt) 3405 c.urlParams_.Set("prettyPrint", "false") 3406 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 3407 urls += "?" + c.urlParams_.Encode() 3408 req, err := http.NewRequest("POST", urls, body) 3409 if err != nil { 3410 return nil, err 3411 } 3412 req.Header = reqHeaders 3413 googleapi.Expand(req.URL, map[string]string{ 3414 "resource": c.resource, 3415 }) 3416 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3417} 3418 3419// Do executes the "datacatalog.projects.locations.entryGroups.getIamPolicy" call. 3420// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3421// code is an error. Response headers are in either 3422// *Policy.ServerResponse.Header or (if a response was returned at all) 3423// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3424// check whether the returned error was because http.StatusNotModified 3425// was returned. 3426func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3427 gensupport.SetOptions(c.urlParams_, opts...) 3428 res, err := c.doRequest("json") 3429 if res != nil && res.StatusCode == http.StatusNotModified { 3430 if res.Body != nil { 3431 res.Body.Close() 3432 } 3433 return nil, &googleapi.Error{ 3434 Code: res.StatusCode, 3435 Header: res.Header, 3436 } 3437 } 3438 if err != nil { 3439 return nil, err 3440 } 3441 defer googleapi.CloseBody(res) 3442 if err := googleapi.CheckResponse(res); err != nil { 3443 return nil, err 3444 } 3445 ret := &Policy{ 3446 ServerResponse: googleapi.ServerResponse{ 3447 Header: res.Header, 3448 HTTPStatusCode: res.StatusCode, 3449 }, 3450 } 3451 target := &ret 3452 if err := gensupport.DecodeResponse(target, res); err != nil { 3453 return nil, err 3454 } 3455 return ret, nil 3456 // { 3457 // "description": "Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.", 3458 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:getIamPolicy", 3459 // "httpMethod": "POST", 3460 // "id": "datacatalog.projects.locations.entryGroups.getIamPolicy", 3461 // "parameterOrder": [ 3462 // "resource" 3463 // ], 3464 // "parameters": { 3465 // "resource": { 3466 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 3467 // "location": "path", 3468 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3469 // "required": true, 3470 // "type": "string" 3471 // } 3472 // }, 3473 // "path": "v1beta1/{+resource}:getIamPolicy", 3474 // "request": { 3475 // "$ref": "GetIamPolicyRequest" 3476 // }, 3477 // "response": { 3478 // "$ref": "Policy" 3479 // }, 3480 // "scopes": [ 3481 // "https://www.googleapis.com/auth/cloud-platform" 3482 // ] 3483 // } 3484 3485} 3486 3487// method id "datacatalog.projects.locations.entryGroups.list": 3488 3489type ProjectsLocationsEntryGroupsListCall struct { 3490 s *Service 3491 parent string 3492 urlParams_ gensupport.URLParams 3493 ifNoneMatch_ string 3494 ctx_ context.Context 3495 header_ http.Header 3496} 3497 3498// List: Lists entry groups. 3499// 3500// - parent: The name of the location that contains the entry groups, 3501// which can be provided in URL format. Example: * 3502// projects/{project_id}/locations/{location}. 3503func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { 3504 c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3505 c.parent = parent 3506 return c 3507} 3508 3509// PageSize sets the optional parameter "pageSize": The maximum number 3510// of items to return. Default is 10. Max limit is 1000. Throws an 3511// invalid argument for `page_size > 1000`. 3512func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { 3513 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3514 return c 3515} 3516 3517// PageToken sets the optional parameter "pageToken": Token that 3518// specifies which page is requested. If empty, the first page is 3519// returned. 3520func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { 3521 c.urlParams_.Set("pageToken", pageToken) 3522 return c 3523} 3524 3525// Fields allows partial responses to be retrieved. See 3526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3527// for more information. 3528func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { 3529 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3530 return c 3531} 3532 3533// IfNoneMatch sets the optional parameter which makes the operation 3534// fail if the object's ETag matches the given value. This is useful for 3535// getting updates only after the object has changed since the last 3536// request. Use googleapi.IsNotModified to check whether the response 3537// error from Do is the result of In-None-Match. 3538func (c *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { 3539 c.ifNoneMatch_ = entityTag 3540 return c 3541} 3542 3543// Context sets the context to be used in this call's Do method. Any 3544// pending HTTP request will be aborted if the provided context is 3545// canceled. 3546func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { 3547 c.ctx_ = ctx 3548 return c 3549} 3550 3551// Header returns an http.Header that can be modified by the caller to 3552// add HTTP headers to the request. 3553func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { 3554 if c.header_ == nil { 3555 c.header_ = make(http.Header) 3556 } 3557 return c.header_ 3558} 3559 3560func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { 3561 reqHeaders := make(http.Header) 3562 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3563 for k, v := range c.header_ { 3564 reqHeaders[k] = v 3565 } 3566 reqHeaders.Set("User-Agent", c.s.userAgent()) 3567 if c.ifNoneMatch_ != "" { 3568 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3569 } 3570 var body io.Reader = nil 3571 c.urlParams_.Set("alt", alt) 3572 c.urlParams_.Set("prettyPrint", "false") 3573 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entryGroups") 3574 urls += "?" + c.urlParams_.Encode() 3575 req, err := http.NewRequest("GET", urls, body) 3576 if err != nil { 3577 return nil, err 3578 } 3579 req.Header = reqHeaders 3580 googleapi.Expand(req.URL, map[string]string{ 3581 "parent": c.parent, 3582 }) 3583 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3584} 3585 3586// Do executes the "datacatalog.projects.locations.entryGroups.list" call. 3587// Exactly one of *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse 3588// or error will be non-nil. Any non-2xx status code is an error. 3589// Response headers are in either 3590// *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse.ServerResponse.H 3591// eader or (if a response was returned at all) in 3592// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3593// whether the returned error was because http.StatusNotModified was 3594// returned. 3595func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse, error) { 3596 gensupport.SetOptions(c.urlParams_, opts...) 3597 res, err := c.doRequest("json") 3598 if res != nil && res.StatusCode == http.StatusNotModified { 3599 if res.Body != nil { 3600 res.Body.Close() 3601 } 3602 return nil, &googleapi.Error{ 3603 Code: res.StatusCode, 3604 Header: res.Header, 3605 } 3606 } 3607 if err != nil { 3608 return nil, err 3609 } 3610 defer googleapi.CloseBody(res) 3611 if err := googleapi.CheckResponse(res); err != nil { 3612 return nil, err 3613 } 3614 ret := &GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse{ 3615 ServerResponse: googleapi.ServerResponse{ 3616 Header: res.Header, 3617 HTTPStatusCode: res.StatusCode, 3618 }, 3619 } 3620 target := &ret 3621 if err := gensupport.DecodeResponse(target, res); err != nil { 3622 return nil, err 3623 } 3624 return ret, nil 3625 // { 3626 // "description": "Lists entry groups.", 3627 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups", 3628 // "httpMethod": "GET", 3629 // "id": "datacatalog.projects.locations.entryGroups.list", 3630 // "parameterOrder": [ 3631 // "parent" 3632 // ], 3633 // "parameters": { 3634 // "pageSize": { 3635 // "description": "Optional. The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for `page_size \u003e 1000`.", 3636 // "format": "int32", 3637 // "location": "query", 3638 // "type": "integer" 3639 // }, 3640 // "pageToken": { 3641 // "description": "Optional. Token that specifies which page is requested. If empty, the first page is returned.", 3642 // "location": "query", 3643 // "type": "string" 3644 // }, 3645 // "parent": { 3646 // "description": "Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: * projects/{project_id}/locations/{location}", 3647 // "location": "path", 3648 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3649 // "required": true, 3650 // "type": "string" 3651 // } 3652 // }, 3653 // "path": "v1beta1/{+parent}/entryGroups", 3654 // "response": { 3655 // "$ref": "GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse" 3656 // }, 3657 // "scopes": [ 3658 // "https://www.googleapis.com/auth/cloud-platform" 3659 // ] 3660 // } 3661 3662} 3663 3664// Pages invokes f for each page of results. 3665// A non-nil error returned from f will halt the iteration. 3666// The provided context supersedes any context provided to the Context method. 3667func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse) error) error { 3668 c.ctx_ = ctx 3669 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3670 for { 3671 x, err := c.Do() 3672 if err != nil { 3673 return err 3674 } 3675 if err := f(x); err != nil { 3676 return err 3677 } 3678 if x.NextPageToken == "" { 3679 return nil 3680 } 3681 c.PageToken(x.NextPageToken) 3682 } 3683} 3684 3685// method id "datacatalog.projects.locations.entryGroups.patch": 3686 3687type ProjectsLocationsEntryGroupsPatchCall struct { 3688 s *Service 3689 name string 3690 googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup 3691 urlParams_ gensupport.URLParams 3692 ctx_ context.Context 3693 header_ http.Header 3694} 3695 3696// Patch: Updates an EntryGroup. The user should enable the Data Catalog 3697// API in the project identified by the `entry_group.name` parameter 3698// (see [Data Catalog Resource Project] 3699// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 3700// for more information). 3701// 3702// - name: The resource name of the entry group in URL format. Example: 3703// * 3704// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 3705// id} Note that this EntryGroup and its child resources may not 3706// actually be stored in the location in this name. 3707func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { 3708 c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3709 c.name = name 3710 c.googleclouddatacatalogv1beta1entrygroup = googleclouddatacatalogv1beta1entrygroup 3711 return c 3712} 3713 3714// UpdateMask sets the optional parameter "updateMask": Names of fields 3715// whose values to overwrite on an entry group. If this parameter is 3716// absent or empty, all modifiable fields are overwritten. If such 3717// fields are non-required and omitted in the request body, their values 3718// are emptied. 3719func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { 3720 c.urlParams_.Set("updateMask", updateMask) 3721 return c 3722} 3723 3724// Fields allows partial responses to be retrieved. See 3725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3726// for more information. 3727func (c *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { 3728 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3729 return c 3730} 3731 3732// Context sets the context to be used in this call's Do method. Any 3733// pending HTTP request will be aborted if the provided context is 3734// canceled. 3735func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { 3736 c.ctx_ = ctx 3737 return c 3738} 3739 3740// Header returns an http.Header that can be modified by the caller to 3741// add HTTP headers to the request. 3742func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { 3743 if c.header_ == nil { 3744 c.header_ = make(http.Header) 3745 } 3746 return c.header_ 3747} 3748 3749func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 3750 reqHeaders := make(http.Header) 3751 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3752 for k, v := range c.header_ { 3753 reqHeaders[k] = v 3754 } 3755 reqHeaders.Set("User-Agent", c.s.userAgent()) 3756 var body io.Reader = nil 3757 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entrygroup) 3758 if err != nil { 3759 return nil, err 3760 } 3761 reqHeaders.Set("Content-Type", "application/json") 3762 c.urlParams_.Set("alt", alt) 3763 c.urlParams_.Set("prettyPrint", "false") 3764 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3765 urls += "?" + c.urlParams_.Encode() 3766 req, err := http.NewRequest("PATCH", urls, body) 3767 if err != nil { 3768 return nil, err 3769 } 3770 req.Header = reqHeaders 3771 googleapi.Expand(req.URL, map[string]string{ 3772 "name": c.name, 3773 }) 3774 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3775} 3776 3777// Do executes the "datacatalog.projects.locations.entryGroups.patch" call. 3778// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 3779// be non-nil. Any non-2xx status code is an error. Response headers are 3780// in either 3781// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 3782// a response was returned at all) in error.(*googleapi.Error).Header. 3783// Use googleapi.IsNotModified to check whether the returned error was 3784// because http.StatusNotModified was returned. 3785func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 3786 gensupport.SetOptions(c.urlParams_, opts...) 3787 res, err := c.doRequest("json") 3788 if res != nil && res.StatusCode == http.StatusNotModified { 3789 if res.Body != nil { 3790 res.Body.Close() 3791 } 3792 return nil, &googleapi.Error{ 3793 Code: res.StatusCode, 3794 Header: res.Header, 3795 } 3796 } 3797 if err != nil { 3798 return nil, err 3799 } 3800 defer googleapi.CloseBody(res) 3801 if err := googleapi.CheckResponse(res); err != nil { 3802 return nil, err 3803 } 3804 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 3805 ServerResponse: googleapi.ServerResponse{ 3806 Header: res.Header, 3807 HTTPStatusCode: res.StatusCode, 3808 }, 3809 } 3810 target := &ret 3811 if err := gensupport.DecodeResponse(target, res); err != nil { 3812 return nil, err 3813 } 3814 return ret, nil 3815 // { 3816 // "description": "Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the `entry_group.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 3817 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3818 // "httpMethod": "PATCH", 3819 // "id": "datacatalog.projects.locations.entryGroups.patch", 3820 // "parameterOrder": [ 3821 // "name" 3822 // ], 3823 // "parameters": { 3824 // "name": { 3825 // "description": "The resource name of the entry group in URL format. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} Note that this EntryGroup and its child resources may not actually be stored in the location in this name.", 3826 // "location": "path", 3827 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3828 // "required": true, 3829 // "type": "string" 3830 // }, 3831 // "updateMask": { 3832 // "description": "Names of fields whose values to overwrite on an entry group. If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.", 3833 // "format": "google-fieldmask", 3834 // "location": "query", 3835 // "type": "string" 3836 // } 3837 // }, 3838 // "path": "v1beta1/{+name}", 3839 // "request": { 3840 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3841 // }, 3842 // "response": { 3843 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3844 // }, 3845 // "scopes": [ 3846 // "https://www.googleapis.com/auth/cloud-platform" 3847 // ] 3848 // } 3849 3850} 3851 3852// method id "datacatalog.projects.locations.entryGroups.setIamPolicy": 3853 3854type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { 3855 s *Service 3856 resource string 3857 setiampolicyrequest *SetIamPolicyRequest 3858 urlParams_ gensupport.URLParams 3859 ctx_ context.Context 3860 header_ http.Header 3861} 3862 3863// SetIamPolicy: Sets the access control policy for a resource. Replaces 3864// any existing policy. Supported resources are: - Tag templates. - 3865// Entries. - Entry groups. Note, this method cannot be used to manage 3866// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 3867// resources synced to Data Catalog. Callers must have following Google 3868// IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set 3869// policies on tag templates. - `datacatalog.entries.setIamPolicy` to 3870// set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to 3871// set policies on entry groups. 3872// 3873// - resource: REQUIRED: The resource for which the policy is being 3874// specified. See the operation documentation for the appropriate 3875// value for this field. 3876func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3877 c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3878 c.resource = resource 3879 c.setiampolicyrequest = setiampolicyrequest 3880 return c 3881} 3882 3883// Fields allows partial responses to be retrieved. See 3884// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3885// for more information. 3886func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3887 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3888 return c 3889} 3890 3891// Context sets the context to be used in this call's Do method. Any 3892// pending HTTP request will be aborted if the provided context is 3893// canceled. 3894func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3895 c.ctx_ = ctx 3896 return c 3897} 3898 3899// Header returns an http.Header that can be modified by the caller to 3900// add HTTP headers to the request. 3901func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { 3902 if c.header_ == nil { 3903 c.header_ = make(http.Header) 3904 } 3905 return c.header_ 3906} 3907 3908func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3909 reqHeaders := make(http.Header) 3910 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3911 for k, v := range c.header_ { 3912 reqHeaders[k] = v 3913 } 3914 reqHeaders.Set("User-Agent", c.s.userAgent()) 3915 var body io.Reader = nil 3916 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 3917 if err != nil { 3918 return nil, err 3919 } 3920 reqHeaders.Set("Content-Type", "application/json") 3921 c.urlParams_.Set("alt", alt) 3922 c.urlParams_.Set("prettyPrint", "false") 3923 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 3924 urls += "?" + c.urlParams_.Encode() 3925 req, err := http.NewRequest("POST", urls, body) 3926 if err != nil { 3927 return nil, err 3928 } 3929 req.Header = reqHeaders 3930 googleapi.Expand(req.URL, map[string]string{ 3931 "resource": c.resource, 3932 }) 3933 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3934} 3935 3936// Do executes the "datacatalog.projects.locations.entryGroups.setIamPolicy" call. 3937// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3938// code is an error. Response headers are in either 3939// *Policy.ServerResponse.Header or (if a response was returned at all) 3940// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3941// check whether the returned error was because http.StatusNotModified 3942// was returned. 3943func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3944 gensupport.SetOptions(c.urlParams_, opts...) 3945 res, err := c.doRequest("json") 3946 if res != nil && res.StatusCode == http.StatusNotModified { 3947 if res.Body != nil { 3948 res.Body.Close() 3949 } 3950 return nil, &googleapi.Error{ 3951 Code: res.StatusCode, 3952 Header: res.Header, 3953 } 3954 } 3955 if err != nil { 3956 return nil, err 3957 } 3958 defer googleapi.CloseBody(res) 3959 if err := googleapi.CheckResponse(res); err != nil { 3960 return nil, err 3961 } 3962 ret := &Policy{ 3963 ServerResponse: googleapi.ServerResponse{ 3964 Header: res.Header, 3965 HTTPStatusCode: res.StatusCode, 3966 }, 3967 } 3968 target := &ret 3969 if err := gensupport.DecodeResponse(target, res); err != nil { 3970 return nil, err 3971 } 3972 return ret, nil 3973 // { 3974 // "description": "Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.", 3975 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:setIamPolicy", 3976 // "httpMethod": "POST", 3977 // "id": "datacatalog.projects.locations.entryGroups.setIamPolicy", 3978 // "parameterOrder": [ 3979 // "resource" 3980 // ], 3981 // "parameters": { 3982 // "resource": { 3983 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 3984 // "location": "path", 3985 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3986 // "required": true, 3987 // "type": "string" 3988 // } 3989 // }, 3990 // "path": "v1beta1/{+resource}:setIamPolicy", 3991 // "request": { 3992 // "$ref": "SetIamPolicyRequest" 3993 // }, 3994 // "response": { 3995 // "$ref": "Policy" 3996 // }, 3997 // "scopes": [ 3998 // "https://www.googleapis.com/auth/cloud-platform" 3999 // ] 4000 // } 4001 4002} 4003 4004// method id "datacatalog.projects.locations.entryGroups.testIamPermissions": 4005 4006type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { 4007 s *Service 4008 resource string 4009 testiampermissionsrequest *TestIamPermissionsRequest 4010 urlParams_ gensupport.URLParams 4011 ctx_ context.Context 4012 header_ http.Header 4013} 4014 4015// TestIamPermissions: Returns the caller's permissions on a resource. 4016// If the resource does not exist, an empty set of permissions is 4017// returned (We don't return a `NOT_FOUND` error). Supported resources 4018// are: - Tag templates. - Entries. - Entry groups. Note, this method 4019// cannot be used to manage policies for BigQuery, Pub/Sub and any 4020// external Google Cloud Platform resources synced to Data Catalog. A 4021// caller is not required to have Google IAM permission to make this 4022// request. 4023// 4024// - resource: REQUIRED: The resource for which the policy detail is 4025// being requested. See the operation documentation for the 4026// appropriate value for this field. 4027func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 4028 c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4029 c.resource = resource 4030 c.testiampermissionsrequest = testiampermissionsrequest 4031 return c 4032} 4033 4034// Fields allows partial responses to be retrieved. See 4035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4036// for more information. 4037func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 4038 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4039 return c 4040} 4041 4042// Context sets the context to be used in this call's Do method. Any 4043// pending HTTP request will be aborted if the provided context is 4044// canceled. 4045func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 4046 c.ctx_ = ctx 4047 return c 4048} 4049 4050// Header returns an http.Header that can be modified by the caller to 4051// add HTTP headers to the request. 4052func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { 4053 if c.header_ == nil { 4054 c.header_ = make(http.Header) 4055 } 4056 return c.header_ 4057} 4058 4059func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4060 reqHeaders := make(http.Header) 4061 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4062 for k, v := range c.header_ { 4063 reqHeaders[k] = v 4064 } 4065 reqHeaders.Set("User-Agent", c.s.userAgent()) 4066 var body io.Reader = nil 4067 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4068 if err != nil { 4069 return nil, err 4070 } 4071 reqHeaders.Set("Content-Type", "application/json") 4072 c.urlParams_.Set("alt", alt) 4073 c.urlParams_.Set("prettyPrint", "false") 4074 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 4075 urls += "?" + c.urlParams_.Encode() 4076 req, err := http.NewRequest("POST", urls, body) 4077 if err != nil { 4078 return nil, err 4079 } 4080 req.Header = reqHeaders 4081 googleapi.Expand(req.URL, map[string]string{ 4082 "resource": c.resource, 4083 }) 4084 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4085} 4086 4087// Do executes the "datacatalog.projects.locations.entryGroups.testIamPermissions" call. 4088// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 4089// Any non-2xx status code is an error. Response headers are in either 4090// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 4091// was returned at all) in error.(*googleapi.Error).Header. Use 4092// googleapi.IsNotModified to check whether the returned error was 4093// because http.StatusNotModified was returned. 4094func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4095 gensupport.SetOptions(c.urlParams_, opts...) 4096 res, err := c.doRequest("json") 4097 if res != nil && res.StatusCode == http.StatusNotModified { 4098 if res.Body != nil { 4099 res.Body.Close() 4100 } 4101 return nil, &googleapi.Error{ 4102 Code: res.StatusCode, 4103 Header: res.Header, 4104 } 4105 } 4106 if err != nil { 4107 return nil, err 4108 } 4109 defer googleapi.CloseBody(res) 4110 if err := googleapi.CheckResponse(res); err != nil { 4111 return nil, err 4112 } 4113 ret := &TestIamPermissionsResponse{ 4114 ServerResponse: googleapi.ServerResponse{ 4115 Header: res.Header, 4116 HTTPStatusCode: res.StatusCode, 4117 }, 4118 } 4119 target := &ret 4120 if err := gensupport.DecodeResponse(target, res); err != nil { 4121 return nil, err 4122 } 4123 return ret, nil 4124 // { 4125 // "description": "Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.", 4126 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:testIamPermissions", 4127 // "httpMethod": "POST", 4128 // "id": "datacatalog.projects.locations.entryGroups.testIamPermissions", 4129 // "parameterOrder": [ 4130 // "resource" 4131 // ], 4132 // "parameters": { 4133 // "resource": { 4134 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 4135 // "location": "path", 4136 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 4137 // "required": true, 4138 // "type": "string" 4139 // } 4140 // }, 4141 // "path": "v1beta1/{+resource}:testIamPermissions", 4142 // "request": { 4143 // "$ref": "TestIamPermissionsRequest" 4144 // }, 4145 // "response": { 4146 // "$ref": "TestIamPermissionsResponse" 4147 // }, 4148 // "scopes": [ 4149 // "https://www.googleapis.com/auth/cloud-platform" 4150 // ] 4151 // } 4152 4153} 4154 4155// method id "datacatalog.projects.locations.entryGroups.entries.create": 4156 4157type ProjectsLocationsEntryGroupsEntriesCreateCall struct { 4158 s *Service 4159 parent string 4160 googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry 4161 urlParams_ gensupport.URLParams 4162 ctx_ context.Context 4163 header_ http.Header 4164} 4165 4166// Create: Creates an entry. Only entries of 'FILESET' type or 4167// user-specified type can be created. Users should enable the Data 4168// Catalog API in the project identified by the `parent` parameter (see 4169// [Data Catalog Resource Project] 4170// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4171// for more information). A maximum of 100,000 entries may be created 4172// per entry group. 4173// 4174// - parent: The name of the entry group this entry is in. Example: * 4175// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 4176// id} Note that this Entry and its child resources may not actually 4177// be stored in the location in this name. 4178func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4179 c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4180 c.parent = parent 4181 c.googleclouddatacatalogv1beta1entry = googleclouddatacatalogv1beta1entry 4182 return c 4183} 4184 4185// EntryId sets the optional parameter "entryId": Required. The id of 4186// the entry to create. 4187func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4188 c.urlParams_.Set("entryId", entryId) 4189 return c 4190} 4191 4192// Fields allows partial responses to be retrieved. See 4193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4194// for more information. 4195func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4196 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4197 return c 4198} 4199 4200// Context sets the context to be used in this call's Do method. Any 4201// pending HTTP request will be aborted if the provided context is 4202// canceled. 4203func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4204 c.ctx_ = ctx 4205 return c 4206} 4207 4208// Header returns an http.Header that can be modified by the caller to 4209// add HTTP headers to the request. 4210func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { 4211 if c.header_ == nil { 4212 c.header_ = make(http.Header) 4213 } 4214 return c.header_ 4215} 4216 4217func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { 4218 reqHeaders := make(http.Header) 4219 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4220 for k, v := range c.header_ { 4221 reqHeaders[k] = v 4222 } 4223 reqHeaders.Set("User-Agent", c.s.userAgent()) 4224 var body io.Reader = nil 4225 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entry) 4226 if err != nil { 4227 return nil, err 4228 } 4229 reqHeaders.Set("Content-Type", "application/json") 4230 c.urlParams_.Set("alt", alt) 4231 c.urlParams_.Set("prettyPrint", "false") 4232 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entries") 4233 urls += "?" + c.urlParams_.Encode() 4234 req, err := http.NewRequest("POST", urls, body) 4235 if err != nil { 4236 return nil, err 4237 } 4238 req.Header = reqHeaders 4239 googleapi.Expand(req.URL, map[string]string{ 4240 "parent": c.parent, 4241 }) 4242 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4243} 4244 4245// Do executes the "datacatalog.projects.locations.entryGroups.entries.create" call. 4246// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 4247// non-nil. Any non-2xx status code is an error. Response headers are in 4248// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 4249// (if a response was returned at all) in 4250// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4251// whether the returned error was because http.StatusNotModified was 4252// returned. 4253func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 4254 gensupport.SetOptions(c.urlParams_, opts...) 4255 res, err := c.doRequest("json") 4256 if res != nil && res.StatusCode == http.StatusNotModified { 4257 if res.Body != nil { 4258 res.Body.Close() 4259 } 4260 return nil, &googleapi.Error{ 4261 Code: res.StatusCode, 4262 Header: res.Header, 4263 } 4264 } 4265 if err != nil { 4266 return nil, err 4267 } 4268 defer googleapi.CloseBody(res) 4269 if err := googleapi.CheckResponse(res); err != nil { 4270 return nil, err 4271 } 4272 ret := &GoogleCloudDatacatalogV1beta1Entry{ 4273 ServerResponse: googleapi.ServerResponse{ 4274 Header: res.Header, 4275 HTTPStatusCode: res.StatusCode, 4276 }, 4277 } 4278 target := &ret 4279 if err := gensupport.DecodeResponse(target, res); err != nil { 4280 return nil, err 4281 } 4282 return ret, nil 4283 // { 4284 // "description": "Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). A maximum of 100,000 entries may be created per entry group.", 4285 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", 4286 // "httpMethod": "POST", 4287 // "id": "datacatalog.projects.locations.entryGroups.entries.create", 4288 // "parameterOrder": [ 4289 // "parent" 4290 // ], 4291 // "parameters": { 4292 // "entryId": { 4293 // "description": "Required. The id of the entry to create.", 4294 // "location": "query", 4295 // "type": "string" 4296 // }, 4297 // "parent": { 4298 // "description": "Required. The name of the entry group this entry is in. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} Note that this Entry and its child resources may not actually be stored in the location in this name.", 4299 // "location": "path", 4300 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 4301 // "required": true, 4302 // "type": "string" 4303 // } 4304 // }, 4305 // "path": "v1beta1/{+parent}/entries", 4306 // "request": { 4307 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4308 // }, 4309 // "response": { 4310 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4311 // }, 4312 // "scopes": [ 4313 // "https://www.googleapis.com/auth/cloud-platform" 4314 // ] 4315 // } 4316 4317} 4318 4319// method id "datacatalog.projects.locations.entryGroups.entries.delete": 4320 4321type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { 4322 s *Service 4323 name string 4324 urlParams_ gensupport.URLParams 4325 ctx_ context.Context 4326 header_ http.Header 4327} 4328 4329// Delete: Deletes an existing entry. Only entries created through 4330// CreateEntry method can be deleted. Users should enable the Data 4331// Catalog API in the project identified by the `name` parameter (see 4332// [Data Catalog Resource Project] 4333// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4334// for more information). 4335// 4336// - name: The name of the entry. Example: * 4337// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 4338// id}/entries/{entry_id}. 4339func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4340 c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4341 c.name = name 4342 return c 4343} 4344 4345// Fields allows partial responses to be retrieved. See 4346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4347// for more information. 4348func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4349 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4350 return c 4351} 4352 4353// Context sets the context to be used in this call's Do method. Any 4354// pending HTTP request will be aborted if the provided context is 4355// canceled. 4356func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4357 c.ctx_ = ctx 4358 return c 4359} 4360 4361// Header returns an http.Header that can be modified by the caller to 4362// add HTTP headers to the request. 4363func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { 4364 if c.header_ == nil { 4365 c.header_ = make(http.Header) 4366 } 4367 return c.header_ 4368} 4369 4370func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { 4371 reqHeaders := make(http.Header) 4372 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4373 for k, v := range c.header_ { 4374 reqHeaders[k] = v 4375 } 4376 reqHeaders.Set("User-Agent", c.s.userAgent()) 4377 var body io.Reader = nil 4378 c.urlParams_.Set("alt", alt) 4379 c.urlParams_.Set("prettyPrint", "false") 4380 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4381 urls += "?" + c.urlParams_.Encode() 4382 req, err := http.NewRequest("DELETE", urls, body) 4383 if err != nil { 4384 return nil, err 4385 } 4386 req.Header = reqHeaders 4387 googleapi.Expand(req.URL, map[string]string{ 4388 "name": c.name, 4389 }) 4390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4391} 4392 4393// Do executes the "datacatalog.projects.locations.entryGroups.entries.delete" call. 4394// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4395// code is an error. Response headers are in either 4396// *Empty.ServerResponse.Header or (if a response was returned at all) 4397// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4398// check whether the returned error was because http.StatusNotModified 4399// was returned. 4400func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4401 gensupport.SetOptions(c.urlParams_, opts...) 4402 res, err := c.doRequest("json") 4403 if res != nil && res.StatusCode == http.StatusNotModified { 4404 if res.Body != nil { 4405 res.Body.Close() 4406 } 4407 return nil, &googleapi.Error{ 4408 Code: res.StatusCode, 4409 Header: res.Header, 4410 } 4411 } 4412 if err != nil { 4413 return nil, err 4414 } 4415 defer googleapi.CloseBody(res) 4416 if err := googleapi.CheckResponse(res); err != nil { 4417 return nil, err 4418 } 4419 ret := &Empty{ 4420 ServerResponse: googleapi.ServerResponse{ 4421 Header: res.Header, 4422 HTTPStatusCode: res.StatusCode, 4423 }, 4424 } 4425 target := &ret 4426 if err := gensupport.DecodeResponse(target, res); err != nil { 4427 return nil, err 4428 } 4429 return ret, nil 4430 // { 4431 // "description": "Deletes an existing entry. Only entries created through CreateEntry method can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 4432 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 4433 // "httpMethod": "DELETE", 4434 // "id": "datacatalog.projects.locations.entryGroups.entries.delete", 4435 // "parameterOrder": [ 4436 // "name" 4437 // ], 4438 // "parameters": { 4439 // "name": { 4440 // "description": "Required. The name of the entry. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 4441 // "location": "path", 4442 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4443 // "required": true, 4444 // "type": "string" 4445 // } 4446 // }, 4447 // "path": "v1beta1/{+name}", 4448 // "response": { 4449 // "$ref": "Empty" 4450 // }, 4451 // "scopes": [ 4452 // "https://www.googleapis.com/auth/cloud-platform" 4453 // ] 4454 // } 4455 4456} 4457 4458// method id "datacatalog.projects.locations.entryGroups.entries.get": 4459 4460type ProjectsLocationsEntryGroupsEntriesGetCall struct { 4461 s *Service 4462 name string 4463 urlParams_ gensupport.URLParams 4464 ifNoneMatch_ string 4465 ctx_ context.Context 4466 header_ http.Header 4467} 4468 4469// Get: Gets an entry. 4470// 4471// - name: The name of the entry. Example: * 4472// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 4473// id}/entries/{entry_id}. 4474func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { 4475 c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4476 c.name = name 4477 return c 4478} 4479 4480// Fields allows partial responses to be retrieved. See 4481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4482// for more information. 4483func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { 4484 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4485 return c 4486} 4487 4488// IfNoneMatch sets the optional parameter which makes the operation 4489// fail if the object's ETag matches the given value. This is useful for 4490// getting updates only after the object has changed since the last 4491// request. Use googleapi.IsNotModified to check whether the response 4492// error from Do is the result of In-None-Match. 4493func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { 4494 c.ifNoneMatch_ = entityTag 4495 return c 4496} 4497 4498// Context sets the context to be used in this call's Do method. Any 4499// pending HTTP request will be aborted if the provided context is 4500// canceled. 4501func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { 4502 c.ctx_ = ctx 4503 return c 4504} 4505 4506// Header returns an http.Header that can be modified by the caller to 4507// add HTTP headers to the request. 4508func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { 4509 if c.header_ == nil { 4510 c.header_ = make(http.Header) 4511 } 4512 return c.header_ 4513} 4514 4515func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { 4516 reqHeaders := make(http.Header) 4517 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4518 for k, v := range c.header_ { 4519 reqHeaders[k] = v 4520 } 4521 reqHeaders.Set("User-Agent", c.s.userAgent()) 4522 if c.ifNoneMatch_ != "" { 4523 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4524 } 4525 var body io.Reader = nil 4526 c.urlParams_.Set("alt", alt) 4527 c.urlParams_.Set("prettyPrint", "false") 4528 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4529 urls += "?" + c.urlParams_.Encode() 4530 req, err := http.NewRequest("GET", urls, body) 4531 if err != nil { 4532 return nil, err 4533 } 4534 req.Header = reqHeaders 4535 googleapi.Expand(req.URL, map[string]string{ 4536 "name": c.name, 4537 }) 4538 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4539} 4540 4541// Do executes the "datacatalog.projects.locations.entryGroups.entries.get" call. 4542// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 4543// non-nil. Any non-2xx status code is an error. Response headers are in 4544// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 4545// (if a response was returned at all) in 4546// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4547// whether the returned error was because http.StatusNotModified was 4548// returned. 4549func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 4550 gensupport.SetOptions(c.urlParams_, opts...) 4551 res, err := c.doRequest("json") 4552 if res != nil && res.StatusCode == http.StatusNotModified { 4553 if res.Body != nil { 4554 res.Body.Close() 4555 } 4556 return nil, &googleapi.Error{ 4557 Code: res.StatusCode, 4558 Header: res.Header, 4559 } 4560 } 4561 if err != nil { 4562 return nil, err 4563 } 4564 defer googleapi.CloseBody(res) 4565 if err := googleapi.CheckResponse(res); err != nil { 4566 return nil, err 4567 } 4568 ret := &GoogleCloudDatacatalogV1beta1Entry{ 4569 ServerResponse: googleapi.ServerResponse{ 4570 Header: res.Header, 4571 HTTPStatusCode: res.StatusCode, 4572 }, 4573 } 4574 target := &ret 4575 if err := gensupport.DecodeResponse(target, res); err != nil { 4576 return nil, err 4577 } 4578 return ret, nil 4579 // { 4580 // "description": "Gets an entry.", 4581 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 4582 // "httpMethod": "GET", 4583 // "id": "datacatalog.projects.locations.entryGroups.entries.get", 4584 // "parameterOrder": [ 4585 // "name" 4586 // ], 4587 // "parameters": { 4588 // "name": { 4589 // "description": "Required. The name of the entry. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 4590 // "location": "path", 4591 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4592 // "required": true, 4593 // "type": "string" 4594 // } 4595 // }, 4596 // "path": "v1beta1/{+name}", 4597 // "response": { 4598 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4599 // }, 4600 // "scopes": [ 4601 // "https://www.googleapis.com/auth/cloud-platform" 4602 // ] 4603 // } 4604 4605} 4606 4607// method id "datacatalog.projects.locations.entryGroups.entries.getIamPolicy": 4608 4609type ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall struct { 4610 s *Service 4611 resource string 4612 getiampolicyrequest *GetIamPolicyRequest 4613 urlParams_ gensupport.URLParams 4614 ctx_ context.Context 4615 header_ http.Header 4616} 4617 4618// GetIamPolicy: Gets the access control policy for a resource. A 4619// `NOT_FOUND` error is returned if the resource does not exist. An 4620// empty policy is returned if the resource exists but does not have a 4621// policy set on it. Supported resources are: - Tag templates. - 4622// Entries. - Entry groups. Note, this method cannot be used to manage 4623// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 4624// resources synced to Data Catalog. Callers must have following Google 4625// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 4626// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 4627// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 4628// get policies on entry groups. 4629// 4630// - resource: REQUIRED: The resource for which the policy is being 4631// requested. See the operation documentation for the appropriate 4632// value for this field. 4633func (r *ProjectsLocationsEntryGroupsEntriesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4634 c := &ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4635 c.resource = resource 4636 c.getiampolicyrequest = getiampolicyrequest 4637 return c 4638} 4639 4640// Fields allows partial responses to be retrieved. See 4641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4642// for more information. 4643func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4645 return c 4646} 4647 4648// Context sets the context to be used in this call's Do method. Any 4649// pending HTTP request will be aborted if the provided context is 4650// canceled. 4651func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4652 c.ctx_ = ctx 4653 return c 4654} 4655 4656// Header returns an http.Header that can be modified by the caller to 4657// add HTTP headers to the request. 4658func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Header() http.Header { 4659 if c.header_ == nil { 4660 c.header_ = make(http.Header) 4661 } 4662 return c.header_ 4663} 4664 4665func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4666 reqHeaders := make(http.Header) 4667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4668 for k, v := range c.header_ { 4669 reqHeaders[k] = v 4670 } 4671 reqHeaders.Set("User-Agent", c.s.userAgent()) 4672 var body io.Reader = nil 4673 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 4674 if err != nil { 4675 return nil, err 4676 } 4677 reqHeaders.Set("Content-Type", "application/json") 4678 c.urlParams_.Set("alt", alt) 4679 c.urlParams_.Set("prettyPrint", "false") 4680 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 4681 urls += "?" + c.urlParams_.Encode() 4682 req, err := http.NewRequest("POST", urls, body) 4683 if err != nil { 4684 return nil, err 4685 } 4686 req.Header = reqHeaders 4687 googleapi.Expand(req.URL, map[string]string{ 4688 "resource": c.resource, 4689 }) 4690 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4691} 4692 4693// Do executes the "datacatalog.projects.locations.entryGroups.entries.getIamPolicy" call. 4694// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4695// code is an error. Response headers are in either 4696// *Policy.ServerResponse.Header or (if a response was returned at all) 4697// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4698// check whether the returned error was because http.StatusNotModified 4699// was returned. 4700func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4701 gensupport.SetOptions(c.urlParams_, opts...) 4702 res, err := c.doRequest("json") 4703 if res != nil && res.StatusCode == http.StatusNotModified { 4704 if res.Body != nil { 4705 res.Body.Close() 4706 } 4707 return nil, &googleapi.Error{ 4708 Code: res.StatusCode, 4709 Header: res.Header, 4710 } 4711 } 4712 if err != nil { 4713 return nil, err 4714 } 4715 defer googleapi.CloseBody(res) 4716 if err := googleapi.CheckResponse(res); err != nil { 4717 return nil, err 4718 } 4719 ret := &Policy{ 4720 ServerResponse: googleapi.ServerResponse{ 4721 Header: res.Header, 4722 HTTPStatusCode: res.StatusCode, 4723 }, 4724 } 4725 target := &ret 4726 if err := gensupport.DecodeResponse(target, res); err != nil { 4727 return nil, err 4728 } 4729 return ret, nil 4730 // { 4731 // "description": "Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.", 4732 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}:getIamPolicy", 4733 // "httpMethod": "POST", 4734 // "id": "datacatalog.projects.locations.entryGroups.entries.getIamPolicy", 4735 // "parameterOrder": [ 4736 // "resource" 4737 // ], 4738 // "parameters": { 4739 // "resource": { 4740 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 4741 // "location": "path", 4742 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4743 // "required": true, 4744 // "type": "string" 4745 // } 4746 // }, 4747 // "path": "v1beta1/{+resource}:getIamPolicy", 4748 // "request": { 4749 // "$ref": "GetIamPolicyRequest" 4750 // }, 4751 // "response": { 4752 // "$ref": "Policy" 4753 // }, 4754 // "scopes": [ 4755 // "https://www.googleapis.com/auth/cloud-platform" 4756 // ] 4757 // } 4758 4759} 4760 4761// method id "datacatalog.projects.locations.entryGroups.entries.list": 4762 4763type ProjectsLocationsEntryGroupsEntriesListCall struct { 4764 s *Service 4765 parent string 4766 urlParams_ gensupport.URLParams 4767 ifNoneMatch_ string 4768 ctx_ context.Context 4769 header_ http.Header 4770} 4771 4772// List: Lists entries. 4773// 4774// - parent: The name of the entry group that contains the entries, 4775// which can be provided in URL format. Example: * 4776// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 4777// id}. 4778func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { 4779 c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4780 c.parent = parent 4781 return c 4782} 4783 4784// PageSize sets the optional parameter "pageSize": The maximum number 4785// of items to return. Default is 10. Max limit is 1000. Throws an 4786// invalid argument for `page_size > 1000`. 4787func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { 4788 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4789 return c 4790} 4791 4792// PageToken sets the optional parameter "pageToken": Token that 4793// specifies which page is requested. If empty, the first page is 4794// returned. 4795func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { 4796 c.urlParams_.Set("pageToken", pageToken) 4797 return c 4798} 4799 4800// ReadMask sets the optional parameter "readMask": The fields to return 4801// for each Entry. If not set or empty, all fields are returned. For 4802// example, setting read_mask to contain only one path "name" will cause 4803// ListEntries to return a list of Entries with only "name" field. 4804func (c *ProjectsLocationsEntryGroupsEntriesListCall) ReadMask(readMask string) *ProjectsLocationsEntryGroupsEntriesListCall { 4805 c.urlParams_.Set("readMask", readMask) 4806 return c 4807} 4808 4809// Fields allows partial responses to be retrieved. See 4810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4811// for more information. 4812func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { 4813 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4814 return c 4815} 4816 4817// IfNoneMatch sets the optional parameter which makes the operation 4818// fail if the object's ETag matches the given value. This is useful for 4819// getting updates only after the object has changed since the last 4820// request. Use googleapi.IsNotModified to check whether the response 4821// error from Do is the result of In-None-Match. 4822func (c *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { 4823 c.ifNoneMatch_ = entityTag 4824 return c 4825} 4826 4827// Context sets the context to be used in this call's Do method. Any 4828// pending HTTP request will be aborted if the provided context is 4829// canceled. 4830func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { 4831 c.ctx_ = ctx 4832 return c 4833} 4834 4835// Header returns an http.Header that can be modified by the caller to 4836// add HTTP headers to the request. 4837func (c *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { 4838 if c.header_ == nil { 4839 c.header_ = make(http.Header) 4840 } 4841 return c.header_ 4842} 4843 4844func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { 4845 reqHeaders := make(http.Header) 4846 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4847 for k, v := range c.header_ { 4848 reqHeaders[k] = v 4849 } 4850 reqHeaders.Set("User-Agent", c.s.userAgent()) 4851 if c.ifNoneMatch_ != "" { 4852 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4853 } 4854 var body io.Reader = nil 4855 c.urlParams_.Set("alt", alt) 4856 c.urlParams_.Set("prettyPrint", "false") 4857 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entries") 4858 urls += "?" + c.urlParams_.Encode() 4859 req, err := http.NewRequest("GET", urls, body) 4860 if err != nil { 4861 return nil, err 4862 } 4863 req.Header = reqHeaders 4864 googleapi.Expand(req.URL, map[string]string{ 4865 "parent": c.parent, 4866 }) 4867 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4868} 4869 4870// Do executes the "datacatalog.projects.locations.entryGroups.entries.list" call. 4871// Exactly one of *GoogleCloudDatacatalogV1beta1ListEntriesResponse or 4872// error will be non-nil. Any non-2xx status code is an error. Response 4873// headers are in either 4874// *GoogleCloudDatacatalogV1beta1ListEntriesResponse.ServerResponse.Heade 4875// r or (if a response was returned at all) in 4876// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4877// whether the returned error was because http.StatusNotModified was 4878// returned. 4879func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListEntriesResponse, error) { 4880 gensupport.SetOptions(c.urlParams_, opts...) 4881 res, err := c.doRequest("json") 4882 if res != nil && res.StatusCode == http.StatusNotModified { 4883 if res.Body != nil { 4884 res.Body.Close() 4885 } 4886 return nil, &googleapi.Error{ 4887 Code: res.StatusCode, 4888 Header: res.Header, 4889 } 4890 } 4891 if err != nil { 4892 return nil, err 4893 } 4894 defer googleapi.CloseBody(res) 4895 if err := googleapi.CheckResponse(res); err != nil { 4896 return nil, err 4897 } 4898 ret := &GoogleCloudDatacatalogV1beta1ListEntriesResponse{ 4899 ServerResponse: googleapi.ServerResponse{ 4900 Header: res.Header, 4901 HTTPStatusCode: res.StatusCode, 4902 }, 4903 } 4904 target := &ret 4905 if err := gensupport.DecodeResponse(target, res); err != nil { 4906 return nil, err 4907 } 4908 return ret, nil 4909 // { 4910 // "description": "Lists entries.", 4911 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", 4912 // "httpMethod": "GET", 4913 // "id": "datacatalog.projects.locations.entryGroups.entries.list", 4914 // "parameterOrder": [ 4915 // "parent" 4916 // ], 4917 // "parameters": { 4918 // "pageSize": { 4919 // "description": "The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for `page_size \u003e 1000`.", 4920 // "format": "int32", 4921 // "location": "query", 4922 // "type": "integer" 4923 // }, 4924 // "pageToken": { 4925 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 4926 // "location": "query", 4927 // "type": "string" 4928 // }, 4929 // "parent": { 4930 // "description": "Required. The name of the entry group that contains the entries, which can be provided in URL format. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}", 4931 // "location": "path", 4932 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 4933 // "required": true, 4934 // "type": "string" 4935 // }, 4936 // "readMask": { 4937 // "description": "The fields to return for each Entry. If not set or empty, all fields are returned. For example, setting read_mask to contain only one path \"name\" will cause ListEntries to return a list of Entries with only \"name\" field.", 4938 // "format": "google-fieldmask", 4939 // "location": "query", 4940 // "type": "string" 4941 // } 4942 // }, 4943 // "path": "v1beta1/{+parent}/entries", 4944 // "response": { 4945 // "$ref": "GoogleCloudDatacatalogV1beta1ListEntriesResponse" 4946 // }, 4947 // "scopes": [ 4948 // "https://www.googleapis.com/auth/cloud-platform" 4949 // ] 4950 // } 4951 4952} 4953 4954// Pages invokes f for each page of results. 4955// A non-nil error returned from f will halt the iteration. 4956// The provided context supersedes any context provided to the Context method. 4957func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListEntriesResponse) error) error { 4958 c.ctx_ = ctx 4959 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4960 for { 4961 x, err := c.Do() 4962 if err != nil { 4963 return err 4964 } 4965 if err := f(x); err != nil { 4966 return err 4967 } 4968 if x.NextPageToken == "" { 4969 return nil 4970 } 4971 c.PageToken(x.NextPageToken) 4972 } 4973} 4974 4975// method id "datacatalog.projects.locations.entryGroups.entries.patch": 4976 4977type ProjectsLocationsEntryGroupsEntriesPatchCall struct { 4978 s *Service 4979 name string 4980 googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry 4981 urlParams_ gensupport.URLParams 4982 ctx_ context.Context 4983 header_ http.Header 4984} 4985 4986// Patch: Updates an existing entry. Users should enable the Data 4987// Catalog API in the project identified by the `entry.name` parameter 4988// (see [Data Catalog Resource Project] 4989// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4990// for more information). 4991// 4992// - name: Output only. The Data Catalog resource name of the entry in 4993// URL format. Example: * 4994// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 4995// id}/entries/{entry_id} Note that this Entry and its child resources 4996// may not actually be stored in the location in this name. 4997func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { 4998 c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4999 c.name = name 5000 c.googleclouddatacatalogv1beta1entry = googleclouddatacatalogv1beta1entry 5001 return c 5002} 5003 5004// UpdateMask sets the optional parameter "updateMask": Names of fields 5005// whose values to overwrite on an entry. If this parameter is absent or 5006// empty, all modifiable fields are overwritten. If such fields are 5007// non-required and omitted in the request body, their values are 5008// emptied. The following fields are modifiable: * For entries with type 5009// `DATA_STREAM`: * `schema` * For entries with type `FILESET`: * 5010// `schema` * `display_name` * `description` * `gcs_fileset_spec` * 5011// `gcs_fileset_spec.file_patterns` * For entries with 5012// `user_specified_type`: * `schema` * `display_name` * `description` * 5013// `user_specified_type` * `user_specified_system` * `linked_resource` * 5014// `source_system_timestamps` 5015func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { 5016 c.urlParams_.Set("updateMask", updateMask) 5017 return c 5018} 5019 5020// Fields allows partial responses to be retrieved. See 5021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5022// for more information. 5023func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { 5024 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5025 return c 5026} 5027 5028// Context sets the context to be used in this call's Do method. Any 5029// pending HTTP request will be aborted if the provided context is 5030// canceled. 5031func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { 5032 c.ctx_ = ctx 5033 return c 5034} 5035 5036// Header returns an http.Header that can be modified by the caller to 5037// add HTTP headers to the request. 5038func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { 5039 if c.header_ == nil { 5040 c.header_ = make(http.Header) 5041 } 5042 return c.header_ 5043} 5044 5045func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) doRequest(alt string) (*http.Response, error) { 5046 reqHeaders := make(http.Header) 5047 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5048 for k, v := range c.header_ { 5049 reqHeaders[k] = v 5050 } 5051 reqHeaders.Set("User-Agent", c.s.userAgent()) 5052 var body io.Reader = nil 5053 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entry) 5054 if err != nil { 5055 return nil, err 5056 } 5057 reqHeaders.Set("Content-Type", "application/json") 5058 c.urlParams_.Set("alt", alt) 5059 c.urlParams_.Set("prettyPrint", "false") 5060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5061 urls += "?" + c.urlParams_.Encode() 5062 req, err := http.NewRequest("PATCH", urls, body) 5063 if err != nil { 5064 return nil, err 5065 } 5066 req.Header = reqHeaders 5067 googleapi.Expand(req.URL, map[string]string{ 5068 "name": c.name, 5069 }) 5070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5071} 5072 5073// Do executes the "datacatalog.projects.locations.entryGroups.entries.patch" call. 5074// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 5075// non-nil. Any non-2xx status code is an error. Response headers are in 5076// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 5077// (if a response was returned at all) in 5078// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5079// whether the returned error was because http.StatusNotModified was 5080// returned. 5081func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 5082 gensupport.SetOptions(c.urlParams_, opts...) 5083 res, err := c.doRequest("json") 5084 if res != nil && res.StatusCode == http.StatusNotModified { 5085 if res.Body != nil { 5086 res.Body.Close() 5087 } 5088 return nil, &googleapi.Error{ 5089 Code: res.StatusCode, 5090 Header: res.Header, 5091 } 5092 } 5093 if err != nil { 5094 return nil, err 5095 } 5096 defer googleapi.CloseBody(res) 5097 if err := googleapi.CheckResponse(res); err != nil { 5098 return nil, err 5099 } 5100 ret := &GoogleCloudDatacatalogV1beta1Entry{ 5101 ServerResponse: googleapi.ServerResponse{ 5102 Header: res.Header, 5103 HTTPStatusCode: res.StatusCode, 5104 }, 5105 } 5106 target := &ret 5107 if err := gensupport.DecodeResponse(target, res); err != nil { 5108 return nil, err 5109 } 5110 return ret, nil 5111 // { 5112 // "description": "Updates an existing entry. Users should enable the Data Catalog API in the project identified by the `entry.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 5113 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 5114 // "httpMethod": "PATCH", 5115 // "id": "datacatalog.projects.locations.entryGroups.entries.patch", 5116 // "parameterOrder": [ 5117 // "name" 5118 // ], 5119 // "parameters": { 5120 // "name": { 5121 // "description": "Output only. The Data Catalog resource name of the entry in URL format. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} Note that this Entry and its child resources may not actually be stored in the location in this name.", 5122 // "location": "path", 5123 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5124 // "required": true, 5125 // "type": "string" 5126 // }, 5127 // "updateMask": { 5128 // "description": "Names of fields whose values to overwrite on an entry. If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied. The following fields are modifiable: * For entries with type `DATA_STREAM`: * `schema` * For entries with type `FILESET`: * `schema` * `display_name` * `description` * `gcs_fileset_spec` * `gcs_fileset_spec.file_patterns` * For entries with `user_specified_type`: * `schema` * `display_name` * `description` * `user_specified_type` * `user_specified_system` * `linked_resource` * `source_system_timestamps`", 5129 // "format": "google-fieldmask", 5130 // "location": "query", 5131 // "type": "string" 5132 // } 5133 // }, 5134 // "path": "v1beta1/{+name}", 5135 // "request": { 5136 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 5137 // }, 5138 // "response": { 5139 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 5140 // }, 5141 // "scopes": [ 5142 // "https://www.googleapis.com/auth/cloud-platform" 5143 // ] 5144 // } 5145 5146} 5147 5148// method id "datacatalog.projects.locations.entryGroups.entries.testIamPermissions": 5149 5150type ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall struct { 5151 s *Service 5152 resource string 5153 testiampermissionsrequest *TestIamPermissionsRequest 5154 urlParams_ gensupport.URLParams 5155 ctx_ context.Context 5156 header_ http.Header 5157} 5158 5159// TestIamPermissions: Returns the caller's permissions on a resource. 5160// If the resource does not exist, an empty set of permissions is 5161// returned (We don't return a `NOT_FOUND` error). Supported resources 5162// are: - Tag templates. - Entries. - Entry groups. Note, this method 5163// cannot be used to manage policies for BigQuery, Pub/Sub and any 5164// external Google Cloud Platform resources synced to Data Catalog. A 5165// caller is not required to have Google IAM permission to make this 5166// request. 5167// 5168// - resource: REQUIRED: The resource for which the policy detail is 5169// being requested. See the operation documentation for the 5170// appropriate value for this field. 5171func (r *ProjectsLocationsEntryGroupsEntriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 5172 c := &ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5173 c.resource = resource 5174 c.testiampermissionsrequest = testiampermissionsrequest 5175 return c 5176} 5177 5178// Fields allows partial responses to be retrieved. See 5179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5180// for more information. 5181func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 5182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5183 return c 5184} 5185 5186// Context sets the context to be used in this call's Do method. Any 5187// pending HTTP request will be aborted if the provided context is 5188// canceled. 5189func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 5190 c.ctx_ = ctx 5191 return c 5192} 5193 5194// Header returns an http.Header that can be modified by the caller to 5195// add HTTP headers to the request. 5196func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Header() http.Header { 5197 if c.header_ == nil { 5198 c.header_ = make(http.Header) 5199 } 5200 return c.header_ 5201} 5202 5203func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 5204 reqHeaders := make(http.Header) 5205 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5206 for k, v := range c.header_ { 5207 reqHeaders[k] = v 5208 } 5209 reqHeaders.Set("User-Agent", c.s.userAgent()) 5210 var body io.Reader = nil 5211 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 5212 if err != nil { 5213 return nil, err 5214 } 5215 reqHeaders.Set("Content-Type", "application/json") 5216 c.urlParams_.Set("alt", alt) 5217 c.urlParams_.Set("prettyPrint", "false") 5218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 5219 urls += "?" + c.urlParams_.Encode() 5220 req, err := http.NewRequest("POST", urls, body) 5221 if err != nil { 5222 return nil, err 5223 } 5224 req.Header = reqHeaders 5225 googleapi.Expand(req.URL, map[string]string{ 5226 "resource": c.resource, 5227 }) 5228 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5229} 5230 5231// Do executes the "datacatalog.projects.locations.entryGroups.entries.testIamPermissions" call. 5232// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 5233// Any non-2xx status code is an error. Response headers are in either 5234// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 5235// was returned at all) in error.(*googleapi.Error).Header. Use 5236// googleapi.IsNotModified to check whether the returned error was 5237// because http.StatusNotModified was returned. 5238func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 5239 gensupport.SetOptions(c.urlParams_, opts...) 5240 res, err := c.doRequest("json") 5241 if res != nil && res.StatusCode == http.StatusNotModified { 5242 if res.Body != nil { 5243 res.Body.Close() 5244 } 5245 return nil, &googleapi.Error{ 5246 Code: res.StatusCode, 5247 Header: res.Header, 5248 } 5249 } 5250 if err != nil { 5251 return nil, err 5252 } 5253 defer googleapi.CloseBody(res) 5254 if err := googleapi.CheckResponse(res); err != nil { 5255 return nil, err 5256 } 5257 ret := &TestIamPermissionsResponse{ 5258 ServerResponse: googleapi.ServerResponse{ 5259 Header: res.Header, 5260 HTTPStatusCode: res.StatusCode, 5261 }, 5262 } 5263 target := &ret 5264 if err := gensupport.DecodeResponse(target, res); err != nil { 5265 return nil, err 5266 } 5267 return ret, nil 5268 // { 5269 // "description": "Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.", 5270 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}:testIamPermissions", 5271 // "httpMethod": "POST", 5272 // "id": "datacatalog.projects.locations.entryGroups.entries.testIamPermissions", 5273 // "parameterOrder": [ 5274 // "resource" 5275 // ], 5276 // "parameters": { 5277 // "resource": { 5278 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 5279 // "location": "path", 5280 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5281 // "required": true, 5282 // "type": "string" 5283 // } 5284 // }, 5285 // "path": "v1beta1/{+resource}:testIamPermissions", 5286 // "request": { 5287 // "$ref": "TestIamPermissionsRequest" 5288 // }, 5289 // "response": { 5290 // "$ref": "TestIamPermissionsResponse" 5291 // }, 5292 // "scopes": [ 5293 // "https://www.googleapis.com/auth/cloud-platform" 5294 // ] 5295 // } 5296 5297} 5298 5299// method id "datacatalog.projects.locations.entryGroups.entries.tags.create": 5300 5301type ProjectsLocationsEntryGroupsEntriesTagsCreateCall struct { 5302 s *Service 5303 parent string 5304 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5305 urlParams_ gensupport.URLParams 5306 ctx_ context.Context 5307 header_ http.Header 5308} 5309 5310// Create: Creates a tag on an Entry. Note: The project identified by 5311// the `parent` parameter for the tag 5312// (https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) 5313// and the tag template 5314// (https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) 5315// used to create the tag must be from the same organization. 5316// 5317// - parent: The name of the resource to attach this tag to. Tags can be 5318// attached to Entries. Example: * 5319// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 5320// id}/entries/{entry_id} Note that this Tag and its child resources 5321// may not actually be stored in the location in this name. 5322func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Create(parent string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5323 c := &ProjectsLocationsEntryGroupsEntriesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5324 c.parent = parent 5325 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5326 return c 5327} 5328 5329// Fields allows partial responses to be retrieved. See 5330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5331// for more information. 5332func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5333 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5334 return c 5335} 5336 5337// Context sets the context to be used in this call's Do method. Any 5338// pending HTTP request will be aborted if the provided context is 5339// canceled. 5340func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5341 c.ctx_ = ctx 5342 return c 5343} 5344 5345// Header returns an http.Header that can be modified by the caller to 5346// add HTTP headers to the request. 5347func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Header() http.Header { 5348 if c.header_ == nil { 5349 c.header_ = make(http.Header) 5350 } 5351 return c.header_ 5352} 5353 5354func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) doRequest(alt string) (*http.Response, error) { 5355 reqHeaders := make(http.Header) 5356 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5357 for k, v := range c.header_ { 5358 reqHeaders[k] = v 5359 } 5360 reqHeaders.Set("User-Agent", c.s.userAgent()) 5361 var body io.Reader = nil 5362 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 5363 if err != nil { 5364 return nil, err 5365 } 5366 reqHeaders.Set("Content-Type", "application/json") 5367 c.urlParams_.Set("alt", alt) 5368 c.urlParams_.Set("prettyPrint", "false") 5369 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 5370 urls += "?" + c.urlParams_.Encode() 5371 req, err := http.NewRequest("POST", urls, body) 5372 if err != nil { 5373 return nil, err 5374 } 5375 req.Header = reqHeaders 5376 googleapi.Expand(req.URL, map[string]string{ 5377 "parent": c.parent, 5378 }) 5379 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5380} 5381 5382// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.create" call. 5383// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 5384// non-nil. Any non-2xx status code is an error. Response headers are in 5385// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 5386// a response was returned at all) in error.(*googleapi.Error).Header. 5387// Use googleapi.IsNotModified to check whether the returned error was 5388// because http.StatusNotModified was returned. 5389func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 5390 gensupport.SetOptions(c.urlParams_, opts...) 5391 res, err := c.doRequest("json") 5392 if res != nil && res.StatusCode == http.StatusNotModified { 5393 if res.Body != nil { 5394 res.Body.Close() 5395 } 5396 return nil, &googleapi.Error{ 5397 Code: res.StatusCode, 5398 Header: res.Header, 5399 } 5400 } 5401 if err != nil { 5402 return nil, err 5403 } 5404 defer googleapi.CloseBody(res) 5405 if err := googleapi.CheckResponse(res); err != nil { 5406 return nil, err 5407 } 5408 ret := &GoogleCloudDatacatalogV1beta1Tag{ 5409 ServerResponse: googleapi.ServerResponse{ 5410 Header: res.Header, 5411 HTTPStatusCode: res.StatusCode, 5412 }, 5413 } 5414 target := &ret 5415 if err := gensupport.DecodeResponse(target, res); err != nil { 5416 return nil, err 5417 } 5418 return ret, nil 5419 // { 5420 // "description": "Creates a tag on an Entry. Note: The project identified by the `parent` parameter for the [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be from the same organization.", 5421 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags", 5422 // "httpMethod": "POST", 5423 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.create", 5424 // "parameterOrder": [ 5425 // "parent" 5426 // ], 5427 // "parameters": { 5428 // "parent": { 5429 // "description": "Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} Note that this Tag and its child resources may not actually be stored in the location in this name.", 5430 // "location": "path", 5431 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5432 // "required": true, 5433 // "type": "string" 5434 // } 5435 // }, 5436 // "path": "v1beta1/{+parent}/tags", 5437 // "request": { 5438 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5439 // }, 5440 // "response": { 5441 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5442 // }, 5443 // "scopes": [ 5444 // "https://www.googleapis.com/auth/cloud-platform" 5445 // ] 5446 // } 5447 5448} 5449 5450// method id "datacatalog.projects.locations.entryGroups.entries.tags.delete": 5451 5452type ProjectsLocationsEntryGroupsEntriesTagsDeleteCall struct { 5453 s *Service 5454 name string 5455 urlParams_ gensupport.URLParams 5456 ctx_ context.Context 5457 header_ http.Header 5458} 5459 5460// Delete: Deletes a tag. 5461// 5462// - name: The name of the tag to delete. Example: * 5463// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 5464// id}/entries/{entry_id}/tags/{tag_id}. 5465func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5466 c := &ProjectsLocationsEntryGroupsEntriesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5467 c.name = name 5468 return c 5469} 5470 5471// Fields allows partial responses to be retrieved. See 5472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5473// for more information. 5474func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5476 return c 5477} 5478 5479// Context sets the context to be used in this call's Do method. Any 5480// pending HTTP request will be aborted if the provided context is 5481// canceled. 5482func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5483 c.ctx_ = ctx 5484 return c 5485} 5486 5487// Header returns an http.Header that can be modified by the caller to 5488// add HTTP headers to the request. 5489func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Header() http.Header { 5490 if c.header_ == nil { 5491 c.header_ = make(http.Header) 5492 } 5493 return c.header_ 5494} 5495 5496func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 5497 reqHeaders := make(http.Header) 5498 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5499 for k, v := range c.header_ { 5500 reqHeaders[k] = v 5501 } 5502 reqHeaders.Set("User-Agent", c.s.userAgent()) 5503 var body io.Reader = nil 5504 c.urlParams_.Set("alt", alt) 5505 c.urlParams_.Set("prettyPrint", "false") 5506 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5507 urls += "?" + c.urlParams_.Encode() 5508 req, err := http.NewRequest("DELETE", urls, body) 5509 if err != nil { 5510 return nil, err 5511 } 5512 req.Header = reqHeaders 5513 googleapi.Expand(req.URL, map[string]string{ 5514 "name": c.name, 5515 }) 5516 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5517} 5518 5519// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.delete" call. 5520// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5521// code is an error. Response headers are in either 5522// *Empty.ServerResponse.Header or (if a response was returned at all) 5523// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5524// check whether the returned error was because http.StatusNotModified 5525// was returned. 5526func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5527 gensupport.SetOptions(c.urlParams_, opts...) 5528 res, err := c.doRequest("json") 5529 if res != nil && res.StatusCode == http.StatusNotModified { 5530 if res.Body != nil { 5531 res.Body.Close() 5532 } 5533 return nil, &googleapi.Error{ 5534 Code: res.StatusCode, 5535 Header: res.Header, 5536 } 5537 } 5538 if err != nil { 5539 return nil, err 5540 } 5541 defer googleapi.CloseBody(res) 5542 if err := googleapi.CheckResponse(res); err != nil { 5543 return nil, err 5544 } 5545 ret := &Empty{ 5546 ServerResponse: googleapi.ServerResponse{ 5547 Header: res.Header, 5548 HTTPStatusCode: res.StatusCode, 5549 }, 5550 } 5551 target := &ret 5552 if err := gensupport.DecodeResponse(target, res); err != nil { 5553 return nil, err 5554 } 5555 return ret, nil 5556 // { 5557 // "description": "Deletes a tag.", 5558 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags/{tagsId}", 5559 // "httpMethod": "DELETE", 5560 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.delete", 5561 // "parameterOrder": [ 5562 // "name" 5563 // ], 5564 // "parameters": { 5565 // "name": { 5566 // "description": "Required. The name of the tag to delete. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}", 5567 // "location": "path", 5568 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+/tags/[^/]+$", 5569 // "required": true, 5570 // "type": "string" 5571 // } 5572 // }, 5573 // "path": "v1beta1/{+name}", 5574 // "response": { 5575 // "$ref": "Empty" 5576 // }, 5577 // "scopes": [ 5578 // "https://www.googleapis.com/auth/cloud-platform" 5579 // ] 5580 // } 5581 5582} 5583 5584// method id "datacatalog.projects.locations.entryGroups.entries.tags.list": 5585 5586type ProjectsLocationsEntryGroupsEntriesTagsListCall struct { 5587 s *Service 5588 parent string 5589 urlParams_ gensupport.URLParams 5590 ifNoneMatch_ string 5591 ctx_ context.Context 5592 header_ http.Header 5593} 5594 5595// List: Lists the tags on an Entry. 5596// 5597// - parent: The name of the Data Catalog resource to list the tags of. 5598// The resource could be an Entry or an EntryGroup. Examples: * 5599// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 5600// id} * 5601// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 5602// id}/entries/{entry_id}. 5603func (r *ProjectsLocationsEntryGroupsEntriesTagsService) List(parent string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5604 c := &ProjectsLocationsEntryGroupsEntriesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5605 c.parent = parent 5606 return c 5607} 5608 5609// PageSize sets the optional parameter "pageSize": The maximum number 5610// of tags to return. Default is 10. Max limit is 1000. 5611func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5612 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5613 return c 5614} 5615 5616// PageToken sets the optional parameter "pageToken": Token that 5617// specifies which page is requested. If empty, the first page is 5618// returned. 5619func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5620 c.urlParams_.Set("pageToken", pageToken) 5621 return c 5622} 5623 5624// Fields allows partial responses to be retrieved. See 5625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5626// for more information. 5627func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5628 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5629 return c 5630} 5631 5632// IfNoneMatch sets the optional parameter which makes the operation 5633// fail if the object's ETag matches the given value. This is useful for 5634// getting updates only after the object has changed since the last 5635// request. Use googleapi.IsNotModified to check whether the response 5636// error from Do is the result of In-None-Match. 5637func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5638 c.ifNoneMatch_ = entityTag 5639 return c 5640} 5641 5642// Context sets the context to be used in this call's Do method. Any 5643// pending HTTP request will be aborted if the provided context is 5644// canceled. 5645func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5646 c.ctx_ = ctx 5647 return c 5648} 5649 5650// Header returns an http.Header that can be modified by the caller to 5651// add HTTP headers to the request. 5652func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Header() http.Header { 5653 if c.header_ == nil { 5654 c.header_ = make(http.Header) 5655 } 5656 return c.header_ 5657} 5658 5659func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) doRequest(alt string) (*http.Response, error) { 5660 reqHeaders := make(http.Header) 5661 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5662 for k, v := range c.header_ { 5663 reqHeaders[k] = v 5664 } 5665 reqHeaders.Set("User-Agent", c.s.userAgent()) 5666 if c.ifNoneMatch_ != "" { 5667 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5668 } 5669 var body io.Reader = nil 5670 c.urlParams_.Set("alt", alt) 5671 c.urlParams_.Set("prettyPrint", "false") 5672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 5673 urls += "?" + c.urlParams_.Encode() 5674 req, err := http.NewRequest("GET", urls, body) 5675 if err != nil { 5676 return nil, err 5677 } 5678 req.Header = reqHeaders 5679 googleapi.Expand(req.URL, map[string]string{ 5680 "parent": c.parent, 5681 }) 5682 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5683} 5684 5685// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.list" call. 5686// Exactly one of *GoogleCloudDatacatalogV1beta1ListTagsResponse or 5687// error will be non-nil. Any non-2xx status code is an error. Response 5688// headers are in either 5689// *GoogleCloudDatacatalogV1beta1ListTagsResponse.ServerResponse.Header 5690// or (if a response was returned at all) in 5691// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5692// whether the returned error was because http.StatusNotModified was 5693// returned. 5694func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTagsResponse, error) { 5695 gensupport.SetOptions(c.urlParams_, opts...) 5696 res, err := c.doRequest("json") 5697 if res != nil && res.StatusCode == http.StatusNotModified { 5698 if res.Body != nil { 5699 res.Body.Close() 5700 } 5701 return nil, &googleapi.Error{ 5702 Code: res.StatusCode, 5703 Header: res.Header, 5704 } 5705 } 5706 if err != nil { 5707 return nil, err 5708 } 5709 defer googleapi.CloseBody(res) 5710 if err := googleapi.CheckResponse(res); err != nil { 5711 return nil, err 5712 } 5713 ret := &GoogleCloudDatacatalogV1beta1ListTagsResponse{ 5714 ServerResponse: googleapi.ServerResponse{ 5715 Header: res.Header, 5716 HTTPStatusCode: res.StatusCode, 5717 }, 5718 } 5719 target := &ret 5720 if err := gensupport.DecodeResponse(target, res); err != nil { 5721 return nil, err 5722 } 5723 return ret, nil 5724 // { 5725 // "description": "Lists the tags on an Entry.", 5726 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags", 5727 // "httpMethod": "GET", 5728 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.list", 5729 // "parameterOrder": [ 5730 // "parent" 5731 // ], 5732 // "parameters": { 5733 // "pageSize": { 5734 // "description": "The maximum number of tags to return. Default is 10. Max limit is 1000.", 5735 // "format": "int32", 5736 // "location": "query", 5737 // "type": "integer" 5738 // }, 5739 // "pageToken": { 5740 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 5741 // "location": "query", 5742 // "type": "string" 5743 // }, 5744 // "parent": { 5745 // "description": "Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup. Examples: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 5746 // "location": "path", 5747 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5748 // "required": true, 5749 // "type": "string" 5750 // } 5751 // }, 5752 // "path": "v1beta1/{+parent}/tags", 5753 // "response": { 5754 // "$ref": "GoogleCloudDatacatalogV1beta1ListTagsResponse" 5755 // }, 5756 // "scopes": [ 5757 // "https://www.googleapis.com/auth/cloud-platform" 5758 // ] 5759 // } 5760 5761} 5762 5763// Pages invokes f for each page of results. 5764// A non-nil error returned from f will halt the iteration. 5765// The provided context supersedes any context provided to the Context method. 5766func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTagsResponse) error) error { 5767 c.ctx_ = ctx 5768 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5769 for { 5770 x, err := c.Do() 5771 if err != nil { 5772 return err 5773 } 5774 if err := f(x); err != nil { 5775 return err 5776 } 5777 if x.NextPageToken == "" { 5778 return nil 5779 } 5780 c.PageToken(x.NextPageToken) 5781 } 5782} 5783 5784// method id "datacatalog.projects.locations.entryGroups.entries.tags.patch": 5785 5786type ProjectsLocationsEntryGroupsEntriesTagsPatchCall struct { 5787 s *Service 5788 nameid string 5789 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5790 urlParams_ gensupport.URLParams 5791 ctx_ context.Context 5792 header_ http.Header 5793} 5794 5795// Patch: Updates an existing tag. 5796// 5797// - name: The resource name of the tag in URL format. Example: * 5798// projects/{project_id}/locations/{location}/entrygroups/{entry_group_ 5799// id}/entries/{entry_id}/tags/{tag_id} where `tag_id` is a 5800// system-generated identifier. Note that this Tag may not actually be 5801// stored in the location in this name. 5802func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Patch(nameid string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5803 c := &ProjectsLocationsEntryGroupsEntriesTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5804 c.nameid = nameid 5805 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5806 return c 5807} 5808 5809// UpdateMask sets the optional parameter "updateMask": Note: Currently, 5810// this parameter can only take "fields" as value. Names of fields 5811// whose values to overwrite on a tag. Currently, a tag has the only 5812// modifiable field with the name `fields`. In general, if this 5813// parameter is absent or empty, all modifiable fields are overwritten. 5814// If such fields are non-required and omitted in the request body, 5815// their values are emptied. 5816func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5817 c.urlParams_.Set("updateMask", updateMask) 5818 return c 5819} 5820 5821// Fields allows partial responses to be retrieved. See 5822// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5823// for more information. 5824func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5825 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5826 return c 5827} 5828 5829// Context sets the context to be used in this call's Do method. Any 5830// pending HTTP request will be aborted if the provided context is 5831// canceled. 5832func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5833 c.ctx_ = ctx 5834 return c 5835} 5836 5837// Header returns an http.Header that can be modified by the caller to 5838// add HTTP headers to the request. 5839func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Header() http.Header { 5840 if c.header_ == nil { 5841 c.header_ = make(http.Header) 5842 } 5843 return c.header_ 5844} 5845 5846func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) doRequest(alt string) (*http.Response, error) { 5847 reqHeaders := make(http.Header) 5848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5849 for k, v := range c.header_ { 5850 reqHeaders[k] = v 5851 } 5852 reqHeaders.Set("User-Agent", c.s.userAgent()) 5853 var body io.Reader = nil 5854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 5855 if err != nil { 5856 return nil, err 5857 } 5858 reqHeaders.Set("Content-Type", "application/json") 5859 c.urlParams_.Set("alt", alt) 5860 c.urlParams_.Set("prettyPrint", "false") 5861 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5862 urls += "?" + c.urlParams_.Encode() 5863 req, err := http.NewRequest("PATCH", urls, body) 5864 if err != nil { 5865 return nil, err 5866 } 5867 req.Header = reqHeaders 5868 googleapi.Expand(req.URL, map[string]string{ 5869 "name": c.nameid, 5870 }) 5871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5872} 5873 5874// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.patch" call. 5875// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 5876// non-nil. Any non-2xx status code is an error. Response headers are in 5877// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 5878// a response was returned at all) in error.(*googleapi.Error).Header. 5879// Use googleapi.IsNotModified to check whether the returned error was 5880// because http.StatusNotModified was returned. 5881func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 5882 gensupport.SetOptions(c.urlParams_, opts...) 5883 res, err := c.doRequest("json") 5884 if res != nil && res.StatusCode == http.StatusNotModified { 5885 if res.Body != nil { 5886 res.Body.Close() 5887 } 5888 return nil, &googleapi.Error{ 5889 Code: res.StatusCode, 5890 Header: res.Header, 5891 } 5892 } 5893 if err != nil { 5894 return nil, err 5895 } 5896 defer googleapi.CloseBody(res) 5897 if err := googleapi.CheckResponse(res); err != nil { 5898 return nil, err 5899 } 5900 ret := &GoogleCloudDatacatalogV1beta1Tag{ 5901 ServerResponse: googleapi.ServerResponse{ 5902 Header: res.Header, 5903 HTTPStatusCode: res.StatusCode, 5904 }, 5905 } 5906 target := &ret 5907 if err := gensupport.DecodeResponse(target, res); err != nil { 5908 return nil, err 5909 } 5910 return ret, nil 5911 // { 5912 // "description": "Updates an existing tag.", 5913 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags/{tagsId}", 5914 // "httpMethod": "PATCH", 5915 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.patch", 5916 // "parameterOrder": [ 5917 // "name" 5918 // ], 5919 // "parameters": { 5920 // "name": { 5921 // "description": "The resource name of the tag in URL format. Example: * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} where `tag_id` is a system-generated identifier. Note that this Tag may not actually be stored in the location in this name.", 5922 // "location": "path", 5923 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+/tags/[^/]+$", 5924 // "required": true, 5925 // "type": "string" 5926 // }, 5927 // "updateMask": { 5928 // "description": "Note: Currently, this parameter can only take `\"fields\"` as value. Names of fields whose values to overwrite on a tag. Currently, a tag has the only modifiable field with the name `fields`. In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.", 5929 // "format": "google-fieldmask", 5930 // "location": "query", 5931 // "type": "string" 5932 // } 5933 // }, 5934 // "path": "v1beta1/{+name}", 5935 // "request": { 5936 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5937 // }, 5938 // "response": { 5939 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5940 // }, 5941 // "scopes": [ 5942 // "https://www.googleapis.com/auth/cloud-platform" 5943 // ] 5944 // } 5945 5946} 5947 5948// method id "datacatalog.projects.locations.entryGroups.tags.create": 5949 5950type ProjectsLocationsEntryGroupsTagsCreateCall struct { 5951 s *Service 5952 parent string 5953 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5954 urlParams_ gensupport.URLParams 5955 ctx_ context.Context 5956 header_ http.Header 5957} 5958 5959// Create: Creates a tag on an Entry. Note: The project identified by 5960// the `parent` parameter for the tag 5961// (https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) 5962// and the tag template 5963// (https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) 5964// used to create the tag must be from the same organization. 5965// 5966// - parent: The name of the resource to attach this tag to. Tags can be 5967// attached to Entries. Example: * 5968// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 5969// id}/entries/{entry_id} Note that this Tag and its child resources 5970// may not actually be stored in the location in this name. 5971func (r *ProjectsLocationsEntryGroupsTagsService) Create(parent string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsTagsCreateCall { 5972 c := &ProjectsLocationsEntryGroupsTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5973 c.parent = parent 5974 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5975 return c 5976} 5977 5978// Fields allows partial responses to be retrieved. See 5979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5980// for more information. 5981func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsCreateCall { 5982 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5983 return c 5984} 5985 5986// Context sets the context to be used in this call's Do method. Any 5987// pending HTTP request will be aborted if the provided context is 5988// canceled. 5989func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsCreateCall { 5990 c.ctx_ = ctx 5991 return c 5992} 5993 5994// Header returns an http.Header that can be modified by the caller to 5995// add HTTP headers to the request. 5996func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Header() http.Header { 5997 if c.header_ == nil { 5998 c.header_ = make(http.Header) 5999 } 6000 return c.header_ 6001} 6002 6003func (c *ProjectsLocationsEntryGroupsTagsCreateCall) doRequest(alt string) (*http.Response, error) { 6004 reqHeaders := make(http.Header) 6005 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6006 for k, v := range c.header_ { 6007 reqHeaders[k] = v 6008 } 6009 reqHeaders.Set("User-Agent", c.s.userAgent()) 6010 var body io.Reader = nil 6011 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 6012 if err != nil { 6013 return nil, err 6014 } 6015 reqHeaders.Set("Content-Type", "application/json") 6016 c.urlParams_.Set("alt", alt) 6017 c.urlParams_.Set("prettyPrint", "false") 6018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 6019 urls += "?" + c.urlParams_.Encode() 6020 req, err := http.NewRequest("POST", urls, body) 6021 if err != nil { 6022 return nil, err 6023 } 6024 req.Header = reqHeaders 6025 googleapi.Expand(req.URL, map[string]string{ 6026 "parent": c.parent, 6027 }) 6028 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6029} 6030 6031// Do executes the "datacatalog.projects.locations.entryGroups.tags.create" call. 6032// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 6033// non-nil. Any non-2xx status code is an error. Response headers are in 6034// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 6035// a response was returned at all) in error.(*googleapi.Error).Header. 6036// Use googleapi.IsNotModified to check whether the returned error was 6037// because http.StatusNotModified was returned. 6038func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 6039 gensupport.SetOptions(c.urlParams_, opts...) 6040 res, err := c.doRequest("json") 6041 if res != nil && res.StatusCode == http.StatusNotModified { 6042 if res.Body != nil { 6043 res.Body.Close() 6044 } 6045 return nil, &googleapi.Error{ 6046 Code: res.StatusCode, 6047 Header: res.Header, 6048 } 6049 } 6050 if err != nil { 6051 return nil, err 6052 } 6053 defer googleapi.CloseBody(res) 6054 if err := googleapi.CheckResponse(res); err != nil { 6055 return nil, err 6056 } 6057 ret := &GoogleCloudDatacatalogV1beta1Tag{ 6058 ServerResponse: googleapi.ServerResponse{ 6059 Header: res.Header, 6060 HTTPStatusCode: res.StatusCode, 6061 }, 6062 } 6063 target := &ret 6064 if err := gensupport.DecodeResponse(target, res); err != nil { 6065 return nil, err 6066 } 6067 return ret, nil 6068 // { 6069 // "description": "Creates a tag on an Entry. Note: The project identified by the `parent` parameter for the [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be from the same organization.", 6070 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags", 6071 // "httpMethod": "POST", 6072 // "id": "datacatalog.projects.locations.entryGroups.tags.create", 6073 // "parameterOrder": [ 6074 // "parent" 6075 // ], 6076 // "parameters": { 6077 // "parent": { 6078 // "description": "Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} Note that this Tag and its child resources may not actually be stored in the location in this name.", 6079 // "location": "path", 6080 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 6081 // "required": true, 6082 // "type": "string" 6083 // } 6084 // }, 6085 // "path": "v1beta1/{+parent}/tags", 6086 // "request": { 6087 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6088 // }, 6089 // "response": { 6090 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6091 // }, 6092 // "scopes": [ 6093 // "https://www.googleapis.com/auth/cloud-platform" 6094 // ] 6095 // } 6096 6097} 6098 6099// method id "datacatalog.projects.locations.entryGroups.tags.delete": 6100 6101type ProjectsLocationsEntryGroupsTagsDeleteCall struct { 6102 s *Service 6103 name string 6104 urlParams_ gensupport.URLParams 6105 ctx_ context.Context 6106 header_ http.Header 6107} 6108 6109// Delete: Deletes a tag. 6110// 6111// - name: The name of the tag to delete. Example: * 6112// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 6113// id}/entries/{entry_id}/tags/{tag_id}. 6114func (r *ProjectsLocationsEntryGroupsTagsService) Delete(name string) *ProjectsLocationsEntryGroupsTagsDeleteCall { 6115 c := &ProjectsLocationsEntryGroupsTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6116 c.name = name 6117 return c 6118} 6119 6120// Fields allows partial responses to be retrieved. See 6121// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6122// for more information. 6123func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsDeleteCall { 6124 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6125 return c 6126} 6127 6128// Context sets the context to be used in this call's Do method. Any 6129// pending HTTP request will be aborted if the provided context is 6130// canceled. 6131func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsDeleteCall { 6132 c.ctx_ = ctx 6133 return c 6134} 6135 6136// Header returns an http.Header that can be modified by the caller to 6137// add HTTP headers to the request. 6138func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Header() http.Header { 6139 if c.header_ == nil { 6140 c.header_ = make(http.Header) 6141 } 6142 return c.header_ 6143} 6144 6145func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 6146 reqHeaders := make(http.Header) 6147 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6148 for k, v := range c.header_ { 6149 reqHeaders[k] = v 6150 } 6151 reqHeaders.Set("User-Agent", c.s.userAgent()) 6152 var body io.Reader = nil 6153 c.urlParams_.Set("alt", alt) 6154 c.urlParams_.Set("prettyPrint", "false") 6155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6156 urls += "?" + c.urlParams_.Encode() 6157 req, err := http.NewRequest("DELETE", urls, body) 6158 if err != nil { 6159 return nil, err 6160 } 6161 req.Header = reqHeaders 6162 googleapi.Expand(req.URL, map[string]string{ 6163 "name": c.name, 6164 }) 6165 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6166} 6167 6168// Do executes the "datacatalog.projects.locations.entryGroups.tags.delete" call. 6169// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6170// code is an error. Response headers are in either 6171// *Empty.ServerResponse.Header or (if a response was returned at all) 6172// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6173// check whether the returned error was because http.StatusNotModified 6174// was returned. 6175func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6176 gensupport.SetOptions(c.urlParams_, opts...) 6177 res, err := c.doRequest("json") 6178 if res != nil && res.StatusCode == http.StatusNotModified { 6179 if res.Body != nil { 6180 res.Body.Close() 6181 } 6182 return nil, &googleapi.Error{ 6183 Code: res.StatusCode, 6184 Header: res.Header, 6185 } 6186 } 6187 if err != nil { 6188 return nil, err 6189 } 6190 defer googleapi.CloseBody(res) 6191 if err := googleapi.CheckResponse(res); err != nil { 6192 return nil, err 6193 } 6194 ret := &Empty{ 6195 ServerResponse: googleapi.ServerResponse{ 6196 Header: res.Header, 6197 HTTPStatusCode: res.StatusCode, 6198 }, 6199 } 6200 target := &ret 6201 if err := gensupport.DecodeResponse(target, res); err != nil { 6202 return nil, err 6203 } 6204 return ret, nil 6205 // { 6206 // "description": "Deletes a tag.", 6207 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags/{tagsId}", 6208 // "httpMethod": "DELETE", 6209 // "id": "datacatalog.projects.locations.entryGroups.tags.delete", 6210 // "parameterOrder": [ 6211 // "name" 6212 // ], 6213 // "parameters": { 6214 // "name": { 6215 // "description": "Required. The name of the tag to delete. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}", 6216 // "location": "path", 6217 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/tags/[^/]+$", 6218 // "required": true, 6219 // "type": "string" 6220 // } 6221 // }, 6222 // "path": "v1beta1/{+name}", 6223 // "response": { 6224 // "$ref": "Empty" 6225 // }, 6226 // "scopes": [ 6227 // "https://www.googleapis.com/auth/cloud-platform" 6228 // ] 6229 // } 6230 6231} 6232 6233// method id "datacatalog.projects.locations.entryGroups.tags.list": 6234 6235type ProjectsLocationsEntryGroupsTagsListCall struct { 6236 s *Service 6237 parent string 6238 urlParams_ gensupport.URLParams 6239 ifNoneMatch_ string 6240 ctx_ context.Context 6241 header_ http.Header 6242} 6243 6244// List: Lists the tags on an Entry. 6245// 6246// - parent: The name of the Data Catalog resource to list the tags of. 6247// The resource could be an Entry or an EntryGroup. Examples: * 6248// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 6249// id} * 6250// projects/{project_id}/locations/{location}/entryGroups/{entry_group_ 6251// id}/entries/{entry_id}. 6252func (r *ProjectsLocationsEntryGroupsTagsService) List(parent string) *ProjectsLocationsEntryGroupsTagsListCall { 6253 c := &ProjectsLocationsEntryGroupsTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6254 c.parent = parent 6255 return c 6256} 6257 6258// PageSize sets the optional parameter "pageSize": The maximum number 6259// of tags to return. Default is 10. Max limit is 1000. 6260func (c *ProjectsLocationsEntryGroupsTagsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsTagsListCall { 6261 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6262 return c 6263} 6264 6265// PageToken sets the optional parameter "pageToken": Token that 6266// specifies which page is requested. If empty, the first page is 6267// returned. 6268func (c *ProjectsLocationsEntryGroupsTagsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsTagsListCall { 6269 c.urlParams_.Set("pageToken", pageToken) 6270 return c 6271} 6272 6273// Fields allows partial responses to be retrieved. See 6274// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6275// for more information. 6276func (c *ProjectsLocationsEntryGroupsTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsListCall { 6277 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6278 return c 6279} 6280 6281// IfNoneMatch sets the optional parameter which makes the operation 6282// fail if the object's ETag matches the given value. This is useful for 6283// getting updates only after the object has changed since the last 6284// request. Use googleapi.IsNotModified to check whether the response 6285// error from Do is the result of In-None-Match. 6286func (c *ProjectsLocationsEntryGroupsTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsTagsListCall { 6287 c.ifNoneMatch_ = entityTag 6288 return c 6289} 6290 6291// Context sets the context to be used in this call's Do method. Any 6292// pending HTTP request will be aborted if the provided context is 6293// canceled. 6294func (c *ProjectsLocationsEntryGroupsTagsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsListCall { 6295 c.ctx_ = ctx 6296 return c 6297} 6298 6299// Header returns an http.Header that can be modified by the caller to 6300// add HTTP headers to the request. 6301func (c *ProjectsLocationsEntryGroupsTagsListCall) Header() http.Header { 6302 if c.header_ == nil { 6303 c.header_ = make(http.Header) 6304 } 6305 return c.header_ 6306} 6307 6308func (c *ProjectsLocationsEntryGroupsTagsListCall) doRequest(alt string) (*http.Response, error) { 6309 reqHeaders := make(http.Header) 6310 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6311 for k, v := range c.header_ { 6312 reqHeaders[k] = v 6313 } 6314 reqHeaders.Set("User-Agent", c.s.userAgent()) 6315 if c.ifNoneMatch_ != "" { 6316 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6317 } 6318 var body io.Reader = nil 6319 c.urlParams_.Set("alt", alt) 6320 c.urlParams_.Set("prettyPrint", "false") 6321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 6322 urls += "?" + c.urlParams_.Encode() 6323 req, err := http.NewRequest("GET", urls, body) 6324 if err != nil { 6325 return nil, err 6326 } 6327 req.Header = reqHeaders 6328 googleapi.Expand(req.URL, map[string]string{ 6329 "parent": c.parent, 6330 }) 6331 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6332} 6333 6334// Do executes the "datacatalog.projects.locations.entryGroups.tags.list" call. 6335// Exactly one of *GoogleCloudDatacatalogV1beta1ListTagsResponse or 6336// error will be non-nil. Any non-2xx status code is an error. Response 6337// headers are in either 6338// *GoogleCloudDatacatalogV1beta1ListTagsResponse.ServerResponse.Header 6339// or (if a response was returned at all) in 6340// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6341// whether the returned error was because http.StatusNotModified was 6342// returned. 6343func (c *ProjectsLocationsEntryGroupsTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTagsResponse, error) { 6344 gensupport.SetOptions(c.urlParams_, opts...) 6345 res, err := c.doRequest("json") 6346 if res != nil && res.StatusCode == http.StatusNotModified { 6347 if res.Body != nil { 6348 res.Body.Close() 6349 } 6350 return nil, &googleapi.Error{ 6351 Code: res.StatusCode, 6352 Header: res.Header, 6353 } 6354 } 6355 if err != nil { 6356 return nil, err 6357 } 6358 defer googleapi.CloseBody(res) 6359 if err := googleapi.CheckResponse(res); err != nil { 6360 return nil, err 6361 } 6362 ret := &GoogleCloudDatacatalogV1beta1ListTagsResponse{ 6363 ServerResponse: googleapi.ServerResponse{ 6364 Header: res.Header, 6365 HTTPStatusCode: res.StatusCode, 6366 }, 6367 } 6368 target := &ret 6369 if err := gensupport.DecodeResponse(target, res); err != nil { 6370 return nil, err 6371 } 6372 return ret, nil 6373 // { 6374 // "description": "Lists the tags on an Entry.", 6375 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags", 6376 // "httpMethod": "GET", 6377 // "id": "datacatalog.projects.locations.entryGroups.tags.list", 6378 // "parameterOrder": [ 6379 // "parent" 6380 // ], 6381 // "parameters": { 6382 // "pageSize": { 6383 // "description": "The maximum number of tags to return. Default is 10. Max limit is 1000.", 6384 // "format": "int32", 6385 // "location": "query", 6386 // "type": "integer" 6387 // }, 6388 // "pageToken": { 6389 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 6390 // "location": "query", 6391 // "type": "string" 6392 // }, 6393 // "parent": { 6394 // "description": "Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup. Examples: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 6395 // "location": "path", 6396 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 6397 // "required": true, 6398 // "type": "string" 6399 // } 6400 // }, 6401 // "path": "v1beta1/{+parent}/tags", 6402 // "response": { 6403 // "$ref": "GoogleCloudDatacatalogV1beta1ListTagsResponse" 6404 // }, 6405 // "scopes": [ 6406 // "https://www.googleapis.com/auth/cloud-platform" 6407 // ] 6408 // } 6409 6410} 6411 6412// Pages invokes f for each page of results. 6413// A non-nil error returned from f will halt the iteration. 6414// The provided context supersedes any context provided to the Context method. 6415func (c *ProjectsLocationsEntryGroupsTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTagsResponse) error) error { 6416 c.ctx_ = ctx 6417 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6418 for { 6419 x, err := c.Do() 6420 if err != nil { 6421 return err 6422 } 6423 if err := f(x); err != nil { 6424 return err 6425 } 6426 if x.NextPageToken == "" { 6427 return nil 6428 } 6429 c.PageToken(x.NextPageToken) 6430 } 6431} 6432 6433// method id "datacatalog.projects.locations.entryGroups.tags.patch": 6434 6435type ProjectsLocationsEntryGroupsTagsPatchCall struct { 6436 s *Service 6437 nameid string 6438 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 6439 urlParams_ gensupport.URLParams 6440 ctx_ context.Context 6441 header_ http.Header 6442} 6443 6444// Patch: Updates an existing tag. 6445// 6446// - name: The resource name of the tag in URL format. Example: * 6447// projects/{project_id}/locations/{location}/entrygroups/{entry_group_ 6448// id}/entries/{entry_id}/tags/{tag_id} where `tag_id` is a 6449// system-generated identifier. Note that this Tag may not actually be 6450// stored in the location in this name. 6451func (r *ProjectsLocationsEntryGroupsTagsService) Patch(nameid string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsTagsPatchCall { 6452 c := &ProjectsLocationsEntryGroupsTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6453 c.nameid = nameid 6454 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 6455 return c 6456} 6457 6458// UpdateMask sets the optional parameter "updateMask": Note: Currently, 6459// this parameter can only take "fields" as value. Names of fields 6460// whose values to overwrite on a tag. Currently, a tag has the only 6461// modifiable field with the name `fields`. In general, if this 6462// parameter is absent or empty, all modifiable fields are overwritten. 6463// If such fields are non-required and omitted in the request body, 6464// their values are emptied. 6465func (c *ProjectsLocationsEntryGroupsTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsTagsPatchCall { 6466 c.urlParams_.Set("updateMask", updateMask) 6467 return c 6468} 6469 6470// Fields allows partial responses to be retrieved. See 6471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6472// for more information. 6473func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsPatchCall { 6474 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6475 return c 6476} 6477 6478// Context sets the context to be used in this call's Do method. Any 6479// pending HTTP request will be aborted if the provided context is 6480// canceled. 6481func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsPatchCall { 6482 c.ctx_ = ctx 6483 return c 6484} 6485 6486// Header returns an http.Header that can be modified by the caller to 6487// add HTTP headers to the request. 6488func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Header() http.Header { 6489 if c.header_ == nil { 6490 c.header_ = make(http.Header) 6491 } 6492 return c.header_ 6493} 6494 6495func (c *ProjectsLocationsEntryGroupsTagsPatchCall) doRequest(alt string) (*http.Response, error) { 6496 reqHeaders := make(http.Header) 6497 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6498 for k, v := range c.header_ { 6499 reqHeaders[k] = v 6500 } 6501 reqHeaders.Set("User-Agent", c.s.userAgent()) 6502 var body io.Reader = nil 6503 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 6504 if err != nil { 6505 return nil, err 6506 } 6507 reqHeaders.Set("Content-Type", "application/json") 6508 c.urlParams_.Set("alt", alt) 6509 c.urlParams_.Set("prettyPrint", "false") 6510 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6511 urls += "?" + c.urlParams_.Encode() 6512 req, err := http.NewRequest("PATCH", urls, body) 6513 if err != nil { 6514 return nil, err 6515 } 6516 req.Header = reqHeaders 6517 googleapi.Expand(req.URL, map[string]string{ 6518 "name": c.nameid, 6519 }) 6520 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6521} 6522 6523// Do executes the "datacatalog.projects.locations.entryGroups.tags.patch" call. 6524// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 6525// non-nil. Any non-2xx status code is an error. Response headers are in 6526// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 6527// a response was returned at all) in error.(*googleapi.Error).Header. 6528// Use googleapi.IsNotModified to check whether the returned error was 6529// because http.StatusNotModified was returned. 6530func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 6531 gensupport.SetOptions(c.urlParams_, opts...) 6532 res, err := c.doRequest("json") 6533 if res != nil && res.StatusCode == http.StatusNotModified { 6534 if res.Body != nil { 6535 res.Body.Close() 6536 } 6537 return nil, &googleapi.Error{ 6538 Code: res.StatusCode, 6539 Header: res.Header, 6540 } 6541 } 6542 if err != nil { 6543 return nil, err 6544 } 6545 defer googleapi.CloseBody(res) 6546 if err := googleapi.CheckResponse(res); err != nil { 6547 return nil, err 6548 } 6549 ret := &GoogleCloudDatacatalogV1beta1Tag{ 6550 ServerResponse: googleapi.ServerResponse{ 6551 Header: res.Header, 6552 HTTPStatusCode: res.StatusCode, 6553 }, 6554 } 6555 target := &ret 6556 if err := gensupport.DecodeResponse(target, res); err != nil { 6557 return nil, err 6558 } 6559 return ret, nil 6560 // { 6561 // "description": "Updates an existing tag.", 6562 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags/{tagsId}", 6563 // "httpMethod": "PATCH", 6564 // "id": "datacatalog.projects.locations.entryGroups.tags.patch", 6565 // "parameterOrder": [ 6566 // "name" 6567 // ], 6568 // "parameters": { 6569 // "name": { 6570 // "description": "The resource name of the tag in URL format. Example: * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} where `tag_id` is a system-generated identifier. Note that this Tag may not actually be stored in the location in this name.", 6571 // "location": "path", 6572 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/tags/[^/]+$", 6573 // "required": true, 6574 // "type": "string" 6575 // }, 6576 // "updateMask": { 6577 // "description": "Note: Currently, this parameter can only take `\"fields\"` as value. Names of fields whose values to overwrite on a tag. Currently, a tag has the only modifiable field with the name `fields`. In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.", 6578 // "format": "google-fieldmask", 6579 // "location": "query", 6580 // "type": "string" 6581 // } 6582 // }, 6583 // "path": "v1beta1/{+name}", 6584 // "request": { 6585 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6586 // }, 6587 // "response": { 6588 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6589 // }, 6590 // "scopes": [ 6591 // "https://www.googleapis.com/auth/cloud-platform" 6592 // ] 6593 // } 6594 6595} 6596 6597// method id "datacatalog.projects.locations.tagTemplates.create": 6598 6599type ProjectsLocationsTagTemplatesCreateCall struct { 6600 s *Service 6601 parent string 6602 googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate 6603 urlParams_ gensupport.URLParams 6604 ctx_ context.Context 6605 header_ http.Header 6606} 6607 6608// Create: Creates a tag template. The user should enable the Data 6609// Catalog API in the project identified by the `parent` parameter (see 6610// Data Catalog Resource Project 6611// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 6612// for more information). 6613// 6614// - parent: The name of the project and the template location 6615// [region](https://cloud.google.com/data-catalog/docs/concepts/regions 6616// . Example: * projects/{project_id}/locations/us-central1. 6617func (r *ProjectsLocationsTagTemplatesService) Create(parent string, googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate) *ProjectsLocationsTagTemplatesCreateCall { 6618 c := &ProjectsLocationsTagTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6619 c.parent = parent 6620 c.googleclouddatacatalogv1beta1tagtemplate = googleclouddatacatalogv1beta1tagtemplate 6621 return c 6622} 6623 6624// TagTemplateId sets the optional parameter "tagTemplateId": Required. 6625// The id of the tag template to create. 6626func (c *ProjectsLocationsTagTemplatesCreateCall) TagTemplateId(tagTemplateId string) *ProjectsLocationsTagTemplatesCreateCall { 6627 c.urlParams_.Set("tagTemplateId", tagTemplateId) 6628 return c 6629} 6630 6631// Fields allows partial responses to be retrieved. See 6632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6633// for more information. 6634func (c *ProjectsLocationsTagTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesCreateCall { 6635 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6636 return c 6637} 6638 6639// Context sets the context to be used in this call's Do method. Any 6640// pending HTTP request will be aborted if the provided context is 6641// canceled. 6642func (c *ProjectsLocationsTagTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesCreateCall { 6643 c.ctx_ = ctx 6644 return c 6645} 6646 6647// Header returns an http.Header that can be modified by the caller to 6648// add HTTP headers to the request. 6649func (c *ProjectsLocationsTagTemplatesCreateCall) Header() http.Header { 6650 if c.header_ == nil { 6651 c.header_ = make(http.Header) 6652 } 6653 return c.header_ 6654} 6655 6656func (c *ProjectsLocationsTagTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 6657 reqHeaders := make(http.Header) 6658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6659 for k, v := range c.header_ { 6660 reqHeaders[k] = v 6661 } 6662 reqHeaders.Set("User-Agent", c.s.userAgent()) 6663 var body io.Reader = nil 6664 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplate) 6665 if err != nil { 6666 return nil, err 6667 } 6668 reqHeaders.Set("Content-Type", "application/json") 6669 c.urlParams_.Set("alt", alt) 6670 c.urlParams_.Set("prettyPrint", "false") 6671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tagTemplates") 6672 urls += "?" + c.urlParams_.Encode() 6673 req, err := http.NewRequest("POST", urls, body) 6674 if err != nil { 6675 return nil, err 6676 } 6677 req.Header = reqHeaders 6678 googleapi.Expand(req.URL, map[string]string{ 6679 "parent": c.parent, 6680 }) 6681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6682} 6683 6684// Do executes the "datacatalog.projects.locations.tagTemplates.create" call. 6685// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 6686// will be non-nil. Any non-2xx status code is an error. Response 6687// headers are in either 6688// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 6689// (if a response was returned at all) in 6690// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6691// whether the returned error was because http.StatusNotModified was 6692// returned. 6693func (c *ProjectsLocationsTagTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 6694 gensupport.SetOptions(c.urlParams_, opts...) 6695 res, err := c.doRequest("json") 6696 if res != nil && res.StatusCode == http.StatusNotModified { 6697 if res.Body != nil { 6698 res.Body.Close() 6699 } 6700 return nil, &googleapi.Error{ 6701 Code: res.StatusCode, 6702 Header: res.Header, 6703 } 6704 } 6705 if err != nil { 6706 return nil, err 6707 } 6708 defer googleapi.CloseBody(res) 6709 if err := googleapi.CheckResponse(res); err != nil { 6710 return nil, err 6711 } 6712 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 6713 ServerResponse: googleapi.ServerResponse{ 6714 Header: res.Header, 6715 HTTPStatusCode: res.StatusCode, 6716 }, 6717 } 6718 target := &ret 6719 if err := gensupport.DecodeResponse(target, res); err != nil { 6720 return nil, err 6721 } 6722 return ret, nil 6723 // { 6724 // "description": "Creates a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 6725 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates", 6726 // "httpMethod": "POST", 6727 // "id": "datacatalog.projects.locations.tagTemplates.create", 6728 // "parameterOrder": [ 6729 // "parent" 6730 // ], 6731 // "parameters": { 6732 // "parent": { 6733 // "description": "Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions. Example: * projects/{project_id}/locations/us-central1", 6734 // "location": "path", 6735 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6736 // "required": true, 6737 // "type": "string" 6738 // }, 6739 // "tagTemplateId": { 6740 // "description": "Required. The id of the tag template to create.", 6741 // "location": "query", 6742 // "type": "string" 6743 // } 6744 // }, 6745 // "path": "v1beta1/{+parent}/tagTemplates", 6746 // "request": { 6747 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 6748 // }, 6749 // "response": { 6750 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 6751 // }, 6752 // "scopes": [ 6753 // "https://www.googleapis.com/auth/cloud-platform" 6754 // ] 6755 // } 6756 6757} 6758 6759// method id "datacatalog.projects.locations.tagTemplates.delete": 6760 6761type ProjectsLocationsTagTemplatesDeleteCall struct { 6762 s *Service 6763 name string 6764 urlParams_ gensupport.URLParams 6765 ctx_ context.Context 6766 header_ http.Header 6767} 6768 6769// Delete: Deletes a tag template and all tags using the template. Users 6770// should enable the Data Catalog API in the project identified by the 6771// `name` parameter (see [Data Catalog Resource Project] 6772// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 6773// for more information). 6774// 6775// - name: The name of the tag template to delete. Example: * 6776// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 6777// e_id}. 6778func (r *ProjectsLocationsTagTemplatesService) Delete(name string) *ProjectsLocationsTagTemplatesDeleteCall { 6779 c := &ProjectsLocationsTagTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6780 c.name = name 6781 return c 6782} 6783 6784// Force sets the optional parameter "force": Required. Currently, this 6785// field must always be set to `true`. This confirms the deletion of any 6786// possible tags using this template. `force = false` will be supported 6787// in the future. 6788func (c *ProjectsLocationsTagTemplatesDeleteCall) Force(force bool) *ProjectsLocationsTagTemplatesDeleteCall { 6789 c.urlParams_.Set("force", fmt.Sprint(force)) 6790 return c 6791} 6792 6793// Fields allows partial responses to be retrieved. See 6794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6795// for more information. 6796func (c *ProjectsLocationsTagTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesDeleteCall { 6797 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6798 return c 6799} 6800 6801// Context sets the context to be used in this call's Do method. Any 6802// pending HTTP request will be aborted if the provided context is 6803// canceled. 6804func (c *ProjectsLocationsTagTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesDeleteCall { 6805 c.ctx_ = ctx 6806 return c 6807} 6808 6809// Header returns an http.Header that can be modified by the caller to 6810// add HTTP headers to the request. 6811func (c *ProjectsLocationsTagTemplatesDeleteCall) Header() http.Header { 6812 if c.header_ == nil { 6813 c.header_ = make(http.Header) 6814 } 6815 return c.header_ 6816} 6817 6818func (c *ProjectsLocationsTagTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 6819 reqHeaders := make(http.Header) 6820 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6821 for k, v := range c.header_ { 6822 reqHeaders[k] = v 6823 } 6824 reqHeaders.Set("User-Agent", c.s.userAgent()) 6825 var body io.Reader = nil 6826 c.urlParams_.Set("alt", alt) 6827 c.urlParams_.Set("prettyPrint", "false") 6828 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6829 urls += "?" + c.urlParams_.Encode() 6830 req, err := http.NewRequest("DELETE", urls, body) 6831 if err != nil { 6832 return nil, err 6833 } 6834 req.Header = reqHeaders 6835 googleapi.Expand(req.URL, map[string]string{ 6836 "name": c.name, 6837 }) 6838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6839} 6840 6841// Do executes the "datacatalog.projects.locations.tagTemplates.delete" call. 6842// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6843// code is an error. Response headers are in either 6844// *Empty.ServerResponse.Header or (if a response was returned at all) 6845// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6846// check whether the returned error was because http.StatusNotModified 6847// was returned. 6848func (c *ProjectsLocationsTagTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6849 gensupport.SetOptions(c.urlParams_, opts...) 6850 res, err := c.doRequest("json") 6851 if res != nil && res.StatusCode == http.StatusNotModified { 6852 if res.Body != nil { 6853 res.Body.Close() 6854 } 6855 return nil, &googleapi.Error{ 6856 Code: res.StatusCode, 6857 Header: res.Header, 6858 } 6859 } 6860 if err != nil { 6861 return nil, err 6862 } 6863 defer googleapi.CloseBody(res) 6864 if err := googleapi.CheckResponse(res); err != nil { 6865 return nil, err 6866 } 6867 ret := &Empty{ 6868 ServerResponse: googleapi.ServerResponse{ 6869 Header: res.Header, 6870 HTTPStatusCode: res.StatusCode, 6871 }, 6872 } 6873 target := &ret 6874 if err := gensupport.DecodeResponse(target, res); err != nil { 6875 return nil, err 6876 } 6877 return ret, nil 6878 // { 6879 // "description": "Deletes a tag template and all tags using the template. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 6880 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 6881 // "httpMethod": "DELETE", 6882 // "id": "datacatalog.projects.locations.tagTemplates.delete", 6883 // "parameterOrder": [ 6884 // "name" 6885 // ], 6886 // "parameters": { 6887 // "force": { 6888 // "description": "Required. Currently, this field must always be set to `true`. This confirms the deletion of any possible tags using this template. `force = false` will be supported in the future.", 6889 // "location": "query", 6890 // "type": "boolean" 6891 // }, 6892 // "name": { 6893 // "description": "Required. The name of the tag template to delete. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}", 6894 // "location": "path", 6895 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 6896 // "required": true, 6897 // "type": "string" 6898 // } 6899 // }, 6900 // "path": "v1beta1/{+name}", 6901 // "response": { 6902 // "$ref": "Empty" 6903 // }, 6904 // "scopes": [ 6905 // "https://www.googleapis.com/auth/cloud-platform" 6906 // ] 6907 // } 6908 6909} 6910 6911// method id "datacatalog.projects.locations.tagTemplates.get": 6912 6913type ProjectsLocationsTagTemplatesGetCall struct { 6914 s *Service 6915 name string 6916 urlParams_ gensupport.URLParams 6917 ifNoneMatch_ string 6918 ctx_ context.Context 6919 header_ http.Header 6920} 6921 6922// Get: Gets a tag template. 6923// 6924// - name: The name of the tag template. Example: * 6925// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 6926// e_id}. 6927func (r *ProjectsLocationsTagTemplatesService) Get(name string) *ProjectsLocationsTagTemplatesGetCall { 6928 c := &ProjectsLocationsTagTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6929 c.name = name 6930 return c 6931} 6932 6933// Fields allows partial responses to be retrieved. See 6934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6935// for more information. 6936func (c *ProjectsLocationsTagTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesGetCall { 6937 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6938 return c 6939} 6940 6941// IfNoneMatch sets the optional parameter which makes the operation 6942// fail if the object's ETag matches the given value. This is useful for 6943// getting updates only after the object has changed since the last 6944// request. Use googleapi.IsNotModified to check whether the response 6945// error from Do is the result of In-None-Match. 6946func (c *ProjectsLocationsTagTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTagTemplatesGetCall { 6947 c.ifNoneMatch_ = entityTag 6948 return c 6949} 6950 6951// Context sets the context to be used in this call's Do method. Any 6952// pending HTTP request will be aborted if the provided context is 6953// canceled. 6954func (c *ProjectsLocationsTagTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesGetCall { 6955 c.ctx_ = ctx 6956 return c 6957} 6958 6959// Header returns an http.Header that can be modified by the caller to 6960// add HTTP headers to the request. 6961func (c *ProjectsLocationsTagTemplatesGetCall) Header() http.Header { 6962 if c.header_ == nil { 6963 c.header_ = make(http.Header) 6964 } 6965 return c.header_ 6966} 6967 6968func (c *ProjectsLocationsTagTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 6969 reqHeaders := make(http.Header) 6970 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6971 for k, v := range c.header_ { 6972 reqHeaders[k] = v 6973 } 6974 reqHeaders.Set("User-Agent", c.s.userAgent()) 6975 if c.ifNoneMatch_ != "" { 6976 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6977 } 6978 var body io.Reader = nil 6979 c.urlParams_.Set("alt", alt) 6980 c.urlParams_.Set("prettyPrint", "false") 6981 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6982 urls += "?" + c.urlParams_.Encode() 6983 req, err := http.NewRequest("GET", urls, body) 6984 if err != nil { 6985 return nil, err 6986 } 6987 req.Header = reqHeaders 6988 googleapi.Expand(req.URL, map[string]string{ 6989 "name": c.name, 6990 }) 6991 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6992} 6993 6994// Do executes the "datacatalog.projects.locations.tagTemplates.get" call. 6995// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 6996// will be non-nil. Any non-2xx status code is an error. Response 6997// headers are in either 6998// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 6999// (if a response was returned at all) in 7000// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7001// whether the returned error was because http.StatusNotModified was 7002// returned. 7003func (c *ProjectsLocationsTagTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 7004 gensupport.SetOptions(c.urlParams_, opts...) 7005 res, err := c.doRequest("json") 7006 if res != nil && res.StatusCode == http.StatusNotModified { 7007 if res.Body != nil { 7008 res.Body.Close() 7009 } 7010 return nil, &googleapi.Error{ 7011 Code: res.StatusCode, 7012 Header: res.Header, 7013 } 7014 } 7015 if err != nil { 7016 return nil, err 7017 } 7018 defer googleapi.CloseBody(res) 7019 if err := googleapi.CheckResponse(res); err != nil { 7020 return nil, err 7021 } 7022 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 7023 ServerResponse: googleapi.ServerResponse{ 7024 Header: res.Header, 7025 HTTPStatusCode: res.StatusCode, 7026 }, 7027 } 7028 target := &ret 7029 if err := gensupport.DecodeResponse(target, res); err != nil { 7030 return nil, err 7031 } 7032 return ret, nil 7033 // { 7034 // "description": "Gets a tag template.", 7035 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 7036 // "httpMethod": "GET", 7037 // "id": "datacatalog.projects.locations.tagTemplates.get", 7038 // "parameterOrder": [ 7039 // "name" 7040 // ], 7041 // "parameters": { 7042 // "name": { 7043 // "description": "Required. The name of the tag template. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}", 7044 // "location": "path", 7045 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7046 // "required": true, 7047 // "type": "string" 7048 // } 7049 // }, 7050 // "path": "v1beta1/{+name}", 7051 // "response": { 7052 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 7053 // }, 7054 // "scopes": [ 7055 // "https://www.googleapis.com/auth/cloud-platform" 7056 // ] 7057 // } 7058 7059} 7060 7061// method id "datacatalog.projects.locations.tagTemplates.getIamPolicy": 7062 7063type ProjectsLocationsTagTemplatesGetIamPolicyCall struct { 7064 s *Service 7065 resource string 7066 getiampolicyrequest *GetIamPolicyRequest 7067 urlParams_ gensupport.URLParams 7068 ctx_ context.Context 7069 header_ http.Header 7070} 7071 7072// GetIamPolicy: Gets the access control policy for a resource. A 7073// `NOT_FOUND` error is returned if the resource does not exist. An 7074// empty policy is returned if the resource exists but does not have a 7075// policy set on it. Supported resources are: - Tag templates. - 7076// Entries. - Entry groups. Note, this method cannot be used to manage 7077// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 7078// resources synced to Data Catalog. Callers must have following Google 7079// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 7080// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 7081// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 7082// get policies on entry groups. 7083// 7084// - resource: REQUIRED: The resource for which the policy is being 7085// requested. See the operation documentation for the appropriate 7086// value for this field. 7087func (r *ProjectsLocationsTagTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 7088 c := &ProjectsLocationsTagTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7089 c.resource = resource 7090 c.getiampolicyrequest = getiampolicyrequest 7091 return c 7092} 7093 7094// Fields allows partial responses to be retrieved. See 7095// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7096// for more information. 7097func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 7098 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7099 return c 7100} 7101 7102// Context sets the context to be used in this call's Do method. Any 7103// pending HTTP request will be aborted if the provided context is 7104// canceled. 7105func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 7106 c.ctx_ = ctx 7107 return c 7108} 7109 7110// Header returns an http.Header that can be modified by the caller to 7111// add HTTP headers to the request. 7112func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Header() http.Header { 7113 if c.header_ == nil { 7114 c.header_ = make(http.Header) 7115 } 7116 return c.header_ 7117} 7118 7119func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7120 reqHeaders := make(http.Header) 7121 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7122 for k, v := range c.header_ { 7123 reqHeaders[k] = v 7124 } 7125 reqHeaders.Set("User-Agent", c.s.userAgent()) 7126 var body io.Reader = nil 7127 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 7128 if err != nil { 7129 return nil, err 7130 } 7131 reqHeaders.Set("Content-Type", "application/json") 7132 c.urlParams_.Set("alt", alt) 7133 c.urlParams_.Set("prettyPrint", "false") 7134 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 7135 urls += "?" + c.urlParams_.Encode() 7136 req, err := http.NewRequest("POST", urls, body) 7137 if err != nil { 7138 return nil, err 7139 } 7140 req.Header = reqHeaders 7141 googleapi.Expand(req.URL, map[string]string{ 7142 "resource": c.resource, 7143 }) 7144 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7145} 7146 7147// Do executes the "datacatalog.projects.locations.tagTemplates.getIamPolicy" call. 7148// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7149// code is an error. Response headers are in either 7150// *Policy.ServerResponse.Header or (if a response was returned at all) 7151// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7152// check whether the returned error was because http.StatusNotModified 7153// was returned. 7154func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7155 gensupport.SetOptions(c.urlParams_, opts...) 7156 res, err := c.doRequest("json") 7157 if res != nil && res.StatusCode == http.StatusNotModified { 7158 if res.Body != nil { 7159 res.Body.Close() 7160 } 7161 return nil, &googleapi.Error{ 7162 Code: res.StatusCode, 7163 Header: res.Header, 7164 } 7165 } 7166 if err != nil { 7167 return nil, err 7168 } 7169 defer googleapi.CloseBody(res) 7170 if err := googleapi.CheckResponse(res); err != nil { 7171 return nil, err 7172 } 7173 ret := &Policy{ 7174 ServerResponse: googleapi.ServerResponse{ 7175 Header: res.Header, 7176 HTTPStatusCode: res.StatusCode, 7177 }, 7178 } 7179 target := &ret 7180 if err := gensupport.DecodeResponse(target, res); err != nil { 7181 return nil, err 7182 } 7183 return ret, nil 7184 // { 7185 // "description": "Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.", 7186 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:getIamPolicy", 7187 // "httpMethod": "POST", 7188 // "id": "datacatalog.projects.locations.tagTemplates.getIamPolicy", 7189 // "parameterOrder": [ 7190 // "resource" 7191 // ], 7192 // "parameters": { 7193 // "resource": { 7194 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 7195 // "location": "path", 7196 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7197 // "required": true, 7198 // "type": "string" 7199 // } 7200 // }, 7201 // "path": "v1beta1/{+resource}:getIamPolicy", 7202 // "request": { 7203 // "$ref": "GetIamPolicyRequest" 7204 // }, 7205 // "response": { 7206 // "$ref": "Policy" 7207 // }, 7208 // "scopes": [ 7209 // "https://www.googleapis.com/auth/cloud-platform" 7210 // ] 7211 // } 7212 7213} 7214 7215// method id "datacatalog.projects.locations.tagTemplates.patch": 7216 7217type ProjectsLocationsTagTemplatesPatchCall struct { 7218 s *Service 7219 name string 7220 googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate 7221 urlParams_ gensupport.URLParams 7222 ctx_ context.Context 7223 header_ http.Header 7224} 7225 7226// Patch: Updates a tag template. This method cannot be used to update 7227// the fields of a template. The tag template fields are represented as 7228// separate resources and should be updated using their own 7229// create/update/delete methods. Users should enable the Data Catalog 7230// API in the project identified by the `tag_template.name` parameter 7231// (see [Data Catalog Resource Project] 7232// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 7233// for more information). 7234// 7235// - name: The resource name of the tag template in URL format. Example: 7236// * 7237// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 7238// e_id} Note that this TagTemplate and its child resources may not 7239// actually be stored in the location in this name. 7240func (r *ProjectsLocationsTagTemplatesService) Patch(name string, googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate) *ProjectsLocationsTagTemplatesPatchCall { 7241 c := &ProjectsLocationsTagTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7242 c.name = name 7243 c.googleclouddatacatalogv1beta1tagtemplate = googleclouddatacatalogv1beta1tagtemplate 7244 return c 7245} 7246 7247// UpdateMask sets the optional parameter "updateMask": Names of fields 7248// whose values to overwrite on a tag template. Currently, only 7249// `display_name` can be overwritten. In general, if this parameter is 7250// absent or empty, all modifiable fields are overwritten. If such 7251// fields are non-required and omitted in the request body, their values 7252// are emptied. 7253func (c *ProjectsLocationsTagTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTagTemplatesPatchCall { 7254 c.urlParams_.Set("updateMask", updateMask) 7255 return c 7256} 7257 7258// Fields allows partial responses to be retrieved. See 7259// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7260// for more information. 7261func (c *ProjectsLocationsTagTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesPatchCall { 7262 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7263 return c 7264} 7265 7266// Context sets the context to be used in this call's Do method. Any 7267// pending HTTP request will be aborted if the provided context is 7268// canceled. 7269func (c *ProjectsLocationsTagTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesPatchCall { 7270 c.ctx_ = ctx 7271 return c 7272} 7273 7274// Header returns an http.Header that can be modified by the caller to 7275// add HTTP headers to the request. 7276func (c *ProjectsLocationsTagTemplatesPatchCall) Header() http.Header { 7277 if c.header_ == nil { 7278 c.header_ = make(http.Header) 7279 } 7280 return c.header_ 7281} 7282 7283func (c *ProjectsLocationsTagTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 7284 reqHeaders := make(http.Header) 7285 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7286 for k, v := range c.header_ { 7287 reqHeaders[k] = v 7288 } 7289 reqHeaders.Set("User-Agent", c.s.userAgent()) 7290 var body io.Reader = nil 7291 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplate) 7292 if err != nil { 7293 return nil, err 7294 } 7295 reqHeaders.Set("Content-Type", "application/json") 7296 c.urlParams_.Set("alt", alt) 7297 c.urlParams_.Set("prettyPrint", "false") 7298 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7299 urls += "?" + c.urlParams_.Encode() 7300 req, err := http.NewRequest("PATCH", urls, body) 7301 if err != nil { 7302 return nil, err 7303 } 7304 req.Header = reqHeaders 7305 googleapi.Expand(req.URL, map[string]string{ 7306 "name": c.name, 7307 }) 7308 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7309} 7310 7311// Do executes the "datacatalog.projects.locations.tagTemplates.patch" call. 7312// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 7313// will be non-nil. Any non-2xx status code is an error. Response 7314// headers are in either 7315// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 7316// (if a response was returned at all) in 7317// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7318// whether the returned error was because http.StatusNotModified was 7319// returned. 7320func (c *ProjectsLocationsTagTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 7321 gensupport.SetOptions(c.urlParams_, opts...) 7322 res, err := c.doRequest("json") 7323 if res != nil && res.StatusCode == http.StatusNotModified { 7324 if res.Body != nil { 7325 res.Body.Close() 7326 } 7327 return nil, &googleapi.Error{ 7328 Code: res.StatusCode, 7329 Header: res.Header, 7330 } 7331 } 7332 if err != nil { 7333 return nil, err 7334 } 7335 defer googleapi.CloseBody(res) 7336 if err := googleapi.CheckResponse(res); err != nil { 7337 return nil, err 7338 } 7339 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 7340 ServerResponse: googleapi.ServerResponse{ 7341 Header: res.Header, 7342 HTTPStatusCode: res.StatusCode, 7343 }, 7344 } 7345 target := &ret 7346 if err := gensupport.DecodeResponse(target, res); err != nil { 7347 return nil, err 7348 } 7349 return ret, nil 7350 // { 7351 // "description": "Updates a tag template. This method cannot be used to update the fields of a template. The tag template fields are represented as separate resources and should be updated using their own create/update/delete methods. Users should enable the Data Catalog API in the project identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 7352 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 7353 // "httpMethod": "PATCH", 7354 // "id": "datacatalog.projects.locations.tagTemplates.patch", 7355 // "parameterOrder": [ 7356 // "name" 7357 // ], 7358 // "parameters": { 7359 // "name": { 7360 // "description": "The resource name of the tag template in URL format. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} Note that this TagTemplate and its child resources may not actually be stored in the location in this name.", 7361 // "location": "path", 7362 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7363 // "required": true, 7364 // "type": "string" 7365 // }, 7366 // "updateMask": { 7367 // "description": "Names of fields whose values to overwrite on a tag template. Currently, only `display_name` can be overwritten. In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.", 7368 // "format": "google-fieldmask", 7369 // "location": "query", 7370 // "type": "string" 7371 // } 7372 // }, 7373 // "path": "v1beta1/{+name}", 7374 // "request": { 7375 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 7376 // }, 7377 // "response": { 7378 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 7379 // }, 7380 // "scopes": [ 7381 // "https://www.googleapis.com/auth/cloud-platform" 7382 // ] 7383 // } 7384 7385} 7386 7387// method id "datacatalog.projects.locations.tagTemplates.setIamPolicy": 7388 7389type ProjectsLocationsTagTemplatesSetIamPolicyCall struct { 7390 s *Service 7391 resource string 7392 setiampolicyrequest *SetIamPolicyRequest 7393 urlParams_ gensupport.URLParams 7394 ctx_ context.Context 7395 header_ http.Header 7396} 7397 7398// SetIamPolicy: Sets the access control policy for a resource. Replaces 7399// any existing policy. Supported resources are: - Tag templates. - 7400// Entries. - Entry groups. Note, this method cannot be used to manage 7401// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 7402// resources synced to Data Catalog. Callers must have following Google 7403// IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set 7404// policies on tag templates. - `datacatalog.entries.setIamPolicy` to 7405// set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to 7406// set policies on entry groups. 7407// 7408// - resource: REQUIRED: The resource for which the policy is being 7409// specified. See the operation documentation for the appropriate 7410// value for this field. 7411func (r *ProjectsLocationsTagTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7412 c := &ProjectsLocationsTagTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7413 c.resource = resource 7414 c.setiampolicyrequest = setiampolicyrequest 7415 return c 7416} 7417 7418// Fields allows partial responses to be retrieved. See 7419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7420// for more information. 7421func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7422 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7423 return c 7424} 7425 7426// Context sets the context to be used in this call's Do method. Any 7427// pending HTTP request will be aborted if the provided context is 7428// canceled. 7429func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7430 c.ctx_ = ctx 7431 return c 7432} 7433 7434// Header returns an http.Header that can be modified by the caller to 7435// add HTTP headers to the request. 7436func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Header() http.Header { 7437 if c.header_ == nil { 7438 c.header_ = make(http.Header) 7439 } 7440 return c.header_ 7441} 7442 7443func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7444 reqHeaders := make(http.Header) 7445 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7446 for k, v := range c.header_ { 7447 reqHeaders[k] = v 7448 } 7449 reqHeaders.Set("User-Agent", c.s.userAgent()) 7450 var body io.Reader = nil 7451 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 7452 if err != nil { 7453 return nil, err 7454 } 7455 reqHeaders.Set("Content-Type", "application/json") 7456 c.urlParams_.Set("alt", alt) 7457 c.urlParams_.Set("prettyPrint", "false") 7458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 7459 urls += "?" + c.urlParams_.Encode() 7460 req, err := http.NewRequest("POST", urls, body) 7461 if err != nil { 7462 return nil, err 7463 } 7464 req.Header = reqHeaders 7465 googleapi.Expand(req.URL, map[string]string{ 7466 "resource": c.resource, 7467 }) 7468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7469} 7470 7471// Do executes the "datacatalog.projects.locations.tagTemplates.setIamPolicy" call. 7472// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7473// code is an error. Response headers are in either 7474// *Policy.ServerResponse.Header or (if a response was returned at all) 7475// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7476// check whether the returned error was because http.StatusNotModified 7477// was returned. 7478func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7479 gensupport.SetOptions(c.urlParams_, opts...) 7480 res, err := c.doRequest("json") 7481 if res != nil && res.StatusCode == http.StatusNotModified { 7482 if res.Body != nil { 7483 res.Body.Close() 7484 } 7485 return nil, &googleapi.Error{ 7486 Code: res.StatusCode, 7487 Header: res.Header, 7488 } 7489 } 7490 if err != nil { 7491 return nil, err 7492 } 7493 defer googleapi.CloseBody(res) 7494 if err := googleapi.CheckResponse(res); err != nil { 7495 return nil, err 7496 } 7497 ret := &Policy{ 7498 ServerResponse: googleapi.ServerResponse{ 7499 Header: res.Header, 7500 HTTPStatusCode: res.StatusCode, 7501 }, 7502 } 7503 target := &ret 7504 if err := gensupport.DecodeResponse(target, res); err != nil { 7505 return nil, err 7506 } 7507 return ret, nil 7508 // { 7509 // "description": "Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.", 7510 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:setIamPolicy", 7511 // "httpMethod": "POST", 7512 // "id": "datacatalog.projects.locations.tagTemplates.setIamPolicy", 7513 // "parameterOrder": [ 7514 // "resource" 7515 // ], 7516 // "parameters": { 7517 // "resource": { 7518 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 7519 // "location": "path", 7520 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7521 // "required": true, 7522 // "type": "string" 7523 // } 7524 // }, 7525 // "path": "v1beta1/{+resource}:setIamPolicy", 7526 // "request": { 7527 // "$ref": "SetIamPolicyRequest" 7528 // }, 7529 // "response": { 7530 // "$ref": "Policy" 7531 // }, 7532 // "scopes": [ 7533 // "https://www.googleapis.com/auth/cloud-platform" 7534 // ] 7535 // } 7536 7537} 7538 7539// method id "datacatalog.projects.locations.tagTemplates.testIamPermissions": 7540 7541type ProjectsLocationsTagTemplatesTestIamPermissionsCall struct { 7542 s *Service 7543 resource string 7544 testiampermissionsrequest *TestIamPermissionsRequest 7545 urlParams_ gensupport.URLParams 7546 ctx_ context.Context 7547 header_ http.Header 7548} 7549 7550// TestIamPermissions: Returns the caller's permissions on a resource. 7551// If the resource does not exist, an empty set of permissions is 7552// returned (We don't return a `NOT_FOUND` error). Supported resources 7553// are: - Tag templates. - Entries. - Entry groups. Note, this method 7554// cannot be used to manage policies for BigQuery, Pub/Sub and any 7555// external Google Cloud Platform resources synced to Data Catalog. A 7556// caller is not required to have Google IAM permission to make this 7557// request. 7558// 7559// - resource: REQUIRED: The resource for which the policy detail is 7560// being requested. See the operation documentation for the 7561// appropriate value for this field. 7562func (r *ProjectsLocationsTagTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7563 c := &ProjectsLocationsTagTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7564 c.resource = resource 7565 c.testiampermissionsrequest = testiampermissionsrequest 7566 return c 7567} 7568 7569// Fields allows partial responses to be retrieved. See 7570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7571// for more information. 7572func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7573 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7574 return c 7575} 7576 7577// Context sets the context to be used in this call's Do method. Any 7578// pending HTTP request will be aborted if the provided context is 7579// canceled. 7580func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7581 c.ctx_ = ctx 7582 return c 7583} 7584 7585// Header returns an http.Header that can be modified by the caller to 7586// add HTTP headers to the request. 7587func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Header() http.Header { 7588 if c.header_ == nil { 7589 c.header_ = make(http.Header) 7590 } 7591 return c.header_ 7592} 7593 7594func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 7595 reqHeaders := make(http.Header) 7596 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7597 for k, v := range c.header_ { 7598 reqHeaders[k] = v 7599 } 7600 reqHeaders.Set("User-Agent", c.s.userAgent()) 7601 var body io.Reader = nil 7602 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 7603 if err != nil { 7604 return nil, err 7605 } 7606 reqHeaders.Set("Content-Type", "application/json") 7607 c.urlParams_.Set("alt", alt) 7608 c.urlParams_.Set("prettyPrint", "false") 7609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 7610 urls += "?" + c.urlParams_.Encode() 7611 req, err := http.NewRequest("POST", urls, body) 7612 if err != nil { 7613 return nil, err 7614 } 7615 req.Header = reqHeaders 7616 googleapi.Expand(req.URL, map[string]string{ 7617 "resource": c.resource, 7618 }) 7619 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7620} 7621 7622// Do executes the "datacatalog.projects.locations.tagTemplates.testIamPermissions" call. 7623// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 7624// Any non-2xx status code is an error. Response headers are in either 7625// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 7626// was returned at all) in error.(*googleapi.Error).Header. Use 7627// googleapi.IsNotModified to check whether the returned error was 7628// because http.StatusNotModified was returned. 7629func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 7630 gensupport.SetOptions(c.urlParams_, opts...) 7631 res, err := c.doRequest("json") 7632 if res != nil && res.StatusCode == http.StatusNotModified { 7633 if res.Body != nil { 7634 res.Body.Close() 7635 } 7636 return nil, &googleapi.Error{ 7637 Code: res.StatusCode, 7638 Header: res.Header, 7639 } 7640 } 7641 if err != nil { 7642 return nil, err 7643 } 7644 defer googleapi.CloseBody(res) 7645 if err := googleapi.CheckResponse(res); err != nil { 7646 return nil, err 7647 } 7648 ret := &TestIamPermissionsResponse{ 7649 ServerResponse: googleapi.ServerResponse{ 7650 Header: res.Header, 7651 HTTPStatusCode: res.StatusCode, 7652 }, 7653 } 7654 target := &ret 7655 if err := gensupport.DecodeResponse(target, res); err != nil { 7656 return nil, err 7657 } 7658 return ret, nil 7659 // { 7660 // "description": "Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.", 7661 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:testIamPermissions", 7662 // "httpMethod": "POST", 7663 // "id": "datacatalog.projects.locations.tagTemplates.testIamPermissions", 7664 // "parameterOrder": [ 7665 // "resource" 7666 // ], 7667 // "parameters": { 7668 // "resource": { 7669 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 7670 // "location": "path", 7671 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7672 // "required": true, 7673 // "type": "string" 7674 // } 7675 // }, 7676 // "path": "v1beta1/{+resource}:testIamPermissions", 7677 // "request": { 7678 // "$ref": "TestIamPermissionsRequest" 7679 // }, 7680 // "response": { 7681 // "$ref": "TestIamPermissionsResponse" 7682 // }, 7683 // "scopes": [ 7684 // "https://www.googleapis.com/auth/cloud-platform" 7685 // ] 7686 // } 7687 7688} 7689 7690// method id "datacatalog.projects.locations.tagTemplates.fields.create": 7691 7692type ProjectsLocationsTagTemplatesFieldsCreateCall struct { 7693 s *Service 7694 parent string 7695 googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField 7696 urlParams_ gensupport.URLParams 7697 ctx_ context.Context 7698 header_ http.Header 7699} 7700 7701// Create: Creates a field in a tag template. The user should enable the 7702// Data Catalog API in the project identified by the `parent` parameter 7703// (see Data Catalog Resource Project 7704// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 7705// for more information). 7706// 7707// - parent: The name of the project and the template location region 7708// (https://cloud.google.com/data-catalog/docs/concepts/regions). 7709// Example: * 7710// projects/{project_id}/locations/us-central1/tagTemplates/{tag_templa 7711// te_id}. 7712func (r *ProjectsLocationsTagTemplatesFieldsService) Create(parent string, googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7713 c := &ProjectsLocationsTagTemplatesFieldsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7714 c.parent = parent 7715 c.googleclouddatacatalogv1beta1tagtemplatefield = googleclouddatacatalogv1beta1tagtemplatefield 7716 return c 7717} 7718 7719// TagTemplateFieldId sets the optional parameter "tagTemplateFieldId": 7720// Required. The ID of the tag template field to create. Field ids can 7721// contain letters (both uppercase and lowercase), numbers (0-9), 7722// underscores (_) and dashes (-). Field IDs must be at least 1 7723// character long and at most 128 characters long. Field IDs must also 7724// be unique within their template. 7725func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) TagTemplateFieldId(tagTemplateFieldId string) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7726 c.urlParams_.Set("tagTemplateFieldId", tagTemplateFieldId) 7727 return c 7728} 7729 7730// Fields allows partial responses to be retrieved. See 7731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7732// for more information. 7733func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7735 return c 7736} 7737 7738// Context sets the context to be used in this call's Do method. Any 7739// pending HTTP request will be aborted if the provided context is 7740// canceled. 7741func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7742 c.ctx_ = ctx 7743 return c 7744} 7745 7746// Header returns an http.Header that can be modified by the caller to 7747// add HTTP headers to the request. 7748func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Header() http.Header { 7749 if c.header_ == nil { 7750 c.header_ = make(http.Header) 7751 } 7752 return c.header_ 7753} 7754 7755func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) doRequest(alt string) (*http.Response, error) { 7756 reqHeaders := make(http.Header) 7757 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7758 for k, v := range c.header_ { 7759 reqHeaders[k] = v 7760 } 7761 reqHeaders.Set("User-Agent", c.s.userAgent()) 7762 var body io.Reader = nil 7763 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplatefield) 7764 if err != nil { 7765 return nil, err 7766 } 7767 reqHeaders.Set("Content-Type", "application/json") 7768 c.urlParams_.Set("alt", alt) 7769 c.urlParams_.Set("prettyPrint", "false") 7770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fields") 7771 urls += "?" + c.urlParams_.Encode() 7772 req, err := http.NewRequest("POST", urls, body) 7773 if err != nil { 7774 return nil, err 7775 } 7776 req.Header = reqHeaders 7777 googleapi.Expand(req.URL, map[string]string{ 7778 "parent": c.parent, 7779 }) 7780 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7781} 7782 7783// Do executes the "datacatalog.projects.locations.tagTemplates.fields.create" call. 7784// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 7785// error will be non-nil. Any non-2xx status code is an error. Response 7786// headers are in either 7787// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 7788// or (if a response was returned at all) in 7789// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7790// whether the returned error was because http.StatusNotModified was 7791// returned. 7792func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 7793 gensupport.SetOptions(c.urlParams_, opts...) 7794 res, err := c.doRequest("json") 7795 if res != nil && res.StatusCode == http.StatusNotModified { 7796 if res.Body != nil { 7797 res.Body.Close() 7798 } 7799 return nil, &googleapi.Error{ 7800 Code: res.StatusCode, 7801 Header: res.Header, 7802 } 7803 } 7804 if err != nil { 7805 return nil, err 7806 } 7807 defer googleapi.CloseBody(res) 7808 if err := googleapi.CheckResponse(res); err != nil { 7809 return nil, err 7810 } 7811 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 7812 ServerResponse: googleapi.ServerResponse{ 7813 Header: res.Header, 7814 HTTPStatusCode: res.StatusCode, 7815 }, 7816 } 7817 target := &ret 7818 if err := gensupport.DecodeResponse(target, res); err != nil { 7819 return nil, err 7820 } 7821 return ret, nil 7822 // { 7823 // "description": "Creates a field in a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 7824 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields", 7825 // "httpMethod": "POST", 7826 // "id": "datacatalog.projects.locations.tagTemplates.fields.create", 7827 // "parameterOrder": [ 7828 // "parent" 7829 // ], 7830 // "parameters": { 7831 // "parent": { 7832 // "description": "Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions). Example: * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}", 7833 // "location": "path", 7834 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7835 // "required": true, 7836 // "type": "string" 7837 // }, 7838 // "tagTemplateFieldId": { 7839 // "description": "Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template.", 7840 // "location": "query", 7841 // "type": "string" 7842 // } 7843 // }, 7844 // "path": "v1beta1/{+parent}/fields", 7845 // "request": { 7846 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7847 // }, 7848 // "response": { 7849 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7850 // }, 7851 // "scopes": [ 7852 // "https://www.googleapis.com/auth/cloud-platform" 7853 // ] 7854 // } 7855 7856} 7857 7858// method id "datacatalog.projects.locations.tagTemplates.fields.delete": 7859 7860type ProjectsLocationsTagTemplatesFieldsDeleteCall struct { 7861 s *Service 7862 name string 7863 urlParams_ gensupport.URLParams 7864 ctx_ context.Context 7865 header_ http.Header 7866} 7867 7868// Delete: Deletes a field in a tag template and all uses of that field. 7869// Users should enable the Data Catalog API in the project identified by 7870// the `name` parameter (see [Data Catalog Resource Project] 7871// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 7872// for more information). 7873// 7874// - name: The name of the tag template field to delete. Example: * 7875// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 7876// e_id}/fields/{tag_template_field_id}. 7877func (r *ProjectsLocationsTagTemplatesFieldsService) Delete(name string) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7878 c := &ProjectsLocationsTagTemplatesFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7879 c.name = name 7880 return c 7881} 7882 7883// Force sets the optional parameter "force": Required. Currently, this 7884// field must always be set to `true`. This confirms the deletion of 7885// this field from any tags using this field. `force = false` will be 7886// supported in the future. 7887func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Force(force bool) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7888 c.urlParams_.Set("force", fmt.Sprint(force)) 7889 return c 7890} 7891 7892// Fields allows partial responses to be retrieved. See 7893// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7894// for more information. 7895func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7896 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7897 return c 7898} 7899 7900// Context sets the context to be used in this call's Do method. Any 7901// pending HTTP request will be aborted if the provided context is 7902// canceled. 7903func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7904 c.ctx_ = ctx 7905 return c 7906} 7907 7908// Header returns an http.Header that can be modified by the caller to 7909// add HTTP headers to the request. 7910func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Header() http.Header { 7911 if c.header_ == nil { 7912 c.header_ = make(http.Header) 7913 } 7914 return c.header_ 7915} 7916 7917func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) doRequest(alt string) (*http.Response, error) { 7918 reqHeaders := make(http.Header) 7919 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7920 for k, v := range c.header_ { 7921 reqHeaders[k] = v 7922 } 7923 reqHeaders.Set("User-Agent", c.s.userAgent()) 7924 var body io.Reader = nil 7925 c.urlParams_.Set("alt", alt) 7926 c.urlParams_.Set("prettyPrint", "false") 7927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7928 urls += "?" + c.urlParams_.Encode() 7929 req, err := http.NewRequest("DELETE", urls, body) 7930 if err != nil { 7931 return nil, err 7932 } 7933 req.Header = reqHeaders 7934 googleapi.Expand(req.URL, map[string]string{ 7935 "name": c.name, 7936 }) 7937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7938} 7939 7940// Do executes the "datacatalog.projects.locations.tagTemplates.fields.delete" call. 7941// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7942// code is an error. Response headers are in either 7943// *Empty.ServerResponse.Header or (if a response was returned at all) 7944// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7945// check whether the returned error was because http.StatusNotModified 7946// was returned. 7947func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7948 gensupport.SetOptions(c.urlParams_, opts...) 7949 res, err := c.doRequest("json") 7950 if res != nil && res.StatusCode == http.StatusNotModified { 7951 if res.Body != nil { 7952 res.Body.Close() 7953 } 7954 return nil, &googleapi.Error{ 7955 Code: res.StatusCode, 7956 Header: res.Header, 7957 } 7958 } 7959 if err != nil { 7960 return nil, err 7961 } 7962 defer googleapi.CloseBody(res) 7963 if err := googleapi.CheckResponse(res); err != nil { 7964 return nil, err 7965 } 7966 ret := &Empty{ 7967 ServerResponse: googleapi.ServerResponse{ 7968 Header: res.Header, 7969 HTTPStatusCode: res.StatusCode, 7970 }, 7971 } 7972 target := &ret 7973 if err := gensupport.DecodeResponse(target, res); err != nil { 7974 return nil, err 7975 } 7976 return ret, nil 7977 // { 7978 // "description": "Deletes a field in a tag template and all uses of that field. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 7979 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}", 7980 // "httpMethod": "DELETE", 7981 // "id": "datacatalog.projects.locations.tagTemplates.fields.delete", 7982 // "parameterOrder": [ 7983 // "name" 7984 // ], 7985 // "parameters": { 7986 // "force": { 7987 // "description": "Required. Currently, this field must always be set to `true`. This confirms the deletion of this field from any tags using this field. `force = false` will be supported in the future.", 7988 // "location": "query", 7989 // "type": "boolean" 7990 // }, 7991 // "name": { 7992 // "description": "Required. The name of the tag template field to delete. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}", 7993 // "location": "path", 7994 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 7995 // "required": true, 7996 // "type": "string" 7997 // } 7998 // }, 7999 // "path": "v1beta1/{+name}", 8000 // "response": { 8001 // "$ref": "Empty" 8002 // }, 8003 // "scopes": [ 8004 // "https://www.googleapis.com/auth/cloud-platform" 8005 // ] 8006 // } 8007 8008} 8009 8010// method id "datacatalog.projects.locations.tagTemplates.fields.patch": 8011 8012type ProjectsLocationsTagTemplatesFieldsPatchCall struct { 8013 s *Service 8014 name string 8015 googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField 8016 urlParams_ gensupport.URLParams 8017 ctx_ context.Context 8018 header_ http.Header 8019} 8020 8021// Patch: Updates a field in a tag template. This method cannot be used 8022// to update the field type. Users should enable the Data Catalog API in 8023// the project identified by the `name` parameter (see [Data Catalog 8024// Resource Project] 8025// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 8026// for more information). 8027// 8028// - name: The name of the tag template field. Example: * 8029// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 8030// e_id}/fields/{tag_template_field_id}. 8031func (r *ProjectsLocationsTagTemplatesFieldsService) Patch(name string, googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField) *ProjectsLocationsTagTemplatesFieldsPatchCall { 8032 c := &ProjectsLocationsTagTemplatesFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8033 c.name = name 8034 c.googleclouddatacatalogv1beta1tagtemplatefield = googleclouddatacatalogv1beta1tagtemplatefield 8035 return c 8036} 8037 8038// UpdateMask sets the optional parameter "updateMask": Names of fields 8039// whose values to overwrite on an individual field of a tag template. 8040// The following fields are modifiable: * `display_name` * 8041// `type.enum_type` * `is_required` If this parameter is absent or 8042// empty, all modifiable fields are overwritten. If such fields are 8043// non-required and omitted in the request body, their values are 8044// emptied with one exception: when updating an enum type, the provided 8045// values are merged with the existing values. Therefore, enum values 8046// can only be added, existing enum values cannot be deleted or renamed. 8047// Additionally, updating a template field from optional to required is 8048// *not* allowed. 8049func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTagTemplatesFieldsPatchCall { 8050 c.urlParams_.Set("updateMask", updateMask) 8051 return c 8052} 8053 8054// Fields allows partial responses to be retrieved. See 8055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8056// for more information. 8057func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsPatchCall { 8058 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8059 return c 8060} 8061 8062// Context sets the context to be used in this call's Do method. Any 8063// pending HTTP request will be aborted if the provided context is 8064// canceled. 8065func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsPatchCall { 8066 c.ctx_ = ctx 8067 return c 8068} 8069 8070// Header returns an http.Header that can be modified by the caller to 8071// add HTTP headers to the request. 8072func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Header() http.Header { 8073 if c.header_ == nil { 8074 c.header_ = make(http.Header) 8075 } 8076 return c.header_ 8077} 8078 8079func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) doRequest(alt string) (*http.Response, error) { 8080 reqHeaders := make(http.Header) 8081 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8082 for k, v := range c.header_ { 8083 reqHeaders[k] = v 8084 } 8085 reqHeaders.Set("User-Agent", c.s.userAgent()) 8086 var body io.Reader = nil 8087 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplatefield) 8088 if err != nil { 8089 return nil, err 8090 } 8091 reqHeaders.Set("Content-Type", "application/json") 8092 c.urlParams_.Set("alt", alt) 8093 c.urlParams_.Set("prettyPrint", "false") 8094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8095 urls += "?" + c.urlParams_.Encode() 8096 req, err := http.NewRequest("PATCH", urls, body) 8097 if err != nil { 8098 return nil, err 8099 } 8100 req.Header = reqHeaders 8101 googleapi.Expand(req.URL, map[string]string{ 8102 "name": c.name, 8103 }) 8104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8105} 8106 8107// Do executes the "datacatalog.projects.locations.tagTemplates.fields.patch" call. 8108// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 8109// error will be non-nil. Any non-2xx status code is an error. Response 8110// headers are in either 8111// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 8112// or (if a response was returned at all) in 8113// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8114// whether the returned error was because http.StatusNotModified was 8115// returned. 8116func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 8117 gensupport.SetOptions(c.urlParams_, opts...) 8118 res, err := c.doRequest("json") 8119 if res != nil && res.StatusCode == http.StatusNotModified { 8120 if res.Body != nil { 8121 res.Body.Close() 8122 } 8123 return nil, &googleapi.Error{ 8124 Code: res.StatusCode, 8125 Header: res.Header, 8126 } 8127 } 8128 if err != nil { 8129 return nil, err 8130 } 8131 defer googleapi.CloseBody(res) 8132 if err := googleapi.CheckResponse(res); err != nil { 8133 return nil, err 8134 } 8135 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 8136 ServerResponse: googleapi.ServerResponse{ 8137 Header: res.Header, 8138 HTTPStatusCode: res.StatusCode, 8139 }, 8140 } 8141 target := &ret 8142 if err := gensupport.DecodeResponse(target, res); err != nil { 8143 return nil, err 8144 } 8145 return ret, nil 8146 // { 8147 // "description": "Updates a field in a tag template. This method cannot be used to update the field type. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 8148 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}", 8149 // "httpMethod": "PATCH", 8150 // "id": "datacatalog.projects.locations.tagTemplates.fields.patch", 8151 // "parameterOrder": [ 8152 // "name" 8153 // ], 8154 // "parameters": { 8155 // "name": { 8156 // "description": "Required. The name of the tag template field. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}", 8157 // "location": "path", 8158 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 8159 // "required": true, 8160 // "type": "string" 8161 // }, 8162 // "updateMask": { 8163 // "description": "Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable: * `display_name` * `type.enum_type` * `is_required` If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied with one exception: when updating an enum type, the provided values are merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted or renamed. Additionally, updating a template field from optional to required is *not* allowed.", 8164 // "format": "google-fieldmask", 8165 // "location": "query", 8166 // "type": "string" 8167 // } 8168 // }, 8169 // "path": "v1beta1/{+name}", 8170 // "request": { 8171 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8172 // }, 8173 // "response": { 8174 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8175 // }, 8176 // "scopes": [ 8177 // "https://www.googleapis.com/auth/cloud-platform" 8178 // ] 8179 // } 8180 8181} 8182 8183// method id "datacatalog.projects.locations.tagTemplates.fields.rename": 8184 8185type ProjectsLocationsTagTemplatesFieldsRenameCall struct { 8186 s *Service 8187 name string 8188 googleclouddatacatalogv1beta1renametagtemplatefieldrequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest 8189 urlParams_ gensupport.URLParams 8190 ctx_ context.Context 8191 header_ http.Header 8192} 8193 8194// Rename: Renames a field in a tag template. The user should enable the 8195// Data Catalog API in the project identified by the `name` parameter 8196// (see Data Catalog Resource Project 8197// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 8198// for more information). 8199// 8200// - name: The name of the tag template. Example: * 8201// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 8202// e_id}/fields/{tag_template_field_id}. 8203func (r *ProjectsLocationsTagTemplatesFieldsService) Rename(name string, googleclouddatacatalogv1beta1renametagtemplatefieldrequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest) *ProjectsLocationsTagTemplatesFieldsRenameCall { 8204 c := &ProjectsLocationsTagTemplatesFieldsRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8205 c.name = name 8206 c.googleclouddatacatalogv1beta1renametagtemplatefieldrequest = googleclouddatacatalogv1beta1renametagtemplatefieldrequest 8207 return c 8208} 8209 8210// Fields allows partial responses to be retrieved. See 8211// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8212// for more information. 8213func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsRenameCall { 8214 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8215 return c 8216} 8217 8218// Context sets the context to be used in this call's Do method. Any 8219// pending HTTP request will be aborted if the provided context is 8220// canceled. 8221func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsRenameCall { 8222 c.ctx_ = ctx 8223 return c 8224} 8225 8226// Header returns an http.Header that can be modified by the caller to 8227// add HTTP headers to the request. 8228func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Header() http.Header { 8229 if c.header_ == nil { 8230 c.header_ = make(http.Header) 8231 } 8232 return c.header_ 8233} 8234 8235func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) doRequest(alt string) (*http.Response, error) { 8236 reqHeaders := make(http.Header) 8237 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8238 for k, v := range c.header_ { 8239 reqHeaders[k] = v 8240 } 8241 reqHeaders.Set("User-Agent", c.s.userAgent()) 8242 var body io.Reader = nil 8243 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1renametagtemplatefieldrequest) 8244 if err != nil { 8245 return nil, err 8246 } 8247 reqHeaders.Set("Content-Type", "application/json") 8248 c.urlParams_.Set("alt", alt) 8249 c.urlParams_.Set("prettyPrint", "false") 8250 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rename") 8251 urls += "?" + c.urlParams_.Encode() 8252 req, err := http.NewRequest("POST", urls, body) 8253 if err != nil { 8254 return nil, err 8255 } 8256 req.Header = reqHeaders 8257 googleapi.Expand(req.URL, map[string]string{ 8258 "name": c.name, 8259 }) 8260 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8261} 8262 8263// Do executes the "datacatalog.projects.locations.tagTemplates.fields.rename" call. 8264// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 8265// error will be non-nil. Any non-2xx status code is an error. Response 8266// headers are in either 8267// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 8268// or (if a response was returned at all) in 8269// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8270// whether the returned error was because http.StatusNotModified was 8271// returned. 8272func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 8273 gensupport.SetOptions(c.urlParams_, opts...) 8274 res, err := c.doRequest("json") 8275 if res != nil && res.StatusCode == http.StatusNotModified { 8276 if res.Body != nil { 8277 res.Body.Close() 8278 } 8279 return nil, &googleapi.Error{ 8280 Code: res.StatusCode, 8281 Header: res.Header, 8282 } 8283 } 8284 if err != nil { 8285 return nil, err 8286 } 8287 defer googleapi.CloseBody(res) 8288 if err := googleapi.CheckResponse(res); err != nil { 8289 return nil, err 8290 } 8291 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 8292 ServerResponse: googleapi.ServerResponse{ 8293 Header: res.Header, 8294 HTTPStatusCode: res.StatusCode, 8295 }, 8296 } 8297 target := &ret 8298 if err := gensupport.DecodeResponse(target, res); err != nil { 8299 return nil, err 8300 } 8301 return ret, nil 8302 // { 8303 // "description": "Renames a field in a tag template. The user should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", 8304 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}:rename", 8305 // "httpMethod": "POST", 8306 // "id": "datacatalog.projects.locations.tagTemplates.fields.rename", 8307 // "parameterOrder": [ 8308 // "name" 8309 // ], 8310 // "parameters": { 8311 // "name": { 8312 // "description": "Required. The name of the tag template. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}", 8313 // "location": "path", 8314 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 8315 // "required": true, 8316 // "type": "string" 8317 // } 8318 // }, 8319 // "path": "v1beta1/{+name}:rename", 8320 // "request": { 8321 // "$ref": "GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest" 8322 // }, 8323 // "response": { 8324 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8325 // }, 8326 // "scopes": [ 8327 // "https://www.googleapis.com/auth/cloud-platform" 8328 // ] 8329 // } 8330 8331} 8332 8333// method id "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename": 8334 8335type ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall struct { 8336 s *Service 8337 name string 8338 googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest 8339 urlParams_ gensupport.URLParams 8340 ctx_ context.Context 8341 header_ http.Header 8342} 8343 8344// Rename: Renames an enum value in a tag template. The enum values have 8345// to be unique within one enum field. Thus, an enum value cannot be 8346// renamed with a name used in any other enum value within the same enum 8347// field. 8348// 8349// - name: The name of the enum field value. Example: * 8350// projects/{project_id}/locations/{location}/tagTemplates/{tag_templat 8351// e_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_ 8352// name}. 8353func (r *ProjectsLocationsTagTemplatesFieldsEnumValuesService) Rename(name string, googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8354 c := &ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8355 c.name = name 8356 c.googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest = googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest 8357 return c 8358} 8359 8360// Fields allows partial responses to be retrieved. See 8361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8362// for more information. 8363func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8364 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8365 return c 8366} 8367 8368// Context sets the context to be used in this call's Do method. Any 8369// pending HTTP request will be aborted if the provided context is 8370// canceled. 8371func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8372 c.ctx_ = ctx 8373 return c 8374} 8375 8376// Header returns an http.Header that can be modified by the caller to 8377// add HTTP headers to the request. 8378func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Header() http.Header { 8379 if c.header_ == nil { 8380 c.header_ = make(http.Header) 8381 } 8382 return c.header_ 8383} 8384 8385func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) doRequest(alt string) (*http.Response, error) { 8386 reqHeaders := make(http.Header) 8387 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8388 for k, v := range c.header_ { 8389 reqHeaders[k] = v 8390 } 8391 reqHeaders.Set("User-Agent", c.s.userAgent()) 8392 var body io.Reader = nil 8393 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest) 8394 if err != nil { 8395 return nil, err 8396 } 8397 reqHeaders.Set("Content-Type", "application/json") 8398 c.urlParams_.Set("alt", alt) 8399 c.urlParams_.Set("prettyPrint", "false") 8400 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rename") 8401 urls += "?" + c.urlParams_.Encode() 8402 req, err := http.NewRequest("POST", urls, body) 8403 if err != nil { 8404 return nil, err 8405 } 8406 req.Header = reqHeaders 8407 googleapi.Expand(req.URL, map[string]string{ 8408 "name": c.name, 8409 }) 8410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8411} 8412 8413// Do executes the "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename" call. 8414// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 8415// error will be non-nil. Any non-2xx status code is an error. Response 8416// headers are in either 8417// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 8418// or (if a response was returned at all) in 8419// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8420// whether the returned error was because http.StatusNotModified was 8421// returned. 8422func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 8423 gensupport.SetOptions(c.urlParams_, opts...) 8424 res, err := c.doRequest("json") 8425 if res != nil && res.StatusCode == http.StatusNotModified { 8426 if res.Body != nil { 8427 res.Body.Close() 8428 } 8429 return nil, &googleapi.Error{ 8430 Code: res.StatusCode, 8431 Header: res.Header, 8432 } 8433 } 8434 if err != nil { 8435 return nil, err 8436 } 8437 defer googleapi.CloseBody(res) 8438 if err := googleapi.CheckResponse(res); err != nil { 8439 return nil, err 8440 } 8441 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 8442 ServerResponse: googleapi.ServerResponse{ 8443 Header: res.Header, 8444 HTTPStatusCode: res.StatusCode, 8445 }, 8446 } 8447 target := &ret 8448 if err := gensupport.DecodeResponse(target, res); err != nil { 8449 return nil, err 8450 } 8451 return ret, nil 8452 // { 8453 // "description": "Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field.", 8454 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}/enumValues/{enumValuesId}:rename", 8455 // "httpMethod": "POST", 8456 // "id": "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename", 8457 // "parameterOrder": [ 8458 // "name" 8459 // ], 8460 // "parameters": { 8461 // "name": { 8462 // "description": "Required. The name of the enum field value. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}", 8463 // "location": "path", 8464 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+/enumValues/[^/]+$", 8465 // "required": true, 8466 // "type": "string" 8467 // } 8468 // }, 8469 // "path": "v1beta1/{+name}:rename", 8470 // "request": { 8471 // "$ref": "GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest" 8472 // }, 8473 // "response": { 8474 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8475 // }, 8476 // "scopes": [ 8477 // "https://www.googleapis.com/auth/cloud-platform" 8478 // ] 8479 // } 8480 8481} 8482 8483// method id "datacatalog.projects.locations.taxonomies.create": 8484 8485type ProjectsLocationsTaxonomiesCreateCall struct { 8486 s *Service 8487 parent string 8488 googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy 8489 urlParams_ gensupport.URLParams 8490 ctx_ context.Context 8491 header_ http.Header 8492} 8493 8494// Create: Creates a taxonomy in the specified project. 8495// 8496// - parent: Resource name of the project that the taxonomy will belong 8497// to. 8498func (r *ProjectsLocationsTaxonomiesService) Create(parent string, googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy) *ProjectsLocationsTaxonomiesCreateCall { 8499 c := &ProjectsLocationsTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8500 c.parent = parent 8501 c.googleclouddatacatalogv1beta1taxonomy = googleclouddatacatalogv1beta1taxonomy 8502 return c 8503} 8504 8505// Fields allows partial responses to be retrieved. See 8506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8507// for more information. 8508func (c *ProjectsLocationsTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesCreateCall { 8509 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8510 return c 8511} 8512 8513// Context sets the context to be used in this call's Do method. Any 8514// pending HTTP request will be aborted if the provided context is 8515// canceled. 8516func (c *ProjectsLocationsTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesCreateCall { 8517 c.ctx_ = ctx 8518 return c 8519} 8520 8521// Header returns an http.Header that can be modified by the caller to 8522// add HTTP headers to the request. 8523func (c *ProjectsLocationsTaxonomiesCreateCall) Header() http.Header { 8524 if c.header_ == nil { 8525 c.header_ = make(http.Header) 8526 } 8527 return c.header_ 8528} 8529 8530func (c *ProjectsLocationsTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { 8531 reqHeaders := make(http.Header) 8532 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8533 for k, v := range c.header_ { 8534 reqHeaders[k] = v 8535 } 8536 reqHeaders.Set("User-Agent", c.s.userAgent()) 8537 var body io.Reader = nil 8538 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1taxonomy) 8539 if err != nil { 8540 return nil, err 8541 } 8542 reqHeaders.Set("Content-Type", "application/json") 8543 c.urlParams_.Set("alt", alt) 8544 c.urlParams_.Set("prettyPrint", "false") 8545 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies") 8546 urls += "?" + c.urlParams_.Encode() 8547 req, err := http.NewRequest("POST", urls, body) 8548 if err != nil { 8549 return nil, err 8550 } 8551 req.Header = reqHeaders 8552 googleapi.Expand(req.URL, map[string]string{ 8553 "parent": c.parent, 8554 }) 8555 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8556} 8557 8558// Do executes the "datacatalog.projects.locations.taxonomies.create" call. 8559// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 8560// be non-nil. Any non-2xx status code is an error. Response headers are 8561// in either 8562// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 8563// response was returned at all) in error.(*googleapi.Error).Header. Use 8564// googleapi.IsNotModified to check whether the returned error was 8565// because http.StatusNotModified was returned. 8566func (c *ProjectsLocationsTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 8567 gensupport.SetOptions(c.urlParams_, opts...) 8568 res, err := c.doRequest("json") 8569 if res != nil && res.StatusCode == http.StatusNotModified { 8570 if res.Body != nil { 8571 res.Body.Close() 8572 } 8573 return nil, &googleapi.Error{ 8574 Code: res.StatusCode, 8575 Header: res.Header, 8576 } 8577 } 8578 if err != nil { 8579 return nil, err 8580 } 8581 defer googleapi.CloseBody(res) 8582 if err := googleapi.CheckResponse(res); err != nil { 8583 return nil, err 8584 } 8585 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 8586 ServerResponse: googleapi.ServerResponse{ 8587 Header: res.Header, 8588 HTTPStatusCode: res.StatusCode, 8589 }, 8590 } 8591 target := &ret 8592 if err := gensupport.DecodeResponse(target, res); err != nil { 8593 return nil, err 8594 } 8595 return ret, nil 8596 // { 8597 // "description": "Creates a taxonomy in the specified project.", 8598 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies", 8599 // "httpMethod": "POST", 8600 // "id": "datacatalog.projects.locations.taxonomies.create", 8601 // "parameterOrder": [ 8602 // "parent" 8603 // ], 8604 // "parameters": { 8605 // "parent": { 8606 // "description": "Required. Resource name of the project that the taxonomy will belong to.", 8607 // "location": "path", 8608 // "pattern": "^projects/[^/]+/locations/[^/]+$", 8609 // "required": true, 8610 // "type": "string" 8611 // } 8612 // }, 8613 // "path": "v1beta1/{+parent}/taxonomies", 8614 // "request": { 8615 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 8616 // }, 8617 // "response": { 8618 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 8619 // }, 8620 // "scopes": [ 8621 // "https://www.googleapis.com/auth/cloud-platform" 8622 // ] 8623 // } 8624 8625} 8626 8627// method id "datacatalog.projects.locations.taxonomies.delete": 8628 8629type ProjectsLocationsTaxonomiesDeleteCall struct { 8630 s *Service 8631 name string 8632 urlParams_ gensupport.URLParams 8633 ctx_ context.Context 8634 header_ http.Header 8635} 8636 8637// Delete: Deletes a taxonomy. This operation will also delete all 8638// policy tags in this taxonomy along with their associated policies. 8639// 8640// - name: Resource name of the taxonomy to be deleted. All policy tags 8641// in this taxonomy will also be deleted. 8642func (r *ProjectsLocationsTaxonomiesService) Delete(name string) *ProjectsLocationsTaxonomiesDeleteCall { 8643 c := &ProjectsLocationsTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8644 c.name = name 8645 return c 8646} 8647 8648// Fields allows partial responses to be retrieved. See 8649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8650// for more information. 8651func (c *ProjectsLocationsTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesDeleteCall { 8652 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8653 return c 8654} 8655 8656// Context sets the context to be used in this call's Do method. Any 8657// pending HTTP request will be aborted if the provided context is 8658// canceled. 8659func (c *ProjectsLocationsTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesDeleteCall { 8660 c.ctx_ = ctx 8661 return c 8662} 8663 8664// Header returns an http.Header that can be modified by the caller to 8665// add HTTP headers to the request. 8666func (c *ProjectsLocationsTaxonomiesDeleteCall) Header() http.Header { 8667 if c.header_ == nil { 8668 c.header_ = make(http.Header) 8669 } 8670 return c.header_ 8671} 8672 8673func (c *ProjectsLocationsTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { 8674 reqHeaders := make(http.Header) 8675 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8676 for k, v := range c.header_ { 8677 reqHeaders[k] = v 8678 } 8679 reqHeaders.Set("User-Agent", c.s.userAgent()) 8680 var body io.Reader = nil 8681 c.urlParams_.Set("alt", alt) 8682 c.urlParams_.Set("prettyPrint", "false") 8683 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8684 urls += "?" + c.urlParams_.Encode() 8685 req, err := http.NewRequest("DELETE", urls, body) 8686 if err != nil { 8687 return nil, err 8688 } 8689 req.Header = reqHeaders 8690 googleapi.Expand(req.URL, map[string]string{ 8691 "name": c.name, 8692 }) 8693 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8694} 8695 8696// Do executes the "datacatalog.projects.locations.taxonomies.delete" call. 8697// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8698// code is an error. Response headers are in either 8699// *Empty.ServerResponse.Header or (if a response was returned at all) 8700// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8701// check whether the returned error was because http.StatusNotModified 8702// was returned. 8703func (c *ProjectsLocationsTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8704 gensupport.SetOptions(c.urlParams_, opts...) 8705 res, err := c.doRequest("json") 8706 if res != nil && res.StatusCode == http.StatusNotModified { 8707 if res.Body != nil { 8708 res.Body.Close() 8709 } 8710 return nil, &googleapi.Error{ 8711 Code: res.StatusCode, 8712 Header: res.Header, 8713 } 8714 } 8715 if err != nil { 8716 return nil, err 8717 } 8718 defer googleapi.CloseBody(res) 8719 if err := googleapi.CheckResponse(res); err != nil { 8720 return nil, err 8721 } 8722 ret := &Empty{ 8723 ServerResponse: googleapi.ServerResponse{ 8724 Header: res.Header, 8725 HTTPStatusCode: res.StatusCode, 8726 }, 8727 } 8728 target := &ret 8729 if err := gensupport.DecodeResponse(target, res); err != nil { 8730 return nil, err 8731 } 8732 return ret, nil 8733 // { 8734 // "description": "Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with their associated policies.", 8735 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 8736 // "httpMethod": "DELETE", 8737 // "id": "datacatalog.projects.locations.taxonomies.delete", 8738 // "parameterOrder": [ 8739 // "name" 8740 // ], 8741 // "parameters": { 8742 // "name": { 8743 // "description": "Required. Resource name of the taxonomy to be deleted. All policy tags in this taxonomy will also be deleted.", 8744 // "location": "path", 8745 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 8746 // "required": true, 8747 // "type": "string" 8748 // } 8749 // }, 8750 // "path": "v1beta1/{+name}", 8751 // "response": { 8752 // "$ref": "Empty" 8753 // }, 8754 // "scopes": [ 8755 // "https://www.googleapis.com/auth/cloud-platform" 8756 // ] 8757 // } 8758 8759} 8760 8761// method id "datacatalog.projects.locations.taxonomies.export": 8762 8763type ProjectsLocationsTaxonomiesExportCall struct { 8764 s *Service 8765 parent string 8766 urlParams_ gensupport.URLParams 8767 ifNoneMatch_ string 8768 ctx_ context.Context 8769 header_ http.Header 8770} 8771 8772// Export: Exports all taxonomies and their policy tags in a project. 8773// This method generates SerializedTaxonomy protos with nested policy 8774// tags that can be used as an input for future ImportTaxonomies calls. 8775// 8776// - parent: Resource name of the project that taxonomies to be exported 8777// will share. 8778func (r *ProjectsLocationsTaxonomiesService) Export(parent string) *ProjectsLocationsTaxonomiesExportCall { 8779 c := &ProjectsLocationsTaxonomiesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8780 c.parent = parent 8781 return c 8782} 8783 8784// SerializedTaxonomies sets the optional parameter 8785// "serializedTaxonomies": Export taxonomies as serialized taxonomies. 8786func (c *ProjectsLocationsTaxonomiesExportCall) SerializedTaxonomies(serializedTaxonomies bool) *ProjectsLocationsTaxonomiesExportCall { 8787 c.urlParams_.Set("serializedTaxonomies", fmt.Sprint(serializedTaxonomies)) 8788 return c 8789} 8790 8791// Taxonomies sets the optional parameter "taxonomies": Required. 8792// Resource names of the taxonomies to be exported. 8793func (c *ProjectsLocationsTaxonomiesExportCall) Taxonomies(taxonomies ...string) *ProjectsLocationsTaxonomiesExportCall { 8794 c.urlParams_.SetMulti("taxonomies", append([]string{}, taxonomies...)) 8795 return c 8796} 8797 8798// Fields allows partial responses to be retrieved. See 8799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8800// for more information. 8801func (c *ProjectsLocationsTaxonomiesExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesExportCall { 8802 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8803 return c 8804} 8805 8806// IfNoneMatch sets the optional parameter which makes the operation 8807// fail if the object's ETag matches the given value. This is useful for 8808// getting updates only after the object has changed since the last 8809// request. Use googleapi.IsNotModified to check whether the response 8810// error from Do is the result of In-None-Match. 8811func (c *ProjectsLocationsTaxonomiesExportCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesExportCall { 8812 c.ifNoneMatch_ = entityTag 8813 return c 8814} 8815 8816// Context sets the context to be used in this call's Do method. Any 8817// pending HTTP request will be aborted if the provided context is 8818// canceled. 8819func (c *ProjectsLocationsTaxonomiesExportCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesExportCall { 8820 c.ctx_ = ctx 8821 return c 8822} 8823 8824// Header returns an http.Header that can be modified by the caller to 8825// add HTTP headers to the request. 8826func (c *ProjectsLocationsTaxonomiesExportCall) Header() http.Header { 8827 if c.header_ == nil { 8828 c.header_ = make(http.Header) 8829 } 8830 return c.header_ 8831} 8832 8833func (c *ProjectsLocationsTaxonomiesExportCall) doRequest(alt string) (*http.Response, error) { 8834 reqHeaders := make(http.Header) 8835 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8836 for k, v := range c.header_ { 8837 reqHeaders[k] = v 8838 } 8839 reqHeaders.Set("User-Agent", c.s.userAgent()) 8840 if c.ifNoneMatch_ != "" { 8841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8842 } 8843 var body io.Reader = nil 8844 c.urlParams_.Set("alt", alt) 8845 c.urlParams_.Set("prettyPrint", "false") 8846 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies:export") 8847 urls += "?" + c.urlParams_.Encode() 8848 req, err := http.NewRequest("GET", urls, body) 8849 if err != nil { 8850 return nil, err 8851 } 8852 req.Header = reqHeaders 8853 googleapi.Expand(req.URL, map[string]string{ 8854 "parent": c.parent, 8855 }) 8856 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8857} 8858 8859// Do executes the "datacatalog.projects.locations.taxonomies.export" call. 8860// Exactly one of *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse 8861// or error will be non-nil. Any non-2xx status code is an error. 8862// Response headers are in either 8863// *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse.ServerResponse. 8864// Header or (if a response was returned at all) in 8865// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8866// whether the returned error was because http.StatusNotModified was 8867// returned. 8868func (c *ProjectsLocationsTaxonomiesExportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse, error) { 8869 gensupport.SetOptions(c.urlParams_, opts...) 8870 res, err := c.doRequest("json") 8871 if res != nil && res.StatusCode == http.StatusNotModified { 8872 if res.Body != nil { 8873 res.Body.Close() 8874 } 8875 return nil, &googleapi.Error{ 8876 Code: res.StatusCode, 8877 Header: res.Header, 8878 } 8879 } 8880 if err != nil { 8881 return nil, err 8882 } 8883 defer googleapi.CloseBody(res) 8884 if err := googleapi.CheckResponse(res); err != nil { 8885 return nil, err 8886 } 8887 ret := &GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse{ 8888 ServerResponse: googleapi.ServerResponse{ 8889 Header: res.Header, 8890 HTTPStatusCode: res.StatusCode, 8891 }, 8892 } 8893 target := &ret 8894 if err := gensupport.DecodeResponse(target, res); err != nil { 8895 return nil, err 8896 } 8897 return ret, nil 8898 // { 8899 // "description": "Exports all taxonomies and their policy tags in a project. This method generates SerializedTaxonomy protos with nested policy tags that can be used as an input for future ImportTaxonomies calls.", 8900 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies:export", 8901 // "httpMethod": "GET", 8902 // "id": "datacatalog.projects.locations.taxonomies.export", 8903 // "parameterOrder": [ 8904 // "parent" 8905 // ], 8906 // "parameters": { 8907 // "parent": { 8908 // "description": "Required. Resource name of the project that taxonomies to be exported will share.", 8909 // "location": "path", 8910 // "pattern": "^projects/[^/]+/locations/[^/]+$", 8911 // "required": true, 8912 // "type": "string" 8913 // }, 8914 // "serializedTaxonomies": { 8915 // "description": "Export taxonomies as serialized taxonomies.", 8916 // "location": "query", 8917 // "type": "boolean" 8918 // }, 8919 // "taxonomies": { 8920 // "description": "Required. Resource names of the taxonomies to be exported.", 8921 // "location": "query", 8922 // "repeated": true, 8923 // "type": "string" 8924 // } 8925 // }, 8926 // "path": "v1beta1/{+parent}/taxonomies:export", 8927 // "response": { 8928 // "$ref": "GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse" 8929 // }, 8930 // "scopes": [ 8931 // "https://www.googleapis.com/auth/cloud-platform" 8932 // ] 8933 // } 8934 8935} 8936 8937// method id "datacatalog.projects.locations.taxonomies.get": 8938 8939type ProjectsLocationsTaxonomiesGetCall struct { 8940 s *Service 8941 name string 8942 urlParams_ gensupport.URLParams 8943 ifNoneMatch_ string 8944 ctx_ context.Context 8945 header_ http.Header 8946} 8947 8948// Get: Gets a taxonomy. 8949// 8950// - name: Resource name of the requested taxonomy. 8951func (r *ProjectsLocationsTaxonomiesService) Get(name string) *ProjectsLocationsTaxonomiesGetCall { 8952 c := &ProjectsLocationsTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8953 c.name = name 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 *ProjectsLocationsTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesGetCall { 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 *ProjectsLocationsTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesGetCall { 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 *ProjectsLocationsTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesGetCall { 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 *ProjectsLocationsTaxonomiesGetCall) Header() http.Header { 8986 if c.header_ == nil { 8987 c.header_ = make(http.Header) 8988 } 8989 return c.header_ 8990} 8991 8992func (c *ProjectsLocationsTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { 8993 reqHeaders := make(http.Header) 8994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 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, "v1beta1/{+name}") 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 "name": c.name, 9014 }) 9015 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9016} 9017 9018// Do executes the "datacatalog.projects.locations.taxonomies.get" call. 9019// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 9020// be non-nil. Any non-2xx status code is an error. Response headers are 9021// in either 9022// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 9023// response was returned at all) in error.(*googleapi.Error).Header. Use 9024// googleapi.IsNotModified to check whether the returned error was 9025// because http.StatusNotModified was returned. 9026func (c *ProjectsLocationsTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 9027 gensupport.SetOptions(c.urlParams_, opts...) 9028 res, err := c.doRequest("json") 9029 if res != nil && res.StatusCode == http.StatusNotModified { 9030 if res.Body != nil { 9031 res.Body.Close() 9032 } 9033 return nil, &googleapi.Error{ 9034 Code: res.StatusCode, 9035 Header: res.Header, 9036 } 9037 } 9038 if err != nil { 9039 return nil, err 9040 } 9041 defer googleapi.CloseBody(res) 9042 if err := googleapi.CheckResponse(res); err != nil { 9043 return nil, err 9044 } 9045 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 9046 ServerResponse: googleapi.ServerResponse{ 9047 Header: res.Header, 9048 HTTPStatusCode: res.StatusCode, 9049 }, 9050 } 9051 target := &ret 9052 if err := gensupport.DecodeResponse(target, res); err != nil { 9053 return nil, err 9054 } 9055 return ret, nil 9056 // { 9057 // "description": "Gets a taxonomy.", 9058 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 9059 // "httpMethod": "GET", 9060 // "id": "datacatalog.projects.locations.taxonomies.get", 9061 // "parameterOrder": [ 9062 // "name" 9063 // ], 9064 // "parameters": { 9065 // "name": { 9066 // "description": "Required. Resource name of the requested taxonomy.", 9067 // "location": "path", 9068 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9069 // "required": true, 9070 // "type": "string" 9071 // } 9072 // }, 9073 // "path": "v1beta1/{+name}", 9074 // "response": { 9075 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 9076 // }, 9077 // "scopes": [ 9078 // "https://www.googleapis.com/auth/cloud-platform" 9079 // ] 9080 // } 9081 9082} 9083 9084// method id "datacatalog.projects.locations.taxonomies.getIamPolicy": 9085 9086type ProjectsLocationsTaxonomiesGetIamPolicyCall struct { 9087 s *Service 9088 resource string 9089 getiampolicyrequest *GetIamPolicyRequest 9090 urlParams_ gensupport.URLParams 9091 ctx_ context.Context 9092 header_ http.Header 9093} 9094 9095// GetIamPolicy: Gets the IAM policy for a taxonomy or a policy tag. 9096// 9097// - resource: REQUIRED: The resource for which the policy is being 9098// requested. See the operation documentation for the appropriate 9099// value for this field. 9100func (r *ProjectsLocationsTaxonomiesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 9101 c := &ProjectsLocationsTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9102 c.resource = resource 9103 c.getiampolicyrequest = getiampolicyrequest 9104 return c 9105} 9106 9107// Fields allows partial responses to be retrieved. See 9108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9109// for more information. 9110func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 9111 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9112 return c 9113} 9114 9115// Context sets the context to be used in this call's Do method. Any 9116// pending HTTP request will be aborted if the provided context is 9117// canceled. 9118func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 9119 c.ctx_ = ctx 9120 return c 9121} 9122 9123// Header returns an http.Header that can be modified by the caller to 9124// add HTTP headers to the request. 9125func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Header() http.Header { 9126 if c.header_ == nil { 9127 c.header_ = make(http.Header) 9128 } 9129 return c.header_ 9130} 9131 9132func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9133 reqHeaders := make(http.Header) 9134 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9135 for k, v := range c.header_ { 9136 reqHeaders[k] = v 9137 } 9138 reqHeaders.Set("User-Agent", c.s.userAgent()) 9139 var body io.Reader = nil 9140 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 9141 if err != nil { 9142 return nil, err 9143 } 9144 reqHeaders.Set("Content-Type", "application/json") 9145 c.urlParams_.Set("alt", alt) 9146 c.urlParams_.Set("prettyPrint", "false") 9147 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 9148 urls += "?" + c.urlParams_.Encode() 9149 req, err := http.NewRequest("POST", urls, body) 9150 if err != nil { 9151 return nil, err 9152 } 9153 req.Header = reqHeaders 9154 googleapi.Expand(req.URL, map[string]string{ 9155 "resource": c.resource, 9156 }) 9157 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9158} 9159 9160// Do executes the "datacatalog.projects.locations.taxonomies.getIamPolicy" call. 9161// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9162// code is an error. Response headers are in either 9163// *Policy.ServerResponse.Header or (if a response was returned at all) 9164// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9165// check whether the returned error was because http.StatusNotModified 9166// was returned. 9167func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9168 gensupport.SetOptions(c.urlParams_, opts...) 9169 res, err := c.doRequest("json") 9170 if res != nil && res.StatusCode == http.StatusNotModified { 9171 if res.Body != nil { 9172 res.Body.Close() 9173 } 9174 return nil, &googleapi.Error{ 9175 Code: res.StatusCode, 9176 Header: res.Header, 9177 } 9178 } 9179 if err != nil { 9180 return nil, err 9181 } 9182 defer googleapi.CloseBody(res) 9183 if err := googleapi.CheckResponse(res); err != nil { 9184 return nil, err 9185 } 9186 ret := &Policy{ 9187 ServerResponse: googleapi.ServerResponse{ 9188 Header: res.Header, 9189 HTTPStatusCode: res.StatusCode, 9190 }, 9191 } 9192 target := &ret 9193 if err := gensupport.DecodeResponse(target, res); err != nil { 9194 return nil, err 9195 } 9196 return ret, nil 9197 // { 9198 // "description": "Gets the IAM policy for a taxonomy or a policy tag.", 9199 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:getIamPolicy", 9200 // "httpMethod": "POST", 9201 // "id": "datacatalog.projects.locations.taxonomies.getIamPolicy", 9202 // "parameterOrder": [ 9203 // "resource" 9204 // ], 9205 // "parameters": { 9206 // "resource": { 9207 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 9208 // "location": "path", 9209 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9210 // "required": true, 9211 // "type": "string" 9212 // } 9213 // }, 9214 // "path": "v1beta1/{+resource}:getIamPolicy", 9215 // "request": { 9216 // "$ref": "GetIamPolicyRequest" 9217 // }, 9218 // "response": { 9219 // "$ref": "Policy" 9220 // }, 9221 // "scopes": [ 9222 // "https://www.googleapis.com/auth/cloud-platform" 9223 // ] 9224 // } 9225 9226} 9227 9228// method id "datacatalog.projects.locations.taxonomies.import": 9229 9230type ProjectsLocationsTaxonomiesImportCall struct { 9231 s *Service 9232 parent string 9233 googleclouddatacatalogv1beta1importtaxonomiesrequest *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest 9234 urlParams_ gensupport.URLParams 9235 ctx_ context.Context 9236 header_ http.Header 9237} 9238 9239// Import: Imports all taxonomies and their policy tags to a project as 9240// new taxonomies. This method provides a bulk taxonomy / policy tag 9241// creation using nested proto structure. 9242// 9243// - parent: Resource name of project that the imported taxonomies will 9244// belong to. 9245func (r *ProjectsLocationsTaxonomiesService) Import(parent string, googleclouddatacatalogv1beta1importtaxonomiesrequest *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest) *ProjectsLocationsTaxonomiesImportCall { 9246 c := &ProjectsLocationsTaxonomiesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9247 c.parent = parent 9248 c.googleclouddatacatalogv1beta1importtaxonomiesrequest = googleclouddatacatalogv1beta1importtaxonomiesrequest 9249 return c 9250} 9251 9252// Fields allows partial responses to be retrieved. See 9253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9254// for more information. 9255func (c *ProjectsLocationsTaxonomiesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesImportCall { 9256 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9257 return c 9258} 9259 9260// Context sets the context to be used in this call's Do method. Any 9261// pending HTTP request will be aborted if the provided context is 9262// canceled. 9263func (c *ProjectsLocationsTaxonomiesImportCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesImportCall { 9264 c.ctx_ = ctx 9265 return c 9266} 9267 9268// Header returns an http.Header that can be modified by the caller to 9269// add HTTP headers to the request. 9270func (c *ProjectsLocationsTaxonomiesImportCall) Header() http.Header { 9271 if c.header_ == nil { 9272 c.header_ = make(http.Header) 9273 } 9274 return c.header_ 9275} 9276 9277func (c *ProjectsLocationsTaxonomiesImportCall) doRequest(alt string) (*http.Response, error) { 9278 reqHeaders := make(http.Header) 9279 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9280 for k, v := range c.header_ { 9281 reqHeaders[k] = v 9282 } 9283 reqHeaders.Set("User-Agent", c.s.userAgent()) 9284 var body io.Reader = nil 9285 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1importtaxonomiesrequest) 9286 if err != nil { 9287 return nil, err 9288 } 9289 reqHeaders.Set("Content-Type", "application/json") 9290 c.urlParams_.Set("alt", alt) 9291 c.urlParams_.Set("prettyPrint", "false") 9292 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies:import") 9293 urls += "?" + c.urlParams_.Encode() 9294 req, err := http.NewRequest("POST", urls, body) 9295 if err != nil { 9296 return nil, err 9297 } 9298 req.Header = reqHeaders 9299 googleapi.Expand(req.URL, map[string]string{ 9300 "parent": c.parent, 9301 }) 9302 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9303} 9304 9305// Do executes the "datacatalog.projects.locations.taxonomies.import" call. 9306// Exactly one of *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse 9307// or error will be non-nil. Any non-2xx status code is an error. 9308// Response headers are in either 9309// *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse.ServerResponse. 9310// Header or (if a response was returned at all) in 9311// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9312// whether the returned error was because http.StatusNotModified was 9313// returned. 9314func (c *ProjectsLocationsTaxonomiesImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse, error) { 9315 gensupport.SetOptions(c.urlParams_, opts...) 9316 res, err := c.doRequest("json") 9317 if res != nil && res.StatusCode == http.StatusNotModified { 9318 if res.Body != nil { 9319 res.Body.Close() 9320 } 9321 return nil, &googleapi.Error{ 9322 Code: res.StatusCode, 9323 Header: res.Header, 9324 } 9325 } 9326 if err != nil { 9327 return nil, err 9328 } 9329 defer googleapi.CloseBody(res) 9330 if err := googleapi.CheckResponse(res); err != nil { 9331 return nil, err 9332 } 9333 ret := &GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse{ 9334 ServerResponse: googleapi.ServerResponse{ 9335 Header: res.Header, 9336 HTTPStatusCode: res.StatusCode, 9337 }, 9338 } 9339 target := &ret 9340 if err := gensupport.DecodeResponse(target, res); err != nil { 9341 return nil, err 9342 } 9343 return ret, nil 9344 // { 9345 // "description": "Imports all taxonomies and their policy tags to a project as new taxonomies. This method provides a bulk taxonomy / policy tag creation using nested proto structure.", 9346 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies:import", 9347 // "httpMethod": "POST", 9348 // "id": "datacatalog.projects.locations.taxonomies.import", 9349 // "parameterOrder": [ 9350 // "parent" 9351 // ], 9352 // "parameters": { 9353 // "parent": { 9354 // "description": "Required. Resource name of project that the imported taxonomies will belong to.", 9355 // "location": "path", 9356 // "pattern": "^projects/[^/]+/locations/[^/]+$", 9357 // "required": true, 9358 // "type": "string" 9359 // } 9360 // }, 9361 // "path": "v1beta1/{+parent}/taxonomies:import", 9362 // "request": { 9363 // "$ref": "GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest" 9364 // }, 9365 // "response": { 9366 // "$ref": "GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse" 9367 // }, 9368 // "scopes": [ 9369 // "https://www.googleapis.com/auth/cloud-platform" 9370 // ] 9371 // } 9372 9373} 9374 9375// method id "datacatalog.projects.locations.taxonomies.list": 9376 9377type ProjectsLocationsTaxonomiesListCall struct { 9378 s *Service 9379 parent string 9380 urlParams_ gensupport.URLParams 9381 ifNoneMatch_ string 9382 ctx_ context.Context 9383 header_ http.Header 9384} 9385 9386// List: Lists all taxonomies in a project in a particular location that 9387// the caller has permission to view. 9388// 9389// - parent: Resource name of the project to list the taxonomies of. 9390func (r *ProjectsLocationsTaxonomiesService) List(parent string) *ProjectsLocationsTaxonomiesListCall { 9391 c := &ProjectsLocationsTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9392 c.parent = parent 9393 return c 9394} 9395 9396// PageSize sets the optional parameter "pageSize": The maximum number 9397// of items to return. Must be a value between 1 and 1000. If not set, 9398// defaults to 50. 9399func (c *ProjectsLocationsTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsTaxonomiesListCall { 9400 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9401 return c 9402} 9403 9404// PageToken sets the optional parameter "pageToken": The 9405// next_page_token value returned from a previous list request, if any. 9406// If not set, defaults to an empty string. 9407func (c *ProjectsLocationsTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsTaxonomiesListCall { 9408 c.urlParams_.Set("pageToken", pageToken) 9409 return c 9410} 9411 9412// Fields allows partial responses to be retrieved. See 9413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9414// for more information. 9415func (c *ProjectsLocationsTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesListCall { 9416 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9417 return c 9418} 9419 9420// IfNoneMatch sets the optional parameter which makes the operation 9421// fail if the object's ETag matches the given value. This is useful for 9422// getting updates only after the object has changed since the last 9423// request. Use googleapi.IsNotModified to check whether the response 9424// error from Do is the result of In-None-Match. 9425func (c *ProjectsLocationsTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesListCall { 9426 c.ifNoneMatch_ = entityTag 9427 return c 9428} 9429 9430// Context sets the context to be used in this call's Do method. Any 9431// pending HTTP request will be aborted if the provided context is 9432// canceled. 9433func (c *ProjectsLocationsTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesListCall { 9434 c.ctx_ = ctx 9435 return c 9436} 9437 9438// Header returns an http.Header that can be modified by the caller to 9439// add HTTP headers to the request. 9440func (c *ProjectsLocationsTaxonomiesListCall) Header() http.Header { 9441 if c.header_ == nil { 9442 c.header_ = make(http.Header) 9443 } 9444 return c.header_ 9445} 9446 9447func (c *ProjectsLocationsTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { 9448 reqHeaders := make(http.Header) 9449 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9450 for k, v := range c.header_ { 9451 reqHeaders[k] = v 9452 } 9453 reqHeaders.Set("User-Agent", c.s.userAgent()) 9454 if c.ifNoneMatch_ != "" { 9455 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9456 } 9457 var body io.Reader = nil 9458 c.urlParams_.Set("alt", alt) 9459 c.urlParams_.Set("prettyPrint", "false") 9460 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies") 9461 urls += "?" + c.urlParams_.Encode() 9462 req, err := http.NewRequest("GET", urls, body) 9463 if err != nil { 9464 return nil, err 9465 } 9466 req.Header = reqHeaders 9467 googleapi.Expand(req.URL, map[string]string{ 9468 "parent": c.parent, 9469 }) 9470 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9471} 9472 9473// Do executes the "datacatalog.projects.locations.taxonomies.list" call. 9474// Exactly one of *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse 9475// or error will be non-nil. Any non-2xx status code is an error. 9476// Response headers are in either 9477// *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse.ServerResponse.He 9478// ader or (if a response was returned at all) in 9479// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9480// whether the returned error was because http.StatusNotModified was 9481// returned. 9482func (c *ProjectsLocationsTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse, error) { 9483 gensupport.SetOptions(c.urlParams_, opts...) 9484 res, err := c.doRequest("json") 9485 if res != nil && res.StatusCode == http.StatusNotModified { 9486 if res.Body != nil { 9487 res.Body.Close() 9488 } 9489 return nil, &googleapi.Error{ 9490 Code: res.StatusCode, 9491 Header: res.Header, 9492 } 9493 } 9494 if err != nil { 9495 return nil, err 9496 } 9497 defer googleapi.CloseBody(res) 9498 if err := googleapi.CheckResponse(res); err != nil { 9499 return nil, err 9500 } 9501 ret := &GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse{ 9502 ServerResponse: googleapi.ServerResponse{ 9503 Header: res.Header, 9504 HTTPStatusCode: res.StatusCode, 9505 }, 9506 } 9507 target := &ret 9508 if err := gensupport.DecodeResponse(target, res); err != nil { 9509 return nil, err 9510 } 9511 return ret, nil 9512 // { 9513 // "description": "Lists all taxonomies in a project in a particular location that the caller has permission to view.", 9514 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies", 9515 // "httpMethod": "GET", 9516 // "id": "datacatalog.projects.locations.taxonomies.list", 9517 // "parameterOrder": [ 9518 // "parent" 9519 // ], 9520 // "parameters": { 9521 // "pageSize": { 9522 // "description": "The maximum number of items to return. Must be a value between 1 and 1000. If not set, defaults to 50.", 9523 // "format": "int32", 9524 // "location": "query", 9525 // "type": "integer" 9526 // }, 9527 // "pageToken": { 9528 // "description": "The next_page_token value returned from a previous list request, if any. If not set, defaults to an empty string.", 9529 // "location": "query", 9530 // "type": "string" 9531 // }, 9532 // "parent": { 9533 // "description": "Required. Resource name of the project to list the taxonomies of.", 9534 // "location": "path", 9535 // "pattern": "^projects/[^/]+/locations/[^/]+$", 9536 // "required": true, 9537 // "type": "string" 9538 // } 9539 // }, 9540 // "path": "v1beta1/{+parent}/taxonomies", 9541 // "response": { 9542 // "$ref": "GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse" 9543 // }, 9544 // "scopes": [ 9545 // "https://www.googleapis.com/auth/cloud-platform" 9546 // ] 9547 // } 9548 9549} 9550 9551// Pages invokes f for each page of results. 9552// A non-nil error returned from f will halt the iteration. 9553// The provided context supersedes any context provided to the Context method. 9554func (c *ProjectsLocationsTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse) error) error { 9555 c.ctx_ = ctx 9556 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9557 for { 9558 x, err := c.Do() 9559 if err != nil { 9560 return err 9561 } 9562 if err := f(x); err != nil { 9563 return err 9564 } 9565 if x.NextPageToken == "" { 9566 return nil 9567 } 9568 c.PageToken(x.NextPageToken) 9569 } 9570} 9571 9572// method id "datacatalog.projects.locations.taxonomies.patch": 9573 9574type ProjectsLocationsTaxonomiesPatchCall struct { 9575 s *Service 9576 name string 9577 googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy 9578 urlParams_ gensupport.URLParams 9579 ctx_ context.Context 9580 header_ http.Header 9581} 9582 9583// Patch: Updates a taxonomy. 9584// 9585// - name: Output only. Resource name of this taxonomy, whose format is: 9586// "projects/{project_number}/locations/{location_id}/taxonomies/{id}". 9587func (r *ProjectsLocationsTaxonomiesService) Patch(name string, googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy) *ProjectsLocationsTaxonomiesPatchCall { 9588 c := &ProjectsLocationsTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9589 c.name = name 9590 c.googleclouddatacatalogv1beta1taxonomy = googleclouddatacatalogv1beta1taxonomy 9591 return c 9592} 9593 9594// UpdateMask sets the optional parameter "updateMask": The update mask 9595// applies to the resource. For the `FieldMask` definition, see 9596// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 9597// If not set, defaults to all of the fields that are allowed to update. 9598func (c *ProjectsLocationsTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTaxonomiesPatchCall { 9599 c.urlParams_.Set("updateMask", updateMask) 9600 return c 9601} 9602 9603// Fields allows partial responses to be retrieved. See 9604// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9605// for more information. 9606func (c *ProjectsLocationsTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPatchCall { 9607 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9608 return c 9609} 9610 9611// Context sets the context to be used in this call's Do method. Any 9612// pending HTTP request will be aborted if the provided context is 9613// canceled. 9614func (c *ProjectsLocationsTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPatchCall { 9615 c.ctx_ = ctx 9616 return c 9617} 9618 9619// Header returns an http.Header that can be modified by the caller to 9620// add HTTP headers to the request. 9621func (c *ProjectsLocationsTaxonomiesPatchCall) Header() http.Header { 9622 if c.header_ == nil { 9623 c.header_ = make(http.Header) 9624 } 9625 return c.header_ 9626} 9627 9628func (c *ProjectsLocationsTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { 9629 reqHeaders := make(http.Header) 9630 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9631 for k, v := range c.header_ { 9632 reqHeaders[k] = v 9633 } 9634 reqHeaders.Set("User-Agent", c.s.userAgent()) 9635 var body io.Reader = nil 9636 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1taxonomy) 9637 if err != nil { 9638 return nil, err 9639 } 9640 reqHeaders.Set("Content-Type", "application/json") 9641 c.urlParams_.Set("alt", alt) 9642 c.urlParams_.Set("prettyPrint", "false") 9643 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9644 urls += "?" + c.urlParams_.Encode() 9645 req, err := http.NewRequest("PATCH", urls, body) 9646 if err != nil { 9647 return nil, err 9648 } 9649 req.Header = reqHeaders 9650 googleapi.Expand(req.URL, map[string]string{ 9651 "name": c.name, 9652 }) 9653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9654} 9655 9656// Do executes the "datacatalog.projects.locations.taxonomies.patch" call. 9657// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 9658// be non-nil. Any non-2xx status code is an error. Response headers are 9659// in either 9660// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 9661// response was returned at all) in error.(*googleapi.Error).Header. Use 9662// googleapi.IsNotModified to check whether the returned error was 9663// because http.StatusNotModified was returned. 9664func (c *ProjectsLocationsTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 9665 gensupport.SetOptions(c.urlParams_, opts...) 9666 res, err := c.doRequest("json") 9667 if res != nil && res.StatusCode == http.StatusNotModified { 9668 if res.Body != nil { 9669 res.Body.Close() 9670 } 9671 return nil, &googleapi.Error{ 9672 Code: res.StatusCode, 9673 Header: res.Header, 9674 } 9675 } 9676 if err != nil { 9677 return nil, err 9678 } 9679 defer googleapi.CloseBody(res) 9680 if err := googleapi.CheckResponse(res); err != nil { 9681 return nil, err 9682 } 9683 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 9684 ServerResponse: googleapi.ServerResponse{ 9685 Header: res.Header, 9686 HTTPStatusCode: res.StatusCode, 9687 }, 9688 } 9689 target := &ret 9690 if err := gensupport.DecodeResponse(target, res); err != nil { 9691 return nil, err 9692 } 9693 return ret, nil 9694 // { 9695 // "description": "Updates a taxonomy.", 9696 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 9697 // "httpMethod": "PATCH", 9698 // "id": "datacatalog.projects.locations.taxonomies.patch", 9699 // "parameterOrder": [ 9700 // "name" 9701 // ], 9702 // "parameters": { 9703 // "name": { 9704 // "description": "Output only. Resource name of this taxonomy, whose format is: \"projects/{project_number}/locations/{location_id}/taxonomies/{id}\".", 9705 // "location": "path", 9706 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9707 // "required": true, 9708 // "type": "string" 9709 // }, 9710 // "updateMask": { 9711 // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to update.", 9712 // "format": "google-fieldmask", 9713 // "location": "query", 9714 // "type": "string" 9715 // } 9716 // }, 9717 // "path": "v1beta1/{+name}", 9718 // "request": { 9719 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 9720 // }, 9721 // "response": { 9722 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 9723 // }, 9724 // "scopes": [ 9725 // "https://www.googleapis.com/auth/cloud-platform" 9726 // ] 9727 // } 9728 9729} 9730 9731// method id "datacatalog.projects.locations.taxonomies.setIamPolicy": 9732 9733type ProjectsLocationsTaxonomiesSetIamPolicyCall struct { 9734 s *Service 9735 resource string 9736 setiampolicyrequest *SetIamPolicyRequest 9737 urlParams_ gensupport.URLParams 9738 ctx_ context.Context 9739 header_ http.Header 9740} 9741 9742// SetIamPolicy: Sets the IAM policy for a taxonomy or a policy tag. 9743// 9744// - resource: REQUIRED: The resource for which the policy is being 9745// specified. See the operation documentation for the appropriate 9746// value for this field. 9747func (r *ProjectsLocationsTaxonomiesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9748 c := &ProjectsLocationsTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9749 c.resource = resource 9750 c.setiampolicyrequest = setiampolicyrequest 9751 return c 9752} 9753 9754// Fields allows partial responses to be retrieved. See 9755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9756// for more information. 9757func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9759 return c 9760} 9761 9762// Context sets the context to be used in this call's Do method. Any 9763// pending HTTP request will be aborted if the provided context is 9764// canceled. 9765func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9766 c.ctx_ = ctx 9767 return c 9768} 9769 9770// Header returns an http.Header that can be modified by the caller to 9771// add HTTP headers to the request. 9772func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Header() http.Header { 9773 if c.header_ == nil { 9774 c.header_ = make(http.Header) 9775 } 9776 return c.header_ 9777} 9778 9779func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9780 reqHeaders := make(http.Header) 9781 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9782 for k, v := range c.header_ { 9783 reqHeaders[k] = v 9784 } 9785 reqHeaders.Set("User-Agent", c.s.userAgent()) 9786 var body io.Reader = nil 9787 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9788 if err != nil { 9789 return nil, err 9790 } 9791 reqHeaders.Set("Content-Type", "application/json") 9792 c.urlParams_.Set("alt", alt) 9793 c.urlParams_.Set("prettyPrint", "false") 9794 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 9795 urls += "?" + c.urlParams_.Encode() 9796 req, err := http.NewRequest("POST", urls, body) 9797 if err != nil { 9798 return nil, err 9799 } 9800 req.Header = reqHeaders 9801 googleapi.Expand(req.URL, map[string]string{ 9802 "resource": c.resource, 9803 }) 9804 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9805} 9806 9807// Do executes the "datacatalog.projects.locations.taxonomies.setIamPolicy" call. 9808// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9809// code is an error. Response headers are in either 9810// *Policy.ServerResponse.Header or (if a response was returned at all) 9811// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9812// check whether the returned error was because http.StatusNotModified 9813// was returned. 9814func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9815 gensupport.SetOptions(c.urlParams_, opts...) 9816 res, err := c.doRequest("json") 9817 if res != nil && res.StatusCode == http.StatusNotModified { 9818 if res.Body != nil { 9819 res.Body.Close() 9820 } 9821 return nil, &googleapi.Error{ 9822 Code: res.StatusCode, 9823 Header: res.Header, 9824 } 9825 } 9826 if err != nil { 9827 return nil, err 9828 } 9829 defer googleapi.CloseBody(res) 9830 if err := googleapi.CheckResponse(res); err != nil { 9831 return nil, err 9832 } 9833 ret := &Policy{ 9834 ServerResponse: googleapi.ServerResponse{ 9835 Header: res.Header, 9836 HTTPStatusCode: res.StatusCode, 9837 }, 9838 } 9839 target := &ret 9840 if err := gensupport.DecodeResponse(target, res); err != nil { 9841 return nil, err 9842 } 9843 return ret, nil 9844 // { 9845 // "description": "Sets the IAM policy for a taxonomy or a policy tag.", 9846 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:setIamPolicy", 9847 // "httpMethod": "POST", 9848 // "id": "datacatalog.projects.locations.taxonomies.setIamPolicy", 9849 // "parameterOrder": [ 9850 // "resource" 9851 // ], 9852 // "parameters": { 9853 // "resource": { 9854 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 9855 // "location": "path", 9856 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9857 // "required": true, 9858 // "type": "string" 9859 // } 9860 // }, 9861 // "path": "v1beta1/{+resource}:setIamPolicy", 9862 // "request": { 9863 // "$ref": "SetIamPolicyRequest" 9864 // }, 9865 // "response": { 9866 // "$ref": "Policy" 9867 // }, 9868 // "scopes": [ 9869 // "https://www.googleapis.com/auth/cloud-platform" 9870 // ] 9871 // } 9872 9873} 9874 9875// method id "datacatalog.projects.locations.taxonomies.testIamPermissions": 9876 9877type ProjectsLocationsTaxonomiesTestIamPermissionsCall struct { 9878 s *Service 9879 resource string 9880 testiampermissionsrequest *TestIamPermissionsRequest 9881 urlParams_ gensupport.URLParams 9882 ctx_ context.Context 9883 header_ http.Header 9884} 9885 9886// TestIamPermissions: Returns the permissions that a caller has on the 9887// specified taxonomy or policy tag. 9888// 9889// - resource: REQUIRED: The resource for which the policy detail is 9890// being requested. See the operation documentation for the 9891// appropriate value for this field. 9892func (r *ProjectsLocationsTaxonomiesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9893 c := &ProjectsLocationsTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9894 c.resource = resource 9895 c.testiampermissionsrequest = testiampermissionsrequest 9896 return c 9897} 9898 9899// Fields allows partial responses to be retrieved. See 9900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9901// for more information. 9902func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9903 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9904 return c 9905} 9906 9907// Context sets the context to be used in this call's Do method. Any 9908// pending HTTP request will be aborted if the provided context is 9909// canceled. 9910func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9911 c.ctx_ = ctx 9912 return c 9913} 9914 9915// Header returns an http.Header that can be modified by the caller to 9916// add HTTP headers to the request. 9917func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Header() http.Header { 9918 if c.header_ == nil { 9919 c.header_ = make(http.Header) 9920 } 9921 return c.header_ 9922} 9923 9924func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9925 reqHeaders := make(http.Header) 9926 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9927 for k, v := range c.header_ { 9928 reqHeaders[k] = v 9929 } 9930 reqHeaders.Set("User-Agent", c.s.userAgent()) 9931 var body io.Reader = nil 9932 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9933 if err != nil { 9934 return nil, err 9935 } 9936 reqHeaders.Set("Content-Type", "application/json") 9937 c.urlParams_.Set("alt", alt) 9938 c.urlParams_.Set("prettyPrint", "false") 9939 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 9940 urls += "?" + c.urlParams_.Encode() 9941 req, err := http.NewRequest("POST", urls, body) 9942 if err != nil { 9943 return nil, err 9944 } 9945 req.Header = reqHeaders 9946 googleapi.Expand(req.URL, map[string]string{ 9947 "resource": c.resource, 9948 }) 9949 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9950} 9951 9952// Do executes the "datacatalog.projects.locations.taxonomies.testIamPermissions" call. 9953// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 9954// Any non-2xx status code is an error. Response headers are in either 9955// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 9956// was returned at all) in error.(*googleapi.Error).Header. Use 9957// googleapi.IsNotModified to check whether the returned error was 9958// because http.StatusNotModified was returned. 9959func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9960 gensupport.SetOptions(c.urlParams_, opts...) 9961 res, err := c.doRequest("json") 9962 if res != nil && res.StatusCode == http.StatusNotModified { 9963 if res.Body != nil { 9964 res.Body.Close() 9965 } 9966 return nil, &googleapi.Error{ 9967 Code: res.StatusCode, 9968 Header: res.Header, 9969 } 9970 } 9971 if err != nil { 9972 return nil, err 9973 } 9974 defer googleapi.CloseBody(res) 9975 if err := googleapi.CheckResponse(res); err != nil { 9976 return nil, err 9977 } 9978 ret := &TestIamPermissionsResponse{ 9979 ServerResponse: googleapi.ServerResponse{ 9980 Header: res.Header, 9981 HTTPStatusCode: res.StatusCode, 9982 }, 9983 } 9984 target := &ret 9985 if err := gensupport.DecodeResponse(target, res); err != nil { 9986 return nil, err 9987 } 9988 return ret, nil 9989 // { 9990 // "description": "Returns the permissions that a caller has on the specified taxonomy or policy tag.", 9991 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:testIamPermissions", 9992 // "httpMethod": "POST", 9993 // "id": "datacatalog.projects.locations.taxonomies.testIamPermissions", 9994 // "parameterOrder": [ 9995 // "resource" 9996 // ], 9997 // "parameters": { 9998 // "resource": { 9999 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 10000 // "location": "path", 10001 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 10002 // "required": true, 10003 // "type": "string" 10004 // } 10005 // }, 10006 // "path": "v1beta1/{+resource}:testIamPermissions", 10007 // "request": { 10008 // "$ref": "TestIamPermissionsRequest" 10009 // }, 10010 // "response": { 10011 // "$ref": "TestIamPermissionsResponse" 10012 // }, 10013 // "scopes": [ 10014 // "https://www.googleapis.com/auth/cloud-platform" 10015 // ] 10016 // } 10017 10018} 10019 10020// method id "datacatalog.projects.locations.taxonomies.policyTags.create": 10021 10022type ProjectsLocationsTaxonomiesPolicyTagsCreateCall struct { 10023 s *Service 10024 parent string 10025 googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag 10026 urlParams_ gensupport.URLParams 10027 ctx_ context.Context 10028 header_ http.Header 10029} 10030 10031// Create: Creates a policy tag in the specified taxonomy. 10032// 10033// - parent: Resource name of the taxonomy that the policy tag will 10034// belong to. 10035func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Create(parent string, googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 10036 c := &ProjectsLocationsTaxonomiesPolicyTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10037 c.parent = parent 10038 c.googleclouddatacatalogv1beta1policytag = googleclouddatacatalogv1beta1policytag 10039 return c 10040} 10041 10042// Fields allows partial responses to be retrieved. See 10043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10044// for more information. 10045func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 10046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10047 return c 10048} 10049 10050// Context sets the context to be used in this call's Do method. Any 10051// pending HTTP request will be aborted if the provided context is 10052// canceled. 10053func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 10054 c.ctx_ = ctx 10055 return c 10056} 10057 10058// Header returns an http.Header that can be modified by the caller to 10059// add HTTP headers to the request. 10060func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Header() http.Header { 10061 if c.header_ == nil { 10062 c.header_ = make(http.Header) 10063 } 10064 return c.header_ 10065} 10066 10067func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) doRequest(alt string) (*http.Response, error) { 10068 reqHeaders := make(http.Header) 10069 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10070 for k, v := range c.header_ { 10071 reqHeaders[k] = v 10072 } 10073 reqHeaders.Set("User-Agent", c.s.userAgent()) 10074 var body io.Reader = nil 10075 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1policytag) 10076 if err != nil { 10077 return nil, err 10078 } 10079 reqHeaders.Set("Content-Type", "application/json") 10080 c.urlParams_.Set("alt", alt) 10081 c.urlParams_.Set("prettyPrint", "false") 10082 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/policyTags") 10083 urls += "?" + c.urlParams_.Encode() 10084 req, err := http.NewRequest("POST", urls, body) 10085 if err != nil { 10086 return nil, err 10087 } 10088 req.Header = reqHeaders 10089 googleapi.Expand(req.URL, map[string]string{ 10090 "parent": c.parent, 10091 }) 10092 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10093} 10094 10095// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.create" call. 10096// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 10097// be non-nil. Any non-2xx status code is an error. Response headers are 10098// in either 10099// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 10100// a response was returned at all) in error.(*googleapi.Error).Header. 10101// Use googleapi.IsNotModified to check whether the returned error was 10102// because http.StatusNotModified was returned. 10103func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 10104 gensupport.SetOptions(c.urlParams_, opts...) 10105 res, err := c.doRequest("json") 10106 if res != nil && res.StatusCode == http.StatusNotModified { 10107 if res.Body != nil { 10108 res.Body.Close() 10109 } 10110 return nil, &googleapi.Error{ 10111 Code: res.StatusCode, 10112 Header: res.Header, 10113 } 10114 } 10115 if err != nil { 10116 return nil, err 10117 } 10118 defer googleapi.CloseBody(res) 10119 if err := googleapi.CheckResponse(res); err != nil { 10120 return nil, err 10121 } 10122 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 10123 ServerResponse: googleapi.ServerResponse{ 10124 Header: res.Header, 10125 HTTPStatusCode: res.StatusCode, 10126 }, 10127 } 10128 target := &ret 10129 if err := gensupport.DecodeResponse(target, res); err != nil { 10130 return nil, err 10131 } 10132 return ret, nil 10133 // { 10134 // "description": "Creates a policy tag in the specified taxonomy.", 10135 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags", 10136 // "httpMethod": "POST", 10137 // "id": "datacatalog.projects.locations.taxonomies.policyTags.create", 10138 // "parameterOrder": [ 10139 // "parent" 10140 // ], 10141 // "parameters": { 10142 // "parent": { 10143 // "description": "Required. Resource name of the taxonomy that the policy tag will belong to.", 10144 // "location": "path", 10145 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 10146 // "required": true, 10147 // "type": "string" 10148 // } 10149 // }, 10150 // "path": "v1beta1/{+parent}/policyTags", 10151 // "request": { 10152 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10153 // }, 10154 // "response": { 10155 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10156 // }, 10157 // "scopes": [ 10158 // "https://www.googleapis.com/auth/cloud-platform" 10159 // ] 10160 // } 10161 10162} 10163 10164// method id "datacatalog.projects.locations.taxonomies.policyTags.delete": 10165 10166type ProjectsLocationsTaxonomiesPolicyTagsDeleteCall struct { 10167 s *Service 10168 name string 10169 urlParams_ gensupport.URLParams 10170 ctx_ context.Context 10171 header_ http.Header 10172} 10173 10174// Delete: Deletes a policy tag. Also deletes all of its descendant 10175// policy tags. 10176// 10177// - name: Resource name of the policy tag to be deleted. All of its 10178// descendant policy tags will also be deleted. 10179func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Delete(name string) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 10180 c := &ProjectsLocationsTaxonomiesPolicyTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10181 c.name = name 10182 return c 10183} 10184 10185// Fields allows partial responses to be retrieved. See 10186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10187// for more information. 10188func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 10189 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10190 return c 10191} 10192 10193// Context sets the context to be used in this call's Do method. Any 10194// pending HTTP request will be aborted if the provided context is 10195// canceled. 10196func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 10197 c.ctx_ = ctx 10198 return c 10199} 10200 10201// Header returns an http.Header that can be modified by the caller to 10202// add HTTP headers to the request. 10203func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Header() http.Header { 10204 if c.header_ == nil { 10205 c.header_ = make(http.Header) 10206 } 10207 return c.header_ 10208} 10209 10210func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 10211 reqHeaders := make(http.Header) 10212 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10213 for k, v := range c.header_ { 10214 reqHeaders[k] = v 10215 } 10216 reqHeaders.Set("User-Agent", c.s.userAgent()) 10217 var body io.Reader = nil 10218 c.urlParams_.Set("alt", alt) 10219 c.urlParams_.Set("prettyPrint", "false") 10220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10221 urls += "?" + c.urlParams_.Encode() 10222 req, err := http.NewRequest("DELETE", urls, body) 10223 if err != nil { 10224 return nil, err 10225 } 10226 req.Header = reqHeaders 10227 googleapi.Expand(req.URL, map[string]string{ 10228 "name": c.name, 10229 }) 10230 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10231} 10232 10233// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.delete" call. 10234// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10235// code is an error. Response headers are in either 10236// *Empty.ServerResponse.Header or (if a response was returned at all) 10237// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10238// check whether the returned error was because http.StatusNotModified 10239// was returned. 10240func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10241 gensupport.SetOptions(c.urlParams_, opts...) 10242 res, err := c.doRequest("json") 10243 if res != nil && res.StatusCode == http.StatusNotModified { 10244 if res.Body != nil { 10245 res.Body.Close() 10246 } 10247 return nil, &googleapi.Error{ 10248 Code: res.StatusCode, 10249 Header: res.Header, 10250 } 10251 } 10252 if err != nil { 10253 return nil, err 10254 } 10255 defer googleapi.CloseBody(res) 10256 if err := googleapi.CheckResponse(res); err != nil { 10257 return nil, err 10258 } 10259 ret := &Empty{ 10260 ServerResponse: googleapi.ServerResponse{ 10261 Header: res.Header, 10262 HTTPStatusCode: res.StatusCode, 10263 }, 10264 } 10265 target := &ret 10266 if err := gensupport.DecodeResponse(target, res); err != nil { 10267 return nil, err 10268 } 10269 return ret, nil 10270 // { 10271 // "description": "Deletes a policy tag. Also deletes all of its descendant policy tags.", 10272 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 10273 // "httpMethod": "DELETE", 10274 // "id": "datacatalog.projects.locations.taxonomies.policyTags.delete", 10275 // "parameterOrder": [ 10276 // "name" 10277 // ], 10278 // "parameters": { 10279 // "name": { 10280 // "description": "Required. Resource name of the policy tag to be deleted. All of its descendant policy tags will also be deleted.", 10281 // "location": "path", 10282 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10283 // "required": true, 10284 // "type": "string" 10285 // } 10286 // }, 10287 // "path": "v1beta1/{+name}", 10288 // "response": { 10289 // "$ref": "Empty" 10290 // }, 10291 // "scopes": [ 10292 // "https://www.googleapis.com/auth/cloud-platform" 10293 // ] 10294 // } 10295 10296} 10297 10298// method id "datacatalog.projects.locations.taxonomies.policyTags.get": 10299 10300type ProjectsLocationsTaxonomiesPolicyTagsGetCall struct { 10301 s *Service 10302 name string 10303 urlParams_ gensupport.URLParams 10304 ifNoneMatch_ string 10305 ctx_ context.Context 10306 header_ http.Header 10307} 10308 10309// Get: Gets a policy tag. 10310// 10311// - name: Resource name of the requested policy tag. 10312func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Get(name string) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 10313 c := &ProjectsLocationsTaxonomiesPolicyTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10314 c.name = name 10315 return c 10316} 10317 10318// Fields allows partial responses to be retrieved. See 10319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10320// for more information. 10321func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 10322 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10323 return c 10324} 10325 10326// IfNoneMatch sets the optional parameter which makes the operation 10327// fail if the object's ETag matches the given value. This is useful for 10328// getting updates only after the object has changed since the last 10329// request. Use googleapi.IsNotModified to check whether the response 10330// error from Do is the result of In-None-Match. 10331func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 10332 c.ifNoneMatch_ = entityTag 10333 return c 10334} 10335 10336// Context sets the context to be used in this call's Do method. Any 10337// pending HTTP request will be aborted if the provided context is 10338// canceled. 10339func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 10340 c.ctx_ = ctx 10341 return c 10342} 10343 10344// Header returns an http.Header that can be modified by the caller to 10345// add HTTP headers to the request. 10346func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Header() http.Header { 10347 if c.header_ == nil { 10348 c.header_ = make(http.Header) 10349 } 10350 return c.header_ 10351} 10352 10353func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) doRequest(alt string) (*http.Response, error) { 10354 reqHeaders := make(http.Header) 10355 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10356 for k, v := range c.header_ { 10357 reqHeaders[k] = v 10358 } 10359 reqHeaders.Set("User-Agent", c.s.userAgent()) 10360 if c.ifNoneMatch_ != "" { 10361 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10362 } 10363 var body io.Reader = nil 10364 c.urlParams_.Set("alt", alt) 10365 c.urlParams_.Set("prettyPrint", "false") 10366 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10367 urls += "?" + c.urlParams_.Encode() 10368 req, err := http.NewRequest("GET", urls, body) 10369 if err != nil { 10370 return nil, err 10371 } 10372 req.Header = reqHeaders 10373 googleapi.Expand(req.URL, map[string]string{ 10374 "name": c.name, 10375 }) 10376 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10377} 10378 10379// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.get" call. 10380// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 10381// be non-nil. Any non-2xx status code is an error. Response headers are 10382// in either 10383// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 10384// a response was returned at all) in error.(*googleapi.Error).Header. 10385// Use googleapi.IsNotModified to check whether the returned error was 10386// because http.StatusNotModified was returned. 10387func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 10388 gensupport.SetOptions(c.urlParams_, opts...) 10389 res, err := c.doRequest("json") 10390 if res != nil && res.StatusCode == http.StatusNotModified { 10391 if res.Body != nil { 10392 res.Body.Close() 10393 } 10394 return nil, &googleapi.Error{ 10395 Code: res.StatusCode, 10396 Header: res.Header, 10397 } 10398 } 10399 if err != nil { 10400 return nil, err 10401 } 10402 defer googleapi.CloseBody(res) 10403 if err := googleapi.CheckResponse(res); err != nil { 10404 return nil, err 10405 } 10406 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 10407 ServerResponse: googleapi.ServerResponse{ 10408 Header: res.Header, 10409 HTTPStatusCode: res.StatusCode, 10410 }, 10411 } 10412 target := &ret 10413 if err := gensupport.DecodeResponse(target, res); err != nil { 10414 return nil, err 10415 } 10416 return ret, nil 10417 // { 10418 // "description": "Gets a policy tag.", 10419 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 10420 // "httpMethod": "GET", 10421 // "id": "datacatalog.projects.locations.taxonomies.policyTags.get", 10422 // "parameterOrder": [ 10423 // "name" 10424 // ], 10425 // "parameters": { 10426 // "name": { 10427 // "description": "Required. Resource name of the requested policy tag.", 10428 // "location": "path", 10429 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10430 // "required": true, 10431 // "type": "string" 10432 // } 10433 // }, 10434 // "path": "v1beta1/{+name}", 10435 // "response": { 10436 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10437 // }, 10438 // "scopes": [ 10439 // "https://www.googleapis.com/auth/cloud-platform" 10440 // ] 10441 // } 10442 10443} 10444 10445// method id "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy": 10446 10447type ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall struct { 10448 s *Service 10449 resource string 10450 getiampolicyrequest *GetIamPolicyRequest 10451 urlParams_ gensupport.URLParams 10452 ctx_ context.Context 10453 header_ http.Header 10454} 10455 10456// GetIamPolicy: Gets the IAM policy for a taxonomy or a policy tag. 10457// 10458// - resource: REQUIRED: The resource for which the policy is being 10459// requested. See the operation documentation for the appropriate 10460// value for this field. 10461func (r *ProjectsLocationsTaxonomiesPolicyTagsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10462 c := &ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10463 c.resource = resource 10464 c.getiampolicyrequest = getiampolicyrequest 10465 return c 10466} 10467 10468// Fields allows partial responses to be retrieved. See 10469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10470// for more information. 10471func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10472 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10473 return c 10474} 10475 10476// Context sets the context to be used in this call's Do method. Any 10477// pending HTTP request will be aborted if the provided context is 10478// canceled. 10479func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10480 c.ctx_ = ctx 10481 return c 10482} 10483 10484// Header returns an http.Header that can be modified by the caller to 10485// add HTTP headers to the request. 10486func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Header() http.Header { 10487 if c.header_ == nil { 10488 c.header_ = make(http.Header) 10489 } 10490 return c.header_ 10491} 10492 10493func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10494 reqHeaders := make(http.Header) 10495 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10496 for k, v := range c.header_ { 10497 reqHeaders[k] = v 10498 } 10499 reqHeaders.Set("User-Agent", c.s.userAgent()) 10500 var body io.Reader = nil 10501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 10502 if err != nil { 10503 return nil, err 10504 } 10505 reqHeaders.Set("Content-Type", "application/json") 10506 c.urlParams_.Set("alt", alt) 10507 c.urlParams_.Set("prettyPrint", "false") 10508 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 10509 urls += "?" + c.urlParams_.Encode() 10510 req, err := http.NewRequest("POST", urls, body) 10511 if err != nil { 10512 return nil, err 10513 } 10514 req.Header = reqHeaders 10515 googleapi.Expand(req.URL, map[string]string{ 10516 "resource": c.resource, 10517 }) 10518 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10519} 10520 10521// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy" call. 10522// Exactly one of *Policy or error will be non-nil. Any non-2xx status 10523// code is an error. Response headers are in either 10524// *Policy.ServerResponse.Header or (if a response was returned at all) 10525// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10526// check whether the returned error was because http.StatusNotModified 10527// was returned. 10528func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 10529 gensupport.SetOptions(c.urlParams_, opts...) 10530 res, err := c.doRequest("json") 10531 if res != nil && res.StatusCode == http.StatusNotModified { 10532 if res.Body != nil { 10533 res.Body.Close() 10534 } 10535 return nil, &googleapi.Error{ 10536 Code: res.StatusCode, 10537 Header: res.Header, 10538 } 10539 } 10540 if err != nil { 10541 return nil, err 10542 } 10543 defer googleapi.CloseBody(res) 10544 if err := googleapi.CheckResponse(res); err != nil { 10545 return nil, err 10546 } 10547 ret := &Policy{ 10548 ServerResponse: googleapi.ServerResponse{ 10549 Header: res.Header, 10550 HTTPStatusCode: res.StatusCode, 10551 }, 10552 } 10553 target := &ret 10554 if err := gensupport.DecodeResponse(target, res); err != nil { 10555 return nil, err 10556 } 10557 return ret, nil 10558 // { 10559 // "description": "Gets the IAM policy for a taxonomy or a policy tag.", 10560 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:getIamPolicy", 10561 // "httpMethod": "POST", 10562 // "id": "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy", 10563 // "parameterOrder": [ 10564 // "resource" 10565 // ], 10566 // "parameters": { 10567 // "resource": { 10568 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 10569 // "location": "path", 10570 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10571 // "required": true, 10572 // "type": "string" 10573 // } 10574 // }, 10575 // "path": "v1beta1/{+resource}:getIamPolicy", 10576 // "request": { 10577 // "$ref": "GetIamPolicyRequest" 10578 // }, 10579 // "response": { 10580 // "$ref": "Policy" 10581 // }, 10582 // "scopes": [ 10583 // "https://www.googleapis.com/auth/cloud-platform" 10584 // ] 10585 // } 10586 10587} 10588 10589// method id "datacatalog.projects.locations.taxonomies.policyTags.list": 10590 10591type ProjectsLocationsTaxonomiesPolicyTagsListCall struct { 10592 s *Service 10593 parent string 10594 urlParams_ gensupport.URLParams 10595 ifNoneMatch_ string 10596 ctx_ context.Context 10597 header_ http.Header 10598} 10599 10600// List: Lists all policy tags in a taxonomy. 10601// 10602// - parent: Resource name of the taxonomy to list the policy tags of. 10603func (r *ProjectsLocationsTaxonomiesPolicyTagsService) List(parent string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10604 c := &ProjectsLocationsTaxonomiesPolicyTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10605 c.parent = parent 10606 return c 10607} 10608 10609// PageSize sets the optional parameter "pageSize": The maximum number 10610// of items to return. Must be a value between 1 and 1000. If not set, 10611// defaults to 50. 10612func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) PageSize(pageSize int64) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10613 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10614 return c 10615} 10616 10617// PageToken sets the optional parameter "pageToken": The 10618// next_page_token value returned from a previous List request, if any. 10619// If not set, defaults to an empty string. 10620func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) PageToken(pageToken string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10621 c.urlParams_.Set("pageToken", pageToken) 10622 return c 10623} 10624 10625// Fields allows partial responses to be retrieved. See 10626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10627// for more information. 10628func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10629 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10630 return c 10631} 10632 10633// IfNoneMatch sets the optional parameter which makes the operation 10634// fail if the object's ETag matches the given value. This is useful for 10635// getting updates only after the object has changed since the last 10636// request. Use googleapi.IsNotModified to check whether the response 10637// error from Do is the result of In-None-Match. 10638func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10639 c.ifNoneMatch_ = entityTag 10640 return c 10641} 10642 10643// Context sets the context to be used in this call's Do method. Any 10644// pending HTTP request will be aborted if the provided context is 10645// canceled. 10646func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10647 c.ctx_ = ctx 10648 return c 10649} 10650 10651// Header returns an http.Header that can be modified by the caller to 10652// add HTTP headers to the request. 10653func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Header() http.Header { 10654 if c.header_ == nil { 10655 c.header_ = make(http.Header) 10656 } 10657 return c.header_ 10658} 10659 10660func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) doRequest(alt string) (*http.Response, error) { 10661 reqHeaders := make(http.Header) 10662 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10663 for k, v := range c.header_ { 10664 reqHeaders[k] = v 10665 } 10666 reqHeaders.Set("User-Agent", c.s.userAgent()) 10667 if c.ifNoneMatch_ != "" { 10668 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10669 } 10670 var body io.Reader = nil 10671 c.urlParams_.Set("alt", alt) 10672 c.urlParams_.Set("prettyPrint", "false") 10673 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/policyTags") 10674 urls += "?" + c.urlParams_.Encode() 10675 req, err := http.NewRequest("GET", urls, body) 10676 if err != nil { 10677 return nil, err 10678 } 10679 req.Header = reqHeaders 10680 googleapi.Expand(req.URL, map[string]string{ 10681 "parent": c.parent, 10682 }) 10683 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10684} 10685 10686// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.list" call. 10687// Exactly one of *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse 10688// or error will be non-nil. Any non-2xx status code is an error. 10689// Response headers are in either 10690// *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse.ServerResponse.He 10691// ader or (if a response was returned at all) in 10692// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10693// whether the returned error was because http.StatusNotModified was 10694// returned. 10695func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse, error) { 10696 gensupport.SetOptions(c.urlParams_, opts...) 10697 res, err := c.doRequest("json") 10698 if res != nil && res.StatusCode == http.StatusNotModified { 10699 if res.Body != nil { 10700 res.Body.Close() 10701 } 10702 return nil, &googleapi.Error{ 10703 Code: res.StatusCode, 10704 Header: res.Header, 10705 } 10706 } 10707 if err != nil { 10708 return nil, err 10709 } 10710 defer googleapi.CloseBody(res) 10711 if err := googleapi.CheckResponse(res); err != nil { 10712 return nil, err 10713 } 10714 ret := &GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse{ 10715 ServerResponse: googleapi.ServerResponse{ 10716 Header: res.Header, 10717 HTTPStatusCode: res.StatusCode, 10718 }, 10719 } 10720 target := &ret 10721 if err := gensupport.DecodeResponse(target, res); err != nil { 10722 return nil, err 10723 } 10724 return ret, nil 10725 // { 10726 // "description": "Lists all policy tags in a taxonomy.", 10727 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags", 10728 // "httpMethod": "GET", 10729 // "id": "datacatalog.projects.locations.taxonomies.policyTags.list", 10730 // "parameterOrder": [ 10731 // "parent" 10732 // ], 10733 // "parameters": { 10734 // "pageSize": { 10735 // "description": "The maximum number of items to return. Must be a value between 1 and 1000. If not set, defaults to 50.", 10736 // "format": "int32", 10737 // "location": "query", 10738 // "type": "integer" 10739 // }, 10740 // "pageToken": { 10741 // "description": "The next_page_token value returned from a previous List request, if any. If not set, defaults to an empty string.", 10742 // "location": "query", 10743 // "type": "string" 10744 // }, 10745 // "parent": { 10746 // "description": "Required. Resource name of the taxonomy to list the policy tags of.", 10747 // "location": "path", 10748 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 10749 // "required": true, 10750 // "type": "string" 10751 // } 10752 // }, 10753 // "path": "v1beta1/{+parent}/policyTags", 10754 // "response": { 10755 // "$ref": "GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse" 10756 // }, 10757 // "scopes": [ 10758 // "https://www.googleapis.com/auth/cloud-platform" 10759 // ] 10760 // } 10761 10762} 10763 10764// Pages invokes f for each page of results. 10765// A non-nil error returned from f will halt the iteration. 10766// The provided context supersedes any context provided to the Context method. 10767func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse) error) error { 10768 c.ctx_ = ctx 10769 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10770 for { 10771 x, err := c.Do() 10772 if err != nil { 10773 return err 10774 } 10775 if err := f(x); err != nil { 10776 return err 10777 } 10778 if x.NextPageToken == "" { 10779 return nil 10780 } 10781 c.PageToken(x.NextPageToken) 10782 } 10783} 10784 10785// method id "datacatalog.projects.locations.taxonomies.policyTags.patch": 10786 10787type ProjectsLocationsTaxonomiesPolicyTagsPatchCall struct { 10788 s *Service 10789 name string 10790 googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag 10791 urlParams_ gensupport.URLParams 10792 ctx_ context.Context 10793 header_ http.Header 10794} 10795 10796// Patch: Updates a policy tag. 10797// 10798// - name: Output only. Resource name of this policy tag, whose format 10799// is: 10800// "projects/{project_number}/locations/{location_id}/taxonomies/{taxon 10801// omy_id}/policyTags/{id}". 10802func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Patch(name string, googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10803 c := &ProjectsLocationsTaxonomiesPolicyTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10804 c.name = name 10805 c.googleclouddatacatalogv1beta1policytag = googleclouddatacatalogv1beta1policytag 10806 return c 10807} 10808 10809// UpdateMask sets the optional parameter "updateMask": The update mask 10810// applies to the resource. Only display_name, description and 10811// parent_policy_tag can be updated and thus can be listed in the mask. 10812// If update_mask is not provided, all allowed fields (i.e. 10813// display_name, description and parent) will be updated. For more 10814// information including the `FieldMask` definition, see 10815// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 10816// If not set, defaults to all of the fields that are allowed to update. 10817func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10818 c.urlParams_.Set("updateMask", updateMask) 10819 return c 10820} 10821 10822// Fields allows partial responses to be retrieved. See 10823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10824// for more information. 10825func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10827 return c 10828} 10829 10830// Context sets the context to be used in this call's Do method. Any 10831// pending HTTP request will be aborted if the provided context is 10832// canceled. 10833func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10834 c.ctx_ = ctx 10835 return c 10836} 10837 10838// Header returns an http.Header that can be modified by the caller to 10839// add HTTP headers to the request. 10840func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Header() http.Header { 10841 if c.header_ == nil { 10842 c.header_ = make(http.Header) 10843 } 10844 return c.header_ 10845} 10846 10847func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) doRequest(alt string) (*http.Response, error) { 10848 reqHeaders := make(http.Header) 10849 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10850 for k, v := range c.header_ { 10851 reqHeaders[k] = v 10852 } 10853 reqHeaders.Set("User-Agent", c.s.userAgent()) 10854 var body io.Reader = nil 10855 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1policytag) 10856 if err != nil { 10857 return nil, err 10858 } 10859 reqHeaders.Set("Content-Type", "application/json") 10860 c.urlParams_.Set("alt", alt) 10861 c.urlParams_.Set("prettyPrint", "false") 10862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10863 urls += "?" + c.urlParams_.Encode() 10864 req, err := http.NewRequest("PATCH", urls, body) 10865 if err != nil { 10866 return nil, err 10867 } 10868 req.Header = reqHeaders 10869 googleapi.Expand(req.URL, map[string]string{ 10870 "name": c.name, 10871 }) 10872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10873} 10874 10875// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.patch" call. 10876// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 10877// be non-nil. Any non-2xx status code is an error. Response headers are 10878// in either 10879// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 10880// a response was returned at all) in error.(*googleapi.Error).Header. 10881// Use googleapi.IsNotModified to check whether the returned error was 10882// because http.StatusNotModified was returned. 10883func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 10884 gensupport.SetOptions(c.urlParams_, opts...) 10885 res, err := c.doRequest("json") 10886 if res != nil && res.StatusCode == http.StatusNotModified { 10887 if res.Body != nil { 10888 res.Body.Close() 10889 } 10890 return nil, &googleapi.Error{ 10891 Code: res.StatusCode, 10892 Header: res.Header, 10893 } 10894 } 10895 if err != nil { 10896 return nil, err 10897 } 10898 defer googleapi.CloseBody(res) 10899 if err := googleapi.CheckResponse(res); err != nil { 10900 return nil, err 10901 } 10902 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 10903 ServerResponse: googleapi.ServerResponse{ 10904 Header: res.Header, 10905 HTTPStatusCode: res.StatusCode, 10906 }, 10907 } 10908 target := &ret 10909 if err := gensupport.DecodeResponse(target, res); err != nil { 10910 return nil, err 10911 } 10912 return ret, nil 10913 // { 10914 // "description": "Updates a policy tag.", 10915 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 10916 // "httpMethod": "PATCH", 10917 // "id": "datacatalog.projects.locations.taxonomies.policyTags.patch", 10918 // "parameterOrder": [ 10919 // "name" 10920 // ], 10921 // "parameters": { 10922 // "name": { 10923 // "description": "Output only. Resource name of this policy tag, whose format is: \"projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}\".", 10924 // "location": "path", 10925 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10926 // "required": true, 10927 // "type": "string" 10928 // }, 10929 // "updateMask": { 10930 // "description": "The update mask applies to the resource. Only display_name, description and parent_policy_tag can be updated and thus can be listed in the mask. If update_mask is not provided, all allowed fields (i.e. display_name, description and parent) will be updated. For more information including the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to update.", 10931 // "format": "google-fieldmask", 10932 // "location": "query", 10933 // "type": "string" 10934 // } 10935 // }, 10936 // "path": "v1beta1/{+name}", 10937 // "request": { 10938 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10939 // }, 10940 // "response": { 10941 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10942 // }, 10943 // "scopes": [ 10944 // "https://www.googleapis.com/auth/cloud-platform" 10945 // ] 10946 // } 10947 10948} 10949 10950// method id "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy": 10951 10952type ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall struct { 10953 s *Service 10954 resource string 10955 setiampolicyrequest *SetIamPolicyRequest 10956 urlParams_ gensupport.URLParams 10957 ctx_ context.Context 10958 header_ http.Header 10959} 10960 10961// SetIamPolicy: Sets the IAM policy for a taxonomy or a policy tag. 10962// 10963// - resource: REQUIRED: The resource for which the policy is being 10964// specified. See the operation documentation for the appropriate 10965// value for this field. 10966func (r *ProjectsLocationsTaxonomiesPolicyTagsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10967 c := &ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10968 c.resource = resource 10969 c.setiampolicyrequest = setiampolicyrequest 10970 return c 10971} 10972 10973// Fields allows partial responses to be retrieved. See 10974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10975// for more information. 10976func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10978 return c 10979} 10980 10981// Context sets the context to be used in this call's Do method. Any 10982// pending HTTP request will be aborted if the provided context is 10983// canceled. 10984func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10985 c.ctx_ = ctx 10986 return c 10987} 10988 10989// Header returns an http.Header that can be modified by the caller to 10990// add HTTP headers to the request. 10991func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Header() http.Header { 10992 if c.header_ == nil { 10993 c.header_ = make(http.Header) 10994 } 10995 return c.header_ 10996} 10997 10998func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10999 reqHeaders := make(http.Header) 11000 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11001 for k, v := range c.header_ { 11002 reqHeaders[k] = v 11003 } 11004 reqHeaders.Set("User-Agent", c.s.userAgent()) 11005 var body io.Reader = nil 11006 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 11007 if err != nil { 11008 return nil, err 11009 } 11010 reqHeaders.Set("Content-Type", "application/json") 11011 c.urlParams_.Set("alt", alt) 11012 c.urlParams_.Set("prettyPrint", "false") 11013 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 11014 urls += "?" + c.urlParams_.Encode() 11015 req, err := http.NewRequest("POST", urls, body) 11016 if err != nil { 11017 return nil, err 11018 } 11019 req.Header = reqHeaders 11020 googleapi.Expand(req.URL, map[string]string{ 11021 "resource": c.resource, 11022 }) 11023 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11024} 11025 11026// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy" call. 11027// Exactly one of *Policy or error will be non-nil. Any non-2xx status 11028// code is an error. Response headers are in either 11029// *Policy.ServerResponse.Header or (if a response was returned at all) 11030// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11031// check whether the returned error was because http.StatusNotModified 11032// was returned. 11033func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 11034 gensupport.SetOptions(c.urlParams_, opts...) 11035 res, err := c.doRequest("json") 11036 if res != nil && res.StatusCode == http.StatusNotModified { 11037 if res.Body != nil { 11038 res.Body.Close() 11039 } 11040 return nil, &googleapi.Error{ 11041 Code: res.StatusCode, 11042 Header: res.Header, 11043 } 11044 } 11045 if err != nil { 11046 return nil, err 11047 } 11048 defer googleapi.CloseBody(res) 11049 if err := googleapi.CheckResponse(res); err != nil { 11050 return nil, err 11051 } 11052 ret := &Policy{ 11053 ServerResponse: googleapi.ServerResponse{ 11054 Header: res.Header, 11055 HTTPStatusCode: res.StatusCode, 11056 }, 11057 } 11058 target := &ret 11059 if err := gensupport.DecodeResponse(target, res); err != nil { 11060 return nil, err 11061 } 11062 return ret, nil 11063 // { 11064 // "description": "Sets the IAM policy for a taxonomy or a policy tag.", 11065 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:setIamPolicy", 11066 // "httpMethod": "POST", 11067 // "id": "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy", 11068 // "parameterOrder": [ 11069 // "resource" 11070 // ], 11071 // "parameters": { 11072 // "resource": { 11073 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 11074 // "location": "path", 11075 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 11076 // "required": true, 11077 // "type": "string" 11078 // } 11079 // }, 11080 // "path": "v1beta1/{+resource}:setIamPolicy", 11081 // "request": { 11082 // "$ref": "SetIamPolicyRequest" 11083 // }, 11084 // "response": { 11085 // "$ref": "Policy" 11086 // }, 11087 // "scopes": [ 11088 // "https://www.googleapis.com/auth/cloud-platform" 11089 // ] 11090 // } 11091 11092} 11093 11094// method id "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions": 11095 11096type ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall struct { 11097 s *Service 11098 resource string 11099 testiampermissionsrequest *TestIamPermissionsRequest 11100 urlParams_ gensupport.URLParams 11101 ctx_ context.Context 11102 header_ http.Header 11103} 11104 11105// TestIamPermissions: Returns the permissions that a caller has on the 11106// specified taxonomy or policy tag. 11107// 11108// - resource: REQUIRED: The resource for which the policy detail is 11109// being requested. See the operation documentation for the 11110// appropriate value for this field. 11111func (r *ProjectsLocationsTaxonomiesPolicyTagsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 11112 c := &ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11113 c.resource = resource 11114 c.testiampermissionsrequest = testiampermissionsrequest 11115 return c 11116} 11117 11118// Fields allows partial responses to be retrieved. See 11119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11120// for more information. 11121func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 11122 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11123 return c 11124} 11125 11126// Context sets the context to be used in this call's Do method. Any 11127// pending HTTP request will be aborted if the provided context is 11128// canceled. 11129func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 11130 c.ctx_ = ctx 11131 return c 11132} 11133 11134// Header returns an http.Header that can be modified by the caller to 11135// add HTTP headers to the request. 11136func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Header() http.Header { 11137 if c.header_ == nil { 11138 c.header_ = make(http.Header) 11139 } 11140 return c.header_ 11141} 11142 11143func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 11144 reqHeaders := make(http.Header) 11145 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11146 for k, v := range c.header_ { 11147 reqHeaders[k] = v 11148 } 11149 reqHeaders.Set("User-Agent", c.s.userAgent()) 11150 var body io.Reader = nil 11151 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 11152 if err != nil { 11153 return nil, err 11154 } 11155 reqHeaders.Set("Content-Type", "application/json") 11156 c.urlParams_.Set("alt", alt) 11157 c.urlParams_.Set("prettyPrint", "false") 11158 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 11159 urls += "?" + c.urlParams_.Encode() 11160 req, err := http.NewRequest("POST", urls, body) 11161 if err != nil { 11162 return nil, err 11163 } 11164 req.Header = reqHeaders 11165 googleapi.Expand(req.URL, map[string]string{ 11166 "resource": c.resource, 11167 }) 11168 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11169} 11170 11171// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions" call. 11172// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 11173// Any non-2xx status code is an error. Response headers are in either 11174// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 11175// was returned at all) in error.(*googleapi.Error).Header. Use 11176// googleapi.IsNotModified to check whether the returned error was 11177// because http.StatusNotModified was returned. 11178func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 11179 gensupport.SetOptions(c.urlParams_, opts...) 11180 res, err := c.doRequest("json") 11181 if res != nil && res.StatusCode == http.StatusNotModified { 11182 if res.Body != nil { 11183 res.Body.Close() 11184 } 11185 return nil, &googleapi.Error{ 11186 Code: res.StatusCode, 11187 Header: res.Header, 11188 } 11189 } 11190 if err != nil { 11191 return nil, err 11192 } 11193 defer googleapi.CloseBody(res) 11194 if err := googleapi.CheckResponse(res); err != nil { 11195 return nil, err 11196 } 11197 ret := &TestIamPermissionsResponse{ 11198 ServerResponse: googleapi.ServerResponse{ 11199 Header: res.Header, 11200 HTTPStatusCode: res.StatusCode, 11201 }, 11202 } 11203 target := &ret 11204 if err := gensupport.DecodeResponse(target, res); err != nil { 11205 return nil, err 11206 } 11207 return ret, nil 11208 // { 11209 // "description": "Returns the permissions that a caller has on the specified taxonomy or policy tag.", 11210 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:testIamPermissions", 11211 // "httpMethod": "POST", 11212 // "id": "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions", 11213 // "parameterOrder": [ 11214 // "resource" 11215 // ], 11216 // "parameters": { 11217 // "resource": { 11218 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 11219 // "location": "path", 11220 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 11221 // "required": true, 11222 // "type": "string" 11223 // } 11224 // }, 11225 // "path": "v1beta1/{+resource}:testIamPermissions", 11226 // "request": { 11227 // "$ref": "TestIamPermissionsRequest" 11228 // }, 11229 // "response": { 11230 // "$ref": "TestIamPermissionsResponse" 11231 // }, 11232 // "scopes": [ 11233 // "https://www.googleapis.com/auth/cloud-platform" 11234 // ] 11235 // } 11236 11237} 11238