1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package 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 // View and manage your data across Google Cloud Platform services 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 // BindingId: A client-specified ID for this binding. Expected to be 294 // globally unique to support the internal bindings-by-ID API. 295 BindingId string `json:"bindingId,omitempty"` 296 297 // Condition: The condition that is associated with this binding. If the 298 // condition evaluates to `true`, then this binding applies to the 299 // current request. If the condition evaluates to `false`, then this 300 // binding does not apply to the current request. However, a different 301 // role binding might grant the same role to one or more of the members 302 // in this binding. To learn which resources support conditions in their 303 // IAM policies, see the [IAM 304 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 305 // olicies). 306 Condition *Expr `json:"condition,omitempty"` 307 308 // Members: Specifies the identities requesting access for a Cloud 309 // Platform resource. `members` can have the following values: * 310 // `allUsers`: A special identifier that represents anyone who is on the 311 // internet; with or without a Google account. * 312 // `allAuthenticatedUsers`: A special identifier that represents anyone 313 // who is authenticated with a Google account or a service account. * 314 // `user:{emailid}`: An email address that represents a specific Google 315 // account. For example, `alice@example.com` . * 316 // `serviceAccount:{emailid}`: An email address that represents a 317 // service account. For example, 318 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 319 // email address that represents a Google group. For example, 320 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 321 // email address (plus unique identifier) representing a user that has 322 // been recently deleted. For example, 323 // `alice@example.com?uid=123456789012345678901`. If the user is 324 // recovered, this value reverts to `user:{emailid}` and the recovered 325 // user retains the role in the binding. * 326 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 327 // (plus unique identifier) representing a service account that has been 328 // recently deleted. For example, 329 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 330 // If the service account is undeleted, this value reverts to 331 // `serviceAccount:{emailid}` and the undeleted service account retains 332 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 333 // An email address (plus unique identifier) representing a Google group 334 // that has been recently deleted. For example, 335 // `admins@example.com?uid=123456789012345678901`. If the group is 336 // recovered, this value reverts to `group:{emailid}` and the recovered 337 // group retains the role in the binding. * `domain:{domain}`: The G 338 // Suite domain (primary) that represents all the users of that domain. 339 // For example, `google.com` or `example.com`. 340 Members []string `json:"members,omitempty"` 341 342 // Role: Role that is assigned to `members`. For example, 343 // `roles/viewer`, `roles/editor`, or `roles/owner`. 344 Role string `json:"role,omitempty"` 345 346 // ForceSendFields is a list of field names (e.g. "BindingId") to 347 // unconditionally include in API requests. By default, fields with 348 // empty values are omitted from API requests. However, any non-pointer, 349 // non-interface field appearing in ForceSendFields will be sent to the 350 // server regardless of whether the field is empty or not. This may be 351 // used to include empty fields in Patch requests. 352 ForceSendFields []string `json:"-"` 353 354 // NullFields is a list of field names (e.g. "BindingId") to include in 355 // API requests with the JSON null value. By default, fields with empty 356 // values are omitted from API requests. However, any field with an 357 // empty value appearing in NullFields will be sent to the server as 358 // null. It is an error if a field in this list has a non-empty value. 359 // This may be used to include null fields in Patch requests. 360 NullFields []string `json:"-"` 361} 362 363func (s *Binding) MarshalJSON() ([]byte, error) { 364 type NoMethod Binding 365 raw := NoMethod(*s) 366 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 367} 368 369// Empty: A generic empty message that you can re-use to avoid defining 370// duplicated empty messages in your APIs. A typical example is to use 371// it as the request or the response type of an API method. For 372// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 373// (google.protobuf.Empty); } The JSON representation for `Empty` is 374// empty JSON object `{}`. 375type Empty struct { 376 // ServerResponse contains the HTTP response code and headers from the 377 // server. 378 googleapi.ServerResponse `json:"-"` 379} 380 381// Expr: Represents a textual expression in the Common Expression 382// Language (CEL) syntax. CEL is a C-like expression language. The 383// syntax and semantics of CEL are documented at 384// https://github.com/google/cel-spec. Example (Comparison): title: 385// "Summary size limit" description: "Determines if a summary is less 386// than 100 chars" expression: "document.summary.size() < 100" Example 387// (Equality): title: "Requestor is owner" description: "Determines if 388// requestor is the document owner" expression: "document.owner == 389// request.auth.claims.email" Example (Logic): title: "Public documents" 390// description: "Determine whether the document should be publicly 391// visible" expression: "document.type != 'private' && document.type != 392// 'internal'" Example (Data Manipulation): title: "Notification string" 393// description: "Create a notification string with a timestamp." 394// expression: "'New message received at ' + 395// string(document.create_time)" The exact variables and functions that 396// may be referenced within an expression are determined by the service 397// that evaluates it. See the service documentation for additional 398// information. 399type Expr struct { 400 // Description: Optional. Description of the expression. This is a 401 // longer text which describes the expression, e.g. when hovered over it 402 // in a UI. 403 Description string `json:"description,omitempty"` 404 405 // Expression: Textual representation of an expression in Common 406 // Expression Language syntax. 407 Expression string `json:"expression,omitempty"` 408 409 // Location: Optional. String indicating the location of the expression 410 // for error reporting, e.g. a file name and a position in the file. 411 Location string `json:"location,omitempty"` 412 413 // Title: Optional. Title for the expression, i.e. a short string 414 // describing its purpose. This can be used e.g. in UIs which allow to 415 // enter the expression. 416 Title string `json:"title,omitempty"` 417 418 // ForceSendFields is a list of field names (e.g. "Description") to 419 // unconditionally include in API requests. By default, fields with 420 // empty values are omitted from API requests. However, any non-pointer, 421 // non-interface field appearing in ForceSendFields will be sent to the 422 // server regardless of whether the field is empty or not. This may be 423 // used to include empty fields in Patch requests. 424 ForceSendFields []string `json:"-"` 425 426 // NullFields is a list of field names (e.g. "Description") to include 427 // in API requests with the JSON null value. By default, fields with 428 // empty values are omitted from API requests. However, any field with 429 // an empty value appearing in NullFields will be sent to the server as 430 // null. It is an error if a field in this list has a non-empty value. 431 // This may be used to include null fields in Patch requests. 432 NullFields []string `json:"-"` 433} 434 435func (s *Expr) MarshalJSON() ([]byte, error) { 436 type NoMethod Expr 437 raw := NoMethod(*s) 438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 439} 440 441// GetIamPolicyRequest: Request message for `GetIamPolicy` method. 442type GetIamPolicyRequest struct { 443 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options 444 // to `GetIamPolicy`. 445 Options *GetPolicyOptions `json:"options,omitempty"` 446 447 // ForceSendFields is a list of field names (e.g. "Options") to 448 // unconditionally include in API requests. By default, fields with 449 // empty values are omitted from API requests. However, any non-pointer, 450 // non-interface field appearing in ForceSendFields will be sent to the 451 // server regardless of whether the field is empty or not. This may be 452 // used to include empty fields in Patch requests. 453 ForceSendFields []string `json:"-"` 454 455 // NullFields is a list of field names (e.g. "Options") to include in 456 // API requests with the JSON null value. By default, fields with empty 457 // values are omitted from API requests. However, any field with an 458 // empty value appearing in NullFields will be sent to the server as 459 // null. It is an error if a field in this list has a non-empty value. 460 // This may be used to include null fields in Patch requests. 461 NullFields []string `json:"-"` 462} 463 464func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 465 type NoMethod GetIamPolicyRequest 466 raw := NoMethod(*s) 467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 468} 469 470// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 471type GetPolicyOptions struct { 472 // RequestedPolicyVersion: Optional. The policy format version to be 473 // returned. Valid values are 0, 1, and 3. Requests specifying an 474 // invalid value will be rejected. Requests for policies with any 475 // conditional bindings must specify version 3. Policies without any 476 // conditional bindings may specify any valid value or leave the field 477 // unset. To learn which resources support conditions in their IAM 478 // policies, see the [IAM 479 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 480 // olicies). 481 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 482 483 // ForceSendFields is a list of field names (e.g. 484 // "RequestedPolicyVersion") to unconditionally include in API requests. 485 // By default, fields with empty values are omitted from API requests. 486 // However, any non-pointer, non-interface field appearing in 487 // ForceSendFields will be sent to the server regardless of whether the 488 // field is empty or not. This may be used to include empty fields in 489 // Patch requests. 490 ForceSendFields []string `json:"-"` 491 492 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") 493 // to include in API requests with the JSON null value. By default, 494 // fields with empty values are omitted from API requests. However, any 495 // field with an empty value appearing in NullFields will be sent to the 496 // server as null. It is an error if a field in this list has a 497 // non-empty value. This may be used to include null fields in Patch 498 // requests. 499 NullFields []string `json:"-"` 500} 501 502func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 503 type NoMethod GetPolicyOptions 504 raw := NoMethod(*s) 505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 506} 507 508// GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec: Spec for a 509// group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. 510// Context: 511// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding 512type GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec struct { 513 // Dataset: Output only. The Data Catalog resource name of the dataset 514 // entry the current table belongs to, for example, 515 // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_i 516 // d}/entries/{entry_id}`. 517 Dataset string `json:"dataset,omitempty"` 518 519 // ShardCount: Output only. Total number of shards. 520 ShardCount int64 `json:"shardCount,omitempty,string"` 521 522 // TablePrefix: Output only. The table name prefix of the shards. The 523 // name of any given shard is `[table_prefix]YYYYMMDD`, for example, for 524 // shard `MyTable20180101`, the `table_prefix` is `MyTable`. 525 TablePrefix string `json:"tablePrefix,omitempty"` 526 527 // ForceSendFields is a list of field names (e.g. "Dataset") to 528 // unconditionally include in API requests. By default, fields with 529 // empty values are omitted from API requests. However, any non-pointer, 530 // non-interface field appearing in ForceSendFields will be sent to the 531 // server regardless of whether the field is empty or not. This may be 532 // used to include empty fields in Patch requests. 533 ForceSendFields []string `json:"-"` 534 535 // NullFields is a list of field names (e.g. "Dataset") to include in 536 // API requests with the JSON null value. By default, fields with empty 537 // values are omitted from API requests. However, any field with an 538 // empty value appearing in NullFields will be sent to the server as 539 // null. It is an error if a field in this list has a non-empty value. 540 // This may be used to include null fields in Patch requests. 541 NullFields []string `json:"-"` 542} 543 544func (s *GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec) MarshalJSON() ([]byte, error) { 545 type NoMethod GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec 546 raw := NoMethod(*s) 547 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 548} 549 550// GoogleCloudDatacatalogV1beta1BigQueryTableSpec: Describes a BigQuery 551// table. 552type GoogleCloudDatacatalogV1beta1BigQueryTableSpec struct { 553 // TableSourceType: Output only. The table source type. 554 // 555 // Possible values: 556 // "TABLE_SOURCE_TYPE_UNSPECIFIED" - Default unknown type. 557 // "BIGQUERY_VIEW" - Table view. 558 // "BIGQUERY_TABLE" - BigQuery native table. 559 // "BIGQUERY_MATERIALIZED_VIEW" - BigQuery materialized view. 560 TableSourceType string `json:"tableSourceType,omitempty"` 561 562 // TableSpec: Spec of a BigQuery table. This field should only be 563 // populated if `table_source_type` is `BIGQUERY_TABLE`. 564 TableSpec *GoogleCloudDatacatalogV1beta1TableSpec `json:"tableSpec,omitempty"` 565 566 // ViewSpec: Table view specification. This field should only be 567 // populated if `table_source_type` is `BIGQUERY_VIEW`. 568 ViewSpec *GoogleCloudDatacatalogV1beta1ViewSpec `json:"viewSpec,omitempty"` 569 570 // ForceSendFields is a list of field names (e.g. "TableSourceType") to 571 // unconditionally include in API requests. By default, fields with 572 // empty values are omitted from API requests. However, any non-pointer, 573 // non-interface field appearing in ForceSendFields will be sent to the 574 // server regardless of whether the field is empty or not. This may be 575 // used to include empty fields in Patch requests. 576 ForceSendFields []string `json:"-"` 577 578 // NullFields is a list of field names (e.g. "TableSourceType") to 579 // include in API requests with the JSON null value. By default, fields 580 // with empty values are omitted from API requests. However, any field 581 // with an empty value appearing in NullFields will be sent to the 582 // server as null. It is an error if a field in this list has a 583 // non-empty value. This may be used to include null fields in Patch 584 // requests. 585 NullFields []string `json:"-"` 586} 587 588func (s *GoogleCloudDatacatalogV1beta1BigQueryTableSpec) MarshalJSON() ([]byte, error) { 589 type NoMethod GoogleCloudDatacatalogV1beta1BigQueryTableSpec 590 raw := NoMethod(*s) 591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 592} 593 594// GoogleCloudDatacatalogV1beta1ColumnSchema: Representation of a column 595// within a schema. Columns could be nested inside other columns. 596type GoogleCloudDatacatalogV1beta1ColumnSchema struct { 597 // Column: Required. Name of the column. 598 Column string `json:"column,omitempty"` 599 600 // Description: Optional. Description of the column. Default value is an 601 // empty string. 602 Description string `json:"description,omitempty"` 603 604 // Mode: Optional. A column's mode indicates whether the values in this 605 // column are required, nullable, etc. Only `NULLABLE`, `REQUIRED` and 606 // `REPEATED` are supported. Default mode is `NULLABLE`. 607 Mode string `json:"mode,omitempty"` 608 609 // Subcolumns: Optional. Schema of sub-columns. A column can have zero 610 // or more sub-columns. 611 Subcolumns []*GoogleCloudDatacatalogV1beta1ColumnSchema `json:"subcolumns,omitempty"` 612 613 // Type: Required. Type of the column. 614 Type string `json:"type,omitempty"` 615 616 // ForceSendFields is a list of field names (e.g. "Column") to 617 // unconditionally include in API requests. By default, fields with 618 // empty values are omitted from API requests. However, any non-pointer, 619 // non-interface field appearing in ForceSendFields will be sent to the 620 // server regardless of whether the field is empty or not. This may be 621 // used to include empty fields in Patch requests. 622 ForceSendFields []string `json:"-"` 623 624 // NullFields is a list of field names (e.g. "Column") to include in API 625 // requests with the JSON null value. By default, fields with empty 626 // values are omitted from API requests. However, any field with an 627 // empty value appearing in NullFields will be sent to the server as 628 // null. It is an error if a field in this list has a non-empty value. 629 // This may be used to include null fields in Patch requests. 630 NullFields []string `json:"-"` 631} 632 633func (s *GoogleCloudDatacatalogV1beta1ColumnSchema) MarshalJSON() ([]byte, error) { 634 type NoMethod GoogleCloudDatacatalogV1beta1ColumnSchema 635 raw := NoMethod(*s) 636 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 637} 638 639// GoogleCloudDatacatalogV1beta1Entry: Entry Metadata. A Data Catalog 640// Entry resource represents another resource in Google Cloud Platform 641// (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google 642// Cloud Platform. Clients can use the `linked_resource` field in the 643// Entry resource to refer to the original resource ID of the source 644// system. An Entry resource contains resource details, such as its 645// schema. An Entry can also be used to attach flexible metadata, such 646// as a Tag. 647type GoogleCloudDatacatalogV1beta1Entry struct { 648 // BigqueryDateShardedSpec: Specification for a group of BigQuery tables 649 // with name pattern `[prefix]YYYYMMDD`. Context: 650 // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. 651 BigqueryDateShardedSpec *GoogleCloudDatacatalogV1beta1BigQueryDateShardedSpec `json:"bigqueryDateShardedSpec,omitempty"` 652 653 // BigqueryTableSpec: Specification that applies to a BigQuery table. 654 // This is only valid on entries of type `TABLE`. 655 BigqueryTableSpec *GoogleCloudDatacatalogV1beta1BigQueryTableSpec `json:"bigqueryTableSpec,omitempty"` 656 657 // Description: Entry description, which can consist of several 658 // sentences or paragraphs that describe entry contents. Default value 659 // is an empty string. 660 Description string `json:"description,omitempty"` 661 662 // DisplayName: Display information such as title and description. A 663 // short name to identify the entry, for example, "Analytics Data - Jan 664 // 2011". Default value is an empty string. 665 DisplayName string `json:"displayName,omitempty"` 666 667 // GcsFilesetSpec: Specification that applies to a Cloud Storage 668 // fileset. This is only valid on entries of type FILESET. 669 GcsFilesetSpec *GoogleCloudDatacatalogV1beta1GcsFilesetSpec `json:"gcsFilesetSpec,omitempty"` 670 671 // IntegratedSystem: Output only. This field indicates the entry's 672 // source system that Data Catalog integrates with, such as BigQuery or 673 // Pub/Sub. 674 // 675 // Possible values: 676 // "INTEGRATED_SYSTEM_UNSPECIFIED" - Default unknown system. 677 // "BIGQUERY" - BigQuery. 678 // "CLOUD_PUBSUB" - Cloud Pub/Sub. 679 IntegratedSystem string `json:"integratedSystem,omitempty"` 680 681 // LinkedResource: The resource this metadata entry refers to. For 682 // Google Cloud Platform resources, `linked_resource` is the [full name 683 // of the 684 // resource](https://cloud.google.com/apis/design/resource_names#full_res 685 // ource_name). For example, the `linked_resource` for a table resource 686 // from BigQuery is: * 687 // //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables 688 // /tableId Output only when Entry is of type in the EntryType enum. For 689 // entries with user_specified_type, this field is optional and defaults 690 // to an empty string. 691 LinkedResource string `json:"linkedResource,omitempty"` 692 693 // Name: The Data Catalog resource name of the entry in URL format. 694 // Example: * 695 // projects/{project_id}/locations/{location}/entryGroups/{entry_group_id 696 // }/entries/{entry_id} Note that this Entry and its child resources may 697 // not actually be stored in the location in this name. 698 Name string `json:"name,omitempty"` 699 700 // Schema: Schema of the entry. An entry might not have any schema 701 // attached to it. 702 Schema *GoogleCloudDatacatalogV1beta1Schema `json:"schema,omitempty"` 703 704 // SourceSystemTimestamps: Output only. Timestamps about the underlying 705 // resource, not about this Data Catalog entry. Output only when Entry 706 // is of type in the EntryType enum. For entries with 707 // user_specified_type, this field is optional and defaults to an empty 708 // timestamp. 709 SourceSystemTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"sourceSystemTimestamps,omitempty"` 710 711 // Type: The type of the entry. Only used for Entries with types in the 712 // EntryType enum. 713 // 714 // Possible values: 715 // "ENTRY_TYPE_UNSPECIFIED" - Default unknown type. 716 // "TABLE" - Output only. The type of entry that has a GoogleSQL 717 // schema, including logical views. 718 // "MODEL" - Output only. The type of models. 719 // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro 720 // "DATA_STREAM" - Output only. An entry type which is used for 721 // streaming entries. Example: Pub/Sub topic. 722 // "FILESET" - An entry type which is a set of files or objects. 723 // Example: Cloud Storage fileset. 724 Type string `json:"type,omitempty"` 725 726 // UserSpecifiedSystem: This field indicates the entry's source system 727 // that Data Catalog does not integrate with. `user_specified_system` 728 // strings must begin with a letter or underscore and can only contain 729 // letters, numbers, and underscores; are case insensitive; must be at 730 // least 1 character and at most 64 characters long. 731 UserSpecifiedSystem string `json:"userSpecifiedSystem,omitempty"` 732 733 // UserSpecifiedType: Entry type if it does not fit any of the 734 // input-allowed values listed in `EntryType` enum above. When creating 735 // an entry, users should check the enum values first, if nothing 736 // matches the entry to be created, then provide a custom value, for 737 // example "my_special_type". `user_specified_type` strings must begin 738 // with a letter or underscore and can only contain letters, numbers, 739 // and underscores; are case insensitive; must be at least 1 character 740 // and at most 64 characters long. Currently, only FILESET enum value is 741 // allowed. All other entries created through Data Catalog must use 742 // `user_specified_type`. 743 UserSpecifiedType string `json:"userSpecifiedType,omitempty"` 744 745 // ServerResponse contains the HTTP response code and headers from the 746 // server. 747 googleapi.ServerResponse `json:"-"` 748 749 // ForceSendFields is a list of field names (e.g. 750 // "BigqueryDateShardedSpec") to unconditionally include in API 751 // requests. By default, fields with empty values are omitted from API 752 // requests. However, any non-pointer, non-interface field appearing in 753 // ForceSendFields will be sent to the server regardless of whether the 754 // field is empty or not. This may be used to include empty fields in 755 // Patch requests. 756 ForceSendFields []string `json:"-"` 757 758 // NullFields is a list of field names (e.g. "BigqueryDateShardedSpec") 759 // to include in API requests with the JSON null value. By default, 760 // fields with empty values are omitted from API requests. However, any 761 // field with an empty value appearing in NullFields will be sent to the 762 // server as null. It is an error if a field in this list has a 763 // non-empty value. This may be used to include null fields in Patch 764 // requests. 765 NullFields []string `json:"-"` 766} 767 768func (s *GoogleCloudDatacatalogV1beta1Entry) MarshalJSON() ([]byte, error) { 769 type NoMethod GoogleCloudDatacatalogV1beta1Entry 770 raw := NoMethod(*s) 771 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 772} 773 774// GoogleCloudDatacatalogV1beta1EntryGroup: EntryGroup Metadata. An 775// EntryGroup resource represents a logical grouping of zero or more 776// Data Catalog Entry resources. 777type GoogleCloudDatacatalogV1beta1EntryGroup struct { 778 // DataCatalogTimestamps: Output only. Timestamps about this EntryGroup. 779 // Default value is empty timestamps. 780 DataCatalogTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"dataCatalogTimestamps,omitempty"` 781 782 // Description: Entry group description, which can consist of several 783 // sentences or paragraphs that describe entry group contents. Default 784 // value is an empty string. 785 Description string `json:"description,omitempty"` 786 787 // DisplayName: A short name to identify the entry group, for example, 788 // "analytics data - jan 2011". Default value is an empty string. 789 DisplayName string `json:"displayName,omitempty"` 790 791 // Name: The resource name of the entry group in URL format. Example: * 792 // projects/{project_id}/locations/{location}/entryGroups/{entry_group_id 793 // } Note that this EntryGroup and its child resources may not actually 794 // be stored in the location in this name. 795 Name string `json:"name,omitempty"` 796 797 // ServerResponse contains the HTTP response code and headers from the 798 // server. 799 googleapi.ServerResponse `json:"-"` 800 801 // ForceSendFields is a list of field names (e.g. 802 // "DataCatalogTimestamps") to unconditionally include in API requests. 803 // By default, fields with empty values are omitted from API requests. 804 // However, any non-pointer, non-interface field appearing in 805 // ForceSendFields will be sent to the server regardless of whether the 806 // field is empty or not. This may be used to include empty fields in 807 // Patch requests. 808 ForceSendFields []string `json:"-"` 809 810 // NullFields is a list of field names (e.g. "DataCatalogTimestamps") to 811 // include in API requests with the JSON null value. By default, fields 812 // with empty values are omitted from API requests. However, any field 813 // with an empty value appearing in NullFields will be sent to the 814 // server as null. It is an error if a field in this list has a 815 // non-empty value. This may be used to include null fields in Patch 816 // requests. 817 NullFields []string `json:"-"` 818} 819 820func (s *GoogleCloudDatacatalogV1beta1EntryGroup) MarshalJSON() ([]byte, error) { 821 type NoMethod GoogleCloudDatacatalogV1beta1EntryGroup 822 raw := NoMethod(*s) 823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 824} 825 826// GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse: Response 827// message for ExportTaxonomies. 828type GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse struct { 829 // Taxonomies: List of taxonomies and policy tags in a tree structure. 830 Taxonomies []*GoogleCloudDatacatalogV1beta1SerializedTaxonomy `json:"taxonomies,omitempty"` 831 832 // ServerResponse contains the HTTP response code and headers from the 833 // server. 834 googleapi.ServerResponse `json:"-"` 835 836 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 837 // unconditionally include in API requests. By default, fields with 838 // empty values are omitted from API requests. However, any non-pointer, 839 // non-interface field appearing in ForceSendFields will be sent to the 840 // server regardless of whether the field is empty or not. This may be 841 // used to include empty fields in Patch requests. 842 ForceSendFields []string `json:"-"` 843 844 // NullFields is a list of field names (e.g. "Taxonomies") to include in 845 // API requests with the JSON null value. By default, fields with empty 846 // values are omitted from API requests. However, any field with an 847 // empty value appearing in NullFields will be sent to the server as 848 // null. It is an error if a field in this list has a non-empty value. 849 // This may be used to include null fields in Patch requests. 850 NullFields []string `json:"-"` 851} 852 853func (s *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse) MarshalJSON() ([]byte, error) { 854 type NoMethod GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse 855 raw := NoMethod(*s) 856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 857} 858 859type GoogleCloudDatacatalogV1beta1FieldType struct { 860 // EnumType: Represents an enum type. 861 EnumType *GoogleCloudDatacatalogV1beta1FieldTypeEnumType `json:"enumType,omitempty"` 862 863 // PrimitiveType: Represents primitive types - string, bool etc. 864 // 865 // Possible values: 866 // "PRIMITIVE_TYPE_UNSPECIFIED" - This is the default invalid value 867 // for a type. 868 // "DOUBLE" - A double precision number. 869 // "STRING" - An UTF-8 string. 870 // "BOOL" - A boolean value. 871 // "TIMESTAMP" - A timestamp. 872 PrimitiveType string `json:"primitiveType,omitempty"` 873 874 // ForceSendFields is a list of field names (e.g. "EnumType") to 875 // unconditionally include in API requests. By default, fields with 876 // empty values are omitted from API requests. However, any non-pointer, 877 // non-interface field appearing in ForceSendFields will be sent to the 878 // server regardless of whether the field is empty or not. This may be 879 // used to include empty fields in Patch requests. 880 ForceSendFields []string `json:"-"` 881 882 // NullFields is a list of field names (e.g. "EnumType") to include in 883 // API requests with the JSON null value. By default, fields with empty 884 // values are omitted from API requests. However, any field with an 885 // empty value appearing in NullFields will be sent to the server as 886 // null. It is an error if a field in this list has a non-empty value. 887 // This may be used to include null fields in Patch requests. 888 NullFields []string `json:"-"` 889} 890 891func (s *GoogleCloudDatacatalogV1beta1FieldType) MarshalJSON() ([]byte, error) { 892 type NoMethod GoogleCloudDatacatalogV1beta1FieldType 893 raw := NoMethod(*s) 894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 895} 896 897type GoogleCloudDatacatalogV1beta1FieldTypeEnumType struct { 898 // AllowedValues: The set of allowed values for this enum. This set must 899 // not be empty, the display names of the values in this set must not be 900 // empty and the display names of the values must be case-insensitively 901 // unique within this set. The order of items in this list is preserved. 902 // This field can be used to Required on create; optional on update. The 903 // set of allowed values for this enum. This set must not be empty, the 904 // display names of the values in this set must not be empty and the 905 // display names of the values must be case-insensitively unique within 906 // this set. Currently, enum values can only be added to the list of 907 // allowed values. Deletion and renaming of enum values are not 908 // supported. Can have up to 500 allowed values. 909 AllowedValues []*GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue `json:"allowedValues,omitempty"` 910 911 // ForceSendFields is a list of field names (e.g. "AllowedValues") to 912 // unconditionally include in API requests. By default, fields with 913 // empty values are omitted from API requests. However, any non-pointer, 914 // non-interface field appearing in ForceSendFields will be sent to the 915 // server regardless of whether the field is empty or not. This may be 916 // used to include empty fields in Patch requests. 917 ForceSendFields []string `json:"-"` 918 919 // NullFields is a list of field names (e.g. "AllowedValues") to include 920 // in API requests with the JSON null value. By default, fields with 921 // empty values are omitted from API requests. However, any field with 922 // an empty value appearing in NullFields will be sent to the server as 923 // null. It is an error if a field in this list has a non-empty value. 924 // This may be used to include null fields in Patch requests. 925 NullFields []string `json:"-"` 926} 927 928func (s *GoogleCloudDatacatalogV1beta1FieldTypeEnumType) MarshalJSON() ([]byte, error) { 929 type NoMethod GoogleCloudDatacatalogV1beta1FieldTypeEnumType 930 raw := NoMethod(*s) 931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 932} 933 934type GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue struct { 935 // DisplayName: Required. The display name of the enum value. Must not 936 // be an empty string. 937 DisplayName string `json:"displayName,omitempty"` 938 939 // ForceSendFields is a list of field names (e.g. "DisplayName") to 940 // unconditionally include in API requests. By default, fields with 941 // empty values are omitted from API requests. However, any non-pointer, 942 // non-interface field appearing in ForceSendFields will be sent to the 943 // server regardless of whether the field is empty or not. This may be 944 // used to include empty fields in Patch requests. 945 ForceSendFields []string `json:"-"` 946 947 // NullFields is a list of field names (e.g. "DisplayName") to include 948 // in API requests with the JSON null value. By default, fields with 949 // empty values are omitted from API requests. However, any field with 950 // an empty value appearing in NullFields will be sent to the server as 951 // null. It is an error if a field in this list has a non-empty value. 952 // This may be used to include null fields in Patch requests. 953 NullFields []string `json:"-"` 954} 955 956func (s *GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue) MarshalJSON() ([]byte, error) { 957 type NoMethod GoogleCloudDatacatalogV1beta1FieldTypeEnumTypeEnumValue 958 raw := NoMethod(*s) 959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 960} 961 962// GoogleCloudDatacatalogV1beta1GcsFileSpec: Specifications of a single 963// file in Cloud Storage. 964type GoogleCloudDatacatalogV1beta1GcsFileSpec struct { 965 // FilePath: Required. The full file path. Example: 966 // `gs://bucket_name/a/b.txt`. 967 FilePath string `json:"filePath,omitempty"` 968 969 // GcsTimestamps: Output only. Timestamps about the Cloud Storage file. 970 GcsTimestamps *GoogleCloudDatacatalogV1beta1SystemTimestamps `json:"gcsTimestamps,omitempty"` 971 972 // SizeBytes: Output only. The size of the file, in bytes. 973 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 974 975 // ForceSendFields is a list of field names (e.g. "FilePath") to 976 // unconditionally include in API requests. By default, fields with 977 // empty values are omitted from API requests. However, any non-pointer, 978 // non-interface field appearing in ForceSendFields will be sent to the 979 // server regardless of whether the field is empty or not. This may be 980 // used to include empty fields in Patch requests. 981 ForceSendFields []string `json:"-"` 982 983 // NullFields is a list of field names (e.g. "FilePath") to include in 984 // API requests with the JSON null value. By default, fields with empty 985 // values are omitted from API requests. However, any field with an 986 // empty value appearing in NullFields will be sent to the server as 987 // null. It is an error if a field in this list has a non-empty value. 988 // This may be used to include null fields in Patch requests. 989 NullFields []string `json:"-"` 990} 991 992func (s *GoogleCloudDatacatalogV1beta1GcsFileSpec) MarshalJSON() ([]byte, error) { 993 type NoMethod GoogleCloudDatacatalogV1beta1GcsFileSpec 994 raw := NoMethod(*s) 995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 996} 997 998// GoogleCloudDatacatalogV1beta1GcsFilesetSpec: Describes a Cloud 999// Storage fileset entry. 1000type GoogleCloudDatacatalogV1beta1GcsFilesetSpec struct { 1001 // FilePatterns: Required. Patterns to identify a set of files in Google 1002 // Cloud Storage. See [Cloud Storage 1003 // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/W 1004 // ildcardNames) for more information. Note that bucket wildcards are 1005 // currently not supported. Examples of valid file_patterns: * 1006 // `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` 1007 // directory. * `gs://bucket_name/dir/**`: matches all files in 1008 // `bucket_name/dir` spanning all subdirectories. * 1009 // `gs://bucket_name/file*`: matches files prefixed by `file` in 1010 // `bucket_name` * `gs://bucket_name/??.txt`: matches files with two 1011 // characters followed by `.txt` in `bucket_name` * 1012 // `gs://bucket_name/[aeiou].txt`: matches files that contain a single 1013 // vowel character followed by `.txt` in `bucket_name` * 1014 // `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, 1015 // ... or `m` followed by `.txt` in `bucket_name` * 1016 // `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that 1017 // match `a/*/b` pattern, such as `a/c/b`, `a/d/b` * 1018 // `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` You 1019 // can combine wildcards to provide more powerful matches, for example: 1020 // * `gs://bucket_name/[a-m]??.j*g` 1021 FilePatterns []string `json:"filePatterns,omitempty"` 1022 1023 // SampleGcsFileSpecs: Output only. Sample files contained in this 1024 // fileset, not all files contained in this fileset are represented 1025 // here. 1026 SampleGcsFileSpecs []*GoogleCloudDatacatalogV1beta1GcsFileSpec `json:"sampleGcsFileSpecs,omitempty"` 1027 1028 // ForceSendFields is a list of field names (e.g. "FilePatterns") to 1029 // unconditionally include in API requests. By default, fields with 1030 // empty values are omitted from API requests. However, any non-pointer, 1031 // non-interface field appearing in ForceSendFields will be sent to the 1032 // server regardless of whether the field is empty or not. This may be 1033 // used to include empty fields in Patch requests. 1034 ForceSendFields []string `json:"-"` 1035 1036 // NullFields is a list of field names (e.g. "FilePatterns") to include 1037 // in API requests with the JSON null value. By default, fields with 1038 // empty values are omitted from API requests. However, any field with 1039 // an empty value appearing in NullFields will be sent to the server as 1040 // null. It is an error if a field in this list has a non-empty value. 1041 // This may be used to include null fields in Patch requests. 1042 NullFields []string `json:"-"` 1043} 1044 1045func (s *GoogleCloudDatacatalogV1beta1GcsFilesetSpec) MarshalJSON() ([]byte, error) { 1046 type NoMethod GoogleCloudDatacatalogV1beta1GcsFilesetSpec 1047 raw := NoMethod(*s) 1048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1049} 1050 1051// GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest: Request message 1052// for ImportTaxonomies. 1053type GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest struct { 1054 // InlineSource: Inline source used for taxonomies to be imported. 1055 InlineSource *GoogleCloudDatacatalogV1beta1InlineSource `json:"inlineSource,omitempty"` 1056 1057 // ForceSendFields is a list of field names (e.g. "InlineSource") to 1058 // unconditionally include in API requests. By default, fields with 1059 // empty values are omitted from API requests. However, any non-pointer, 1060 // non-interface field appearing in ForceSendFields will be sent to the 1061 // server regardless of whether the field is empty or not. This may be 1062 // used to include empty fields in Patch requests. 1063 ForceSendFields []string `json:"-"` 1064 1065 // NullFields is a list of field names (e.g. "InlineSource") to include 1066 // in API requests with the JSON null value. By default, fields with 1067 // empty values are omitted from API requests. However, any field with 1068 // an empty value appearing in NullFields will be sent to the server as 1069 // null. It is an error if a field in this list has a non-empty value. 1070 // This may be used to include null fields in Patch requests. 1071 NullFields []string `json:"-"` 1072} 1073 1074func (s *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest) MarshalJSON() ([]byte, error) { 1075 type NoMethod GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest 1076 raw := NoMethod(*s) 1077 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1078} 1079 1080// GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse: Response 1081// message for ImportTaxonomies. 1082type GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse struct { 1083 // Taxonomies: Taxonomies that were imported. 1084 Taxonomies []*GoogleCloudDatacatalogV1beta1Taxonomy `json:"taxonomies,omitempty"` 1085 1086 // ServerResponse contains the HTTP response code and headers from the 1087 // server. 1088 googleapi.ServerResponse `json:"-"` 1089 1090 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 1091 // unconditionally include in API requests. By default, fields with 1092 // empty values are omitted from API requests. However, any non-pointer, 1093 // non-interface field appearing in ForceSendFields will be sent to the 1094 // server regardless of whether the field is empty or not. This may be 1095 // used to include empty fields in Patch requests. 1096 ForceSendFields []string `json:"-"` 1097 1098 // NullFields is a list of field names (e.g. "Taxonomies") to include in 1099 // API requests with the JSON null value. By default, fields with empty 1100 // values are omitted from API requests. However, any field with an 1101 // empty value appearing in NullFields will be sent to the server as 1102 // null. It is an error if a field in this list has a non-empty value. 1103 // This may be used to include null fields in Patch requests. 1104 NullFields []string `json:"-"` 1105} 1106 1107func (s *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse) MarshalJSON() ([]byte, error) { 1108 type NoMethod GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse 1109 raw := NoMethod(*s) 1110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1111} 1112 1113// GoogleCloudDatacatalogV1beta1InlineSource: Inline source used for 1114// taxonomies import. 1115type GoogleCloudDatacatalogV1beta1InlineSource struct { 1116 // Taxonomies: Required. Taxonomies to be imported. 1117 Taxonomies []*GoogleCloudDatacatalogV1beta1SerializedTaxonomy `json:"taxonomies,omitempty"` 1118 1119 // ForceSendFields is a list of field names (e.g. "Taxonomies") to 1120 // unconditionally include in API requests. By default, fields with 1121 // empty values are omitted from API requests. However, any non-pointer, 1122 // non-interface field appearing in ForceSendFields will be sent to the 1123 // server regardless of whether the field is empty or not. This may be 1124 // used to include empty fields in Patch requests. 1125 ForceSendFields []string `json:"-"` 1126 1127 // NullFields is a list of field names (e.g. "Taxonomies") to include in 1128 // API requests with the JSON null value. By default, fields with empty 1129 // values are omitted from API requests. However, any field with an 1130 // empty value appearing in NullFields will be sent to the server as 1131 // null. It is an error if a field in this list has a non-empty value. 1132 // This may be used to include null fields in Patch requests. 1133 NullFields []string `json:"-"` 1134} 1135 1136func (s *GoogleCloudDatacatalogV1beta1InlineSource) MarshalJSON() ([]byte, error) { 1137 type NoMethod GoogleCloudDatacatalogV1beta1InlineSource 1138 raw := NoMethod(*s) 1139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1140} 1141 1142// GoogleCloudDatacatalogV1beta1ListEntriesResponse: Response message 1143// for ListEntries. 1144type GoogleCloudDatacatalogV1beta1ListEntriesResponse struct { 1145 // Entries: Entry details. 1146 Entries []*GoogleCloudDatacatalogV1beta1Entry `json:"entries,omitempty"` 1147 1148 // NextPageToken: Token to retrieve the next page of results. It is set 1149 // to empty if no items remain in results. 1150 NextPageToken string `json:"nextPageToken,omitempty"` 1151 1152 // ServerResponse contains the HTTP response code and headers from the 1153 // server. 1154 googleapi.ServerResponse `json:"-"` 1155 1156 // ForceSendFields is a list of field names (e.g. "Entries") to 1157 // unconditionally include in API requests. By default, fields with 1158 // empty values are omitted from API requests. However, any non-pointer, 1159 // non-interface field appearing in ForceSendFields will be sent to the 1160 // server regardless of whether the field is empty or not. This may be 1161 // used to include empty fields in Patch requests. 1162 ForceSendFields []string `json:"-"` 1163 1164 // NullFields is a list of field names (e.g. "Entries") to include in 1165 // API requests with the JSON null value. By default, fields with empty 1166 // values are omitted from API requests. However, any field with an 1167 // empty value appearing in NullFields will be sent to the server as 1168 // null. It is an error if a field in this list has a non-empty value. 1169 // This may be used to include null fields in Patch requests. 1170 NullFields []string `json:"-"` 1171} 1172 1173func (s *GoogleCloudDatacatalogV1beta1ListEntriesResponse) MarshalJSON() ([]byte, error) { 1174 type NoMethod GoogleCloudDatacatalogV1beta1ListEntriesResponse 1175 raw := NoMethod(*s) 1176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1177} 1178 1179// GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse: Response 1180// message for ListEntryGroups. 1181type GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse struct { 1182 // EntryGroups: EntryGroup details. 1183 EntryGroups []*GoogleCloudDatacatalogV1beta1EntryGroup `json:"entryGroups,omitempty"` 1184 1185 // NextPageToken: Token to retrieve the next page of results. It is set 1186 // to empty if no items remain in results. 1187 NextPageToken string `json:"nextPageToken,omitempty"` 1188 1189 // ServerResponse contains the HTTP response code and headers from the 1190 // server. 1191 googleapi.ServerResponse `json:"-"` 1192 1193 // ForceSendFields is a list of field names (e.g. "EntryGroups") to 1194 // unconditionally include in API requests. By default, fields with 1195 // empty values are omitted from API requests. However, any non-pointer, 1196 // non-interface field appearing in ForceSendFields will be sent to the 1197 // server regardless of whether the field is empty or not. This may be 1198 // used to include empty fields in Patch requests. 1199 ForceSendFields []string `json:"-"` 1200 1201 // NullFields is a list of field names (e.g. "EntryGroups") to include 1202 // in API requests with the JSON null value. By default, fields with 1203 // empty values are omitted from API requests. However, any field with 1204 // an empty value appearing in NullFields will be sent to the server as 1205 // null. It is an error if a field in this list has a non-empty value. 1206 // This may be used to include null fields in Patch requests. 1207 NullFields []string `json:"-"` 1208} 1209 1210func (s *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse) MarshalJSON() ([]byte, error) { 1211 type NoMethod GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse 1212 raw := NoMethod(*s) 1213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1214} 1215 1216// GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse: Response message 1217// for ListPolicyTags. 1218type GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse struct { 1219 // NextPageToken: Token used to retrieve the next page of results, or 1220 // empty if there are no more results in the list. 1221 NextPageToken string `json:"nextPageToken,omitempty"` 1222 1223 // PolicyTags: The policy tags that are in the requested taxonomy. 1224 PolicyTags []*GoogleCloudDatacatalogV1beta1PolicyTag `json:"policyTags,omitempty"` 1225 1226 // ServerResponse contains the HTTP response code and headers from the 1227 // server. 1228 googleapi.ServerResponse `json:"-"` 1229 1230 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1231 // unconditionally include in API requests. By default, fields with 1232 // empty values are omitted from API requests. However, any non-pointer, 1233 // non-interface field appearing in ForceSendFields will be sent to the 1234 // server regardless of whether the field is empty or not. This may be 1235 // used to include empty fields in Patch requests. 1236 ForceSendFields []string `json:"-"` 1237 1238 // NullFields is a list of field names (e.g. "NextPageToken") to include 1239 // in API requests with the JSON null value. By default, fields with 1240 // empty values are omitted from API requests. However, any field with 1241 // an empty value appearing in NullFields will be sent to the server as 1242 // null. It is an error if a field in this list has a non-empty value. 1243 // This may be used to include null fields in Patch requests. 1244 NullFields []string `json:"-"` 1245} 1246 1247func (s *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse) MarshalJSON() ([]byte, error) { 1248 type NoMethod GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse 1249 raw := NoMethod(*s) 1250 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1251} 1252 1253// GoogleCloudDatacatalogV1beta1ListTagsResponse: Response message for 1254// ListTags. 1255type GoogleCloudDatacatalogV1beta1ListTagsResponse struct { 1256 // NextPageToken: Token to retrieve the next page of results. It is set 1257 // to empty if no items remain in results. 1258 NextPageToken string `json:"nextPageToken,omitempty"` 1259 1260 // Tags: Tag details. 1261 Tags []*GoogleCloudDatacatalogV1beta1Tag `json:"tags,omitempty"` 1262 1263 // ServerResponse contains the HTTP response code and headers from the 1264 // server. 1265 googleapi.ServerResponse `json:"-"` 1266 1267 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1268 // unconditionally include in API requests. By default, fields with 1269 // empty values are omitted from API requests. However, any non-pointer, 1270 // non-interface field appearing in ForceSendFields will be sent to the 1271 // server regardless of whether the field is empty or not. This may be 1272 // used to include empty fields in Patch requests. 1273 ForceSendFields []string `json:"-"` 1274 1275 // NullFields is a list of field names (e.g. "NextPageToken") to include 1276 // in API requests with the JSON null value. By default, fields with 1277 // empty values are omitted from API requests. However, any field with 1278 // an empty value appearing in NullFields will be sent to the server as 1279 // null. It is an error if a field in this list has a non-empty value. 1280 // This may be used to include null fields in Patch requests. 1281 NullFields []string `json:"-"` 1282} 1283 1284func (s *GoogleCloudDatacatalogV1beta1ListTagsResponse) MarshalJSON() ([]byte, error) { 1285 type NoMethod GoogleCloudDatacatalogV1beta1ListTagsResponse 1286 raw := NoMethod(*s) 1287 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1288} 1289 1290// GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse: Response message 1291// for ListTaxonomies. 1292type GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse struct { 1293 // NextPageToken: Token used to retrieve the next page of results, or 1294 // empty if there are no more results in the list. 1295 NextPageToken string `json:"nextPageToken,omitempty"` 1296 1297 // Taxonomies: Taxonomies that the project contains. 1298 Taxonomies []*GoogleCloudDatacatalogV1beta1Taxonomy `json:"taxonomies,omitempty"` 1299 1300 // ServerResponse contains the HTTP response code and headers from the 1301 // server. 1302 googleapi.ServerResponse `json:"-"` 1303 1304 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1305 // unconditionally include in API requests. By default, fields with 1306 // empty values are omitted from API requests. However, any non-pointer, 1307 // non-interface field appearing in ForceSendFields will be sent to the 1308 // server regardless of whether the field is empty or not. This may be 1309 // used to include empty fields in Patch requests. 1310 ForceSendFields []string `json:"-"` 1311 1312 // NullFields is a list of field names (e.g. "NextPageToken") to include 1313 // in API requests with the JSON null value. By default, fields with 1314 // empty values are omitted from API requests. However, any field with 1315 // an empty value appearing in NullFields will be sent to the server as 1316 // null. It is an error if a field in this list has a non-empty value. 1317 // This may be used to include null fields in Patch requests. 1318 NullFields []string `json:"-"` 1319} 1320 1321func (s *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse) MarshalJSON() ([]byte, error) { 1322 type NoMethod GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse 1323 raw := NoMethod(*s) 1324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1325} 1326 1327// GoogleCloudDatacatalogV1beta1PolicyTag: Denotes one policy tag in a 1328// taxonomy (e.g. ssn). Policy Tags can be defined in a hierarchy. For 1329// example, consider the following hierarchy: Geolocation -> (LatLong, 1330// City, ZipCode). PolicyTag "Geolocation" contains three child policy 1331// tags: "LatLong", "City", and "ZipCode". 1332type GoogleCloudDatacatalogV1beta1PolicyTag struct { 1333 // ChildPolicyTags: Output only. Resource names of child policy tags of 1334 // this policy tag. 1335 ChildPolicyTags []string `json:"childPolicyTags,omitempty"` 1336 1337 // Description: Description of this policy tag. It must: contain only 1338 // unicode characters, tabs, newlines, carriage returns and page breaks; 1339 // and be at most 2000 bytes long when encoded in UTF-8. If not set, 1340 // defaults to an empty description. If not set, defaults to an empty 1341 // description. 1342 Description string `json:"description,omitempty"` 1343 1344 // DisplayName: Required. User defined name of this policy tag. It must: 1345 // be unique within the parent taxonomy; contain only unicode letters, 1346 // numbers, underscores, dashes and spaces; not start or end with 1347 // spaces; and be at most 200 bytes long when encoded in UTF-8. 1348 DisplayName string `json:"displayName,omitempty"` 1349 1350 // Name: Output only. Resource name of this policy tag, whose format is: 1351 // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonom 1352 // y_id}/policyTags/{id}". 1353 Name string `json:"name,omitempty"` 1354 1355 // ParentPolicyTag: Resource name of this policy tag's parent policy tag 1356 // (e.g. for the "LatLong" policy tag in the example above, this field 1357 // contains the resource name of the "Geolocation" policy tag). If 1358 // empty, it means this policy tag is a top level policy tag (e.g. this 1359 // field is empty for the "Geolocation" policy tag in the example 1360 // above). If not set, defaults to an empty string. 1361 ParentPolicyTag string `json:"parentPolicyTag,omitempty"` 1362 1363 // ServerResponse contains the HTTP response code and headers from the 1364 // server. 1365 googleapi.ServerResponse `json:"-"` 1366 1367 // ForceSendFields is a list of field names (e.g. "ChildPolicyTags") to 1368 // unconditionally include in API requests. By default, fields with 1369 // empty values are omitted from API requests. However, any non-pointer, 1370 // non-interface field appearing in ForceSendFields will be sent to the 1371 // server regardless of whether the field is empty or not. This may be 1372 // used to include empty fields in Patch requests. 1373 ForceSendFields []string `json:"-"` 1374 1375 // NullFields is a list of field names (e.g. "ChildPolicyTags") to 1376 // include in API requests with the JSON null value. By default, fields 1377 // with empty values are omitted from API requests. However, any field 1378 // with an empty value appearing in NullFields will be sent to the 1379 // server as null. It is an error if a field in this list has a 1380 // non-empty value. This may be used to include null fields in Patch 1381 // requests. 1382 NullFields []string `json:"-"` 1383} 1384 1385func (s *GoogleCloudDatacatalogV1beta1PolicyTag) MarshalJSON() ([]byte, error) { 1386 type NoMethod GoogleCloudDatacatalogV1beta1PolicyTag 1387 raw := NoMethod(*s) 1388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1389} 1390 1391// GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest: 1392// Request message for RenameTagTemplateFieldEnumValue. 1393type GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest struct { 1394 // NewEnumValueDisplayName: Required. The new display name of the enum 1395 // value. For example, `my_new_enum_value`. 1396 NewEnumValueDisplayName string `json:"newEnumValueDisplayName,omitempty"` 1397 1398 // ForceSendFields is a list of field names (e.g. 1399 // "NewEnumValueDisplayName") to unconditionally include in API 1400 // requests. By default, fields with empty values are omitted from API 1401 // requests. However, any non-pointer, non-interface field appearing in 1402 // ForceSendFields will be sent to the server regardless of whether the 1403 // field is empty or not. This may be used to include empty fields in 1404 // Patch requests. 1405 ForceSendFields []string `json:"-"` 1406 1407 // NullFields is a list of field names (e.g. "NewEnumValueDisplayName") 1408 // to include in API requests with the JSON null value. By default, 1409 // fields with empty values are omitted from API requests. However, any 1410 // field with an empty value appearing in NullFields will be sent to the 1411 // server as null. It is an error if a field in this list has a 1412 // non-empty value. This may be used to include null fields in Patch 1413 // requests. 1414 NullFields []string `json:"-"` 1415} 1416 1417func (s *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest) MarshalJSON() ([]byte, error) { 1418 type NoMethod GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest 1419 raw := NoMethod(*s) 1420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1421} 1422 1423// GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest: Request 1424// message for RenameTagTemplateField. 1425type GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest struct { 1426 // NewTagTemplateFieldId: Required. The new ID of this tag template 1427 // field. For example, `my_new_field`. 1428 NewTagTemplateFieldId string `json:"newTagTemplateFieldId,omitempty"` 1429 1430 // ForceSendFields is a list of field names (e.g. 1431 // "NewTagTemplateFieldId") to unconditionally include in API requests. 1432 // By default, fields with empty values are omitted from API requests. 1433 // However, any non-pointer, non-interface field appearing in 1434 // ForceSendFields will be sent to the server regardless of whether the 1435 // field is empty or not. This may be used to include empty fields in 1436 // Patch requests. 1437 ForceSendFields []string `json:"-"` 1438 1439 // NullFields is a list of field names (e.g. "NewTagTemplateFieldId") to 1440 // include in API requests with the JSON null value. By default, fields 1441 // with empty values are omitted from API requests. However, any field 1442 // with an empty value appearing in NullFields will be sent to the 1443 // server as null. It is an error if a field in this list has a 1444 // non-empty value. This may be used to include null fields in Patch 1445 // requests. 1446 NullFields []string `json:"-"` 1447} 1448 1449func (s *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest) MarshalJSON() ([]byte, error) { 1450 type NoMethod GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest 1451 raw := NoMethod(*s) 1452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1453} 1454 1455// GoogleCloudDatacatalogV1beta1Schema: Represents a schema (e.g. 1456// BigQuery, GoogleSQL, Avro schema). 1457type GoogleCloudDatacatalogV1beta1Schema struct { 1458 // Columns: Required. Schema of columns. A maximum of 10,000 columns and 1459 // sub-columns can be specified. 1460 Columns []*GoogleCloudDatacatalogV1beta1ColumnSchema `json:"columns,omitempty"` 1461 1462 // ForceSendFields is a list of field names (e.g. "Columns") to 1463 // unconditionally include in API requests. By default, fields with 1464 // empty values are omitted from API requests. However, any non-pointer, 1465 // non-interface field appearing in ForceSendFields will be sent to the 1466 // server regardless of whether the field is empty or not. This may be 1467 // used to include empty fields in Patch requests. 1468 ForceSendFields []string `json:"-"` 1469 1470 // NullFields is a list of field names (e.g. "Columns") to include in 1471 // API requests with the JSON null value. By default, fields with empty 1472 // values are omitted from API requests. However, any field with an 1473 // empty value appearing in NullFields will be sent to the server as 1474 // null. It is an error if a field in this list has a non-empty value. 1475 // This may be used to include null fields in Patch requests. 1476 NullFields []string `json:"-"` 1477} 1478 1479func (s *GoogleCloudDatacatalogV1beta1Schema) MarshalJSON() ([]byte, error) { 1480 type NoMethod GoogleCloudDatacatalogV1beta1Schema 1481 raw := NoMethod(*s) 1482 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1483} 1484 1485// GoogleCloudDatacatalogV1beta1SearchCatalogRequest: Request message 1486// for SearchCatalog. 1487type GoogleCloudDatacatalogV1beta1SearchCatalogRequest struct { 1488 // OrderBy: Specifies the ordering of results, currently supported 1489 // case-sensitive choices are: * `relevance`, only supports descending * 1490 // `last_modified_timestamp [asc|desc]`, defaults to descending if not 1491 // specified If not specified, defaults to `relevance` descending. 1492 OrderBy string `json:"orderBy,omitempty"` 1493 1494 // PageSize: Number of results in the search page. If <=0 then defaults 1495 // to 10. Max limit for page_size is 1000. Throws an invalid argument 1496 // for page_size > 1000. 1497 PageSize int64 `json:"pageSize,omitempty"` 1498 1499 // PageToken: Optional. Pagination token returned in an earlier 1500 // SearchCatalogResponse.next_page_token, which indicates that this is a 1501 // continuation of a prior SearchCatalogRequest call, and that the 1502 // system should return the next page of data. If empty, the first page 1503 // is returned. 1504 PageToken string `json:"pageToken,omitempty"` 1505 1506 // Query: Optional. The query string in search query syntax. An empty 1507 // query string will result in all data assets (in the specified scope) 1508 // that the user has access to. Query strings can be simple as "x" or 1509 // more qualified as: * name:x * column:x * description:y Note: Query 1510 // tokens need to have a minimum of 3 characters for substring matching 1511 // to work correctly. See [Data Catalog Search 1512 // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-refer 1513 // ence) for more information. 1514 Query string `json:"query,omitempty"` 1515 1516 // Scope: Required. The scope of this search request. A `scope` that has 1517 // empty `include_org_ids`, `include_project_ids` AND false 1518 // `include_gcp_public_datasets` is considered invalid. Data Catalog 1519 // will return an error in such a case. 1520 Scope *GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope `json:"scope,omitempty"` 1521 1522 // ForceSendFields is a list of field names (e.g. "OrderBy") to 1523 // unconditionally include in API requests. By default, fields with 1524 // empty values are omitted from API requests. However, any non-pointer, 1525 // non-interface field appearing in ForceSendFields will be sent to the 1526 // server regardless of whether the field is empty or not. This may be 1527 // used to include empty fields in Patch requests. 1528 ForceSendFields []string `json:"-"` 1529 1530 // NullFields is a list of field names (e.g. "OrderBy") to include in 1531 // API requests with the JSON null value. By default, fields with empty 1532 // values are omitted from API requests. However, any field with an 1533 // empty value appearing in NullFields will be sent to the server as 1534 // null. It is an error if a field in this list has a non-empty value. 1535 // This may be used to include null fields in Patch requests. 1536 NullFields []string `json:"-"` 1537} 1538 1539func (s *GoogleCloudDatacatalogV1beta1SearchCatalogRequest) MarshalJSON() ([]byte, error) { 1540 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogRequest 1541 raw := NoMethod(*s) 1542 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1543} 1544 1545// GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope: The criteria 1546// that select the subspace used for query matching. 1547type GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope struct { 1548 // IncludeGcpPublicDatasets: If `true`, include Google Cloud Platform 1549 // (GCP) public datasets in the search results. Info on GCP public 1550 // datasets is available at https://cloud.google.com/public-datasets/. 1551 // By default, GCP public datasets are excluded. 1552 IncludeGcpPublicDatasets bool `json:"includeGcpPublicDatasets,omitempty"` 1553 1554 // IncludeOrgIds: The list of organization IDs to search within. To find 1555 // your organization ID, follow instructions in 1556 // https://cloud.google.com/resource-manager/docs/creating-managing-organization. 1557 IncludeOrgIds []string `json:"includeOrgIds,omitempty"` 1558 1559 // IncludeProjectIds: The list of project IDs to search within. To learn 1560 // more about the distinction between project names/IDs/numbers, go to 1561 // https://cloud.google.com/docs/overview/#projects. 1562 IncludeProjectIds []string `json:"includeProjectIds,omitempty"` 1563 1564 // RestrictedLocations: Optional. The list of locations to search 1565 // within. 1. If empty, search will be performed in all locations; 2. If 1566 // any of the locations are NOT in the valid locations list, error will 1567 // be returned; 3. Otherwise, search only the given locations for 1568 // matching results. Typical usage is to leave this field empty. When a 1569 // location is unreachable as returned in the 1570 // `SearchCatalogResponse.unreachable` field, users can repeat the 1571 // search request with this parameter set to get additional information 1572 // on the error. Valid locations: * asia-east1 * asia-east2 * 1573 // asia-northeast1 * asia-northeast2 * asia-northeast3 * asia-south1 * 1574 // asia-southeast1 * australia-southeast1 * eu * europe-north1 * 1575 // europe-west1 * europe-west2 * europe-west3 * europe-west4 * 1576 // europe-west6 * global * northamerica-northeast1 * southamerica-east1 1577 // * us * us-central1 * us-east1 * us-east4 * us-west1 * us-west2 1578 RestrictedLocations []string `json:"restrictedLocations,omitempty"` 1579 1580 // ForceSendFields is a list of field names (e.g. 1581 // "IncludeGcpPublicDatasets") to unconditionally include in API 1582 // requests. By default, fields with empty values are omitted from API 1583 // requests. However, any non-pointer, non-interface field appearing in 1584 // ForceSendFields will be sent to the server regardless of whether the 1585 // field is empty or not. This may be used to include empty fields in 1586 // Patch requests. 1587 ForceSendFields []string `json:"-"` 1588 1589 // NullFields is a list of field names (e.g. "IncludeGcpPublicDatasets") 1590 // to include in API requests with the JSON null value. By default, 1591 // fields with empty values are omitted from API requests. However, any 1592 // field with an empty value appearing in NullFields will be sent to the 1593 // server as null. It is an error if a field in this list has a 1594 // non-empty value. This may be used to include null fields in Patch 1595 // requests. 1596 NullFields []string `json:"-"` 1597} 1598 1599func (s *GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope) MarshalJSON() ([]byte, error) { 1600 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope 1601 raw := NoMethod(*s) 1602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1603} 1604 1605// GoogleCloudDatacatalogV1beta1SearchCatalogResponse: Response message 1606// for SearchCatalog. 1607type GoogleCloudDatacatalogV1beta1SearchCatalogResponse struct { 1608 // NextPageToken: The token that can be used to retrieve the next page 1609 // of results. 1610 NextPageToken string `json:"nextPageToken,omitempty"` 1611 1612 // Results: Search results. 1613 Results []*GoogleCloudDatacatalogV1beta1SearchCatalogResult `json:"results,omitempty"` 1614 1615 // Unreachable: Unreachable locations. Search result does not include 1616 // data from those locations. Users can get additional information on 1617 // the error by repeating the search request with a more restrictive 1618 // parameter -- setting the value for 1619 // `SearchDataCatalogRequest.scope.restricted_locations`. 1620 Unreachable []string `json:"unreachable,omitempty"` 1621 1622 // ServerResponse contains the HTTP response code and headers from the 1623 // server. 1624 googleapi.ServerResponse `json:"-"` 1625 1626 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1627 // unconditionally include in API requests. By default, fields with 1628 // empty values are omitted from API requests. However, any non-pointer, 1629 // non-interface field appearing in ForceSendFields will be sent to the 1630 // server regardless of whether the field is empty or not. This may be 1631 // used to include empty fields in Patch requests. 1632 ForceSendFields []string `json:"-"` 1633 1634 // NullFields is a list of field names (e.g. "NextPageToken") to include 1635 // in API requests with the JSON null value. By default, fields with 1636 // empty values are omitted from API requests. However, any field with 1637 // an empty value appearing in NullFields will be sent to the server as 1638 // null. It is an error if a field in this list has a non-empty value. 1639 // This may be used to include null fields in Patch requests. 1640 NullFields []string `json:"-"` 1641} 1642 1643func (s *GoogleCloudDatacatalogV1beta1SearchCatalogResponse) MarshalJSON() ([]byte, error) { 1644 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogResponse 1645 raw := NoMethod(*s) 1646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1647} 1648 1649// GoogleCloudDatacatalogV1beta1SearchCatalogResult: A result that 1650// appears in the response of a search request. Each result captures 1651// details of one entry that matches the search. 1652type GoogleCloudDatacatalogV1beta1SearchCatalogResult struct { 1653 // LinkedResource: The full name of the cloud resource the entry belongs 1654 // to. See: 1655 // https://cloud.google.com/apis/design/resource_names#full_resource_name. Example: * 1656 // `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/table 1657 // s/tableId` 1658 LinkedResource string `json:"linkedResource,omitempty"` 1659 1660 // RelativeResourceName: The relative resource name of the resource in 1661 // URL format. Examples: * 1662 // `projects/{project_id}/locations/{location_id}/entryGroups/{entry_grou 1663 // p_id}/entries/{entry_id}` * 1664 // `projects/{project_id}/tagTemplates/{tag_template_id}` 1665 RelativeResourceName string `json:"relativeResourceName,omitempty"` 1666 1667 // SearchResultSubtype: Sub-type of the search result. This is a 1668 // dot-delimited description of the resource's full type, and is the 1669 // same as the value callers would provide in the "type" search facet. 1670 // Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. 1671 SearchResultSubtype string `json:"searchResultSubtype,omitempty"` 1672 1673 // SearchResultType: Type of the search result. This field can be used 1674 // to determine which Get method to call to fetch the full resource. 1675 // 1676 // Possible values: 1677 // "SEARCH_RESULT_TYPE_UNSPECIFIED" - Default unknown type. 1678 // "ENTRY" - An Entry. 1679 // "TAG_TEMPLATE" - A TagTemplate. 1680 // "ENTRY_GROUP" - An EntryGroup. 1681 SearchResultType string `json:"searchResultType,omitempty"` 1682 1683 // ForceSendFields is a list of field names (e.g. "LinkedResource") to 1684 // unconditionally include in API requests. By default, fields with 1685 // empty values are omitted from API requests. However, any non-pointer, 1686 // non-interface field appearing in ForceSendFields will be sent to the 1687 // server regardless of whether the field is empty or not. This may be 1688 // used to include empty fields in Patch requests. 1689 ForceSendFields []string `json:"-"` 1690 1691 // NullFields is a list of field names (e.g. "LinkedResource") to 1692 // include in API requests with the JSON null value. By default, fields 1693 // with empty values are omitted from API requests. However, any field 1694 // with an empty value appearing in NullFields will be sent to the 1695 // server as null. It is an error if a field in this list has a 1696 // non-empty value. This may be used to include null fields in Patch 1697 // requests. 1698 NullFields []string `json:"-"` 1699} 1700 1701func (s *GoogleCloudDatacatalogV1beta1SearchCatalogResult) MarshalJSON() ([]byte, error) { 1702 type NoMethod GoogleCloudDatacatalogV1beta1SearchCatalogResult 1703 raw := NoMethod(*s) 1704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1705} 1706 1707// GoogleCloudDatacatalogV1beta1SerializedPolicyTag: Message 1708// representing one policy tag when exported as a nested proto. 1709type GoogleCloudDatacatalogV1beta1SerializedPolicyTag struct { 1710 // ChildPolicyTags: Children of the policy tag if any. 1711 ChildPolicyTags []*GoogleCloudDatacatalogV1beta1SerializedPolicyTag `json:"childPolicyTags,omitempty"` 1712 1713 // Description: Description of the serialized policy tag. The length of 1714 // the description is limited to 2000 bytes when encoded in UTF-8. If 1715 // not set, defaults to an empty description. 1716 Description string `json:"description,omitempty"` 1717 1718 // DisplayName: Required. Display name of the policy tag. Max 200 bytes 1719 // when encoded in UTF-8. 1720 DisplayName string `json:"displayName,omitempty"` 1721 1722 // PolicyTag: Resource name of the policy tag. This field will be 1723 // ignored when calling ImportTaxonomies. 1724 PolicyTag string `json:"policyTag,omitempty"` 1725 1726 // ForceSendFields is a list of field names (e.g. "ChildPolicyTags") to 1727 // unconditionally include in API requests. By default, fields with 1728 // empty values are omitted from API requests. However, any non-pointer, 1729 // non-interface field appearing in ForceSendFields will be sent to the 1730 // server regardless of whether the field is empty or not. This may be 1731 // used to include empty fields in Patch requests. 1732 ForceSendFields []string `json:"-"` 1733 1734 // NullFields is a list of field names (e.g. "ChildPolicyTags") to 1735 // include in API requests with the JSON null value. By default, fields 1736 // with empty values are omitted from API requests. However, any field 1737 // with an empty value appearing in NullFields will be sent to the 1738 // server as null. It is an error if a field in this list has a 1739 // non-empty value. This may be used to include null fields in Patch 1740 // requests. 1741 NullFields []string `json:"-"` 1742} 1743 1744func (s *GoogleCloudDatacatalogV1beta1SerializedPolicyTag) MarshalJSON() ([]byte, error) { 1745 type NoMethod GoogleCloudDatacatalogV1beta1SerializedPolicyTag 1746 raw := NoMethod(*s) 1747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1748} 1749 1750// GoogleCloudDatacatalogV1beta1SerializedTaxonomy: Message capturing a 1751// taxonomy and its policy tag hierarchy as a nested proto. Used for 1752// taxonomy import/export and mutation. 1753type GoogleCloudDatacatalogV1beta1SerializedTaxonomy struct { 1754 // Description: Description of the serialized taxonomy. The length of 1755 // the description is limited to 2000 bytes when encoded in UTF-8. If 1756 // not set, defaults to an empty description. 1757 Description string `json:"description,omitempty"` 1758 1759 // DisplayName: Required. Display name of the taxonomy. Max 200 bytes 1760 // when encoded in UTF-8. 1761 DisplayName string `json:"displayName,omitempty"` 1762 1763 // PolicyTags: Top level policy tags associated with the taxonomy if 1764 // any. 1765 PolicyTags []*GoogleCloudDatacatalogV1beta1SerializedPolicyTag `json:"policyTags,omitempty"` 1766 1767 // ForceSendFields is a list of field names (e.g. "Description") to 1768 // unconditionally include in API requests. By default, fields with 1769 // empty values are omitted from API requests. However, any non-pointer, 1770 // non-interface field appearing in ForceSendFields will be sent to the 1771 // server regardless of whether the field is empty or not. This may be 1772 // used to include empty fields in Patch requests. 1773 ForceSendFields []string `json:"-"` 1774 1775 // NullFields is a list of field names (e.g. "Description") to include 1776 // in API requests with the JSON null value. By default, fields with 1777 // empty values are omitted from API requests. However, any field with 1778 // an empty value appearing in NullFields will be sent to the server as 1779 // null. It is an error if a field in this list has a non-empty value. 1780 // This may be used to include null fields in Patch requests. 1781 NullFields []string `json:"-"` 1782} 1783 1784func (s *GoogleCloudDatacatalogV1beta1SerializedTaxonomy) MarshalJSON() ([]byte, error) { 1785 type NoMethod GoogleCloudDatacatalogV1beta1SerializedTaxonomy 1786 raw := NoMethod(*s) 1787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1788} 1789 1790// GoogleCloudDatacatalogV1beta1SystemTimestamps: Timestamps about this 1791// resource according to a particular system. 1792type GoogleCloudDatacatalogV1beta1SystemTimestamps struct { 1793 // CreateTime: The creation time of the resource within the given 1794 // system. 1795 CreateTime string `json:"createTime,omitempty"` 1796 1797 // ExpireTime: Output only. The expiration time of the resource within 1798 // the given system. Currently only apllicable to BigQuery resources. 1799 ExpireTime string `json:"expireTime,omitempty"` 1800 1801 // UpdateTime: The last-modified time of the resource within the given 1802 // system. 1803 UpdateTime string `json:"updateTime,omitempty"` 1804 1805 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1806 // unconditionally include in API requests. By default, fields with 1807 // empty values are omitted from API requests. However, any non-pointer, 1808 // non-interface field appearing in ForceSendFields will be sent to the 1809 // server regardless of whether the field is empty or not. This may be 1810 // used to include empty fields in Patch requests. 1811 ForceSendFields []string `json:"-"` 1812 1813 // NullFields is a list of field names (e.g. "CreateTime") to include in 1814 // API requests with the JSON null value. By default, fields with empty 1815 // values are omitted from API requests. However, any field with an 1816 // empty value appearing in NullFields will be sent to the server as 1817 // null. It is an error if a field in this list has a non-empty value. 1818 // This may be used to include null fields in Patch requests. 1819 NullFields []string `json:"-"` 1820} 1821 1822func (s *GoogleCloudDatacatalogV1beta1SystemTimestamps) MarshalJSON() ([]byte, error) { 1823 type NoMethod GoogleCloudDatacatalogV1beta1SystemTimestamps 1824 raw := NoMethod(*s) 1825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1826} 1827 1828// GoogleCloudDatacatalogV1beta1TableSpec: Normal BigQuery table spec. 1829type GoogleCloudDatacatalogV1beta1TableSpec struct { 1830 // GroupedEntry: Output only. If the table is a dated shard, i.e., with 1831 // name pattern `[prefix]YYYYMMDD`, `grouped_entry` is the Data Catalog 1832 // resource name of the date sharded grouped entry, for example, 1833 // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_i 1834 // d}/entries/{entry_id}`. Otherwise, `grouped_entry` is empty. 1835 GroupedEntry string `json:"groupedEntry,omitempty"` 1836 1837 // ForceSendFields is a list of field names (e.g. "GroupedEntry") to 1838 // unconditionally include in API requests. By default, fields with 1839 // empty values are omitted from API requests. However, any non-pointer, 1840 // non-interface field appearing in ForceSendFields will be sent to the 1841 // server regardless of whether the field is empty or not. This may be 1842 // used to include empty fields in Patch requests. 1843 ForceSendFields []string `json:"-"` 1844 1845 // NullFields is a list of field names (e.g. "GroupedEntry") to include 1846 // in API requests with the JSON null value. By default, fields with 1847 // empty values are omitted from API requests. However, any field with 1848 // an empty value appearing in NullFields will be sent to the server as 1849 // null. It is an error if a field in this list has a non-empty value. 1850 // This may be used to include null fields in Patch requests. 1851 NullFields []string `json:"-"` 1852} 1853 1854func (s *GoogleCloudDatacatalogV1beta1TableSpec) MarshalJSON() ([]byte, error) { 1855 type NoMethod GoogleCloudDatacatalogV1beta1TableSpec 1856 raw := NoMethod(*s) 1857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1858} 1859 1860// GoogleCloudDatacatalogV1beta1Tag: Tags are used to attach custom 1861// metadata to Data Catalog resources. Tags conform to the 1862// specifications within their tag template. See [Data Catalog 1863// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for 1864// information on the permissions needed to create or view tags. 1865type GoogleCloudDatacatalogV1beta1Tag struct { 1866 // Column: Resources like Entry can have schemas associated with them. 1867 // This scope allows users to attach tags to an individual column based 1868 // on that schema. For attaching a tag to a nested column, use `.` to 1869 // separate the column names. Example: * `outer_column.inner_column` 1870 Column string `json:"column,omitempty"` 1871 1872 // Fields: Required. This maps the ID of a tag field to the value of and 1873 // additional information about that field. Valid field IDs are defined 1874 // by the tag's template. A tag must have at least 1 field and at most 1875 // 500 fields. 1876 Fields map[string]GoogleCloudDatacatalogV1beta1TagField `json:"fields,omitempty"` 1877 1878 // Name: The resource name of the tag in URL format. Example: * 1879 // projects/{project_id}/locations/{location}/entrygroups/{entry_group_id 1880 // }/entries/{entry_id}/tags/{tag_id} where `tag_id` is a 1881 // system-generated identifier. Note that this Tag may not actually be 1882 // stored in the location in this name. 1883 Name string `json:"name,omitempty"` 1884 1885 // Template: Required. The resource name of the tag template that this 1886 // tag uses. Example: * 1887 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_ 1888 // id} This field cannot be modified after creation. 1889 Template string `json:"template,omitempty"` 1890 1891 // TemplateDisplayName: Output only. The display name of the tag 1892 // template. 1893 TemplateDisplayName string `json:"templateDisplayName,omitempty"` 1894 1895 // ServerResponse contains the HTTP response code and headers from the 1896 // server. 1897 googleapi.ServerResponse `json:"-"` 1898 1899 // ForceSendFields is a list of field names (e.g. "Column") to 1900 // unconditionally include in API requests. By default, fields with 1901 // empty values are omitted from API requests. However, any non-pointer, 1902 // non-interface field appearing in ForceSendFields will be sent to the 1903 // server regardless of whether the field is empty or not. This may be 1904 // used to include empty fields in Patch requests. 1905 ForceSendFields []string `json:"-"` 1906 1907 // NullFields is a list of field names (e.g. "Column") to include in API 1908 // requests with the JSON null value. By default, fields with empty 1909 // values are omitted from API requests. However, any field with an 1910 // empty value appearing in NullFields will be sent to the server as 1911 // null. It is an error if a field in this list has a non-empty value. 1912 // This may be used to include null fields in Patch requests. 1913 NullFields []string `json:"-"` 1914} 1915 1916func (s *GoogleCloudDatacatalogV1beta1Tag) MarshalJSON() ([]byte, error) { 1917 type NoMethod GoogleCloudDatacatalogV1beta1Tag 1918 raw := NoMethod(*s) 1919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1920} 1921 1922// GoogleCloudDatacatalogV1beta1TagField: Contains the value and 1923// supporting information for a field within a Tag. 1924type GoogleCloudDatacatalogV1beta1TagField struct { 1925 // BoolValue: Holds the value for a tag field with boolean type. 1926 BoolValue bool `json:"boolValue,omitempty"` 1927 1928 // DisplayName: Output only. The display name of this field. 1929 DisplayName string `json:"displayName,omitempty"` 1930 1931 // DoubleValue: Holds the value for a tag field with double type. 1932 DoubleValue float64 `json:"doubleValue,omitempty"` 1933 1934 // EnumValue: Holds the value for a tag field with enum type. This value 1935 // must be one of the allowed values in the definition of this enum. 1936 EnumValue *GoogleCloudDatacatalogV1beta1TagFieldEnumValue `json:"enumValue,omitempty"` 1937 1938 // Order: Output only. The order of this field with respect to other 1939 // fields in this tag. It can be set in Tag. For example, a higher value 1940 // can indicate a more important field. The value can be negative. 1941 // Multiple fields can have the same order, and field orders within a 1942 // tag do not have to be sequential. 1943 Order int64 `json:"order,omitempty"` 1944 1945 // StringValue: Holds the value for a tag field with string type. 1946 StringValue string `json:"stringValue,omitempty"` 1947 1948 // TimestampValue: Holds the value for a tag field with timestamp type. 1949 TimestampValue string `json:"timestampValue,omitempty"` 1950 1951 // ForceSendFields is a list of field names (e.g. "BoolValue") to 1952 // unconditionally include in API requests. By default, fields with 1953 // empty values are omitted from API requests. However, any non-pointer, 1954 // non-interface field appearing in ForceSendFields will be sent to the 1955 // server regardless of whether the field is empty or not. This may be 1956 // used to include empty fields in Patch requests. 1957 ForceSendFields []string `json:"-"` 1958 1959 // NullFields is a list of field names (e.g. "BoolValue") to include in 1960 // API requests with the JSON null value. By default, fields with empty 1961 // values are omitted from API requests. However, any field with an 1962 // empty value appearing in NullFields will be sent to the server as 1963 // null. It is an error if a field in this list has a non-empty value. 1964 // This may be used to include null fields in Patch requests. 1965 NullFields []string `json:"-"` 1966} 1967 1968func (s *GoogleCloudDatacatalogV1beta1TagField) MarshalJSON() ([]byte, error) { 1969 type NoMethod GoogleCloudDatacatalogV1beta1TagField 1970 raw := NoMethod(*s) 1971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1972} 1973 1974func (s *GoogleCloudDatacatalogV1beta1TagField) UnmarshalJSON(data []byte) error { 1975 type NoMethod GoogleCloudDatacatalogV1beta1TagField 1976 var s1 struct { 1977 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` 1978 *NoMethod 1979 } 1980 s1.NoMethod = (*NoMethod)(s) 1981 if err := json.Unmarshal(data, &s1); err != nil { 1982 return err 1983 } 1984 s.DoubleValue = float64(s1.DoubleValue) 1985 return nil 1986} 1987 1988// GoogleCloudDatacatalogV1beta1TagFieldEnumValue: Holds an enum value. 1989type GoogleCloudDatacatalogV1beta1TagFieldEnumValue struct { 1990 // DisplayName: The display name of the enum value. 1991 DisplayName string `json:"displayName,omitempty"` 1992 1993 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1994 // unconditionally include in API requests. By default, fields with 1995 // empty values are omitted from API requests. However, any non-pointer, 1996 // non-interface field appearing in ForceSendFields will be sent to the 1997 // server regardless of whether the field is empty or not. This may be 1998 // used to include empty fields in Patch requests. 1999 ForceSendFields []string `json:"-"` 2000 2001 // NullFields is a list of field names (e.g. "DisplayName") to include 2002 // in API requests with the JSON null value. By default, fields with 2003 // empty values are omitted from API requests. However, any field with 2004 // an empty value appearing in NullFields will be sent to the server as 2005 // null. It is an error if a field in this list has a non-empty value. 2006 // This may be used to include null fields in Patch requests. 2007 NullFields []string `json:"-"` 2008} 2009 2010func (s *GoogleCloudDatacatalogV1beta1TagFieldEnumValue) MarshalJSON() ([]byte, error) { 2011 type NoMethod GoogleCloudDatacatalogV1beta1TagFieldEnumValue 2012 raw := NoMethod(*s) 2013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2014} 2015 2016// GoogleCloudDatacatalogV1beta1TagTemplate: A tag template defines a 2017// tag, which can have one or more typed fields. The template is used to 2018// create and attach the tag to GCP resources. [Tag template 2019// roles](https://cloud.google.com/iam/docs/understanding-roles#data-cata 2020// log-roles) provide permissions to create, edit, and use the template. 2021// See, for example, the [TagTemplate 2022// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) 2023// role, which includes permission to use the tag template to tag 2024// resources. 2025type GoogleCloudDatacatalogV1beta1TagTemplate struct { 2026 // DisplayName: The display name for this template. Defaults to an empty 2027 // string. 2028 DisplayName string `json:"displayName,omitempty"` 2029 2030 // Fields: Required. Map of tag template field IDs to the settings for 2031 // the field. This map is an exhaustive list of the allowed fields. This 2032 // map must contain at least one field and at most 500 fields. The keys 2033 // to this map are tag template field IDs. Field IDs can contain letters 2034 // (both uppercase and lowercase), numbers (0-9) and underscores (_). 2035 // Field IDs must be at least 1 character long and at most 64 characters 2036 // long. Field IDs must start with a letter or underscore. 2037 Fields map[string]GoogleCloudDatacatalogV1beta1TagTemplateField `json:"fields,omitempty"` 2038 2039 // Name: The resource name of the tag template in URL format. Example: * 2040 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template_ 2041 // id} Note that this TagTemplate and its child resources may not 2042 // actually be stored in the location in this name. 2043 Name string `json:"name,omitempty"` 2044 2045 // ServerResponse contains the HTTP response code and headers from the 2046 // server. 2047 googleapi.ServerResponse `json:"-"` 2048 2049 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2050 // unconditionally include in API requests. By default, fields with 2051 // empty values are omitted from API requests. However, any non-pointer, 2052 // non-interface field appearing in ForceSendFields will be sent to the 2053 // server regardless of whether the field is empty or not. This may be 2054 // used to include empty fields in Patch requests. 2055 ForceSendFields []string `json:"-"` 2056 2057 // NullFields is a list of field names (e.g. "DisplayName") to include 2058 // in API requests with the JSON null value. By default, fields with 2059 // empty values are omitted from API requests. However, any field with 2060 // an empty value appearing in NullFields will be sent to the server as 2061 // null. It is an error if a field in this list has a non-empty value. 2062 // This may be used to include null fields in Patch requests. 2063 NullFields []string `json:"-"` 2064} 2065 2066func (s *GoogleCloudDatacatalogV1beta1TagTemplate) MarshalJSON() ([]byte, error) { 2067 type NoMethod GoogleCloudDatacatalogV1beta1TagTemplate 2068 raw := NoMethod(*s) 2069 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2070} 2071 2072// GoogleCloudDatacatalogV1beta1TagTemplateField: The template for an 2073// individual field within a tag template. 2074type GoogleCloudDatacatalogV1beta1TagTemplateField struct { 2075 // DisplayName: The display name for this field. Defaults to an empty 2076 // string. 2077 DisplayName string `json:"displayName,omitempty"` 2078 2079 // IsRequired: Whether this is a required field. Defaults to false. 2080 IsRequired bool `json:"isRequired,omitempty"` 2081 2082 // Name: Output only. The resource name of the tag template field in URL 2083 // format. Example: * 2084 // projects/{project_id}/locations/{location}/tagTemplates/{tag_template} 2085 // /fields/{field} Note that this TagTemplateField may not actually be 2086 // stored in the location in this name. 2087 Name string `json:"name,omitempty"` 2088 2089 // Order: The order of this field with respect to other fields in this 2090 // tag template. A higher value indicates a more important field. The 2091 // value can be negative. Multiple fields can have the same order, and 2092 // field orders within a tag do not have to be sequential. 2093 Order int64 `json:"order,omitempty"` 2094 2095 // Type: Required. The type of value this tag field can contain. 2096 Type *GoogleCloudDatacatalogV1beta1FieldType `json:"type,omitempty"` 2097 2098 // ServerResponse contains the HTTP response code and headers from the 2099 // server. 2100 googleapi.ServerResponse `json:"-"` 2101 2102 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2103 // unconditionally include in API requests. By default, fields with 2104 // empty values are omitted from API requests. However, any non-pointer, 2105 // non-interface field appearing in ForceSendFields will be sent to the 2106 // server regardless of whether the field is empty or not. This may be 2107 // used to include empty fields in Patch requests. 2108 ForceSendFields []string `json:"-"` 2109 2110 // NullFields is a list of field names (e.g. "DisplayName") to include 2111 // in API requests with the JSON null value. By default, fields with 2112 // empty values are omitted from API requests. However, any field with 2113 // an empty value appearing in NullFields will be sent to the server as 2114 // null. It is an error if a field in this list has a non-empty value. 2115 // This may be used to include null fields in Patch requests. 2116 NullFields []string `json:"-"` 2117} 2118 2119func (s *GoogleCloudDatacatalogV1beta1TagTemplateField) MarshalJSON() ([]byte, error) { 2120 type NoMethod GoogleCloudDatacatalogV1beta1TagTemplateField 2121 raw := NoMethod(*s) 2122 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2123} 2124 2125// GoogleCloudDatacatalogV1beta1Taxonomy: A taxonomy is a collection of 2126// policy tags that classify data along a common axis. For instance a 2127// data *sensitivity* taxonomy could contain policy tags denoting PII 2128// such as age, zipcode, and SSN. A data *origin* taxonomy could contain 2129// policy tags to distinguish user data, employee data, partner data, 2130// public data. 2131type GoogleCloudDatacatalogV1beta1Taxonomy struct { 2132 // ActivatedPolicyTypes: Optional. A list of policy types that are 2133 // activated for this taxonomy. If not set, defaults to an empty list. 2134 // 2135 // Possible values: 2136 // "POLICY_TYPE_UNSPECIFIED" - Unspecified policy type. 2137 // "FINE_GRAINED_ACCESS_CONTROL" - Fine grained access control policy, 2138 // which enables access control on tagged resources. 2139 ActivatedPolicyTypes []string `json:"activatedPolicyTypes,omitempty"` 2140 2141 // Description: Optional. Description of this taxonomy. It must: contain 2142 // only unicode characters, tabs, newlines, carriage returns and page 2143 // breaks; and be at most 2000 bytes long when encoded in UTF-8. If not 2144 // set, defaults to an empty description. 2145 Description string `json:"description,omitempty"` 2146 2147 // DisplayName: Required. User defined name of this taxonomy. It must: 2148 // contain only unicode letters, numbers, underscores, dashes and 2149 // spaces; not start or end with spaces; and be at most 200 bytes long 2150 // when encoded in UTF-8. 2151 DisplayName string `json:"displayName,omitempty"` 2152 2153 // Name: Output only. Resource name of this taxonomy, whose format is: 2154 // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". 2155 Name string `json:"name,omitempty"` 2156 2157 // ServerResponse contains the HTTP response code and headers from the 2158 // server. 2159 googleapi.ServerResponse `json:"-"` 2160 2161 // ForceSendFields is a list of field names (e.g. 2162 // "ActivatedPolicyTypes") to unconditionally include in API requests. 2163 // By default, fields with empty values are omitted from API requests. 2164 // However, any non-pointer, non-interface field appearing in 2165 // ForceSendFields will be sent to the server regardless of whether the 2166 // field is empty or not. This may be used to include empty fields in 2167 // Patch requests. 2168 ForceSendFields []string `json:"-"` 2169 2170 // NullFields is a list of field names (e.g. "ActivatedPolicyTypes") to 2171 // include in API requests with the JSON null value. By default, fields 2172 // with empty values are omitted from API requests. However, any field 2173 // with an empty value appearing in NullFields will be sent to the 2174 // server as null. It is an error if a field in this list has a 2175 // non-empty value. This may be used to include null fields in Patch 2176 // requests. 2177 NullFields []string `json:"-"` 2178} 2179 2180func (s *GoogleCloudDatacatalogV1beta1Taxonomy) MarshalJSON() ([]byte, error) { 2181 type NoMethod GoogleCloudDatacatalogV1beta1Taxonomy 2182 raw := NoMethod(*s) 2183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2184} 2185 2186// GoogleCloudDatacatalogV1beta1ViewSpec: Table view specification. 2187type GoogleCloudDatacatalogV1beta1ViewSpec struct { 2188 // ViewQuery: Output only. The query that defines the table view. 2189 ViewQuery string `json:"viewQuery,omitempty"` 2190 2191 // ForceSendFields is a list of field names (e.g. "ViewQuery") to 2192 // unconditionally include in API requests. By default, fields with 2193 // empty values are omitted from API requests. However, any non-pointer, 2194 // non-interface field appearing in ForceSendFields will be sent to the 2195 // server regardless of whether the field is empty or not. This may be 2196 // used to include empty fields in Patch requests. 2197 ForceSendFields []string `json:"-"` 2198 2199 // NullFields is a list of field names (e.g. "ViewQuery") to include in 2200 // API requests with the JSON null value. By default, fields with empty 2201 // values are omitted from API requests. However, any field with an 2202 // empty value appearing in NullFields will be sent to the server as 2203 // null. It is an error if a field in this list has a non-empty value. 2204 // This may be used to include null fields in Patch requests. 2205 NullFields []string `json:"-"` 2206} 2207 2208func (s *GoogleCloudDatacatalogV1beta1ViewSpec) MarshalJSON() ([]byte, error) { 2209 type NoMethod GoogleCloudDatacatalogV1beta1ViewSpec 2210 raw := NoMethod(*s) 2211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2212} 2213 2214// Policy: An Identity and Access Management (IAM) policy, which 2215// specifies access controls for Google Cloud resources. A `Policy` is a 2216// collection of `bindings`. A `binding` binds one or more `members` to 2217// a single `role`. Members can be user accounts, service accounts, 2218// Google groups, and domains (such as G Suite). A `role` is a named 2219// list of permissions; each `role` can be an IAM predefined role or a 2220// user-created custom role. For some types of Google Cloud resources, a 2221// `binding` can also specify a `condition`, which is a logical 2222// expression that allows access to a resource only if the expression 2223// evaluates to `true`. A condition can add constraints based on 2224// attributes of the request, the resource, or both. To learn which 2225// resources support conditions in their IAM policies, see the [IAM 2226// documentation](https://cloud.google.com/iam/help/conditions/resource-p 2227// olicies). **JSON example:** { "bindings": [ { "role": 2228// "roles/resourcemanager.organizationAdmin", "members": [ 2229// "user:mike@example.com", "group:admins@example.com", 2230// "domain:google.com", 2231// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 2232// "role": "roles/resourcemanager.organizationViewer", "members": [ 2233// "user:eve@example.com" ], "condition": { "title": "expirable access", 2234// "description": "Does not grant access after Sep 2020", "expression": 2235// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 2236// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 2237// members: - user:mike@example.com - group:admins@example.com - 2238// domain:google.com - 2239// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 2240// roles/resourcemanager.organizationAdmin - members: - 2241// user:eve@example.com role: roles/resourcemanager.organizationViewer 2242// condition: title: expirable access description: Does not grant access 2243// after Sep 2020 expression: request.time < 2244// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 2245// 3 For a description of IAM and its features, see the [IAM 2246// documentation](https://cloud.google.com/iam/docs/). 2247type Policy struct { 2248 // Bindings: Associates a list of `members` to a `role`. Optionally, may 2249 // specify a `condition` that determines how and when the `bindings` are 2250 // applied. Each of the `bindings` must contain at least one member. 2251 Bindings []*Binding `json:"bindings,omitempty"` 2252 2253 // Etag: `etag` is used for optimistic concurrency control as a way to 2254 // help prevent simultaneous updates of a policy from overwriting each 2255 // other. It is strongly suggested that systems make use of the `etag` 2256 // in the read-modify-write cycle to perform policy updates in order to 2257 // avoid race conditions: An `etag` is returned in the response to 2258 // `getIamPolicy`, and systems are expected to put that etag in the 2259 // request to `setIamPolicy` to ensure that their change will be applied 2260 // to the same version of the policy. **Important:** If you use IAM 2261 // Conditions, you must include the `etag` field whenever you call 2262 // `setIamPolicy`. If you omit this field, then IAM allows you to 2263 // overwrite a version `3` policy with a version `1` policy, and all of 2264 // the conditions in the version `3` policy are lost. 2265 Etag string `json:"etag,omitempty"` 2266 2267 // Version: Specifies the format of the policy. Valid values are `0`, 2268 // `1`, and `3`. Requests that specify an invalid value are rejected. 2269 // Any operation that affects conditional role bindings must specify 2270 // version `3`. This requirement applies to the following operations: * 2271 // Getting a policy that includes a conditional role binding * Adding a 2272 // conditional role binding to a policy * Changing a conditional role 2273 // binding in a policy * Removing any role binding, with or without a 2274 // condition, from a policy that includes conditions **Important:** If 2275 // you use IAM Conditions, you must include the `etag` field whenever 2276 // you call `setIamPolicy`. If you omit this field, then IAM allows you 2277 // to overwrite a version `3` policy with a version `1` policy, and all 2278 // of the conditions in the version `3` policy are lost. If a policy 2279 // does not include any conditions, operations on that policy may 2280 // specify any valid version or leave the field unset. To learn which 2281 // resources support conditions in their IAM policies, see the [IAM 2282 // documentation](https://cloud.google.com/iam/help/conditions/resource-p 2283 // olicies). 2284 Version int64 `json:"version,omitempty"` 2285 2286 // ServerResponse contains the HTTP response code and headers from the 2287 // server. 2288 googleapi.ServerResponse `json:"-"` 2289 2290 // ForceSendFields is a list of field names (e.g. "Bindings") to 2291 // unconditionally include in API requests. By default, fields with 2292 // empty values are omitted from API requests. However, any non-pointer, 2293 // non-interface field appearing in ForceSendFields will be sent to the 2294 // server regardless of whether the field is empty or not. This may be 2295 // used to include empty fields in Patch requests. 2296 ForceSendFields []string `json:"-"` 2297 2298 // NullFields is a list of field names (e.g. "Bindings") to include in 2299 // API requests with the JSON null value. By default, fields with empty 2300 // values are omitted from API requests. However, any field with an 2301 // empty value appearing in NullFields will be sent to the server as 2302 // null. It is an error if a field in this list has a non-empty value. 2303 // This may be used to include null fields in Patch requests. 2304 NullFields []string `json:"-"` 2305} 2306 2307func (s *Policy) MarshalJSON() ([]byte, error) { 2308 type NoMethod Policy 2309 raw := NoMethod(*s) 2310 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2311} 2312 2313// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2314type SetIamPolicyRequest struct { 2315 // Policy: REQUIRED: The complete policy to be applied to the 2316 // `resource`. The size of the policy is limited to a few 10s of KB. An 2317 // empty policy is a valid policy but certain Cloud Platform services 2318 // (such as Projects) might reject them. 2319 Policy *Policy `json:"policy,omitempty"` 2320 2321 // ForceSendFields is a list of field names (e.g. "Policy") to 2322 // unconditionally include in API requests. By default, fields with 2323 // empty values are omitted from API requests. However, any non-pointer, 2324 // non-interface field appearing in ForceSendFields will be sent to the 2325 // server regardless of whether the field is empty or not. This may be 2326 // used to include empty fields in Patch requests. 2327 ForceSendFields []string `json:"-"` 2328 2329 // NullFields is a list of field names (e.g. "Policy") to include in API 2330 // requests with the JSON null value. By default, fields with empty 2331 // values are omitted from API requests. However, any field with an 2332 // empty value appearing in NullFields will be sent to the server as 2333 // null. It is an error if a field in this list has a non-empty value. 2334 // This may be used to include null fields in Patch requests. 2335 NullFields []string `json:"-"` 2336} 2337 2338func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2339 type NoMethod SetIamPolicyRequest 2340 raw := NoMethod(*s) 2341 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2342} 2343 2344// TestIamPermissionsRequest: Request message for `TestIamPermissions` 2345// method. 2346type TestIamPermissionsRequest struct { 2347 // Permissions: The set of permissions to check for the `resource`. 2348 // Permissions with wildcards (such as '*' or 'storage.*') are not 2349 // allowed. For more information see [IAM 2350 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 2351 Permissions []string `json:"permissions,omitempty"` 2352 2353 // ForceSendFields is a list of field names (e.g. "Permissions") to 2354 // unconditionally include in API requests. By default, fields with 2355 // empty values are omitted from API requests. However, any non-pointer, 2356 // non-interface field appearing in ForceSendFields will be sent to the 2357 // server regardless of whether the field is empty or not. This may be 2358 // used to include empty fields in Patch requests. 2359 ForceSendFields []string `json:"-"` 2360 2361 // NullFields is a list of field names (e.g. "Permissions") to include 2362 // in API requests with the JSON null value. By default, fields with 2363 // empty values are omitted from API requests. However, any field with 2364 // an empty value appearing in NullFields will be sent to the server as 2365 // null. It is an error if a field in this list has a non-empty value. 2366 // This may be used to include null fields in Patch requests. 2367 NullFields []string `json:"-"` 2368} 2369 2370func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2371 type NoMethod TestIamPermissionsRequest 2372 raw := NoMethod(*s) 2373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2374} 2375 2376// TestIamPermissionsResponse: Response message for `TestIamPermissions` 2377// method. 2378type TestIamPermissionsResponse struct { 2379 // Permissions: A subset of `TestPermissionsRequest.permissions` that 2380 // the caller is allowed. 2381 Permissions []string `json:"permissions,omitempty"` 2382 2383 // ServerResponse contains the HTTP response code and headers from the 2384 // server. 2385 googleapi.ServerResponse `json:"-"` 2386 2387 // ForceSendFields is a list of field names (e.g. "Permissions") to 2388 // unconditionally include in API requests. By default, fields with 2389 // empty values are omitted from API requests. However, any non-pointer, 2390 // non-interface field appearing in ForceSendFields will be sent to the 2391 // server regardless of whether the field is empty or not. This may be 2392 // used to include empty fields in Patch requests. 2393 ForceSendFields []string `json:"-"` 2394 2395 // NullFields is a list of field names (e.g. "Permissions") to include 2396 // in API requests with the JSON null value. By default, fields with 2397 // empty values are omitted from API requests. However, any field with 2398 // an empty value appearing in NullFields will be sent to the server as 2399 // null. It is an error if a field in this list has a non-empty value. 2400 // This may be used to include null fields in Patch requests. 2401 NullFields []string `json:"-"` 2402} 2403 2404func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2405 type NoMethod TestIamPermissionsResponse 2406 raw := NoMethod(*s) 2407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2408} 2409 2410// method id "datacatalog.catalog.search": 2411 2412type CatalogSearchCall struct { 2413 s *Service 2414 googleclouddatacatalogv1beta1searchcatalogrequest *GoogleCloudDatacatalogV1beta1SearchCatalogRequest 2415 urlParams_ gensupport.URLParams 2416 ctx_ context.Context 2417 header_ http.Header 2418} 2419 2420// Search: Searches Data Catalog for multiple resources like entries, 2421// tags that match a query. This is a custom method 2422// (https://cloud.google.com/apis/design/custom_methods) and does not 2423// return the complete resource, only the resource identifier and high 2424// level fields. Clients can subsequentally call `Get` methods. Note 2425// that Data Catalog search queries do not guarantee full recall. Query 2426// results that match your query may not be returned, even in subsequent 2427// result pages. Also note that results returned (and not returned) can 2428// vary across repeated search queries. See [Data Catalog Search 2429// Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-refer 2430// ence) for more information. 2431func (r *CatalogService) Search(googleclouddatacatalogv1beta1searchcatalogrequest *GoogleCloudDatacatalogV1beta1SearchCatalogRequest) *CatalogSearchCall { 2432 c := &CatalogSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2433 c.googleclouddatacatalogv1beta1searchcatalogrequest = googleclouddatacatalogv1beta1searchcatalogrequest 2434 return c 2435} 2436 2437// Fields allows partial responses to be retrieved. See 2438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2439// for more information. 2440func (c *CatalogSearchCall) Fields(s ...googleapi.Field) *CatalogSearchCall { 2441 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2442 return c 2443} 2444 2445// Context sets the context to be used in this call's Do method. Any 2446// pending HTTP request will be aborted if the provided context is 2447// canceled. 2448func (c *CatalogSearchCall) Context(ctx context.Context) *CatalogSearchCall { 2449 c.ctx_ = ctx 2450 return c 2451} 2452 2453// Header returns an http.Header that can be modified by the caller to 2454// add HTTP headers to the request. 2455func (c *CatalogSearchCall) Header() http.Header { 2456 if c.header_ == nil { 2457 c.header_ = make(http.Header) 2458 } 2459 return c.header_ 2460} 2461 2462func (c *CatalogSearchCall) doRequest(alt string) (*http.Response, error) { 2463 reqHeaders := make(http.Header) 2464 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 2465 for k, v := range c.header_ { 2466 reqHeaders[k] = v 2467 } 2468 reqHeaders.Set("User-Agent", c.s.userAgent()) 2469 var body io.Reader = nil 2470 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1searchcatalogrequest) 2471 if err != nil { 2472 return nil, err 2473 } 2474 reqHeaders.Set("Content-Type", "application/json") 2475 c.urlParams_.Set("alt", alt) 2476 c.urlParams_.Set("prettyPrint", "false") 2477 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/catalog:search") 2478 urls += "?" + c.urlParams_.Encode() 2479 req, err := http.NewRequest("POST", urls, body) 2480 if err != nil { 2481 return nil, err 2482 } 2483 req.Header = reqHeaders 2484 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2485} 2486 2487// Do executes the "datacatalog.catalog.search" call. 2488// Exactly one of *GoogleCloudDatacatalogV1beta1SearchCatalogResponse or 2489// error will be non-nil. Any non-2xx status code is an error. Response 2490// headers are in either 2491// *GoogleCloudDatacatalogV1beta1SearchCatalogResponse.ServerResponse.Hea 2492// der or (if a response was returned at all) in 2493// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2494// whether the returned error was because http.StatusNotModified was 2495// returned. 2496func (c *CatalogSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1SearchCatalogResponse, error) { 2497 gensupport.SetOptions(c.urlParams_, opts...) 2498 res, err := c.doRequest("json") 2499 if res != nil && res.StatusCode == http.StatusNotModified { 2500 if res.Body != nil { 2501 res.Body.Close() 2502 } 2503 return nil, &googleapi.Error{ 2504 Code: res.StatusCode, 2505 Header: res.Header, 2506 } 2507 } 2508 if err != nil { 2509 return nil, err 2510 } 2511 defer googleapi.CloseBody(res) 2512 if err := googleapi.CheckResponse(res); err != nil { 2513 return nil, err 2514 } 2515 ret := &GoogleCloudDatacatalogV1beta1SearchCatalogResponse{ 2516 ServerResponse: googleapi.ServerResponse{ 2517 Header: res.Header, 2518 HTTPStatusCode: res.StatusCode, 2519 }, 2520 } 2521 target := &ret 2522 if err := gensupport.DecodeResponse(target, res); err != nil { 2523 return nil, err 2524 } 2525 return ret, nil 2526 // { 2527 // "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 subsequentally 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.", 2528 // "flatPath": "v1beta1/catalog:search", 2529 // "httpMethod": "POST", 2530 // "id": "datacatalog.catalog.search", 2531 // "parameterOrder": [], 2532 // "parameters": {}, 2533 // "path": "v1beta1/catalog:search", 2534 // "request": { 2535 // "$ref": "GoogleCloudDatacatalogV1beta1SearchCatalogRequest" 2536 // }, 2537 // "response": { 2538 // "$ref": "GoogleCloudDatacatalogV1beta1SearchCatalogResponse" 2539 // }, 2540 // "scopes": [ 2541 // "https://www.googleapis.com/auth/cloud-platform" 2542 // ] 2543 // } 2544 2545} 2546 2547// Pages invokes f for each page of results. 2548// A non-nil error returned from f will halt the iteration. 2549// The provided context supersedes any context provided to the Context method. 2550func (c *CatalogSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1SearchCatalogResponse) error) error { 2551 c.ctx_ = ctx 2552 defer func(pt string) { c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken = pt }(c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken) // reset paging to original point 2553 for { 2554 x, err := c.Do() 2555 if err != nil { 2556 return err 2557 } 2558 if err := f(x); err != nil { 2559 return err 2560 } 2561 if x.NextPageToken == "" { 2562 return nil 2563 } 2564 c.googleclouddatacatalogv1beta1searchcatalogrequest.PageToken = x.NextPageToken 2565 } 2566} 2567 2568// method id "datacatalog.entries.lookup": 2569 2570type EntriesLookupCall struct { 2571 s *Service 2572 urlParams_ gensupport.URLParams 2573 ifNoneMatch_ string 2574 ctx_ context.Context 2575 header_ http.Header 2576} 2577 2578// Lookup: Get an entry by target resource name. This method allows 2579// clients to use the resource name from the source Google Cloud 2580// Platform service to get the Data Catalog Entry. 2581func (r *EntriesService) Lookup() *EntriesLookupCall { 2582 c := &EntriesLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2583 return c 2584} 2585 2586// LinkedResource sets the optional parameter "linkedResource": The full 2587// name of the Google Cloud Platform resource the Data Catalog entry 2588// represents. See: 2589// 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 * 2590// //pubsub.googleapis.com/projects/projectId/topics/topicId 2591func (c *EntriesLookupCall) LinkedResource(linkedResource string) *EntriesLookupCall { 2592 c.urlParams_.Set("linkedResource", linkedResource) 2593 return c 2594} 2595 2596// SqlResource sets the optional parameter "sqlResource": The SQL name 2597// of the entry. SQL names are case-sensitive. Examples: * 2598// `pubsub.project_id.topic_id` * 2599// ``pubsub.project_id.`topic.id.with.dots` `` * 2600// `bigquery.table.project_id.dataset_id.table_id` * 2601// `bigquery.dataset.project_id.dataset_id` * 2602// `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` 2603// `*_id`s shoud satisfy the standard SQL rules for identifiers. 2604// https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. 2605func (c *EntriesLookupCall) SqlResource(sqlResource string) *EntriesLookupCall { 2606 c.urlParams_.Set("sqlResource", sqlResource) 2607 return c 2608} 2609 2610// Fields allows partial responses to be retrieved. See 2611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2612// for more information. 2613func (c *EntriesLookupCall) Fields(s ...googleapi.Field) *EntriesLookupCall { 2614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2615 return c 2616} 2617 2618// IfNoneMatch sets the optional parameter which makes the operation 2619// fail if the object's ETag matches the given value. This is useful for 2620// getting updates only after the object has changed since the last 2621// request. Use googleapi.IsNotModified to check whether the response 2622// error from Do is the result of In-None-Match. 2623func (c *EntriesLookupCall) IfNoneMatch(entityTag string) *EntriesLookupCall { 2624 c.ifNoneMatch_ = entityTag 2625 return c 2626} 2627 2628// Context sets the context to be used in this call's Do method. Any 2629// pending HTTP request will be aborted if the provided context is 2630// canceled. 2631func (c *EntriesLookupCall) Context(ctx context.Context) *EntriesLookupCall { 2632 c.ctx_ = ctx 2633 return c 2634} 2635 2636// Header returns an http.Header that can be modified by the caller to 2637// add HTTP headers to the request. 2638func (c *EntriesLookupCall) Header() http.Header { 2639 if c.header_ == nil { 2640 c.header_ = make(http.Header) 2641 } 2642 return c.header_ 2643} 2644 2645func (c *EntriesLookupCall) doRequest(alt string) (*http.Response, error) { 2646 reqHeaders := make(http.Header) 2647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 2648 for k, v := range c.header_ { 2649 reqHeaders[k] = v 2650 } 2651 reqHeaders.Set("User-Agent", c.s.userAgent()) 2652 if c.ifNoneMatch_ != "" { 2653 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2654 } 2655 var body io.Reader = nil 2656 c.urlParams_.Set("alt", alt) 2657 c.urlParams_.Set("prettyPrint", "false") 2658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/entries:lookup") 2659 urls += "?" + c.urlParams_.Encode() 2660 req, err := http.NewRequest("GET", urls, body) 2661 if err != nil { 2662 return nil, err 2663 } 2664 req.Header = reqHeaders 2665 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2666} 2667 2668// Do executes the "datacatalog.entries.lookup" call. 2669// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 2670// non-nil. Any non-2xx status code is an error. Response headers are in 2671// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 2672// (if a response was returned at all) in 2673// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2674// whether the returned error was because http.StatusNotModified was 2675// returned. 2676func (c *EntriesLookupCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 2677 gensupport.SetOptions(c.urlParams_, opts...) 2678 res, err := c.doRequest("json") 2679 if res != nil && res.StatusCode == http.StatusNotModified { 2680 if res.Body != nil { 2681 res.Body.Close() 2682 } 2683 return nil, &googleapi.Error{ 2684 Code: res.StatusCode, 2685 Header: res.Header, 2686 } 2687 } 2688 if err != nil { 2689 return nil, err 2690 } 2691 defer googleapi.CloseBody(res) 2692 if err := googleapi.CheckResponse(res); err != nil { 2693 return nil, err 2694 } 2695 ret := &GoogleCloudDatacatalogV1beta1Entry{ 2696 ServerResponse: googleapi.ServerResponse{ 2697 Header: res.Header, 2698 HTTPStatusCode: res.StatusCode, 2699 }, 2700 } 2701 target := &ret 2702 if err := gensupport.DecodeResponse(target, res); err != nil { 2703 return nil, err 2704 } 2705 return ret, nil 2706 // { 2707 // "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.", 2708 // "flatPath": "v1beta1/entries:lookup", 2709 // "httpMethod": "GET", 2710 // "id": "datacatalog.entries.lookup", 2711 // "parameterOrder": [], 2712 // "parameters": { 2713 // "linkedResource": { 2714 // "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", 2715 // "location": "query", 2716 // "type": "string" 2717 // }, 2718 // "sqlResource": { 2719 // "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.", 2720 // "location": "query", 2721 // "type": "string" 2722 // } 2723 // }, 2724 // "path": "v1beta1/entries:lookup", 2725 // "response": { 2726 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 2727 // }, 2728 // "scopes": [ 2729 // "https://www.googleapis.com/auth/cloud-platform" 2730 // ] 2731 // } 2732 2733} 2734 2735// method id "datacatalog.projects.locations.entryGroups.create": 2736 2737type ProjectsLocationsEntryGroupsCreateCall struct { 2738 s *Service 2739 parent string 2740 googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup 2741 urlParams_ gensupport.URLParams 2742 ctx_ context.Context 2743 header_ http.Header 2744} 2745 2746// Create: A maximum of 10,000 entry groups may be created per 2747// organization across all locations. Users should enable the Data 2748// Catalog API in the project identified by the `parent` parameter (see 2749// [Data Catalog Resource Project] 2750// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 2751// for more information). 2752func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { 2753 c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2754 c.parent = parent 2755 c.googleclouddatacatalogv1beta1entrygroup = googleclouddatacatalogv1beta1entrygroup 2756 return c 2757} 2758 2759// EntryGroupId sets the optional parameter "entryGroupId": Required. 2760// The id of the entry group to create. The id must begin with a letter 2761// or underscore, contain only English letters, numbers and underscores, 2762// and be at most 64 characters. 2763func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { 2764 c.urlParams_.Set("entryGroupId", entryGroupId) 2765 return c 2766} 2767 2768// Fields allows partial responses to be retrieved. See 2769// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2770// for more information. 2771func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { 2772 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2773 return c 2774} 2775 2776// Context sets the context to be used in this call's Do method. Any 2777// pending HTTP request will be aborted if the provided context is 2778// canceled. 2779func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { 2780 c.ctx_ = ctx 2781 return c 2782} 2783 2784// Header returns an http.Header that can be modified by the caller to 2785// add HTTP headers to the request. 2786func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { 2787 if c.header_ == nil { 2788 c.header_ = make(http.Header) 2789 } 2790 return c.header_ 2791} 2792 2793func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Response, error) { 2794 reqHeaders := make(http.Header) 2795 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 2796 for k, v := range c.header_ { 2797 reqHeaders[k] = v 2798 } 2799 reqHeaders.Set("User-Agent", c.s.userAgent()) 2800 var body io.Reader = nil 2801 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entrygroup) 2802 if err != nil { 2803 return nil, err 2804 } 2805 reqHeaders.Set("Content-Type", "application/json") 2806 c.urlParams_.Set("alt", alt) 2807 c.urlParams_.Set("prettyPrint", "false") 2808 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entryGroups") 2809 urls += "?" + c.urlParams_.Encode() 2810 req, err := http.NewRequest("POST", urls, body) 2811 if err != nil { 2812 return nil, err 2813 } 2814 req.Header = reqHeaders 2815 googleapi.Expand(req.URL, map[string]string{ 2816 "parent": c.parent, 2817 }) 2818 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2819} 2820 2821// Do executes the "datacatalog.projects.locations.entryGroups.create" call. 2822// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 2823// be non-nil. Any non-2xx status code is an error. Response headers are 2824// in either 2825// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 2826// a response was returned at all) in error.(*googleapi.Error).Header. 2827// Use googleapi.IsNotModified to check whether the returned error was 2828// because http.StatusNotModified was returned. 2829func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 2830 gensupport.SetOptions(c.urlParams_, opts...) 2831 res, err := c.doRequest("json") 2832 if res != nil && res.StatusCode == http.StatusNotModified { 2833 if res.Body != nil { 2834 res.Body.Close() 2835 } 2836 return nil, &googleapi.Error{ 2837 Code: res.StatusCode, 2838 Header: res.Header, 2839 } 2840 } 2841 if err != nil { 2842 return nil, err 2843 } 2844 defer googleapi.CloseBody(res) 2845 if err := googleapi.CheckResponse(res); err != nil { 2846 return nil, err 2847 } 2848 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 2849 ServerResponse: googleapi.ServerResponse{ 2850 Header: res.Header, 2851 HTTPStatusCode: res.StatusCode, 2852 }, 2853 } 2854 target := &ret 2855 if err := gensupport.DecodeResponse(target, res); err != nil { 2856 return nil, err 2857 } 2858 return ret, nil 2859 // { 2860 // "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).", 2861 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups", 2862 // "httpMethod": "POST", 2863 // "id": "datacatalog.projects.locations.entryGroups.create", 2864 // "parameterOrder": [ 2865 // "parent" 2866 // ], 2867 // "parameters": { 2868 // "entryGroupId": { 2869 // "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.", 2870 // "location": "query", 2871 // "type": "string" 2872 // }, 2873 // "parent": { 2874 // "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.", 2875 // "location": "path", 2876 // "pattern": "^projects/[^/]+/locations/[^/]+$", 2877 // "required": true, 2878 // "type": "string" 2879 // } 2880 // }, 2881 // "path": "v1beta1/{+parent}/entryGroups", 2882 // "request": { 2883 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 2884 // }, 2885 // "response": { 2886 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 2887 // }, 2888 // "scopes": [ 2889 // "https://www.googleapis.com/auth/cloud-platform" 2890 // ] 2891 // } 2892 2893} 2894 2895// method id "datacatalog.projects.locations.entryGroups.delete": 2896 2897type ProjectsLocationsEntryGroupsDeleteCall struct { 2898 s *Service 2899 name string 2900 urlParams_ gensupport.URLParams 2901 ctx_ context.Context 2902 header_ http.Header 2903} 2904 2905// Delete: Deletes an EntryGroup. Only entry groups that do not contain 2906// entries can be deleted. Users should enable the Data Catalog API in 2907// the project identified by the `name` parameter (see [Data Catalog 2908// Resource Project] 2909// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 2910// for more information). 2911func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { 2912 c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2913 c.name = name 2914 return c 2915} 2916 2917// Force sets the optional parameter "force": If true, deletes all 2918// entries in the entry group. 2919func (c *ProjectsLocationsEntryGroupsDeleteCall) Force(force bool) *ProjectsLocationsEntryGroupsDeleteCall { 2920 c.urlParams_.Set("force", fmt.Sprint(force)) 2921 return c 2922} 2923 2924// Fields allows partial responses to be retrieved. See 2925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2926// for more information. 2927func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { 2928 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2929 return c 2930} 2931 2932// Context sets the context to be used in this call's Do method. Any 2933// pending HTTP request will be aborted if the provided context is 2934// canceled. 2935func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { 2936 c.ctx_ = ctx 2937 return c 2938} 2939 2940// Header returns an http.Header that can be modified by the caller to 2941// add HTTP headers to the request. 2942func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { 2943 if c.header_ == nil { 2944 c.header_ = make(http.Header) 2945 } 2946 return c.header_ 2947} 2948 2949func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 2950 reqHeaders := make(http.Header) 2951 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 2952 for k, v := range c.header_ { 2953 reqHeaders[k] = v 2954 } 2955 reqHeaders.Set("User-Agent", c.s.userAgent()) 2956 var body io.Reader = nil 2957 c.urlParams_.Set("alt", alt) 2958 c.urlParams_.Set("prettyPrint", "false") 2959 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 2960 urls += "?" + c.urlParams_.Encode() 2961 req, err := http.NewRequest("DELETE", urls, body) 2962 if err != nil { 2963 return nil, err 2964 } 2965 req.Header = reqHeaders 2966 googleapi.Expand(req.URL, map[string]string{ 2967 "name": c.name, 2968 }) 2969 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2970} 2971 2972// Do executes the "datacatalog.projects.locations.entryGroups.delete" call. 2973// Exactly one of *Empty or error will be non-nil. Any non-2xx status 2974// code is an error. Response headers are in either 2975// *Empty.ServerResponse.Header or (if a response was returned at all) 2976// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2977// check whether the returned error was because http.StatusNotModified 2978// was returned. 2979func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 2980 gensupport.SetOptions(c.urlParams_, opts...) 2981 res, err := c.doRequest("json") 2982 if res != nil && res.StatusCode == http.StatusNotModified { 2983 if res.Body != nil { 2984 res.Body.Close() 2985 } 2986 return nil, &googleapi.Error{ 2987 Code: res.StatusCode, 2988 Header: res.Header, 2989 } 2990 } 2991 if err != nil { 2992 return nil, err 2993 } 2994 defer googleapi.CloseBody(res) 2995 if err := googleapi.CheckResponse(res); err != nil { 2996 return nil, err 2997 } 2998 ret := &Empty{ 2999 ServerResponse: googleapi.ServerResponse{ 3000 Header: res.Header, 3001 HTTPStatusCode: res.StatusCode, 3002 }, 3003 } 3004 target := &ret 3005 if err := gensupport.DecodeResponse(target, res); err != nil { 3006 return nil, err 3007 } 3008 return ret, nil 3009 // { 3010 // "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).", 3011 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3012 // "httpMethod": "DELETE", 3013 // "id": "datacatalog.projects.locations.entryGroups.delete", 3014 // "parameterOrder": [ 3015 // "name" 3016 // ], 3017 // "parameters": { 3018 // "force": { 3019 // "description": "Optional. If true, deletes all entries in the entry group.", 3020 // "location": "query", 3021 // "type": "boolean" 3022 // }, 3023 // "name": { 3024 // "description": "Required. The name of the entry group. For example, `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.", 3025 // "location": "path", 3026 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3027 // "required": true, 3028 // "type": "string" 3029 // } 3030 // }, 3031 // "path": "v1beta1/{+name}", 3032 // "response": { 3033 // "$ref": "Empty" 3034 // }, 3035 // "scopes": [ 3036 // "https://www.googleapis.com/auth/cloud-platform" 3037 // ] 3038 // } 3039 3040} 3041 3042// method id "datacatalog.projects.locations.entryGroups.get": 3043 3044type ProjectsLocationsEntryGroupsGetCall struct { 3045 s *Service 3046 name string 3047 urlParams_ gensupport.URLParams 3048 ifNoneMatch_ string 3049 ctx_ context.Context 3050 header_ http.Header 3051} 3052 3053// Get: Gets an EntryGroup. 3054func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { 3055 c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3056 c.name = name 3057 return c 3058} 3059 3060// ReadMask sets the optional parameter "readMask": The fields to 3061// return. If not set or empty, all fields are returned. 3062func (c *ProjectsLocationsEntryGroupsGetCall) ReadMask(readMask string) *ProjectsLocationsEntryGroupsGetCall { 3063 c.urlParams_.Set("readMask", readMask) 3064 return c 3065} 3066 3067// Fields allows partial responses to be retrieved. See 3068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3069// for more information. 3070func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { 3071 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3072 return c 3073} 3074 3075// IfNoneMatch sets the optional parameter which makes the operation 3076// fail if the object's ETag matches the given value. This is useful for 3077// getting updates only after the object has changed since the last 3078// request. Use googleapi.IsNotModified to check whether the response 3079// error from Do is the result of In-None-Match. 3080func (c *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { 3081 c.ifNoneMatch_ = entityTag 3082 return c 3083} 3084 3085// Context sets the context to be used in this call's Do method. Any 3086// pending HTTP request will be aborted if the provided context is 3087// canceled. 3088func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { 3089 c.ctx_ = ctx 3090 return c 3091} 3092 3093// Header returns an http.Header that can be modified by the caller to 3094// add HTTP headers to the request. 3095func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { 3096 if c.header_ == nil { 3097 c.header_ = make(http.Header) 3098 } 3099 return c.header_ 3100} 3101 3102func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { 3103 reqHeaders := make(http.Header) 3104 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3105 for k, v := range c.header_ { 3106 reqHeaders[k] = v 3107 } 3108 reqHeaders.Set("User-Agent", c.s.userAgent()) 3109 if c.ifNoneMatch_ != "" { 3110 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3111 } 3112 var body io.Reader = nil 3113 c.urlParams_.Set("alt", alt) 3114 c.urlParams_.Set("prettyPrint", "false") 3115 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3116 urls += "?" + c.urlParams_.Encode() 3117 req, err := http.NewRequest("GET", urls, body) 3118 if err != nil { 3119 return nil, err 3120 } 3121 req.Header = reqHeaders 3122 googleapi.Expand(req.URL, map[string]string{ 3123 "name": c.name, 3124 }) 3125 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3126} 3127 3128// Do executes the "datacatalog.projects.locations.entryGroups.get" call. 3129// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 3130// be non-nil. Any non-2xx status code is an error. Response headers are 3131// in either 3132// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 3133// a response was returned at all) in error.(*googleapi.Error).Header. 3134// Use googleapi.IsNotModified to check whether the returned error was 3135// because http.StatusNotModified was returned. 3136func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 3137 gensupport.SetOptions(c.urlParams_, opts...) 3138 res, err := c.doRequest("json") 3139 if res != nil && res.StatusCode == http.StatusNotModified { 3140 if res.Body != nil { 3141 res.Body.Close() 3142 } 3143 return nil, &googleapi.Error{ 3144 Code: res.StatusCode, 3145 Header: res.Header, 3146 } 3147 } 3148 if err != nil { 3149 return nil, err 3150 } 3151 defer googleapi.CloseBody(res) 3152 if err := googleapi.CheckResponse(res); err != nil { 3153 return nil, err 3154 } 3155 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 3156 ServerResponse: googleapi.ServerResponse{ 3157 Header: res.Header, 3158 HTTPStatusCode: res.StatusCode, 3159 }, 3160 } 3161 target := &ret 3162 if err := gensupport.DecodeResponse(target, res); err != nil { 3163 return nil, err 3164 } 3165 return ret, nil 3166 // { 3167 // "description": "Gets an EntryGroup.", 3168 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3169 // "httpMethod": "GET", 3170 // "id": "datacatalog.projects.locations.entryGroups.get", 3171 // "parameterOrder": [ 3172 // "name" 3173 // ], 3174 // "parameters": { 3175 // "name": { 3176 // "description": "Required. The name of the entry group. For example, `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.", 3177 // "location": "path", 3178 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3179 // "required": true, 3180 // "type": "string" 3181 // }, 3182 // "readMask": { 3183 // "description": "The fields to return. If not set or empty, all fields are returned.", 3184 // "format": "google-fieldmask", 3185 // "location": "query", 3186 // "type": "string" 3187 // } 3188 // }, 3189 // "path": "v1beta1/{+name}", 3190 // "response": { 3191 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3192 // }, 3193 // "scopes": [ 3194 // "https://www.googleapis.com/auth/cloud-platform" 3195 // ] 3196 // } 3197 3198} 3199 3200// method id "datacatalog.projects.locations.entryGroups.getIamPolicy": 3201 3202type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { 3203 s *Service 3204 resource string 3205 getiampolicyrequest *GetIamPolicyRequest 3206 urlParams_ gensupport.URLParams 3207 ctx_ context.Context 3208 header_ http.Header 3209} 3210 3211// GetIamPolicy: Gets the access control policy for a resource. A 3212// `NOT_FOUND` error is returned if the resource does not exist. An 3213// empty policy is returned if the resource exists but does not have a 3214// policy set on it. Supported resources are: - Tag templates. - 3215// Entries. - Entry groups. Note, this method cannot be used to manage 3216// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 3217// resources synced to Data Catalog. Callers must have following Google 3218// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 3219// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 3220// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 3221// get policies on entry groups. 3222func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3223 c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3224 c.resource = resource 3225 c.getiampolicyrequest = getiampolicyrequest 3226 return c 3227} 3228 3229// Fields allows partial responses to be retrieved. See 3230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3231// for more information. 3232func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3233 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3234 return c 3235} 3236 3237// Context sets the context to be used in this call's Do method. Any 3238// pending HTTP request will be aborted if the provided context is 3239// canceled. 3240func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 3241 c.ctx_ = ctx 3242 return c 3243} 3244 3245// Header returns an http.Header that can be modified by the caller to 3246// add HTTP headers to the request. 3247func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { 3248 if c.header_ == nil { 3249 c.header_ = make(http.Header) 3250 } 3251 return c.header_ 3252} 3253 3254func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3255 reqHeaders := make(http.Header) 3256 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3257 for k, v := range c.header_ { 3258 reqHeaders[k] = v 3259 } 3260 reqHeaders.Set("User-Agent", c.s.userAgent()) 3261 var body io.Reader = nil 3262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 3263 if err != nil { 3264 return nil, err 3265 } 3266 reqHeaders.Set("Content-Type", "application/json") 3267 c.urlParams_.Set("alt", alt) 3268 c.urlParams_.Set("prettyPrint", "false") 3269 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 3270 urls += "?" + c.urlParams_.Encode() 3271 req, err := http.NewRequest("POST", urls, body) 3272 if err != nil { 3273 return nil, err 3274 } 3275 req.Header = reqHeaders 3276 googleapi.Expand(req.URL, map[string]string{ 3277 "resource": c.resource, 3278 }) 3279 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3280} 3281 3282// Do executes the "datacatalog.projects.locations.entryGroups.getIamPolicy" call. 3283// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3284// code is an error. Response headers are in either 3285// *Policy.ServerResponse.Header or (if a response was returned at all) 3286// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3287// check whether the returned error was because http.StatusNotModified 3288// was returned. 3289func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3290 gensupport.SetOptions(c.urlParams_, opts...) 3291 res, err := c.doRequest("json") 3292 if res != nil && res.StatusCode == http.StatusNotModified { 3293 if res.Body != nil { 3294 res.Body.Close() 3295 } 3296 return nil, &googleapi.Error{ 3297 Code: res.StatusCode, 3298 Header: res.Header, 3299 } 3300 } 3301 if err != nil { 3302 return nil, err 3303 } 3304 defer googleapi.CloseBody(res) 3305 if err := googleapi.CheckResponse(res); err != nil { 3306 return nil, err 3307 } 3308 ret := &Policy{ 3309 ServerResponse: googleapi.ServerResponse{ 3310 Header: res.Header, 3311 HTTPStatusCode: res.StatusCode, 3312 }, 3313 } 3314 target := &ret 3315 if err := gensupport.DecodeResponse(target, res); err != nil { 3316 return nil, err 3317 } 3318 return ret, nil 3319 // { 3320 // "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.", 3321 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:getIamPolicy", 3322 // "httpMethod": "POST", 3323 // "id": "datacatalog.projects.locations.entryGroups.getIamPolicy", 3324 // "parameterOrder": [ 3325 // "resource" 3326 // ], 3327 // "parameters": { 3328 // "resource": { 3329 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 3330 // "location": "path", 3331 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3332 // "required": true, 3333 // "type": "string" 3334 // } 3335 // }, 3336 // "path": "v1beta1/{+resource}:getIamPolicy", 3337 // "request": { 3338 // "$ref": "GetIamPolicyRequest" 3339 // }, 3340 // "response": { 3341 // "$ref": "Policy" 3342 // }, 3343 // "scopes": [ 3344 // "https://www.googleapis.com/auth/cloud-platform" 3345 // ] 3346 // } 3347 3348} 3349 3350// method id "datacatalog.projects.locations.entryGroups.list": 3351 3352type ProjectsLocationsEntryGroupsListCall struct { 3353 s *Service 3354 parent string 3355 urlParams_ gensupport.URLParams 3356 ifNoneMatch_ string 3357 ctx_ context.Context 3358 header_ http.Header 3359} 3360 3361// List: Lists entry groups. 3362func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { 3363 c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3364 c.parent = parent 3365 return c 3366} 3367 3368// PageSize sets the optional parameter "pageSize": The maximum number 3369// of items to return. Default is 10. Max limit is 1000. Throws an 3370// invalid argument for `page_size > 1000`. 3371func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { 3372 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3373 return c 3374} 3375 3376// PageToken sets the optional parameter "pageToken": Token that 3377// specifies which page is requested. If empty, the first page is 3378// returned. 3379func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { 3380 c.urlParams_.Set("pageToken", pageToken) 3381 return c 3382} 3383 3384// Fields allows partial responses to be retrieved. See 3385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3386// for more information. 3387func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { 3388 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3389 return c 3390} 3391 3392// IfNoneMatch sets the optional parameter which makes the operation 3393// fail if the object's ETag matches the given value. This is useful for 3394// getting updates only after the object has changed since the last 3395// request. Use googleapi.IsNotModified to check whether the response 3396// error from Do is the result of In-None-Match. 3397func (c *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { 3398 c.ifNoneMatch_ = entityTag 3399 return c 3400} 3401 3402// Context sets the context to be used in this call's Do method. Any 3403// pending HTTP request will be aborted if the provided context is 3404// canceled. 3405func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { 3406 c.ctx_ = ctx 3407 return c 3408} 3409 3410// Header returns an http.Header that can be modified by the caller to 3411// add HTTP headers to the request. 3412func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { 3413 if c.header_ == nil { 3414 c.header_ = make(http.Header) 3415 } 3416 return c.header_ 3417} 3418 3419func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { 3420 reqHeaders := make(http.Header) 3421 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3422 for k, v := range c.header_ { 3423 reqHeaders[k] = v 3424 } 3425 reqHeaders.Set("User-Agent", c.s.userAgent()) 3426 if c.ifNoneMatch_ != "" { 3427 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3428 } 3429 var body io.Reader = nil 3430 c.urlParams_.Set("alt", alt) 3431 c.urlParams_.Set("prettyPrint", "false") 3432 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entryGroups") 3433 urls += "?" + c.urlParams_.Encode() 3434 req, err := http.NewRequest("GET", urls, body) 3435 if err != nil { 3436 return nil, err 3437 } 3438 req.Header = reqHeaders 3439 googleapi.Expand(req.URL, map[string]string{ 3440 "parent": c.parent, 3441 }) 3442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3443} 3444 3445// Do executes the "datacatalog.projects.locations.entryGroups.list" call. 3446// Exactly one of *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse 3447// or error will be non-nil. Any non-2xx status code is an error. 3448// Response headers are in either 3449// *GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse.ServerResponse.H 3450// eader or (if a response was returned at all) in 3451// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3452// whether the returned error was because http.StatusNotModified was 3453// returned. 3454func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse, error) { 3455 gensupport.SetOptions(c.urlParams_, opts...) 3456 res, err := c.doRequest("json") 3457 if res != nil && res.StatusCode == http.StatusNotModified { 3458 if res.Body != nil { 3459 res.Body.Close() 3460 } 3461 return nil, &googleapi.Error{ 3462 Code: res.StatusCode, 3463 Header: res.Header, 3464 } 3465 } 3466 if err != nil { 3467 return nil, err 3468 } 3469 defer googleapi.CloseBody(res) 3470 if err := googleapi.CheckResponse(res); err != nil { 3471 return nil, err 3472 } 3473 ret := &GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse{ 3474 ServerResponse: googleapi.ServerResponse{ 3475 Header: res.Header, 3476 HTTPStatusCode: res.StatusCode, 3477 }, 3478 } 3479 target := &ret 3480 if err := gensupport.DecodeResponse(target, res); err != nil { 3481 return nil, err 3482 } 3483 return ret, nil 3484 // { 3485 // "description": "Lists entry groups.", 3486 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups", 3487 // "httpMethod": "GET", 3488 // "id": "datacatalog.projects.locations.entryGroups.list", 3489 // "parameterOrder": [ 3490 // "parent" 3491 // ], 3492 // "parameters": { 3493 // "pageSize": { 3494 // "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`.", 3495 // "format": "int32", 3496 // "location": "query", 3497 // "type": "integer" 3498 // }, 3499 // "pageToken": { 3500 // "description": "Optional. Token that specifies which page is requested. If empty, the first page is returned.", 3501 // "location": "query", 3502 // "type": "string" 3503 // }, 3504 // "parent": { 3505 // "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}", 3506 // "location": "path", 3507 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3508 // "required": true, 3509 // "type": "string" 3510 // } 3511 // }, 3512 // "path": "v1beta1/{+parent}/entryGroups", 3513 // "response": { 3514 // "$ref": "GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse" 3515 // }, 3516 // "scopes": [ 3517 // "https://www.googleapis.com/auth/cloud-platform" 3518 // ] 3519 // } 3520 3521} 3522 3523// Pages invokes f for each page of results. 3524// A non-nil error returned from f will halt the iteration. 3525// The provided context supersedes any context provided to the Context method. 3526func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse) error) error { 3527 c.ctx_ = ctx 3528 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3529 for { 3530 x, err := c.Do() 3531 if err != nil { 3532 return err 3533 } 3534 if err := f(x); err != nil { 3535 return err 3536 } 3537 if x.NextPageToken == "" { 3538 return nil 3539 } 3540 c.PageToken(x.NextPageToken) 3541 } 3542} 3543 3544// method id "datacatalog.projects.locations.entryGroups.patch": 3545 3546type ProjectsLocationsEntryGroupsPatchCall struct { 3547 s *Service 3548 name string 3549 googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup 3550 urlParams_ gensupport.URLParams 3551 ctx_ context.Context 3552 header_ http.Header 3553} 3554 3555// Patch: Updates an EntryGroup. The user should enable the Data Catalog 3556// API in the project identified by the `entry_group.name` parameter 3557// (see [Data Catalog Resource Project] 3558// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 3559// for more information). 3560func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddatacatalogv1beta1entrygroup *GoogleCloudDatacatalogV1beta1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { 3561 c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3562 c.name = name 3563 c.googleclouddatacatalogv1beta1entrygroup = googleclouddatacatalogv1beta1entrygroup 3564 return c 3565} 3566 3567// UpdateMask sets the optional parameter "updateMask": The fields to 3568// update on the entry group. If absent or empty, all modifiable fields 3569// are updated. 3570func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { 3571 c.urlParams_.Set("updateMask", updateMask) 3572 return c 3573} 3574 3575// Fields allows partial responses to be retrieved. See 3576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3577// for more information. 3578func (c *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { 3579 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3580 return c 3581} 3582 3583// Context sets the context to be used in this call's Do method. Any 3584// pending HTTP request will be aborted if the provided context is 3585// canceled. 3586func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { 3587 c.ctx_ = ctx 3588 return c 3589} 3590 3591// Header returns an http.Header that can be modified by the caller to 3592// add HTTP headers to the request. 3593func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { 3594 if c.header_ == nil { 3595 c.header_ = make(http.Header) 3596 } 3597 return c.header_ 3598} 3599 3600func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 3601 reqHeaders := make(http.Header) 3602 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3603 for k, v := range c.header_ { 3604 reqHeaders[k] = v 3605 } 3606 reqHeaders.Set("User-Agent", c.s.userAgent()) 3607 var body io.Reader = nil 3608 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entrygroup) 3609 if err != nil { 3610 return nil, err 3611 } 3612 reqHeaders.Set("Content-Type", "application/json") 3613 c.urlParams_.Set("alt", alt) 3614 c.urlParams_.Set("prettyPrint", "false") 3615 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 3616 urls += "?" + c.urlParams_.Encode() 3617 req, err := http.NewRequest("PATCH", urls, body) 3618 if err != nil { 3619 return nil, err 3620 } 3621 req.Header = reqHeaders 3622 googleapi.Expand(req.URL, map[string]string{ 3623 "name": c.name, 3624 }) 3625 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3626} 3627 3628// Do executes the "datacatalog.projects.locations.entryGroups.patch" call. 3629// Exactly one of *GoogleCloudDatacatalogV1beta1EntryGroup or error will 3630// be non-nil. Any non-2xx status code is an error. Response headers are 3631// in either 3632// *GoogleCloudDatacatalogV1beta1EntryGroup.ServerResponse.Header or (if 3633// a response was returned at all) in error.(*googleapi.Error).Header. 3634// Use googleapi.IsNotModified to check whether the returned error was 3635// because http.StatusNotModified was returned. 3636func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1EntryGroup, error) { 3637 gensupport.SetOptions(c.urlParams_, opts...) 3638 res, err := c.doRequest("json") 3639 if res != nil && res.StatusCode == http.StatusNotModified { 3640 if res.Body != nil { 3641 res.Body.Close() 3642 } 3643 return nil, &googleapi.Error{ 3644 Code: res.StatusCode, 3645 Header: res.Header, 3646 } 3647 } 3648 if err != nil { 3649 return nil, err 3650 } 3651 defer googleapi.CloseBody(res) 3652 if err := googleapi.CheckResponse(res); err != nil { 3653 return nil, err 3654 } 3655 ret := &GoogleCloudDatacatalogV1beta1EntryGroup{ 3656 ServerResponse: googleapi.ServerResponse{ 3657 Header: res.Header, 3658 HTTPStatusCode: res.StatusCode, 3659 }, 3660 } 3661 target := &ret 3662 if err := gensupport.DecodeResponse(target, res); err != nil { 3663 return nil, err 3664 } 3665 return ret, nil 3666 // { 3667 // "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).", 3668 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", 3669 // "httpMethod": "PATCH", 3670 // "id": "datacatalog.projects.locations.entryGroups.patch", 3671 // "parameterOrder": [ 3672 // "name" 3673 // ], 3674 // "parameters": { 3675 // "name": { 3676 // "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.", 3677 // "location": "path", 3678 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3679 // "required": true, 3680 // "type": "string" 3681 // }, 3682 // "updateMask": { 3683 // "description": "The fields to update on the entry group. If absent or empty, all modifiable fields are updated.", 3684 // "format": "google-fieldmask", 3685 // "location": "query", 3686 // "type": "string" 3687 // } 3688 // }, 3689 // "path": "v1beta1/{+name}", 3690 // "request": { 3691 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3692 // }, 3693 // "response": { 3694 // "$ref": "GoogleCloudDatacatalogV1beta1EntryGroup" 3695 // }, 3696 // "scopes": [ 3697 // "https://www.googleapis.com/auth/cloud-platform" 3698 // ] 3699 // } 3700 3701} 3702 3703// method id "datacatalog.projects.locations.entryGroups.setIamPolicy": 3704 3705type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { 3706 s *Service 3707 resource string 3708 setiampolicyrequest *SetIamPolicyRequest 3709 urlParams_ gensupport.URLParams 3710 ctx_ context.Context 3711 header_ http.Header 3712} 3713 3714// SetIamPolicy: Sets the access control policy for a resource. Replaces 3715// any existing policy. Supported resources are: - Tag templates. - 3716// Entries. - Entry groups. Note, this method cannot be used to manage 3717// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 3718// resources synced to Data Catalog. Callers must have following Google 3719// IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set 3720// policies on tag templates. - `datacatalog.entries.setIamPolicy` to 3721// set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to 3722// set policies on entry groups. 3723func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3724 c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3725 c.resource = resource 3726 c.setiampolicyrequest = setiampolicyrequest 3727 return c 3728} 3729 3730// Fields allows partial responses to be retrieved. See 3731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3732// for more information. 3733func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3734 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3735 return c 3736} 3737 3738// Context sets the context to be used in this call's Do method. Any 3739// pending HTTP request will be aborted if the provided context is 3740// canceled. 3741func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 3742 c.ctx_ = ctx 3743 return c 3744} 3745 3746// Header returns an http.Header that can be modified by the caller to 3747// add HTTP headers to the request. 3748func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { 3749 if c.header_ == nil { 3750 c.header_ = make(http.Header) 3751 } 3752 return c.header_ 3753} 3754 3755func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3756 reqHeaders := make(http.Header) 3757 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3758 for k, v := range c.header_ { 3759 reqHeaders[k] = v 3760 } 3761 reqHeaders.Set("User-Agent", c.s.userAgent()) 3762 var body io.Reader = nil 3763 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 3764 if err != nil { 3765 return nil, err 3766 } 3767 reqHeaders.Set("Content-Type", "application/json") 3768 c.urlParams_.Set("alt", alt) 3769 c.urlParams_.Set("prettyPrint", "false") 3770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 3771 urls += "?" + c.urlParams_.Encode() 3772 req, err := http.NewRequest("POST", urls, body) 3773 if err != nil { 3774 return nil, err 3775 } 3776 req.Header = reqHeaders 3777 googleapi.Expand(req.URL, map[string]string{ 3778 "resource": c.resource, 3779 }) 3780 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3781} 3782 3783// Do executes the "datacatalog.projects.locations.entryGroups.setIamPolicy" call. 3784// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3785// code is an error. Response headers are in either 3786// *Policy.ServerResponse.Header or (if a response was returned at all) 3787// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3788// check whether the returned error was because http.StatusNotModified 3789// was returned. 3790func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3791 gensupport.SetOptions(c.urlParams_, opts...) 3792 res, err := c.doRequest("json") 3793 if res != nil && res.StatusCode == http.StatusNotModified { 3794 if res.Body != nil { 3795 res.Body.Close() 3796 } 3797 return nil, &googleapi.Error{ 3798 Code: res.StatusCode, 3799 Header: res.Header, 3800 } 3801 } 3802 if err != nil { 3803 return nil, err 3804 } 3805 defer googleapi.CloseBody(res) 3806 if err := googleapi.CheckResponse(res); err != nil { 3807 return nil, err 3808 } 3809 ret := &Policy{ 3810 ServerResponse: googleapi.ServerResponse{ 3811 Header: res.Header, 3812 HTTPStatusCode: res.StatusCode, 3813 }, 3814 } 3815 target := &ret 3816 if err := gensupport.DecodeResponse(target, res); err != nil { 3817 return nil, err 3818 } 3819 return ret, nil 3820 // { 3821 // "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.", 3822 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:setIamPolicy", 3823 // "httpMethod": "POST", 3824 // "id": "datacatalog.projects.locations.entryGroups.setIamPolicy", 3825 // "parameterOrder": [ 3826 // "resource" 3827 // ], 3828 // "parameters": { 3829 // "resource": { 3830 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 3831 // "location": "path", 3832 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3833 // "required": true, 3834 // "type": "string" 3835 // } 3836 // }, 3837 // "path": "v1beta1/{+resource}:setIamPolicy", 3838 // "request": { 3839 // "$ref": "SetIamPolicyRequest" 3840 // }, 3841 // "response": { 3842 // "$ref": "Policy" 3843 // }, 3844 // "scopes": [ 3845 // "https://www.googleapis.com/auth/cloud-platform" 3846 // ] 3847 // } 3848 3849} 3850 3851// method id "datacatalog.projects.locations.entryGroups.testIamPermissions": 3852 3853type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { 3854 s *Service 3855 resource string 3856 testiampermissionsrequest *TestIamPermissionsRequest 3857 urlParams_ gensupport.URLParams 3858 ctx_ context.Context 3859 header_ http.Header 3860} 3861 3862// TestIamPermissions: Returns the caller's permissions on a resource. 3863// If the resource does not exist, an empty set of permissions is 3864// returned (We don't return a `NOT_FOUND` error). Supported resources 3865// are: - Tag templates. - Entries. - Entry groups. Note, this method 3866// cannot be used to manage policies for BigQuery, Pub/Sub and any 3867// external Google Cloud Platform resources synced to Data Catalog. A 3868// caller is not required to have Google IAM permission to make this 3869// request. 3870func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 3871 c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3872 c.resource = resource 3873 c.testiampermissionsrequest = testiampermissionsrequest 3874 return c 3875} 3876 3877// Fields allows partial responses to be retrieved. See 3878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3879// for more information. 3880func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 3881 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3882 return c 3883} 3884 3885// Context sets the context to be used in this call's Do method. Any 3886// pending HTTP request will be aborted if the provided context is 3887// canceled. 3888func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 3889 c.ctx_ = ctx 3890 return c 3891} 3892 3893// Header returns an http.Header that can be modified by the caller to 3894// add HTTP headers to the request. 3895func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { 3896 if c.header_ == nil { 3897 c.header_ = make(http.Header) 3898 } 3899 return c.header_ 3900} 3901 3902func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 3903 reqHeaders := make(http.Header) 3904 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 3905 for k, v := range c.header_ { 3906 reqHeaders[k] = v 3907 } 3908 reqHeaders.Set("User-Agent", c.s.userAgent()) 3909 var body io.Reader = nil 3910 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 3911 if err != nil { 3912 return nil, err 3913 } 3914 reqHeaders.Set("Content-Type", "application/json") 3915 c.urlParams_.Set("alt", alt) 3916 c.urlParams_.Set("prettyPrint", "false") 3917 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 3918 urls += "?" + c.urlParams_.Encode() 3919 req, err := http.NewRequest("POST", urls, body) 3920 if err != nil { 3921 return nil, err 3922 } 3923 req.Header = reqHeaders 3924 googleapi.Expand(req.URL, map[string]string{ 3925 "resource": c.resource, 3926 }) 3927 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3928} 3929 3930// Do executes the "datacatalog.projects.locations.entryGroups.testIamPermissions" call. 3931// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 3932// Any non-2xx status code is an error. Response headers are in either 3933// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 3934// was returned at all) in error.(*googleapi.Error).Header. Use 3935// googleapi.IsNotModified to check whether the returned error was 3936// because http.StatusNotModified was returned. 3937func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 3938 gensupport.SetOptions(c.urlParams_, opts...) 3939 res, err := c.doRequest("json") 3940 if res != nil && res.StatusCode == http.StatusNotModified { 3941 if res.Body != nil { 3942 res.Body.Close() 3943 } 3944 return nil, &googleapi.Error{ 3945 Code: res.StatusCode, 3946 Header: res.Header, 3947 } 3948 } 3949 if err != nil { 3950 return nil, err 3951 } 3952 defer googleapi.CloseBody(res) 3953 if err := googleapi.CheckResponse(res); err != nil { 3954 return nil, err 3955 } 3956 ret := &TestIamPermissionsResponse{ 3957 ServerResponse: googleapi.ServerResponse{ 3958 Header: res.Header, 3959 HTTPStatusCode: res.StatusCode, 3960 }, 3961 } 3962 target := &ret 3963 if err := gensupport.DecodeResponse(target, res); err != nil { 3964 return nil, err 3965 } 3966 return ret, nil 3967 // { 3968 // "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.", 3969 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:testIamPermissions", 3970 // "httpMethod": "POST", 3971 // "id": "datacatalog.projects.locations.entryGroups.testIamPermissions", 3972 // "parameterOrder": [ 3973 // "resource" 3974 // ], 3975 // "parameters": { 3976 // "resource": { 3977 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 3978 // "location": "path", 3979 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 3980 // "required": true, 3981 // "type": "string" 3982 // } 3983 // }, 3984 // "path": "v1beta1/{+resource}:testIamPermissions", 3985 // "request": { 3986 // "$ref": "TestIamPermissionsRequest" 3987 // }, 3988 // "response": { 3989 // "$ref": "TestIamPermissionsResponse" 3990 // }, 3991 // "scopes": [ 3992 // "https://www.googleapis.com/auth/cloud-platform" 3993 // ] 3994 // } 3995 3996} 3997 3998// method id "datacatalog.projects.locations.entryGroups.entries.create": 3999 4000type ProjectsLocationsEntryGroupsEntriesCreateCall struct { 4001 s *Service 4002 parent string 4003 googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry 4004 urlParams_ gensupport.URLParams 4005 ctx_ context.Context 4006 header_ http.Header 4007} 4008 4009// Create: Creates an entry. Only entries of 'FILESET' type or 4010// user-specified type can be created. Users should enable the Data 4011// Catalog API in the project identified by the `parent` parameter (see 4012// [Data Catalog Resource Project] 4013// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4014// for more information). A maximum of 100,000 entries may be created 4015// per entry group. 4016func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4017 c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4018 c.parent = parent 4019 c.googleclouddatacatalogv1beta1entry = googleclouddatacatalogv1beta1entry 4020 return c 4021} 4022 4023// EntryId sets the optional parameter "entryId": Required. The id of 4024// the entry to create. 4025func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4026 c.urlParams_.Set("entryId", entryId) 4027 return c 4028} 4029 4030// Fields allows partial responses to be retrieved. See 4031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4032// for more information. 4033func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4034 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4035 return c 4036} 4037 4038// Context sets the context to be used in this call's Do method. Any 4039// pending HTTP request will be aborted if the provided context is 4040// canceled. 4041func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { 4042 c.ctx_ = ctx 4043 return c 4044} 4045 4046// Header returns an http.Header that can be modified by the caller to 4047// add HTTP headers to the request. 4048func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { 4049 if c.header_ == nil { 4050 c.header_ = make(http.Header) 4051 } 4052 return c.header_ 4053} 4054 4055func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { 4056 reqHeaders := make(http.Header) 4057 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4058 for k, v := range c.header_ { 4059 reqHeaders[k] = v 4060 } 4061 reqHeaders.Set("User-Agent", c.s.userAgent()) 4062 var body io.Reader = nil 4063 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entry) 4064 if err != nil { 4065 return nil, err 4066 } 4067 reqHeaders.Set("Content-Type", "application/json") 4068 c.urlParams_.Set("alt", alt) 4069 c.urlParams_.Set("prettyPrint", "false") 4070 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entries") 4071 urls += "?" + c.urlParams_.Encode() 4072 req, err := http.NewRequest("POST", urls, body) 4073 if err != nil { 4074 return nil, err 4075 } 4076 req.Header = reqHeaders 4077 googleapi.Expand(req.URL, map[string]string{ 4078 "parent": c.parent, 4079 }) 4080 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4081} 4082 4083// Do executes the "datacatalog.projects.locations.entryGroups.entries.create" call. 4084// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 4085// non-nil. Any non-2xx status code is an error. Response headers are in 4086// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 4087// (if a response was returned at all) in 4088// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4089// whether the returned error was because http.StatusNotModified was 4090// returned. 4091func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 4092 gensupport.SetOptions(c.urlParams_, opts...) 4093 res, err := c.doRequest("json") 4094 if res != nil && res.StatusCode == http.StatusNotModified { 4095 if res.Body != nil { 4096 res.Body.Close() 4097 } 4098 return nil, &googleapi.Error{ 4099 Code: res.StatusCode, 4100 Header: res.Header, 4101 } 4102 } 4103 if err != nil { 4104 return nil, err 4105 } 4106 defer googleapi.CloseBody(res) 4107 if err := googleapi.CheckResponse(res); err != nil { 4108 return nil, err 4109 } 4110 ret := &GoogleCloudDatacatalogV1beta1Entry{ 4111 ServerResponse: googleapi.ServerResponse{ 4112 Header: res.Header, 4113 HTTPStatusCode: res.StatusCode, 4114 }, 4115 } 4116 target := &ret 4117 if err := gensupport.DecodeResponse(target, res); err != nil { 4118 return nil, err 4119 } 4120 return ret, nil 4121 // { 4122 // "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.", 4123 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", 4124 // "httpMethod": "POST", 4125 // "id": "datacatalog.projects.locations.entryGroups.entries.create", 4126 // "parameterOrder": [ 4127 // "parent" 4128 // ], 4129 // "parameters": { 4130 // "entryId": { 4131 // "description": "Required. The id of the entry to create.", 4132 // "location": "query", 4133 // "type": "string" 4134 // }, 4135 // "parent": { 4136 // "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.", 4137 // "location": "path", 4138 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 4139 // "required": true, 4140 // "type": "string" 4141 // } 4142 // }, 4143 // "path": "v1beta1/{+parent}/entries", 4144 // "request": { 4145 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4146 // }, 4147 // "response": { 4148 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4149 // }, 4150 // "scopes": [ 4151 // "https://www.googleapis.com/auth/cloud-platform" 4152 // ] 4153 // } 4154 4155} 4156 4157// method id "datacatalog.projects.locations.entryGroups.entries.delete": 4158 4159type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { 4160 s *Service 4161 name string 4162 urlParams_ gensupport.URLParams 4163 ctx_ context.Context 4164 header_ http.Header 4165} 4166 4167// Delete: Deletes an existing entry. Only entries created through 4168// CreateEntry method can be deleted. Users should enable the Data 4169// Catalog API in the project identified by the `name` parameter (see 4170// [Data Catalog Resource Project] 4171// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4172// for more information). 4173func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4174 c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4175 c.name = name 4176 return c 4177} 4178 4179// Fields allows partial responses to be retrieved. See 4180// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4181// for more information. 4182func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4183 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4184 return c 4185} 4186 4187// Context sets the context to be used in this call's Do method. Any 4188// pending HTTP request will be aborted if the provided context is 4189// canceled. 4190func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 4191 c.ctx_ = ctx 4192 return c 4193} 4194 4195// Header returns an http.Header that can be modified by the caller to 4196// add HTTP headers to the request. 4197func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { 4198 if c.header_ == nil { 4199 c.header_ = make(http.Header) 4200 } 4201 return c.header_ 4202} 4203 4204func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { 4205 reqHeaders := make(http.Header) 4206 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4207 for k, v := range c.header_ { 4208 reqHeaders[k] = v 4209 } 4210 reqHeaders.Set("User-Agent", c.s.userAgent()) 4211 var body io.Reader = nil 4212 c.urlParams_.Set("alt", alt) 4213 c.urlParams_.Set("prettyPrint", "false") 4214 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4215 urls += "?" + c.urlParams_.Encode() 4216 req, err := http.NewRequest("DELETE", urls, body) 4217 if err != nil { 4218 return nil, err 4219 } 4220 req.Header = reqHeaders 4221 googleapi.Expand(req.URL, map[string]string{ 4222 "name": c.name, 4223 }) 4224 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4225} 4226 4227// Do executes the "datacatalog.projects.locations.entryGroups.entries.delete" call. 4228// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4229// code is an error. Response headers are in either 4230// *Empty.ServerResponse.Header or (if a response was returned at all) 4231// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4232// check whether the returned error was because http.StatusNotModified 4233// was returned. 4234func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4235 gensupport.SetOptions(c.urlParams_, opts...) 4236 res, err := c.doRequest("json") 4237 if res != nil && res.StatusCode == http.StatusNotModified { 4238 if res.Body != nil { 4239 res.Body.Close() 4240 } 4241 return nil, &googleapi.Error{ 4242 Code: res.StatusCode, 4243 Header: res.Header, 4244 } 4245 } 4246 if err != nil { 4247 return nil, err 4248 } 4249 defer googleapi.CloseBody(res) 4250 if err := googleapi.CheckResponse(res); err != nil { 4251 return nil, err 4252 } 4253 ret := &Empty{ 4254 ServerResponse: googleapi.ServerResponse{ 4255 Header: res.Header, 4256 HTTPStatusCode: res.StatusCode, 4257 }, 4258 } 4259 target := &ret 4260 if err := gensupport.DecodeResponse(target, res); err != nil { 4261 return nil, err 4262 } 4263 return ret, nil 4264 // { 4265 // "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).", 4266 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 4267 // "httpMethod": "DELETE", 4268 // "id": "datacatalog.projects.locations.entryGroups.entries.delete", 4269 // "parameterOrder": [ 4270 // "name" 4271 // ], 4272 // "parameters": { 4273 // "name": { 4274 // "description": "Required. The name of the entry. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 4275 // "location": "path", 4276 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4277 // "required": true, 4278 // "type": "string" 4279 // } 4280 // }, 4281 // "path": "v1beta1/{+name}", 4282 // "response": { 4283 // "$ref": "Empty" 4284 // }, 4285 // "scopes": [ 4286 // "https://www.googleapis.com/auth/cloud-platform" 4287 // ] 4288 // } 4289 4290} 4291 4292// method id "datacatalog.projects.locations.entryGroups.entries.get": 4293 4294type ProjectsLocationsEntryGroupsEntriesGetCall struct { 4295 s *Service 4296 name string 4297 urlParams_ gensupport.URLParams 4298 ifNoneMatch_ string 4299 ctx_ context.Context 4300 header_ http.Header 4301} 4302 4303// Get: Gets an entry. 4304func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { 4305 c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4306 c.name = name 4307 return c 4308} 4309 4310// Fields allows partial responses to be retrieved. See 4311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4312// for more information. 4313func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { 4314 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4315 return c 4316} 4317 4318// IfNoneMatch sets the optional parameter which makes the operation 4319// fail if the object's ETag matches the given value. This is useful for 4320// getting updates only after the object has changed since the last 4321// request. Use googleapi.IsNotModified to check whether the response 4322// error from Do is the result of In-None-Match. 4323func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { 4324 c.ifNoneMatch_ = entityTag 4325 return c 4326} 4327 4328// Context sets the context to be used in this call's Do method. Any 4329// pending HTTP request will be aborted if the provided context is 4330// canceled. 4331func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { 4332 c.ctx_ = ctx 4333 return c 4334} 4335 4336// Header returns an http.Header that can be modified by the caller to 4337// add HTTP headers to the request. 4338func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { 4339 if c.header_ == nil { 4340 c.header_ = make(http.Header) 4341 } 4342 return c.header_ 4343} 4344 4345func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { 4346 reqHeaders := make(http.Header) 4347 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4348 for k, v := range c.header_ { 4349 reqHeaders[k] = v 4350 } 4351 reqHeaders.Set("User-Agent", c.s.userAgent()) 4352 if c.ifNoneMatch_ != "" { 4353 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4354 } 4355 var body io.Reader = nil 4356 c.urlParams_.Set("alt", alt) 4357 c.urlParams_.Set("prettyPrint", "false") 4358 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4359 urls += "?" + c.urlParams_.Encode() 4360 req, err := http.NewRequest("GET", urls, body) 4361 if err != nil { 4362 return nil, err 4363 } 4364 req.Header = reqHeaders 4365 googleapi.Expand(req.URL, map[string]string{ 4366 "name": c.name, 4367 }) 4368 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4369} 4370 4371// Do executes the "datacatalog.projects.locations.entryGroups.entries.get" call. 4372// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 4373// non-nil. Any non-2xx status code is an error. Response headers are in 4374// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 4375// (if a response was returned at all) in 4376// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4377// whether the returned error was because http.StatusNotModified was 4378// returned. 4379func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 4380 gensupport.SetOptions(c.urlParams_, opts...) 4381 res, err := c.doRequest("json") 4382 if res != nil && res.StatusCode == http.StatusNotModified { 4383 if res.Body != nil { 4384 res.Body.Close() 4385 } 4386 return nil, &googleapi.Error{ 4387 Code: res.StatusCode, 4388 Header: res.Header, 4389 } 4390 } 4391 if err != nil { 4392 return nil, err 4393 } 4394 defer googleapi.CloseBody(res) 4395 if err := googleapi.CheckResponse(res); err != nil { 4396 return nil, err 4397 } 4398 ret := &GoogleCloudDatacatalogV1beta1Entry{ 4399 ServerResponse: googleapi.ServerResponse{ 4400 Header: res.Header, 4401 HTTPStatusCode: res.StatusCode, 4402 }, 4403 } 4404 target := &ret 4405 if err := gensupport.DecodeResponse(target, res); err != nil { 4406 return nil, err 4407 } 4408 return ret, nil 4409 // { 4410 // "description": "Gets an entry.", 4411 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 4412 // "httpMethod": "GET", 4413 // "id": "datacatalog.projects.locations.entryGroups.entries.get", 4414 // "parameterOrder": [ 4415 // "name" 4416 // ], 4417 // "parameters": { 4418 // "name": { 4419 // "description": "Required. The name of the entry. Example: * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}", 4420 // "location": "path", 4421 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4422 // "required": true, 4423 // "type": "string" 4424 // } 4425 // }, 4426 // "path": "v1beta1/{+name}", 4427 // "response": { 4428 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4429 // }, 4430 // "scopes": [ 4431 // "https://www.googleapis.com/auth/cloud-platform" 4432 // ] 4433 // } 4434 4435} 4436 4437// method id "datacatalog.projects.locations.entryGroups.entries.getIamPolicy": 4438 4439type ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall struct { 4440 s *Service 4441 resource string 4442 getiampolicyrequest *GetIamPolicyRequest 4443 urlParams_ gensupport.URLParams 4444 ctx_ context.Context 4445 header_ http.Header 4446} 4447 4448// GetIamPolicy: Gets the access control policy for a resource. A 4449// `NOT_FOUND` error is returned if the resource does not exist. An 4450// empty policy is returned if the resource exists but does not have a 4451// policy set on it. Supported resources are: - Tag templates. - 4452// Entries. - Entry groups. Note, this method cannot be used to manage 4453// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 4454// resources synced to Data Catalog. Callers must have following Google 4455// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 4456// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 4457// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 4458// get policies on entry groups. 4459func (r *ProjectsLocationsEntryGroupsEntriesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4460 c := &ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4461 c.resource = resource 4462 c.getiampolicyrequest = getiampolicyrequest 4463 return c 4464} 4465 4466// Fields allows partial responses to be retrieved. See 4467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4468// for more information. 4469func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4470 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4471 return c 4472} 4473 4474// Context sets the context to be used in this call's Do method. Any 4475// pending HTTP request will be aborted if the provided context is 4476// canceled. 4477func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall { 4478 c.ctx_ = ctx 4479 return c 4480} 4481 4482// Header returns an http.Header that can be modified by the caller to 4483// add HTTP headers to the request. 4484func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Header() http.Header { 4485 if c.header_ == nil { 4486 c.header_ = make(http.Header) 4487 } 4488 return c.header_ 4489} 4490 4491func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4492 reqHeaders := make(http.Header) 4493 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4494 for k, v := range c.header_ { 4495 reqHeaders[k] = v 4496 } 4497 reqHeaders.Set("User-Agent", c.s.userAgent()) 4498 var body io.Reader = nil 4499 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 4500 if err != nil { 4501 return nil, err 4502 } 4503 reqHeaders.Set("Content-Type", "application/json") 4504 c.urlParams_.Set("alt", alt) 4505 c.urlParams_.Set("prettyPrint", "false") 4506 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 4507 urls += "?" + c.urlParams_.Encode() 4508 req, err := http.NewRequest("POST", urls, body) 4509 if err != nil { 4510 return nil, err 4511 } 4512 req.Header = reqHeaders 4513 googleapi.Expand(req.URL, map[string]string{ 4514 "resource": c.resource, 4515 }) 4516 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4517} 4518 4519// Do executes the "datacatalog.projects.locations.entryGroups.entries.getIamPolicy" call. 4520// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4521// code is an error. Response headers are in either 4522// *Policy.ServerResponse.Header or (if a response was returned at all) 4523// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4524// check whether the returned error was because http.StatusNotModified 4525// was returned. 4526func (c *ProjectsLocationsEntryGroupsEntriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4527 gensupport.SetOptions(c.urlParams_, opts...) 4528 res, err := c.doRequest("json") 4529 if res != nil && res.StatusCode == http.StatusNotModified { 4530 if res.Body != nil { 4531 res.Body.Close() 4532 } 4533 return nil, &googleapi.Error{ 4534 Code: res.StatusCode, 4535 Header: res.Header, 4536 } 4537 } 4538 if err != nil { 4539 return nil, err 4540 } 4541 defer googleapi.CloseBody(res) 4542 if err := googleapi.CheckResponse(res); err != nil { 4543 return nil, err 4544 } 4545 ret := &Policy{ 4546 ServerResponse: googleapi.ServerResponse{ 4547 Header: res.Header, 4548 HTTPStatusCode: res.StatusCode, 4549 }, 4550 } 4551 target := &ret 4552 if err := gensupport.DecodeResponse(target, res); err != nil { 4553 return nil, err 4554 } 4555 return ret, nil 4556 // { 4557 // "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.", 4558 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}:getIamPolicy", 4559 // "httpMethod": "POST", 4560 // "id": "datacatalog.projects.locations.entryGroups.entries.getIamPolicy", 4561 // "parameterOrder": [ 4562 // "resource" 4563 // ], 4564 // "parameters": { 4565 // "resource": { 4566 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 4567 // "location": "path", 4568 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4569 // "required": true, 4570 // "type": "string" 4571 // } 4572 // }, 4573 // "path": "v1beta1/{+resource}:getIamPolicy", 4574 // "request": { 4575 // "$ref": "GetIamPolicyRequest" 4576 // }, 4577 // "response": { 4578 // "$ref": "Policy" 4579 // }, 4580 // "scopes": [ 4581 // "https://www.googleapis.com/auth/cloud-platform" 4582 // ] 4583 // } 4584 4585} 4586 4587// method id "datacatalog.projects.locations.entryGroups.entries.list": 4588 4589type ProjectsLocationsEntryGroupsEntriesListCall struct { 4590 s *Service 4591 parent string 4592 urlParams_ gensupport.URLParams 4593 ifNoneMatch_ string 4594 ctx_ context.Context 4595 header_ http.Header 4596} 4597 4598// List: Lists entries. 4599func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { 4600 c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4601 c.parent = parent 4602 return c 4603} 4604 4605// PageSize sets the optional parameter "pageSize": The maximum number 4606// of items to return. Default is 10. Max limit is 1000. Throws an 4607// invalid argument for `page_size > 1000`. 4608func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { 4609 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4610 return c 4611} 4612 4613// PageToken sets the optional parameter "pageToken": Token that 4614// specifies which page is requested. If empty, the first page is 4615// returned. 4616func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { 4617 c.urlParams_.Set("pageToken", pageToken) 4618 return c 4619} 4620 4621// ReadMask sets the optional parameter "readMask": The fields to return 4622// for each Entry. If not set or empty, all fields are returned. For 4623// example, setting read_mask to contain only one path "name" will cause 4624// ListEntries to return a list of Entries with only "name" field. 4625func (c *ProjectsLocationsEntryGroupsEntriesListCall) ReadMask(readMask string) *ProjectsLocationsEntryGroupsEntriesListCall { 4626 c.urlParams_.Set("readMask", readMask) 4627 return c 4628} 4629 4630// Fields allows partial responses to be retrieved. See 4631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4632// for more information. 4633func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { 4634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4635 return c 4636} 4637 4638// IfNoneMatch sets the optional parameter which makes the operation 4639// fail if the object's ETag matches the given value. This is useful for 4640// getting updates only after the object has changed since the last 4641// request. Use googleapi.IsNotModified to check whether the response 4642// error from Do is the result of In-None-Match. 4643func (c *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { 4644 c.ifNoneMatch_ = entityTag 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 *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { 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 *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { 4659 if c.header_ == nil { 4660 c.header_ = make(http.Header) 4661 } 4662 return c.header_ 4663} 4664 4665func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { 4666 reqHeaders := make(http.Header) 4667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4668 for k, v := range c.header_ { 4669 reqHeaders[k] = v 4670 } 4671 reqHeaders.Set("User-Agent", c.s.userAgent()) 4672 if c.ifNoneMatch_ != "" { 4673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4674 } 4675 var body io.Reader = nil 4676 c.urlParams_.Set("alt", alt) 4677 c.urlParams_.Set("prettyPrint", "false") 4678 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/entries") 4679 urls += "?" + c.urlParams_.Encode() 4680 req, err := http.NewRequest("GET", urls, body) 4681 if err != nil { 4682 return nil, err 4683 } 4684 req.Header = reqHeaders 4685 googleapi.Expand(req.URL, map[string]string{ 4686 "parent": c.parent, 4687 }) 4688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4689} 4690 4691// Do executes the "datacatalog.projects.locations.entryGroups.entries.list" call. 4692// Exactly one of *GoogleCloudDatacatalogV1beta1ListEntriesResponse or 4693// error will be non-nil. Any non-2xx status code is an error. Response 4694// headers are in either 4695// *GoogleCloudDatacatalogV1beta1ListEntriesResponse.ServerResponse.Heade 4696// r or (if a response was returned at all) in 4697// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4698// whether the returned error was because http.StatusNotModified was 4699// returned. 4700func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListEntriesResponse, 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 := &GoogleCloudDatacatalogV1beta1ListEntriesResponse{ 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": "Lists entries.", 4732 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", 4733 // "httpMethod": "GET", 4734 // "id": "datacatalog.projects.locations.entryGroups.entries.list", 4735 // "parameterOrder": [ 4736 // "parent" 4737 // ], 4738 // "parameters": { 4739 // "pageSize": { 4740 // "description": "The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for `page_size \u003e 1000`.", 4741 // "format": "int32", 4742 // "location": "query", 4743 // "type": "integer" 4744 // }, 4745 // "pageToken": { 4746 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 4747 // "location": "query", 4748 // "type": "string" 4749 // }, 4750 // "parent": { 4751 // "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}", 4752 // "location": "path", 4753 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 4754 // "required": true, 4755 // "type": "string" 4756 // }, 4757 // "readMask": { 4758 // "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.", 4759 // "format": "google-fieldmask", 4760 // "location": "query", 4761 // "type": "string" 4762 // } 4763 // }, 4764 // "path": "v1beta1/{+parent}/entries", 4765 // "response": { 4766 // "$ref": "GoogleCloudDatacatalogV1beta1ListEntriesResponse" 4767 // }, 4768 // "scopes": [ 4769 // "https://www.googleapis.com/auth/cloud-platform" 4770 // ] 4771 // } 4772 4773} 4774 4775// Pages invokes f for each page of results. 4776// A non-nil error returned from f will halt the iteration. 4777// The provided context supersedes any context provided to the Context method. 4778func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListEntriesResponse) error) error { 4779 c.ctx_ = ctx 4780 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4781 for { 4782 x, err := c.Do() 4783 if err != nil { 4784 return err 4785 } 4786 if err := f(x); err != nil { 4787 return err 4788 } 4789 if x.NextPageToken == "" { 4790 return nil 4791 } 4792 c.PageToken(x.NextPageToken) 4793 } 4794} 4795 4796// method id "datacatalog.projects.locations.entryGroups.entries.patch": 4797 4798type ProjectsLocationsEntryGroupsEntriesPatchCall struct { 4799 s *Service 4800 name string 4801 googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry 4802 urlParams_ gensupport.URLParams 4803 ctx_ context.Context 4804 header_ http.Header 4805} 4806 4807// Patch: Updates an existing entry. Users should enable the Data 4808// Catalog API in the project identified by the `entry.name` parameter 4809// (see [Data Catalog Resource Project] 4810// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 4811// for more information). 4812func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddatacatalogv1beta1entry *GoogleCloudDatacatalogV1beta1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { 4813 c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4814 c.name = name 4815 c.googleclouddatacatalogv1beta1entry = googleclouddatacatalogv1beta1entry 4816 return c 4817} 4818 4819// UpdateMask sets the optional parameter "updateMask": The fields to 4820// update on the entry. If absent or empty, all modifiable fields are 4821// updated. The following fields are modifiable: * For entries with type 4822// `DATA_STREAM`: * `schema` * For entries with type `FILESET` * 4823// `schema` * `display_name` * `description` * `gcs_fileset_spec` * 4824// `gcs_fileset_spec.file_patterns` * For entries with 4825// `user_specified_type` * `schema` * `display_name` * `description` * 4826// user_specified_type * user_specified_system * linked_resource * 4827// source_system_timestamps 4828func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { 4829 c.urlParams_.Set("updateMask", updateMask) 4830 return c 4831} 4832 4833// Fields allows partial responses to be retrieved. See 4834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4835// for more information. 4836func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { 4837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4838 return c 4839} 4840 4841// Context sets the context to be used in this call's Do method. Any 4842// pending HTTP request will be aborted if the provided context is 4843// canceled. 4844func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { 4845 c.ctx_ = ctx 4846 return c 4847} 4848 4849// Header returns an http.Header that can be modified by the caller to 4850// add HTTP headers to the request. 4851func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { 4852 if c.header_ == nil { 4853 c.header_ = make(http.Header) 4854 } 4855 return c.header_ 4856} 4857 4858func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) doRequest(alt string) (*http.Response, error) { 4859 reqHeaders := make(http.Header) 4860 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 4861 for k, v := range c.header_ { 4862 reqHeaders[k] = v 4863 } 4864 reqHeaders.Set("User-Agent", c.s.userAgent()) 4865 var body io.Reader = nil 4866 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1entry) 4867 if err != nil { 4868 return nil, err 4869 } 4870 reqHeaders.Set("Content-Type", "application/json") 4871 c.urlParams_.Set("alt", alt) 4872 c.urlParams_.Set("prettyPrint", "false") 4873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 4874 urls += "?" + c.urlParams_.Encode() 4875 req, err := http.NewRequest("PATCH", urls, body) 4876 if err != nil { 4877 return nil, err 4878 } 4879 req.Header = reqHeaders 4880 googleapi.Expand(req.URL, map[string]string{ 4881 "name": c.name, 4882 }) 4883 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4884} 4885 4886// Do executes the "datacatalog.projects.locations.entryGroups.entries.patch" call. 4887// Exactly one of *GoogleCloudDatacatalogV1beta1Entry or error will be 4888// non-nil. Any non-2xx status code is an error. Response headers are in 4889// either *GoogleCloudDatacatalogV1beta1Entry.ServerResponse.Header or 4890// (if a response was returned at all) in 4891// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4892// whether the returned error was because http.StatusNotModified was 4893// returned. 4894func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Entry, error) { 4895 gensupport.SetOptions(c.urlParams_, opts...) 4896 res, err := c.doRequest("json") 4897 if res != nil && res.StatusCode == http.StatusNotModified { 4898 if res.Body != nil { 4899 res.Body.Close() 4900 } 4901 return nil, &googleapi.Error{ 4902 Code: res.StatusCode, 4903 Header: res.Header, 4904 } 4905 } 4906 if err != nil { 4907 return nil, err 4908 } 4909 defer googleapi.CloseBody(res) 4910 if err := googleapi.CheckResponse(res); err != nil { 4911 return nil, err 4912 } 4913 ret := &GoogleCloudDatacatalogV1beta1Entry{ 4914 ServerResponse: googleapi.ServerResponse{ 4915 Header: res.Header, 4916 HTTPStatusCode: res.StatusCode, 4917 }, 4918 } 4919 target := &ret 4920 if err := gensupport.DecodeResponse(target, res); err != nil { 4921 return nil, err 4922 } 4923 return ret, nil 4924 // { 4925 // "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).", 4926 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", 4927 // "httpMethod": "PATCH", 4928 // "id": "datacatalog.projects.locations.entryGroups.entries.patch", 4929 // "parameterOrder": [ 4930 // "name" 4931 // ], 4932 // "parameters": { 4933 // "name": { 4934 // "description": "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.", 4935 // "location": "path", 4936 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 4937 // "required": true, 4938 // "type": "string" 4939 // }, 4940 // "updateMask": { 4941 // "description": "The fields to update on the entry. If absent or empty, all modifiable fields are updated. 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", 4942 // "format": "google-fieldmask", 4943 // "location": "query", 4944 // "type": "string" 4945 // } 4946 // }, 4947 // "path": "v1beta1/{+name}", 4948 // "request": { 4949 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4950 // }, 4951 // "response": { 4952 // "$ref": "GoogleCloudDatacatalogV1beta1Entry" 4953 // }, 4954 // "scopes": [ 4955 // "https://www.googleapis.com/auth/cloud-platform" 4956 // ] 4957 // } 4958 4959} 4960 4961// method id "datacatalog.projects.locations.entryGroups.entries.testIamPermissions": 4962 4963type ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall struct { 4964 s *Service 4965 resource string 4966 testiampermissionsrequest *TestIamPermissionsRequest 4967 urlParams_ gensupport.URLParams 4968 ctx_ context.Context 4969 header_ http.Header 4970} 4971 4972// TestIamPermissions: Returns the caller's permissions on a resource. 4973// If the resource does not exist, an empty set of permissions is 4974// returned (We don't return a `NOT_FOUND` error). Supported resources 4975// are: - Tag templates. - Entries. - Entry groups. Note, this method 4976// cannot be used to manage policies for BigQuery, Pub/Sub and any 4977// external Google Cloud Platform resources synced to Data Catalog. A 4978// caller is not required to have Google IAM permission to make this 4979// request. 4980func (r *ProjectsLocationsEntryGroupsEntriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 4981 c := &ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4982 c.resource = resource 4983 c.testiampermissionsrequest = testiampermissionsrequest 4984 return c 4985} 4986 4987// Fields allows partial responses to be retrieved. See 4988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4989// for more information. 4990func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 4991 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4992 return c 4993} 4994 4995// Context sets the context to be used in this call's Do method. Any 4996// pending HTTP request will be aborted if the provided context is 4997// canceled. 4998func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall { 4999 c.ctx_ = ctx 5000 return c 5001} 5002 5003// Header returns an http.Header that can be modified by the caller to 5004// add HTTP headers to the request. 5005func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Header() http.Header { 5006 if c.header_ == nil { 5007 c.header_ = make(http.Header) 5008 } 5009 return c.header_ 5010} 5011 5012func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 5013 reqHeaders := make(http.Header) 5014 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5015 for k, v := range c.header_ { 5016 reqHeaders[k] = v 5017 } 5018 reqHeaders.Set("User-Agent", c.s.userAgent()) 5019 var body io.Reader = nil 5020 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 5021 if err != nil { 5022 return nil, err 5023 } 5024 reqHeaders.Set("Content-Type", "application/json") 5025 c.urlParams_.Set("alt", alt) 5026 c.urlParams_.Set("prettyPrint", "false") 5027 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 5028 urls += "?" + c.urlParams_.Encode() 5029 req, err := http.NewRequest("POST", urls, body) 5030 if err != nil { 5031 return nil, err 5032 } 5033 req.Header = reqHeaders 5034 googleapi.Expand(req.URL, map[string]string{ 5035 "resource": c.resource, 5036 }) 5037 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5038} 5039 5040// Do executes the "datacatalog.projects.locations.entryGroups.entries.testIamPermissions" call. 5041// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 5042// Any non-2xx status code is an error. Response headers are in either 5043// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 5044// was returned at all) in error.(*googleapi.Error).Header. Use 5045// googleapi.IsNotModified to check whether the returned error was 5046// because http.StatusNotModified was returned. 5047func (c *ProjectsLocationsEntryGroupsEntriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 5048 gensupport.SetOptions(c.urlParams_, opts...) 5049 res, err := c.doRequest("json") 5050 if res != nil && res.StatusCode == http.StatusNotModified { 5051 if res.Body != nil { 5052 res.Body.Close() 5053 } 5054 return nil, &googleapi.Error{ 5055 Code: res.StatusCode, 5056 Header: res.Header, 5057 } 5058 } 5059 if err != nil { 5060 return nil, err 5061 } 5062 defer googleapi.CloseBody(res) 5063 if err := googleapi.CheckResponse(res); err != nil { 5064 return nil, err 5065 } 5066 ret := &TestIamPermissionsResponse{ 5067 ServerResponse: googleapi.ServerResponse{ 5068 Header: res.Header, 5069 HTTPStatusCode: res.StatusCode, 5070 }, 5071 } 5072 target := &ret 5073 if err := gensupport.DecodeResponse(target, res); err != nil { 5074 return nil, err 5075 } 5076 return ret, nil 5077 // { 5078 // "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.", 5079 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}:testIamPermissions", 5080 // "httpMethod": "POST", 5081 // "id": "datacatalog.projects.locations.entryGroups.entries.testIamPermissions", 5082 // "parameterOrder": [ 5083 // "resource" 5084 // ], 5085 // "parameters": { 5086 // "resource": { 5087 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 5088 // "location": "path", 5089 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5090 // "required": true, 5091 // "type": "string" 5092 // } 5093 // }, 5094 // "path": "v1beta1/{+resource}:testIamPermissions", 5095 // "request": { 5096 // "$ref": "TestIamPermissionsRequest" 5097 // }, 5098 // "response": { 5099 // "$ref": "TestIamPermissionsResponse" 5100 // }, 5101 // "scopes": [ 5102 // "https://www.googleapis.com/auth/cloud-platform" 5103 // ] 5104 // } 5105 5106} 5107 5108// method id "datacatalog.projects.locations.entryGroups.entries.tags.create": 5109 5110type ProjectsLocationsEntryGroupsEntriesTagsCreateCall struct { 5111 s *Service 5112 parent string 5113 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5114 urlParams_ gensupport.URLParams 5115 ctx_ context.Context 5116 header_ http.Header 5117} 5118 5119// Create: Creates a tag on an Entry. Note: The project identified by 5120// the `parent` parameter for the 5121// [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta 5122// 1/projects.locations.entryGroups.entries.tags/create#path-parameters) 5123// and the [tag 5124// template](https://cloud.google.com/data-catalog/docs/reference/rest/v1 5125// beta1/projects.locations.tagTemplates/create#path-parameters) used to 5126// create the tag must be from the same organization. 5127func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Create(parent string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5128 c := &ProjectsLocationsEntryGroupsEntriesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5129 c.parent = parent 5130 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5131 return c 5132} 5133 5134// Fields allows partial responses to be retrieved. See 5135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5136// for more information. 5137func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5138 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5139 return c 5140} 5141 5142// Context sets the context to be used in this call's Do method. Any 5143// pending HTTP request will be aborted if the provided context is 5144// canceled. 5145func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsCreateCall { 5146 c.ctx_ = ctx 5147 return c 5148} 5149 5150// Header returns an http.Header that can be modified by the caller to 5151// add HTTP headers to the request. 5152func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Header() http.Header { 5153 if c.header_ == nil { 5154 c.header_ = make(http.Header) 5155 } 5156 return c.header_ 5157} 5158 5159func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) doRequest(alt string) (*http.Response, error) { 5160 reqHeaders := make(http.Header) 5161 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5162 for k, v := range c.header_ { 5163 reqHeaders[k] = v 5164 } 5165 reqHeaders.Set("User-Agent", c.s.userAgent()) 5166 var body io.Reader = nil 5167 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 5168 if err != nil { 5169 return nil, err 5170 } 5171 reqHeaders.Set("Content-Type", "application/json") 5172 c.urlParams_.Set("alt", alt) 5173 c.urlParams_.Set("prettyPrint", "false") 5174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 5175 urls += "?" + c.urlParams_.Encode() 5176 req, err := http.NewRequest("POST", urls, body) 5177 if err != nil { 5178 return nil, err 5179 } 5180 req.Header = reqHeaders 5181 googleapi.Expand(req.URL, map[string]string{ 5182 "parent": c.parent, 5183 }) 5184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5185} 5186 5187// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.create" call. 5188// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 5189// non-nil. Any non-2xx status code is an error. Response headers are in 5190// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 5191// a response was returned at all) in error.(*googleapi.Error).Header. 5192// Use googleapi.IsNotModified to check whether the returned error was 5193// because http.StatusNotModified was returned. 5194func (c *ProjectsLocationsEntryGroupsEntriesTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 5195 gensupport.SetOptions(c.urlParams_, opts...) 5196 res, err := c.doRequest("json") 5197 if res != nil && res.StatusCode == http.StatusNotModified { 5198 if res.Body != nil { 5199 res.Body.Close() 5200 } 5201 return nil, &googleapi.Error{ 5202 Code: res.StatusCode, 5203 Header: res.Header, 5204 } 5205 } 5206 if err != nil { 5207 return nil, err 5208 } 5209 defer googleapi.CloseBody(res) 5210 if err := googleapi.CheckResponse(res); err != nil { 5211 return nil, err 5212 } 5213 ret := &GoogleCloudDatacatalogV1beta1Tag{ 5214 ServerResponse: googleapi.ServerResponse{ 5215 Header: res.Header, 5216 HTTPStatusCode: res.StatusCode, 5217 }, 5218 } 5219 target := &ret 5220 if err := gensupport.DecodeResponse(target, res); err != nil { 5221 return nil, err 5222 } 5223 return ret, nil 5224 // { 5225 // "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.", 5226 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags", 5227 // "httpMethod": "POST", 5228 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.create", 5229 // "parameterOrder": [ 5230 // "parent" 5231 // ], 5232 // "parameters": { 5233 // "parent": { 5234 // "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.", 5235 // "location": "path", 5236 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5237 // "required": true, 5238 // "type": "string" 5239 // } 5240 // }, 5241 // "path": "v1beta1/{+parent}/tags", 5242 // "request": { 5243 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5244 // }, 5245 // "response": { 5246 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5247 // }, 5248 // "scopes": [ 5249 // "https://www.googleapis.com/auth/cloud-platform" 5250 // ] 5251 // } 5252 5253} 5254 5255// method id "datacatalog.projects.locations.entryGroups.entries.tags.delete": 5256 5257type ProjectsLocationsEntryGroupsEntriesTagsDeleteCall struct { 5258 s *Service 5259 name string 5260 urlParams_ gensupport.URLParams 5261 ctx_ context.Context 5262 header_ http.Header 5263} 5264 5265// Delete: Deletes a tag. 5266func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5267 c := &ProjectsLocationsEntryGroupsEntriesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5268 c.name = name 5269 return c 5270} 5271 5272// Fields allows partial responses to be retrieved. See 5273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5274// for more information. 5275func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5277 return c 5278} 5279 5280// Context sets the context to be used in this call's Do method. Any 5281// pending HTTP request will be aborted if the provided context is 5282// canceled. 5283func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall { 5284 c.ctx_ = ctx 5285 return c 5286} 5287 5288// Header returns an http.Header that can be modified by the caller to 5289// add HTTP headers to the request. 5290func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Header() http.Header { 5291 if c.header_ == nil { 5292 c.header_ = make(http.Header) 5293 } 5294 return c.header_ 5295} 5296 5297func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 5298 reqHeaders := make(http.Header) 5299 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5300 for k, v := range c.header_ { 5301 reqHeaders[k] = v 5302 } 5303 reqHeaders.Set("User-Agent", c.s.userAgent()) 5304 var body io.Reader = nil 5305 c.urlParams_.Set("alt", alt) 5306 c.urlParams_.Set("prettyPrint", "false") 5307 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5308 urls += "?" + c.urlParams_.Encode() 5309 req, err := http.NewRequest("DELETE", urls, body) 5310 if err != nil { 5311 return nil, err 5312 } 5313 req.Header = reqHeaders 5314 googleapi.Expand(req.URL, map[string]string{ 5315 "name": c.name, 5316 }) 5317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5318} 5319 5320// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.delete" call. 5321// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5322// code is an error. Response headers are in either 5323// *Empty.ServerResponse.Header or (if a response was returned at all) 5324// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5325// check whether the returned error was because http.StatusNotModified 5326// was returned. 5327func (c *ProjectsLocationsEntryGroupsEntriesTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5328 gensupport.SetOptions(c.urlParams_, opts...) 5329 res, err := c.doRequest("json") 5330 if res != nil && res.StatusCode == http.StatusNotModified { 5331 if res.Body != nil { 5332 res.Body.Close() 5333 } 5334 return nil, &googleapi.Error{ 5335 Code: res.StatusCode, 5336 Header: res.Header, 5337 } 5338 } 5339 if err != nil { 5340 return nil, err 5341 } 5342 defer googleapi.CloseBody(res) 5343 if err := googleapi.CheckResponse(res); err != nil { 5344 return nil, err 5345 } 5346 ret := &Empty{ 5347 ServerResponse: googleapi.ServerResponse{ 5348 Header: res.Header, 5349 HTTPStatusCode: res.StatusCode, 5350 }, 5351 } 5352 target := &ret 5353 if err := gensupport.DecodeResponse(target, res); err != nil { 5354 return nil, err 5355 } 5356 return ret, nil 5357 // { 5358 // "description": "Deletes a tag.", 5359 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags/{tagsId}", 5360 // "httpMethod": "DELETE", 5361 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.delete", 5362 // "parameterOrder": [ 5363 // "name" 5364 // ], 5365 // "parameters": { 5366 // "name": { 5367 // "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}", 5368 // "location": "path", 5369 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+/tags/[^/]+$", 5370 // "required": true, 5371 // "type": "string" 5372 // } 5373 // }, 5374 // "path": "v1beta1/{+name}", 5375 // "response": { 5376 // "$ref": "Empty" 5377 // }, 5378 // "scopes": [ 5379 // "https://www.googleapis.com/auth/cloud-platform" 5380 // ] 5381 // } 5382 5383} 5384 5385// method id "datacatalog.projects.locations.entryGroups.entries.tags.list": 5386 5387type ProjectsLocationsEntryGroupsEntriesTagsListCall struct { 5388 s *Service 5389 parent string 5390 urlParams_ gensupport.URLParams 5391 ifNoneMatch_ string 5392 ctx_ context.Context 5393 header_ http.Header 5394} 5395 5396// List: Lists the tags on an Entry. 5397func (r *ProjectsLocationsEntryGroupsEntriesTagsService) List(parent string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5398 c := &ProjectsLocationsEntryGroupsEntriesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5399 c.parent = parent 5400 return c 5401} 5402 5403// PageSize sets the optional parameter "pageSize": The maximum number 5404// of tags to return. Default is 10. Max limit is 1000. 5405func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5406 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5407 return c 5408} 5409 5410// PageToken sets the optional parameter "pageToken": Token that 5411// specifies which page is requested. If empty, the first page is 5412// returned. 5413func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5414 c.urlParams_.Set("pageToken", pageToken) 5415 return c 5416} 5417 5418// Fields allows partial responses to be retrieved. See 5419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5420// for more information. 5421func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5422 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5423 return c 5424} 5425 5426// IfNoneMatch sets the optional parameter which makes the operation 5427// fail if the object's ETag matches the given value. This is useful for 5428// getting updates only after the object has changed since the last 5429// request. Use googleapi.IsNotModified to check whether the response 5430// error from Do is the result of In-None-Match. 5431func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5432 c.ifNoneMatch_ = entityTag 5433 return c 5434} 5435 5436// Context sets the context to be used in this call's Do method. Any 5437// pending HTTP request will be aborted if the provided context is 5438// canceled. 5439func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsListCall { 5440 c.ctx_ = ctx 5441 return c 5442} 5443 5444// Header returns an http.Header that can be modified by the caller to 5445// add HTTP headers to the request. 5446func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Header() http.Header { 5447 if c.header_ == nil { 5448 c.header_ = make(http.Header) 5449 } 5450 return c.header_ 5451} 5452 5453func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) doRequest(alt string) (*http.Response, error) { 5454 reqHeaders := make(http.Header) 5455 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5456 for k, v := range c.header_ { 5457 reqHeaders[k] = v 5458 } 5459 reqHeaders.Set("User-Agent", c.s.userAgent()) 5460 if c.ifNoneMatch_ != "" { 5461 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5462 } 5463 var body io.Reader = nil 5464 c.urlParams_.Set("alt", alt) 5465 c.urlParams_.Set("prettyPrint", "false") 5466 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 5467 urls += "?" + c.urlParams_.Encode() 5468 req, err := http.NewRequest("GET", urls, body) 5469 if err != nil { 5470 return nil, err 5471 } 5472 req.Header = reqHeaders 5473 googleapi.Expand(req.URL, map[string]string{ 5474 "parent": c.parent, 5475 }) 5476 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5477} 5478 5479// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.list" call. 5480// Exactly one of *GoogleCloudDatacatalogV1beta1ListTagsResponse or 5481// error will be non-nil. Any non-2xx status code is an error. Response 5482// headers are in either 5483// *GoogleCloudDatacatalogV1beta1ListTagsResponse.ServerResponse.Header 5484// or (if a response was returned at all) in 5485// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5486// whether the returned error was because http.StatusNotModified was 5487// returned. 5488func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTagsResponse, error) { 5489 gensupport.SetOptions(c.urlParams_, opts...) 5490 res, err := c.doRequest("json") 5491 if res != nil && res.StatusCode == http.StatusNotModified { 5492 if res.Body != nil { 5493 res.Body.Close() 5494 } 5495 return nil, &googleapi.Error{ 5496 Code: res.StatusCode, 5497 Header: res.Header, 5498 } 5499 } 5500 if err != nil { 5501 return nil, err 5502 } 5503 defer googleapi.CloseBody(res) 5504 if err := googleapi.CheckResponse(res); err != nil { 5505 return nil, err 5506 } 5507 ret := &GoogleCloudDatacatalogV1beta1ListTagsResponse{ 5508 ServerResponse: googleapi.ServerResponse{ 5509 Header: res.Header, 5510 HTTPStatusCode: res.StatusCode, 5511 }, 5512 } 5513 target := &ret 5514 if err := gensupport.DecodeResponse(target, res); err != nil { 5515 return nil, err 5516 } 5517 return ret, nil 5518 // { 5519 // "description": "Lists the tags on an Entry.", 5520 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags", 5521 // "httpMethod": "GET", 5522 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.list", 5523 // "parameterOrder": [ 5524 // "parent" 5525 // ], 5526 // "parameters": { 5527 // "pageSize": { 5528 // "description": "The maximum number of tags to return. Default is 10. Max limit is 1000.", 5529 // "format": "int32", 5530 // "location": "query", 5531 // "type": "integer" 5532 // }, 5533 // "pageToken": { 5534 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 5535 // "location": "query", 5536 // "type": "string" 5537 // }, 5538 // "parent": { 5539 // "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}", 5540 // "location": "path", 5541 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+$", 5542 // "required": true, 5543 // "type": "string" 5544 // } 5545 // }, 5546 // "path": "v1beta1/{+parent}/tags", 5547 // "response": { 5548 // "$ref": "GoogleCloudDatacatalogV1beta1ListTagsResponse" 5549 // }, 5550 // "scopes": [ 5551 // "https://www.googleapis.com/auth/cloud-platform" 5552 // ] 5553 // } 5554 5555} 5556 5557// Pages invokes f for each page of results. 5558// A non-nil error returned from f will halt the iteration. 5559// The provided context supersedes any context provided to the Context method. 5560func (c *ProjectsLocationsEntryGroupsEntriesTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTagsResponse) error) error { 5561 c.ctx_ = ctx 5562 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5563 for { 5564 x, err := c.Do() 5565 if err != nil { 5566 return err 5567 } 5568 if err := f(x); err != nil { 5569 return err 5570 } 5571 if x.NextPageToken == "" { 5572 return nil 5573 } 5574 c.PageToken(x.NextPageToken) 5575 } 5576} 5577 5578// method id "datacatalog.projects.locations.entryGroups.entries.tags.patch": 5579 5580type ProjectsLocationsEntryGroupsEntriesTagsPatchCall struct { 5581 s *Service 5582 nameid string 5583 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5584 urlParams_ gensupport.URLParams 5585 ctx_ context.Context 5586 header_ http.Header 5587} 5588 5589// Patch: Updates an existing tag. 5590func (r *ProjectsLocationsEntryGroupsEntriesTagsService) Patch(nameid string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5591 c := &ProjectsLocationsEntryGroupsEntriesTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5592 c.nameid = nameid 5593 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5594 return c 5595} 5596 5597// UpdateMask sets the optional parameter "updateMask": The fields to 5598// update on the Tag. If absent or empty, all modifiable fields are 5599// updated. Currently the only modifiable field is the field `fields`. 5600func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5601 c.urlParams_.Set("updateMask", updateMask) 5602 return c 5603} 5604 5605// Fields allows partial responses to be retrieved. See 5606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5607// for more information. 5608func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5609 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5610 return c 5611} 5612 5613// Context sets the context to be used in this call's Do method. Any 5614// pending HTTP request will be aborted if the provided context is 5615// canceled. 5616func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesTagsPatchCall { 5617 c.ctx_ = ctx 5618 return c 5619} 5620 5621// Header returns an http.Header that can be modified by the caller to 5622// add HTTP headers to the request. 5623func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Header() http.Header { 5624 if c.header_ == nil { 5625 c.header_ = make(http.Header) 5626 } 5627 return c.header_ 5628} 5629 5630func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) doRequest(alt string) (*http.Response, error) { 5631 reqHeaders := make(http.Header) 5632 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5633 for k, v := range c.header_ { 5634 reqHeaders[k] = v 5635 } 5636 reqHeaders.Set("User-Agent", c.s.userAgent()) 5637 var body io.Reader = nil 5638 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 5639 if err != nil { 5640 return nil, err 5641 } 5642 reqHeaders.Set("Content-Type", "application/json") 5643 c.urlParams_.Set("alt", alt) 5644 c.urlParams_.Set("prettyPrint", "false") 5645 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5646 urls += "?" + c.urlParams_.Encode() 5647 req, err := http.NewRequest("PATCH", urls, body) 5648 if err != nil { 5649 return nil, err 5650 } 5651 req.Header = reqHeaders 5652 googleapi.Expand(req.URL, map[string]string{ 5653 "name": c.nameid, 5654 }) 5655 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5656} 5657 5658// Do executes the "datacatalog.projects.locations.entryGroups.entries.tags.patch" call. 5659// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 5660// non-nil. Any non-2xx status code is an error. Response headers are in 5661// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 5662// a response was returned at all) in error.(*googleapi.Error).Header. 5663// Use googleapi.IsNotModified to check whether the returned error was 5664// because http.StatusNotModified was returned. 5665func (c *ProjectsLocationsEntryGroupsEntriesTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 5666 gensupport.SetOptions(c.urlParams_, opts...) 5667 res, err := c.doRequest("json") 5668 if res != nil && res.StatusCode == http.StatusNotModified { 5669 if res.Body != nil { 5670 res.Body.Close() 5671 } 5672 return nil, &googleapi.Error{ 5673 Code: res.StatusCode, 5674 Header: res.Header, 5675 } 5676 } 5677 if err != nil { 5678 return nil, err 5679 } 5680 defer googleapi.CloseBody(res) 5681 if err := googleapi.CheckResponse(res); err != nil { 5682 return nil, err 5683 } 5684 ret := &GoogleCloudDatacatalogV1beta1Tag{ 5685 ServerResponse: googleapi.ServerResponse{ 5686 Header: res.Header, 5687 HTTPStatusCode: res.StatusCode, 5688 }, 5689 } 5690 target := &ret 5691 if err := gensupport.DecodeResponse(target, res); err != nil { 5692 return nil, err 5693 } 5694 return ret, nil 5695 // { 5696 // "description": "Updates an existing tag.", 5697 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}/tags/{tagsId}", 5698 // "httpMethod": "PATCH", 5699 // "id": "datacatalog.projects.locations.entryGroups.entries.tags.patch", 5700 // "parameterOrder": [ 5701 // "name" 5702 // ], 5703 // "parameters": { 5704 // "name": { 5705 // "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.", 5706 // "location": "path", 5707 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/[^/]+/tags/[^/]+$", 5708 // "required": true, 5709 // "type": "string" 5710 // }, 5711 // "updateMask": { 5712 // "description": "The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field `fields`.", 5713 // "format": "google-fieldmask", 5714 // "location": "query", 5715 // "type": "string" 5716 // } 5717 // }, 5718 // "path": "v1beta1/{+name}", 5719 // "request": { 5720 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5721 // }, 5722 // "response": { 5723 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5724 // }, 5725 // "scopes": [ 5726 // "https://www.googleapis.com/auth/cloud-platform" 5727 // ] 5728 // } 5729 5730} 5731 5732// method id "datacatalog.projects.locations.entryGroups.tags.create": 5733 5734type ProjectsLocationsEntryGroupsTagsCreateCall struct { 5735 s *Service 5736 parent string 5737 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 5738 urlParams_ gensupport.URLParams 5739 ctx_ context.Context 5740 header_ http.Header 5741} 5742 5743// Create: Creates a tag on an Entry. Note: The project identified by 5744// the `parent` parameter for the 5745// [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta 5746// 1/projects.locations.entryGroups.entries.tags/create#path-parameters) 5747// and the [tag 5748// template](https://cloud.google.com/data-catalog/docs/reference/rest/v1 5749// beta1/projects.locations.tagTemplates/create#path-parameters) used to 5750// create the tag must be from the same organization. 5751func (r *ProjectsLocationsEntryGroupsTagsService) Create(parent string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsTagsCreateCall { 5752 c := &ProjectsLocationsEntryGroupsTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5753 c.parent = parent 5754 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 5755 return c 5756} 5757 5758// Fields allows partial responses to be retrieved. See 5759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5760// for more information. 5761func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsCreateCall { 5762 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5763 return c 5764} 5765 5766// Context sets the context to be used in this call's Do method. Any 5767// pending HTTP request will be aborted if the provided context is 5768// canceled. 5769func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsCreateCall { 5770 c.ctx_ = ctx 5771 return c 5772} 5773 5774// Header returns an http.Header that can be modified by the caller to 5775// add HTTP headers to the request. 5776func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Header() http.Header { 5777 if c.header_ == nil { 5778 c.header_ = make(http.Header) 5779 } 5780 return c.header_ 5781} 5782 5783func (c *ProjectsLocationsEntryGroupsTagsCreateCall) doRequest(alt string) (*http.Response, error) { 5784 reqHeaders := make(http.Header) 5785 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5786 for k, v := range c.header_ { 5787 reqHeaders[k] = v 5788 } 5789 reqHeaders.Set("User-Agent", c.s.userAgent()) 5790 var body io.Reader = nil 5791 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 5792 if err != nil { 5793 return nil, err 5794 } 5795 reqHeaders.Set("Content-Type", "application/json") 5796 c.urlParams_.Set("alt", alt) 5797 c.urlParams_.Set("prettyPrint", "false") 5798 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 5799 urls += "?" + c.urlParams_.Encode() 5800 req, err := http.NewRequest("POST", urls, body) 5801 if err != nil { 5802 return nil, err 5803 } 5804 req.Header = reqHeaders 5805 googleapi.Expand(req.URL, map[string]string{ 5806 "parent": c.parent, 5807 }) 5808 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5809} 5810 5811// Do executes the "datacatalog.projects.locations.entryGroups.tags.create" call. 5812// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 5813// non-nil. Any non-2xx status code is an error. Response headers are in 5814// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 5815// a response was returned at all) in error.(*googleapi.Error).Header. 5816// Use googleapi.IsNotModified to check whether the returned error was 5817// because http.StatusNotModified was returned. 5818func (c *ProjectsLocationsEntryGroupsTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 5819 gensupport.SetOptions(c.urlParams_, opts...) 5820 res, err := c.doRequest("json") 5821 if res != nil && res.StatusCode == http.StatusNotModified { 5822 if res.Body != nil { 5823 res.Body.Close() 5824 } 5825 return nil, &googleapi.Error{ 5826 Code: res.StatusCode, 5827 Header: res.Header, 5828 } 5829 } 5830 if err != nil { 5831 return nil, err 5832 } 5833 defer googleapi.CloseBody(res) 5834 if err := googleapi.CheckResponse(res); err != nil { 5835 return nil, err 5836 } 5837 ret := &GoogleCloudDatacatalogV1beta1Tag{ 5838 ServerResponse: googleapi.ServerResponse{ 5839 Header: res.Header, 5840 HTTPStatusCode: res.StatusCode, 5841 }, 5842 } 5843 target := &ret 5844 if err := gensupport.DecodeResponse(target, res); err != nil { 5845 return nil, err 5846 } 5847 return ret, nil 5848 // { 5849 // "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.", 5850 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags", 5851 // "httpMethod": "POST", 5852 // "id": "datacatalog.projects.locations.entryGroups.tags.create", 5853 // "parameterOrder": [ 5854 // "parent" 5855 // ], 5856 // "parameters": { 5857 // "parent": { 5858 // "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.", 5859 // "location": "path", 5860 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 5861 // "required": true, 5862 // "type": "string" 5863 // } 5864 // }, 5865 // "path": "v1beta1/{+parent}/tags", 5866 // "request": { 5867 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5868 // }, 5869 // "response": { 5870 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 5871 // }, 5872 // "scopes": [ 5873 // "https://www.googleapis.com/auth/cloud-platform" 5874 // ] 5875 // } 5876 5877} 5878 5879// method id "datacatalog.projects.locations.entryGroups.tags.delete": 5880 5881type ProjectsLocationsEntryGroupsTagsDeleteCall struct { 5882 s *Service 5883 name string 5884 urlParams_ gensupport.URLParams 5885 ctx_ context.Context 5886 header_ http.Header 5887} 5888 5889// Delete: Deletes a tag. 5890func (r *ProjectsLocationsEntryGroupsTagsService) Delete(name string) *ProjectsLocationsEntryGroupsTagsDeleteCall { 5891 c := &ProjectsLocationsEntryGroupsTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5892 c.name = name 5893 return c 5894} 5895 5896// Fields allows partial responses to be retrieved. See 5897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5898// for more information. 5899func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsDeleteCall { 5900 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5901 return c 5902} 5903 5904// Context sets the context to be used in this call's Do method. Any 5905// pending HTTP request will be aborted if the provided context is 5906// canceled. 5907func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsDeleteCall { 5908 c.ctx_ = ctx 5909 return c 5910} 5911 5912// Header returns an http.Header that can be modified by the caller to 5913// add HTTP headers to the request. 5914func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Header() http.Header { 5915 if c.header_ == nil { 5916 c.header_ = make(http.Header) 5917 } 5918 return c.header_ 5919} 5920 5921func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 5922 reqHeaders := make(http.Header) 5923 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 5924 for k, v := range c.header_ { 5925 reqHeaders[k] = v 5926 } 5927 reqHeaders.Set("User-Agent", c.s.userAgent()) 5928 var body io.Reader = nil 5929 c.urlParams_.Set("alt", alt) 5930 c.urlParams_.Set("prettyPrint", "false") 5931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 5932 urls += "?" + c.urlParams_.Encode() 5933 req, err := http.NewRequest("DELETE", urls, body) 5934 if err != nil { 5935 return nil, err 5936 } 5937 req.Header = reqHeaders 5938 googleapi.Expand(req.URL, map[string]string{ 5939 "name": c.name, 5940 }) 5941 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5942} 5943 5944// Do executes the "datacatalog.projects.locations.entryGroups.tags.delete" call. 5945// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5946// code is an error. Response headers are in either 5947// *Empty.ServerResponse.Header or (if a response was returned at all) 5948// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5949// check whether the returned error was because http.StatusNotModified 5950// was returned. 5951func (c *ProjectsLocationsEntryGroupsTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5952 gensupport.SetOptions(c.urlParams_, opts...) 5953 res, err := c.doRequest("json") 5954 if res != nil && res.StatusCode == http.StatusNotModified { 5955 if res.Body != nil { 5956 res.Body.Close() 5957 } 5958 return nil, &googleapi.Error{ 5959 Code: res.StatusCode, 5960 Header: res.Header, 5961 } 5962 } 5963 if err != nil { 5964 return nil, err 5965 } 5966 defer googleapi.CloseBody(res) 5967 if err := googleapi.CheckResponse(res); err != nil { 5968 return nil, err 5969 } 5970 ret := &Empty{ 5971 ServerResponse: googleapi.ServerResponse{ 5972 Header: res.Header, 5973 HTTPStatusCode: res.StatusCode, 5974 }, 5975 } 5976 target := &ret 5977 if err := gensupport.DecodeResponse(target, res); err != nil { 5978 return nil, err 5979 } 5980 return ret, nil 5981 // { 5982 // "description": "Deletes a tag.", 5983 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags/{tagsId}", 5984 // "httpMethod": "DELETE", 5985 // "id": "datacatalog.projects.locations.entryGroups.tags.delete", 5986 // "parameterOrder": [ 5987 // "name" 5988 // ], 5989 // "parameters": { 5990 // "name": { 5991 // "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}", 5992 // "location": "path", 5993 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/tags/[^/]+$", 5994 // "required": true, 5995 // "type": "string" 5996 // } 5997 // }, 5998 // "path": "v1beta1/{+name}", 5999 // "response": { 6000 // "$ref": "Empty" 6001 // }, 6002 // "scopes": [ 6003 // "https://www.googleapis.com/auth/cloud-platform" 6004 // ] 6005 // } 6006 6007} 6008 6009// method id "datacatalog.projects.locations.entryGroups.tags.list": 6010 6011type ProjectsLocationsEntryGroupsTagsListCall struct { 6012 s *Service 6013 parent string 6014 urlParams_ gensupport.URLParams 6015 ifNoneMatch_ string 6016 ctx_ context.Context 6017 header_ http.Header 6018} 6019 6020// List: Lists the tags on an Entry. 6021func (r *ProjectsLocationsEntryGroupsTagsService) List(parent string) *ProjectsLocationsEntryGroupsTagsListCall { 6022 c := &ProjectsLocationsEntryGroupsTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6023 c.parent = parent 6024 return c 6025} 6026 6027// PageSize sets the optional parameter "pageSize": The maximum number 6028// of tags to return. Default is 10. Max limit is 1000. 6029func (c *ProjectsLocationsEntryGroupsTagsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsTagsListCall { 6030 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6031 return c 6032} 6033 6034// PageToken sets the optional parameter "pageToken": Token that 6035// specifies which page is requested. If empty, the first page is 6036// returned. 6037func (c *ProjectsLocationsEntryGroupsTagsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsTagsListCall { 6038 c.urlParams_.Set("pageToken", pageToken) 6039 return c 6040} 6041 6042// Fields allows partial responses to be retrieved. See 6043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6044// for more information. 6045func (c *ProjectsLocationsEntryGroupsTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsListCall { 6046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6047 return c 6048} 6049 6050// IfNoneMatch sets the optional parameter which makes the operation 6051// fail if the object's ETag matches the given value. This is useful for 6052// getting updates only after the object has changed since the last 6053// request. Use googleapi.IsNotModified to check whether the response 6054// error from Do is the result of In-None-Match. 6055func (c *ProjectsLocationsEntryGroupsTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsTagsListCall { 6056 c.ifNoneMatch_ = entityTag 6057 return c 6058} 6059 6060// Context sets the context to be used in this call's Do method. Any 6061// pending HTTP request will be aborted if the provided context is 6062// canceled. 6063func (c *ProjectsLocationsEntryGroupsTagsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsListCall { 6064 c.ctx_ = ctx 6065 return c 6066} 6067 6068// Header returns an http.Header that can be modified by the caller to 6069// add HTTP headers to the request. 6070func (c *ProjectsLocationsEntryGroupsTagsListCall) Header() http.Header { 6071 if c.header_ == nil { 6072 c.header_ = make(http.Header) 6073 } 6074 return c.header_ 6075} 6076 6077func (c *ProjectsLocationsEntryGroupsTagsListCall) doRequest(alt string) (*http.Response, error) { 6078 reqHeaders := make(http.Header) 6079 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6080 for k, v := range c.header_ { 6081 reqHeaders[k] = v 6082 } 6083 reqHeaders.Set("User-Agent", c.s.userAgent()) 6084 if c.ifNoneMatch_ != "" { 6085 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6086 } 6087 var body io.Reader = nil 6088 c.urlParams_.Set("alt", alt) 6089 c.urlParams_.Set("prettyPrint", "false") 6090 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags") 6091 urls += "?" + c.urlParams_.Encode() 6092 req, err := http.NewRequest("GET", urls, body) 6093 if err != nil { 6094 return nil, err 6095 } 6096 req.Header = reqHeaders 6097 googleapi.Expand(req.URL, map[string]string{ 6098 "parent": c.parent, 6099 }) 6100 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6101} 6102 6103// Do executes the "datacatalog.projects.locations.entryGroups.tags.list" call. 6104// Exactly one of *GoogleCloudDatacatalogV1beta1ListTagsResponse or 6105// error will be non-nil. Any non-2xx status code is an error. Response 6106// headers are in either 6107// *GoogleCloudDatacatalogV1beta1ListTagsResponse.ServerResponse.Header 6108// or (if a response was returned at all) in 6109// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6110// whether the returned error was because http.StatusNotModified was 6111// returned. 6112func (c *ProjectsLocationsEntryGroupsTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTagsResponse, error) { 6113 gensupport.SetOptions(c.urlParams_, opts...) 6114 res, err := c.doRequest("json") 6115 if res != nil && res.StatusCode == http.StatusNotModified { 6116 if res.Body != nil { 6117 res.Body.Close() 6118 } 6119 return nil, &googleapi.Error{ 6120 Code: res.StatusCode, 6121 Header: res.Header, 6122 } 6123 } 6124 if err != nil { 6125 return nil, err 6126 } 6127 defer googleapi.CloseBody(res) 6128 if err := googleapi.CheckResponse(res); err != nil { 6129 return nil, err 6130 } 6131 ret := &GoogleCloudDatacatalogV1beta1ListTagsResponse{ 6132 ServerResponse: googleapi.ServerResponse{ 6133 Header: res.Header, 6134 HTTPStatusCode: res.StatusCode, 6135 }, 6136 } 6137 target := &ret 6138 if err := gensupport.DecodeResponse(target, res); err != nil { 6139 return nil, err 6140 } 6141 return ret, nil 6142 // { 6143 // "description": "Lists the tags on an Entry.", 6144 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags", 6145 // "httpMethod": "GET", 6146 // "id": "datacatalog.projects.locations.entryGroups.tags.list", 6147 // "parameterOrder": [ 6148 // "parent" 6149 // ], 6150 // "parameters": { 6151 // "pageSize": { 6152 // "description": "The maximum number of tags to return. Default is 10. Max limit is 1000.", 6153 // "format": "int32", 6154 // "location": "query", 6155 // "type": "integer" 6156 // }, 6157 // "pageToken": { 6158 // "description": "Token that specifies which page is requested. If empty, the first page is returned.", 6159 // "location": "query", 6160 // "type": "string" 6161 // }, 6162 // "parent": { 6163 // "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}", 6164 // "location": "path", 6165 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", 6166 // "required": true, 6167 // "type": "string" 6168 // } 6169 // }, 6170 // "path": "v1beta1/{+parent}/tags", 6171 // "response": { 6172 // "$ref": "GoogleCloudDatacatalogV1beta1ListTagsResponse" 6173 // }, 6174 // "scopes": [ 6175 // "https://www.googleapis.com/auth/cloud-platform" 6176 // ] 6177 // } 6178 6179} 6180 6181// Pages invokes f for each page of results. 6182// A non-nil error returned from f will halt the iteration. 6183// The provided context supersedes any context provided to the Context method. 6184func (c *ProjectsLocationsEntryGroupsTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTagsResponse) error) error { 6185 c.ctx_ = ctx 6186 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6187 for { 6188 x, err := c.Do() 6189 if err != nil { 6190 return err 6191 } 6192 if err := f(x); err != nil { 6193 return err 6194 } 6195 if x.NextPageToken == "" { 6196 return nil 6197 } 6198 c.PageToken(x.NextPageToken) 6199 } 6200} 6201 6202// method id "datacatalog.projects.locations.entryGroups.tags.patch": 6203 6204type ProjectsLocationsEntryGroupsTagsPatchCall struct { 6205 s *Service 6206 nameid string 6207 googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag 6208 urlParams_ gensupport.URLParams 6209 ctx_ context.Context 6210 header_ http.Header 6211} 6212 6213// Patch: Updates an existing tag. 6214func (r *ProjectsLocationsEntryGroupsTagsService) Patch(nameid string, googleclouddatacatalogv1beta1tag *GoogleCloudDatacatalogV1beta1Tag) *ProjectsLocationsEntryGroupsTagsPatchCall { 6215 c := &ProjectsLocationsEntryGroupsTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6216 c.nameid = nameid 6217 c.googleclouddatacatalogv1beta1tag = googleclouddatacatalogv1beta1tag 6218 return c 6219} 6220 6221// UpdateMask sets the optional parameter "updateMask": The fields to 6222// update on the Tag. If absent or empty, all modifiable fields are 6223// updated. Currently the only modifiable field is the field `fields`. 6224func (c *ProjectsLocationsEntryGroupsTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsTagsPatchCall { 6225 c.urlParams_.Set("updateMask", updateMask) 6226 return c 6227} 6228 6229// Fields allows partial responses to be retrieved. See 6230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6231// for more information. 6232func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTagsPatchCall { 6233 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6234 return c 6235} 6236 6237// Context sets the context to be used in this call's Do method. Any 6238// pending HTTP request will be aborted if the provided context is 6239// canceled. 6240func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTagsPatchCall { 6241 c.ctx_ = ctx 6242 return c 6243} 6244 6245// Header returns an http.Header that can be modified by the caller to 6246// add HTTP headers to the request. 6247func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Header() http.Header { 6248 if c.header_ == nil { 6249 c.header_ = make(http.Header) 6250 } 6251 return c.header_ 6252} 6253 6254func (c *ProjectsLocationsEntryGroupsTagsPatchCall) doRequest(alt string) (*http.Response, error) { 6255 reqHeaders := make(http.Header) 6256 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6257 for k, v := range c.header_ { 6258 reqHeaders[k] = v 6259 } 6260 reqHeaders.Set("User-Agent", c.s.userAgent()) 6261 var body io.Reader = nil 6262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tag) 6263 if err != nil { 6264 return nil, err 6265 } 6266 reqHeaders.Set("Content-Type", "application/json") 6267 c.urlParams_.Set("alt", alt) 6268 c.urlParams_.Set("prettyPrint", "false") 6269 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6270 urls += "?" + c.urlParams_.Encode() 6271 req, err := http.NewRequest("PATCH", urls, body) 6272 if err != nil { 6273 return nil, err 6274 } 6275 req.Header = reqHeaders 6276 googleapi.Expand(req.URL, map[string]string{ 6277 "name": c.nameid, 6278 }) 6279 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6280} 6281 6282// Do executes the "datacatalog.projects.locations.entryGroups.tags.patch" call. 6283// Exactly one of *GoogleCloudDatacatalogV1beta1Tag or error will be 6284// non-nil. Any non-2xx status code is an error. Response headers are in 6285// either *GoogleCloudDatacatalogV1beta1Tag.ServerResponse.Header or (if 6286// a response was returned at all) in error.(*googleapi.Error).Header. 6287// Use googleapi.IsNotModified to check whether the returned error was 6288// because http.StatusNotModified was returned. 6289func (c *ProjectsLocationsEntryGroupsTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Tag, error) { 6290 gensupport.SetOptions(c.urlParams_, opts...) 6291 res, err := c.doRequest("json") 6292 if res != nil && res.StatusCode == http.StatusNotModified { 6293 if res.Body != nil { 6294 res.Body.Close() 6295 } 6296 return nil, &googleapi.Error{ 6297 Code: res.StatusCode, 6298 Header: res.Header, 6299 } 6300 } 6301 if err != nil { 6302 return nil, err 6303 } 6304 defer googleapi.CloseBody(res) 6305 if err := googleapi.CheckResponse(res); err != nil { 6306 return nil, err 6307 } 6308 ret := &GoogleCloudDatacatalogV1beta1Tag{ 6309 ServerResponse: googleapi.ServerResponse{ 6310 Header: res.Header, 6311 HTTPStatusCode: res.StatusCode, 6312 }, 6313 } 6314 target := &ret 6315 if err := gensupport.DecodeResponse(target, res); err != nil { 6316 return nil, err 6317 } 6318 return ret, nil 6319 // { 6320 // "description": "Updates an existing tag.", 6321 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/tags/{tagsId}", 6322 // "httpMethod": "PATCH", 6323 // "id": "datacatalog.projects.locations.entryGroups.tags.patch", 6324 // "parameterOrder": [ 6325 // "name" 6326 // ], 6327 // "parameters": { 6328 // "name": { 6329 // "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.", 6330 // "location": "path", 6331 // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/tags/[^/]+$", 6332 // "required": true, 6333 // "type": "string" 6334 // }, 6335 // "updateMask": { 6336 // "description": "The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field `fields`.", 6337 // "format": "google-fieldmask", 6338 // "location": "query", 6339 // "type": "string" 6340 // } 6341 // }, 6342 // "path": "v1beta1/{+name}", 6343 // "request": { 6344 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6345 // }, 6346 // "response": { 6347 // "$ref": "GoogleCloudDatacatalogV1beta1Tag" 6348 // }, 6349 // "scopes": [ 6350 // "https://www.googleapis.com/auth/cloud-platform" 6351 // ] 6352 // } 6353 6354} 6355 6356// method id "datacatalog.projects.locations.tagTemplates.create": 6357 6358type ProjectsLocationsTagTemplatesCreateCall struct { 6359 s *Service 6360 parent string 6361 googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate 6362 urlParams_ gensupport.URLParams 6363 ctx_ context.Context 6364 header_ http.Header 6365} 6366 6367// Create: Creates a tag template. The user should enable the Data 6368// Catalog API in the project identified by the `parent` parameter (see 6369// [Data Catalog Resource 6370// Project](https://cloud.google.com/data-catalog/docs/concepts/resource- 6371// project) for more information). 6372func (r *ProjectsLocationsTagTemplatesService) Create(parent string, googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate) *ProjectsLocationsTagTemplatesCreateCall { 6373 c := &ProjectsLocationsTagTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6374 c.parent = parent 6375 c.googleclouddatacatalogv1beta1tagtemplate = googleclouddatacatalogv1beta1tagtemplate 6376 return c 6377} 6378 6379// TagTemplateId sets the optional parameter "tagTemplateId": Required. 6380// The id of the tag template to create. 6381func (c *ProjectsLocationsTagTemplatesCreateCall) TagTemplateId(tagTemplateId string) *ProjectsLocationsTagTemplatesCreateCall { 6382 c.urlParams_.Set("tagTemplateId", tagTemplateId) 6383 return c 6384} 6385 6386// Fields allows partial responses to be retrieved. See 6387// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6388// for more information. 6389func (c *ProjectsLocationsTagTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesCreateCall { 6390 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6391 return c 6392} 6393 6394// Context sets the context to be used in this call's Do method. Any 6395// pending HTTP request will be aborted if the provided context is 6396// canceled. 6397func (c *ProjectsLocationsTagTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesCreateCall { 6398 c.ctx_ = ctx 6399 return c 6400} 6401 6402// Header returns an http.Header that can be modified by the caller to 6403// add HTTP headers to the request. 6404func (c *ProjectsLocationsTagTemplatesCreateCall) Header() http.Header { 6405 if c.header_ == nil { 6406 c.header_ = make(http.Header) 6407 } 6408 return c.header_ 6409} 6410 6411func (c *ProjectsLocationsTagTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 6412 reqHeaders := make(http.Header) 6413 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6414 for k, v := range c.header_ { 6415 reqHeaders[k] = v 6416 } 6417 reqHeaders.Set("User-Agent", c.s.userAgent()) 6418 var body io.Reader = nil 6419 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplate) 6420 if err != nil { 6421 return nil, err 6422 } 6423 reqHeaders.Set("Content-Type", "application/json") 6424 c.urlParams_.Set("alt", alt) 6425 c.urlParams_.Set("prettyPrint", "false") 6426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tagTemplates") 6427 urls += "?" + c.urlParams_.Encode() 6428 req, err := http.NewRequest("POST", urls, body) 6429 if err != nil { 6430 return nil, err 6431 } 6432 req.Header = reqHeaders 6433 googleapi.Expand(req.URL, map[string]string{ 6434 "parent": c.parent, 6435 }) 6436 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6437} 6438 6439// Do executes the "datacatalog.projects.locations.tagTemplates.create" call. 6440// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 6441// will be non-nil. Any non-2xx status code is an error. Response 6442// headers are in either 6443// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 6444// (if a response was returned at all) in 6445// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6446// whether the returned error was because http.StatusNotModified was 6447// returned. 6448func (c *ProjectsLocationsTagTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 6449 gensupport.SetOptions(c.urlParams_, opts...) 6450 res, err := c.doRequest("json") 6451 if res != nil && res.StatusCode == http.StatusNotModified { 6452 if res.Body != nil { 6453 res.Body.Close() 6454 } 6455 return nil, &googleapi.Error{ 6456 Code: res.StatusCode, 6457 Header: res.Header, 6458 } 6459 } 6460 if err != nil { 6461 return nil, err 6462 } 6463 defer googleapi.CloseBody(res) 6464 if err := googleapi.CheckResponse(res); err != nil { 6465 return nil, err 6466 } 6467 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 6468 ServerResponse: googleapi.ServerResponse{ 6469 Header: res.Header, 6470 HTTPStatusCode: res.StatusCode, 6471 }, 6472 } 6473 target := &ret 6474 if err := gensupport.DecodeResponse(target, res); err != nil { 6475 return nil, err 6476 } 6477 return ret, nil 6478 // { 6479 // "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).", 6480 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates", 6481 // "httpMethod": "POST", 6482 // "id": "datacatalog.projects.locations.tagTemplates.create", 6483 // "parameterOrder": [ 6484 // "parent" 6485 // ], 6486 // "parameters": { 6487 // "parent": { 6488 // "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", 6489 // "location": "path", 6490 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6491 // "required": true, 6492 // "type": "string" 6493 // }, 6494 // "tagTemplateId": { 6495 // "description": "Required. The id of the tag template to create.", 6496 // "location": "query", 6497 // "type": "string" 6498 // } 6499 // }, 6500 // "path": "v1beta1/{+parent}/tagTemplates", 6501 // "request": { 6502 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 6503 // }, 6504 // "response": { 6505 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 6506 // }, 6507 // "scopes": [ 6508 // "https://www.googleapis.com/auth/cloud-platform" 6509 // ] 6510 // } 6511 6512} 6513 6514// method id "datacatalog.projects.locations.tagTemplates.delete": 6515 6516type ProjectsLocationsTagTemplatesDeleteCall struct { 6517 s *Service 6518 name string 6519 urlParams_ gensupport.URLParams 6520 ctx_ context.Context 6521 header_ http.Header 6522} 6523 6524// Delete: Deletes a tag template and all tags using the template. Users 6525// should enable the Data Catalog API in the project identified by the 6526// `name` parameter (see [Data Catalog Resource Project] 6527// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 6528// for more information). 6529func (r *ProjectsLocationsTagTemplatesService) Delete(name string) *ProjectsLocationsTagTemplatesDeleteCall { 6530 c := &ProjectsLocationsTagTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6531 c.name = name 6532 return c 6533} 6534 6535// Force sets the optional parameter "force": Required. Currently, this 6536// field must always be set to `true`. This confirms the deletion of any 6537// possible tags using this template. `force = false` will be supported 6538// in the future. 6539func (c *ProjectsLocationsTagTemplatesDeleteCall) Force(force bool) *ProjectsLocationsTagTemplatesDeleteCall { 6540 c.urlParams_.Set("force", fmt.Sprint(force)) 6541 return c 6542} 6543 6544// Fields allows partial responses to be retrieved. See 6545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6546// for more information. 6547func (c *ProjectsLocationsTagTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesDeleteCall { 6548 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6549 return c 6550} 6551 6552// Context sets the context to be used in this call's Do method. Any 6553// pending HTTP request will be aborted if the provided context is 6554// canceled. 6555func (c *ProjectsLocationsTagTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesDeleteCall { 6556 c.ctx_ = ctx 6557 return c 6558} 6559 6560// Header returns an http.Header that can be modified by the caller to 6561// add HTTP headers to the request. 6562func (c *ProjectsLocationsTagTemplatesDeleteCall) Header() http.Header { 6563 if c.header_ == nil { 6564 c.header_ = make(http.Header) 6565 } 6566 return c.header_ 6567} 6568 6569func (c *ProjectsLocationsTagTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { 6570 reqHeaders := make(http.Header) 6571 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6572 for k, v := range c.header_ { 6573 reqHeaders[k] = v 6574 } 6575 reqHeaders.Set("User-Agent", c.s.userAgent()) 6576 var body io.Reader = nil 6577 c.urlParams_.Set("alt", alt) 6578 c.urlParams_.Set("prettyPrint", "false") 6579 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6580 urls += "?" + c.urlParams_.Encode() 6581 req, err := http.NewRequest("DELETE", urls, body) 6582 if err != nil { 6583 return nil, err 6584 } 6585 req.Header = reqHeaders 6586 googleapi.Expand(req.URL, map[string]string{ 6587 "name": c.name, 6588 }) 6589 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6590} 6591 6592// Do executes the "datacatalog.projects.locations.tagTemplates.delete" call. 6593// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6594// code is an error. Response headers are in either 6595// *Empty.ServerResponse.Header or (if a response was returned at all) 6596// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6597// check whether the returned error was because http.StatusNotModified 6598// was returned. 6599func (c *ProjectsLocationsTagTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6600 gensupport.SetOptions(c.urlParams_, opts...) 6601 res, err := c.doRequest("json") 6602 if res != nil && res.StatusCode == http.StatusNotModified { 6603 if res.Body != nil { 6604 res.Body.Close() 6605 } 6606 return nil, &googleapi.Error{ 6607 Code: res.StatusCode, 6608 Header: res.Header, 6609 } 6610 } 6611 if err != nil { 6612 return nil, err 6613 } 6614 defer googleapi.CloseBody(res) 6615 if err := googleapi.CheckResponse(res); err != nil { 6616 return nil, err 6617 } 6618 ret := &Empty{ 6619 ServerResponse: googleapi.ServerResponse{ 6620 Header: res.Header, 6621 HTTPStatusCode: res.StatusCode, 6622 }, 6623 } 6624 target := &ret 6625 if err := gensupport.DecodeResponse(target, res); err != nil { 6626 return nil, err 6627 } 6628 return ret, nil 6629 // { 6630 // "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).", 6631 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 6632 // "httpMethod": "DELETE", 6633 // "id": "datacatalog.projects.locations.tagTemplates.delete", 6634 // "parameterOrder": [ 6635 // "name" 6636 // ], 6637 // "parameters": { 6638 // "force": { 6639 // "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.", 6640 // "location": "query", 6641 // "type": "boolean" 6642 // }, 6643 // "name": { 6644 // "description": "Required. The name of the tag template to delete. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}", 6645 // "location": "path", 6646 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 6647 // "required": true, 6648 // "type": "string" 6649 // } 6650 // }, 6651 // "path": "v1beta1/{+name}", 6652 // "response": { 6653 // "$ref": "Empty" 6654 // }, 6655 // "scopes": [ 6656 // "https://www.googleapis.com/auth/cloud-platform" 6657 // ] 6658 // } 6659 6660} 6661 6662// method id "datacatalog.projects.locations.tagTemplates.get": 6663 6664type ProjectsLocationsTagTemplatesGetCall struct { 6665 s *Service 6666 name string 6667 urlParams_ gensupport.URLParams 6668 ifNoneMatch_ string 6669 ctx_ context.Context 6670 header_ http.Header 6671} 6672 6673// Get: Gets a tag template. 6674func (r *ProjectsLocationsTagTemplatesService) Get(name string) *ProjectsLocationsTagTemplatesGetCall { 6675 c := &ProjectsLocationsTagTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6676 c.name = name 6677 return c 6678} 6679 6680// Fields allows partial responses to be retrieved. See 6681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6682// for more information. 6683func (c *ProjectsLocationsTagTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesGetCall { 6684 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6685 return c 6686} 6687 6688// IfNoneMatch sets the optional parameter which makes the operation 6689// fail if the object's ETag matches the given value. This is useful for 6690// getting updates only after the object has changed since the last 6691// request. Use googleapi.IsNotModified to check whether the response 6692// error from Do is the result of In-None-Match. 6693func (c *ProjectsLocationsTagTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTagTemplatesGetCall { 6694 c.ifNoneMatch_ = entityTag 6695 return c 6696} 6697 6698// Context sets the context to be used in this call's Do method. Any 6699// pending HTTP request will be aborted if the provided context is 6700// canceled. 6701func (c *ProjectsLocationsTagTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesGetCall { 6702 c.ctx_ = ctx 6703 return c 6704} 6705 6706// Header returns an http.Header that can be modified by the caller to 6707// add HTTP headers to the request. 6708func (c *ProjectsLocationsTagTemplatesGetCall) Header() http.Header { 6709 if c.header_ == nil { 6710 c.header_ = make(http.Header) 6711 } 6712 return c.header_ 6713} 6714 6715func (c *ProjectsLocationsTagTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 6716 reqHeaders := make(http.Header) 6717 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6718 for k, v := range c.header_ { 6719 reqHeaders[k] = v 6720 } 6721 reqHeaders.Set("User-Agent", c.s.userAgent()) 6722 if c.ifNoneMatch_ != "" { 6723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6724 } 6725 var body io.Reader = nil 6726 c.urlParams_.Set("alt", alt) 6727 c.urlParams_.Set("prettyPrint", "false") 6728 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 6729 urls += "?" + c.urlParams_.Encode() 6730 req, err := http.NewRequest("GET", urls, body) 6731 if err != nil { 6732 return nil, err 6733 } 6734 req.Header = reqHeaders 6735 googleapi.Expand(req.URL, map[string]string{ 6736 "name": c.name, 6737 }) 6738 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6739} 6740 6741// Do executes the "datacatalog.projects.locations.tagTemplates.get" call. 6742// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 6743// will be non-nil. Any non-2xx status code is an error. Response 6744// headers are in either 6745// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 6746// (if a response was returned at all) in 6747// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6748// whether the returned error was because http.StatusNotModified was 6749// returned. 6750func (c *ProjectsLocationsTagTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 6751 gensupport.SetOptions(c.urlParams_, opts...) 6752 res, err := c.doRequest("json") 6753 if res != nil && res.StatusCode == http.StatusNotModified { 6754 if res.Body != nil { 6755 res.Body.Close() 6756 } 6757 return nil, &googleapi.Error{ 6758 Code: res.StatusCode, 6759 Header: res.Header, 6760 } 6761 } 6762 if err != nil { 6763 return nil, err 6764 } 6765 defer googleapi.CloseBody(res) 6766 if err := googleapi.CheckResponse(res); err != nil { 6767 return nil, err 6768 } 6769 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 6770 ServerResponse: googleapi.ServerResponse{ 6771 Header: res.Header, 6772 HTTPStatusCode: res.StatusCode, 6773 }, 6774 } 6775 target := &ret 6776 if err := gensupport.DecodeResponse(target, res); err != nil { 6777 return nil, err 6778 } 6779 return ret, nil 6780 // { 6781 // "description": "Gets a tag template.", 6782 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 6783 // "httpMethod": "GET", 6784 // "id": "datacatalog.projects.locations.tagTemplates.get", 6785 // "parameterOrder": [ 6786 // "name" 6787 // ], 6788 // "parameters": { 6789 // "name": { 6790 // "description": "Required. The name of the tag template. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}", 6791 // "location": "path", 6792 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 6793 // "required": true, 6794 // "type": "string" 6795 // } 6796 // }, 6797 // "path": "v1beta1/{+name}", 6798 // "response": { 6799 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 6800 // }, 6801 // "scopes": [ 6802 // "https://www.googleapis.com/auth/cloud-platform" 6803 // ] 6804 // } 6805 6806} 6807 6808// method id "datacatalog.projects.locations.tagTemplates.getIamPolicy": 6809 6810type ProjectsLocationsTagTemplatesGetIamPolicyCall struct { 6811 s *Service 6812 resource string 6813 getiampolicyrequest *GetIamPolicyRequest 6814 urlParams_ gensupport.URLParams 6815 ctx_ context.Context 6816 header_ http.Header 6817} 6818 6819// GetIamPolicy: Gets the access control policy for a resource. A 6820// `NOT_FOUND` error is returned if the resource does not exist. An 6821// empty policy is returned if the resource exists but does not have a 6822// policy set on it. Supported resources are: - Tag templates. - 6823// Entries. - Entry groups. Note, this method cannot be used to manage 6824// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 6825// resources synced to Data Catalog. Callers must have following Google 6826// IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get 6827// policies on tag templates. - `datacatalog.entries.getIamPolicy` to 6828// get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to 6829// get policies on entry groups. 6830func (r *ProjectsLocationsTagTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 6831 c := &ProjectsLocationsTagTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6832 c.resource = resource 6833 c.getiampolicyrequest = getiampolicyrequest 6834 return c 6835} 6836 6837// Fields allows partial responses to be retrieved. See 6838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6839// for more information. 6840func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 6841 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6842 return c 6843} 6844 6845// Context sets the context to be used in this call's Do method. Any 6846// pending HTTP request will be aborted if the provided context is 6847// canceled. 6848func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesGetIamPolicyCall { 6849 c.ctx_ = ctx 6850 return c 6851} 6852 6853// Header returns an http.Header that can be modified by the caller to 6854// add HTTP headers to the request. 6855func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Header() http.Header { 6856 if c.header_ == nil { 6857 c.header_ = make(http.Header) 6858 } 6859 return c.header_ 6860} 6861 6862func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6863 reqHeaders := make(http.Header) 6864 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 6865 for k, v := range c.header_ { 6866 reqHeaders[k] = v 6867 } 6868 reqHeaders.Set("User-Agent", c.s.userAgent()) 6869 var body io.Reader = nil 6870 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 6871 if err != nil { 6872 return nil, err 6873 } 6874 reqHeaders.Set("Content-Type", "application/json") 6875 c.urlParams_.Set("alt", alt) 6876 c.urlParams_.Set("prettyPrint", "false") 6877 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 6878 urls += "?" + c.urlParams_.Encode() 6879 req, err := http.NewRequest("POST", urls, body) 6880 if err != nil { 6881 return nil, err 6882 } 6883 req.Header = reqHeaders 6884 googleapi.Expand(req.URL, map[string]string{ 6885 "resource": c.resource, 6886 }) 6887 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6888} 6889 6890// Do executes the "datacatalog.projects.locations.tagTemplates.getIamPolicy" call. 6891// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6892// code is an error. Response headers are in either 6893// *Policy.ServerResponse.Header or (if a response was returned at all) 6894// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6895// check whether the returned error was because http.StatusNotModified 6896// was returned. 6897func (c *ProjectsLocationsTagTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6898 gensupport.SetOptions(c.urlParams_, opts...) 6899 res, err := c.doRequest("json") 6900 if res != nil && res.StatusCode == http.StatusNotModified { 6901 if res.Body != nil { 6902 res.Body.Close() 6903 } 6904 return nil, &googleapi.Error{ 6905 Code: res.StatusCode, 6906 Header: res.Header, 6907 } 6908 } 6909 if err != nil { 6910 return nil, err 6911 } 6912 defer googleapi.CloseBody(res) 6913 if err := googleapi.CheckResponse(res); err != nil { 6914 return nil, err 6915 } 6916 ret := &Policy{ 6917 ServerResponse: googleapi.ServerResponse{ 6918 Header: res.Header, 6919 HTTPStatusCode: res.StatusCode, 6920 }, 6921 } 6922 target := &ret 6923 if err := gensupport.DecodeResponse(target, res); err != nil { 6924 return nil, err 6925 } 6926 return ret, nil 6927 // { 6928 // "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.", 6929 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:getIamPolicy", 6930 // "httpMethod": "POST", 6931 // "id": "datacatalog.projects.locations.tagTemplates.getIamPolicy", 6932 // "parameterOrder": [ 6933 // "resource" 6934 // ], 6935 // "parameters": { 6936 // "resource": { 6937 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 6938 // "location": "path", 6939 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 6940 // "required": true, 6941 // "type": "string" 6942 // } 6943 // }, 6944 // "path": "v1beta1/{+resource}:getIamPolicy", 6945 // "request": { 6946 // "$ref": "GetIamPolicyRequest" 6947 // }, 6948 // "response": { 6949 // "$ref": "Policy" 6950 // }, 6951 // "scopes": [ 6952 // "https://www.googleapis.com/auth/cloud-platform" 6953 // ] 6954 // } 6955 6956} 6957 6958// method id "datacatalog.projects.locations.tagTemplates.patch": 6959 6960type ProjectsLocationsTagTemplatesPatchCall struct { 6961 s *Service 6962 name string 6963 googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate 6964 urlParams_ gensupport.URLParams 6965 ctx_ context.Context 6966 header_ http.Header 6967} 6968 6969// Patch: Updates a tag template. This method cannot be used to update 6970// the fields of a template. The tag template fields are represented as 6971// separate resources and should be updated using their own 6972// create/update/delete methods. Users should enable the Data Catalog 6973// API in the project identified by the `tag_template.name` parameter 6974// (see [Data Catalog Resource Project] 6975// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 6976// for more information). 6977func (r *ProjectsLocationsTagTemplatesService) Patch(name string, googleclouddatacatalogv1beta1tagtemplate *GoogleCloudDatacatalogV1beta1TagTemplate) *ProjectsLocationsTagTemplatesPatchCall { 6978 c := &ProjectsLocationsTagTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6979 c.name = name 6980 c.googleclouddatacatalogv1beta1tagtemplate = googleclouddatacatalogv1beta1tagtemplate 6981 return c 6982} 6983 6984// UpdateMask sets the optional parameter "updateMask": The field mask 6985// specifies the parts of the template to overwrite. Allowed fields: * 6986// `display_name` If absent or empty, all of the allowed fields above 6987// will be updated. 6988func (c *ProjectsLocationsTagTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTagTemplatesPatchCall { 6989 c.urlParams_.Set("updateMask", updateMask) 6990 return c 6991} 6992 6993// Fields allows partial responses to be retrieved. See 6994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6995// for more information. 6996func (c *ProjectsLocationsTagTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesPatchCall { 6997 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6998 return c 6999} 7000 7001// Context sets the context to be used in this call's Do method. Any 7002// pending HTTP request will be aborted if the provided context is 7003// canceled. 7004func (c *ProjectsLocationsTagTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesPatchCall { 7005 c.ctx_ = ctx 7006 return c 7007} 7008 7009// Header returns an http.Header that can be modified by the caller to 7010// add HTTP headers to the request. 7011func (c *ProjectsLocationsTagTemplatesPatchCall) Header() http.Header { 7012 if c.header_ == nil { 7013 c.header_ = make(http.Header) 7014 } 7015 return c.header_ 7016} 7017 7018func (c *ProjectsLocationsTagTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { 7019 reqHeaders := make(http.Header) 7020 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7021 for k, v := range c.header_ { 7022 reqHeaders[k] = v 7023 } 7024 reqHeaders.Set("User-Agent", c.s.userAgent()) 7025 var body io.Reader = nil 7026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplate) 7027 if err != nil { 7028 return nil, err 7029 } 7030 reqHeaders.Set("Content-Type", "application/json") 7031 c.urlParams_.Set("alt", alt) 7032 c.urlParams_.Set("prettyPrint", "false") 7033 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7034 urls += "?" + c.urlParams_.Encode() 7035 req, err := http.NewRequest("PATCH", urls, body) 7036 if err != nil { 7037 return nil, err 7038 } 7039 req.Header = reqHeaders 7040 googleapi.Expand(req.URL, map[string]string{ 7041 "name": c.name, 7042 }) 7043 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7044} 7045 7046// Do executes the "datacatalog.projects.locations.tagTemplates.patch" call. 7047// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplate or error 7048// will be non-nil. Any non-2xx status code is an error. Response 7049// headers are in either 7050// *GoogleCloudDatacatalogV1beta1TagTemplate.ServerResponse.Header or 7051// (if a response was returned at all) in 7052// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7053// whether the returned error was because http.StatusNotModified was 7054// returned. 7055func (c *ProjectsLocationsTagTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplate, error) { 7056 gensupport.SetOptions(c.urlParams_, opts...) 7057 res, err := c.doRequest("json") 7058 if res != nil && res.StatusCode == http.StatusNotModified { 7059 if res.Body != nil { 7060 res.Body.Close() 7061 } 7062 return nil, &googleapi.Error{ 7063 Code: res.StatusCode, 7064 Header: res.Header, 7065 } 7066 } 7067 if err != nil { 7068 return nil, err 7069 } 7070 defer googleapi.CloseBody(res) 7071 if err := googleapi.CheckResponse(res); err != nil { 7072 return nil, err 7073 } 7074 ret := &GoogleCloudDatacatalogV1beta1TagTemplate{ 7075 ServerResponse: googleapi.ServerResponse{ 7076 Header: res.Header, 7077 HTTPStatusCode: res.StatusCode, 7078 }, 7079 } 7080 target := &ret 7081 if err := gensupport.DecodeResponse(target, res); err != nil { 7082 return nil, err 7083 } 7084 return ret, nil 7085 // { 7086 // "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).", 7087 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}", 7088 // "httpMethod": "PATCH", 7089 // "id": "datacatalog.projects.locations.tagTemplates.patch", 7090 // "parameterOrder": [ 7091 // "name" 7092 // ], 7093 // "parameters": { 7094 // "name": { 7095 // "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.", 7096 // "location": "path", 7097 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7098 // "required": true, 7099 // "type": "string" 7100 // }, 7101 // "updateMask": { 7102 // "description": "The field mask specifies the parts of the template to overwrite. Allowed fields: * `display_name` If absent or empty, all of the allowed fields above will be updated.", 7103 // "format": "google-fieldmask", 7104 // "location": "query", 7105 // "type": "string" 7106 // } 7107 // }, 7108 // "path": "v1beta1/{+name}", 7109 // "request": { 7110 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 7111 // }, 7112 // "response": { 7113 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplate" 7114 // }, 7115 // "scopes": [ 7116 // "https://www.googleapis.com/auth/cloud-platform" 7117 // ] 7118 // } 7119 7120} 7121 7122// method id "datacatalog.projects.locations.tagTemplates.setIamPolicy": 7123 7124type ProjectsLocationsTagTemplatesSetIamPolicyCall struct { 7125 s *Service 7126 resource string 7127 setiampolicyrequest *SetIamPolicyRequest 7128 urlParams_ gensupport.URLParams 7129 ctx_ context.Context 7130 header_ http.Header 7131} 7132 7133// SetIamPolicy: Sets the access control policy for a resource. Replaces 7134// any existing policy. Supported resources are: - Tag templates. - 7135// Entries. - Entry groups. Note, this method cannot be used to manage 7136// policies for BigQuery, Pub/Sub and any external Google Cloud Platform 7137// resources synced to Data Catalog. Callers must have following Google 7138// IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set 7139// policies on tag templates. - `datacatalog.entries.setIamPolicy` to 7140// set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to 7141// set policies on entry groups. 7142func (r *ProjectsLocationsTagTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7143 c := &ProjectsLocationsTagTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7144 c.resource = resource 7145 c.setiampolicyrequest = setiampolicyrequest 7146 return c 7147} 7148 7149// Fields allows partial responses to be retrieved. See 7150// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7151// for more information. 7152func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7153 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7154 return c 7155} 7156 7157// Context sets the context to be used in this call's Do method. Any 7158// pending HTTP request will be aborted if the provided context is 7159// canceled. 7160func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesSetIamPolicyCall { 7161 c.ctx_ = ctx 7162 return c 7163} 7164 7165// Header returns an http.Header that can be modified by the caller to 7166// add HTTP headers to the request. 7167func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Header() http.Header { 7168 if c.header_ == nil { 7169 c.header_ = make(http.Header) 7170 } 7171 return c.header_ 7172} 7173 7174func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7175 reqHeaders := make(http.Header) 7176 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7177 for k, v := range c.header_ { 7178 reqHeaders[k] = v 7179 } 7180 reqHeaders.Set("User-Agent", c.s.userAgent()) 7181 var body io.Reader = nil 7182 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 7183 if err != nil { 7184 return nil, err 7185 } 7186 reqHeaders.Set("Content-Type", "application/json") 7187 c.urlParams_.Set("alt", alt) 7188 c.urlParams_.Set("prettyPrint", "false") 7189 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 7190 urls += "?" + c.urlParams_.Encode() 7191 req, err := http.NewRequest("POST", urls, body) 7192 if err != nil { 7193 return nil, err 7194 } 7195 req.Header = reqHeaders 7196 googleapi.Expand(req.URL, map[string]string{ 7197 "resource": c.resource, 7198 }) 7199 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7200} 7201 7202// Do executes the "datacatalog.projects.locations.tagTemplates.setIamPolicy" call. 7203// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7204// code is an error. Response headers are in either 7205// *Policy.ServerResponse.Header or (if a response was returned at all) 7206// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7207// check whether the returned error was because http.StatusNotModified 7208// was returned. 7209func (c *ProjectsLocationsTagTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7210 gensupport.SetOptions(c.urlParams_, opts...) 7211 res, err := c.doRequest("json") 7212 if res != nil && res.StatusCode == http.StatusNotModified { 7213 if res.Body != nil { 7214 res.Body.Close() 7215 } 7216 return nil, &googleapi.Error{ 7217 Code: res.StatusCode, 7218 Header: res.Header, 7219 } 7220 } 7221 if err != nil { 7222 return nil, err 7223 } 7224 defer googleapi.CloseBody(res) 7225 if err := googleapi.CheckResponse(res); err != nil { 7226 return nil, err 7227 } 7228 ret := &Policy{ 7229 ServerResponse: googleapi.ServerResponse{ 7230 Header: res.Header, 7231 HTTPStatusCode: res.StatusCode, 7232 }, 7233 } 7234 target := &ret 7235 if err := gensupport.DecodeResponse(target, res); err != nil { 7236 return nil, err 7237 } 7238 return ret, nil 7239 // { 7240 // "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.", 7241 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:setIamPolicy", 7242 // "httpMethod": "POST", 7243 // "id": "datacatalog.projects.locations.tagTemplates.setIamPolicy", 7244 // "parameterOrder": [ 7245 // "resource" 7246 // ], 7247 // "parameters": { 7248 // "resource": { 7249 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 7250 // "location": "path", 7251 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7252 // "required": true, 7253 // "type": "string" 7254 // } 7255 // }, 7256 // "path": "v1beta1/{+resource}:setIamPolicy", 7257 // "request": { 7258 // "$ref": "SetIamPolicyRequest" 7259 // }, 7260 // "response": { 7261 // "$ref": "Policy" 7262 // }, 7263 // "scopes": [ 7264 // "https://www.googleapis.com/auth/cloud-platform" 7265 // ] 7266 // } 7267 7268} 7269 7270// method id "datacatalog.projects.locations.tagTemplates.testIamPermissions": 7271 7272type ProjectsLocationsTagTemplatesTestIamPermissionsCall struct { 7273 s *Service 7274 resource string 7275 testiampermissionsrequest *TestIamPermissionsRequest 7276 urlParams_ gensupport.URLParams 7277 ctx_ context.Context 7278 header_ http.Header 7279} 7280 7281// TestIamPermissions: Returns the caller's permissions on a resource. 7282// If the resource does not exist, an empty set of permissions is 7283// returned (We don't return a `NOT_FOUND` error). Supported resources 7284// are: - Tag templates. - Entries. - Entry groups. Note, this method 7285// cannot be used to manage policies for BigQuery, Pub/Sub and any 7286// external Google Cloud Platform resources synced to Data Catalog. A 7287// caller is not required to have Google IAM permission to make this 7288// request. 7289func (r *ProjectsLocationsTagTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7290 c := &ProjectsLocationsTagTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7291 c.resource = resource 7292 c.testiampermissionsrequest = testiampermissionsrequest 7293 return c 7294} 7295 7296// Fields allows partial responses to be retrieved. See 7297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7298// for more information. 7299func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7300 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7301 return c 7302} 7303 7304// Context sets the context to be used in this call's Do method. Any 7305// pending HTTP request will be aborted if the provided context is 7306// canceled. 7307func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesTestIamPermissionsCall { 7308 c.ctx_ = ctx 7309 return c 7310} 7311 7312// Header returns an http.Header that can be modified by the caller to 7313// add HTTP headers to the request. 7314func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Header() http.Header { 7315 if c.header_ == nil { 7316 c.header_ = make(http.Header) 7317 } 7318 return c.header_ 7319} 7320 7321func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 7322 reqHeaders := make(http.Header) 7323 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7324 for k, v := range c.header_ { 7325 reqHeaders[k] = v 7326 } 7327 reqHeaders.Set("User-Agent", c.s.userAgent()) 7328 var body io.Reader = nil 7329 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 7330 if err != nil { 7331 return nil, err 7332 } 7333 reqHeaders.Set("Content-Type", "application/json") 7334 c.urlParams_.Set("alt", alt) 7335 c.urlParams_.Set("prettyPrint", "false") 7336 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 7337 urls += "?" + c.urlParams_.Encode() 7338 req, err := http.NewRequest("POST", urls, body) 7339 if err != nil { 7340 return nil, err 7341 } 7342 req.Header = reqHeaders 7343 googleapi.Expand(req.URL, map[string]string{ 7344 "resource": c.resource, 7345 }) 7346 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7347} 7348 7349// Do executes the "datacatalog.projects.locations.tagTemplates.testIamPermissions" call. 7350// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 7351// Any non-2xx status code is an error. Response headers are in either 7352// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 7353// was returned at all) in error.(*googleapi.Error).Header. Use 7354// googleapi.IsNotModified to check whether the returned error was 7355// because http.StatusNotModified was returned. 7356func (c *ProjectsLocationsTagTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 7357 gensupport.SetOptions(c.urlParams_, opts...) 7358 res, err := c.doRequest("json") 7359 if res != nil && res.StatusCode == http.StatusNotModified { 7360 if res.Body != nil { 7361 res.Body.Close() 7362 } 7363 return nil, &googleapi.Error{ 7364 Code: res.StatusCode, 7365 Header: res.Header, 7366 } 7367 } 7368 if err != nil { 7369 return nil, err 7370 } 7371 defer googleapi.CloseBody(res) 7372 if err := googleapi.CheckResponse(res); err != nil { 7373 return nil, err 7374 } 7375 ret := &TestIamPermissionsResponse{ 7376 ServerResponse: googleapi.ServerResponse{ 7377 Header: res.Header, 7378 HTTPStatusCode: res.StatusCode, 7379 }, 7380 } 7381 target := &ret 7382 if err := gensupport.DecodeResponse(target, res); err != nil { 7383 return nil, err 7384 } 7385 return ret, nil 7386 // { 7387 // "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.", 7388 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}:testIamPermissions", 7389 // "httpMethod": "POST", 7390 // "id": "datacatalog.projects.locations.tagTemplates.testIamPermissions", 7391 // "parameterOrder": [ 7392 // "resource" 7393 // ], 7394 // "parameters": { 7395 // "resource": { 7396 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 7397 // "location": "path", 7398 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7399 // "required": true, 7400 // "type": "string" 7401 // } 7402 // }, 7403 // "path": "v1beta1/{+resource}:testIamPermissions", 7404 // "request": { 7405 // "$ref": "TestIamPermissionsRequest" 7406 // }, 7407 // "response": { 7408 // "$ref": "TestIamPermissionsResponse" 7409 // }, 7410 // "scopes": [ 7411 // "https://www.googleapis.com/auth/cloud-platform" 7412 // ] 7413 // } 7414 7415} 7416 7417// method id "datacatalog.projects.locations.tagTemplates.fields.create": 7418 7419type ProjectsLocationsTagTemplatesFieldsCreateCall struct { 7420 s *Service 7421 parent string 7422 googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField 7423 urlParams_ gensupport.URLParams 7424 ctx_ context.Context 7425 header_ http.Header 7426} 7427 7428// Create: Creates a field in a tag template. The user should enable the 7429// Data Catalog API in the project identified by the `parent` parameter 7430// (see [Data Catalog Resource 7431// Project](https://cloud.google.com/data-catalog/docs/concepts/resource- 7432// project) for more information). 7433func (r *ProjectsLocationsTagTemplatesFieldsService) Create(parent string, googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7434 c := &ProjectsLocationsTagTemplatesFieldsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7435 c.parent = parent 7436 c.googleclouddatacatalogv1beta1tagtemplatefield = googleclouddatacatalogv1beta1tagtemplatefield 7437 return c 7438} 7439 7440// TagTemplateFieldId sets the optional parameter "tagTemplateFieldId": 7441// Required. The ID of the tag template field to create. Field ids can 7442// contain letters (both uppercase and lowercase), numbers (0-9), 7443// underscores (_) and dashes (-). Field IDs must be at least 1 7444// character long and at most 128 characters long. Field IDs must also 7445// be unique within their template. 7446func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) TagTemplateFieldId(tagTemplateFieldId string) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7447 c.urlParams_.Set("tagTemplateFieldId", tagTemplateFieldId) 7448 return c 7449} 7450 7451// Fields allows partial responses to be retrieved. See 7452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7453// for more information. 7454func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7455 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7456 return c 7457} 7458 7459// Context sets the context to be used in this call's Do method. Any 7460// pending HTTP request will be aborted if the provided context is 7461// canceled. 7462func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsCreateCall { 7463 c.ctx_ = ctx 7464 return c 7465} 7466 7467// Header returns an http.Header that can be modified by the caller to 7468// add HTTP headers to the request. 7469func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Header() http.Header { 7470 if c.header_ == nil { 7471 c.header_ = make(http.Header) 7472 } 7473 return c.header_ 7474} 7475 7476func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) doRequest(alt string) (*http.Response, error) { 7477 reqHeaders := make(http.Header) 7478 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7479 for k, v := range c.header_ { 7480 reqHeaders[k] = v 7481 } 7482 reqHeaders.Set("User-Agent", c.s.userAgent()) 7483 var body io.Reader = nil 7484 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplatefield) 7485 if err != nil { 7486 return nil, err 7487 } 7488 reqHeaders.Set("Content-Type", "application/json") 7489 c.urlParams_.Set("alt", alt) 7490 c.urlParams_.Set("prettyPrint", "false") 7491 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/fields") 7492 urls += "?" + c.urlParams_.Encode() 7493 req, err := http.NewRequest("POST", urls, body) 7494 if err != nil { 7495 return nil, err 7496 } 7497 req.Header = reqHeaders 7498 googleapi.Expand(req.URL, map[string]string{ 7499 "parent": c.parent, 7500 }) 7501 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7502} 7503 7504// Do executes the "datacatalog.projects.locations.tagTemplates.fields.create" call. 7505// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 7506// error will be non-nil. Any non-2xx status code is an error. Response 7507// headers are in either 7508// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 7509// or (if a response was returned at all) in 7510// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7511// whether the returned error was because http.StatusNotModified was 7512// returned. 7513func (c *ProjectsLocationsTagTemplatesFieldsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 7514 gensupport.SetOptions(c.urlParams_, opts...) 7515 res, err := c.doRequest("json") 7516 if res != nil && res.StatusCode == http.StatusNotModified { 7517 if res.Body != nil { 7518 res.Body.Close() 7519 } 7520 return nil, &googleapi.Error{ 7521 Code: res.StatusCode, 7522 Header: res.Header, 7523 } 7524 } 7525 if err != nil { 7526 return nil, err 7527 } 7528 defer googleapi.CloseBody(res) 7529 if err := googleapi.CheckResponse(res); err != nil { 7530 return nil, err 7531 } 7532 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 7533 ServerResponse: googleapi.ServerResponse{ 7534 Header: res.Header, 7535 HTTPStatusCode: res.StatusCode, 7536 }, 7537 } 7538 target := &ret 7539 if err := gensupport.DecodeResponse(target, res); err != nil { 7540 return nil, err 7541 } 7542 return ret, nil 7543 // { 7544 // "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).", 7545 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields", 7546 // "httpMethod": "POST", 7547 // "id": "datacatalog.projects.locations.tagTemplates.fields.create", 7548 // "parameterOrder": [ 7549 // "parent" 7550 // ], 7551 // "parameters": { 7552 // "parent": { 7553 // "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}", 7554 // "location": "path", 7555 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+$", 7556 // "required": true, 7557 // "type": "string" 7558 // }, 7559 // "tagTemplateFieldId": { 7560 // "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.", 7561 // "location": "query", 7562 // "type": "string" 7563 // } 7564 // }, 7565 // "path": "v1beta1/{+parent}/fields", 7566 // "request": { 7567 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7568 // }, 7569 // "response": { 7570 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7571 // }, 7572 // "scopes": [ 7573 // "https://www.googleapis.com/auth/cloud-platform" 7574 // ] 7575 // } 7576 7577} 7578 7579// method id "datacatalog.projects.locations.tagTemplates.fields.delete": 7580 7581type ProjectsLocationsTagTemplatesFieldsDeleteCall struct { 7582 s *Service 7583 name string 7584 urlParams_ gensupport.URLParams 7585 ctx_ context.Context 7586 header_ http.Header 7587} 7588 7589// Delete: Deletes a field in a tag template and all uses of that field. 7590// Users should enable the Data Catalog API in the project identified by 7591// the `name` parameter (see [Data Catalog Resource Project] 7592// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 7593// for more information). 7594func (r *ProjectsLocationsTagTemplatesFieldsService) Delete(name string) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7595 c := &ProjectsLocationsTagTemplatesFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7596 c.name = name 7597 return c 7598} 7599 7600// Force sets the optional parameter "force": Required. Currently, this 7601// field must always be set to `true`. This confirms the deletion of 7602// this field from any tags using this field. `force = false` will be 7603// supported in the future. 7604func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Force(force bool) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7605 c.urlParams_.Set("force", fmt.Sprint(force)) 7606 return c 7607} 7608 7609// Fields allows partial responses to be retrieved. See 7610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7611// for more information. 7612func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7613 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7614 return c 7615} 7616 7617// Context sets the context to be used in this call's Do method. Any 7618// pending HTTP request will be aborted if the provided context is 7619// canceled. 7620func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsDeleteCall { 7621 c.ctx_ = ctx 7622 return c 7623} 7624 7625// Header returns an http.Header that can be modified by the caller to 7626// add HTTP headers to the request. 7627func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Header() http.Header { 7628 if c.header_ == nil { 7629 c.header_ = make(http.Header) 7630 } 7631 return c.header_ 7632} 7633 7634func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) doRequest(alt string) (*http.Response, error) { 7635 reqHeaders := make(http.Header) 7636 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7637 for k, v := range c.header_ { 7638 reqHeaders[k] = v 7639 } 7640 reqHeaders.Set("User-Agent", c.s.userAgent()) 7641 var body io.Reader = nil 7642 c.urlParams_.Set("alt", alt) 7643 c.urlParams_.Set("prettyPrint", "false") 7644 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7645 urls += "?" + c.urlParams_.Encode() 7646 req, err := http.NewRequest("DELETE", urls, body) 7647 if err != nil { 7648 return nil, err 7649 } 7650 req.Header = reqHeaders 7651 googleapi.Expand(req.URL, map[string]string{ 7652 "name": c.name, 7653 }) 7654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7655} 7656 7657// Do executes the "datacatalog.projects.locations.tagTemplates.fields.delete" call. 7658// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7659// code is an error. Response headers are in either 7660// *Empty.ServerResponse.Header or (if a response was returned at all) 7661// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7662// check whether the returned error was because http.StatusNotModified 7663// was returned. 7664func (c *ProjectsLocationsTagTemplatesFieldsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7665 gensupport.SetOptions(c.urlParams_, opts...) 7666 res, err := c.doRequest("json") 7667 if res != nil && res.StatusCode == http.StatusNotModified { 7668 if res.Body != nil { 7669 res.Body.Close() 7670 } 7671 return nil, &googleapi.Error{ 7672 Code: res.StatusCode, 7673 Header: res.Header, 7674 } 7675 } 7676 if err != nil { 7677 return nil, err 7678 } 7679 defer googleapi.CloseBody(res) 7680 if err := googleapi.CheckResponse(res); err != nil { 7681 return nil, err 7682 } 7683 ret := &Empty{ 7684 ServerResponse: googleapi.ServerResponse{ 7685 Header: res.Header, 7686 HTTPStatusCode: res.StatusCode, 7687 }, 7688 } 7689 target := &ret 7690 if err := gensupport.DecodeResponse(target, res); err != nil { 7691 return nil, err 7692 } 7693 return ret, nil 7694 // { 7695 // "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).", 7696 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}", 7697 // "httpMethod": "DELETE", 7698 // "id": "datacatalog.projects.locations.tagTemplates.fields.delete", 7699 // "parameterOrder": [ 7700 // "name" 7701 // ], 7702 // "parameters": { 7703 // "force": { 7704 // "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.", 7705 // "location": "query", 7706 // "type": "boolean" 7707 // }, 7708 // "name": { 7709 // "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}", 7710 // "location": "path", 7711 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 7712 // "required": true, 7713 // "type": "string" 7714 // } 7715 // }, 7716 // "path": "v1beta1/{+name}", 7717 // "response": { 7718 // "$ref": "Empty" 7719 // }, 7720 // "scopes": [ 7721 // "https://www.googleapis.com/auth/cloud-platform" 7722 // ] 7723 // } 7724 7725} 7726 7727// method id "datacatalog.projects.locations.tagTemplates.fields.patch": 7728 7729type ProjectsLocationsTagTemplatesFieldsPatchCall struct { 7730 s *Service 7731 name string 7732 googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField 7733 urlParams_ gensupport.URLParams 7734 ctx_ context.Context 7735 header_ http.Header 7736} 7737 7738// Patch: Updates a field in a tag template. This method cannot be used 7739// to update the field type. Users should enable the Data Catalog API in 7740// the project identified by the `name` parameter (see [Data Catalog 7741// Resource Project] 7742// (https://cloud.google.com/data-catalog/docs/concepts/resource-project) 7743// for more information). 7744func (r *ProjectsLocationsTagTemplatesFieldsService) Patch(name string, googleclouddatacatalogv1beta1tagtemplatefield *GoogleCloudDatacatalogV1beta1TagTemplateField) *ProjectsLocationsTagTemplatesFieldsPatchCall { 7745 c := &ProjectsLocationsTagTemplatesFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7746 c.name = name 7747 c.googleclouddatacatalogv1beta1tagtemplatefield = googleclouddatacatalogv1beta1tagtemplatefield 7748 return c 7749} 7750 7751// UpdateMask sets the optional parameter "updateMask": The field mask 7752// specifies the parts of the template to be updated. Allowed fields: * 7753// `display_name` * `type.enum_type` * `is_required` If `update_mask` is 7754// not set or empty, all of the allowed fields above will be updated. 7755// When updating an enum type, the provided values will be merged with 7756// the existing values. Therefore, enum values can only be added, 7757// existing enum values cannot be deleted nor renamed. Updating a 7758// template field from optional to required is NOT allowed. 7759func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTagTemplatesFieldsPatchCall { 7760 c.urlParams_.Set("updateMask", updateMask) 7761 return c 7762} 7763 7764// Fields allows partial responses to be retrieved. See 7765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7766// for more information. 7767func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsPatchCall { 7768 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7769 return c 7770} 7771 7772// Context sets the context to be used in this call's Do method. Any 7773// pending HTTP request will be aborted if the provided context is 7774// canceled. 7775func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsPatchCall { 7776 c.ctx_ = ctx 7777 return c 7778} 7779 7780// Header returns an http.Header that can be modified by the caller to 7781// add HTTP headers to the request. 7782func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Header() http.Header { 7783 if c.header_ == nil { 7784 c.header_ = make(http.Header) 7785 } 7786 return c.header_ 7787} 7788 7789func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) doRequest(alt string) (*http.Response, error) { 7790 reqHeaders := make(http.Header) 7791 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7792 for k, v := range c.header_ { 7793 reqHeaders[k] = v 7794 } 7795 reqHeaders.Set("User-Agent", c.s.userAgent()) 7796 var body io.Reader = nil 7797 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1tagtemplatefield) 7798 if err != nil { 7799 return nil, err 7800 } 7801 reqHeaders.Set("Content-Type", "application/json") 7802 c.urlParams_.Set("alt", alt) 7803 c.urlParams_.Set("prettyPrint", "false") 7804 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 7805 urls += "?" + c.urlParams_.Encode() 7806 req, err := http.NewRequest("PATCH", urls, body) 7807 if err != nil { 7808 return nil, err 7809 } 7810 req.Header = reqHeaders 7811 googleapi.Expand(req.URL, map[string]string{ 7812 "name": c.name, 7813 }) 7814 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7815} 7816 7817// Do executes the "datacatalog.projects.locations.tagTemplates.fields.patch" call. 7818// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 7819// error will be non-nil. Any non-2xx status code is an error. Response 7820// headers are in either 7821// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 7822// or (if a response was returned at all) in 7823// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7824// whether the returned error was because http.StatusNotModified was 7825// returned. 7826func (c *ProjectsLocationsTagTemplatesFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 7827 gensupport.SetOptions(c.urlParams_, opts...) 7828 res, err := c.doRequest("json") 7829 if res != nil && res.StatusCode == http.StatusNotModified { 7830 if res.Body != nil { 7831 res.Body.Close() 7832 } 7833 return nil, &googleapi.Error{ 7834 Code: res.StatusCode, 7835 Header: res.Header, 7836 } 7837 } 7838 if err != nil { 7839 return nil, err 7840 } 7841 defer googleapi.CloseBody(res) 7842 if err := googleapi.CheckResponse(res); err != nil { 7843 return nil, err 7844 } 7845 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 7846 ServerResponse: googleapi.ServerResponse{ 7847 Header: res.Header, 7848 HTTPStatusCode: res.StatusCode, 7849 }, 7850 } 7851 target := &ret 7852 if err := gensupport.DecodeResponse(target, res); err != nil { 7853 return nil, err 7854 } 7855 return ret, nil 7856 // { 7857 // "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).", 7858 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}", 7859 // "httpMethod": "PATCH", 7860 // "id": "datacatalog.projects.locations.tagTemplates.fields.patch", 7861 // "parameterOrder": [ 7862 // "name" 7863 // ], 7864 // "parameters": { 7865 // "name": { 7866 // "description": "Required. The name of the tag template field. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}", 7867 // "location": "path", 7868 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 7869 // "required": true, 7870 // "type": "string" 7871 // }, 7872 // "updateMask": { 7873 // "description": "Optional. The field mask specifies the parts of the template to be updated. Allowed fields: * `display_name` * `type.enum_type` * `is_required` If `update_mask` is not set or empty, all of the allowed fields above will be updated. When updating an enum type, the provided values will be merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed.", 7874 // "format": "google-fieldmask", 7875 // "location": "query", 7876 // "type": "string" 7877 // } 7878 // }, 7879 // "path": "v1beta1/{+name}", 7880 // "request": { 7881 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7882 // }, 7883 // "response": { 7884 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 7885 // }, 7886 // "scopes": [ 7887 // "https://www.googleapis.com/auth/cloud-platform" 7888 // ] 7889 // } 7890 7891} 7892 7893// method id "datacatalog.projects.locations.tagTemplates.fields.rename": 7894 7895type ProjectsLocationsTagTemplatesFieldsRenameCall struct { 7896 s *Service 7897 name string 7898 googleclouddatacatalogv1beta1renametagtemplatefieldrequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest 7899 urlParams_ gensupport.URLParams 7900 ctx_ context.Context 7901 header_ http.Header 7902} 7903 7904// Rename: Renames a field in a tag template. The user should enable the 7905// Data Catalog API in the project identified by the `name` parameter 7906// (see [Data Catalog Resource 7907// Project](https://cloud.google.com/data-catalog/docs/concepts/resource- 7908// project) for more information). 7909func (r *ProjectsLocationsTagTemplatesFieldsService) Rename(name string, googleclouddatacatalogv1beta1renametagtemplatefieldrequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest) *ProjectsLocationsTagTemplatesFieldsRenameCall { 7910 c := &ProjectsLocationsTagTemplatesFieldsRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7911 c.name = name 7912 c.googleclouddatacatalogv1beta1renametagtemplatefieldrequest = googleclouddatacatalogv1beta1renametagtemplatefieldrequest 7913 return c 7914} 7915 7916// Fields allows partial responses to be retrieved. See 7917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7918// for more information. 7919func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsRenameCall { 7920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7921 return c 7922} 7923 7924// Context sets the context to be used in this call's Do method. Any 7925// pending HTTP request will be aborted if the provided context is 7926// canceled. 7927func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsRenameCall { 7928 c.ctx_ = ctx 7929 return c 7930} 7931 7932// Header returns an http.Header that can be modified by the caller to 7933// add HTTP headers to the request. 7934func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Header() http.Header { 7935 if c.header_ == nil { 7936 c.header_ = make(http.Header) 7937 } 7938 return c.header_ 7939} 7940 7941func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) doRequest(alt string) (*http.Response, error) { 7942 reqHeaders := make(http.Header) 7943 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 7944 for k, v := range c.header_ { 7945 reqHeaders[k] = v 7946 } 7947 reqHeaders.Set("User-Agent", c.s.userAgent()) 7948 var body io.Reader = nil 7949 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1renametagtemplatefieldrequest) 7950 if err != nil { 7951 return nil, err 7952 } 7953 reqHeaders.Set("Content-Type", "application/json") 7954 c.urlParams_.Set("alt", alt) 7955 c.urlParams_.Set("prettyPrint", "false") 7956 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rename") 7957 urls += "?" + c.urlParams_.Encode() 7958 req, err := http.NewRequest("POST", urls, body) 7959 if err != nil { 7960 return nil, err 7961 } 7962 req.Header = reqHeaders 7963 googleapi.Expand(req.URL, map[string]string{ 7964 "name": c.name, 7965 }) 7966 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7967} 7968 7969// Do executes the "datacatalog.projects.locations.tagTemplates.fields.rename" call. 7970// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 7971// error will be non-nil. Any non-2xx status code is an error. Response 7972// headers are in either 7973// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 7974// or (if a response was returned at all) in 7975// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7976// whether the returned error was because http.StatusNotModified was 7977// returned. 7978func (c *ProjectsLocationsTagTemplatesFieldsRenameCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 7979 gensupport.SetOptions(c.urlParams_, opts...) 7980 res, err := c.doRequest("json") 7981 if res != nil && res.StatusCode == http.StatusNotModified { 7982 if res.Body != nil { 7983 res.Body.Close() 7984 } 7985 return nil, &googleapi.Error{ 7986 Code: res.StatusCode, 7987 Header: res.Header, 7988 } 7989 } 7990 if err != nil { 7991 return nil, err 7992 } 7993 defer googleapi.CloseBody(res) 7994 if err := googleapi.CheckResponse(res); err != nil { 7995 return nil, err 7996 } 7997 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 7998 ServerResponse: googleapi.ServerResponse{ 7999 Header: res.Header, 8000 HTTPStatusCode: res.StatusCode, 8001 }, 8002 } 8003 target := &ret 8004 if err := gensupport.DecodeResponse(target, res); err != nil { 8005 return nil, err 8006 } 8007 return ret, nil 8008 // { 8009 // "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).", 8010 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}:rename", 8011 // "httpMethod": "POST", 8012 // "id": "datacatalog.projects.locations.tagTemplates.fields.rename", 8013 // "parameterOrder": [ 8014 // "name" 8015 // ], 8016 // "parameters": { 8017 // "name": { 8018 // "description": "Required. The name of the tag template. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}", 8019 // "location": "path", 8020 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+$", 8021 // "required": true, 8022 // "type": "string" 8023 // } 8024 // }, 8025 // "path": "v1beta1/{+name}:rename", 8026 // "request": { 8027 // "$ref": "GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest" 8028 // }, 8029 // "response": { 8030 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8031 // }, 8032 // "scopes": [ 8033 // "https://www.googleapis.com/auth/cloud-platform" 8034 // ] 8035 // } 8036 8037} 8038 8039// method id "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename": 8040 8041type ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall struct { 8042 s *Service 8043 name string 8044 googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest 8045 urlParams_ gensupport.URLParams 8046 ctx_ context.Context 8047 header_ http.Header 8048} 8049 8050// Rename: Renames an enum value in a tag template. The enum values have 8051// to be unique within one enum field. Thus, an enum value cannot be 8052// renamed with a name used in any other enum value within the same enum 8053// field. 8054func (r *ProjectsLocationsTagTemplatesFieldsEnumValuesService) Rename(name string, googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest *GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8055 c := &ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8056 c.name = name 8057 c.googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest = googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest 8058 return c 8059} 8060 8061// Fields allows partial responses to be retrieved. See 8062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8063// for more information. 8064func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8066 return c 8067} 8068 8069// Context sets the context to be used in this call's Do method. Any 8070// pending HTTP request will be aborted if the provided context is 8071// canceled. 8072func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Context(ctx context.Context) *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall { 8073 c.ctx_ = ctx 8074 return c 8075} 8076 8077// Header returns an http.Header that can be modified by the caller to 8078// add HTTP headers to the request. 8079func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Header() http.Header { 8080 if c.header_ == nil { 8081 c.header_ = make(http.Header) 8082 } 8083 return c.header_ 8084} 8085 8086func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) doRequest(alt string) (*http.Response, error) { 8087 reqHeaders := make(http.Header) 8088 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8089 for k, v := range c.header_ { 8090 reqHeaders[k] = v 8091 } 8092 reqHeaders.Set("User-Agent", c.s.userAgent()) 8093 var body io.Reader = nil 8094 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1renametagtemplatefieldenumvaluerequest) 8095 if err != nil { 8096 return nil, err 8097 } 8098 reqHeaders.Set("Content-Type", "application/json") 8099 c.urlParams_.Set("alt", alt) 8100 c.urlParams_.Set("prettyPrint", "false") 8101 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rename") 8102 urls += "?" + c.urlParams_.Encode() 8103 req, err := http.NewRequest("POST", urls, body) 8104 if err != nil { 8105 return nil, err 8106 } 8107 req.Header = reqHeaders 8108 googleapi.Expand(req.URL, map[string]string{ 8109 "name": c.name, 8110 }) 8111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8112} 8113 8114// Do executes the "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename" call. 8115// Exactly one of *GoogleCloudDatacatalogV1beta1TagTemplateField or 8116// error will be non-nil. Any non-2xx status code is an error. Response 8117// headers are in either 8118// *GoogleCloudDatacatalogV1beta1TagTemplateField.ServerResponse.Header 8119// or (if a response was returned at all) in 8120// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8121// whether the returned error was because http.StatusNotModified was 8122// returned. 8123func (c *ProjectsLocationsTagTemplatesFieldsEnumValuesRenameCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1TagTemplateField, error) { 8124 gensupport.SetOptions(c.urlParams_, opts...) 8125 res, err := c.doRequest("json") 8126 if res != nil && res.StatusCode == http.StatusNotModified { 8127 if res.Body != nil { 8128 res.Body.Close() 8129 } 8130 return nil, &googleapi.Error{ 8131 Code: res.StatusCode, 8132 Header: res.Header, 8133 } 8134 } 8135 if err != nil { 8136 return nil, err 8137 } 8138 defer googleapi.CloseBody(res) 8139 if err := googleapi.CheckResponse(res); err != nil { 8140 return nil, err 8141 } 8142 ret := &GoogleCloudDatacatalogV1beta1TagTemplateField{ 8143 ServerResponse: googleapi.ServerResponse{ 8144 Header: res.Header, 8145 HTTPStatusCode: res.StatusCode, 8146 }, 8147 } 8148 target := &ret 8149 if err := gensupport.DecodeResponse(target, res); err != nil { 8150 return nil, err 8151 } 8152 return ret, nil 8153 // { 8154 // "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.", 8155 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tagTemplates/{tagTemplatesId}/fields/{fieldsId}/enumValues/{enumValuesId}:rename", 8156 // "httpMethod": "POST", 8157 // "id": "datacatalog.projects.locations.tagTemplates.fields.enumValues.rename", 8158 // "parameterOrder": [ 8159 // "name" 8160 // ], 8161 // "parameters": { 8162 // "name": { 8163 // "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}", 8164 // "location": "path", 8165 // "pattern": "^projects/[^/]+/locations/[^/]+/tagTemplates/[^/]+/fields/[^/]+/enumValues/[^/]+$", 8166 // "required": true, 8167 // "type": "string" 8168 // } 8169 // }, 8170 // "path": "v1beta1/{+name}:rename", 8171 // "request": { 8172 // "$ref": "GoogleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest" 8173 // }, 8174 // "response": { 8175 // "$ref": "GoogleCloudDatacatalogV1beta1TagTemplateField" 8176 // }, 8177 // "scopes": [ 8178 // "https://www.googleapis.com/auth/cloud-platform" 8179 // ] 8180 // } 8181 8182} 8183 8184// method id "datacatalog.projects.locations.taxonomies.create": 8185 8186type ProjectsLocationsTaxonomiesCreateCall struct { 8187 s *Service 8188 parent string 8189 googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy 8190 urlParams_ gensupport.URLParams 8191 ctx_ context.Context 8192 header_ http.Header 8193} 8194 8195// Create: Creates a taxonomy in the specified project. 8196func (r *ProjectsLocationsTaxonomiesService) Create(parent string, googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy) *ProjectsLocationsTaxonomiesCreateCall { 8197 c := &ProjectsLocationsTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8198 c.parent = parent 8199 c.googleclouddatacatalogv1beta1taxonomy = googleclouddatacatalogv1beta1taxonomy 8200 return c 8201} 8202 8203// Fields allows partial responses to be retrieved. See 8204// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8205// for more information. 8206func (c *ProjectsLocationsTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesCreateCall { 8207 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8208 return c 8209} 8210 8211// Context sets the context to be used in this call's Do method. Any 8212// pending HTTP request will be aborted if the provided context is 8213// canceled. 8214func (c *ProjectsLocationsTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesCreateCall { 8215 c.ctx_ = ctx 8216 return c 8217} 8218 8219// Header returns an http.Header that can be modified by the caller to 8220// add HTTP headers to the request. 8221func (c *ProjectsLocationsTaxonomiesCreateCall) Header() http.Header { 8222 if c.header_ == nil { 8223 c.header_ = make(http.Header) 8224 } 8225 return c.header_ 8226} 8227 8228func (c *ProjectsLocationsTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { 8229 reqHeaders := make(http.Header) 8230 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8231 for k, v := range c.header_ { 8232 reqHeaders[k] = v 8233 } 8234 reqHeaders.Set("User-Agent", c.s.userAgent()) 8235 var body io.Reader = nil 8236 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1taxonomy) 8237 if err != nil { 8238 return nil, err 8239 } 8240 reqHeaders.Set("Content-Type", "application/json") 8241 c.urlParams_.Set("alt", alt) 8242 c.urlParams_.Set("prettyPrint", "false") 8243 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies") 8244 urls += "?" + c.urlParams_.Encode() 8245 req, err := http.NewRequest("POST", urls, body) 8246 if err != nil { 8247 return nil, err 8248 } 8249 req.Header = reqHeaders 8250 googleapi.Expand(req.URL, map[string]string{ 8251 "parent": c.parent, 8252 }) 8253 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8254} 8255 8256// Do executes the "datacatalog.projects.locations.taxonomies.create" call. 8257// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 8258// be non-nil. Any non-2xx status code is an error. Response headers are 8259// in either 8260// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 8261// response was returned at all) in error.(*googleapi.Error).Header. Use 8262// googleapi.IsNotModified to check whether the returned error was 8263// because http.StatusNotModified was returned. 8264func (c *ProjectsLocationsTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 8265 gensupport.SetOptions(c.urlParams_, opts...) 8266 res, err := c.doRequest("json") 8267 if res != nil && res.StatusCode == http.StatusNotModified { 8268 if res.Body != nil { 8269 res.Body.Close() 8270 } 8271 return nil, &googleapi.Error{ 8272 Code: res.StatusCode, 8273 Header: res.Header, 8274 } 8275 } 8276 if err != nil { 8277 return nil, err 8278 } 8279 defer googleapi.CloseBody(res) 8280 if err := googleapi.CheckResponse(res); err != nil { 8281 return nil, err 8282 } 8283 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 8284 ServerResponse: googleapi.ServerResponse{ 8285 Header: res.Header, 8286 HTTPStatusCode: res.StatusCode, 8287 }, 8288 } 8289 target := &ret 8290 if err := gensupport.DecodeResponse(target, res); err != nil { 8291 return nil, err 8292 } 8293 return ret, nil 8294 // { 8295 // "description": "Creates a taxonomy in the specified project.", 8296 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies", 8297 // "httpMethod": "POST", 8298 // "id": "datacatalog.projects.locations.taxonomies.create", 8299 // "parameterOrder": [ 8300 // "parent" 8301 // ], 8302 // "parameters": { 8303 // "parent": { 8304 // "description": "Required. Resource name of the project that the taxonomy will belong to.", 8305 // "location": "path", 8306 // "pattern": "^projects/[^/]+/locations/[^/]+$", 8307 // "required": true, 8308 // "type": "string" 8309 // } 8310 // }, 8311 // "path": "v1beta1/{+parent}/taxonomies", 8312 // "request": { 8313 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 8314 // }, 8315 // "response": { 8316 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 8317 // }, 8318 // "scopes": [ 8319 // "https://www.googleapis.com/auth/cloud-platform" 8320 // ] 8321 // } 8322 8323} 8324 8325// method id "datacatalog.projects.locations.taxonomies.delete": 8326 8327type ProjectsLocationsTaxonomiesDeleteCall struct { 8328 s *Service 8329 name string 8330 urlParams_ gensupport.URLParams 8331 ctx_ context.Context 8332 header_ http.Header 8333} 8334 8335// Delete: Deletes a taxonomy. This operation will also delete all 8336// policy tags in this taxonomy along with their associated policies. 8337func (r *ProjectsLocationsTaxonomiesService) Delete(name string) *ProjectsLocationsTaxonomiesDeleteCall { 8338 c := &ProjectsLocationsTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8339 c.name = name 8340 return c 8341} 8342 8343// Fields allows partial responses to be retrieved. See 8344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8345// for more information. 8346func (c *ProjectsLocationsTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesDeleteCall { 8347 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8348 return c 8349} 8350 8351// Context sets the context to be used in this call's Do method. Any 8352// pending HTTP request will be aborted if the provided context is 8353// canceled. 8354func (c *ProjectsLocationsTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesDeleteCall { 8355 c.ctx_ = ctx 8356 return c 8357} 8358 8359// Header returns an http.Header that can be modified by the caller to 8360// add HTTP headers to the request. 8361func (c *ProjectsLocationsTaxonomiesDeleteCall) Header() http.Header { 8362 if c.header_ == nil { 8363 c.header_ = make(http.Header) 8364 } 8365 return c.header_ 8366} 8367 8368func (c *ProjectsLocationsTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { 8369 reqHeaders := make(http.Header) 8370 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8371 for k, v := range c.header_ { 8372 reqHeaders[k] = v 8373 } 8374 reqHeaders.Set("User-Agent", c.s.userAgent()) 8375 var body io.Reader = nil 8376 c.urlParams_.Set("alt", alt) 8377 c.urlParams_.Set("prettyPrint", "false") 8378 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8379 urls += "?" + c.urlParams_.Encode() 8380 req, err := http.NewRequest("DELETE", urls, body) 8381 if err != nil { 8382 return nil, err 8383 } 8384 req.Header = reqHeaders 8385 googleapi.Expand(req.URL, map[string]string{ 8386 "name": c.name, 8387 }) 8388 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8389} 8390 8391// Do executes the "datacatalog.projects.locations.taxonomies.delete" call. 8392// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8393// code is an error. Response headers are in either 8394// *Empty.ServerResponse.Header or (if a response was returned at all) 8395// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8396// check whether the returned error was because http.StatusNotModified 8397// was returned. 8398func (c *ProjectsLocationsTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8399 gensupport.SetOptions(c.urlParams_, opts...) 8400 res, err := c.doRequest("json") 8401 if res != nil && res.StatusCode == http.StatusNotModified { 8402 if res.Body != nil { 8403 res.Body.Close() 8404 } 8405 return nil, &googleapi.Error{ 8406 Code: res.StatusCode, 8407 Header: res.Header, 8408 } 8409 } 8410 if err != nil { 8411 return nil, err 8412 } 8413 defer googleapi.CloseBody(res) 8414 if err := googleapi.CheckResponse(res); err != nil { 8415 return nil, err 8416 } 8417 ret := &Empty{ 8418 ServerResponse: googleapi.ServerResponse{ 8419 Header: res.Header, 8420 HTTPStatusCode: res.StatusCode, 8421 }, 8422 } 8423 target := &ret 8424 if err := gensupport.DecodeResponse(target, res); err != nil { 8425 return nil, err 8426 } 8427 return ret, nil 8428 // { 8429 // "description": "Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with their associated policies.", 8430 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 8431 // "httpMethod": "DELETE", 8432 // "id": "datacatalog.projects.locations.taxonomies.delete", 8433 // "parameterOrder": [ 8434 // "name" 8435 // ], 8436 // "parameters": { 8437 // "name": { 8438 // "description": "Required. Resource name of the taxonomy to be deleted. All policy tags in this taxonomy will also be deleted.", 8439 // "location": "path", 8440 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 8441 // "required": true, 8442 // "type": "string" 8443 // } 8444 // }, 8445 // "path": "v1beta1/{+name}", 8446 // "response": { 8447 // "$ref": "Empty" 8448 // }, 8449 // "scopes": [ 8450 // "https://www.googleapis.com/auth/cloud-platform" 8451 // ] 8452 // } 8453 8454} 8455 8456// method id "datacatalog.projects.locations.taxonomies.export": 8457 8458type ProjectsLocationsTaxonomiesExportCall struct { 8459 s *Service 8460 parent string 8461 urlParams_ gensupport.URLParams 8462 ifNoneMatch_ string 8463 ctx_ context.Context 8464 header_ http.Header 8465} 8466 8467// Export: Exports all taxonomies and their policy tags in a project. 8468// This method generates SerializedTaxonomy protos with nested policy 8469// tags that can be used as an input for future ImportTaxonomies calls. 8470func (r *ProjectsLocationsTaxonomiesService) Export(parent string) *ProjectsLocationsTaxonomiesExportCall { 8471 c := &ProjectsLocationsTaxonomiesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8472 c.parent = parent 8473 return c 8474} 8475 8476// SerializedTaxonomies sets the optional parameter 8477// "serializedTaxonomies": Export taxonomies as serialized taxonomies. 8478func (c *ProjectsLocationsTaxonomiesExportCall) SerializedTaxonomies(serializedTaxonomies bool) *ProjectsLocationsTaxonomiesExportCall { 8479 c.urlParams_.Set("serializedTaxonomies", fmt.Sprint(serializedTaxonomies)) 8480 return c 8481} 8482 8483// Taxonomies sets the optional parameter "taxonomies": Required. 8484// Resource names of the taxonomies to be exported. 8485func (c *ProjectsLocationsTaxonomiesExportCall) Taxonomies(taxonomies ...string) *ProjectsLocationsTaxonomiesExportCall { 8486 c.urlParams_.SetMulti("taxonomies", append([]string{}, taxonomies...)) 8487 return c 8488} 8489 8490// Fields allows partial responses to be retrieved. See 8491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8492// for more information. 8493func (c *ProjectsLocationsTaxonomiesExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesExportCall { 8494 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8495 return c 8496} 8497 8498// IfNoneMatch sets the optional parameter which makes the operation 8499// fail if the object's ETag matches the given value. This is useful for 8500// getting updates only after the object has changed since the last 8501// request. Use googleapi.IsNotModified to check whether the response 8502// error from Do is the result of In-None-Match. 8503func (c *ProjectsLocationsTaxonomiesExportCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesExportCall { 8504 c.ifNoneMatch_ = entityTag 8505 return c 8506} 8507 8508// Context sets the context to be used in this call's Do method. Any 8509// pending HTTP request will be aborted if the provided context is 8510// canceled. 8511func (c *ProjectsLocationsTaxonomiesExportCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesExportCall { 8512 c.ctx_ = ctx 8513 return c 8514} 8515 8516// Header returns an http.Header that can be modified by the caller to 8517// add HTTP headers to the request. 8518func (c *ProjectsLocationsTaxonomiesExportCall) Header() http.Header { 8519 if c.header_ == nil { 8520 c.header_ = make(http.Header) 8521 } 8522 return c.header_ 8523} 8524 8525func (c *ProjectsLocationsTaxonomiesExportCall) doRequest(alt string) (*http.Response, error) { 8526 reqHeaders := make(http.Header) 8527 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8528 for k, v := range c.header_ { 8529 reqHeaders[k] = v 8530 } 8531 reqHeaders.Set("User-Agent", c.s.userAgent()) 8532 if c.ifNoneMatch_ != "" { 8533 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8534 } 8535 var body io.Reader = nil 8536 c.urlParams_.Set("alt", alt) 8537 c.urlParams_.Set("prettyPrint", "false") 8538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies:export") 8539 urls += "?" + c.urlParams_.Encode() 8540 req, err := http.NewRequest("GET", urls, body) 8541 if err != nil { 8542 return nil, err 8543 } 8544 req.Header = reqHeaders 8545 googleapi.Expand(req.URL, map[string]string{ 8546 "parent": c.parent, 8547 }) 8548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8549} 8550 8551// Do executes the "datacatalog.projects.locations.taxonomies.export" call. 8552// Exactly one of *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse 8553// or error will be non-nil. Any non-2xx status code is an error. 8554// Response headers are in either 8555// *GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse.ServerResponse. 8556// Header or (if a response was returned at all) in 8557// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8558// whether the returned error was because http.StatusNotModified was 8559// returned. 8560func (c *ProjectsLocationsTaxonomiesExportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse, error) { 8561 gensupport.SetOptions(c.urlParams_, opts...) 8562 res, err := c.doRequest("json") 8563 if res != nil && res.StatusCode == http.StatusNotModified { 8564 if res.Body != nil { 8565 res.Body.Close() 8566 } 8567 return nil, &googleapi.Error{ 8568 Code: res.StatusCode, 8569 Header: res.Header, 8570 } 8571 } 8572 if err != nil { 8573 return nil, err 8574 } 8575 defer googleapi.CloseBody(res) 8576 if err := googleapi.CheckResponse(res); err != nil { 8577 return nil, err 8578 } 8579 ret := &GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse{ 8580 ServerResponse: googleapi.ServerResponse{ 8581 Header: res.Header, 8582 HTTPStatusCode: res.StatusCode, 8583 }, 8584 } 8585 target := &ret 8586 if err := gensupport.DecodeResponse(target, res); err != nil { 8587 return nil, err 8588 } 8589 return ret, nil 8590 // { 8591 // "description": "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.", 8592 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies:export", 8593 // "httpMethod": "GET", 8594 // "id": "datacatalog.projects.locations.taxonomies.export", 8595 // "parameterOrder": [ 8596 // "parent" 8597 // ], 8598 // "parameters": { 8599 // "parent": { 8600 // "description": "Required. Resource name of the project that taxonomies to be exported will share.", 8601 // "location": "path", 8602 // "pattern": "^projects/[^/]+/locations/[^/]+$", 8603 // "required": true, 8604 // "type": "string" 8605 // }, 8606 // "serializedTaxonomies": { 8607 // "description": "Export taxonomies as serialized taxonomies.", 8608 // "location": "query", 8609 // "type": "boolean" 8610 // }, 8611 // "taxonomies": { 8612 // "description": "Required. Resource names of the taxonomies to be exported.", 8613 // "location": "query", 8614 // "repeated": true, 8615 // "type": "string" 8616 // } 8617 // }, 8618 // "path": "v1beta1/{+parent}/taxonomies:export", 8619 // "response": { 8620 // "$ref": "GoogleCloudDatacatalogV1beta1ExportTaxonomiesResponse" 8621 // }, 8622 // "scopes": [ 8623 // "https://www.googleapis.com/auth/cloud-platform" 8624 // ] 8625 // } 8626 8627} 8628 8629// method id "datacatalog.projects.locations.taxonomies.get": 8630 8631type ProjectsLocationsTaxonomiesGetCall struct { 8632 s *Service 8633 name string 8634 urlParams_ gensupport.URLParams 8635 ifNoneMatch_ string 8636 ctx_ context.Context 8637 header_ http.Header 8638} 8639 8640// Get: Gets a taxonomy. 8641func (r *ProjectsLocationsTaxonomiesService) Get(name string) *ProjectsLocationsTaxonomiesGetCall { 8642 c := &ProjectsLocationsTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8643 c.name = name 8644 return c 8645} 8646 8647// Fields allows partial responses to be retrieved. See 8648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8649// for more information. 8650func (c *ProjectsLocationsTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesGetCall { 8651 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8652 return c 8653} 8654 8655// IfNoneMatch sets the optional parameter which makes the operation 8656// fail if the object's ETag matches the given value. This is useful for 8657// getting updates only after the object has changed since the last 8658// request. Use googleapi.IsNotModified to check whether the response 8659// error from Do is the result of In-None-Match. 8660func (c *ProjectsLocationsTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesGetCall { 8661 c.ifNoneMatch_ = entityTag 8662 return c 8663} 8664 8665// Context sets the context to be used in this call's Do method. Any 8666// pending HTTP request will be aborted if the provided context is 8667// canceled. 8668func (c *ProjectsLocationsTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesGetCall { 8669 c.ctx_ = ctx 8670 return c 8671} 8672 8673// Header returns an http.Header that can be modified by the caller to 8674// add HTTP headers to the request. 8675func (c *ProjectsLocationsTaxonomiesGetCall) Header() http.Header { 8676 if c.header_ == nil { 8677 c.header_ = make(http.Header) 8678 } 8679 return c.header_ 8680} 8681 8682func (c *ProjectsLocationsTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { 8683 reqHeaders := make(http.Header) 8684 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8685 for k, v := range c.header_ { 8686 reqHeaders[k] = v 8687 } 8688 reqHeaders.Set("User-Agent", c.s.userAgent()) 8689 if c.ifNoneMatch_ != "" { 8690 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8691 } 8692 var body io.Reader = nil 8693 c.urlParams_.Set("alt", alt) 8694 c.urlParams_.Set("prettyPrint", "false") 8695 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 8696 urls += "?" + c.urlParams_.Encode() 8697 req, err := http.NewRequest("GET", urls, body) 8698 if err != nil { 8699 return nil, err 8700 } 8701 req.Header = reqHeaders 8702 googleapi.Expand(req.URL, map[string]string{ 8703 "name": c.name, 8704 }) 8705 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8706} 8707 8708// Do executes the "datacatalog.projects.locations.taxonomies.get" call. 8709// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 8710// be non-nil. Any non-2xx status code is an error. Response headers are 8711// in either 8712// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 8713// response was returned at all) in error.(*googleapi.Error).Header. Use 8714// googleapi.IsNotModified to check whether the returned error was 8715// because http.StatusNotModified was returned. 8716func (c *ProjectsLocationsTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 8717 gensupport.SetOptions(c.urlParams_, opts...) 8718 res, err := c.doRequest("json") 8719 if res != nil && res.StatusCode == http.StatusNotModified { 8720 if res.Body != nil { 8721 res.Body.Close() 8722 } 8723 return nil, &googleapi.Error{ 8724 Code: res.StatusCode, 8725 Header: res.Header, 8726 } 8727 } 8728 if err != nil { 8729 return nil, err 8730 } 8731 defer googleapi.CloseBody(res) 8732 if err := googleapi.CheckResponse(res); err != nil { 8733 return nil, err 8734 } 8735 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 8736 ServerResponse: googleapi.ServerResponse{ 8737 Header: res.Header, 8738 HTTPStatusCode: res.StatusCode, 8739 }, 8740 } 8741 target := &ret 8742 if err := gensupport.DecodeResponse(target, res); err != nil { 8743 return nil, err 8744 } 8745 return ret, nil 8746 // { 8747 // "description": "Gets a taxonomy.", 8748 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 8749 // "httpMethod": "GET", 8750 // "id": "datacatalog.projects.locations.taxonomies.get", 8751 // "parameterOrder": [ 8752 // "name" 8753 // ], 8754 // "parameters": { 8755 // "name": { 8756 // "description": "Required. Resource name of the requested taxonomy.", 8757 // "location": "path", 8758 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 8759 // "required": true, 8760 // "type": "string" 8761 // } 8762 // }, 8763 // "path": "v1beta1/{+name}", 8764 // "response": { 8765 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 8766 // }, 8767 // "scopes": [ 8768 // "https://www.googleapis.com/auth/cloud-platform" 8769 // ] 8770 // } 8771 8772} 8773 8774// method id "datacatalog.projects.locations.taxonomies.getIamPolicy": 8775 8776type ProjectsLocationsTaxonomiesGetIamPolicyCall struct { 8777 s *Service 8778 resource string 8779 getiampolicyrequest *GetIamPolicyRequest 8780 urlParams_ gensupport.URLParams 8781 ctx_ context.Context 8782 header_ http.Header 8783} 8784 8785// GetIamPolicy: Gets the IAM policy for a taxonomy or a policy tag. 8786func (r *ProjectsLocationsTaxonomiesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 8787 c := &ProjectsLocationsTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8788 c.resource = resource 8789 c.getiampolicyrequest = getiampolicyrequest 8790 return c 8791} 8792 8793// Fields allows partial responses to be retrieved. See 8794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8795// for more information. 8796func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 8797 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8798 return c 8799} 8800 8801// Context sets the context to be used in this call's Do method. Any 8802// pending HTTP request will be aborted if the provided context is 8803// canceled. 8804func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesGetIamPolicyCall { 8805 c.ctx_ = ctx 8806 return c 8807} 8808 8809// Header returns an http.Header that can be modified by the caller to 8810// add HTTP headers to the request. 8811func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Header() http.Header { 8812 if c.header_ == nil { 8813 c.header_ = make(http.Header) 8814 } 8815 return c.header_ 8816} 8817 8818func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8819 reqHeaders := make(http.Header) 8820 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8821 for k, v := range c.header_ { 8822 reqHeaders[k] = v 8823 } 8824 reqHeaders.Set("User-Agent", c.s.userAgent()) 8825 var body io.Reader = nil 8826 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 8827 if err != nil { 8828 return nil, err 8829 } 8830 reqHeaders.Set("Content-Type", "application/json") 8831 c.urlParams_.Set("alt", alt) 8832 c.urlParams_.Set("prettyPrint", "false") 8833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 8834 urls += "?" + c.urlParams_.Encode() 8835 req, err := http.NewRequest("POST", urls, body) 8836 if err != nil { 8837 return nil, err 8838 } 8839 req.Header = reqHeaders 8840 googleapi.Expand(req.URL, map[string]string{ 8841 "resource": c.resource, 8842 }) 8843 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8844} 8845 8846// Do executes the "datacatalog.projects.locations.taxonomies.getIamPolicy" call. 8847// Exactly one of *Policy or error will be non-nil. Any non-2xx status 8848// code is an error. Response headers are in either 8849// *Policy.ServerResponse.Header or (if a response was returned at all) 8850// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8851// check whether the returned error was because http.StatusNotModified 8852// was returned. 8853func (c *ProjectsLocationsTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8854 gensupport.SetOptions(c.urlParams_, opts...) 8855 res, err := c.doRequest("json") 8856 if res != nil && res.StatusCode == http.StatusNotModified { 8857 if res.Body != nil { 8858 res.Body.Close() 8859 } 8860 return nil, &googleapi.Error{ 8861 Code: res.StatusCode, 8862 Header: res.Header, 8863 } 8864 } 8865 if err != nil { 8866 return nil, err 8867 } 8868 defer googleapi.CloseBody(res) 8869 if err := googleapi.CheckResponse(res); err != nil { 8870 return nil, err 8871 } 8872 ret := &Policy{ 8873 ServerResponse: googleapi.ServerResponse{ 8874 Header: res.Header, 8875 HTTPStatusCode: res.StatusCode, 8876 }, 8877 } 8878 target := &ret 8879 if err := gensupport.DecodeResponse(target, res); err != nil { 8880 return nil, err 8881 } 8882 return ret, nil 8883 // { 8884 // "description": "Gets the IAM policy for a taxonomy or a policy tag.", 8885 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:getIamPolicy", 8886 // "httpMethod": "POST", 8887 // "id": "datacatalog.projects.locations.taxonomies.getIamPolicy", 8888 // "parameterOrder": [ 8889 // "resource" 8890 // ], 8891 // "parameters": { 8892 // "resource": { 8893 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 8894 // "location": "path", 8895 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 8896 // "required": true, 8897 // "type": "string" 8898 // } 8899 // }, 8900 // "path": "v1beta1/{+resource}:getIamPolicy", 8901 // "request": { 8902 // "$ref": "GetIamPolicyRequest" 8903 // }, 8904 // "response": { 8905 // "$ref": "Policy" 8906 // }, 8907 // "scopes": [ 8908 // "https://www.googleapis.com/auth/cloud-platform" 8909 // ] 8910 // } 8911 8912} 8913 8914// method id "datacatalog.projects.locations.taxonomies.import": 8915 8916type ProjectsLocationsTaxonomiesImportCall struct { 8917 s *Service 8918 parent string 8919 googleclouddatacatalogv1beta1importtaxonomiesrequest *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest 8920 urlParams_ gensupport.URLParams 8921 ctx_ context.Context 8922 header_ http.Header 8923} 8924 8925// Import: Imports all taxonomies and their policy tags to a project as 8926// new taxonomies. This method provides a bulk taxonomy / policy tag 8927// creation using nested proto structure. 8928func (r *ProjectsLocationsTaxonomiesService) Import(parent string, googleclouddatacatalogv1beta1importtaxonomiesrequest *GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest) *ProjectsLocationsTaxonomiesImportCall { 8929 c := &ProjectsLocationsTaxonomiesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8930 c.parent = parent 8931 c.googleclouddatacatalogv1beta1importtaxonomiesrequest = googleclouddatacatalogv1beta1importtaxonomiesrequest 8932 return c 8933} 8934 8935// Fields allows partial responses to be retrieved. See 8936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8937// for more information. 8938func (c *ProjectsLocationsTaxonomiesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesImportCall { 8939 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8940 return c 8941} 8942 8943// Context sets the context to be used in this call's Do method. Any 8944// pending HTTP request will be aborted if the provided context is 8945// canceled. 8946func (c *ProjectsLocationsTaxonomiesImportCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesImportCall { 8947 c.ctx_ = ctx 8948 return c 8949} 8950 8951// Header returns an http.Header that can be modified by the caller to 8952// add HTTP headers to the request. 8953func (c *ProjectsLocationsTaxonomiesImportCall) Header() http.Header { 8954 if c.header_ == nil { 8955 c.header_ = make(http.Header) 8956 } 8957 return c.header_ 8958} 8959 8960func (c *ProjectsLocationsTaxonomiesImportCall) doRequest(alt string) (*http.Response, error) { 8961 reqHeaders := make(http.Header) 8962 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 8963 for k, v := range c.header_ { 8964 reqHeaders[k] = v 8965 } 8966 reqHeaders.Set("User-Agent", c.s.userAgent()) 8967 var body io.Reader = nil 8968 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1importtaxonomiesrequest) 8969 if err != nil { 8970 return nil, err 8971 } 8972 reqHeaders.Set("Content-Type", "application/json") 8973 c.urlParams_.Set("alt", alt) 8974 c.urlParams_.Set("prettyPrint", "false") 8975 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies:import") 8976 urls += "?" + c.urlParams_.Encode() 8977 req, err := http.NewRequest("POST", urls, body) 8978 if err != nil { 8979 return nil, err 8980 } 8981 req.Header = reqHeaders 8982 googleapi.Expand(req.URL, map[string]string{ 8983 "parent": c.parent, 8984 }) 8985 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8986} 8987 8988// Do executes the "datacatalog.projects.locations.taxonomies.import" call. 8989// Exactly one of *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse 8990// or error will be non-nil. Any non-2xx status code is an error. 8991// Response headers are in either 8992// *GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse.ServerResponse. 8993// Header or (if a response was returned at all) in 8994// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8995// whether the returned error was because http.StatusNotModified was 8996// returned. 8997func (c *ProjectsLocationsTaxonomiesImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse, error) { 8998 gensupport.SetOptions(c.urlParams_, opts...) 8999 res, err := c.doRequest("json") 9000 if res != nil && res.StatusCode == http.StatusNotModified { 9001 if res.Body != nil { 9002 res.Body.Close() 9003 } 9004 return nil, &googleapi.Error{ 9005 Code: res.StatusCode, 9006 Header: res.Header, 9007 } 9008 } 9009 if err != nil { 9010 return nil, err 9011 } 9012 defer googleapi.CloseBody(res) 9013 if err := googleapi.CheckResponse(res); err != nil { 9014 return nil, err 9015 } 9016 ret := &GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse{ 9017 ServerResponse: googleapi.ServerResponse{ 9018 Header: res.Header, 9019 HTTPStatusCode: res.StatusCode, 9020 }, 9021 } 9022 target := &ret 9023 if err := gensupport.DecodeResponse(target, res); err != nil { 9024 return nil, err 9025 } 9026 return ret, nil 9027 // { 9028 // "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.", 9029 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies:import", 9030 // "httpMethod": "POST", 9031 // "id": "datacatalog.projects.locations.taxonomies.import", 9032 // "parameterOrder": [ 9033 // "parent" 9034 // ], 9035 // "parameters": { 9036 // "parent": { 9037 // "description": "Required. Resource name of project that the imported taxonomies will belong to.", 9038 // "location": "path", 9039 // "pattern": "^projects/[^/]+/locations/[^/]+$", 9040 // "required": true, 9041 // "type": "string" 9042 // } 9043 // }, 9044 // "path": "v1beta1/{+parent}/taxonomies:import", 9045 // "request": { 9046 // "$ref": "GoogleCloudDatacatalogV1beta1ImportTaxonomiesRequest" 9047 // }, 9048 // "response": { 9049 // "$ref": "GoogleCloudDatacatalogV1beta1ImportTaxonomiesResponse" 9050 // }, 9051 // "scopes": [ 9052 // "https://www.googleapis.com/auth/cloud-platform" 9053 // ] 9054 // } 9055 9056} 9057 9058// method id "datacatalog.projects.locations.taxonomies.list": 9059 9060type ProjectsLocationsTaxonomiesListCall struct { 9061 s *Service 9062 parent string 9063 urlParams_ gensupport.URLParams 9064 ifNoneMatch_ string 9065 ctx_ context.Context 9066 header_ http.Header 9067} 9068 9069// List: Lists all taxonomies in a project in a particular location that 9070// the caller has permission to view. 9071func (r *ProjectsLocationsTaxonomiesService) List(parent string) *ProjectsLocationsTaxonomiesListCall { 9072 c := &ProjectsLocationsTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9073 c.parent = parent 9074 return c 9075} 9076 9077// PageSize sets the optional parameter "pageSize": The maximum number 9078// of items to return. Must be a value between 1 and 1000. If not set, 9079// defaults to 50. 9080func (c *ProjectsLocationsTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsTaxonomiesListCall { 9081 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9082 return c 9083} 9084 9085// PageToken sets the optional parameter "pageToken": The 9086// next_page_token value returned from a previous list request, if any. 9087// If not set, defaults to an empty string. 9088func (c *ProjectsLocationsTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsTaxonomiesListCall { 9089 c.urlParams_.Set("pageToken", pageToken) 9090 return c 9091} 9092 9093// Fields allows partial responses to be retrieved. See 9094// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9095// for more information. 9096func (c *ProjectsLocationsTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesListCall { 9097 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9098 return c 9099} 9100 9101// IfNoneMatch sets the optional parameter which makes the operation 9102// fail if the object's ETag matches the given value. This is useful for 9103// getting updates only after the object has changed since the last 9104// request. Use googleapi.IsNotModified to check whether the response 9105// error from Do is the result of In-None-Match. 9106func (c *ProjectsLocationsTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesListCall { 9107 c.ifNoneMatch_ = entityTag 9108 return c 9109} 9110 9111// Context sets the context to be used in this call's Do method. Any 9112// pending HTTP request will be aborted if the provided context is 9113// canceled. 9114func (c *ProjectsLocationsTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesListCall { 9115 c.ctx_ = ctx 9116 return c 9117} 9118 9119// Header returns an http.Header that can be modified by the caller to 9120// add HTTP headers to the request. 9121func (c *ProjectsLocationsTaxonomiesListCall) Header() http.Header { 9122 if c.header_ == nil { 9123 c.header_ = make(http.Header) 9124 } 9125 return c.header_ 9126} 9127 9128func (c *ProjectsLocationsTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { 9129 reqHeaders := make(http.Header) 9130 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9131 for k, v := range c.header_ { 9132 reqHeaders[k] = v 9133 } 9134 reqHeaders.Set("User-Agent", c.s.userAgent()) 9135 if c.ifNoneMatch_ != "" { 9136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9137 } 9138 var body io.Reader = nil 9139 c.urlParams_.Set("alt", alt) 9140 c.urlParams_.Set("prettyPrint", "false") 9141 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/taxonomies") 9142 urls += "?" + c.urlParams_.Encode() 9143 req, err := http.NewRequest("GET", urls, body) 9144 if err != nil { 9145 return nil, err 9146 } 9147 req.Header = reqHeaders 9148 googleapi.Expand(req.URL, map[string]string{ 9149 "parent": c.parent, 9150 }) 9151 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9152} 9153 9154// Do executes the "datacatalog.projects.locations.taxonomies.list" call. 9155// Exactly one of *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse 9156// or error will be non-nil. Any non-2xx status code is an error. 9157// Response headers are in either 9158// *GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse.ServerResponse.He 9159// ader or (if a response was returned at all) in 9160// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9161// whether the returned error was because http.StatusNotModified was 9162// returned. 9163func (c *ProjectsLocationsTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse, error) { 9164 gensupport.SetOptions(c.urlParams_, opts...) 9165 res, err := c.doRequest("json") 9166 if res != nil && res.StatusCode == http.StatusNotModified { 9167 if res.Body != nil { 9168 res.Body.Close() 9169 } 9170 return nil, &googleapi.Error{ 9171 Code: res.StatusCode, 9172 Header: res.Header, 9173 } 9174 } 9175 if err != nil { 9176 return nil, err 9177 } 9178 defer googleapi.CloseBody(res) 9179 if err := googleapi.CheckResponse(res); err != nil { 9180 return nil, err 9181 } 9182 ret := &GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse{ 9183 ServerResponse: googleapi.ServerResponse{ 9184 Header: res.Header, 9185 HTTPStatusCode: res.StatusCode, 9186 }, 9187 } 9188 target := &ret 9189 if err := gensupport.DecodeResponse(target, res); err != nil { 9190 return nil, err 9191 } 9192 return ret, nil 9193 // { 9194 // "description": "Lists all taxonomies in a project in a particular location that the caller has permission to view.", 9195 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies", 9196 // "httpMethod": "GET", 9197 // "id": "datacatalog.projects.locations.taxonomies.list", 9198 // "parameterOrder": [ 9199 // "parent" 9200 // ], 9201 // "parameters": { 9202 // "pageSize": { 9203 // "description": "The maximum number of items to return. Must be a value between 1 and 1000. If not set, defaults to 50.", 9204 // "format": "int32", 9205 // "location": "query", 9206 // "type": "integer" 9207 // }, 9208 // "pageToken": { 9209 // "description": "The next_page_token value returned from a previous list request, if any. If not set, defaults to an empty string.", 9210 // "location": "query", 9211 // "type": "string" 9212 // }, 9213 // "parent": { 9214 // "description": "Required. Resource name of the project to list the taxonomies of.", 9215 // "location": "path", 9216 // "pattern": "^projects/[^/]+/locations/[^/]+$", 9217 // "required": true, 9218 // "type": "string" 9219 // } 9220 // }, 9221 // "path": "v1beta1/{+parent}/taxonomies", 9222 // "response": { 9223 // "$ref": "GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse" 9224 // }, 9225 // "scopes": [ 9226 // "https://www.googleapis.com/auth/cloud-platform" 9227 // ] 9228 // } 9229 9230} 9231 9232// Pages invokes f for each page of results. 9233// A non-nil error returned from f will halt the iteration. 9234// The provided context supersedes any context provided to the Context method. 9235func (c *ProjectsLocationsTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListTaxonomiesResponse) error) error { 9236 c.ctx_ = ctx 9237 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9238 for { 9239 x, err := c.Do() 9240 if err != nil { 9241 return err 9242 } 9243 if err := f(x); err != nil { 9244 return err 9245 } 9246 if x.NextPageToken == "" { 9247 return nil 9248 } 9249 c.PageToken(x.NextPageToken) 9250 } 9251} 9252 9253// method id "datacatalog.projects.locations.taxonomies.patch": 9254 9255type ProjectsLocationsTaxonomiesPatchCall struct { 9256 s *Service 9257 name string 9258 googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy 9259 urlParams_ gensupport.URLParams 9260 ctx_ context.Context 9261 header_ http.Header 9262} 9263 9264// Patch: Updates a taxonomy. 9265func (r *ProjectsLocationsTaxonomiesService) Patch(name string, googleclouddatacatalogv1beta1taxonomy *GoogleCloudDatacatalogV1beta1Taxonomy) *ProjectsLocationsTaxonomiesPatchCall { 9266 c := &ProjectsLocationsTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9267 c.name = name 9268 c.googleclouddatacatalogv1beta1taxonomy = googleclouddatacatalogv1beta1taxonomy 9269 return c 9270} 9271 9272// UpdateMask sets the optional parameter "updateMask": The update mask 9273// applies to the resource. For the `FieldMask` definition, see 9274// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to 9275// update. 9276func (c *ProjectsLocationsTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTaxonomiesPatchCall { 9277 c.urlParams_.Set("updateMask", updateMask) 9278 return c 9279} 9280 9281// Fields allows partial responses to be retrieved. See 9282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9283// for more information. 9284func (c *ProjectsLocationsTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPatchCall { 9285 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9286 return c 9287} 9288 9289// Context sets the context to be used in this call's Do method. Any 9290// pending HTTP request will be aborted if the provided context is 9291// canceled. 9292func (c *ProjectsLocationsTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPatchCall { 9293 c.ctx_ = ctx 9294 return c 9295} 9296 9297// Header returns an http.Header that can be modified by the caller to 9298// add HTTP headers to the request. 9299func (c *ProjectsLocationsTaxonomiesPatchCall) Header() http.Header { 9300 if c.header_ == nil { 9301 c.header_ = make(http.Header) 9302 } 9303 return c.header_ 9304} 9305 9306func (c *ProjectsLocationsTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { 9307 reqHeaders := make(http.Header) 9308 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9309 for k, v := range c.header_ { 9310 reqHeaders[k] = v 9311 } 9312 reqHeaders.Set("User-Agent", c.s.userAgent()) 9313 var body io.Reader = nil 9314 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1taxonomy) 9315 if err != nil { 9316 return nil, err 9317 } 9318 reqHeaders.Set("Content-Type", "application/json") 9319 c.urlParams_.Set("alt", alt) 9320 c.urlParams_.Set("prettyPrint", "false") 9321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9322 urls += "?" + c.urlParams_.Encode() 9323 req, err := http.NewRequest("PATCH", urls, body) 9324 if err != nil { 9325 return nil, err 9326 } 9327 req.Header = reqHeaders 9328 googleapi.Expand(req.URL, map[string]string{ 9329 "name": c.name, 9330 }) 9331 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9332} 9333 9334// Do executes the "datacatalog.projects.locations.taxonomies.patch" call. 9335// Exactly one of *GoogleCloudDatacatalogV1beta1Taxonomy or error will 9336// be non-nil. Any non-2xx status code is an error. Response headers are 9337// in either 9338// *GoogleCloudDatacatalogV1beta1Taxonomy.ServerResponse.Header or (if a 9339// response was returned at all) in error.(*googleapi.Error).Header. Use 9340// googleapi.IsNotModified to check whether the returned error was 9341// because http.StatusNotModified was returned. 9342func (c *ProjectsLocationsTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1Taxonomy, error) { 9343 gensupport.SetOptions(c.urlParams_, opts...) 9344 res, err := c.doRequest("json") 9345 if res != nil && res.StatusCode == http.StatusNotModified { 9346 if res.Body != nil { 9347 res.Body.Close() 9348 } 9349 return nil, &googleapi.Error{ 9350 Code: res.StatusCode, 9351 Header: res.Header, 9352 } 9353 } 9354 if err != nil { 9355 return nil, err 9356 } 9357 defer googleapi.CloseBody(res) 9358 if err := googleapi.CheckResponse(res); err != nil { 9359 return nil, err 9360 } 9361 ret := &GoogleCloudDatacatalogV1beta1Taxonomy{ 9362 ServerResponse: googleapi.ServerResponse{ 9363 Header: res.Header, 9364 HTTPStatusCode: res.StatusCode, 9365 }, 9366 } 9367 target := &ret 9368 if err := gensupport.DecodeResponse(target, res); err != nil { 9369 return nil, err 9370 } 9371 return ret, nil 9372 // { 9373 // "description": "Updates a taxonomy.", 9374 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}", 9375 // "httpMethod": "PATCH", 9376 // "id": "datacatalog.projects.locations.taxonomies.patch", 9377 // "parameterOrder": [ 9378 // "name" 9379 // ], 9380 // "parameters": { 9381 // "name": { 9382 // "description": "Output only. Resource name of this taxonomy, whose format is: \"projects/{project_number}/locations/{location_id}/taxonomies/{id}\".", 9383 // "location": "path", 9384 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9385 // "required": true, 9386 // "type": "string" 9387 // }, 9388 // "updateMask": { 9389 // "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.", 9390 // "format": "google-fieldmask", 9391 // "location": "query", 9392 // "type": "string" 9393 // } 9394 // }, 9395 // "path": "v1beta1/{+name}", 9396 // "request": { 9397 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 9398 // }, 9399 // "response": { 9400 // "$ref": "GoogleCloudDatacatalogV1beta1Taxonomy" 9401 // }, 9402 // "scopes": [ 9403 // "https://www.googleapis.com/auth/cloud-platform" 9404 // ] 9405 // } 9406 9407} 9408 9409// method id "datacatalog.projects.locations.taxonomies.setIamPolicy": 9410 9411type ProjectsLocationsTaxonomiesSetIamPolicyCall struct { 9412 s *Service 9413 resource string 9414 setiampolicyrequest *SetIamPolicyRequest 9415 urlParams_ gensupport.URLParams 9416 ctx_ context.Context 9417 header_ http.Header 9418} 9419 9420// SetIamPolicy: Sets the IAM policy for a taxonomy or a policy tag. 9421func (r *ProjectsLocationsTaxonomiesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9422 c := &ProjectsLocationsTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9423 c.resource = resource 9424 c.setiampolicyrequest = setiampolicyrequest 9425 return c 9426} 9427 9428// Fields allows partial responses to be retrieved. See 9429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9430// for more information. 9431func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9432 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9433 return c 9434} 9435 9436// Context sets the context to be used in this call's Do method. Any 9437// pending HTTP request will be aborted if the provided context is 9438// canceled. 9439func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesSetIamPolicyCall { 9440 c.ctx_ = ctx 9441 return c 9442} 9443 9444// Header returns an http.Header that can be modified by the caller to 9445// add HTTP headers to the request. 9446func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Header() http.Header { 9447 if c.header_ == nil { 9448 c.header_ = make(http.Header) 9449 } 9450 return c.header_ 9451} 9452 9453func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9454 reqHeaders := make(http.Header) 9455 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9456 for k, v := range c.header_ { 9457 reqHeaders[k] = v 9458 } 9459 reqHeaders.Set("User-Agent", c.s.userAgent()) 9460 var body io.Reader = nil 9461 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9462 if err != nil { 9463 return nil, err 9464 } 9465 reqHeaders.Set("Content-Type", "application/json") 9466 c.urlParams_.Set("alt", alt) 9467 c.urlParams_.Set("prettyPrint", "false") 9468 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 9469 urls += "?" + c.urlParams_.Encode() 9470 req, err := http.NewRequest("POST", urls, body) 9471 if err != nil { 9472 return nil, err 9473 } 9474 req.Header = reqHeaders 9475 googleapi.Expand(req.URL, map[string]string{ 9476 "resource": c.resource, 9477 }) 9478 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9479} 9480 9481// Do executes the "datacatalog.projects.locations.taxonomies.setIamPolicy" call. 9482// Exactly one of *Policy or error will be non-nil. Any non-2xx status 9483// code is an error. Response headers are in either 9484// *Policy.ServerResponse.Header or (if a response was returned at all) 9485// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9486// check whether the returned error was because http.StatusNotModified 9487// was returned. 9488func (c *ProjectsLocationsTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9489 gensupport.SetOptions(c.urlParams_, opts...) 9490 res, err := c.doRequest("json") 9491 if res != nil && res.StatusCode == http.StatusNotModified { 9492 if res.Body != nil { 9493 res.Body.Close() 9494 } 9495 return nil, &googleapi.Error{ 9496 Code: res.StatusCode, 9497 Header: res.Header, 9498 } 9499 } 9500 if err != nil { 9501 return nil, err 9502 } 9503 defer googleapi.CloseBody(res) 9504 if err := googleapi.CheckResponse(res); err != nil { 9505 return nil, err 9506 } 9507 ret := &Policy{ 9508 ServerResponse: googleapi.ServerResponse{ 9509 Header: res.Header, 9510 HTTPStatusCode: res.StatusCode, 9511 }, 9512 } 9513 target := &ret 9514 if err := gensupport.DecodeResponse(target, res); err != nil { 9515 return nil, err 9516 } 9517 return ret, nil 9518 // { 9519 // "description": "Sets the IAM policy for a taxonomy or a policy tag.", 9520 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:setIamPolicy", 9521 // "httpMethod": "POST", 9522 // "id": "datacatalog.projects.locations.taxonomies.setIamPolicy", 9523 // "parameterOrder": [ 9524 // "resource" 9525 // ], 9526 // "parameters": { 9527 // "resource": { 9528 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 9529 // "location": "path", 9530 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9531 // "required": true, 9532 // "type": "string" 9533 // } 9534 // }, 9535 // "path": "v1beta1/{+resource}:setIamPolicy", 9536 // "request": { 9537 // "$ref": "SetIamPolicyRequest" 9538 // }, 9539 // "response": { 9540 // "$ref": "Policy" 9541 // }, 9542 // "scopes": [ 9543 // "https://www.googleapis.com/auth/cloud-platform" 9544 // ] 9545 // } 9546 9547} 9548 9549// method id "datacatalog.projects.locations.taxonomies.testIamPermissions": 9550 9551type ProjectsLocationsTaxonomiesTestIamPermissionsCall struct { 9552 s *Service 9553 resource string 9554 testiampermissionsrequest *TestIamPermissionsRequest 9555 urlParams_ gensupport.URLParams 9556 ctx_ context.Context 9557 header_ http.Header 9558} 9559 9560// TestIamPermissions: Returns the permissions that a caller has on the 9561// specified taxonomy or policy tag. 9562func (r *ProjectsLocationsTaxonomiesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9563 c := &ProjectsLocationsTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9564 c.resource = resource 9565 c.testiampermissionsrequest = testiampermissionsrequest 9566 return c 9567} 9568 9569// Fields allows partial responses to be retrieved. See 9570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9571// for more information. 9572func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9573 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9574 return c 9575} 9576 9577// Context sets the context to be used in this call's Do method. Any 9578// pending HTTP request will be aborted if the provided context is 9579// canceled. 9580func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesTestIamPermissionsCall { 9581 c.ctx_ = ctx 9582 return c 9583} 9584 9585// Header returns an http.Header that can be modified by the caller to 9586// add HTTP headers to the request. 9587func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Header() http.Header { 9588 if c.header_ == nil { 9589 c.header_ = make(http.Header) 9590 } 9591 return c.header_ 9592} 9593 9594func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9595 reqHeaders := make(http.Header) 9596 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9597 for k, v := range c.header_ { 9598 reqHeaders[k] = v 9599 } 9600 reqHeaders.Set("User-Agent", c.s.userAgent()) 9601 var body io.Reader = nil 9602 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9603 if err != nil { 9604 return nil, err 9605 } 9606 reqHeaders.Set("Content-Type", "application/json") 9607 c.urlParams_.Set("alt", alt) 9608 c.urlParams_.Set("prettyPrint", "false") 9609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 9610 urls += "?" + c.urlParams_.Encode() 9611 req, err := http.NewRequest("POST", urls, body) 9612 if err != nil { 9613 return nil, err 9614 } 9615 req.Header = reqHeaders 9616 googleapi.Expand(req.URL, map[string]string{ 9617 "resource": c.resource, 9618 }) 9619 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9620} 9621 9622// Do executes the "datacatalog.projects.locations.taxonomies.testIamPermissions" call. 9623// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 9624// Any non-2xx status code is an error. Response headers are in either 9625// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 9626// was returned at all) in error.(*googleapi.Error).Header. Use 9627// googleapi.IsNotModified to check whether the returned error was 9628// because http.StatusNotModified was returned. 9629func (c *ProjectsLocationsTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9630 gensupport.SetOptions(c.urlParams_, opts...) 9631 res, err := c.doRequest("json") 9632 if res != nil && res.StatusCode == http.StatusNotModified { 9633 if res.Body != nil { 9634 res.Body.Close() 9635 } 9636 return nil, &googleapi.Error{ 9637 Code: res.StatusCode, 9638 Header: res.Header, 9639 } 9640 } 9641 if err != nil { 9642 return nil, err 9643 } 9644 defer googleapi.CloseBody(res) 9645 if err := googleapi.CheckResponse(res); err != nil { 9646 return nil, err 9647 } 9648 ret := &TestIamPermissionsResponse{ 9649 ServerResponse: googleapi.ServerResponse{ 9650 Header: res.Header, 9651 HTTPStatusCode: res.StatusCode, 9652 }, 9653 } 9654 target := &ret 9655 if err := gensupport.DecodeResponse(target, res); err != nil { 9656 return nil, err 9657 } 9658 return ret, nil 9659 // { 9660 // "description": "Returns the permissions that a caller has on the specified taxonomy or policy tag.", 9661 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}:testIamPermissions", 9662 // "httpMethod": "POST", 9663 // "id": "datacatalog.projects.locations.taxonomies.testIamPermissions", 9664 // "parameterOrder": [ 9665 // "resource" 9666 // ], 9667 // "parameters": { 9668 // "resource": { 9669 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 9670 // "location": "path", 9671 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9672 // "required": true, 9673 // "type": "string" 9674 // } 9675 // }, 9676 // "path": "v1beta1/{+resource}:testIamPermissions", 9677 // "request": { 9678 // "$ref": "TestIamPermissionsRequest" 9679 // }, 9680 // "response": { 9681 // "$ref": "TestIamPermissionsResponse" 9682 // }, 9683 // "scopes": [ 9684 // "https://www.googleapis.com/auth/cloud-platform" 9685 // ] 9686 // } 9687 9688} 9689 9690// method id "datacatalog.projects.locations.taxonomies.policyTags.create": 9691 9692type ProjectsLocationsTaxonomiesPolicyTagsCreateCall struct { 9693 s *Service 9694 parent string 9695 googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag 9696 urlParams_ gensupport.URLParams 9697 ctx_ context.Context 9698 header_ http.Header 9699} 9700 9701// Create: Creates a policy tag in the specified taxonomy. 9702func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Create(parent string, googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 9703 c := &ProjectsLocationsTaxonomiesPolicyTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9704 c.parent = parent 9705 c.googleclouddatacatalogv1beta1policytag = googleclouddatacatalogv1beta1policytag 9706 return c 9707} 9708 9709// Fields allows partial responses to be retrieved. See 9710// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9711// for more information. 9712func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 9713 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9714 return c 9715} 9716 9717// Context sets the context to be used in this call's Do method. Any 9718// pending HTTP request will be aborted if the provided context is 9719// canceled. 9720func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsCreateCall { 9721 c.ctx_ = ctx 9722 return c 9723} 9724 9725// Header returns an http.Header that can be modified by the caller to 9726// add HTTP headers to the request. 9727func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Header() http.Header { 9728 if c.header_ == nil { 9729 c.header_ = make(http.Header) 9730 } 9731 return c.header_ 9732} 9733 9734func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) doRequest(alt string) (*http.Response, error) { 9735 reqHeaders := make(http.Header) 9736 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9737 for k, v := range c.header_ { 9738 reqHeaders[k] = v 9739 } 9740 reqHeaders.Set("User-Agent", c.s.userAgent()) 9741 var body io.Reader = nil 9742 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1policytag) 9743 if err != nil { 9744 return nil, err 9745 } 9746 reqHeaders.Set("Content-Type", "application/json") 9747 c.urlParams_.Set("alt", alt) 9748 c.urlParams_.Set("prettyPrint", "false") 9749 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/policyTags") 9750 urls += "?" + c.urlParams_.Encode() 9751 req, err := http.NewRequest("POST", urls, body) 9752 if err != nil { 9753 return nil, err 9754 } 9755 req.Header = reqHeaders 9756 googleapi.Expand(req.URL, map[string]string{ 9757 "parent": c.parent, 9758 }) 9759 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9760} 9761 9762// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.create" call. 9763// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 9764// be non-nil. Any non-2xx status code is an error. Response headers are 9765// in either 9766// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 9767// a response was returned at all) in error.(*googleapi.Error).Header. 9768// Use googleapi.IsNotModified to check whether the returned error was 9769// because http.StatusNotModified was returned. 9770func (c *ProjectsLocationsTaxonomiesPolicyTagsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 9771 gensupport.SetOptions(c.urlParams_, opts...) 9772 res, err := c.doRequest("json") 9773 if res != nil && res.StatusCode == http.StatusNotModified { 9774 if res.Body != nil { 9775 res.Body.Close() 9776 } 9777 return nil, &googleapi.Error{ 9778 Code: res.StatusCode, 9779 Header: res.Header, 9780 } 9781 } 9782 if err != nil { 9783 return nil, err 9784 } 9785 defer googleapi.CloseBody(res) 9786 if err := googleapi.CheckResponse(res); err != nil { 9787 return nil, err 9788 } 9789 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 9790 ServerResponse: googleapi.ServerResponse{ 9791 Header: res.Header, 9792 HTTPStatusCode: res.StatusCode, 9793 }, 9794 } 9795 target := &ret 9796 if err := gensupport.DecodeResponse(target, res); err != nil { 9797 return nil, err 9798 } 9799 return ret, nil 9800 // { 9801 // "description": "Creates a policy tag in the specified taxonomy.", 9802 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags", 9803 // "httpMethod": "POST", 9804 // "id": "datacatalog.projects.locations.taxonomies.policyTags.create", 9805 // "parameterOrder": [ 9806 // "parent" 9807 // ], 9808 // "parameters": { 9809 // "parent": { 9810 // "description": "Required. Resource name of the taxonomy that the policy tag will belong to.", 9811 // "location": "path", 9812 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 9813 // "required": true, 9814 // "type": "string" 9815 // } 9816 // }, 9817 // "path": "v1beta1/{+parent}/policyTags", 9818 // "request": { 9819 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 9820 // }, 9821 // "response": { 9822 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 9823 // }, 9824 // "scopes": [ 9825 // "https://www.googleapis.com/auth/cloud-platform" 9826 // ] 9827 // } 9828 9829} 9830 9831// method id "datacatalog.projects.locations.taxonomies.policyTags.delete": 9832 9833type ProjectsLocationsTaxonomiesPolicyTagsDeleteCall struct { 9834 s *Service 9835 name string 9836 urlParams_ gensupport.URLParams 9837 ctx_ context.Context 9838 header_ http.Header 9839} 9840 9841// Delete: Deletes a policy tag. Also deletes all of its descendant 9842// policy tags. 9843func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Delete(name string) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 9844 c := &ProjectsLocationsTaxonomiesPolicyTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9845 c.name = name 9846 return c 9847} 9848 9849// Fields allows partial responses to be retrieved. See 9850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9851// for more information. 9852func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 9853 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9854 return c 9855} 9856 9857// Context sets the context to be used in this call's Do method. Any 9858// pending HTTP request will be aborted if the provided context is 9859// canceled. 9860func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall { 9861 c.ctx_ = ctx 9862 return c 9863} 9864 9865// Header returns an http.Header that can be modified by the caller to 9866// add HTTP headers to the request. 9867func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Header() http.Header { 9868 if c.header_ == nil { 9869 c.header_ = make(http.Header) 9870 } 9871 return c.header_ 9872} 9873 9874func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) doRequest(alt string) (*http.Response, error) { 9875 reqHeaders := make(http.Header) 9876 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 9877 for k, v := range c.header_ { 9878 reqHeaders[k] = v 9879 } 9880 reqHeaders.Set("User-Agent", c.s.userAgent()) 9881 var body io.Reader = nil 9882 c.urlParams_.Set("alt", alt) 9883 c.urlParams_.Set("prettyPrint", "false") 9884 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 9885 urls += "?" + c.urlParams_.Encode() 9886 req, err := http.NewRequest("DELETE", urls, body) 9887 if err != nil { 9888 return nil, err 9889 } 9890 req.Header = reqHeaders 9891 googleapi.Expand(req.URL, map[string]string{ 9892 "name": c.name, 9893 }) 9894 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9895} 9896 9897// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.delete" call. 9898// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9899// code is an error. Response headers are in either 9900// *Empty.ServerResponse.Header or (if a response was returned at all) 9901// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9902// check whether the returned error was because http.StatusNotModified 9903// was returned. 9904func (c *ProjectsLocationsTaxonomiesPolicyTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9905 gensupport.SetOptions(c.urlParams_, opts...) 9906 res, err := c.doRequest("json") 9907 if res != nil && res.StatusCode == http.StatusNotModified { 9908 if res.Body != nil { 9909 res.Body.Close() 9910 } 9911 return nil, &googleapi.Error{ 9912 Code: res.StatusCode, 9913 Header: res.Header, 9914 } 9915 } 9916 if err != nil { 9917 return nil, err 9918 } 9919 defer googleapi.CloseBody(res) 9920 if err := googleapi.CheckResponse(res); err != nil { 9921 return nil, err 9922 } 9923 ret := &Empty{ 9924 ServerResponse: googleapi.ServerResponse{ 9925 Header: res.Header, 9926 HTTPStatusCode: res.StatusCode, 9927 }, 9928 } 9929 target := &ret 9930 if err := gensupport.DecodeResponse(target, res); err != nil { 9931 return nil, err 9932 } 9933 return ret, nil 9934 // { 9935 // "description": "Deletes a policy tag. Also deletes all of its descendant policy tags.", 9936 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 9937 // "httpMethod": "DELETE", 9938 // "id": "datacatalog.projects.locations.taxonomies.policyTags.delete", 9939 // "parameterOrder": [ 9940 // "name" 9941 // ], 9942 // "parameters": { 9943 // "name": { 9944 // "description": "Required. Resource name of the policy tag to be deleted. All of its descendant policy tags will also be deleted.", 9945 // "location": "path", 9946 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 9947 // "required": true, 9948 // "type": "string" 9949 // } 9950 // }, 9951 // "path": "v1beta1/{+name}", 9952 // "response": { 9953 // "$ref": "Empty" 9954 // }, 9955 // "scopes": [ 9956 // "https://www.googleapis.com/auth/cloud-platform" 9957 // ] 9958 // } 9959 9960} 9961 9962// method id "datacatalog.projects.locations.taxonomies.policyTags.get": 9963 9964type ProjectsLocationsTaxonomiesPolicyTagsGetCall struct { 9965 s *Service 9966 name string 9967 urlParams_ gensupport.URLParams 9968 ifNoneMatch_ string 9969 ctx_ context.Context 9970 header_ http.Header 9971} 9972 9973// Get: Gets a policy tag. 9974func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Get(name string) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 9975 c := &ProjectsLocationsTaxonomiesPolicyTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9976 c.name = name 9977 return c 9978} 9979 9980// Fields allows partial responses to be retrieved. See 9981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9982// for more information. 9983func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 9984 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9985 return c 9986} 9987 9988// IfNoneMatch sets the optional parameter which makes the operation 9989// fail if the object's ETag matches the given value. This is useful for 9990// getting updates only after the object has changed since the last 9991// request. Use googleapi.IsNotModified to check whether the response 9992// error from Do is the result of In-None-Match. 9993func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 9994 c.ifNoneMatch_ = entityTag 9995 return c 9996} 9997 9998// Context sets the context to be used in this call's Do method. Any 9999// pending HTTP request will be aborted if the provided context is 10000// canceled. 10001func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsGetCall { 10002 c.ctx_ = ctx 10003 return c 10004} 10005 10006// Header returns an http.Header that can be modified by the caller to 10007// add HTTP headers to the request. 10008func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Header() http.Header { 10009 if c.header_ == nil { 10010 c.header_ = make(http.Header) 10011 } 10012 return c.header_ 10013} 10014 10015func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) doRequest(alt string) (*http.Response, error) { 10016 reqHeaders := make(http.Header) 10017 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10018 for k, v := range c.header_ { 10019 reqHeaders[k] = v 10020 } 10021 reqHeaders.Set("User-Agent", c.s.userAgent()) 10022 if c.ifNoneMatch_ != "" { 10023 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10024 } 10025 var body io.Reader = nil 10026 c.urlParams_.Set("alt", alt) 10027 c.urlParams_.Set("prettyPrint", "false") 10028 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10029 urls += "?" + c.urlParams_.Encode() 10030 req, err := http.NewRequest("GET", urls, body) 10031 if err != nil { 10032 return nil, err 10033 } 10034 req.Header = reqHeaders 10035 googleapi.Expand(req.URL, map[string]string{ 10036 "name": c.name, 10037 }) 10038 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10039} 10040 10041// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.get" call. 10042// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 10043// be non-nil. Any non-2xx status code is an error. Response headers are 10044// in either 10045// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 10046// a response was returned at all) in error.(*googleapi.Error).Header. 10047// Use googleapi.IsNotModified to check whether the returned error was 10048// because http.StatusNotModified was returned. 10049func (c *ProjectsLocationsTaxonomiesPolicyTagsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 10050 gensupport.SetOptions(c.urlParams_, opts...) 10051 res, err := c.doRequest("json") 10052 if res != nil && res.StatusCode == http.StatusNotModified { 10053 if res.Body != nil { 10054 res.Body.Close() 10055 } 10056 return nil, &googleapi.Error{ 10057 Code: res.StatusCode, 10058 Header: res.Header, 10059 } 10060 } 10061 if err != nil { 10062 return nil, err 10063 } 10064 defer googleapi.CloseBody(res) 10065 if err := googleapi.CheckResponse(res); err != nil { 10066 return nil, err 10067 } 10068 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 10069 ServerResponse: googleapi.ServerResponse{ 10070 Header: res.Header, 10071 HTTPStatusCode: res.StatusCode, 10072 }, 10073 } 10074 target := &ret 10075 if err := gensupport.DecodeResponse(target, res); err != nil { 10076 return nil, err 10077 } 10078 return ret, nil 10079 // { 10080 // "description": "Gets a policy tag.", 10081 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 10082 // "httpMethod": "GET", 10083 // "id": "datacatalog.projects.locations.taxonomies.policyTags.get", 10084 // "parameterOrder": [ 10085 // "name" 10086 // ], 10087 // "parameters": { 10088 // "name": { 10089 // "description": "Required. Resource name of the requested policy tag.", 10090 // "location": "path", 10091 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10092 // "required": true, 10093 // "type": "string" 10094 // } 10095 // }, 10096 // "path": "v1beta1/{+name}", 10097 // "response": { 10098 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10099 // }, 10100 // "scopes": [ 10101 // "https://www.googleapis.com/auth/cloud-platform" 10102 // ] 10103 // } 10104 10105} 10106 10107// method id "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy": 10108 10109type ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall struct { 10110 s *Service 10111 resource string 10112 getiampolicyrequest *GetIamPolicyRequest 10113 urlParams_ gensupport.URLParams 10114 ctx_ context.Context 10115 header_ http.Header 10116} 10117 10118// GetIamPolicy: Gets the IAM policy for a taxonomy or a policy tag. 10119func (r *ProjectsLocationsTaxonomiesPolicyTagsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10120 c := &ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10121 c.resource = resource 10122 c.getiampolicyrequest = getiampolicyrequest 10123 return c 10124} 10125 10126// Fields allows partial responses to be retrieved. See 10127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10128// for more information. 10129func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10130 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10131 return c 10132} 10133 10134// Context sets the context to be used in this call's Do method. Any 10135// pending HTTP request will be aborted if the provided context is 10136// canceled. 10137func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall { 10138 c.ctx_ = ctx 10139 return c 10140} 10141 10142// Header returns an http.Header that can be modified by the caller to 10143// add HTTP headers to the request. 10144func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Header() http.Header { 10145 if c.header_ == nil { 10146 c.header_ = make(http.Header) 10147 } 10148 return c.header_ 10149} 10150 10151func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10152 reqHeaders := make(http.Header) 10153 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10154 for k, v := range c.header_ { 10155 reqHeaders[k] = v 10156 } 10157 reqHeaders.Set("User-Agent", c.s.userAgent()) 10158 var body io.Reader = nil 10159 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 10160 if err != nil { 10161 return nil, err 10162 } 10163 reqHeaders.Set("Content-Type", "application/json") 10164 c.urlParams_.Set("alt", alt) 10165 c.urlParams_.Set("prettyPrint", "false") 10166 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") 10167 urls += "?" + c.urlParams_.Encode() 10168 req, err := http.NewRequest("POST", urls, body) 10169 if err != nil { 10170 return nil, err 10171 } 10172 req.Header = reqHeaders 10173 googleapi.Expand(req.URL, map[string]string{ 10174 "resource": c.resource, 10175 }) 10176 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10177} 10178 10179// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy" call. 10180// Exactly one of *Policy or error will be non-nil. Any non-2xx status 10181// code is an error. Response headers are in either 10182// *Policy.ServerResponse.Header or (if a response was returned at all) 10183// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10184// check whether the returned error was because http.StatusNotModified 10185// was returned. 10186func (c *ProjectsLocationsTaxonomiesPolicyTagsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 10187 gensupport.SetOptions(c.urlParams_, opts...) 10188 res, err := c.doRequest("json") 10189 if res != nil && res.StatusCode == http.StatusNotModified { 10190 if res.Body != nil { 10191 res.Body.Close() 10192 } 10193 return nil, &googleapi.Error{ 10194 Code: res.StatusCode, 10195 Header: res.Header, 10196 } 10197 } 10198 if err != nil { 10199 return nil, err 10200 } 10201 defer googleapi.CloseBody(res) 10202 if err := googleapi.CheckResponse(res); err != nil { 10203 return nil, err 10204 } 10205 ret := &Policy{ 10206 ServerResponse: googleapi.ServerResponse{ 10207 Header: res.Header, 10208 HTTPStatusCode: res.StatusCode, 10209 }, 10210 } 10211 target := &ret 10212 if err := gensupport.DecodeResponse(target, res); err != nil { 10213 return nil, err 10214 } 10215 return ret, nil 10216 // { 10217 // "description": "Gets the IAM policy for a taxonomy or a policy tag.", 10218 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:getIamPolicy", 10219 // "httpMethod": "POST", 10220 // "id": "datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy", 10221 // "parameterOrder": [ 10222 // "resource" 10223 // ], 10224 // "parameters": { 10225 // "resource": { 10226 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 10227 // "location": "path", 10228 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10229 // "required": true, 10230 // "type": "string" 10231 // } 10232 // }, 10233 // "path": "v1beta1/{+resource}:getIamPolicy", 10234 // "request": { 10235 // "$ref": "GetIamPolicyRequest" 10236 // }, 10237 // "response": { 10238 // "$ref": "Policy" 10239 // }, 10240 // "scopes": [ 10241 // "https://www.googleapis.com/auth/cloud-platform" 10242 // ] 10243 // } 10244 10245} 10246 10247// method id "datacatalog.projects.locations.taxonomies.policyTags.list": 10248 10249type ProjectsLocationsTaxonomiesPolicyTagsListCall struct { 10250 s *Service 10251 parent string 10252 urlParams_ gensupport.URLParams 10253 ifNoneMatch_ string 10254 ctx_ context.Context 10255 header_ http.Header 10256} 10257 10258// List: Lists all policy tags in a taxonomy. 10259func (r *ProjectsLocationsTaxonomiesPolicyTagsService) List(parent string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10260 c := &ProjectsLocationsTaxonomiesPolicyTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10261 c.parent = parent 10262 return c 10263} 10264 10265// PageSize sets the optional parameter "pageSize": The maximum number 10266// of items to return. Must be a value between 1 and 1000. If not set, 10267// defaults to 50. 10268func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) PageSize(pageSize int64) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10269 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10270 return c 10271} 10272 10273// PageToken sets the optional parameter "pageToken": The 10274// next_page_token value returned from a previous List request, if any. 10275// If not set, defaults to an empty string. 10276func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) PageToken(pageToken string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10277 c.urlParams_.Set("pageToken", pageToken) 10278 return c 10279} 10280 10281// Fields allows partial responses to be retrieved. See 10282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10283// for more information. 10284func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10285 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10286 return c 10287} 10288 10289// IfNoneMatch sets the optional parameter which makes the operation 10290// fail if the object's ETag matches the given value. This is useful for 10291// getting updates only after the object has changed since the last 10292// request. Use googleapi.IsNotModified to check whether the response 10293// error from Do is the result of In-None-Match. 10294func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10295 c.ifNoneMatch_ = entityTag 10296 return c 10297} 10298 10299// Context sets the context to be used in this call's Do method. Any 10300// pending HTTP request will be aborted if the provided context is 10301// canceled. 10302func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsListCall { 10303 c.ctx_ = ctx 10304 return c 10305} 10306 10307// Header returns an http.Header that can be modified by the caller to 10308// add HTTP headers to the request. 10309func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Header() http.Header { 10310 if c.header_ == nil { 10311 c.header_ = make(http.Header) 10312 } 10313 return c.header_ 10314} 10315 10316func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) doRequest(alt string) (*http.Response, error) { 10317 reqHeaders := make(http.Header) 10318 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10319 for k, v := range c.header_ { 10320 reqHeaders[k] = v 10321 } 10322 reqHeaders.Set("User-Agent", c.s.userAgent()) 10323 if c.ifNoneMatch_ != "" { 10324 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10325 } 10326 var body io.Reader = nil 10327 c.urlParams_.Set("alt", alt) 10328 c.urlParams_.Set("prettyPrint", "false") 10329 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/policyTags") 10330 urls += "?" + c.urlParams_.Encode() 10331 req, err := http.NewRequest("GET", urls, body) 10332 if err != nil { 10333 return nil, err 10334 } 10335 req.Header = reqHeaders 10336 googleapi.Expand(req.URL, map[string]string{ 10337 "parent": c.parent, 10338 }) 10339 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10340} 10341 10342// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.list" call. 10343// Exactly one of *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse 10344// or error will be non-nil. Any non-2xx status code is an error. 10345// Response headers are in either 10346// *GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse.ServerResponse.He 10347// ader or (if a response was returned at all) in 10348// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10349// whether the returned error was because http.StatusNotModified was 10350// returned. 10351func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse, error) { 10352 gensupport.SetOptions(c.urlParams_, opts...) 10353 res, err := c.doRequest("json") 10354 if res != nil && res.StatusCode == http.StatusNotModified { 10355 if res.Body != nil { 10356 res.Body.Close() 10357 } 10358 return nil, &googleapi.Error{ 10359 Code: res.StatusCode, 10360 Header: res.Header, 10361 } 10362 } 10363 if err != nil { 10364 return nil, err 10365 } 10366 defer googleapi.CloseBody(res) 10367 if err := googleapi.CheckResponse(res); err != nil { 10368 return nil, err 10369 } 10370 ret := &GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse{ 10371 ServerResponse: googleapi.ServerResponse{ 10372 Header: res.Header, 10373 HTTPStatusCode: res.StatusCode, 10374 }, 10375 } 10376 target := &ret 10377 if err := gensupport.DecodeResponse(target, res); err != nil { 10378 return nil, err 10379 } 10380 return ret, nil 10381 // { 10382 // "description": "Lists all policy tags in a taxonomy.", 10383 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags", 10384 // "httpMethod": "GET", 10385 // "id": "datacatalog.projects.locations.taxonomies.policyTags.list", 10386 // "parameterOrder": [ 10387 // "parent" 10388 // ], 10389 // "parameters": { 10390 // "pageSize": { 10391 // "description": "The maximum number of items to return. Must be a value between 1 and 1000. If not set, defaults to 50.", 10392 // "format": "int32", 10393 // "location": "query", 10394 // "type": "integer" 10395 // }, 10396 // "pageToken": { 10397 // "description": "The next_page_token value returned from a previous List request, if any. If not set, defaults to an empty string.", 10398 // "location": "query", 10399 // "type": "string" 10400 // }, 10401 // "parent": { 10402 // "description": "Required. Resource name of the taxonomy to list the policy tags of.", 10403 // "location": "path", 10404 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+$", 10405 // "required": true, 10406 // "type": "string" 10407 // } 10408 // }, 10409 // "path": "v1beta1/{+parent}/policyTags", 10410 // "response": { 10411 // "$ref": "GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse" 10412 // }, 10413 // "scopes": [ 10414 // "https://www.googleapis.com/auth/cloud-platform" 10415 // ] 10416 // } 10417 10418} 10419 10420// Pages invokes f for each page of results. 10421// A non-nil error returned from f will halt the iteration. 10422// The provided context supersedes any context provided to the Context method. 10423func (c *ProjectsLocationsTaxonomiesPolicyTagsListCall) Pages(ctx context.Context, f func(*GoogleCloudDatacatalogV1beta1ListPolicyTagsResponse) error) error { 10424 c.ctx_ = ctx 10425 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10426 for { 10427 x, err := c.Do() 10428 if err != nil { 10429 return err 10430 } 10431 if err := f(x); err != nil { 10432 return err 10433 } 10434 if x.NextPageToken == "" { 10435 return nil 10436 } 10437 c.PageToken(x.NextPageToken) 10438 } 10439} 10440 10441// method id "datacatalog.projects.locations.taxonomies.policyTags.patch": 10442 10443type ProjectsLocationsTaxonomiesPolicyTagsPatchCall struct { 10444 s *Service 10445 name string 10446 googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag 10447 urlParams_ gensupport.URLParams 10448 ctx_ context.Context 10449 header_ http.Header 10450} 10451 10452// Patch: Updates a policy tag. 10453func (r *ProjectsLocationsTaxonomiesPolicyTagsService) Patch(name string, googleclouddatacatalogv1beta1policytag *GoogleCloudDatacatalogV1beta1PolicyTag) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10454 c := &ProjectsLocationsTaxonomiesPolicyTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10455 c.name = name 10456 c.googleclouddatacatalogv1beta1policytag = googleclouddatacatalogv1beta1policytag 10457 return c 10458} 10459 10460// UpdateMask sets the optional parameter "updateMask": The update mask 10461// applies to the resource. Only display_name, description and 10462// parent_policy_tag can be updated and thus can be listed in the mask. 10463// If update_mask is not provided, all allowed fields (i.e. 10464// display_name, description and parent) will be updated. For more 10465// information including the `FieldMask` definition, see 10466// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to 10467// update. 10468func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10469 c.urlParams_.Set("updateMask", updateMask) 10470 return c 10471} 10472 10473// Fields allows partial responses to be retrieved. See 10474// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10475// for more information. 10476func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10477 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10478 return c 10479} 10480 10481// Context sets the context to be used in this call's Do method. Any 10482// pending HTTP request will be aborted if the provided context is 10483// canceled. 10484func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsPatchCall { 10485 c.ctx_ = ctx 10486 return c 10487} 10488 10489// Header returns an http.Header that can be modified by the caller to 10490// add HTTP headers to the request. 10491func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Header() http.Header { 10492 if c.header_ == nil { 10493 c.header_ = make(http.Header) 10494 } 10495 return c.header_ 10496} 10497 10498func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) doRequest(alt string) (*http.Response, error) { 10499 reqHeaders := make(http.Header) 10500 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10501 for k, v := range c.header_ { 10502 reqHeaders[k] = v 10503 } 10504 reqHeaders.Set("User-Agent", c.s.userAgent()) 10505 var body io.Reader = nil 10506 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatacatalogv1beta1policytag) 10507 if err != nil { 10508 return nil, err 10509 } 10510 reqHeaders.Set("Content-Type", "application/json") 10511 c.urlParams_.Set("alt", alt) 10512 c.urlParams_.Set("prettyPrint", "false") 10513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") 10514 urls += "?" + c.urlParams_.Encode() 10515 req, err := http.NewRequest("PATCH", urls, body) 10516 if err != nil { 10517 return nil, err 10518 } 10519 req.Header = reqHeaders 10520 googleapi.Expand(req.URL, map[string]string{ 10521 "name": c.name, 10522 }) 10523 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10524} 10525 10526// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.patch" call. 10527// Exactly one of *GoogleCloudDatacatalogV1beta1PolicyTag or error will 10528// be non-nil. Any non-2xx status code is an error. Response headers are 10529// in either 10530// *GoogleCloudDatacatalogV1beta1PolicyTag.ServerResponse.Header or (if 10531// a response was returned at all) in error.(*googleapi.Error).Header. 10532// Use googleapi.IsNotModified to check whether the returned error was 10533// because http.StatusNotModified was returned. 10534func (c *ProjectsLocationsTaxonomiesPolicyTagsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatacatalogV1beta1PolicyTag, error) { 10535 gensupport.SetOptions(c.urlParams_, opts...) 10536 res, err := c.doRequest("json") 10537 if res != nil && res.StatusCode == http.StatusNotModified { 10538 if res.Body != nil { 10539 res.Body.Close() 10540 } 10541 return nil, &googleapi.Error{ 10542 Code: res.StatusCode, 10543 Header: res.Header, 10544 } 10545 } 10546 if err != nil { 10547 return nil, err 10548 } 10549 defer googleapi.CloseBody(res) 10550 if err := googleapi.CheckResponse(res); err != nil { 10551 return nil, err 10552 } 10553 ret := &GoogleCloudDatacatalogV1beta1PolicyTag{ 10554 ServerResponse: googleapi.ServerResponse{ 10555 Header: res.Header, 10556 HTTPStatusCode: res.StatusCode, 10557 }, 10558 } 10559 target := &ret 10560 if err := gensupport.DecodeResponse(target, res); err != nil { 10561 return nil, err 10562 } 10563 return ret, nil 10564 // { 10565 // "description": "Updates a policy tag.", 10566 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}", 10567 // "httpMethod": "PATCH", 10568 // "id": "datacatalog.projects.locations.taxonomies.policyTags.patch", 10569 // "parameterOrder": [ 10570 // "name" 10571 // ], 10572 // "parameters": { 10573 // "name": { 10574 // "description": "Output only. Resource name of this policy tag, whose format is: \"projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}\".", 10575 // "location": "path", 10576 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10577 // "required": true, 10578 // "type": "string" 10579 // }, 10580 // "updateMask": { 10581 // "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.", 10582 // "format": "google-fieldmask", 10583 // "location": "query", 10584 // "type": "string" 10585 // } 10586 // }, 10587 // "path": "v1beta1/{+name}", 10588 // "request": { 10589 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10590 // }, 10591 // "response": { 10592 // "$ref": "GoogleCloudDatacatalogV1beta1PolicyTag" 10593 // }, 10594 // "scopes": [ 10595 // "https://www.googleapis.com/auth/cloud-platform" 10596 // ] 10597 // } 10598 10599} 10600 10601// method id "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy": 10602 10603type ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall struct { 10604 s *Service 10605 resource string 10606 setiampolicyrequest *SetIamPolicyRequest 10607 urlParams_ gensupport.URLParams 10608 ctx_ context.Context 10609 header_ http.Header 10610} 10611 10612// SetIamPolicy: Sets the IAM policy for a taxonomy or a policy tag. 10613func (r *ProjectsLocationsTaxonomiesPolicyTagsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10614 c := &ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10615 c.resource = resource 10616 c.setiampolicyrequest = setiampolicyrequest 10617 return c 10618} 10619 10620// Fields allows partial responses to be retrieved. See 10621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10622// for more information. 10623func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10625 return c 10626} 10627 10628// Context sets the context to be used in this call's Do method. Any 10629// pending HTTP request will be aborted if the provided context is 10630// canceled. 10631func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall { 10632 c.ctx_ = ctx 10633 return c 10634} 10635 10636// Header returns an http.Header that can be modified by the caller to 10637// add HTTP headers to the request. 10638func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Header() http.Header { 10639 if c.header_ == nil { 10640 c.header_ = make(http.Header) 10641 } 10642 return c.header_ 10643} 10644 10645func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10646 reqHeaders := make(http.Header) 10647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10648 for k, v := range c.header_ { 10649 reqHeaders[k] = v 10650 } 10651 reqHeaders.Set("User-Agent", c.s.userAgent()) 10652 var body io.Reader = nil 10653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 10654 if err != nil { 10655 return nil, err 10656 } 10657 reqHeaders.Set("Content-Type", "application/json") 10658 c.urlParams_.Set("alt", alt) 10659 c.urlParams_.Set("prettyPrint", "false") 10660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") 10661 urls += "?" + c.urlParams_.Encode() 10662 req, err := http.NewRequest("POST", urls, body) 10663 if err != nil { 10664 return nil, err 10665 } 10666 req.Header = reqHeaders 10667 googleapi.Expand(req.URL, map[string]string{ 10668 "resource": c.resource, 10669 }) 10670 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10671} 10672 10673// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy" call. 10674// Exactly one of *Policy or error will be non-nil. Any non-2xx status 10675// code is an error. Response headers are in either 10676// *Policy.ServerResponse.Header or (if a response was returned at all) 10677// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10678// check whether the returned error was because http.StatusNotModified 10679// was returned. 10680func (c *ProjectsLocationsTaxonomiesPolicyTagsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 10681 gensupport.SetOptions(c.urlParams_, opts...) 10682 res, err := c.doRequest("json") 10683 if res != nil && res.StatusCode == http.StatusNotModified { 10684 if res.Body != nil { 10685 res.Body.Close() 10686 } 10687 return nil, &googleapi.Error{ 10688 Code: res.StatusCode, 10689 Header: res.Header, 10690 } 10691 } 10692 if err != nil { 10693 return nil, err 10694 } 10695 defer googleapi.CloseBody(res) 10696 if err := googleapi.CheckResponse(res); err != nil { 10697 return nil, err 10698 } 10699 ret := &Policy{ 10700 ServerResponse: googleapi.ServerResponse{ 10701 Header: res.Header, 10702 HTTPStatusCode: res.StatusCode, 10703 }, 10704 } 10705 target := &ret 10706 if err := gensupport.DecodeResponse(target, res); err != nil { 10707 return nil, err 10708 } 10709 return ret, nil 10710 // { 10711 // "description": "Sets the IAM policy for a taxonomy or a policy tag.", 10712 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:setIamPolicy", 10713 // "httpMethod": "POST", 10714 // "id": "datacatalog.projects.locations.taxonomies.policyTags.setIamPolicy", 10715 // "parameterOrder": [ 10716 // "resource" 10717 // ], 10718 // "parameters": { 10719 // "resource": { 10720 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 10721 // "location": "path", 10722 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10723 // "required": true, 10724 // "type": "string" 10725 // } 10726 // }, 10727 // "path": "v1beta1/{+resource}:setIamPolicy", 10728 // "request": { 10729 // "$ref": "SetIamPolicyRequest" 10730 // }, 10731 // "response": { 10732 // "$ref": "Policy" 10733 // }, 10734 // "scopes": [ 10735 // "https://www.googleapis.com/auth/cloud-platform" 10736 // ] 10737 // } 10738 10739} 10740 10741// method id "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions": 10742 10743type ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall struct { 10744 s *Service 10745 resource string 10746 testiampermissionsrequest *TestIamPermissionsRequest 10747 urlParams_ gensupport.URLParams 10748 ctx_ context.Context 10749 header_ http.Header 10750} 10751 10752// TestIamPermissions: Returns the permissions that a caller has on the 10753// specified taxonomy or policy tag. 10754func (r *ProjectsLocationsTaxonomiesPolicyTagsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 10755 c := &ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10756 c.resource = resource 10757 c.testiampermissionsrequest = testiampermissionsrequest 10758 return c 10759} 10760 10761// Fields allows partial responses to be retrieved. See 10762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10763// for more information. 10764func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 10765 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10766 return c 10767} 10768 10769// Context sets the context to be used in this call's Do method. Any 10770// pending HTTP request will be aborted if the provided context is 10771// canceled. 10772func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall { 10773 c.ctx_ = ctx 10774 return c 10775} 10776 10777// Header returns an http.Header that can be modified by the caller to 10778// add HTTP headers to the request. 10779func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Header() http.Header { 10780 if c.header_ == nil { 10781 c.header_ = make(http.Header) 10782 } 10783 return c.header_ 10784} 10785 10786func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 10787 reqHeaders := make(http.Header) 10788 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009") 10789 for k, v := range c.header_ { 10790 reqHeaders[k] = v 10791 } 10792 reqHeaders.Set("User-Agent", c.s.userAgent()) 10793 var body io.Reader = nil 10794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 10795 if err != nil { 10796 return nil, err 10797 } 10798 reqHeaders.Set("Content-Type", "application/json") 10799 c.urlParams_.Set("alt", alt) 10800 c.urlParams_.Set("prettyPrint", "false") 10801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") 10802 urls += "?" + c.urlParams_.Encode() 10803 req, err := http.NewRequest("POST", urls, body) 10804 if err != nil { 10805 return nil, err 10806 } 10807 req.Header = reqHeaders 10808 googleapi.Expand(req.URL, map[string]string{ 10809 "resource": c.resource, 10810 }) 10811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10812} 10813 10814// Do executes the "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions" call. 10815// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 10816// Any non-2xx status code is an error. Response headers are in either 10817// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 10818// was returned at all) in error.(*googleapi.Error).Header. Use 10819// googleapi.IsNotModified to check whether the returned error was 10820// because http.StatusNotModified was returned. 10821func (c *ProjectsLocationsTaxonomiesPolicyTagsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 10822 gensupport.SetOptions(c.urlParams_, opts...) 10823 res, err := c.doRequest("json") 10824 if res != nil && res.StatusCode == http.StatusNotModified { 10825 if res.Body != nil { 10826 res.Body.Close() 10827 } 10828 return nil, &googleapi.Error{ 10829 Code: res.StatusCode, 10830 Header: res.Header, 10831 } 10832 } 10833 if err != nil { 10834 return nil, err 10835 } 10836 defer googleapi.CloseBody(res) 10837 if err := googleapi.CheckResponse(res); err != nil { 10838 return nil, err 10839 } 10840 ret := &TestIamPermissionsResponse{ 10841 ServerResponse: googleapi.ServerResponse{ 10842 Header: res.Header, 10843 HTTPStatusCode: res.StatusCode, 10844 }, 10845 } 10846 target := &ret 10847 if err := gensupport.DecodeResponse(target, res); err != nil { 10848 return nil, err 10849 } 10850 return ret, nil 10851 // { 10852 // "description": "Returns the permissions that a caller has on the specified taxonomy or policy tag.", 10853 // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/taxonomies/{taxonomiesId}/policyTags/{policyTagsId}:testIamPermissions", 10854 // "httpMethod": "POST", 10855 // "id": "datacatalog.projects.locations.taxonomies.policyTags.testIamPermissions", 10856 // "parameterOrder": [ 10857 // "resource" 10858 // ], 10859 // "parameters": { 10860 // "resource": { 10861 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 10862 // "location": "path", 10863 // "pattern": "^projects/[^/]+/locations/[^/]+/taxonomies/[^/]+/policyTags/[^/]+$", 10864 // "required": true, 10865 // "type": "string" 10866 // } 10867 // }, 10868 // "path": "v1beta1/{+resource}:testIamPermissions", 10869 // "request": { 10870 // "$ref": "TestIamPermissionsRequest" 10871 // }, 10872 // "response": { 10873 // "$ref": "TestIamPermissionsResponse" 10874 // }, 10875 // "scopes": [ 10876 // "https://www.googleapis.com/auth/cloud-platform" 10877 // ] 10878 // } 10879 10880} 10881