1// Copyright 2019 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 serviceconsumermanagement provides access to the Service Consumer Management API. 8// 9// For product documentation, see: https://cloud.google.com/service-consumer-management/docs/overview 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/serviceconsumermanagement/v1" 16// ... 17// ctx := context.Background() 18// serviceconsumermanagementService, err := serviceconsumermanagement.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// serviceconsumermanagementService, err := serviceconsumermanagement.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// serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1" 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 gensupport "google.golang.org/api/gensupport" 53 googleapi "google.golang.org/api/googleapi" 54 option "google.golang.org/api/option" 55 htransport "google.golang.org/api/transport/http" 56) 57 58// Always reference these packages, just in case the auto-generated code 59// below doesn't. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "serviceconsumermanagement:v1" 73const apiName = "serviceconsumermanagement" 74const apiVersion = "v1" 75const basePath = "https://serviceconsumermanagement.googleapis.com/" 76 77// OAuth2 scopes used by this API. 78const ( 79 // View and manage your data across Google Cloud Platform services 80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 81) 82 83// NewService creates a new APIService. 84func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/cloud-platform", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102} 103 104// New creates a new APIService. It uses the provided http.Client for requests. 105// 106// Deprecated: please use NewService instead. 107// To provide a custom HTTP client, use option.WithHTTPClient. 108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109func New(client *http.Client) (*APIService, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &APIService{client: client, BasePath: basePath} 114 s.Operations = NewOperationsService(s) 115 s.Services = NewServicesService(s) 116 return s, nil 117} 118 119type APIService struct { 120 client *http.Client 121 BasePath string // API endpoint base URL 122 UserAgent string // optional additional User-Agent fragment 123 124 Operations *OperationsService 125 126 Services *ServicesService 127} 128 129func (s *APIService) userAgent() string { 130 if s.UserAgent == "" { 131 return googleapi.UserAgent 132 } 133 return googleapi.UserAgent + " " + s.UserAgent 134} 135 136func NewOperationsService(s *APIService) *OperationsService { 137 rs := &OperationsService{s: s} 138 return rs 139} 140 141type OperationsService struct { 142 s *APIService 143} 144 145func NewServicesService(s *APIService) *ServicesService { 146 rs := &ServicesService{s: s} 147 rs.TenancyUnits = NewServicesTenancyUnitsService(s) 148 return rs 149} 150 151type ServicesService struct { 152 s *APIService 153 154 TenancyUnits *ServicesTenancyUnitsService 155} 156 157func NewServicesTenancyUnitsService(s *APIService) *ServicesTenancyUnitsService { 158 rs := &ServicesTenancyUnitsService{s: s} 159 return rs 160} 161 162type ServicesTenancyUnitsService struct { 163 s *APIService 164} 165 166// AddTenantProjectRequest: Request to add a newly created and 167// configured tenant project to a tenancy 168// unit. 169type AddTenantProjectRequest struct { 170 // ProjectConfig: Configuration of the new tenant project to be added to 171 // tenancy unit 172 // resources. 173 ProjectConfig *TenantProjectConfig `json:"projectConfig,omitempty"` 174 175 // Tag: Tag of the added project. Must be less than 128 characters. 176 // Required. 177 Tag string `json:"tag,omitempty"` 178 179 // ForceSendFields is a list of field names (e.g. "ProjectConfig") to 180 // unconditionally include in API requests. By default, fields with 181 // empty values are omitted from API requests. However, any non-pointer, 182 // non-interface field appearing in ForceSendFields will be sent to the 183 // server regardless of whether the field is empty or not. This may be 184 // used to include empty fields in Patch requests. 185 ForceSendFields []string `json:"-"` 186 187 // NullFields is a list of field names (e.g. "ProjectConfig") to include 188 // in API requests with the JSON null value. By default, fields with 189 // empty values are omitted from API requests. However, any field with 190 // an empty value appearing in NullFields will be sent to the server as 191 // null. It is an error if a field in this list has a non-empty value. 192 // This may be used to include null fields in Patch requests. 193 NullFields []string `json:"-"` 194} 195 196func (s *AddTenantProjectRequest) MarshalJSON() ([]byte, error) { 197 type NoMethod AddTenantProjectRequest 198 raw := NoMethod(*s) 199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 200} 201 202// Api: Api is a light-weight descriptor for an API 203// Interface. 204// 205// Interfaces are also described as "protocol buffer services" in some 206// contexts, 207// such as by the "service" keyword in a .proto file, but they are 208// different 209// from API Services, which represent a concrete implementation of an 210// interface 211// as opposed to simply a description of methods and bindings. They are 212// also 213// sometimes simply referred to as "APIs" in other contexts, such as the 214// name of 215// this message itself. See 216// https://cloud.google.com/apis/design/glossary for 217// detailed terminology. 218type Api struct { 219 // Methods: The methods of this interface, in unspecified order. 220 Methods []*Method `json:"methods,omitempty"` 221 222 // Mixins: Included interfaces. See Mixin. 223 Mixins []*Mixin `json:"mixins,omitempty"` 224 225 // Name: The fully qualified name of this interface, including package 226 // name 227 // followed by the interface's simple name. 228 Name string `json:"name,omitempty"` 229 230 // Options: Any metadata attached to the interface. 231 Options []*Option `json:"options,omitempty"` 232 233 // SourceContext: Source context for the protocol buffer service 234 // represented by this 235 // message. 236 SourceContext *SourceContext `json:"sourceContext,omitempty"` 237 238 // Syntax: The source syntax of the service. 239 // 240 // Possible values: 241 // "SYNTAX_PROTO2" - Syntax `proto2`. 242 // "SYNTAX_PROTO3" - Syntax `proto3`. 243 Syntax string `json:"syntax,omitempty"` 244 245 // Version: A version string for this interface. If specified, must have 246 // the form 247 // `major-version.minor-version`, as in `1.10`. If the minor version 248 // is 249 // omitted, it defaults to zero. If the entire version field is empty, 250 // the 251 // major version is derived from the package name, as outlined below. If 252 // the 253 // field is not empty, the version in the package name will be verified 254 // to be 255 // consistent with what is provided here. 256 // 257 // The versioning schema uses [semantic 258 // versioning](http://semver.org) where the major version 259 // number 260 // indicates a breaking change and the minor version an 261 // additive, 262 // non-breaking change. Both version numbers are signals to users 263 // what to expect from different versions, and should be 264 // carefully 265 // chosen based on the product plan. 266 // 267 // The major version is also reflected in the package name of 268 // the 269 // interface, which must end in `v<major-version>`, as 270 // in 271 // `google.feature.v1`. For major versions 0 and 1, the suffix can 272 // be omitted. Zero major versions must only be used for 273 // experimental, non-GA interfaces. 274 // 275 Version string `json:"version,omitempty"` 276 277 // ForceSendFields is a list of field names (e.g. "Methods") to 278 // unconditionally include in API requests. By default, fields with 279 // empty values are omitted from API requests. However, any non-pointer, 280 // non-interface field appearing in ForceSendFields will be sent to the 281 // server regardless of whether the field is empty or not. This may be 282 // used to include empty fields in Patch requests. 283 ForceSendFields []string `json:"-"` 284 285 // NullFields is a list of field names (e.g. "Methods") to include in 286 // API requests with the JSON null value. By default, fields with empty 287 // values are omitted from API requests. However, any field with an 288 // empty value appearing in NullFields will be sent to the server as 289 // null. It is an error if a field in this list has a non-empty value. 290 // This may be used to include null fields in Patch requests. 291 NullFields []string `json:"-"` 292} 293 294func (s *Api) MarshalJSON() ([]byte, error) { 295 type NoMethod Api 296 raw := NoMethod(*s) 297 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 298} 299 300// ApplyTenantProjectConfigRequest: Request to apply configuration to an 301// existing tenant project. 302type ApplyTenantProjectConfigRequest struct { 303 // ProjectConfig: Configuration that should be applied to the existing 304 // tenant project. 305 ProjectConfig *TenantProjectConfig `json:"projectConfig,omitempty"` 306 307 // Tag: Tag of the project. Must be less than 128 characters. Required. 308 Tag string `json:"tag,omitempty"` 309 310 // ForceSendFields is a list of field names (e.g. "ProjectConfig") to 311 // unconditionally include in API requests. By default, fields with 312 // empty values are omitted from API requests. However, any non-pointer, 313 // non-interface field appearing in ForceSendFields will be sent to the 314 // server regardless of whether the field is empty or not. This may be 315 // used to include empty fields in Patch requests. 316 ForceSendFields []string `json:"-"` 317 318 // NullFields is a list of field names (e.g. "ProjectConfig") to include 319 // in API requests with the JSON null value. By default, fields with 320 // empty values are omitted from API requests. However, any field with 321 // an empty value appearing in NullFields will be sent to the server as 322 // null. It is an error if a field in this list has a non-empty value. 323 // This may be used to include null fields in Patch requests. 324 NullFields []string `json:"-"` 325} 326 327func (s *ApplyTenantProjectConfigRequest) MarshalJSON() ([]byte, error) { 328 type NoMethod ApplyTenantProjectConfigRequest 329 raw := NoMethod(*s) 330 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 331} 332 333// AttachTenantProjectRequest: Request to attach an existing project to 334// the tenancy unit as a new tenant 335// resource. 336type AttachTenantProjectRequest struct { 337 // ExternalResource: When attaching an external project, this is in the 338 // format of 339 // `projects/{project_number}`. 340 ExternalResource string `json:"externalResource,omitempty"` 341 342 // ReservedResource: When attaching a reserved project already in 343 // tenancy units, this is the 344 // tag of a tenant resource under the tenancy unit for the managed 345 // service's 346 // service producer project. The reserved tenant resource must be in 347 // an 348 // active state. 349 ReservedResource string `json:"reservedResource,omitempty"` 350 351 // Tag: Tag of the tenant resource after attachment. 352 // Must be less than 128 characters. Required. 353 Tag string `json:"tag,omitempty"` 354 355 // ForceSendFields is a list of field names (e.g. "ExternalResource") to 356 // unconditionally include in API requests. By default, fields with 357 // empty values are omitted from API requests. However, any non-pointer, 358 // non-interface field appearing in ForceSendFields will be sent to the 359 // server regardless of whether the field is empty or not. This may be 360 // used to include empty fields in Patch requests. 361 ForceSendFields []string `json:"-"` 362 363 // NullFields is a list of field names (e.g. "ExternalResource") to 364 // include in API requests with the JSON null value. By default, fields 365 // with empty values are omitted from API requests. However, any field 366 // with an empty value appearing in NullFields will be sent to the 367 // server as null. It is an error if a field in this list has a 368 // non-empty value. This may be used to include null fields in Patch 369 // requests. 370 NullFields []string `json:"-"` 371} 372 373func (s *AttachTenantProjectRequest) MarshalJSON() ([]byte, error) { 374 type NoMethod AttachTenantProjectRequest 375 raw := NoMethod(*s) 376 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 377} 378 379// AuthProvider: Configuration for an authentication provider, including 380// support for 381// [JSON Web 382// Token 383// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok 384// en-32). 385type AuthProvider struct { 386 // Audiences: The list of 387 // JWT 388 // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 389 // token-32#section-4.1.3). 390 // that are allowed to access. A JWT containing any of these audiences 391 // will 392 // be accepted. When this setting is absent, only JWTs with 393 // audience 394 // "https://Service_name/API_name" 395 // will be accepted. For example, if no audiences are in the 396 // setting, 397 // LibraryService API will only accept JWTs with the following 398 // audience 399 // "https://library-example.googleapis.com/google.example.librar 400 // y.v1.LibraryService". 401 // 402 // Example: 403 // 404 // audiences: bookstore_android.apps.googleusercontent.com, 405 // bookstore_web.apps.googleusercontent.com 406 Audiences string `json:"audiences,omitempty"` 407 408 // AuthorizationUrl: Redirect URL if JWT token is required but not 409 // present or is expired. 410 // Implement authorizationUrl of securityDefinitions in OpenAPI spec. 411 AuthorizationUrl string `json:"authorizationUrl,omitempty"` 412 413 // Id: The unique identifier of the auth provider. It will be referred 414 // to by 415 // `AuthRequirement.provider_id`. 416 // 417 // Example: "bookstore_auth". 418 Id string `json:"id,omitempty"` 419 420 // Issuer: Identifies the principal that issued the JWT. 421 // See 422 // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#sec 423 // tion-4.1.1 424 // Usually a URL or an email address. 425 // 426 // Example: https://securetoken.google.com 427 // Example: 1234567-compute@developer.gserviceaccount.com 428 Issuer string `json:"issuer,omitempty"` 429 430 // JwksUri: URL of the provider's public key set to validate signature 431 // of the JWT. 432 // See 433 // [OpenID 434 // Discovery](https://openid.net/specs/openid-connect-discove 435 // ry-1_0.html#ProviderMetadata). 436 // Optional if the key set document: 437 // - can be retrieved from 438 // [OpenID 439 // 440 // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html 441 // of 442 // the issuer. 443 // - can be inferred from the email domain of the issuer (e.g. a 444 // Google 445 // service account). 446 // 447 // Example: https://www.googleapis.com/oauth2/v1/certs 448 JwksUri string `json:"jwksUri,omitempty"` 449 450 // ForceSendFields is a list of field names (e.g. "Audiences") to 451 // unconditionally include in API requests. By default, fields with 452 // empty values are omitted from API requests. However, any non-pointer, 453 // non-interface field appearing in ForceSendFields will be sent to the 454 // server regardless of whether the field is empty or not. This may be 455 // used to include empty fields in Patch requests. 456 ForceSendFields []string `json:"-"` 457 458 // NullFields is a list of field names (e.g. "Audiences") to include in 459 // API requests with the JSON null value. By default, fields with empty 460 // values are omitted from API requests. However, any field with an 461 // empty value appearing in NullFields will be sent to the server as 462 // null. It is an error if a field in this list has a non-empty value. 463 // This may be used to include null fields in Patch requests. 464 NullFields []string `json:"-"` 465} 466 467func (s *AuthProvider) MarshalJSON() ([]byte, error) { 468 type NoMethod AuthProvider 469 raw := NoMethod(*s) 470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 471} 472 473// AuthRequirement: User-defined authentication requirements, including 474// support for 475// [JSON Web 476// Token 477// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-tok 478// en-32). 479type AuthRequirement struct { 480 // Audiences: NOTE: This will be deprecated soon, once 481 // AuthProvider.audiences is 482 // implemented and accepted in all the runtime components. 483 // 484 // The list of 485 // JWT 486 // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 487 // token-32#section-4.1.3). 488 // that are allowed to access. A JWT containing any of these audiences 489 // will 490 // be accepted. When this setting is absent, only JWTs with 491 // audience 492 // "https://Service_name/API_name" 493 // will be accepted. For example, if no audiences are in the 494 // setting, 495 // LibraryService API will only accept JWTs with the following 496 // audience 497 // "https://library-example.googleapis.com/google.example.librar 498 // y.v1.LibraryService". 499 // 500 // Example: 501 // 502 // audiences: bookstore_android.apps.googleusercontent.com, 503 // bookstore_web.apps.googleusercontent.com 504 Audiences string `json:"audiences,omitempty"` 505 506 // ProviderId: id from authentication provider. 507 // 508 // Example: 509 // 510 // provider_id: bookstore_auth 511 ProviderId string `json:"providerId,omitempty"` 512 513 // ForceSendFields is a list of field names (e.g. "Audiences") to 514 // unconditionally include in API requests. By default, fields with 515 // empty values are omitted from API requests. However, any non-pointer, 516 // non-interface field appearing in ForceSendFields will be sent to the 517 // server regardless of whether the field is empty or not. This may be 518 // used to include empty fields in Patch requests. 519 ForceSendFields []string `json:"-"` 520 521 // NullFields is a list of field names (e.g. "Audiences") to include in 522 // API requests with the JSON null value. By default, fields with empty 523 // values are omitted from API requests. However, any field with an 524 // empty value appearing in NullFields will be sent to the server as 525 // null. It is an error if a field in this list has a non-empty value. 526 // This may be used to include null fields in Patch requests. 527 NullFields []string `json:"-"` 528} 529 530func (s *AuthRequirement) MarshalJSON() ([]byte, error) { 531 type NoMethod AuthRequirement 532 raw := NoMethod(*s) 533 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 534} 535 536// Authentication: `Authentication` defines the authentication 537// configuration for an API. 538// 539// Example for an API targeted for external use: 540// 541// name: calendar.googleapis.com 542// authentication: 543// providers: 544// - id: google_calendar_auth 545// jwks_uri: https://www.googleapis.com/oauth2/v1/certs 546// issuer: https://securetoken.google.com 547// rules: 548// - selector: "*" 549// requirements: 550// provider_id: google_calendar_auth 551type Authentication struct { 552 // Providers: Defines a set of authentication providers that a service 553 // supports. 554 Providers []*AuthProvider `json:"providers,omitempty"` 555 556 // Rules: A list of authentication rules that apply to individual API 557 // methods. 558 // 559 // **NOTE:** All service configuration rules follow "last one wins" 560 // order. 561 Rules []*AuthenticationRule `json:"rules,omitempty"` 562 563 // ForceSendFields is a list of field names (e.g. "Providers") to 564 // unconditionally include in API requests. By default, fields with 565 // empty values are omitted from API requests. However, any non-pointer, 566 // non-interface field appearing in ForceSendFields will be sent to the 567 // server regardless of whether the field is empty or not. This may be 568 // used to include empty fields in Patch requests. 569 ForceSendFields []string `json:"-"` 570 571 // NullFields is a list of field names (e.g. "Providers") to include in 572 // API requests with the JSON null value. By default, fields with empty 573 // values are omitted from API requests. However, any field with an 574 // empty value appearing in NullFields will be sent to the server as 575 // null. It is an error if a field in this list has a non-empty value. 576 // This may be used to include null fields in Patch requests. 577 NullFields []string `json:"-"` 578} 579 580func (s *Authentication) MarshalJSON() ([]byte, error) { 581 type NoMethod Authentication 582 raw := NoMethod(*s) 583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 584} 585 586// AuthenticationRule: Authentication rules for the service. 587// 588// By default, if a method has any authentication requirements, every 589// request 590// must include a valid credential matching one of the 591// requirements. 592// It's an error to include more than one kind of credential in a 593// single 594// request. 595// 596// If a method doesn't have any auth requirements, request credentials 597// will be 598// ignored. 599type AuthenticationRule struct { 600 // AllowWithoutCredential: If true, the service accepts API keys without 601 // any other credential. 602 AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"` 603 604 // Oauth: The requirements for OAuth credentials. 605 Oauth *OAuthRequirements `json:"oauth,omitempty"` 606 607 // Requirements: Requirements for additional authentication providers. 608 Requirements []*AuthRequirement `json:"requirements,omitempty"` 609 610 // Selector: Selects the methods to which this rule applies. 611 // 612 // Refer to selector for syntax details. 613 Selector string `json:"selector,omitempty"` 614 615 // ForceSendFields is a list of field names (e.g. 616 // "AllowWithoutCredential") to unconditionally include in API requests. 617 // By default, fields with empty values are omitted from API requests. 618 // However, any non-pointer, non-interface field appearing in 619 // ForceSendFields will be sent to the server regardless of whether the 620 // field is empty or not. This may be used to include empty fields in 621 // Patch requests. 622 ForceSendFields []string `json:"-"` 623 624 // NullFields is a list of field names (e.g. "AllowWithoutCredential") 625 // to include in API requests with the JSON null value. By default, 626 // fields with empty values are omitted from API requests. However, any 627 // field with an empty value appearing in NullFields will be sent to the 628 // server as null. It is an error if a field in this list has a 629 // non-empty value. This may be used to include null fields in Patch 630 // requests. 631 NullFields []string `json:"-"` 632} 633 634func (s *AuthenticationRule) MarshalJSON() ([]byte, error) { 635 type NoMethod AuthenticationRule 636 raw := NoMethod(*s) 637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 638} 639 640// Backend: `Backend` defines the backend configuration for a service. 641type Backend struct { 642 // Rules: A list of API backend rules that apply to individual API 643 // methods. 644 // 645 // **NOTE:** All service configuration rules follow "last one wins" 646 // order. 647 Rules []*BackendRule `json:"rules,omitempty"` 648 649 // ForceSendFields is a list of field names (e.g. "Rules") to 650 // unconditionally include in API requests. By default, fields with 651 // empty values are omitted from API requests. However, any non-pointer, 652 // non-interface field appearing in ForceSendFields will be sent to the 653 // server regardless of whether the field is empty or not. This may be 654 // used to include empty fields in Patch requests. 655 ForceSendFields []string `json:"-"` 656 657 // NullFields is a list of field names (e.g. "Rules") to include in API 658 // requests with the JSON null value. By default, fields with empty 659 // values are omitted from API requests. However, any field with an 660 // empty value appearing in NullFields will be sent to the server as 661 // null. It is an error if a field in this list has a non-empty value. 662 // This may be used to include null fields in Patch requests. 663 NullFields []string `json:"-"` 664} 665 666func (s *Backend) MarshalJSON() ([]byte, error) { 667 type NoMethod Backend 668 raw := NoMethod(*s) 669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 670} 671 672// BackendRule: A backend rule provides configuration for an individual 673// API element. 674type BackendRule struct { 675 // Address: The address of the API backend. 676 Address string `json:"address,omitempty"` 677 678 // Deadline: The number of seconds to wait for a response from a 679 // request. The default 680 // deadline for gRPC is infinite (no deadline) and HTTP requests is 5 681 // seconds. 682 Deadline float64 `json:"deadline,omitempty"` 683 684 // JwtAudience: The JWT audience is used when generating a JWT id token 685 // for the backend. 686 JwtAudience string `json:"jwtAudience,omitempty"` 687 688 // MinDeadline: Minimum deadline in seconds needed for this method. 689 // Calls having deadline 690 // value lower than this will be rejected. 691 MinDeadline float64 `json:"minDeadline,omitempty"` 692 693 // OperationDeadline: The number of seconds to wait for the completion 694 // of a long running 695 // operation. The default is no deadline. 696 OperationDeadline float64 `json:"operationDeadline,omitempty"` 697 698 // Possible values: 699 // "PATH_TRANSLATION_UNSPECIFIED" 700 // "CONSTANT_ADDRESS" - Use the backend address as-is, with no 701 // modification to the path. If the 702 // URL pattern contains variables, the variable names and values will 703 // be 704 // appended to the query string. If a query string parameter and a 705 // URL 706 // pattern variable have the same name, this may result in duplicate 707 // keys in 708 // the query string. 709 // 710 // # Examples 711 // 712 // Given the following operation config: 713 // 714 // Method path: /api/company/{cid}/user/{uid} 715 // Backend address: 716 // https://example.cloudfunctions.net/getUser 717 // 718 // Requests to the following request paths will call the backend at 719 // the 720 // translated path: 721 // 722 // Request path: /api/company/widgetworks/user/johndoe 723 // Translated: 724 // 725 // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe 726 // 727 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 728 // Translated: 729 // 730 // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe 731 // "APPEND_PATH_TO_ADDRESS" - The request path will be appended to the 732 // backend address. 733 // 734 // # Examples 735 // 736 // Given the following operation config: 737 // 738 // Method path: /api/company/{cid}/user/{uid} 739 // Backend address: https://example.appspot.com 740 // 741 // Requests to the following request paths will call the backend at 742 // the 743 // translated path: 744 // 745 // Request path: /api/company/widgetworks/user/johndoe 746 // Translated: 747 // 748 // https://example.appspot.com/api/company/widgetworks/user/johndoe 749 // 750 // Request path: /api/company/widgetworks/user/johndoe?timezone=EST 751 // Translated: 752 // 753 // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST 754 PathTranslation string `json:"pathTranslation,omitempty"` 755 756 // Selector: Selects the methods to which this rule applies. 757 // 758 // Refer to selector for syntax details. 759 Selector string `json:"selector,omitempty"` 760 761 // ForceSendFields is a list of field names (e.g. "Address") to 762 // unconditionally include in API requests. By default, fields with 763 // empty values are omitted from API requests. However, any non-pointer, 764 // non-interface field appearing in ForceSendFields will be sent to the 765 // server regardless of whether the field is empty or not. This may be 766 // used to include empty fields in Patch requests. 767 ForceSendFields []string `json:"-"` 768 769 // NullFields is a list of field names (e.g. "Address") to include in 770 // API requests with the JSON null value. By default, fields with empty 771 // values are omitted from API requests. However, any field with an 772 // empty value appearing in NullFields will be sent to the server as 773 // null. It is an error if a field in this list has a non-empty value. 774 // This may be used to include null fields in Patch requests. 775 NullFields []string `json:"-"` 776} 777 778func (s *BackendRule) MarshalJSON() ([]byte, error) { 779 type NoMethod BackendRule 780 raw := NoMethod(*s) 781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 782} 783 784func (s *BackendRule) UnmarshalJSON(data []byte) error { 785 type NoMethod BackendRule 786 var s1 struct { 787 Deadline gensupport.JSONFloat64 `json:"deadline"` 788 MinDeadline gensupport.JSONFloat64 `json:"minDeadline"` 789 OperationDeadline gensupport.JSONFloat64 `json:"operationDeadline"` 790 *NoMethod 791 } 792 s1.NoMethod = (*NoMethod)(s) 793 if err := json.Unmarshal(data, &s1); err != nil { 794 return err 795 } 796 s.Deadline = float64(s1.Deadline) 797 s.MinDeadline = float64(s1.MinDeadline) 798 s.OperationDeadline = float64(s1.OperationDeadline) 799 return nil 800} 801 802// Billing: Billing related configuration of the service. 803// 804// The following example shows how to configure monitored resources and 805// metrics 806// for billing: 807// 808// monitored_resources: 809// - type: library.googleapis.com/branch 810// labels: 811// - key: /city 812// description: The city where the library branch is located 813// in. 814// - key: /name 815// description: The name of the branch. 816// metrics: 817// - name: library.googleapis.com/book/borrowed_count 818// metric_kind: DELTA 819// value_type: INT64 820// billing: 821// consumer_destinations: 822// - monitored_resource: library.googleapis.com/branch 823// metrics: 824// - library.googleapis.com/book/borrowed_count 825type Billing struct { 826 // ConsumerDestinations: Billing configurations for sending metrics to 827 // the consumer project. 828 // There can be multiple consumer destinations per service, each one 829 // must have 830 // a different monitored resource type. A metric can be used in at 831 // most 832 // one consumer destination. 833 ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` 834 835 // ForceSendFields is a list of field names (e.g. 836 // "ConsumerDestinations") to unconditionally include in API requests. 837 // By default, fields with empty values are omitted from API requests. 838 // However, any non-pointer, non-interface field appearing in 839 // ForceSendFields will be sent to the server regardless of whether the 840 // field is empty or not. This may be used to include empty fields in 841 // Patch requests. 842 ForceSendFields []string `json:"-"` 843 844 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 845 // include in API requests with the JSON null value. By default, fields 846 // with empty values are omitted from API requests. However, any field 847 // with an empty value appearing in NullFields will be sent to the 848 // server as null. It is an error if a field in this list has a 849 // non-empty value. This may be used to include null fields in Patch 850 // requests. 851 NullFields []string `json:"-"` 852} 853 854func (s *Billing) MarshalJSON() ([]byte, error) { 855 type NoMethod Billing 856 raw := NoMethod(*s) 857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 858} 859 860// BillingConfig: Describes the billing configuration for a new tenant 861// project. 862type BillingConfig struct { 863 // BillingAccount: Name of the billing account. 864 // For example `billingAccounts/012345-567890-ABCDEF`. 865 BillingAccount string `json:"billingAccount,omitempty"` 866 867 // ForceSendFields is a list of field names (e.g. "BillingAccount") to 868 // unconditionally include in API requests. By default, fields with 869 // empty values are omitted from API requests. However, any non-pointer, 870 // non-interface field appearing in ForceSendFields will be sent to the 871 // server regardless of whether the field is empty or not. This may be 872 // used to include empty fields in Patch requests. 873 ForceSendFields []string `json:"-"` 874 875 // NullFields is a list of field names (e.g. "BillingAccount") to 876 // include in API requests with the JSON null value. By default, fields 877 // with empty values are omitted from API requests. However, any field 878 // with an empty value appearing in NullFields will be sent to the 879 // server as null. It is an error if a field in this list has a 880 // non-empty value. This may be used to include null fields in Patch 881 // requests. 882 NullFields []string `json:"-"` 883} 884 885func (s *BillingConfig) MarshalJSON() ([]byte, error) { 886 type NoMethod BillingConfig 887 raw := NoMethod(*s) 888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 889} 890 891// BillingDestination: Configuration of a specific billing destination 892// (Currently only support 893// bill against consumer project). 894type BillingDestination struct { 895 // Metrics: Names of the metrics to report to this billing 896 // destination. 897 // Each name must be defined in Service.metrics section. 898 Metrics []string `json:"metrics,omitempty"` 899 900 // MonitoredResource: The monitored resource type. The type must be 901 // defined in 902 // Service.monitored_resources section. 903 MonitoredResource string `json:"monitoredResource,omitempty"` 904 905 // ForceSendFields is a list of field names (e.g. "Metrics") to 906 // unconditionally include in API requests. By default, fields with 907 // empty values are omitted from API requests. However, any non-pointer, 908 // non-interface field appearing in ForceSendFields will be sent to the 909 // server regardless of whether the field is empty or not. This may be 910 // used to include empty fields in Patch requests. 911 ForceSendFields []string `json:"-"` 912 913 // NullFields is a list of field names (e.g. "Metrics") to include in 914 // API requests with the JSON null value. By default, fields with empty 915 // values are omitted from API requests. However, any field with an 916 // empty value appearing in NullFields will be sent to the server as 917 // null. It is an error if a field in this list has a non-empty value. 918 // This may be used to include null fields in Patch requests. 919 NullFields []string `json:"-"` 920} 921 922func (s *BillingDestination) MarshalJSON() ([]byte, error) { 923 type NoMethod BillingDestination 924 raw := NoMethod(*s) 925 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 926} 927 928// CancelOperationRequest: The request message for 929// Operations.CancelOperation. 930type CancelOperationRequest struct { 931} 932 933// Context: `Context` defines which contexts an API 934// requests. 935// 936// Example: 937// 938// context: 939// rules: 940// - selector: "*" 941// requested: 942// - google.rpc.context.ProjectContext 943// - google.rpc.context.OriginContext 944// 945// The above specifies that all methods in the API 946// request 947// `google.rpc.context.ProjectContext` 948// and 949// `google.rpc.context.OriginContext`. 950// 951// Available context types are defined in 952// package 953// `google.rpc.context`. 954// 955// This also provides mechanism to whitelist any protobuf message 956// extension that 957// can be sent in grpc metadata using 958// “x-goog-ext-<extension_id>-bin” 959// and 960// “x-goog-ext-<extension_id>-jspb” format. For example, list any 961// service 962// specific protobuf types that can appear in grpc metadata as follows 963// in your 964// yaml file: 965// 966// Example: 967// 968// context: 969// rules: 970// - selector: 971// "google.example.library.v1.LibraryService.CreateBook" 972// allowed_request_extensions: 973// - google.foo.v1.NewExtension 974// allowed_response_extensions: 975// - google.foo.v1.NewExtension 976// 977// You can also specify extension ID instead of fully qualified 978// extension name 979// here. 980type Context struct { 981 // Rules: A list of RPC context rules that apply to individual API 982 // methods. 983 // 984 // **NOTE:** All service configuration rules follow "last one wins" 985 // order. 986 Rules []*ContextRule `json:"rules,omitempty"` 987 988 // ForceSendFields is a list of field names (e.g. "Rules") to 989 // unconditionally include in API requests. By default, fields with 990 // empty values are omitted from API requests. However, any non-pointer, 991 // non-interface field appearing in ForceSendFields will be sent to the 992 // server regardless of whether the field is empty or not. This may be 993 // used to include empty fields in Patch requests. 994 ForceSendFields []string `json:"-"` 995 996 // NullFields is a list of field names (e.g. "Rules") to include in API 997 // requests with the JSON null value. By default, fields with empty 998 // values are omitted from API requests. However, any field with an 999 // empty value appearing in NullFields will be sent to the server as 1000 // null. It is an error if a field in this list has a non-empty value. 1001 // This may be used to include null fields in Patch requests. 1002 NullFields []string `json:"-"` 1003} 1004 1005func (s *Context) MarshalJSON() ([]byte, error) { 1006 type NoMethod Context 1007 raw := NoMethod(*s) 1008 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1009} 1010 1011// ContextRule: A context rule provides information about the context 1012// for an individual API 1013// element. 1014type ContextRule struct { 1015 // AllowedRequestExtensions: A list of full type names or extension IDs 1016 // of extensions allowed in grpc 1017 // side channel from client to backend. 1018 AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"` 1019 1020 // AllowedResponseExtensions: A list of full type names or extension IDs 1021 // of extensions allowed in grpc 1022 // side channel from backend to client. 1023 AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` 1024 1025 // Provided: A list of full type names of provided contexts. 1026 Provided []string `json:"provided,omitempty"` 1027 1028 // Requested: A list of full type names of requested contexts. 1029 Requested []string `json:"requested,omitempty"` 1030 1031 // Selector: Selects the methods to which this rule applies. 1032 // 1033 // Refer to selector for syntax details. 1034 Selector string `json:"selector,omitempty"` 1035 1036 // ForceSendFields is a list of field names (e.g. 1037 // "AllowedRequestExtensions") to unconditionally include in API 1038 // requests. By default, fields with empty values are omitted from API 1039 // requests. However, any non-pointer, non-interface field appearing in 1040 // ForceSendFields will be sent to the server regardless of whether the 1041 // field is empty or not. This may be used to include empty fields in 1042 // Patch requests. 1043 ForceSendFields []string `json:"-"` 1044 1045 // NullFields is a list of field names (e.g. "AllowedRequestExtensions") 1046 // to include in API requests with the JSON null value. By default, 1047 // fields with empty values are omitted from API requests. However, any 1048 // field with an empty value appearing in NullFields will be sent to the 1049 // server as null. It is an error if a field in this list has a 1050 // non-empty value. This may be used to include null fields in Patch 1051 // requests. 1052 NullFields []string `json:"-"` 1053} 1054 1055func (s *ContextRule) MarshalJSON() ([]byte, error) { 1056 type NoMethod ContextRule 1057 raw := NoMethod(*s) 1058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1059} 1060 1061// Control: Selects and configures the service controller used by the 1062// service. The 1063// service controller handles features like abuse, quota, billing, 1064// logging, 1065// monitoring, etc. 1066type Control struct { 1067 // Environment: The service control environment to use. If empty, no 1068 // control plane 1069 // feature (like quota and billing) will be enabled. 1070 Environment string `json:"environment,omitempty"` 1071 1072 // ForceSendFields is a list of field names (e.g. "Environment") to 1073 // unconditionally include in API requests. By default, fields with 1074 // empty values are omitted from API requests. However, any non-pointer, 1075 // non-interface field appearing in ForceSendFields will be sent to the 1076 // server regardless of whether the field is empty or not. This may be 1077 // used to include empty fields in Patch requests. 1078 ForceSendFields []string `json:"-"` 1079 1080 // NullFields is a list of field names (e.g. "Environment") to include 1081 // in API requests with the JSON null value. By default, fields with 1082 // empty values are omitted from API requests. However, any field with 1083 // an empty value appearing in NullFields will be sent to the server as 1084 // null. It is an error if a field in this list has a non-empty value. 1085 // This may be used to include null fields in Patch requests. 1086 NullFields []string `json:"-"` 1087} 1088 1089func (s *Control) MarshalJSON() ([]byte, error) { 1090 type NoMethod Control 1091 raw := NoMethod(*s) 1092 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1093} 1094 1095// CreateTenancyUnitRequest: Request to create a tenancy unit for a 1096// service consumer of a managed service. 1097type CreateTenancyUnitRequest struct { 1098 // TenancyUnitId: Optional service producer-provided identifier of the 1099 // tenancy unit. 1100 // Must be no longer than 40 characters and preferably URI friendly. 1101 // If it isn't provided, a UID for the tenancy unit is 1102 // automatically 1103 // generated. The identifier must be unique across a managed service. 1104 // If the tenancy unit already exists for the managed service and 1105 // service 1106 // consumer pair, calling `CreateTenancyUnit` returns the existing 1107 // tenancy 1108 // unit if the provided identifier is identical or empty, otherwise the 1109 // call 1110 // fails. 1111 TenancyUnitId string `json:"tenancyUnitId,omitempty"` 1112 1113 // ForceSendFields is a list of field names (e.g. "TenancyUnitId") to 1114 // unconditionally include in API requests. By default, fields with 1115 // empty values are omitted from API requests. However, any non-pointer, 1116 // non-interface field appearing in ForceSendFields will be sent to the 1117 // server regardless of whether the field is empty or not. This may be 1118 // used to include empty fields in Patch requests. 1119 ForceSendFields []string `json:"-"` 1120 1121 // NullFields is a list of field names (e.g. "TenancyUnitId") to include 1122 // in API requests with the JSON null value. By default, fields with 1123 // empty values are omitted from API requests. However, any field with 1124 // an empty value appearing in NullFields will be sent to the server as 1125 // null. It is an error if a field in this list has a non-empty value. 1126 // This may be used to include null fields in Patch requests. 1127 NullFields []string `json:"-"` 1128} 1129 1130func (s *CreateTenancyUnitRequest) MarshalJSON() ([]byte, error) { 1131 type NoMethod CreateTenancyUnitRequest 1132 raw := NoMethod(*s) 1133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1134} 1135 1136// CustomError: Customize service error responses. For example, list 1137// any service 1138// specific protobuf types that can appear in error detail lists 1139// of 1140// error responses. 1141// 1142// Example: 1143// 1144// custom_error: 1145// types: 1146// - google.foo.v1.CustomError 1147// - google.foo.v1.AnotherError 1148type CustomError struct { 1149 // Rules: The list of custom error rules that apply to individual API 1150 // messages. 1151 // 1152 // **NOTE:** All service configuration rules follow "last one wins" 1153 // order. 1154 Rules []*CustomErrorRule `json:"rules,omitempty"` 1155 1156 // Types: The list of custom error detail types, e.g. 1157 // 'google.foo.v1.CustomError'. 1158 Types []string `json:"types,omitempty"` 1159 1160 // ForceSendFields is a list of field names (e.g. "Rules") to 1161 // unconditionally include in API requests. By default, fields with 1162 // empty values are omitted from API requests. However, any non-pointer, 1163 // non-interface field appearing in ForceSendFields will be sent to the 1164 // server regardless of whether the field is empty or not. This may be 1165 // used to include empty fields in Patch requests. 1166 ForceSendFields []string `json:"-"` 1167 1168 // NullFields is a list of field names (e.g. "Rules") to include in API 1169 // requests with the JSON null value. By default, fields with empty 1170 // values are omitted from API requests. However, any field with an 1171 // empty value appearing in NullFields will be sent to the server as 1172 // null. It is an error if a field in this list has a non-empty value. 1173 // This may be used to include null fields in Patch requests. 1174 NullFields []string `json:"-"` 1175} 1176 1177func (s *CustomError) MarshalJSON() ([]byte, error) { 1178 type NoMethod CustomError 1179 raw := NoMethod(*s) 1180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1181} 1182 1183// CustomErrorRule: A custom error rule. 1184type CustomErrorRule struct { 1185 // IsErrorType: Mark this message as possible payload in error response. 1186 // Otherwise, 1187 // objects of this type will be filtered when they appear in error 1188 // payload. 1189 IsErrorType bool `json:"isErrorType,omitempty"` 1190 1191 // Selector: Selects messages to which this rule applies. 1192 // 1193 // Refer to selector for syntax details. 1194 Selector string `json:"selector,omitempty"` 1195 1196 // ForceSendFields is a list of field names (e.g. "IsErrorType") to 1197 // unconditionally include in API requests. By default, fields with 1198 // empty values are omitted from API requests. However, any non-pointer, 1199 // non-interface field appearing in ForceSendFields will be sent to the 1200 // server regardless of whether the field is empty or not. This may be 1201 // used to include empty fields in Patch requests. 1202 ForceSendFields []string `json:"-"` 1203 1204 // NullFields is a list of field names (e.g. "IsErrorType") to include 1205 // in API requests with the JSON null value. By default, fields with 1206 // empty values are omitted from API requests. However, any field with 1207 // an empty value appearing in NullFields will be sent to the server as 1208 // null. It is an error if a field in this list has a non-empty value. 1209 // This may be used to include null fields in Patch requests. 1210 NullFields []string `json:"-"` 1211} 1212 1213func (s *CustomErrorRule) MarshalJSON() ([]byte, error) { 1214 type NoMethod CustomErrorRule 1215 raw := NoMethod(*s) 1216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1217} 1218 1219// CustomHttpPattern: A custom pattern is used for defining custom HTTP 1220// verb. 1221type CustomHttpPattern struct { 1222 // Kind: The name of this custom HTTP verb. 1223 Kind string `json:"kind,omitempty"` 1224 1225 // Path: The path matched by this custom verb. 1226 Path string `json:"path,omitempty"` 1227 1228 // ForceSendFields is a list of field names (e.g. "Kind") to 1229 // unconditionally include in API requests. By default, fields with 1230 // empty values are omitted from API requests. However, any non-pointer, 1231 // non-interface field appearing in ForceSendFields will be sent to the 1232 // server regardless of whether the field is empty or not. This may be 1233 // used to include empty fields in Patch requests. 1234 ForceSendFields []string `json:"-"` 1235 1236 // NullFields is a list of field names (e.g. "Kind") to include in API 1237 // requests with the JSON null value. By default, fields with empty 1238 // values are omitted from API requests. However, any field with an 1239 // empty value appearing in NullFields will be sent to the server as 1240 // null. It is an error if a field in this list has a non-empty value. 1241 // This may be used to include null fields in Patch requests. 1242 NullFields []string `json:"-"` 1243} 1244 1245func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) { 1246 type NoMethod CustomHttpPattern 1247 raw := NoMethod(*s) 1248 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1249} 1250 1251// DeleteTenantProjectRequest: Request message to delete tenant project 1252// resource from the tenancy unit. 1253type DeleteTenantProjectRequest struct { 1254 // Tag: Tag of the resource within the tenancy unit. 1255 Tag string `json:"tag,omitempty"` 1256 1257 // ForceSendFields is a list of field names (e.g. "Tag") to 1258 // unconditionally include in API requests. By default, fields with 1259 // empty values are omitted from API requests. However, any non-pointer, 1260 // non-interface field appearing in ForceSendFields will be sent to the 1261 // server regardless of whether the field is empty or not. This may be 1262 // used to include empty fields in Patch requests. 1263 ForceSendFields []string `json:"-"` 1264 1265 // NullFields is a list of field names (e.g. "Tag") to include in API 1266 // requests with the JSON null value. By default, fields with empty 1267 // values are omitted from API requests. However, any field with an 1268 // empty value appearing in NullFields will be sent to the server as 1269 // null. It is an error if a field in this list has a non-empty value. 1270 // This may be used to include null fields in Patch requests. 1271 NullFields []string `json:"-"` 1272} 1273 1274func (s *DeleteTenantProjectRequest) MarshalJSON() ([]byte, error) { 1275 type NoMethod DeleteTenantProjectRequest 1276 raw := NoMethod(*s) 1277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1278} 1279 1280// Documentation: `Documentation` provides the information for 1281// describing a service. 1282// 1283// Example: 1284// <pre><code>documentation: 1285// summary: > 1286// The Google Calendar API gives access 1287// to most calendar features. 1288// pages: 1289// - name: Overview 1290// content: (== include google/foo/overview.md ==) 1291// - name: Tutorial 1292// content: (== include google/foo/tutorial.md ==) 1293// subpages; 1294// - name: Java 1295// content: (== include google/foo/tutorial_java.md ==) 1296// rules: 1297// - selector: google.calendar.Calendar.Get 1298// description: > 1299// ... 1300// - selector: google.calendar.Calendar.Put 1301// description: > 1302// ... 1303// </code></pre> 1304// Documentation is provided in markdown syntax. In addition to 1305// standard markdown features, definition lists, tables and fenced 1306// code blocks are supported. Section headers can be provided and 1307// are 1308// interpreted relative to the section nesting of the context where 1309// a documentation fragment is embedded. 1310// 1311// Documentation from the IDL is merged with documentation defined 1312// via the config at normalization time, where documentation provided 1313// by config rules overrides IDL provided. 1314// 1315// A number of constructs specific to the API platform are supported 1316// in documentation text. 1317// 1318// In order to reference a proto element, the following 1319// notation can be 1320// used: 1321// <pre><code>[fully.qualified.proto.name][]</code></pre> 1322// T 1323// o override the display text used for the link, this can be 1324// used: 1325// <pre><code>[display 1326// text][fully.qualified.proto.name]</code></pre> 1327// Text can be excluded from doc using the following 1328// notation: 1329// <pre><code>(-- internal comment --)</code></pre> 1330// 1331// A few directives are available in documentation. Note that 1332// directives must appear on a single line to be properly 1333// identified. The `include` directive includes a markdown file from 1334// an external source: 1335// <pre><code>(== include path/to/file ==)</code></pre> 1336// The `resource_for` directive marks a message to be the resource of 1337// a collection in REST view. If it is not specified, tools attempt 1338// to infer the resource from the operations in a 1339// collection: 1340// <pre><code>(== resource_for v1.shelves.books 1341// ==)</code></pre> 1342// The directive `suppress_warning` does not directly affect 1343// documentation 1344// and is documented together with service config validation. 1345type Documentation struct { 1346 // DocumentationRootUrl: The URL to the root of documentation. 1347 DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` 1348 1349 // Overview: Declares a single overview page. For 1350 // example: 1351 // <pre><code>documentation: 1352 // summary: ... 1353 // overview: (== include overview.md ==) 1354 // </code></pre> 1355 // This is a shortcut for the following declaration (using pages 1356 // style): 1357 // <pre><code>documentation: 1358 // summary: ... 1359 // pages: 1360 // - name: Overview 1361 // content: (== include overview.md ==) 1362 // </code></pre> 1363 // Note: you cannot specify both `overview` field and `pages` field. 1364 Overview string `json:"overview,omitempty"` 1365 1366 // Pages: The top level pages for the documentation set. 1367 Pages []*Page `json:"pages,omitempty"` 1368 1369 // Rules: A list of documentation rules that apply to individual API 1370 // elements. 1371 // 1372 // **NOTE:** All service configuration rules follow "last one wins" 1373 // order. 1374 Rules []*DocumentationRule `json:"rules,omitempty"` 1375 1376 // Summary: A short summary of what the service does. Can only be 1377 // provided by 1378 // plain text. 1379 Summary string `json:"summary,omitempty"` 1380 1381 // ForceSendFields is a list of field names (e.g. 1382 // "DocumentationRootUrl") to unconditionally include in API requests. 1383 // By default, fields with empty values are omitted from API requests. 1384 // However, any non-pointer, non-interface field appearing in 1385 // ForceSendFields will be sent to the server regardless of whether the 1386 // field is empty or not. This may be used to include empty fields in 1387 // Patch requests. 1388 ForceSendFields []string `json:"-"` 1389 1390 // NullFields is a list of field names (e.g. "DocumentationRootUrl") to 1391 // include in API requests with the JSON null value. By default, fields 1392 // with empty values are omitted from API requests. However, any field 1393 // with an empty value appearing in NullFields will be sent to the 1394 // server as null. It is an error if a field in this list has a 1395 // non-empty value. This may be used to include null fields in Patch 1396 // requests. 1397 NullFields []string `json:"-"` 1398} 1399 1400func (s *Documentation) MarshalJSON() ([]byte, error) { 1401 type NoMethod Documentation 1402 raw := NoMethod(*s) 1403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1404} 1405 1406// DocumentationRule: A documentation rule provides information about 1407// individual API elements. 1408type DocumentationRule struct { 1409 // DeprecationDescription: Deprecation description of the selected 1410 // element(s). It can be provided if 1411 // an element is marked as `deprecated`. 1412 DeprecationDescription string `json:"deprecationDescription,omitempty"` 1413 1414 // Description: Description of the selected API(s). 1415 Description string `json:"description,omitempty"` 1416 1417 // Selector: The selector is a comma-separated list of patterns. Each 1418 // pattern is a 1419 // qualified name of the element which may end in "*", indicating a 1420 // wildcard. 1421 // Wildcards are only allowed at the end and for a whole component of 1422 // the 1423 // qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". 1424 // A 1425 // wildcard will match one or more components. To specify a default for 1426 // all 1427 // applicable elements, the whole pattern "*" is used. 1428 Selector string `json:"selector,omitempty"` 1429 1430 // ForceSendFields is a list of field names (e.g. 1431 // "DeprecationDescription") 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. "DeprecationDescription") 1440 // to include in API requests with the JSON null value. By default, 1441 // fields with empty values are omitted from API requests. However, any 1442 // field 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 *DocumentationRule) MarshalJSON() ([]byte, error) { 1450 type NoMethod DocumentationRule 1451 raw := NoMethod(*s) 1452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1453} 1454 1455// Empty: A generic empty message that you can re-use to avoid defining 1456// duplicated 1457// empty messages in your APIs. A typical example is to use it as the 1458// request 1459// or the response type of an API method. For instance: 1460// 1461// service Foo { 1462// rpc Bar(google.protobuf.Empty) returns 1463// (google.protobuf.Empty); 1464// } 1465// 1466// The JSON representation for `Empty` is empty JSON object `{}`. 1467type Empty struct { 1468 // ServerResponse contains the HTTP response code and headers from the 1469 // server. 1470 googleapi.ServerResponse `json:"-"` 1471} 1472 1473// Endpoint: `Endpoint` describes a network endpoint that serves a set 1474// of APIs. 1475// A service may expose any number of endpoints, and all endpoints share 1476// the 1477// same service configuration, such as quota configuration and 1478// monitoring 1479// configuration. 1480// 1481// Example service configuration: 1482// 1483// name: library-example.googleapis.com 1484// endpoints: 1485// # Below entry makes 'google.example.library.v1.Library' 1486// # API be served from endpoint address 1487// library-example.googleapis.com. 1488// # It also allows HTTP OPTIONS calls to be passed to the 1489// backend, for 1490// # it to decide whether the subsequent cross-origin request is 1491// # allowed to proceed. 1492// - name: library-example.googleapis.com 1493// allow_cors: true 1494type Endpoint struct { 1495 // Aliases: DEPRECATED: This field is no longer supported. Instead of 1496 // using aliases, 1497 // please specify multiple google.api.Endpoint for each of the 1498 // intended 1499 // aliases. 1500 // 1501 // Additional names that this endpoint will be hosted on. 1502 Aliases []string `json:"aliases,omitempty"` 1503 1504 // AllowCors: 1505 // Allowing 1506 // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sh 1507 // aring), aka 1508 // cross-domain traffic, would allow the backends served from this 1509 // endpoint to 1510 // receive and respond to HTTP OPTIONS requests. The response will be 1511 // used by 1512 // the browser to determine whether the subsequent cross-origin request 1513 // is 1514 // allowed to proceed. 1515 AllowCors bool `json:"allowCors,omitempty"` 1516 1517 // Features: The list of features enabled on this endpoint. 1518 Features []string `json:"features,omitempty"` 1519 1520 // Name: The canonical name of this endpoint. 1521 Name string `json:"name,omitempty"` 1522 1523 // Target: The specification of an Internet routable address of API 1524 // frontend that will 1525 // handle requests to this 1526 // [API 1527 // Endpoint](https://cloud.google.com/apis/design/glossary). It should 1528 // be 1529 // either a valid IPv4 address or a fully-qualified domain name. For 1530 // example, 1531 // "8.8.8.8" or "myservice.appspot.com". 1532 Target string `json:"target,omitempty"` 1533 1534 // ForceSendFields is a list of field names (e.g. "Aliases") to 1535 // unconditionally include in API requests. By default, fields with 1536 // empty values are omitted from API requests. However, any non-pointer, 1537 // non-interface field appearing in ForceSendFields will be sent to the 1538 // server regardless of whether the field is empty or not. This may be 1539 // used to include empty fields in Patch requests. 1540 ForceSendFields []string `json:"-"` 1541 1542 // NullFields is a list of field names (e.g. "Aliases") to include in 1543 // API requests with the JSON null value. By default, fields with empty 1544 // values are omitted from API requests. However, any field with an 1545 // empty value appearing in NullFields will be sent to the server as 1546 // null. It is an error if a field in this list has a non-empty value. 1547 // This may be used to include null fields in Patch requests. 1548 NullFields []string `json:"-"` 1549} 1550 1551func (s *Endpoint) MarshalJSON() ([]byte, error) { 1552 type NoMethod Endpoint 1553 raw := NoMethod(*s) 1554 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1555} 1556 1557// Enum: Enum type definition. 1558type Enum struct { 1559 // Enumvalue: Enum value definitions. 1560 Enumvalue []*EnumValue `json:"enumvalue,omitempty"` 1561 1562 // Name: Enum type name. 1563 Name string `json:"name,omitempty"` 1564 1565 // Options: Protocol buffer options. 1566 Options []*Option `json:"options,omitempty"` 1567 1568 // SourceContext: The source context. 1569 SourceContext *SourceContext `json:"sourceContext,omitempty"` 1570 1571 // Syntax: The source syntax. 1572 // 1573 // Possible values: 1574 // "SYNTAX_PROTO2" - Syntax `proto2`. 1575 // "SYNTAX_PROTO3" - Syntax `proto3`. 1576 Syntax string `json:"syntax,omitempty"` 1577 1578 // ForceSendFields is a list of field names (e.g. "Enumvalue") to 1579 // unconditionally include in API requests. By default, fields with 1580 // empty values are omitted from API requests. However, any non-pointer, 1581 // non-interface field appearing in ForceSendFields will be sent to the 1582 // server regardless of whether the field is empty or not. This may be 1583 // used to include empty fields in Patch requests. 1584 ForceSendFields []string `json:"-"` 1585 1586 // NullFields is a list of field names (e.g. "Enumvalue") to include in 1587 // API requests with the JSON null value. By default, fields with empty 1588 // values are omitted from API requests. However, any field with an 1589 // empty value appearing in NullFields will be sent to the server as 1590 // null. It is an error if a field in this list has a non-empty value. 1591 // This may be used to include null fields in Patch requests. 1592 NullFields []string `json:"-"` 1593} 1594 1595func (s *Enum) MarshalJSON() ([]byte, error) { 1596 type NoMethod Enum 1597 raw := NoMethod(*s) 1598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1599} 1600 1601// EnumValue: Enum value definition. 1602type EnumValue struct { 1603 // Name: Enum value name. 1604 Name string `json:"name,omitempty"` 1605 1606 // Number: Enum value number. 1607 Number int64 `json:"number,omitempty"` 1608 1609 // Options: Protocol buffer options. 1610 Options []*Option `json:"options,omitempty"` 1611 1612 // ForceSendFields is a list of field names (e.g. "Name") to 1613 // unconditionally include in API requests. By default, fields with 1614 // empty values are omitted from API requests. However, any non-pointer, 1615 // non-interface field appearing in ForceSendFields will be sent to the 1616 // server regardless of whether the field is empty or not. This may be 1617 // used to include empty fields in Patch requests. 1618 ForceSendFields []string `json:"-"` 1619 1620 // NullFields is a list of field names (e.g. "Name") to include in API 1621 // requests with the JSON null value. By default, fields with empty 1622 // values are omitted from API requests. However, any field with an 1623 // empty value appearing in NullFields will be sent to the server as 1624 // null. It is an error if a field in this list has a non-empty value. 1625 // This may be used to include null fields in Patch requests. 1626 NullFields []string `json:"-"` 1627} 1628 1629func (s *EnumValue) MarshalJSON() ([]byte, error) { 1630 type NoMethod EnumValue 1631 raw := NoMethod(*s) 1632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1633} 1634 1635// Field: A single field of a message type. 1636type Field struct { 1637 // Cardinality: The field cardinality. 1638 // 1639 // Possible values: 1640 // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. 1641 // "CARDINALITY_OPTIONAL" - For optional fields. 1642 // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. 1643 // "CARDINALITY_REPEATED" - For repeated fields. 1644 Cardinality string `json:"cardinality,omitempty"` 1645 1646 // DefaultValue: The string value of the default value of this field. 1647 // Proto2 syntax only. 1648 DefaultValue string `json:"defaultValue,omitempty"` 1649 1650 // JsonName: The field JSON name. 1651 JsonName string `json:"jsonName,omitempty"` 1652 1653 // Kind: The field type. 1654 // 1655 // Possible values: 1656 // "TYPE_UNKNOWN" - Field type unknown. 1657 // "TYPE_DOUBLE" - Field type double. 1658 // "TYPE_FLOAT" - Field type float. 1659 // "TYPE_INT64" - Field type int64. 1660 // "TYPE_UINT64" - Field type uint64. 1661 // "TYPE_INT32" - Field type int32. 1662 // "TYPE_FIXED64" - Field type fixed64. 1663 // "TYPE_FIXED32" - Field type fixed32. 1664 // "TYPE_BOOL" - Field type bool. 1665 // "TYPE_STRING" - Field type string. 1666 // "TYPE_GROUP" - Field type group. Proto2 syntax only, and 1667 // deprecated. 1668 // "TYPE_MESSAGE" - Field type message. 1669 // "TYPE_BYTES" - Field type bytes. 1670 // "TYPE_UINT32" - Field type uint32. 1671 // "TYPE_ENUM" - Field type enum. 1672 // "TYPE_SFIXED32" - Field type sfixed32. 1673 // "TYPE_SFIXED64" - Field type sfixed64. 1674 // "TYPE_SINT32" - Field type sint32. 1675 // "TYPE_SINT64" - Field type sint64. 1676 Kind string `json:"kind,omitempty"` 1677 1678 // Name: The field name. 1679 Name string `json:"name,omitempty"` 1680 1681 // Number: The field number. 1682 Number int64 `json:"number,omitempty"` 1683 1684 // OneofIndex: The index of the field type in `Type.oneofs`, for message 1685 // or enumeration 1686 // types. The first type has index 1; zero means the type is not in the 1687 // list. 1688 OneofIndex int64 `json:"oneofIndex,omitempty"` 1689 1690 // Options: The protocol buffer options. 1691 Options []*Option `json:"options,omitempty"` 1692 1693 // Packed: Whether to use alternative packed wire representation. 1694 Packed bool `json:"packed,omitempty"` 1695 1696 // TypeUrl: The field type URL, without the scheme, for message or 1697 // enumeration 1698 // types. Example: "type.googleapis.com/google.protobuf.Timestamp". 1699 TypeUrl string `json:"typeUrl,omitempty"` 1700 1701 // ForceSendFields is a list of field names (e.g. "Cardinality") to 1702 // unconditionally include in API requests. By default, fields with 1703 // empty values are omitted from API requests. However, any non-pointer, 1704 // non-interface field appearing in ForceSendFields will be sent to the 1705 // server regardless of whether the field is empty or not. This may be 1706 // used to include empty fields in Patch requests. 1707 ForceSendFields []string `json:"-"` 1708 1709 // NullFields is a list of field names (e.g. "Cardinality") to include 1710 // in API requests with the JSON null value. By default, fields with 1711 // empty values are omitted from API requests. However, any field with 1712 // an empty value appearing in NullFields will be sent to the server as 1713 // null. It is an error if a field in this list has a non-empty value. 1714 // This may be used to include null fields in Patch requests. 1715 NullFields []string `json:"-"` 1716} 1717 1718func (s *Field) MarshalJSON() ([]byte, error) { 1719 type NoMethod Field 1720 raw := NoMethod(*s) 1721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1722} 1723 1724// Http: Defines the HTTP configuration for an API service. It contains 1725// a list of 1726// HttpRule, each specifying the mapping of an RPC method 1727// to one or more HTTP REST API methods. 1728type Http struct { 1729 // FullyDecodeReservedExpansion: When set to true, URL path parameters 1730 // will be fully URI-decoded except in 1731 // cases of single segment matches in reserved expansion, where "%2F" 1732 // will be 1733 // left encoded. 1734 // 1735 // The default behavior is to not decode RFC 6570 reserved characters in 1736 // multi 1737 // segment matches. 1738 FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"` 1739 1740 // Rules: A list of HTTP configuration rules that apply to individual 1741 // API methods. 1742 // 1743 // **NOTE:** All service configuration rules follow "last one wins" 1744 // order. 1745 Rules []*HttpRule `json:"rules,omitempty"` 1746 1747 // ForceSendFields is a list of field names (e.g. 1748 // "FullyDecodeReservedExpansion") to unconditionally include in API 1749 // requests. By default, fields with empty values are omitted from API 1750 // requests. However, any non-pointer, non-interface field appearing in 1751 // ForceSendFields will be sent to the server regardless of whether the 1752 // field is empty or not. This may be used to include empty fields in 1753 // Patch requests. 1754 ForceSendFields []string `json:"-"` 1755 1756 // NullFields is a list of field names (e.g. 1757 // "FullyDecodeReservedExpansion") to include in API requests with the 1758 // JSON null value. By default, fields with empty values are omitted 1759 // from API requests. However, any field with an empty value appearing 1760 // in NullFields will be sent to the server as null. It is an error if a 1761 // field in this list has a non-empty value. This may be used to include 1762 // null fields in Patch requests. 1763 NullFields []string `json:"-"` 1764} 1765 1766func (s *Http) MarshalJSON() ([]byte, error) { 1767 type NoMethod Http 1768 raw := NoMethod(*s) 1769 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1770} 1771 1772// HttpRule: # gRPC Transcoding 1773// 1774// gRPC Transcoding is a feature for mapping between a gRPC method and 1775// one or 1776// more HTTP REST endpoints. It allows developers to build a single API 1777// service 1778// that supports both gRPC APIs and REST APIs. Many systems, including 1779// [Google 1780// APIs](https://github.com/googleapis/googleapis), 1781// [Cloud Endpoints](https://cloud.google.com/endpoints), 1782// [gRPC 1783// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), 1784// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this 1785// feature 1786// and use it for large scale production services. 1787// 1788// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping 1789// specifies 1790// how different portions of the gRPC request message are mapped to the 1791// URL 1792// path, URL query parameters, and HTTP request body. It also controls 1793// how the 1794// gRPC response message is mapped to the HTTP response body. `HttpRule` 1795// is 1796// typically specified as an `google.api.http` annotation on the gRPC 1797// method. 1798// 1799// Each mapping specifies a URL path template and an HTTP method. The 1800// path 1801// template may refer to one or more fields in the gRPC request message, 1802// as long 1803// as each field is a non-repeated field with a primitive (non-message) 1804// type. 1805// The path template controls how fields of the request message are 1806// mapped to 1807// the URL path. 1808// 1809// Example: 1810// 1811// service Messaging { 1812// rpc GetMessage(GetMessageRequest) returns (Message) { 1813// option (google.api.http) = { 1814// get: "/v1/{name=messages/*}" 1815// }; 1816// } 1817// } 1818// message GetMessageRequest { 1819// string name = 1; // Mapped to URL path. 1820// } 1821// message Message { 1822// string text = 1; // The resource content. 1823// } 1824// 1825// This enables an HTTP REST to gRPC mapping as below: 1826// 1827// HTTP | gRPC 1828// -----|----- 1829// `GET /v1/messages/123456` | `GetMessage(name: 1830// "messages/123456")` 1831// 1832// Any fields in the request message which are not bound by the path 1833// template 1834// automatically become HTTP query parameters if there is no HTTP 1835// request body. 1836// For example: 1837// 1838// service Messaging { 1839// rpc GetMessage(GetMessageRequest) returns (Message) { 1840// option (google.api.http) = { 1841// get:"/v1/messages/{message_id}" 1842// }; 1843// } 1844// } 1845// message GetMessageRequest { 1846// message SubMessage { 1847// string subfield = 1; 1848// } 1849// string message_id = 1; // Mapped to URL path. 1850// int64 revision = 2; // Mapped to URL query parameter 1851// `revision`. 1852// SubMessage sub = 3; // Mapped to URL query parameter 1853// `sub.subfield`. 1854// } 1855// 1856// This enables a HTTP JSON to RPC mapping as below: 1857// 1858// HTTP | gRPC 1859// -----|----- 1860// `GET /v1/messages/123456?revision=2&sub.subfield=foo` 1861// | 1862// `GetMessage(message_id: "123456" revision: 2 sub: 1863// SubMessage(subfield: 1864// "foo"))` 1865// 1866// Note that fields which are mapped to URL query parameters must have 1867// a 1868// primitive type or a repeated primitive type or a non-repeated message 1869// type. 1870// In the case of a repeated type, the parameter can be repeated in the 1871// URL 1872// as `...?param=A¶m=B`. In the case of a message type, each field 1873// of the 1874// message is mapped to a separate parameter, such 1875// as 1876// `...?foo.a=A&foo.b=B&foo.c=C`. 1877// 1878// For HTTP methods that allow a request body, the `body` 1879// field 1880// specifies the mapping. Consider a REST update method on the 1881// message resource collection: 1882// 1883// service Messaging { 1884// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { 1885// option (google.api.http) = { 1886// patch: "/v1/messages/{message_id}" 1887// body: "message" 1888// }; 1889// } 1890// } 1891// message UpdateMessageRequest { 1892// string message_id = 1; // mapped to the URL 1893// Message message = 2; // mapped to the body 1894// } 1895// 1896// The following HTTP JSON to RPC mapping is enabled, where 1897// the 1898// representation of the JSON in the request body is determined 1899// by 1900// protos JSON encoding: 1901// 1902// HTTP | gRPC 1903// -----|----- 1904// `PATCH /v1/messages/123456 { "text": "Hi!" }` | 1905// `UpdateMessage(message_id: 1906// "123456" message { text: "Hi!" })` 1907// 1908// The special name `*` can be used in the body mapping to define 1909// that 1910// every field not bound by the path template should be mapped to 1911// the 1912// request body. This enables the following alternative definition 1913// of 1914// the update method: 1915// 1916// service Messaging { 1917// rpc UpdateMessage(Message) returns (Message) { 1918// option (google.api.http) = { 1919// patch: "/v1/messages/{message_id}" 1920// body: "*" 1921// }; 1922// } 1923// } 1924// message Message { 1925// string message_id = 1; 1926// string text = 2; 1927// } 1928// 1929// 1930// The following HTTP JSON to RPC mapping is enabled: 1931// 1932// HTTP | gRPC 1933// -----|----- 1934// `PATCH /v1/messages/123456 { "text": "Hi!" }` | 1935// `UpdateMessage(message_id: 1936// "123456" text: "Hi!")` 1937// 1938// Note that when using `*` in the body mapping, it is not possible 1939// to 1940// have HTTP parameters, as all fields not bound by the path end in 1941// the body. This makes this option more rarely used in practice 1942// when 1943// defining REST APIs. The common usage of `*` is in custom 1944// methods 1945// which don't use the URL at all for transferring data. 1946// 1947// It is possible to define multiple HTTP methods for one RPC by 1948// using 1949// the `additional_bindings` option. Example: 1950// 1951// service Messaging { 1952// rpc GetMessage(GetMessageRequest) returns (Message) { 1953// option (google.api.http) = { 1954// get: "/v1/messages/{message_id}" 1955// additional_bindings { 1956// get: "/v1/users/{user_id}/messages/{message_id}" 1957// } 1958// }; 1959// } 1960// } 1961// message GetMessageRequest { 1962// string message_id = 1; 1963// string user_id = 2; 1964// } 1965// 1966// This enables the following two alternative HTTP JSON to RPC 1967// mappings: 1968// 1969// HTTP | gRPC 1970// -----|----- 1971// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` 1972// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" 1973// message_id: 1974// "123456")` 1975// 1976// ## Rules for HTTP mapping 1977// 1978// 1. Leaf request fields (recursive expansion nested messages in the 1979// request 1980// message) are classified into three categories: 1981// - Fields referred by the path template. They are passed via the 1982// URL path. 1983// - Fields referred by the HttpRule.body. They are passed via the 1984// HTTP 1985// request body. 1986// - All other fields are passed via the URL query parameters, and 1987// the 1988// parameter name is the field path in the request message. A 1989// repeated 1990// field can be represented as multiple query parameters under the 1991// same 1992// name. 1993// 2. If HttpRule.body is "*", there is no URL query parameter, all 1994// fields 1995// are passed via URL path and HTTP request body. 1996// 3. If HttpRule.body is omitted, there is no HTTP request body, all 1997// fields are passed via URL path and URL query parameters. 1998// 1999// ### Path template syntax 2000// 2001// Template = "/" Segments [ Verb ] ; 2002// Segments = Segment { "/" Segment } ; 2003// Segment = "*" | "**" | LITERAL | Variable ; 2004// Variable = "{" FieldPath [ "=" Segments ] "}" ; 2005// FieldPath = IDENT { "." IDENT } ; 2006// Verb = ":" LITERAL ; 2007// 2008// The syntax `*` matches a single URL path segment. The syntax `**` 2009// matches 2010// zero or more URL path segments, which must be the last part of the 2011// URL path 2012// except the `Verb`. 2013// 2014// The syntax `Variable` matches part of the URL path as specified by 2015// its 2016// template. A variable template must not contain other variables. If a 2017// variable 2018// matches a single path segment, its template may be omitted, e.g. 2019// `{var}` 2020// is equivalent to `{var=*}`. 2021// 2022// The syntax `LITERAL` matches literal text in the URL path. If the 2023// `LITERAL` 2024// contains any reserved character, such characters should be 2025// percent-encoded 2026// before the matching. 2027// 2028// If a variable contains exactly one path segment, such as "{var}" 2029// or 2030// "{var=*}", when such a variable is expanded into a URL path on the 2031// client 2032// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. 2033// The 2034// server side does the reverse decoding. Such variables show up in 2035// the 2036// [Discovery 2037// Document](https://developers.google.com/discovery/v1/re 2038// ference/apis) as 2039// `{var}`. 2040// 2041// If a variable contains multiple path segments, such as 2042// "{var=foo/*}" 2043// or "{var=**}", when such a variable is expanded into a URL path on 2044// the 2045// client side, all characters except `[-_.~/0-9a-zA-Z]` are 2046// percent-encoded. 2047// The server side does the reverse decoding, except "%2F" and "%2f" are 2048// left 2049// unchanged. Such variables show up in 2050// the 2051// [Discovery 2052// Document](https://developers.google.com/discovery/v1/re 2053// ference/apis) as 2054// `{+var}`. 2055// 2056// ## Using gRPC API Service Configuration 2057// 2058// gRPC API Service Configuration (service config) is a configuration 2059// language 2060// for configuring a gRPC service to become a user-facing product. 2061// The 2062// service config is simply the YAML representation of the 2063// `google.api.Service` 2064// proto message. 2065// 2066// As an alternative to annotating your proto file, you can configure 2067// gRPC 2068// transcoding in your service config YAML files. You do this by 2069// specifying a 2070// `HttpRule` that maps the gRPC method to a REST endpoint, achieving 2071// the same 2072// effect as the proto annotation. This can be particularly useful if 2073// you 2074// have a proto that is reused in multiple services. Note that any 2075// transcoding 2076// specified in the service config will override any matching 2077// transcoding 2078// configuration in the proto. 2079// 2080// Example: 2081// 2082// http: 2083// rules: 2084// # Selects a gRPC method and applies HttpRule to it. 2085// - selector: example.v1.Messaging.GetMessage 2086// get: /v1/messages/{message_id}/{sub.subfield} 2087// 2088// ## Special notes 2089// 2090// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, 2091// the 2092// proto to JSON conversion must follow the 2093// [proto3 2094// specification](https://developers.google.com/protocol-buffers/ 2095// docs/proto3#json). 2096// 2097// While the single segment variable follows the semantics of 2098// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple 2099// String 2100// Expansion, the multi segment variable **does not** follow RFC 6570 2101// Section 2102// 3.2.3 Reserved Expansion. The reason is that the Reserved 2103// Expansion 2104// does not expand special characters like `?` and `#`, which would 2105// lead 2106// to invalid URLs. As the result, gRPC Transcoding uses a custom 2107// encoding 2108// for multi segment variables. 2109// 2110// The path variables **must not** refer to any repeated or mapped 2111// field, 2112// because client libraries are not capable of handling such variable 2113// expansion. 2114// 2115// The path variables **must not** capture the leading "/" character. 2116// The reason 2117// is that the most common use case "{var}" does not capture the leading 2118// "/" 2119// character. For consistency, all path variables must share the same 2120// behavior. 2121// 2122// Repeated message fields must not be mapped to URL query parameters, 2123// because 2124// no client library can support such complicated mapping. 2125// 2126// If an API needs to use a JSON array for request or response body, it 2127// can map 2128// the request or response body to a repeated field. However, some 2129// gRPC 2130// Transcoding implementations may not support this feature. 2131type HttpRule struct { 2132 // AdditionalBindings: Additional HTTP bindings for the selector. Nested 2133 // bindings must 2134 // not contain an `additional_bindings` field themselves (that is, 2135 // the nesting may only be one level deep). 2136 AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` 2137 2138 // Body: The name of the request field whose value is mapped to the HTTP 2139 // request 2140 // body, or `*` for mapping all request fields not captured by the 2141 // path 2142 // pattern to the HTTP body, or omitted for not having any HTTP request 2143 // body. 2144 // 2145 // NOTE: the referred field must be present at the top-level of the 2146 // request 2147 // message type. 2148 Body string `json:"body,omitempty"` 2149 2150 // Custom: The custom pattern is used for specifying an HTTP method that 2151 // is not 2152 // included in the `pattern` field, such as HEAD, or "*" to leave 2153 // the 2154 // HTTP method unspecified for this rule. The wild-card rule is 2155 // useful 2156 // for services that provide content to Web (HTML) clients. 2157 Custom *CustomHttpPattern `json:"custom,omitempty"` 2158 2159 // Delete: Maps to HTTP DELETE. Used for deleting a resource. 2160 Delete string `json:"delete,omitempty"` 2161 2162 // Get: Maps to HTTP GET. Used for listing and getting information 2163 // about 2164 // resources. 2165 Get string `json:"get,omitempty"` 2166 2167 // Patch: Maps to HTTP PATCH. Used for updating a resource. 2168 Patch string `json:"patch,omitempty"` 2169 2170 // Post: Maps to HTTP POST. Used for creating a resource or performing 2171 // an action. 2172 Post string `json:"post,omitempty"` 2173 2174 // Put: Maps to HTTP PUT. Used for replacing a resource. 2175 Put string `json:"put,omitempty"` 2176 2177 // ResponseBody: Optional. The name of the response field whose value is 2178 // mapped to the HTTP 2179 // response body. When omitted, the entire response message will be 2180 // used 2181 // as the HTTP response body. 2182 // 2183 // NOTE: The referred field must be present at the top-level of the 2184 // response 2185 // message type. 2186 ResponseBody string `json:"responseBody,omitempty"` 2187 2188 // Selector: Selects a method to which this rule applies. 2189 // 2190 // Refer to selector for syntax details. 2191 Selector string `json:"selector,omitempty"` 2192 2193 // ForceSendFields is a list of field names (e.g. "AdditionalBindings") 2194 // to unconditionally include in API requests. By default, fields with 2195 // empty values are omitted from API requests. However, any non-pointer, 2196 // non-interface field appearing in ForceSendFields will be sent to the 2197 // server regardless of whether the field is empty or not. This may be 2198 // used to include empty fields in Patch requests. 2199 ForceSendFields []string `json:"-"` 2200 2201 // NullFields is a list of field names (e.g. "AdditionalBindings") to 2202 // include in API requests with the JSON null value. By default, fields 2203 // with empty values are omitted from API requests. However, any field 2204 // with an empty value appearing in NullFields will be sent to the 2205 // server as null. It is an error if a field in this list has a 2206 // non-empty value. This may be used to include null fields in Patch 2207 // requests. 2208 NullFields []string `json:"-"` 2209} 2210 2211func (s *HttpRule) MarshalJSON() ([]byte, error) { 2212 type NoMethod HttpRule 2213 raw := NoMethod(*s) 2214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2215} 2216 2217// LabelDescriptor: A description of a label. 2218type LabelDescriptor struct { 2219 // Description: A human-readable description for the label. 2220 Description string `json:"description,omitempty"` 2221 2222 // Key: The label key. 2223 Key string `json:"key,omitempty"` 2224 2225 // ValueType: The type of data that can be assigned to the label. 2226 // 2227 // Possible values: 2228 // "STRING" - A variable-length string. This is the default. 2229 // "BOOL" - Boolean; true or false. 2230 // "INT64" - A 64-bit signed integer. 2231 ValueType string `json:"valueType,omitempty"` 2232 2233 // ForceSendFields is a list of field names (e.g. "Description") to 2234 // unconditionally include in API requests. By default, fields with 2235 // empty values are omitted from API requests. However, any non-pointer, 2236 // non-interface field appearing in ForceSendFields will be sent to the 2237 // server regardless of whether the field is empty or not. This may be 2238 // used to include empty fields in Patch requests. 2239 ForceSendFields []string `json:"-"` 2240 2241 // NullFields is a list of field names (e.g. "Description") to include 2242 // in API requests with the JSON null value. By default, fields with 2243 // empty values are omitted from API requests. However, any field with 2244 // an empty value appearing in NullFields will be sent to the server as 2245 // null. It is an error if a field in this list has a non-empty value. 2246 // This may be used to include null fields in Patch requests. 2247 NullFields []string `json:"-"` 2248} 2249 2250func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { 2251 type NoMethod LabelDescriptor 2252 raw := NoMethod(*s) 2253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2254} 2255 2256// ListOperationsResponse: The response message for 2257// Operations.ListOperations. 2258type ListOperationsResponse struct { 2259 // NextPageToken: The standard List next-page token. 2260 NextPageToken string `json:"nextPageToken,omitempty"` 2261 2262 // Operations: A list of operations that matches the specified filter in 2263 // the request. 2264 Operations []*Operation `json:"operations,omitempty"` 2265 2266 // ServerResponse contains the HTTP response code and headers from the 2267 // server. 2268 googleapi.ServerResponse `json:"-"` 2269 2270 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2271 // unconditionally include in API requests. By default, fields with 2272 // empty values are omitted from API requests. However, any non-pointer, 2273 // non-interface field appearing in ForceSendFields will be sent to the 2274 // server regardless of whether the field is empty or not. This may be 2275 // used to include empty fields in Patch requests. 2276 ForceSendFields []string `json:"-"` 2277 2278 // NullFields is a list of field names (e.g. "NextPageToken") to include 2279 // in API requests with the JSON null value. By default, fields with 2280 // empty values are omitted from API requests. However, any field with 2281 // an empty value appearing in NullFields will be sent to the server as 2282 // null. It is an error if a field in this list has a non-empty value. 2283 // This may be used to include null fields in Patch requests. 2284 NullFields []string `json:"-"` 2285} 2286 2287func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2288 type NoMethod ListOperationsResponse 2289 raw := NoMethod(*s) 2290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2291} 2292 2293// ListTenancyUnitsResponse: Response for the list request. 2294type ListTenancyUnitsResponse struct { 2295 // NextPageToken: Pagination token for large results. 2296 NextPageToken string `json:"nextPageToken,omitempty"` 2297 2298 // TenancyUnits: Tenancy units matching the request. 2299 TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"` 2300 2301 // ServerResponse contains the HTTP response code and headers from the 2302 // server. 2303 googleapi.ServerResponse `json:"-"` 2304 2305 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2306 // unconditionally include in API requests. By default, fields with 2307 // empty values are omitted from API requests. However, any non-pointer, 2308 // non-interface field appearing in ForceSendFields will be sent to the 2309 // server regardless of whether the field is empty or not. This may be 2310 // used to include empty fields in Patch requests. 2311 ForceSendFields []string `json:"-"` 2312 2313 // NullFields is a list of field names (e.g. "NextPageToken") to include 2314 // in API requests with the JSON null value. By default, fields with 2315 // empty values are omitted from API requests. However, any field with 2316 // an empty value appearing in NullFields will be sent to the server as 2317 // null. It is an error if a field in this list has a non-empty value. 2318 // This may be used to include null fields in Patch requests. 2319 NullFields []string `json:"-"` 2320} 2321 2322func (s *ListTenancyUnitsResponse) MarshalJSON() ([]byte, error) { 2323 type NoMethod ListTenancyUnitsResponse 2324 raw := NoMethod(*s) 2325 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2326} 2327 2328// LogDescriptor: A description of a log type. Example in YAML format: 2329// 2330// - name: library.googleapis.com/activity_history 2331// description: The history of borrowing and returning library 2332// items. 2333// display_name: Activity 2334// labels: 2335// - key: /customer_id 2336// description: Identifier of a library customer 2337type LogDescriptor struct { 2338 // Description: A human-readable description of this log. This 2339 // information appears in 2340 // the documentation and can contain details. 2341 Description string `json:"description,omitempty"` 2342 2343 // DisplayName: The human-readable name for this log. This information 2344 // appears on 2345 // the user interface and should be concise. 2346 DisplayName string `json:"displayName,omitempty"` 2347 2348 // Labels: The set of labels that are available to describe a specific 2349 // log entry. 2350 // Runtime requests that contain labels not specified here 2351 // are 2352 // considered invalid. 2353 Labels []*LabelDescriptor `json:"labels,omitempty"` 2354 2355 // Name: The name of the log. It must be less than 512 characters long 2356 // and can 2357 // include the following characters: upper- and lower-case 2358 // alphanumeric 2359 // characters [A-Za-z0-9], and punctuation characters including 2360 // slash, underscore, hyphen, period [/_-.]. 2361 Name string `json:"name,omitempty"` 2362 2363 // ForceSendFields is a list of field names (e.g. "Description") to 2364 // unconditionally include in API requests. By default, fields with 2365 // empty values are omitted from API requests. However, any non-pointer, 2366 // non-interface field appearing in ForceSendFields will be sent to the 2367 // server regardless of whether the field is empty or not. This may be 2368 // used to include empty fields in Patch requests. 2369 ForceSendFields []string `json:"-"` 2370 2371 // NullFields is a list of field names (e.g. "Description") to include 2372 // in API requests with the JSON null value. By default, fields with 2373 // empty values are omitted from API requests. However, any field with 2374 // an empty value appearing in NullFields will be sent to the server as 2375 // null. It is an error if a field in this list has a non-empty value. 2376 // This may be used to include null fields in Patch requests. 2377 NullFields []string `json:"-"` 2378} 2379 2380func (s *LogDescriptor) MarshalJSON() ([]byte, error) { 2381 type NoMethod LogDescriptor 2382 raw := NoMethod(*s) 2383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2384} 2385 2386// Logging: Logging configuration of the service. 2387// 2388// The following example shows how to configure logs to be sent to 2389// the 2390// producer and consumer projects. In the example, the 2391// `activity_history` 2392// log is sent to both the producer and consumer projects, whereas 2393// the 2394// `purchase_history` log is only sent to the producer project. 2395// 2396// monitored_resources: 2397// - type: library.googleapis.com/branch 2398// labels: 2399// - key: /city 2400// description: The city where the library branch is located 2401// in. 2402// - key: /name 2403// description: The name of the branch. 2404// logs: 2405// - name: activity_history 2406// labels: 2407// - key: /customer_id 2408// - name: purchase_history 2409// logging: 2410// producer_destinations: 2411// - monitored_resource: library.googleapis.com/branch 2412// logs: 2413// - activity_history 2414// - purchase_history 2415// consumer_destinations: 2416// - monitored_resource: library.googleapis.com/branch 2417// logs: 2418// - activity_history 2419type Logging struct { 2420 // ConsumerDestinations: Logging configurations for sending logs to the 2421 // consumer project. 2422 // There can be multiple consumer destinations, each one must have 2423 // a 2424 // different monitored resource type. A log can be used in at most 2425 // one consumer destination. 2426 ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"` 2427 2428 // ProducerDestinations: Logging configurations for sending logs to the 2429 // producer project. 2430 // There can be multiple producer destinations, each one must have 2431 // a 2432 // different monitored resource type. A log can be used in at most 2433 // one producer destination. 2434 ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"` 2435 2436 // ForceSendFields is a list of field names (e.g. 2437 // "ConsumerDestinations") to unconditionally include in API requests. 2438 // By default, fields with empty values are omitted from API requests. 2439 // However, any non-pointer, non-interface field appearing in 2440 // ForceSendFields will be sent to the server regardless of whether the 2441 // field is empty or not. This may be used to include empty fields in 2442 // Patch requests. 2443 ForceSendFields []string `json:"-"` 2444 2445 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 2446 // include in API requests with the JSON null value. By default, fields 2447 // with empty values are omitted from API requests. However, any field 2448 // with an empty value appearing in NullFields will be sent to the 2449 // server as null. It is an error if a field in this list has a 2450 // non-empty value. This may be used to include null fields in Patch 2451 // requests. 2452 NullFields []string `json:"-"` 2453} 2454 2455func (s *Logging) MarshalJSON() ([]byte, error) { 2456 type NoMethod Logging 2457 raw := NoMethod(*s) 2458 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2459} 2460 2461// LoggingDestination: Configuration of a specific logging destination 2462// (the producer project 2463// or the consumer project). 2464type LoggingDestination struct { 2465 // Logs: Names of the logs to be sent to this destination. Each name 2466 // must 2467 // be defined in the Service.logs section. If the log name is 2468 // not a domain scoped name, it will be automatically prefixed with 2469 // the service name followed by "/". 2470 Logs []string `json:"logs,omitempty"` 2471 2472 // MonitoredResource: The monitored resource type. The type must be 2473 // defined in the 2474 // Service.monitored_resources section. 2475 MonitoredResource string `json:"monitoredResource,omitempty"` 2476 2477 // ForceSendFields is a list of field names (e.g. "Logs") to 2478 // unconditionally include in API requests. By default, fields with 2479 // empty values are omitted from API requests. However, any non-pointer, 2480 // non-interface field appearing in ForceSendFields will be sent to the 2481 // server regardless of whether the field is empty or not. This may be 2482 // used to include empty fields in Patch requests. 2483 ForceSendFields []string `json:"-"` 2484 2485 // NullFields is a list of field names (e.g. "Logs") to include in API 2486 // requests with the JSON null value. By default, fields with empty 2487 // values are omitted from API requests. However, any field with an 2488 // empty value appearing in NullFields will be sent to the server as 2489 // null. It is an error if a field in this list has a non-empty value. 2490 // This may be used to include null fields in Patch requests. 2491 NullFields []string `json:"-"` 2492} 2493 2494func (s *LoggingDestination) MarshalJSON() ([]byte, error) { 2495 type NoMethod LoggingDestination 2496 raw := NoMethod(*s) 2497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2498} 2499 2500// Method: Method represents a method of an API interface. 2501type Method struct { 2502 // Name: The simple name of this method. 2503 Name string `json:"name,omitempty"` 2504 2505 // Options: Any metadata attached to the method. 2506 Options []*Option `json:"options,omitempty"` 2507 2508 // RequestStreaming: If true, the request is streamed. 2509 RequestStreaming bool `json:"requestStreaming,omitempty"` 2510 2511 // RequestTypeUrl: A URL of the input message type. 2512 RequestTypeUrl string `json:"requestTypeUrl,omitempty"` 2513 2514 // ResponseStreaming: If true, the response is streamed. 2515 ResponseStreaming bool `json:"responseStreaming,omitempty"` 2516 2517 // ResponseTypeUrl: The URL of the output message type. 2518 ResponseTypeUrl string `json:"responseTypeUrl,omitempty"` 2519 2520 // Syntax: The source syntax of this method. 2521 // 2522 // Possible values: 2523 // "SYNTAX_PROTO2" - Syntax `proto2`. 2524 // "SYNTAX_PROTO3" - Syntax `proto3`. 2525 Syntax string `json:"syntax,omitempty"` 2526 2527 // ForceSendFields is a list of field names (e.g. "Name") to 2528 // unconditionally include in API requests. By default, fields with 2529 // empty values are omitted from API requests. However, any non-pointer, 2530 // non-interface field appearing in ForceSendFields will be sent to the 2531 // server regardless of whether the field is empty or not. This may be 2532 // used to include empty fields in Patch requests. 2533 ForceSendFields []string `json:"-"` 2534 2535 // NullFields is a list of field names (e.g. "Name") to include in API 2536 // requests with the JSON null value. By default, fields with empty 2537 // values are omitted from API requests. However, any field with an 2538 // empty value appearing in NullFields will be sent to the server as 2539 // null. It is an error if a field in this list has a non-empty value. 2540 // This may be used to include null fields in Patch requests. 2541 NullFields []string `json:"-"` 2542} 2543 2544func (s *Method) MarshalJSON() ([]byte, error) { 2545 type NoMethod Method 2546 raw := NoMethod(*s) 2547 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2548} 2549 2550// MetricDescriptor: Defines a metric type and its schema. Once a metric 2551// descriptor is created, 2552// deleting or altering it stops data collection and makes the metric 2553// type's 2554// existing data unusable. 2555type MetricDescriptor struct { 2556 // Description: A detailed description of the metric, which can be used 2557 // in documentation. 2558 Description string `json:"description,omitempty"` 2559 2560 // DisplayName: A concise name for the metric, which can be displayed in 2561 // user interfaces. 2562 // Use sentence case without an ending period, for example "Request 2563 // count". 2564 // This field is optional but it is recommended to be set for any 2565 // metrics 2566 // associated with user-visible concepts, such as Quota. 2567 DisplayName string `json:"displayName,omitempty"` 2568 2569 // Labels: The set of labels that can be used to describe a 2570 // specific 2571 // instance of this metric type. For example, 2572 // the 2573 // `appengine.googleapis.com/http/server/response_latencies` metric 2574 // type has a label for the HTTP response code, `response_code`, so 2575 // you can look at latencies for successful responses or just 2576 // for responses that failed. 2577 Labels []*LabelDescriptor `json:"labels,omitempty"` 2578 2579 // LaunchStage: Optional. The launch stage of the metric definition. 2580 // 2581 // Possible values: 2582 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 2583 // "EARLY_ACCESS" - Early Access features are limited to a closed 2584 // group of testers. To use 2585 // these features, you must sign up in advance and sign a Trusted 2586 // Tester 2587 // agreement (which includes confidentiality provisions). These features 2588 // may 2589 // be unstable, changed in backward-incompatible ways, and are 2590 // not 2591 // guaranteed to be released. 2592 // "ALPHA" - Alpha is a limited availability test for releases before 2593 // they are cleared 2594 // for widespread use. By Alpha, all significant design issues are 2595 // resolved 2596 // and we are in the process of verifying functionality. Alpha 2597 // customers 2598 // need to apply for access, agree to applicable terms, and have 2599 // their 2600 // projects whitelisted. Alpha releases don’t have to be feature 2601 // complete, 2602 // no SLAs are provided, and there are no technical support obligations, 2603 // but 2604 // they will be far enough along that customers can actually use them 2605 // in 2606 // test environments or for limited-use tests -- just like they would 2607 // in 2608 // normal production cases. 2609 // "BETA" - Beta is the point at which we are ready to open a release 2610 // for any 2611 // customer to use. There are no SLA or technical support obligations in 2612 // a 2613 // Beta release. Products will be complete from a feature perspective, 2614 // but 2615 // may have some open outstanding issues. Beta releases are suitable 2616 // for 2617 // limited production use cases. 2618 // "GA" - GA features are open to all developers and are considered 2619 // stable and 2620 // fully qualified for production use. 2621 // "DEPRECATED" - Deprecated features are scheduled to be shut down 2622 // and removed. For more 2623 // information, see the “Deprecation Policy” section of our [Terms 2624 // of 2625 // Service](https://cloud.google.com/terms/) 2626 // and the [Google Cloud Platform Subject to the 2627 // Deprecation 2628 // Policy](https://cloud.google.com/terms/deprecation) documentation. 2629 LaunchStage string `json:"launchStage,omitempty"` 2630 2631 // Metadata: Optional. Metadata which can be used to guide usage of the 2632 // metric. 2633 Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` 2634 2635 // MetricKind: Whether the metric records instantaneous values, changes 2636 // to a value, etc. 2637 // Some combinations of `metric_kind` and `value_type` might not be 2638 // supported. 2639 // 2640 // Possible values: 2641 // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. 2642 // "GAUGE" - An instantaneous measurement of a value. 2643 // "DELTA" - The change in a value during a time interval. 2644 // "CUMULATIVE" - A value accumulated over a time interval. 2645 // Cumulative 2646 // measurements in a time series should have the same start time 2647 // and increasing end times, until an event resets the cumulative 2648 // value to zero and sets a new start time for the following 2649 // points. 2650 MetricKind string `json:"metricKind,omitempty"` 2651 2652 // Name: The resource name of the metric descriptor. 2653 Name string `json:"name,omitempty"` 2654 2655 // Type: The metric type, including its DNS name prefix. The type is 2656 // not 2657 // URL-encoded. All user-defined metric types have the DNS 2658 // name 2659 // `custom.googleapis.com` or `external.googleapis.com`. Metric types 2660 // should 2661 // use a natural hierarchical grouping. For example: 2662 // 2663 // "custom.googleapis.com/invoice/paid/amount" 2664 // "external.googleapis.com/prometheus/up" 2665 // "appengine.googleapis.com/http/server/response_latencies" 2666 Type string `json:"type,omitempty"` 2667 2668 // Unit: The unit in which the metric value is reported. It is only 2669 // applicable 2670 // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. 2671 // The 2672 // supported units are a subset of [The Unified Code for Units 2673 // of 2674 // Measure](http://unitsofmeasure.org/ucum.html) standard: 2675 // 2676 // **Basic units (UNIT)** 2677 // 2678 // * `bit` bit 2679 // * `By` byte 2680 // * `s` second 2681 // * `min` minute 2682 // * `h` hour 2683 // * `d` day 2684 // 2685 // **Prefixes (PREFIX)** 2686 // 2687 // * `k` kilo (10**3) 2688 // * `M` mega (10**6) 2689 // * `G` giga (10**9) 2690 // * `T` tera (10**12) 2691 // * `P` peta (10**15) 2692 // * `E` exa (10**18) 2693 // * `Z` zetta (10**21) 2694 // * `Y` yotta (10**24) 2695 // * `m` milli (10**-3) 2696 // * `u` micro (10**-6) 2697 // * `n` nano (10**-9) 2698 // * `p` pico (10**-12) 2699 // * `f` femto (10**-15) 2700 // * `a` atto (10**-18) 2701 // * `z` zepto (10**-21) 2702 // * `y` yocto (10**-24) 2703 // * `Ki` kibi (2**10) 2704 // * `Mi` mebi (2**20) 2705 // * `Gi` gibi (2**30) 2706 // * `Ti` tebi (2**40) 2707 // 2708 // **Grammar** 2709 // 2710 // The grammar also includes these connectors: 2711 // 2712 // * `/` division (as an infix operator, e.g. `1/s`). 2713 // * `.` multiplication (as an infix operator, e.g. `GBy.d`) 2714 // 2715 // The grammar for a unit is as follows: 2716 // 2717 // Expression = Component { "." Component } { "/" Component } ; 2718 // 2719 // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] 2720 // | Annotation 2721 // | "1" 2722 // ; 2723 // 2724 // Annotation = "{" NAME "}" ; 2725 // 2726 // Notes: 2727 // 2728 // * `Annotation` is just a comment if it follows a `UNIT` and is 2729 // equivalent to `1` if it is used alone. For examples, 2730 // `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. 2731 // * `NAME` is a sequence of non-blank printable ASCII characters not 2732 // containing '{' or '}'. 2733 // * `1` represents dimensionless value 1, such as in `1/s`. 2734 // * `%` represents dimensionless value 1/100, and annotates values 2735 // giving 2736 // a percentage. 2737 Unit string `json:"unit,omitempty"` 2738 2739 // ValueType: Whether the measurement is an integer, a floating-point 2740 // number, etc. 2741 // Some combinations of `metric_kind` and `value_type` might not be 2742 // supported. 2743 // 2744 // Possible values: 2745 // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. 2746 // "BOOL" - The value is a boolean. 2747 // This value type can be used only if the metric kind is `GAUGE`. 2748 // "INT64" - The value is a signed 64-bit integer. 2749 // "DOUBLE" - The value is a double precision floating point number. 2750 // "STRING" - The value is a text string. 2751 // This value type can be used only if the metric kind is `GAUGE`. 2752 // "DISTRIBUTION" - The value is a `Distribution`. 2753 // "MONEY" - The value is money. 2754 ValueType string `json:"valueType,omitempty"` 2755 2756 // ForceSendFields is a list of field names (e.g. "Description") to 2757 // unconditionally include in API requests. By default, fields with 2758 // empty values are omitted from API requests. However, any non-pointer, 2759 // non-interface field appearing in ForceSendFields will be sent to the 2760 // server regardless of whether the field is empty or not. This may be 2761 // used to include empty fields in Patch requests. 2762 ForceSendFields []string `json:"-"` 2763 2764 // NullFields is a list of field names (e.g. "Description") to include 2765 // in API requests with the JSON null value. By default, fields with 2766 // empty values are omitted from API requests. However, any field with 2767 // an empty value appearing in NullFields will be sent to the server as 2768 // null. It is an error if a field in this list has a non-empty value. 2769 // This may be used to include null fields in Patch requests. 2770 NullFields []string `json:"-"` 2771} 2772 2773func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { 2774 type NoMethod MetricDescriptor 2775 raw := NoMethod(*s) 2776 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2777} 2778 2779// MetricDescriptorMetadata: Additional annotations that can be used to 2780// guide the usage of a metric. 2781type MetricDescriptorMetadata struct { 2782 // IngestDelay: The delay of data points caused by ingestion. Data 2783 // points older than this 2784 // age are guaranteed to be ingested and available to be read, 2785 // excluding 2786 // data loss due to errors. 2787 IngestDelay string `json:"ingestDelay,omitempty"` 2788 2789 // LaunchStage: Deprecated. Please use the MetricDescriptor.launch_stage 2790 // instead. 2791 // The launch stage of the metric definition. 2792 // 2793 // Possible values: 2794 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 2795 // "EARLY_ACCESS" - Early Access features are limited to a closed 2796 // group of testers. To use 2797 // these features, you must sign up in advance and sign a Trusted 2798 // Tester 2799 // agreement (which includes confidentiality provisions). These features 2800 // may 2801 // be unstable, changed in backward-incompatible ways, and are 2802 // not 2803 // guaranteed to be released. 2804 // "ALPHA" - Alpha is a limited availability test for releases before 2805 // they are cleared 2806 // for widespread use. By Alpha, all significant design issues are 2807 // resolved 2808 // and we are in the process of verifying functionality. Alpha 2809 // customers 2810 // need to apply for access, agree to applicable terms, and have 2811 // their 2812 // projects whitelisted. Alpha releases don’t have to be feature 2813 // complete, 2814 // no SLAs are provided, and there are no technical support obligations, 2815 // but 2816 // they will be far enough along that customers can actually use them 2817 // in 2818 // test environments or for limited-use tests -- just like they would 2819 // in 2820 // normal production cases. 2821 // "BETA" - Beta is the point at which we are ready to open a release 2822 // for any 2823 // customer to use. There are no SLA or technical support obligations in 2824 // a 2825 // Beta release. Products will be complete from a feature perspective, 2826 // but 2827 // may have some open outstanding issues. Beta releases are suitable 2828 // for 2829 // limited production use cases. 2830 // "GA" - GA features are open to all developers and are considered 2831 // stable and 2832 // fully qualified for production use. 2833 // "DEPRECATED" - Deprecated features are scheduled to be shut down 2834 // and removed. For more 2835 // information, see the “Deprecation Policy” section of our [Terms 2836 // of 2837 // Service](https://cloud.google.com/terms/) 2838 // and the [Google Cloud Platform Subject to the 2839 // Deprecation 2840 // Policy](https://cloud.google.com/terms/deprecation) documentation. 2841 LaunchStage string `json:"launchStage,omitempty"` 2842 2843 // SamplePeriod: The sampling period of metric data points. For metrics 2844 // which are written 2845 // periodically, consecutive data points are stored at this time 2846 // interval, 2847 // excluding data loss due to errors. Metrics with a higher granularity 2848 // have 2849 // a smaller sampling period. 2850 SamplePeriod string `json:"samplePeriod,omitempty"` 2851 2852 // ForceSendFields is a list of field names (e.g. "IngestDelay") to 2853 // unconditionally include in API requests. By default, fields with 2854 // empty values are omitted from API requests. However, any non-pointer, 2855 // non-interface field appearing in ForceSendFields will be sent to the 2856 // server regardless of whether the field is empty or not. This may be 2857 // used to include empty fields in Patch requests. 2858 ForceSendFields []string `json:"-"` 2859 2860 // NullFields is a list of field names (e.g. "IngestDelay") to include 2861 // in API requests with the JSON null value. By default, fields with 2862 // empty values are omitted from API requests. However, any field with 2863 // an empty value appearing in NullFields will be sent to the server as 2864 // null. It is an error if a field in this list has a non-empty value. 2865 // This may be used to include null fields in Patch requests. 2866 NullFields []string `json:"-"` 2867} 2868 2869func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { 2870 type NoMethod MetricDescriptorMetadata 2871 raw := NoMethod(*s) 2872 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2873} 2874 2875// MetricRule: Bind API methods to metrics. Binding a method to a metric 2876// causes that 2877// metric's configured quota behaviors to apply to the method call. 2878type MetricRule struct { 2879 // MetricCosts: Metrics to update when the selected methods are called, 2880 // and the associated 2881 // cost applied to each metric. 2882 // 2883 // The key of the map is the metric name, and the values are the 2884 // amount 2885 // increased for the metric against which the quota limits are 2886 // defined. 2887 // The value must not be negative. 2888 MetricCosts map[string]string `json:"metricCosts,omitempty"` 2889 2890 // Selector: Selects the methods to which this rule applies. 2891 // 2892 // Refer to selector for syntax details. 2893 Selector string `json:"selector,omitempty"` 2894 2895 // ForceSendFields is a list of field names (e.g. "MetricCosts") to 2896 // unconditionally include in API requests. By default, fields with 2897 // empty values are omitted from API requests. However, any non-pointer, 2898 // non-interface field appearing in ForceSendFields will be sent to the 2899 // server regardless of whether the field is empty or not. This may be 2900 // used to include empty fields in Patch requests. 2901 ForceSendFields []string `json:"-"` 2902 2903 // NullFields is a list of field names (e.g. "MetricCosts") to include 2904 // in API requests with the JSON null value. By default, fields with 2905 // empty values are omitted from API requests. However, any field with 2906 // an empty value appearing in NullFields will be sent to the server as 2907 // null. It is an error if a field in this list has a non-empty value. 2908 // This may be used to include null fields in Patch requests. 2909 NullFields []string `json:"-"` 2910} 2911 2912func (s *MetricRule) MarshalJSON() ([]byte, error) { 2913 type NoMethod MetricRule 2914 raw := NoMethod(*s) 2915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2916} 2917 2918// Mixin: Declares an API Interface to be included in this interface. 2919// The including 2920// interface must redeclare all the methods from the included interface, 2921// but 2922// documentation and options are inherited as follows: 2923// 2924// - If after comment and whitespace stripping, the documentation 2925// string of the redeclared method is empty, it will be inherited 2926// from the original method. 2927// 2928// - Each annotation belonging to the service config (http, 2929// visibility) which is not set in the redeclared method will be 2930// inherited. 2931// 2932// - If an http annotation is inherited, the path pattern will be 2933// modified as follows. Any version prefix will be replaced by the 2934// version of the including interface plus the root path if 2935// specified. 2936// 2937// Example of a simple mixin: 2938// 2939// package google.acl.v1; 2940// service AccessControl { 2941// // Get the underlying ACL object. 2942// rpc GetAcl(GetAclRequest) returns (Acl) { 2943// option (google.api.http).get = "/v1/{resource=**}:getAcl"; 2944// } 2945// } 2946// 2947// package google.storage.v2; 2948// service Storage { 2949// // rpc GetAcl(GetAclRequest) returns (Acl); 2950// 2951// // Get a data record. 2952// rpc GetData(GetDataRequest) returns (Data) { 2953// option (google.api.http).get = "/v2/{resource=**}"; 2954// } 2955// } 2956// 2957// Example of a mixin configuration: 2958// 2959// apis: 2960// - name: google.storage.v2.Storage 2961// mixins: 2962// - name: google.acl.v1.AccessControl 2963// 2964// The mixin construct implies that all methods in `AccessControl` 2965// are 2966// also declared with same name and request/response types in 2967// `Storage`. A documentation generator or annotation processor will 2968// see the effective `Storage.GetAcl` method after 2969// inherting 2970// documentation and annotations as follows: 2971// 2972// service Storage { 2973// // Get the underlying ACL object. 2974// rpc GetAcl(GetAclRequest) returns (Acl) { 2975// option (google.api.http).get = "/v2/{resource=**}:getAcl"; 2976// } 2977// ... 2978// } 2979// 2980// Note how the version in the path pattern changed from `v1` to 2981// `v2`. 2982// 2983// If the `root` field in the mixin is specified, it should be 2984// a 2985// relative path under which inherited HTTP paths are placed. Example: 2986// 2987// apis: 2988// - name: google.storage.v2.Storage 2989// mixins: 2990// - name: google.acl.v1.AccessControl 2991// root: acls 2992// 2993// This implies the following inherited HTTP annotation: 2994// 2995// service Storage { 2996// // Get the underlying ACL object. 2997// rpc GetAcl(GetAclRequest) returns (Acl) { 2998// option (google.api.http).get = 2999// "/v2/acls/{resource=**}:getAcl"; 3000// } 3001// ... 3002// } 3003type Mixin struct { 3004 // Name: The fully qualified name of the interface which is included. 3005 Name string `json:"name,omitempty"` 3006 3007 // Root: If non-empty specifies a path under which inherited HTTP 3008 // paths 3009 // are rooted. 3010 Root string `json:"root,omitempty"` 3011 3012 // ForceSendFields is a list of field names (e.g. "Name") to 3013 // unconditionally include in API requests. By default, fields with 3014 // empty values are omitted from API requests. However, any non-pointer, 3015 // non-interface field appearing in ForceSendFields will be sent to the 3016 // server regardless of whether the field is empty or not. This may be 3017 // used to include empty fields in Patch requests. 3018 ForceSendFields []string `json:"-"` 3019 3020 // NullFields is a list of field names (e.g. "Name") to include in API 3021 // requests with the JSON null value. By default, fields with empty 3022 // values are omitted from API requests. However, any field with an 3023 // empty value appearing in NullFields will be sent to the server as 3024 // null. It is an error if a field in this list has a non-empty value. 3025 // This may be used to include null fields in Patch requests. 3026 NullFields []string `json:"-"` 3027} 3028 3029func (s *Mixin) MarshalJSON() ([]byte, error) { 3030 type NoMethod Mixin 3031 raw := NoMethod(*s) 3032 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3033} 3034 3035// MonitoredResourceDescriptor: An object that describes the schema of a 3036// MonitoredResource object using a 3037// type name and a set of labels. For example, the monitored 3038// resource 3039// descriptor for Google Compute Engine VM instances has a type 3040// of 3041// "gce_instance" and specifies the use of the labels "instance_id" 3042// and 3043// "zone" to identify particular VM instances. 3044// 3045// Different APIs can support different monitored resource types. APIs 3046// generally 3047// provide a `list` method that returns the monitored resource 3048// descriptors used 3049// by the API. 3050type MonitoredResourceDescriptor struct { 3051 // Description: Optional. A detailed description of the monitored 3052 // resource type that might 3053 // be used in documentation. 3054 Description string `json:"description,omitempty"` 3055 3056 // DisplayName: Optional. A concise name for the monitored resource type 3057 // that might be 3058 // displayed in user interfaces. It should be a Title Cased Noun 3059 // Phrase, 3060 // without any article or other determiners. For example, 3061 // "Google Cloud SQL Database". 3062 DisplayName string `json:"displayName,omitempty"` 3063 3064 // Labels: Required. A set of labels used to describe instances of this 3065 // monitored 3066 // resource type. For example, an individual Google Cloud SQL database 3067 // is 3068 // identified by values for the labels "database_id" and "zone". 3069 Labels []*LabelDescriptor `json:"labels,omitempty"` 3070 3071 // LaunchStage: Optional. The launch stage of the monitored resource 3072 // definition. 3073 // 3074 // Possible values: 3075 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 3076 // "EARLY_ACCESS" - Early Access features are limited to a closed 3077 // group of testers. To use 3078 // these features, you must sign up in advance and sign a Trusted 3079 // Tester 3080 // agreement (which includes confidentiality provisions). These features 3081 // may 3082 // be unstable, changed in backward-incompatible ways, and are 3083 // not 3084 // guaranteed to be released. 3085 // "ALPHA" - Alpha is a limited availability test for releases before 3086 // they are cleared 3087 // for widespread use. By Alpha, all significant design issues are 3088 // resolved 3089 // and we are in the process of verifying functionality. Alpha 3090 // customers 3091 // need to apply for access, agree to applicable terms, and have 3092 // their 3093 // projects whitelisted. Alpha releases don’t have to be feature 3094 // complete, 3095 // no SLAs are provided, and there are no technical support obligations, 3096 // but 3097 // they will be far enough along that customers can actually use them 3098 // in 3099 // test environments or for limited-use tests -- just like they would 3100 // in 3101 // normal production cases. 3102 // "BETA" - Beta is the point at which we are ready to open a release 3103 // for any 3104 // customer to use. There are no SLA or technical support obligations in 3105 // a 3106 // Beta release. Products will be complete from a feature perspective, 3107 // but 3108 // may have some open outstanding issues. Beta releases are suitable 3109 // for 3110 // limited production use cases. 3111 // "GA" - GA features are open to all developers and are considered 3112 // stable and 3113 // fully qualified for production use. 3114 // "DEPRECATED" - Deprecated features are scheduled to be shut down 3115 // and removed. For more 3116 // information, see the “Deprecation Policy” section of our [Terms 3117 // of 3118 // Service](https://cloud.google.com/terms/) 3119 // and the [Google Cloud Platform Subject to the 3120 // Deprecation 3121 // Policy](https://cloud.google.com/terms/deprecation) documentation. 3122 LaunchStage string `json:"launchStage,omitempty"` 3123 3124 // Name: Optional. The resource name of the monitored resource 3125 // descriptor: 3126 // "projects/{project_id}/monitoredResourceDescriptors/{type 3127 // }" where 3128 // {type} is the value of the `type` field in this object 3129 // and 3130 // {project_id} is a project ID that provides API-specific context 3131 // for 3132 // accessing the type. APIs that do not use project information can use 3133 // the 3134 // resource name format "monitoredResourceDescriptors/{type}". 3135 Name string `json:"name,omitempty"` 3136 3137 // Type: Required. The monitored resource type. For example, the 3138 // type 3139 // "cloudsql_database" represents databases in Google Cloud SQL. 3140 // The maximum length of this value is 256 characters. 3141 Type string `json:"type,omitempty"` 3142 3143 // ForceSendFields is a list of field names (e.g. "Description") to 3144 // unconditionally include in API requests. By default, fields with 3145 // empty values are omitted from API requests. However, any non-pointer, 3146 // non-interface field appearing in ForceSendFields will be sent to the 3147 // server regardless of whether the field is empty or not. This may be 3148 // used to include empty fields in Patch requests. 3149 ForceSendFields []string `json:"-"` 3150 3151 // NullFields is a list of field names (e.g. "Description") to include 3152 // in API requests with the JSON null value. By default, fields with 3153 // empty values are omitted from API requests. However, any field with 3154 // an empty value appearing in NullFields will be sent to the server as 3155 // null. It is an error if a field in this list has a non-empty value. 3156 // This may be used to include null fields in Patch requests. 3157 NullFields []string `json:"-"` 3158} 3159 3160func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { 3161 type NoMethod MonitoredResourceDescriptor 3162 raw := NoMethod(*s) 3163 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3164} 3165 3166// Monitoring: Monitoring configuration of the service. 3167// 3168// The example below shows how to configure monitored resources and 3169// metrics 3170// for monitoring. In the example, a monitored resource and two metrics 3171// are 3172// defined. The `library.googleapis.com/book/returned_count` metric is 3173// sent 3174// to both producer and consumer projects, whereas 3175// the 3176// `library.googleapis.com/book/overdue_count` metric is only sent to 3177// the 3178// consumer project. 3179// 3180// monitored_resources: 3181// - type: library.googleapis.com/branch 3182// labels: 3183// - key: /city 3184// description: The city where the library branch is located 3185// in. 3186// - key: /name 3187// description: The name of the branch. 3188// metrics: 3189// - name: library.googleapis.com/book/returned_count 3190// metric_kind: DELTA 3191// value_type: INT64 3192// labels: 3193// - key: /customer_id 3194// - name: library.googleapis.com/book/overdue_count 3195// metric_kind: GAUGE 3196// value_type: INT64 3197// labels: 3198// - key: /customer_id 3199// monitoring: 3200// producer_destinations: 3201// - monitored_resource: library.googleapis.com/branch 3202// metrics: 3203// - library.googleapis.com/book/returned_count 3204// consumer_destinations: 3205// - monitored_resource: library.googleapis.com/branch 3206// metrics: 3207// - library.googleapis.com/book/returned_count 3208// - library.googleapis.com/book/overdue_count 3209type Monitoring struct { 3210 // ConsumerDestinations: Monitoring configurations for sending metrics 3211 // to the consumer project. 3212 // There can be multiple consumer destinations. A monitored resouce type 3213 // may 3214 // appear in multiple monitoring destinations if different aggregations 3215 // are 3216 // needed for different sets of metrics associated with that 3217 // monitored 3218 // resource type. A monitored resource and metric pair may only be used 3219 // once 3220 // in the Monitoring configuration. 3221 ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"` 3222 3223 // ProducerDestinations: Monitoring configurations for sending metrics 3224 // to the producer project. 3225 // There can be multiple producer destinations. A monitored resouce type 3226 // may 3227 // appear in multiple monitoring destinations if different aggregations 3228 // are 3229 // needed for different sets of metrics associated with that 3230 // monitored 3231 // resource type. A monitored resource and metric pair may only be used 3232 // once 3233 // in the Monitoring configuration. 3234 ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"` 3235 3236 // ForceSendFields is a list of field names (e.g. 3237 // "ConsumerDestinations") to unconditionally include in API requests. 3238 // By default, fields with empty values are omitted from API requests. 3239 // However, any non-pointer, non-interface field appearing in 3240 // ForceSendFields will be sent to the server regardless of whether the 3241 // field is empty or not. This may be used to include empty fields in 3242 // Patch requests. 3243 ForceSendFields []string `json:"-"` 3244 3245 // NullFields is a list of field names (e.g. "ConsumerDestinations") to 3246 // include in API requests with the JSON null value. By default, fields 3247 // with empty values are omitted from API requests. However, any field 3248 // with an empty value appearing in NullFields will be sent to the 3249 // server as null. It is an error if a field in this list has a 3250 // non-empty value. This may be used to include null fields in Patch 3251 // requests. 3252 NullFields []string `json:"-"` 3253} 3254 3255func (s *Monitoring) MarshalJSON() ([]byte, error) { 3256 type NoMethod Monitoring 3257 raw := NoMethod(*s) 3258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3259} 3260 3261// MonitoringDestination: Configuration of a specific monitoring 3262// destination (the producer project 3263// or the consumer project). 3264type MonitoringDestination struct { 3265 // Metrics: Types of the metrics to report to this monitoring 3266 // destination. 3267 // Each type must be defined in Service.metrics section. 3268 Metrics []string `json:"metrics,omitempty"` 3269 3270 // MonitoredResource: The monitored resource type. The type must be 3271 // defined in 3272 // Service.monitored_resources section. 3273 MonitoredResource string `json:"monitoredResource,omitempty"` 3274 3275 // ForceSendFields is a list of field names (e.g. "Metrics") to 3276 // unconditionally include in API requests. By default, fields with 3277 // empty values are omitted from API requests. However, any non-pointer, 3278 // non-interface field appearing in ForceSendFields will be sent to the 3279 // server regardless of whether the field is empty or not. This may be 3280 // used to include empty fields in Patch requests. 3281 ForceSendFields []string `json:"-"` 3282 3283 // NullFields is a list of field names (e.g. "Metrics") to include in 3284 // API requests with the JSON null value. By default, fields with empty 3285 // values are omitted from API requests. However, any field with an 3286 // empty value appearing in NullFields will be sent to the server as 3287 // null. It is an error if a field in this list has a non-empty value. 3288 // This may be used to include null fields in Patch requests. 3289 NullFields []string `json:"-"` 3290} 3291 3292func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { 3293 type NoMethod MonitoringDestination 3294 raw := NoMethod(*s) 3295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3296} 3297 3298// OAuthRequirements: OAuth scopes are a way to define data and 3299// permissions on data. For example, 3300// there are scopes defined for "Read-only access to Google Calendar" 3301// and 3302// "Access to Cloud Platform". Users can consent to a scope for an 3303// application, 3304// giving it permission to access that data on their behalf. 3305// 3306// OAuth scope specifications should be fairly coarse grained; a user 3307// will need 3308// to see and understand the text description of what your scope 3309// means. 3310// 3311// In most cases: use one or at most two OAuth scopes for an entire 3312// family of 3313// products. If your product has multiple APIs, you should probably be 3314// sharing 3315// the OAuth scope across all of those APIs. 3316// 3317// When you need finer grained OAuth consent screens: talk with your 3318// product 3319// management about how developers will use them in practice. 3320// 3321// Please note that even though each of the canonical scopes is enough 3322// for a 3323// request to be accepted and passed to the backend, a request can still 3324// fail 3325// due to the backend requiring additional scopes or permissions. 3326type OAuthRequirements struct { 3327 // CanonicalScopes: The list of publicly documented OAuth scopes that 3328 // are allowed access. An 3329 // OAuth token containing any of these scopes will be 3330 // accepted. 3331 // 3332 // Example: 3333 // 3334 // canonical_scopes: https://www.googleapis.com/auth/calendar, 3335 // https://www.googleapis.com/auth/calendar.read 3336 CanonicalScopes string `json:"canonicalScopes,omitempty"` 3337 3338 // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to 3339 // unconditionally include in API requests. By default, fields with 3340 // empty values are omitted from API requests. However, any non-pointer, 3341 // non-interface field appearing in ForceSendFields will be sent to the 3342 // server regardless of whether the field is empty or not. This may be 3343 // used to include empty fields in Patch requests. 3344 ForceSendFields []string `json:"-"` 3345 3346 // NullFields is a list of field names (e.g. "CanonicalScopes") to 3347 // include in API requests with the JSON null value. By default, fields 3348 // with empty values are omitted from API requests. However, any field 3349 // with an empty value appearing in NullFields will be sent to the 3350 // server as null. It is an error if a field in this list has a 3351 // non-empty value. This may be used to include null fields in Patch 3352 // requests. 3353 NullFields []string `json:"-"` 3354} 3355 3356func (s *OAuthRequirements) MarshalJSON() ([]byte, error) { 3357 type NoMethod OAuthRequirements 3358 raw := NoMethod(*s) 3359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3360} 3361 3362// Operation: This resource represents a long-running operation that is 3363// the result of a 3364// network API call. 3365type Operation struct { 3366 // Done: If the value is `false`, it means the operation is still in 3367 // progress. 3368 // If `true`, the operation is completed, and either `error` or 3369 // `response` is 3370 // available. 3371 Done bool `json:"done,omitempty"` 3372 3373 // Error: The error result of the operation in case of failure or 3374 // cancellation. 3375 Error *Status `json:"error,omitempty"` 3376 3377 // Metadata: Service-specific metadata associated with the operation. 3378 // It typically 3379 // contains progress information and common metadata such as create 3380 // time. 3381 // Some services might not provide such metadata. Any method that 3382 // returns a 3383 // long-running operation should document the metadata type, if any. 3384 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3385 3386 // Name: The server-assigned name, which is only unique within the same 3387 // service that 3388 // originally returns it. If you use the default HTTP mapping, 3389 // the 3390 // `name` should be a resource name ending with 3391 // `operations/{unique_id}`. 3392 Name string `json:"name,omitempty"` 3393 3394 // Response: The normal response of the operation in case of success. 3395 // If the original 3396 // method returns no data on success, such as `Delete`, the response 3397 // is 3398 // `google.protobuf.Empty`. If the original method is 3399 // standard 3400 // `Get`/`Create`/`Update`, the response should be the resource. For 3401 // other 3402 // methods, the response should have the type `XxxResponse`, where 3403 // `Xxx` 3404 // is the original method name. For example, if the original method 3405 // name 3406 // is `TakeSnapshot()`, the inferred response type 3407 // is 3408 // `TakeSnapshotResponse`. 3409 Response googleapi.RawMessage `json:"response,omitempty"` 3410 3411 // ServerResponse contains the HTTP response code and headers from the 3412 // server. 3413 googleapi.ServerResponse `json:"-"` 3414 3415 // ForceSendFields is a list of field names (e.g. "Done") to 3416 // unconditionally include in API requests. By default, fields with 3417 // empty values are omitted from API requests. However, any non-pointer, 3418 // non-interface field appearing in ForceSendFields will be sent to the 3419 // server regardless of whether the field is empty or not. This may be 3420 // used to include empty fields in Patch requests. 3421 ForceSendFields []string `json:"-"` 3422 3423 // NullFields is a list of field names (e.g. "Done") to include in API 3424 // requests with the JSON null value. By default, fields with empty 3425 // values are omitted from API requests. However, any field with an 3426 // empty value appearing in NullFields will be sent to the server as 3427 // null. It is an error if a field in this list has a non-empty value. 3428 // This may be used to include null fields in Patch requests. 3429 NullFields []string `json:"-"` 3430} 3431 3432func (s *Operation) MarshalJSON() ([]byte, error) { 3433 type NoMethod Operation 3434 raw := NoMethod(*s) 3435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3436} 3437 3438// Option: A protocol buffer option, which can be attached to a message, 3439// field, 3440// enumeration, etc. 3441type Option struct { 3442 // Name: The option's name. For protobuf built-in options (options 3443 // defined in 3444 // descriptor.proto), this is the short name. For example, 3445 // "map_entry". 3446 // For custom options, it should be the fully-qualified name. For 3447 // example, 3448 // "google.api.http". 3449 Name string `json:"name,omitempty"` 3450 3451 // Value: The option's value packed in an Any message. If the value is a 3452 // primitive, 3453 // the corresponding wrapper type defined in 3454 // google/protobuf/wrappers.proto 3455 // should be used. If the value is an enum, it should be stored as an 3456 // int32 3457 // value using the google.protobuf.Int32Value type. 3458 Value googleapi.RawMessage `json:"value,omitempty"` 3459 3460 // ForceSendFields is a list of field names (e.g. "Name") to 3461 // unconditionally include in API requests. By default, fields with 3462 // empty values are omitted from API requests. However, any non-pointer, 3463 // non-interface field appearing in ForceSendFields will be sent to the 3464 // server regardless of whether the field is empty or not. This may be 3465 // used to include empty fields in Patch requests. 3466 ForceSendFields []string `json:"-"` 3467 3468 // NullFields is a list of field names (e.g. "Name") to include in API 3469 // requests with the JSON null value. By default, fields with empty 3470 // values are omitted from API requests. However, any field with an 3471 // empty value appearing in NullFields will be sent to the server as 3472 // null. It is an error if a field in this list has a non-empty value. 3473 // This may be used to include null fields in Patch requests. 3474 NullFields []string `json:"-"` 3475} 3476 3477func (s *Option) MarshalJSON() ([]byte, error) { 3478 type NoMethod Option 3479 raw := NoMethod(*s) 3480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3481} 3482 3483// Page: Represents a documentation page. A page can contain subpages to 3484// represent 3485// nested documentation set structure. 3486type Page struct { 3487 // Content: The Markdown content of the page. You can use <code>(== 3488 // include {path} 3489 // ==)</code> to include content from a Markdown file. 3490 Content string `json:"content,omitempty"` 3491 3492 // Name: The name of the page. It will be used as an identity of the 3493 // page to 3494 // generate URI of the page, text of the link to this page in 3495 // navigation, 3496 // etc. The full page name (start from the root page name to this 3497 // page 3498 // concatenated with `.`) can be used as reference to the page in 3499 // your 3500 // documentation. For example: 3501 // <pre><code>pages: 3502 // - name: Tutorial 3503 // content: (== include tutorial.md ==) 3504 // subpages: 3505 // - name: Java 3506 // content: (== include tutorial_java.md 3507 // ==) 3508 // </code></pre> 3509 // You can reference `Java` page using Markdown reference link 3510 // syntax: 3511 // `Java`. 3512 Name string `json:"name,omitempty"` 3513 3514 // Subpages: Subpages of this page. The order of subpages specified here 3515 // will be 3516 // honored in the generated docset. 3517 Subpages []*Page `json:"subpages,omitempty"` 3518 3519 // ForceSendFields is a list of field names (e.g. "Content") to 3520 // unconditionally include in API requests. By default, fields with 3521 // empty values are omitted from API requests. However, any non-pointer, 3522 // non-interface field appearing in ForceSendFields will be sent to the 3523 // server regardless of whether the field is empty or not. This may be 3524 // used to include empty fields in Patch requests. 3525 ForceSendFields []string `json:"-"` 3526 3527 // NullFields is a list of field names (e.g. "Content") to include in 3528 // API requests with the JSON null value. By default, fields with empty 3529 // values are omitted from API requests. However, any field with an 3530 // empty value appearing in NullFields will be sent to the server as 3531 // null. It is an error if a field in this list has a non-empty value. 3532 // This may be used to include null fields in Patch requests. 3533 NullFields []string `json:"-"` 3534} 3535 3536func (s *Page) MarshalJSON() ([]byte, error) { 3537 type NoMethod Page 3538 raw := NoMethod(*s) 3539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3540} 3541 3542// PolicyBinding: Translates to IAM Policy bindings (without auditing at 3543// this level) 3544type PolicyBinding struct { 3545 // Members: Uses the same format as in IAM policy. 3546 // `member` must include both a prefix and ID. For example, 3547 // `user:{emailId}`, 3548 // `serviceAccount:{emailId}`, `group:{emailId}`. 3549 Members []string `json:"members,omitempty"` 3550 3551 // Role: Role. 3552 // (https://cloud.google.com/iam/docs/understanding-roles) 3553 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 3554 Role string `json:"role,omitempty"` 3555 3556 // ForceSendFields is a list of field names (e.g. "Members") to 3557 // unconditionally include in API requests. By default, fields with 3558 // empty values are omitted from API requests. However, any non-pointer, 3559 // non-interface field appearing in ForceSendFields will be sent to the 3560 // server regardless of whether the field is empty or not. This may be 3561 // used to include empty fields in Patch requests. 3562 ForceSendFields []string `json:"-"` 3563 3564 // NullFields is a list of field names (e.g. "Members") to include in 3565 // API requests with the JSON null value. By default, fields with empty 3566 // values are omitted from API requests. However, any field with an 3567 // empty value appearing in NullFields will be sent to the server as 3568 // null. It is an error if a field in this list has a non-empty value. 3569 // This may be used to include null fields in Patch requests. 3570 NullFields []string `json:"-"` 3571} 3572 3573func (s *PolicyBinding) MarshalJSON() ([]byte, error) { 3574 type NoMethod PolicyBinding 3575 raw := NoMethod(*s) 3576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3577} 3578 3579// Quota: Quota configuration helps to achieve fairness and budgeting in 3580// service 3581// usage. 3582// 3583// The metric based quota configuration works this way: 3584// - The service configuration defines a set of metrics. 3585// - For API calls, the quota.metric_rules maps methods to metrics with 3586// corresponding costs. 3587// - The quota.limits defines limits on the metrics, which will be used 3588// for 3589// quota checks at runtime. 3590// 3591// An example quota configuration in yaml format: 3592// 3593// quota: 3594// limits: 3595// 3596// - name: apiWriteQpsPerProject 3597// metric: library.googleapis.com/write_calls 3598// unit: "1/min/{project}" # rate limit for consumer projects 3599// values: 3600// STANDARD: 10000 3601// 3602// 3603// # The metric rules bind all methods to the read_calls metric, 3604// # except for the UpdateBook and DeleteBook methods. These two 3605// methods 3606// # are mapped to the write_calls metric, with the UpdateBook 3607// method 3608// # consuming at twice rate as the DeleteBook method. 3609// metric_rules: 3610// - selector: "*" 3611// metric_costs: 3612// library.googleapis.com/read_calls: 1 3613// - selector: google.example.library.v1.LibraryService.UpdateBook 3614// metric_costs: 3615// library.googleapis.com/write_calls: 2 3616// - selector: google.example.library.v1.LibraryService.DeleteBook 3617// metric_costs: 3618// library.googleapis.com/write_calls: 1 3619// 3620// Corresponding Metric definition: 3621// 3622// metrics: 3623// - name: library.googleapis.com/read_calls 3624// display_name: Read requests 3625// metric_kind: DELTA 3626// value_type: INT64 3627// 3628// - name: library.googleapis.com/write_calls 3629// display_name: Write requests 3630// metric_kind: DELTA 3631// value_type: INT64 3632// 3633// 3634type Quota struct { 3635 // Limits: List of `QuotaLimit` definitions for the service. 3636 Limits []*QuotaLimit `json:"limits,omitempty"` 3637 3638 // MetricRules: List of `MetricRule` definitions, each one mapping a 3639 // selected method to one 3640 // or more metrics. 3641 MetricRules []*MetricRule `json:"metricRules,omitempty"` 3642 3643 // ForceSendFields is a list of field names (e.g. "Limits") to 3644 // unconditionally include in API requests. By default, fields with 3645 // empty values are omitted from API requests. However, any non-pointer, 3646 // non-interface field appearing in ForceSendFields will be sent to the 3647 // server regardless of whether the field is empty or not. This may be 3648 // used to include empty fields in Patch requests. 3649 ForceSendFields []string `json:"-"` 3650 3651 // NullFields is a list of field names (e.g. "Limits") to include in API 3652 // requests with the JSON null value. By default, fields with empty 3653 // values are omitted from API requests. However, any field with an 3654 // empty value appearing in NullFields will be sent to the server as 3655 // null. It is an error if a field in this list has a non-empty value. 3656 // This may be used to include null fields in Patch requests. 3657 NullFields []string `json:"-"` 3658} 3659 3660func (s *Quota) MarshalJSON() ([]byte, error) { 3661 type NoMethod Quota 3662 raw := NoMethod(*s) 3663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3664} 3665 3666// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a 3667// specified duration 3668// for a limit type. There can be at most one limit for a duration and 3669// limit 3670// type combination defined within a `QuotaGroup`. 3671type QuotaLimit struct { 3672 // DefaultLimit: Default number of tokens that can be consumed during 3673 // the specified 3674 // duration. This is the number of tokens assigned when a 3675 // client 3676 // application developer activates the service for his/her 3677 // project. 3678 // 3679 // Specifying a value of 0 will block all requests. This can be used if 3680 // you 3681 // are provisioning quota to selected consumers and blocking 3682 // others. 3683 // Similarly, a value of -1 will indicate an unlimited quota. No 3684 // other 3685 // negative values are allowed. 3686 // 3687 // Used by group-based quotas only. 3688 DefaultLimit int64 `json:"defaultLimit,omitempty,string"` 3689 3690 // Description: Optional. User-visible, extended description for this 3691 // quota limit. 3692 // Should be used only when more context is needed to understand this 3693 // limit 3694 // than provided by the limit's display name (see: `display_name`). 3695 Description string `json:"description,omitempty"` 3696 3697 // DisplayName: User-visible display name for this limit. 3698 // Optional. If not set, the UI will provide a default display name 3699 // based on 3700 // the quota configuration. This field can be used to override the 3701 // default 3702 // display name generated from the configuration. 3703 DisplayName string `json:"displayName,omitempty"` 3704 3705 // Duration: Duration of this limit in textual notation. Example: 3706 // "100s", "24h", "1d". 3707 // For duration longer than a day, only multiple of days is supported. 3708 // We 3709 // support only "100s" and "1d" for now. Additional support will be 3710 // added in 3711 // the future. "0" indicates indefinite duration. 3712 // 3713 // Used by group-based quotas only. 3714 Duration string `json:"duration,omitempty"` 3715 3716 // FreeTier: Free tier value displayed in the Developers Console for 3717 // this limit. 3718 // The free tier is the number of tokens that will be subtracted from 3719 // the 3720 // billed amount when billing is enabled. 3721 // This field can only be set on a limit with duration "1d", in a 3722 // billable 3723 // group; it is invalid on any other limit. If this field is not set, 3724 // it 3725 // defaults to 0, indicating that there is no free tier for this 3726 // service. 3727 // 3728 // Used by group-based quotas only. 3729 FreeTier int64 `json:"freeTier,omitempty,string"` 3730 3731 // MaxLimit: Maximum number of tokens that can be consumed during the 3732 // specified 3733 // duration. Client application developers can override the default 3734 // limit up 3735 // to this maximum. If specified, this value cannot be set to a value 3736 // less 3737 // than the default limit. If not specified, it is set to the default 3738 // limit. 3739 // 3740 // To allow clients to apply overrides with no upper bound, set this to 3741 // -1, 3742 // indicating unlimited maximum quota. 3743 // 3744 // Used by group-based quotas only. 3745 MaxLimit int64 `json:"maxLimit,omitempty,string"` 3746 3747 // Metric: The name of the metric this quota limit applies to. The quota 3748 // limits with 3749 // the same metric will be checked together during runtime. The metric 3750 // must be 3751 // defined within the service config. 3752 Metric string `json:"metric,omitempty"` 3753 3754 // Name: Name of the quota limit. 3755 // 3756 // The name must be provided, and it must be unique within the service. 3757 // The 3758 // name can only include alphanumeric characters as well as '-'. 3759 // 3760 // The maximum length of the limit name is 64 characters. 3761 Name string `json:"name,omitempty"` 3762 3763 // Unit: Specify the unit of the quota limit. It uses the same syntax 3764 // as 3765 // Metric.unit. The supported unit kinds are determined by the 3766 // quota 3767 // backend system. 3768 // 3769 // Here are some examples: 3770 // * "1/min/{project}" for quota per minute per project. 3771 // 3772 // Note: the order of unit components is insignificant. 3773 // The "1" at the beginning is required to follow the metric unit 3774 // syntax. 3775 Unit string `json:"unit,omitempty"` 3776 3777 // Values: Tiered limit values. You must specify this as a key:value 3778 // pair, with an 3779 // integer value that is the maximum number of requests allowed for 3780 // the 3781 // specified unit. Currently only STANDARD is supported. 3782 Values map[string]string `json:"values,omitempty"` 3783 3784 // ForceSendFields is a list of field names (e.g. "DefaultLimit") to 3785 // unconditionally include in API requests. By default, fields with 3786 // empty values are omitted from API requests. However, any non-pointer, 3787 // non-interface field appearing in ForceSendFields will be sent to the 3788 // server regardless of whether the field is empty or not. This may be 3789 // used to include empty fields in Patch requests. 3790 ForceSendFields []string `json:"-"` 3791 3792 // NullFields is a list of field names (e.g. "DefaultLimit") to include 3793 // in API requests with the JSON null value. By default, fields with 3794 // empty values are omitted from API requests. However, any field with 3795 // an empty value appearing in NullFields will be sent to the server as 3796 // null. It is an error if a field in this list has a non-empty value. 3797 // This may be used to include null fields in Patch requests. 3798 NullFields []string `json:"-"` 3799} 3800 3801func (s *QuotaLimit) MarshalJSON() ([]byte, error) { 3802 type NoMethod QuotaLimit 3803 raw := NoMethod(*s) 3804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3805} 3806 3807// RemoveTenantProjectRequest: Request message to remove a tenant 3808// project resource from the tenancy unit. 3809type RemoveTenantProjectRequest struct { 3810 // Tag: Tag of the resource within the tenancy unit. 3811 Tag string `json:"tag,omitempty"` 3812 3813 // ForceSendFields is a list of field names (e.g. "Tag") to 3814 // unconditionally include in API requests. By default, fields with 3815 // empty values are omitted from API requests. However, any non-pointer, 3816 // non-interface field appearing in ForceSendFields will be sent to the 3817 // server regardless of whether the field is empty or not. This may be 3818 // used to include empty fields in Patch requests. 3819 ForceSendFields []string `json:"-"` 3820 3821 // NullFields is a list of field names (e.g. "Tag") to include in API 3822 // requests with the JSON null value. By default, fields with empty 3823 // values are omitted from API requests. However, any field with an 3824 // empty value appearing in NullFields will be sent to the server as 3825 // null. It is an error if a field in this list has a non-empty value. 3826 // This may be used to include null fields in Patch requests. 3827 NullFields []string `json:"-"` 3828} 3829 3830func (s *RemoveTenantProjectRequest) MarshalJSON() ([]byte, error) { 3831 type NoMethod RemoveTenantProjectRequest 3832 raw := NoMethod(*s) 3833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3834} 3835 3836// SearchTenancyUnitsResponse: Response for the search query. 3837type SearchTenancyUnitsResponse struct { 3838 // NextPageToken: Pagination token for large results. 3839 NextPageToken string `json:"nextPageToken,omitempty"` 3840 3841 // TenancyUnits: Tenancy Units matching the request. 3842 TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"` 3843 3844 // ServerResponse contains the HTTP response code and headers from the 3845 // server. 3846 googleapi.ServerResponse `json:"-"` 3847 3848 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3849 // unconditionally include in API requests. By default, fields with 3850 // empty values are omitted from API requests. However, any non-pointer, 3851 // non-interface field appearing in ForceSendFields will be sent to the 3852 // server regardless of whether the field is empty or not. This may be 3853 // used to include empty fields in Patch requests. 3854 ForceSendFields []string `json:"-"` 3855 3856 // NullFields is a list of field names (e.g. "NextPageToken") to include 3857 // in API requests with the JSON null value. By default, fields with 3858 // empty values are omitted from API requests. However, any field with 3859 // an empty value appearing in NullFields will be sent to the server as 3860 // null. It is an error if a field in this list has a non-empty value. 3861 // This may be used to include null fields in Patch requests. 3862 NullFields []string `json:"-"` 3863} 3864 3865func (s *SearchTenancyUnitsResponse) MarshalJSON() ([]byte, error) { 3866 type NoMethod SearchTenancyUnitsResponse 3867 raw := NoMethod(*s) 3868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3869} 3870 3871// Service: `Service` is the root object of Google service configuration 3872// schema. It 3873// describes basic information about a service, such as the name and 3874// the 3875// title, and delegates other aspects to sub-sections. Each sub-section 3876// is 3877// either a proto message or a repeated proto message that configures 3878// a 3879// specific aspect, such as auth. See each proto message definition for 3880// details. 3881// 3882// Example: 3883// 3884// type: google.api.Service 3885// config_version: 3 3886// name: calendar.googleapis.com 3887// title: Google Calendar API 3888// apis: 3889// - name: google.calendar.v3.Calendar 3890// authentication: 3891// providers: 3892// - id: google_calendar_auth 3893// jwks_uri: https://www.googleapis.com/oauth2/v1/certs 3894// issuer: https://securetoken.google.com 3895// rules: 3896// - selector: "*" 3897// requirements: 3898// provider_id: google_calendar_auth 3899type Service struct { 3900 // Apis: A list of API interfaces exported by this service. Only the 3901 // `name` field 3902 // of the google.protobuf.Api needs to be provided by the 3903 // configuration 3904 // author, as the remaining fields will be derived from the IDL during 3905 // the 3906 // normalization process. It is an error to specify an API interface 3907 // here 3908 // which cannot be resolved against the associated IDL files. 3909 Apis []*Api `json:"apis,omitempty"` 3910 3911 // Authentication: Auth configuration. 3912 Authentication *Authentication `json:"authentication,omitempty"` 3913 3914 // Backend: API backend configuration. 3915 Backend *Backend `json:"backend,omitempty"` 3916 3917 // Billing: Billing configuration. 3918 Billing *Billing `json:"billing,omitempty"` 3919 3920 // ConfigVersion: The semantic version of the service configuration. The 3921 // config version 3922 // affects the interpretation of the service configuration. For 3923 // example, 3924 // certain features are enabled by default for certain config 3925 // versions. 3926 // The latest config version is `3`. 3927 ConfigVersion int64 `json:"configVersion,omitempty"` 3928 3929 // Context: Context configuration. 3930 Context *Context `json:"context,omitempty"` 3931 3932 // Control: Configuration for the service control plane. 3933 Control *Control `json:"control,omitempty"` 3934 3935 // CustomError: Custom error configuration. 3936 CustomError *CustomError `json:"customError,omitempty"` 3937 3938 // Documentation: Additional API documentation. 3939 Documentation *Documentation `json:"documentation,omitempty"` 3940 3941 // Endpoints: Configuration for network endpoints. If this is empty, 3942 // then an endpoint 3943 // with the same name as the service is automatically generated to 3944 // service all 3945 // defined APIs. 3946 Endpoints []*Endpoint `json:"endpoints,omitempty"` 3947 3948 // Enums: A list of all enum types included in this API service. 3949 // Enums 3950 // referenced directly or indirectly by the `apis` are 3951 // automatically 3952 // included. Enums which are not referenced but shall be 3953 // included 3954 // should be listed here by name. Example: 3955 // 3956 // enums: 3957 // - name: google.someapi.v1.SomeEnum 3958 Enums []*Enum `json:"enums,omitempty"` 3959 3960 // Http: HTTP configuration. 3961 Http *Http `json:"http,omitempty"` 3962 3963 // Id: A unique ID for a specific instance of this message, typically 3964 // assigned 3965 // by the client for tracking purpose. If empty, the server may choose 3966 // to 3967 // generate one instead. Must be no longer than 60 characters. 3968 Id string `json:"id,omitempty"` 3969 3970 // Logging: Logging configuration. 3971 Logging *Logging `json:"logging,omitempty"` 3972 3973 // Logs: Defines the logs used by this service. 3974 Logs []*LogDescriptor `json:"logs,omitempty"` 3975 3976 // Metrics: Defines the metrics used by this service. 3977 Metrics []*MetricDescriptor `json:"metrics,omitempty"` 3978 3979 // MonitoredResources: Defines the monitored resources used by this 3980 // service. This is required 3981 // by the Service.monitoring and Service.logging configurations. 3982 MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"` 3983 3984 // Monitoring: Monitoring configuration. 3985 Monitoring *Monitoring `json:"monitoring,omitempty"` 3986 3987 // Name: The service name, which is a DNS-like logical identifier for 3988 // the 3989 // service, such as `calendar.googleapis.com`. The service 3990 // name 3991 // typically goes through DNS verification to make sure the owner 3992 // of the service also owns the DNS name. 3993 Name string `json:"name,omitempty"` 3994 3995 // ProducerProjectId: The Google project that owns this service. 3996 ProducerProjectId string `json:"producerProjectId,omitempty"` 3997 3998 // Quota: Quota configuration. 3999 Quota *Quota `json:"quota,omitempty"` 4000 4001 // SourceInfo: Output only. The source information for this 4002 // configuration if available. 4003 SourceInfo *SourceInfo `json:"sourceInfo,omitempty"` 4004 4005 // SystemParameters: System parameter configuration. 4006 SystemParameters *SystemParameters `json:"systemParameters,omitempty"` 4007 4008 // SystemTypes: A list of all proto message types included in this API 4009 // service. 4010 // It serves similar purpose as [google.api.Service.types], except 4011 // that 4012 // these types are not needed by user-defined APIs. Therefore, they will 4013 // not 4014 // show up in the generated discovery doc. This field should only be 4015 // used 4016 // to define system APIs in ESF. 4017 SystemTypes []*Type `json:"systemTypes,omitempty"` 4018 4019 // Title: The product title for this service. 4020 Title string `json:"title,omitempty"` 4021 4022 // Types: A list of all proto message types included in this API 4023 // service. 4024 // Types referenced directly or indirectly by the `apis` 4025 // are 4026 // automatically included. Messages which are not referenced but 4027 // shall be included, such as types used by the `google.protobuf.Any` 4028 // type, 4029 // should be listed here by name. Example: 4030 // 4031 // types: 4032 // - name: google.protobuf.Int32 4033 Types []*Type `json:"types,omitempty"` 4034 4035 // Usage: Configuration controlling usage of this service. 4036 Usage *Usage `json:"usage,omitempty"` 4037 4038 // ForceSendFields is a list of field names (e.g. "Apis") to 4039 // unconditionally include in API requests. By default, fields with 4040 // empty values are omitted from API requests. However, any non-pointer, 4041 // non-interface field appearing in ForceSendFields will be sent to the 4042 // server regardless of whether the field is empty or not. This may be 4043 // used to include empty fields in Patch requests. 4044 ForceSendFields []string `json:"-"` 4045 4046 // NullFields is a list of field names (e.g. "Apis") to include in API 4047 // requests with the JSON null value. By default, fields with empty 4048 // values are omitted from API requests. However, any field with an 4049 // empty value appearing in NullFields will be sent to the server as 4050 // null. It is an error if a field in this list has a non-empty value. 4051 // This may be used to include null fields in Patch requests. 4052 NullFields []string `json:"-"` 4053} 4054 4055func (s *Service) MarshalJSON() ([]byte, error) { 4056 type NoMethod Service 4057 raw := NoMethod(*s) 4058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4059} 4060 4061// ServiceAccountConfig: Describes the service account configuration for 4062// the tenant project. 4063type ServiceAccountConfig struct { 4064 // AccountId: ID of the IAM service account to be created in tenant 4065 // project. 4066 // The email format of the service account 4067 // is 4068 // "<account-id>@<tenant-project-id>.iam.gserviceaccount.com". 4069 // This account ID must be unique within tenant project and 4070 // service 4071 // producers have to guarantee it. The ID must be 6-30 characters long, 4072 // and 4073 // match the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])`. 4074 AccountId string `json:"accountId,omitempty"` 4075 4076 // TenantProjectRoles: Roles for the associated service account for the 4077 // tenant project. 4078 TenantProjectRoles []string `json:"tenantProjectRoles,omitempty"` 4079 4080 // ForceSendFields is a list of field names (e.g. "AccountId") to 4081 // unconditionally include in API requests. By default, fields with 4082 // empty values are omitted from API requests. However, any non-pointer, 4083 // non-interface field appearing in ForceSendFields will be sent to the 4084 // server regardless of whether the field is empty or not. This may be 4085 // used to include empty fields in Patch requests. 4086 ForceSendFields []string `json:"-"` 4087 4088 // NullFields is a list of field names (e.g. "AccountId") to include in 4089 // API requests with the JSON null value. By default, fields with empty 4090 // values are omitted from API requests. However, any field with an 4091 // empty value appearing in NullFields will be sent to the server as 4092 // null. It is an error if a field in this list has a non-empty value. 4093 // This may be used to include null fields in Patch requests. 4094 NullFields []string `json:"-"` 4095} 4096 4097func (s *ServiceAccountConfig) MarshalJSON() ([]byte, error) { 4098 type NoMethod ServiceAccountConfig 4099 raw := NoMethod(*s) 4100 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4101} 4102 4103// SourceContext: `SourceContext` represents information about the 4104// source of a 4105// protobuf element, like the file in which it is defined. 4106type SourceContext struct { 4107 // FileName: The path-qualified name of the .proto file that contained 4108 // the associated 4109 // protobuf element. For example: 4110 // "google/protobuf/source_context.proto". 4111 FileName string `json:"fileName,omitempty"` 4112 4113 // ForceSendFields is a list of field names (e.g. "FileName") to 4114 // unconditionally include in API requests. By default, fields with 4115 // empty values are omitted from API requests. However, any non-pointer, 4116 // non-interface field appearing in ForceSendFields will be sent to the 4117 // server regardless of whether the field is empty or not. This may be 4118 // used to include empty fields in Patch requests. 4119 ForceSendFields []string `json:"-"` 4120 4121 // NullFields is a list of field names (e.g. "FileName") to include in 4122 // API requests with the JSON null value. By default, fields with empty 4123 // values are omitted from API requests. However, any field with an 4124 // empty value appearing in NullFields will be sent to the server as 4125 // null. It is an error if a field in this list has a non-empty value. 4126 // This may be used to include null fields in Patch requests. 4127 NullFields []string `json:"-"` 4128} 4129 4130func (s *SourceContext) MarshalJSON() ([]byte, error) { 4131 type NoMethod SourceContext 4132 raw := NoMethod(*s) 4133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4134} 4135 4136// SourceInfo: Source information used to create a Service Config 4137type SourceInfo struct { 4138 // SourceFiles: All files used during config generation. 4139 SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"` 4140 4141 // ForceSendFields is a list of field names (e.g. "SourceFiles") to 4142 // unconditionally include in API requests. By default, fields with 4143 // empty values are omitted from API requests. However, any non-pointer, 4144 // non-interface field appearing in ForceSendFields will be sent to the 4145 // server regardless of whether the field is empty or not. This may be 4146 // used to include empty fields in Patch requests. 4147 ForceSendFields []string `json:"-"` 4148 4149 // NullFields is a list of field names (e.g. "SourceFiles") to include 4150 // in API requests with the JSON null value. By default, fields with 4151 // empty values are omitted from API requests. However, any field with 4152 // an empty value appearing in NullFields will be sent to the server as 4153 // null. It is an error if a field in this list has a non-empty value. 4154 // This may be used to include null fields in Patch requests. 4155 NullFields []string `json:"-"` 4156} 4157 4158func (s *SourceInfo) MarshalJSON() ([]byte, error) { 4159 type NoMethod SourceInfo 4160 raw := NoMethod(*s) 4161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4162} 4163 4164// Status: The `Status` type defines a logical error model that is 4165// suitable for 4166// different programming environments, including REST APIs and RPC APIs. 4167// It is 4168// used by [gRPC](https://github.com/grpc). Each `Status` message 4169// contains 4170// three pieces of data: error code, error message, and error 4171// details. 4172// 4173// You can find out more about this error model and how to work with it 4174// in the 4175// [API Design Guide](https://cloud.google.com/apis/design/errors). 4176type Status struct { 4177 // Code: The status code, which should be an enum value of 4178 // google.rpc.Code. 4179 Code int64 `json:"code,omitempty"` 4180 4181 // Details: A list of messages that carry the error details. There is a 4182 // common set of 4183 // message types for APIs to use. 4184 Details []googleapi.RawMessage `json:"details,omitempty"` 4185 4186 // Message: A developer-facing error message, which should be in 4187 // English. Any 4188 // user-facing error message should be localized and sent in 4189 // the 4190 // google.rpc.Status.details field, or localized by the client. 4191 Message string `json:"message,omitempty"` 4192 4193 // ForceSendFields is a list of field names (e.g. "Code") to 4194 // unconditionally include in API requests. By default, fields with 4195 // empty values are omitted from API requests. However, any non-pointer, 4196 // non-interface field appearing in ForceSendFields will be sent to the 4197 // server regardless of whether the field is empty or not. This may be 4198 // used to include empty fields in Patch requests. 4199 ForceSendFields []string `json:"-"` 4200 4201 // NullFields is a list of field names (e.g. "Code") to include in API 4202 // requests with the JSON null value. By default, fields with empty 4203 // values are omitted from API requests. However, any field with an 4204 // empty value appearing in NullFields will be sent to the server as 4205 // null. It is an error if a field in this list has a non-empty value. 4206 // This may be used to include null fields in Patch requests. 4207 NullFields []string `json:"-"` 4208} 4209 4210func (s *Status) MarshalJSON() ([]byte, error) { 4211 type NoMethod Status 4212 raw := NoMethod(*s) 4213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4214} 4215 4216// SystemParameter: Define a parameter's name and location. The 4217// parameter may be passed as either 4218// an HTTP header or a URL query parameter, and if both are passed the 4219// behavior 4220// is implementation-dependent. 4221type SystemParameter struct { 4222 // HttpHeader: Define the HTTP header name to use for the parameter. It 4223 // is case 4224 // insensitive. 4225 HttpHeader string `json:"httpHeader,omitempty"` 4226 4227 // Name: Define the name of the parameter, such as "api_key" . It is 4228 // case sensitive. 4229 Name string `json:"name,omitempty"` 4230 4231 // UrlQueryParameter: Define the URL query parameter name to use for the 4232 // parameter. It is case 4233 // sensitive. 4234 UrlQueryParameter string `json:"urlQueryParameter,omitempty"` 4235 4236 // ForceSendFields is a list of field names (e.g. "HttpHeader") to 4237 // unconditionally include in API requests. By default, fields with 4238 // empty values are omitted from API requests. However, any non-pointer, 4239 // non-interface field appearing in ForceSendFields will be sent to the 4240 // server regardless of whether the field is empty or not. This may be 4241 // used to include empty fields in Patch requests. 4242 ForceSendFields []string `json:"-"` 4243 4244 // NullFields is a list of field names (e.g. "HttpHeader") to include in 4245 // API requests with the JSON null value. By default, fields with empty 4246 // values are omitted from API requests. However, any field with an 4247 // empty value appearing in NullFields will be sent to the server as 4248 // null. It is an error if a field in this list has a non-empty value. 4249 // This may be used to include null fields in Patch requests. 4250 NullFields []string `json:"-"` 4251} 4252 4253func (s *SystemParameter) MarshalJSON() ([]byte, error) { 4254 type NoMethod SystemParameter 4255 raw := NoMethod(*s) 4256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4257} 4258 4259// SystemParameterRule: Define a system parameter rule mapping system 4260// parameter definitions to 4261// methods. 4262type SystemParameterRule struct { 4263 // Parameters: Define parameters. Multiple names may be defined for a 4264 // parameter. 4265 // For a given method call, only one of them should be used. If 4266 // multiple 4267 // names are used the behavior is implementation-dependent. 4268 // If none of the specified names are present the behavior 4269 // is 4270 // parameter-dependent. 4271 Parameters []*SystemParameter `json:"parameters,omitempty"` 4272 4273 // Selector: Selects the methods to which this rule applies. Use '*' to 4274 // indicate all 4275 // methods in all APIs. 4276 // 4277 // Refer to selector for syntax details. 4278 Selector string `json:"selector,omitempty"` 4279 4280 // ForceSendFields is a list of field names (e.g. "Parameters") to 4281 // unconditionally include in API requests. By default, fields with 4282 // empty values are omitted from API requests. However, any non-pointer, 4283 // non-interface field appearing in ForceSendFields will be sent to the 4284 // server regardless of whether the field is empty or not. This may be 4285 // used to include empty fields in Patch requests. 4286 ForceSendFields []string `json:"-"` 4287 4288 // NullFields is a list of field names (e.g. "Parameters") to include in 4289 // API requests with the JSON null value. By default, fields with empty 4290 // values are omitted from API requests. However, any field with an 4291 // empty value appearing in NullFields will be sent to the server as 4292 // null. It is an error if a field in this list has a non-empty value. 4293 // This may be used to include null fields in Patch requests. 4294 NullFields []string `json:"-"` 4295} 4296 4297func (s *SystemParameterRule) MarshalJSON() ([]byte, error) { 4298 type NoMethod SystemParameterRule 4299 raw := NoMethod(*s) 4300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4301} 4302 4303// SystemParameters: ### System parameter configuration 4304// 4305// A system parameter is a special kind of parameter defined by the 4306// API 4307// system, not by an individual API. It is typically mapped to an HTTP 4308// header 4309// and/or a URL query parameter. This configuration specifies which 4310// methods 4311// change the names of the system parameters. 4312type SystemParameters struct { 4313 // Rules: Define system parameters. 4314 // 4315 // The parameters defined here will override the default 4316 // parameters 4317 // implemented by the system. If this field is missing from the 4318 // service 4319 // config, default system parameters will be used. Default system 4320 // parameters 4321 // and names is implementation-dependent. 4322 // 4323 // Example: define api key for all methods 4324 // 4325 // system_parameters 4326 // rules: 4327 // - selector: "*" 4328 // parameters: 4329 // - name: api_key 4330 // url_query_parameter: api_key 4331 // 4332 // 4333 // Example: define 2 api key names for a specific method. 4334 // 4335 // system_parameters 4336 // rules: 4337 // - selector: "/ListShelves" 4338 // parameters: 4339 // - name: api_key 4340 // http_header: Api-Key1 4341 // - name: api_key 4342 // http_header: Api-Key2 4343 // 4344 // **NOTE:** All service configuration rules follow "last one wins" 4345 // order. 4346 Rules []*SystemParameterRule `json:"rules,omitempty"` 4347 4348 // ForceSendFields is a list of field names (e.g. "Rules") to 4349 // unconditionally include in API requests. By default, fields with 4350 // empty values are omitted from API requests. However, any non-pointer, 4351 // non-interface field appearing in ForceSendFields will be sent to the 4352 // server regardless of whether the field is empty or not. This may be 4353 // used to include empty fields in Patch requests. 4354 ForceSendFields []string `json:"-"` 4355 4356 // NullFields is a list of field names (e.g. "Rules") to include in API 4357 // requests with the JSON null value. By default, fields with empty 4358 // values are omitted from API requests. However, any field with an 4359 // empty value appearing in NullFields will be sent to the server as 4360 // null. It is an error if a field in this list has a non-empty value. 4361 // This may be used to include null fields in Patch requests. 4362 NullFields []string `json:"-"` 4363} 4364 4365func (s *SystemParameters) MarshalJSON() ([]byte, error) { 4366 type NoMethod SystemParameters 4367 raw := NoMethod(*s) 4368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4369} 4370 4371// TenancyUnit: Representation of a tenancy unit. 4372type TenancyUnit struct { 4373 // Consumer: @OutputOnly Cloud resource name of the consumer of this 4374 // service. 4375 // For example 'projects/123456'. 4376 Consumer string `json:"consumer,omitempty"` 4377 4378 // CreateTime: @OutputOnly The time this tenancy unit was created. 4379 CreateTime string `json:"createTime,omitempty"` 4380 4381 // Name: Globally unique identifier of this tenancy 4382 // unit 4383 // "services/{service}/{collection id}/{resource 4384 // id}/tenancyUnits/{unit}" 4385 Name string `json:"name,omitempty"` 4386 4387 // Service: Output only. Google Cloud API name of the managed service 4388 // owning this 4389 // tenancy unit. 4390 // For example 'serviceconsumermanagement.googleapis.com'. 4391 Service string `json:"service,omitempty"` 4392 4393 // TenantResources: Resources constituting the tenancy unit. 4394 // There can be at most 512 tenant resources in a tenancy unit. 4395 TenantResources []*TenantResource `json:"tenantResources,omitempty"` 4396 4397 // ServerResponse contains the HTTP response code and headers from the 4398 // server. 4399 googleapi.ServerResponse `json:"-"` 4400 4401 // ForceSendFields is a list of field names (e.g. "Consumer") to 4402 // unconditionally include in API requests. By default, fields with 4403 // empty values are omitted from API requests. However, any non-pointer, 4404 // non-interface field appearing in ForceSendFields will be sent to the 4405 // server regardless of whether the field is empty or not. This may be 4406 // used to include empty fields in Patch requests. 4407 ForceSendFields []string `json:"-"` 4408 4409 // NullFields is a list of field names (e.g. "Consumer") to include in 4410 // API requests with the JSON null value. By default, fields with empty 4411 // values are omitted from API requests. However, any field with an 4412 // empty value appearing in NullFields will be sent to the server as 4413 // null. It is an error if a field in this list has a non-empty value. 4414 // This may be used to include null fields in Patch requests. 4415 NullFields []string `json:"-"` 4416} 4417 4418func (s *TenancyUnit) MarshalJSON() ([]byte, error) { 4419 type NoMethod TenancyUnit 4420 raw := NoMethod(*s) 4421 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4422} 4423 4424// TenantProjectConfig: This structure defines a tenant project to be 4425// added to the specified tenancy 4426// unit and its initial configuration and properties. A project lien is 4427// created 4428// for the tenant project to prevent the tenant project from being 4429// deleted 4430// accidentally. The lien is deleted as part of tenant project removal. 4431type TenantProjectConfig struct { 4432 // BillingConfig: Billing account properties. The billing account must 4433 // be specified. 4434 BillingConfig *BillingConfig `json:"billingConfig,omitempty"` 4435 4436 // Folder: Folder where project in this tenancy unit must be 4437 // located 4438 // This folder must have been previously created with the 4439 // required 4440 // permissions for the caller to create and configure a project in 4441 // it. 4442 // Valid folder resource names have the format 4443 // `folders/{folder_number}` 4444 // (for example, `folders/123456`). 4445 Folder string `json:"folder,omitempty"` 4446 4447 // Labels: Labels that are applied to this project. 4448 Labels map[string]string `json:"labels,omitempty"` 4449 4450 // ServiceAccountConfig: Configuration for the IAM service account on 4451 // the tenant project. 4452 ServiceAccountConfig *ServiceAccountConfig `json:"serviceAccountConfig,omitempty"` 4453 4454 // Services: Google Cloud API names of services that are activated on 4455 // this project 4456 // during provisioning. If any of these services can't be 4457 // activated, 4458 // the request fails. 4459 // For example: 'compute.googleapis.com','cloudfunctions.googleapis.com' 4460 Services []string `json:"services,omitempty"` 4461 4462 // TenantProjectPolicy: Describes ownership and policies for the new 4463 // tenant project. Required. 4464 TenantProjectPolicy *TenantProjectPolicy `json:"tenantProjectPolicy,omitempty"` 4465 4466 // ForceSendFields is a list of field names (e.g. "BillingConfig") to 4467 // unconditionally include in API requests. By default, fields with 4468 // empty values are omitted from API requests. However, any non-pointer, 4469 // non-interface field appearing in ForceSendFields will be sent to the 4470 // server regardless of whether the field is empty or not. This may be 4471 // used to include empty fields in Patch requests. 4472 ForceSendFields []string `json:"-"` 4473 4474 // NullFields is a list of field names (e.g. "BillingConfig") to include 4475 // in API requests with the JSON null value. By default, fields with 4476 // empty values are omitted from API requests. However, any field with 4477 // an empty value appearing in NullFields will be sent to the server as 4478 // null. It is an error if a field in this list has a non-empty value. 4479 // This may be used to include null fields in Patch requests. 4480 NullFields []string `json:"-"` 4481} 4482 4483func (s *TenantProjectConfig) MarshalJSON() ([]byte, error) { 4484 type NoMethod TenantProjectConfig 4485 raw := NoMethod(*s) 4486 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4487} 4488 4489// TenantProjectPolicy: Describes policy settings that need to be 4490// applied to a newly 4491// created tenant project. 4492type TenantProjectPolicy struct { 4493 // PolicyBindings: Policy bindings to be applied to the tenant project, 4494 // in addition to the 4495 // 'roles/owner' role granted to the Service Consumer Management 4496 // service 4497 // account. 4498 // At least one binding must have the role `roles/owner`. Among the list 4499 // of 4500 // members for `roles/owner`, at least one of them must be either the 4501 // `user` 4502 // or `group` type. 4503 PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"` 4504 4505 // ForceSendFields is a list of field names (e.g. "PolicyBindings") to 4506 // unconditionally include in API requests. By default, fields with 4507 // empty values are omitted from API requests. However, any non-pointer, 4508 // non-interface field appearing in ForceSendFields will be sent to the 4509 // server regardless of whether the field is empty or not. This may be 4510 // used to include empty fields in Patch requests. 4511 ForceSendFields []string `json:"-"` 4512 4513 // NullFields is a list of field names (e.g. "PolicyBindings") to 4514 // include in API requests with the JSON null value. By default, fields 4515 // with empty values are omitted from API requests. However, any field 4516 // with an empty value appearing in NullFields will be sent to the 4517 // server as null. It is an error if a field in this list has a 4518 // non-empty value. This may be used to include null fields in Patch 4519 // requests. 4520 NullFields []string `json:"-"` 4521} 4522 4523func (s *TenantProjectPolicy) MarshalJSON() ([]byte, error) { 4524 type NoMethod TenantProjectPolicy 4525 raw := NoMethod(*s) 4526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4527} 4528 4529// TenantResource: Resource constituting the TenancyUnit. 4530type TenantResource struct { 4531 // Resource: @OutputOnly Identifier of the tenant resource. 4532 // For cloud projects, it is in the form 'projects/{number}'. 4533 // For example 'projects/123456'. 4534 Resource string `json:"resource,omitempty"` 4535 4536 // Status: Status of tenant resource. 4537 // 4538 // Possible values: 4539 // "STATUS_UNSPECIFIED" - Unspecified status is the default unset 4540 // value. 4541 // "PENDING_CREATE" - Creation of the tenant resource is ongoing. 4542 // "ACTIVE" - Active resource. 4543 // "PENDING_DELETE" - Deletion of the resource is ongoing. 4544 // "FAILED" - Tenant resource creation or deletion has failed. 4545 // "DELETED" - Tenant resource has been deleted. 4546 Status string `json:"status,omitempty"` 4547 4548 // Tag: Unique per single tenancy unit. 4549 Tag string `json:"tag,omitempty"` 4550 4551 // ForceSendFields is a list of field names (e.g. "Resource") to 4552 // unconditionally include in API requests. By default, fields with 4553 // empty values are omitted from API requests. However, any non-pointer, 4554 // non-interface field appearing in ForceSendFields will be sent to the 4555 // server regardless of whether the field is empty or not. This may be 4556 // used to include empty fields in Patch requests. 4557 ForceSendFields []string `json:"-"` 4558 4559 // NullFields is a list of field names (e.g. "Resource") to include in 4560 // API requests with the JSON null value. By default, fields with empty 4561 // values are omitted from API requests. However, any field with an 4562 // empty value appearing in NullFields will be sent to the server as 4563 // null. It is an error if a field in this list has a non-empty value. 4564 // This may be used to include null fields in Patch requests. 4565 NullFields []string `json:"-"` 4566} 4567 4568func (s *TenantResource) MarshalJSON() ([]byte, error) { 4569 type NoMethod TenantResource 4570 raw := NoMethod(*s) 4571 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4572} 4573 4574// Type: A protocol buffer message type. 4575type Type struct { 4576 // Fields: The list of fields. 4577 Fields []*Field `json:"fields,omitempty"` 4578 4579 // Name: The fully qualified message name. 4580 Name string `json:"name,omitempty"` 4581 4582 // Oneofs: The list of types appearing in `oneof` definitions in this 4583 // type. 4584 Oneofs []string `json:"oneofs,omitempty"` 4585 4586 // Options: The protocol buffer options. 4587 Options []*Option `json:"options,omitempty"` 4588 4589 // SourceContext: The source context. 4590 SourceContext *SourceContext `json:"sourceContext,omitempty"` 4591 4592 // Syntax: The source syntax. 4593 // 4594 // Possible values: 4595 // "SYNTAX_PROTO2" - Syntax `proto2`. 4596 // "SYNTAX_PROTO3" - Syntax `proto3`. 4597 Syntax string `json:"syntax,omitempty"` 4598 4599 // ForceSendFields is a list of field names (e.g. "Fields") to 4600 // unconditionally include in API requests. By default, fields with 4601 // empty values are omitted from API requests. However, any non-pointer, 4602 // non-interface field appearing in ForceSendFields will be sent to the 4603 // server regardless of whether the field is empty or not. This may be 4604 // used to include empty fields in Patch requests. 4605 ForceSendFields []string `json:"-"` 4606 4607 // NullFields is a list of field names (e.g. "Fields") to include in API 4608 // requests with the JSON null value. By default, fields with empty 4609 // values are omitted from API requests. However, any field with an 4610 // empty value appearing in NullFields will be sent to the server as 4611 // null. It is an error if a field in this list has a non-empty value. 4612 // This may be used to include null fields in Patch requests. 4613 NullFields []string `json:"-"` 4614} 4615 4616func (s *Type) MarshalJSON() ([]byte, error) { 4617 type NoMethod Type 4618 raw := NoMethod(*s) 4619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4620} 4621 4622// UndeleteTenantProjectRequest: Request message to undelete tenant 4623// project resource previously deleted from 4624// the tenancy unit. 4625type UndeleteTenantProjectRequest struct { 4626 // Tag: Tag of the resource within the tenancy unit. 4627 Tag string `json:"tag,omitempty"` 4628 4629 // ForceSendFields is a list of field names (e.g. "Tag") to 4630 // unconditionally include in API requests. By default, fields with 4631 // empty values are omitted from API requests. However, any non-pointer, 4632 // non-interface field appearing in ForceSendFields will be sent to the 4633 // server regardless of whether the field is empty or not. This may be 4634 // used to include empty fields in Patch requests. 4635 ForceSendFields []string `json:"-"` 4636 4637 // NullFields is a list of field names (e.g. "Tag") to include in API 4638 // requests with the JSON null value. By default, fields with empty 4639 // values are omitted from API requests. However, any field with an 4640 // empty value appearing in NullFields will be sent to the server as 4641 // null. It is an error if a field in this list has a non-empty value. 4642 // This may be used to include null fields in Patch requests. 4643 NullFields []string `json:"-"` 4644} 4645 4646func (s *UndeleteTenantProjectRequest) MarshalJSON() ([]byte, error) { 4647 type NoMethod UndeleteTenantProjectRequest 4648 raw := NoMethod(*s) 4649 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4650} 4651 4652// Usage: Configuration controlling usage of a service. 4653type Usage struct { 4654 // ProducerNotificationChannel: The full resource name of a channel used 4655 // for sending notifications to the 4656 // service producer. 4657 // 4658 // Google Service Management currently only supports 4659 // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a 4660 // notification 4661 // channel. To use Google Cloud Pub/Sub as the channel, this must be the 4662 // name 4663 // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name 4664 // format 4665 // documented in https://cloud.google.com/pubsub/docs/overview. 4666 ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"` 4667 4668 // Requirements: Requirements that must be satisfied before a consumer 4669 // project can use the 4670 // service. Each requirement is of the form 4671 // <service.name>/<requirement-id>; 4672 // for example 'serviceusage.googleapis.com/billing-enabled'. 4673 Requirements []string `json:"requirements,omitempty"` 4674 4675 // Rules: A list of usage rules that apply to individual API 4676 // methods. 4677 // 4678 // **NOTE:** All service configuration rules follow "last one wins" 4679 // order. 4680 Rules []*UsageRule `json:"rules,omitempty"` 4681 4682 // ForceSendFields is a list of field names (e.g. 4683 // "ProducerNotificationChannel") to unconditionally include in API 4684 // requests. By default, fields with empty values are omitted from API 4685 // requests. However, any non-pointer, non-interface field appearing in 4686 // ForceSendFields will be sent to the server regardless of whether the 4687 // field is empty or not. This may be used to include empty fields in 4688 // Patch requests. 4689 ForceSendFields []string `json:"-"` 4690 4691 // NullFields is a list of field names (e.g. 4692 // "ProducerNotificationChannel") to include in API requests with the 4693 // JSON null value. By default, fields with empty values are omitted 4694 // from API requests. However, any field with an empty value appearing 4695 // in NullFields will be sent to the server as null. It is an error if a 4696 // field in this list has a non-empty value. This may be used to include 4697 // null fields in Patch requests. 4698 NullFields []string `json:"-"` 4699} 4700 4701func (s *Usage) MarshalJSON() ([]byte, error) { 4702 type NoMethod Usage 4703 raw := NoMethod(*s) 4704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4705} 4706 4707// UsageRule: Usage configuration rules for the service. 4708// 4709// NOTE: Under development. 4710// 4711// 4712// Use this rule to configure unregistered calls for the service. 4713// Unregistered 4714// calls are calls that do not contain consumer project 4715// identity. 4716// (Example: calls that do not contain an API key). 4717// By default, API methods do not allow unregistered calls, and each 4718// method call 4719// must be identified by a consumer project identity. Use this rule 4720// to 4721// allow/disallow unregistered calls. 4722// 4723// Example of an API that wants to allow unregistered calls for entire 4724// service. 4725// 4726// usage: 4727// rules: 4728// - selector: "*" 4729// allow_unregistered_calls: true 4730// 4731// Example of a method that wants to allow unregistered calls. 4732// 4733// usage: 4734// rules: 4735// - selector: 4736// "google.example.library.v1.LibraryService.CreateBook" 4737// allow_unregistered_calls: true 4738type UsageRule struct { 4739 // AllowUnregisteredCalls: If true, the selected method allows 4740 // unregistered calls, e.g. calls 4741 // that don't identify any user or application. 4742 AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"` 4743 4744 // Selector: Selects the methods to which this rule applies. Use '*' to 4745 // indicate all 4746 // methods in all APIs. 4747 // 4748 // Refer to selector for syntax details. 4749 Selector string `json:"selector,omitempty"` 4750 4751 // SkipServiceControl: If true, the selected method should skip service 4752 // control and the control 4753 // plane features, such as quota and billing, will not be 4754 // available. 4755 // This flag is used by Google Cloud Endpoints to bypass checks for 4756 // internal 4757 // methods, such as service health check methods. 4758 SkipServiceControl bool `json:"skipServiceControl,omitempty"` 4759 4760 // ForceSendFields is a list of field names (e.g. 4761 // "AllowUnregisteredCalls") to unconditionally include in API requests. 4762 // By default, fields with empty values are omitted from API requests. 4763 // However, any non-pointer, non-interface field appearing in 4764 // ForceSendFields will be sent to the server regardless of whether the 4765 // field is empty or not. This may be used to include empty fields in 4766 // Patch requests. 4767 ForceSendFields []string `json:"-"` 4768 4769 // NullFields is a list of field names (e.g. "AllowUnregisteredCalls") 4770 // to include in API requests with the JSON null value. By default, 4771 // fields with empty values are omitted from API requests. However, any 4772 // field with an empty value appearing in NullFields will be sent to the 4773 // server as null. It is an error if a field in this list has a 4774 // non-empty value. This may be used to include null fields in Patch 4775 // requests. 4776 NullFields []string `json:"-"` 4777} 4778 4779func (s *UsageRule) MarshalJSON() ([]byte, error) { 4780 type NoMethod UsageRule 4781 raw := NoMethod(*s) 4782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4783} 4784 4785// V1AddVisibilityLabelsResponse: Response message for the 4786// `AddVisibilityLabels` method. 4787// This response message is assigned to the `response` field of the 4788// returned 4789// Operation when that operation is done. 4790type V1AddVisibilityLabelsResponse struct { 4791 // Labels: The updated set of visibility labels for this consumer on 4792 // this service. 4793 Labels []string `json:"labels,omitempty"` 4794 4795 // ForceSendFields is a list of field names (e.g. "Labels") to 4796 // unconditionally include in API requests. By default, fields with 4797 // empty values are omitted from API requests. However, any non-pointer, 4798 // non-interface field appearing in ForceSendFields will be sent to the 4799 // server regardless of whether the field is empty or not. This may be 4800 // used to include empty fields in Patch requests. 4801 ForceSendFields []string `json:"-"` 4802 4803 // NullFields is a list of field names (e.g. "Labels") to include in API 4804 // requests with the JSON null value. By default, fields with empty 4805 // values are omitted from API requests. However, any field with an 4806 // empty value appearing in NullFields will be sent to the server as 4807 // null. It is an error if a field in this list has a non-empty value. 4808 // This may be used to include null fields in Patch requests. 4809 NullFields []string `json:"-"` 4810} 4811 4812func (s *V1AddVisibilityLabelsResponse) MarshalJSON() ([]byte, error) { 4813 type NoMethod V1AddVisibilityLabelsResponse 4814 raw := NoMethod(*s) 4815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4816} 4817 4818// V1Beta1BatchCreateProducerOverridesResponse: Response message for 4819// BatchCreateProducerOverrides 4820type V1Beta1BatchCreateProducerOverridesResponse struct { 4821 // Overrides: The overrides that were created. 4822 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"` 4823 4824 // ForceSendFields is a list of field names (e.g. "Overrides") to 4825 // unconditionally include in API requests. By default, fields with 4826 // empty values are omitted from API requests. However, any non-pointer, 4827 // non-interface field appearing in ForceSendFields will be sent to the 4828 // server regardless of whether the field is empty or not. This may be 4829 // used to include empty fields in Patch requests. 4830 ForceSendFields []string `json:"-"` 4831 4832 // NullFields is a list of field names (e.g. "Overrides") to include in 4833 // API requests with the JSON null value. By default, fields with empty 4834 // values are omitted from API requests. However, any field with an 4835 // empty value appearing in NullFields will be sent to the server as 4836 // null. It is an error if a field in this list has a non-empty value. 4837 // This may be used to include null fields in Patch requests. 4838 NullFields []string `json:"-"` 4839} 4840 4841func (s *V1Beta1BatchCreateProducerOverridesResponse) MarshalJSON() ([]byte, error) { 4842 type NoMethod V1Beta1BatchCreateProducerOverridesResponse 4843 raw := NoMethod(*s) 4844 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4845} 4846 4847// V1Beta1DisableConsumerResponse: Response message for the 4848// `DisableConsumer` method. 4849// This response message is assigned to the `response` field of the 4850// returned 4851// Operation when that operation is done. 4852type V1Beta1DisableConsumerResponse struct { 4853} 4854 4855// V1Beta1EnableConsumerResponse: Response message for the 4856// `EnableConsumer` method. 4857// This response message is assigned to the `response` field of the 4858// returned 4859// Operation when that operation is done. 4860type V1Beta1EnableConsumerResponse struct { 4861} 4862 4863// V1Beta1ImportProducerOverridesResponse: Response message for 4864// ImportProducerOverrides 4865type V1Beta1ImportProducerOverridesResponse struct { 4866 // Overrides: The overrides that were created from the imported data. 4867 Overrides []*V1Beta1QuotaOverride `json:"overrides,omitempty"` 4868 4869 // ForceSendFields is a list of field names (e.g. "Overrides") to 4870 // unconditionally include in API requests. By default, fields with 4871 // empty values are omitted from API requests. However, any non-pointer, 4872 // non-interface field appearing in ForceSendFields will be sent to the 4873 // server regardless of whether the field is empty or not. This may be 4874 // used to include empty fields in Patch requests. 4875 ForceSendFields []string `json:"-"` 4876 4877 // NullFields is a list of field names (e.g. "Overrides") to include in 4878 // API requests with the JSON null value. By default, fields with empty 4879 // values are omitted from API requests. However, any field with an 4880 // empty value appearing in NullFields will be sent to the server as 4881 // null. It is an error if a field in this list has a non-empty value. 4882 // This may be used to include null fields in Patch requests. 4883 NullFields []string `json:"-"` 4884} 4885 4886func (s *V1Beta1ImportProducerOverridesResponse) MarshalJSON() ([]byte, error) { 4887 type NoMethod V1Beta1ImportProducerOverridesResponse 4888 raw := NoMethod(*s) 4889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4890} 4891 4892// V1Beta1QuotaOverride: A quota override 4893type V1Beta1QuotaOverride struct { 4894 // Dimensions: If this map is nonempty, then this override applies only 4895 // to specific values 4896 // for dimensions defined in the limit unit. 4897 // 4898 // For example, an override on a limit with the unit 4899 // 1/{project}/{region} 4900 // could contain an entry with the key "region" and the value 4901 // "us-east-1"; 4902 // the override is only applied to quota consumed in that region. 4903 // 4904 // This map has the following restrictions: 4905 // - Keys that are not defined in the limit's unit are not valid keys. 4906 // Any string appearing in {brackets} in the unit (besides {project} 4907 // or 4908 // {user}) is a defined key. 4909 // - "project" is not a valid key; the project is already specified in 4910 // the parent resource name. 4911 // - "user" is not a valid key; the API does not support quota 4912 // overrides 4913 // that apply only to a specific user. 4914 // - If "region" appears as a key, its value must be a valid Cloud 4915 // region. 4916 // - If "zone" appears as a key, its value must be a valid Cloud zone. 4917 // - If any valid key other than "region" or "zone" appears in the map, 4918 // then 4919 // all valid keys other than "region" or "zone" must also appear in 4920 // the map. 4921 Dimensions map[string]string `json:"dimensions,omitempty"` 4922 4923 // Metric: The name of the metric to which this override applies. 4924 // 4925 // An example name would be: 4926 // `compute.googleapis.com/cpus` 4927 Metric string `json:"metric,omitempty"` 4928 4929 // Name: The resource name of the producer override. 4930 // An example name would 4931 // be: 4932 // `services/compute.googleapis.com/projects/123/consumerQuotaMetrics 4933 // /compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOver 4934 // rides/4a3f2c1d` 4935 Name string `json:"name,omitempty"` 4936 4937 // OverrideValue: The overriding quota limit value. 4938 // Can be any nonnegative integer, or -1 (unlimited quota). 4939 OverrideValue int64 `json:"overrideValue,omitempty,string"` 4940 4941 // Unit: The limit unit of the limit to which this override applies. 4942 // 4943 // An example unit would be: 4944 // `1/{project}/{region}` 4945 // Note that `{project}` and `{region}` are not placeholders in this 4946 // example; 4947 // the literal characters `{` and `}` occur in the string. 4948 Unit string `json:"unit,omitempty"` 4949 4950 // ForceSendFields is a list of field names (e.g. "Dimensions") to 4951 // unconditionally include in API requests. By default, fields with 4952 // empty values are omitted from API requests. However, any non-pointer, 4953 // non-interface field appearing in ForceSendFields will be sent to the 4954 // server regardless of whether the field is empty or not. This may be 4955 // used to include empty fields in Patch requests. 4956 ForceSendFields []string `json:"-"` 4957 4958 // NullFields is a list of field names (e.g. "Dimensions") to include in 4959 // API requests with the JSON null value. By default, fields with empty 4960 // values are omitted from API requests. However, any field with an 4961 // empty value appearing in NullFields will be sent to the server as 4962 // null. It is an error if a field in this list has a non-empty value. 4963 // This may be used to include null fields in Patch requests. 4964 NullFields []string `json:"-"` 4965} 4966 4967func (s *V1Beta1QuotaOverride) MarshalJSON() ([]byte, error) { 4968 type NoMethod V1Beta1QuotaOverride 4969 raw := NoMethod(*s) 4970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4971} 4972 4973// V1Beta1RefreshConsumerResponse: Response message for the 4974// `RefreshConsumer` method. 4975// This response message is assigned to the `response` field of the 4976// returned 4977// Operation when that operation is done. 4978type V1Beta1RefreshConsumerResponse struct { 4979} 4980 4981// V1DisableConsumerResponse: Response message for the `DisableConsumer` 4982// method. 4983// This response message is assigned to the `response` field of the 4984// returned 4985// Operation when that operation is done. 4986type V1DisableConsumerResponse struct { 4987} 4988 4989// V1EnableConsumerResponse: Response message for the `EnableConsumer` 4990// method. 4991// This response message is assigned to the `response` field of the 4992// returned 4993// Operation when that operation is done. 4994type V1EnableConsumerResponse struct { 4995} 4996 4997// V1GenerateServiceAccountResponse: Response message for the 4998// `GenerateServiceAccount` method. 4999// 5000// This response message is assigned to the `response` field of the 5001// returned 5002// Operation when that operation is done. 5003type V1GenerateServiceAccountResponse struct { 5004 // Account: ServiceAccount that was created or retrieved. 5005 Account *V1ServiceAccount `json:"account,omitempty"` 5006 5007 // ForceSendFields is a list of field names (e.g. "Account") to 5008 // unconditionally include in API requests. By default, fields with 5009 // empty values are omitted from API requests. However, any non-pointer, 5010 // non-interface field appearing in ForceSendFields will be sent to the 5011 // server regardless of whether the field is empty or not. This may be 5012 // used to include empty fields in Patch requests. 5013 ForceSendFields []string `json:"-"` 5014 5015 // NullFields is a list of field names (e.g. "Account") to include in 5016 // API requests with the JSON null value. By default, fields with empty 5017 // values are omitted from API requests. However, any field with an 5018 // empty value appearing in NullFields will be sent to the server as 5019 // null. It is an error if a field in this list has a non-empty value. 5020 // This may be used to include null fields in Patch requests. 5021 NullFields []string `json:"-"` 5022} 5023 5024func (s *V1GenerateServiceAccountResponse) MarshalJSON() ([]byte, error) { 5025 type NoMethod V1GenerateServiceAccountResponse 5026 raw := NoMethod(*s) 5027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5028} 5029 5030// V1RefreshConsumerResponse: Response message for the `RefreshConsumer` 5031// method. 5032// This response message is assigned to the `response` field of the 5033// returned 5034// Operation when that operation is done. 5035type V1RefreshConsumerResponse struct { 5036} 5037 5038// V1RemoveVisibilityLabelsResponse: Response message for the 5039// `RemoveVisibilityLabels` method. 5040// This response message is assigned to the `response` field of the 5041// returned 5042// Operation when that operation is done. 5043type V1RemoveVisibilityLabelsResponse struct { 5044 // Labels: The updated set of visibility labels for this consumer on 5045 // this service. 5046 Labels []string `json:"labels,omitempty"` 5047 5048 // ForceSendFields is a list of field names (e.g. "Labels") to 5049 // unconditionally include in API requests. By default, fields with 5050 // empty values are omitted from API requests. However, any non-pointer, 5051 // non-interface field appearing in ForceSendFields will be sent to the 5052 // server regardless of whether the field is empty or not. This may be 5053 // used to include empty fields in Patch requests. 5054 ForceSendFields []string `json:"-"` 5055 5056 // NullFields is a list of field names (e.g. "Labels") to include in API 5057 // requests with the JSON null value. By default, fields with empty 5058 // values are omitted from API requests. However, any field with an 5059 // empty value appearing in NullFields will be sent to the server as 5060 // null. It is an error if a field in this list has a non-empty value. 5061 // This may be used to include null fields in Patch requests. 5062 NullFields []string `json:"-"` 5063} 5064 5065func (s *V1RemoveVisibilityLabelsResponse) MarshalJSON() ([]byte, error) { 5066 type NoMethod V1RemoveVisibilityLabelsResponse 5067 raw := NoMethod(*s) 5068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5069} 5070 5071// V1ServiceAccount: A service account in the Identity and Access 5072// Management API. 5073type V1ServiceAccount struct { 5074 // Email: The email address of the service account. 5075 Email string `json:"email,omitempty"` 5076 5077 // IamAccountName: The IAM resource name of the service account in the 5078 // following format: 5079 // projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. 5080 IamAccountName string `json:"iamAccountName,omitempty"` 5081 5082 // Name: P4 SA resource name. 5083 // 5084 // An example name would 5085 // be: 5086 // `services/serviceconsumermanagement.googleapis.com/projects/123/se 5087 // rviceAccounts/default` 5088 Name string `json:"name,omitempty"` 5089 5090 // Tag: The P4 SA configuration tag. This must be defined in 5091 // activation_grants. 5092 // If not specified when creating the account, the tag is set to 5093 // "default". 5094 Tag string `json:"tag,omitempty"` 5095 5096 // UniqueId: The unique and stable id of the service account. 5097 UniqueId string `json:"uniqueId,omitempty"` 5098 5099 // ForceSendFields is a list of field names (e.g. "Email") to 5100 // unconditionally include in API requests. By default, fields with 5101 // empty values are omitted from API requests. However, any non-pointer, 5102 // non-interface field appearing in ForceSendFields will be sent to the 5103 // server regardless of whether the field is empty or not. This may be 5104 // used to include empty fields in Patch requests. 5105 ForceSendFields []string `json:"-"` 5106 5107 // NullFields is a list of field names (e.g. "Email") to include in API 5108 // requests with the JSON null value. By default, fields with empty 5109 // values are omitted from API requests. However, any field with an 5110 // empty value appearing in NullFields will be sent to the server as 5111 // null. It is an error if a field in this list has a non-empty value. 5112 // This may be used to include null fields in Patch requests. 5113 NullFields []string `json:"-"` 5114} 5115 5116func (s *V1ServiceAccount) MarshalJSON() ([]byte, error) { 5117 type NoMethod V1ServiceAccount 5118 raw := NoMethod(*s) 5119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5120} 5121 5122// method id "serviceconsumermanagement.operations.cancel": 5123 5124type OperationsCancelCall struct { 5125 s *APIService 5126 name string 5127 canceloperationrequest *CancelOperationRequest 5128 urlParams_ gensupport.URLParams 5129 ctx_ context.Context 5130 header_ http.Header 5131} 5132 5133// Cancel: Starts asynchronous cancellation on a long-running operation. 5134// The server 5135// makes a best effort to cancel the operation, but success is 5136// not 5137// guaranteed. If the server doesn't support this method, it 5138// returns 5139// `google.rpc.Code.UNIMPLEMENTED`. Clients can 5140// use 5141// Operations.GetOperation or 5142// other methods to check whether the cancellation succeeded or whether 5143// the 5144// operation completed despite cancellation. On successful 5145// cancellation, 5146// the operation is not deleted; instead, it becomes an operation 5147// with 5148// an Operation.error value with a google.rpc.Status.code of 5149// 1, 5150// corresponding to `Code.CANCELLED`. 5151func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { 5152 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5153 c.name = name 5154 c.canceloperationrequest = canceloperationrequest 5155 return c 5156} 5157 5158// Fields allows partial responses to be retrieved. See 5159// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5160// for more information. 5161func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { 5162 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5163 return c 5164} 5165 5166// Context sets the context to be used in this call's Do method. Any 5167// pending HTTP request will be aborted if the provided context is 5168// canceled. 5169func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { 5170 c.ctx_ = ctx 5171 return c 5172} 5173 5174// Header returns an http.Header that can be modified by the caller to 5175// add HTTP headers to the request. 5176func (c *OperationsCancelCall) Header() http.Header { 5177 if c.header_ == nil { 5178 c.header_ = make(http.Header) 5179 } 5180 return c.header_ 5181} 5182 5183func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { 5184 reqHeaders := make(http.Header) 5185 for k, v := range c.header_ { 5186 reqHeaders[k] = v 5187 } 5188 reqHeaders.Set("User-Agent", c.s.userAgent()) 5189 var body io.Reader = nil 5190 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 5191 if err != nil { 5192 return nil, err 5193 } 5194 reqHeaders.Set("Content-Type", "application/json") 5195 c.urlParams_.Set("alt", alt) 5196 c.urlParams_.Set("prettyPrint", "false") 5197 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 5198 urls += "?" + c.urlParams_.Encode() 5199 req, err := http.NewRequest("POST", urls, body) 5200 if err != nil { 5201 return nil, err 5202 } 5203 req.Header = reqHeaders 5204 googleapi.Expand(req.URL, map[string]string{ 5205 "name": c.name, 5206 }) 5207 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5208} 5209 5210// Do executes the "serviceconsumermanagement.operations.cancel" call. 5211// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5212// code is an error. Response headers are in either 5213// *Empty.ServerResponse.Header or (if a response was returned at all) 5214// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5215// check whether the returned error was because http.StatusNotModified 5216// was returned. 5217func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5218 gensupport.SetOptions(c.urlParams_, opts...) 5219 res, err := c.doRequest("json") 5220 if res != nil && res.StatusCode == http.StatusNotModified { 5221 if res.Body != nil { 5222 res.Body.Close() 5223 } 5224 return nil, &googleapi.Error{ 5225 Code: res.StatusCode, 5226 Header: res.Header, 5227 } 5228 } 5229 if err != nil { 5230 return nil, err 5231 } 5232 defer googleapi.CloseBody(res) 5233 if err := googleapi.CheckResponse(res); err != nil { 5234 return nil, err 5235 } 5236 ret := &Empty{ 5237 ServerResponse: googleapi.ServerResponse{ 5238 Header: res.Header, 5239 HTTPStatusCode: res.StatusCode, 5240 }, 5241 } 5242 target := &ret 5243 if err := gensupport.DecodeResponse(target, res); err != nil { 5244 return nil, err 5245 } 5246 return ret, nil 5247 // { 5248 // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", 5249 // "flatPath": "v1/operations/{operationsId}:cancel", 5250 // "httpMethod": "POST", 5251 // "id": "serviceconsumermanagement.operations.cancel", 5252 // "parameterOrder": [ 5253 // "name" 5254 // ], 5255 // "parameters": { 5256 // "name": { 5257 // "description": "The name of the operation resource to be cancelled.", 5258 // "location": "path", 5259 // "pattern": "^operations/.+$", 5260 // "required": true, 5261 // "type": "string" 5262 // } 5263 // }, 5264 // "path": "v1/{+name}:cancel", 5265 // "request": { 5266 // "$ref": "CancelOperationRequest" 5267 // }, 5268 // "response": { 5269 // "$ref": "Empty" 5270 // }, 5271 // "scopes": [ 5272 // "https://www.googleapis.com/auth/cloud-platform" 5273 // ] 5274 // } 5275 5276} 5277 5278// method id "serviceconsumermanagement.operations.delete": 5279 5280type OperationsDeleteCall struct { 5281 s *APIService 5282 name string 5283 urlParams_ gensupport.URLParams 5284 ctx_ context.Context 5285 header_ http.Header 5286} 5287 5288// Delete: Deletes a long-running operation. This method indicates that 5289// the client is 5290// no longer interested in the operation result. It does not cancel 5291// the 5292// operation. If the server doesn't support this method, it 5293// returns 5294// `google.rpc.Code.UNIMPLEMENTED`. 5295func (r *OperationsService) Delete(name string) *OperationsDeleteCall { 5296 c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5297 c.name = name 5298 return c 5299} 5300 5301// Fields allows partial responses to be retrieved. See 5302// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5303// for more information. 5304func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { 5305 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5306 return c 5307} 5308 5309// Context sets the context to be used in this call's Do method. Any 5310// pending HTTP request will be aborted if the provided context is 5311// canceled. 5312func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { 5313 c.ctx_ = ctx 5314 return c 5315} 5316 5317// Header returns an http.Header that can be modified by the caller to 5318// add HTTP headers to the request. 5319func (c *OperationsDeleteCall) Header() http.Header { 5320 if c.header_ == nil { 5321 c.header_ = make(http.Header) 5322 } 5323 return c.header_ 5324} 5325 5326func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 5327 reqHeaders := make(http.Header) 5328 for k, v := range c.header_ { 5329 reqHeaders[k] = v 5330 } 5331 reqHeaders.Set("User-Agent", c.s.userAgent()) 5332 var body io.Reader = nil 5333 c.urlParams_.Set("alt", alt) 5334 c.urlParams_.Set("prettyPrint", "false") 5335 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5336 urls += "?" + c.urlParams_.Encode() 5337 req, err := http.NewRequest("DELETE", urls, body) 5338 if err != nil { 5339 return nil, err 5340 } 5341 req.Header = reqHeaders 5342 googleapi.Expand(req.URL, map[string]string{ 5343 "name": c.name, 5344 }) 5345 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5346} 5347 5348// Do executes the "serviceconsumermanagement.operations.delete" call. 5349// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5350// code is an error. Response headers are in either 5351// *Empty.ServerResponse.Header or (if a response was returned at all) 5352// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5353// check whether the returned error was because http.StatusNotModified 5354// was returned. 5355func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5356 gensupport.SetOptions(c.urlParams_, opts...) 5357 res, err := c.doRequest("json") 5358 if res != nil && res.StatusCode == http.StatusNotModified { 5359 if res.Body != nil { 5360 res.Body.Close() 5361 } 5362 return nil, &googleapi.Error{ 5363 Code: res.StatusCode, 5364 Header: res.Header, 5365 } 5366 } 5367 if err != nil { 5368 return nil, err 5369 } 5370 defer googleapi.CloseBody(res) 5371 if err := googleapi.CheckResponse(res); err != nil { 5372 return nil, err 5373 } 5374 ret := &Empty{ 5375 ServerResponse: googleapi.ServerResponse{ 5376 Header: res.Header, 5377 HTTPStatusCode: res.StatusCode, 5378 }, 5379 } 5380 target := &ret 5381 if err := gensupport.DecodeResponse(target, res); err != nil { 5382 return nil, err 5383 } 5384 return ret, nil 5385 // { 5386 // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", 5387 // "flatPath": "v1/operations/{operationsId}", 5388 // "httpMethod": "DELETE", 5389 // "id": "serviceconsumermanagement.operations.delete", 5390 // "parameterOrder": [ 5391 // "name" 5392 // ], 5393 // "parameters": { 5394 // "name": { 5395 // "description": "The name of the operation resource to be deleted.", 5396 // "location": "path", 5397 // "pattern": "^operations/.+$", 5398 // "required": true, 5399 // "type": "string" 5400 // } 5401 // }, 5402 // "path": "v1/{+name}", 5403 // "response": { 5404 // "$ref": "Empty" 5405 // }, 5406 // "scopes": [ 5407 // "https://www.googleapis.com/auth/cloud-platform" 5408 // ] 5409 // } 5410 5411} 5412 5413// method id "serviceconsumermanagement.operations.get": 5414 5415type OperationsGetCall struct { 5416 s *APIService 5417 name string 5418 urlParams_ gensupport.URLParams 5419 ifNoneMatch_ string 5420 ctx_ context.Context 5421 header_ http.Header 5422} 5423 5424// Get: Gets the latest state of a long-running operation. Clients can 5425// use this 5426// method to poll the operation result at intervals as recommended by 5427// the API 5428// service. 5429func (r *OperationsService) Get(name string) *OperationsGetCall { 5430 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5431 c.name = name 5432 return c 5433} 5434 5435// Fields allows partial responses to be retrieved. See 5436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5437// for more information. 5438func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 5439 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5440 return c 5441} 5442 5443// IfNoneMatch sets the optional parameter which makes the operation 5444// fail if the object's ETag matches the given value. This is useful for 5445// getting updates only after the object has changed since the last 5446// request. Use googleapi.IsNotModified to check whether the response 5447// error from Do is the result of In-None-Match. 5448func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 5449 c.ifNoneMatch_ = entityTag 5450 return c 5451} 5452 5453// Context sets the context to be used in this call's Do method. Any 5454// pending HTTP request will be aborted if the provided context is 5455// canceled. 5456func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 5457 c.ctx_ = ctx 5458 return c 5459} 5460 5461// Header returns an http.Header that can be modified by the caller to 5462// add HTTP headers to the request. 5463func (c *OperationsGetCall) Header() http.Header { 5464 if c.header_ == nil { 5465 c.header_ = make(http.Header) 5466 } 5467 return c.header_ 5468} 5469 5470func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 5471 reqHeaders := make(http.Header) 5472 for k, v := range c.header_ { 5473 reqHeaders[k] = v 5474 } 5475 reqHeaders.Set("User-Agent", c.s.userAgent()) 5476 if c.ifNoneMatch_ != "" { 5477 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5478 } 5479 var body io.Reader = nil 5480 c.urlParams_.Set("alt", alt) 5481 c.urlParams_.Set("prettyPrint", "false") 5482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5483 urls += "?" + c.urlParams_.Encode() 5484 req, err := http.NewRequest("GET", urls, body) 5485 if err != nil { 5486 return nil, err 5487 } 5488 req.Header = reqHeaders 5489 googleapi.Expand(req.URL, map[string]string{ 5490 "name": c.name, 5491 }) 5492 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5493} 5494 5495// Do executes the "serviceconsumermanagement.operations.get" call. 5496// Exactly one of *Operation or error will be non-nil. Any non-2xx 5497// status code is an error. Response headers are in either 5498// *Operation.ServerResponse.Header or (if a response was returned at 5499// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5500// to check whether the returned error was because 5501// http.StatusNotModified was returned. 5502func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5503 gensupport.SetOptions(c.urlParams_, opts...) 5504 res, err := c.doRequest("json") 5505 if res != nil && res.StatusCode == http.StatusNotModified { 5506 if res.Body != nil { 5507 res.Body.Close() 5508 } 5509 return nil, &googleapi.Error{ 5510 Code: res.StatusCode, 5511 Header: res.Header, 5512 } 5513 } 5514 if err != nil { 5515 return nil, err 5516 } 5517 defer googleapi.CloseBody(res) 5518 if err := googleapi.CheckResponse(res); err != nil { 5519 return nil, err 5520 } 5521 ret := &Operation{ 5522 ServerResponse: googleapi.ServerResponse{ 5523 Header: res.Header, 5524 HTTPStatusCode: res.StatusCode, 5525 }, 5526 } 5527 target := &ret 5528 if err := gensupport.DecodeResponse(target, res); err != nil { 5529 return nil, err 5530 } 5531 return ret, nil 5532 // { 5533 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 5534 // "flatPath": "v1/operations/{operationsId}", 5535 // "httpMethod": "GET", 5536 // "id": "serviceconsumermanagement.operations.get", 5537 // "parameterOrder": [ 5538 // "name" 5539 // ], 5540 // "parameters": { 5541 // "name": { 5542 // "description": "The name of the operation resource.", 5543 // "location": "path", 5544 // "pattern": "^operations/[^/]+$", 5545 // "required": true, 5546 // "type": "string" 5547 // } 5548 // }, 5549 // "path": "v1/{+name}", 5550 // "response": { 5551 // "$ref": "Operation" 5552 // }, 5553 // "scopes": [ 5554 // "https://www.googleapis.com/auth/cloud-platform" 5555 // ] 5556 // } 5557 5558} 5559 5560// method id "serviceconsumermanagement.operations.list": 5561 5562type OperationsListCall struct { 5563 s *APIService 5564 name string 5565 urlParams_ gensupport.URLParams 5566 ifNoneMatch_ string 5567 ctx_ context.Context 5568 header_ http.Header 5569} 5570 5571// List: Lists operations that match the specified filter in the 5572// request. If the 5573// server doesn't support this method, it returns 5574// `UNIMPLEMENTED`. 5575// 5576// NOTE: the `name` binding allows API services to override the 5577// binding 5578// to use different resource name schemes, such as `users/*/operations`. 5579// To 5580// override the binding, API services can add a binding such 5581// as 5582// "/v1/{name=users/*}/operations" to their service configuration. 5583// For backwards compatibility, the default name includes the 5584// operations 5585// collection id, however overriding users must ensure the name 5586// binding 5587// is the parent resource, without the operations collection id. 5588func (r *OperationsService) List(name string) *OperationsListCall { 5589 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5590 c.name = name 5591 return c 5592} 5593 5594// Filter sets the optional parameter "filter": The standard list 5595// filter. 5596func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 5597 c.urlParams_.Set("filter", filter) 5598 return c 5599} 5600 5601// PageSize sets the optional parameter "pageSize": The standard list 5602// page size. 5603func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { 5604 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5605 return c 5606} 5607 5608// PageToken sets the optional parameter "pageToken": The standard list 5609// page token. 5610func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 5611 c.urlParams_.Set("pageToken", pageToken) 5612 return c 5613} 5614 5615// Fields allows partial responses to be retrieved. See 5616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5617// for more information. 5618func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 5619 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5620 return c 5621} 5622 5623// IfNoneMatch sets the optional parameter which makes the operation 5624// fail if the object's ETag matches the given value. This is useful for 5625// getting updates only after the object has changed since the last 5626// request. Use googleapi.IsNotModified to check whether the response 5627// error from Do is the result of In-None-Match. 5628func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 5629 c.ifNoneMatch_ = entityTag 5630 return c 5631} 5632 5633// Context sets the context to be used in this call's Do method. Any 5634// pending HTTP request will be aborted if the provided context is 5635// canceled. 5636func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 5637 c.ctx_ = ctx 5638 return c 5639} 5640 5641// Header returns an http.Header that can be modified by the caller to 5642// add HTTP headers to the request. 5643func (c *OperationsListCall) Header() http.Header { 5644 if c.header_ == nil { 5645 c.header_ = make(http.Header) 5646 } 5647 return c.header_ 5648} 5649 5650func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 5651 reqHeaders := make(http.Header) 5652 for k, v := range c.header_ { 5653 reqHeaders[k] = v 5654 } 5655 reqHeaders.Set("User-Agent", c.s.userAgent()) 5656 if c.ifNoneMatch_ != "" { 5657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5658 } 5659 var body io.Reader = nil 5660 c.urlParams_.Set("alt", alt) 5661 c.urlParams_.Set("prettyPrint", "false") 5662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5663 urls += "?" + c.urlParams_.Encode() 5664 req, err := http.NewRequest("GET", urls, body) 5665 if err != nil { 5666 return nil, err 5667 } 5668 req.Header = reqHeaders 5669 googleapi.Expand(req.URL, map[string]string{ 5670 "name": c.name, 5671 }) 5672 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5673} 5674 5675// Do executes the "serviceconsumermanagement.operations.list" call. 5676// Exactly one of *ListOperationsResponse or error will be non-nil. Any 5677// non-2xx status code is an error. Response headers are in either 5678// *ListOperationsResponse.ServerResponse.Header or (if a response was 5679// returned at all) in error.(*googleapi.Error).Header. Use 5680// googleapi.IsNotModified to check whether the returned error was 5681// because http.StatusNotModified was returned. 5682func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 5683 gensupport.SetOptions(c.urlParams_, opts...) 5684 res, err := c.doRequest("json") 5685 if res != nil && res.StatusCode == http.StatusNotModified { 5686 if res.Body != nil { 5687 res.Body.Close() 5688 } 5689 return nil, &googleapi.Error{ 5690 Code: res.StatusCode, 5691 Header: res.Header, 5692 } 5693 } 5694 if err != nil { 5695 return nil, err 5696 } 5697 defer googleapi.CloseBody(res) 5698 if err := googleapi.CheckResponse(res); err != nil { 5699 return nil, err 5700 } 5701 ret := &ListOperationsResponse{ 5702 ServerResponse: googleapi.ServerResponse{ 5703 Header: res.Header, 5704 HTTPStatusCode: res.StatusCode, 5705 }, 5706 } 5707 target := &ret 5708 if err := gensupport.DecodeResponse(target, res); err != nil { 5709 return nil, err 5710 } 5711 return ret, nil 5712 // { 5713 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 5714 // "flatPath": "v1/operations", 5715 // "httpMethod": "GET", 5716 // "id": "serviceconsumermanagement.operations.list", 5717 // "parameterOrder": [ 5718 // "name" 5719 // ], 5720 // "parameters": { 5721 // "filter": { 5722 // "description": "The standard list filter.", 5723 // "location": "query", 5724 // "type": "string" 5725 // }, 5726 // "name": { 5727 // "description": "The name of the operation's parent resource.", 5728 // "location": "path", 5729 // "pattern": "^operations$", 5730 // "required": true, 5731 // "type": "string" 5732 // }, 5733 // "pageSize": { 5734 // "description": "The standard list page size.", 5735 // "format": "int32", 5736 // "location": "query", 5737 // "type": "integer" 5738 // }, 5739 // "pageToken": { 5740 // "description": "The standard list page token.", 5741 // "location": "query", 5742 // "type": "string" 5743 // } 5744 // }, 5745 // "path": "v1/{+name}", 5746 // "response": { 5747 // "$ref": "ListOperationsResponse" 5748 // }, 5749 // "scopes": [ 5750 // "https://www.googleapis.com/auth/cloud-platform" 5751 // ] 5752 // } 5753 5754} 5755 5756// Pages invokes f for each page of results. 5757// A non-nil error returned from f will halt the iteration. 5758// The provided context supersedes any context provided to the Context method. 5759func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 5760 c.ctx_ = ctx 5761 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5762 for { 5763 x, err := c.Do() 5764 if err != nil { 5765 return err 5766 } 5767 if err := f(x); err != nil { 5768 return err 5769 } 5770 if x.NextPageToken == "" { 5771 return nil 5772 } 5773 c.PageToken(x.NextPageToken) 5774 } 5775} 5776 5777// method id "serviceconsumermanagement.services.search": 5778 5779type ServicesSearchCall struct { 5780 s *APIService 5781 parent string 5782 urlParams_ gensupport.URLParams 5783 ifNoneMatch_ string 5784 ctx_ context.Context 5785 header_ http.Header 5786} 5787 5788// Search: Search tenancy units for a managed service. 5789func (r *ServicesService) Search(parent string) *ServicesSearchCall { 5790 c := &ServicesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5791 c.parent = parent 5792 return c 5793} 5794 5795// PageSize sets the optional parameter "pageSize": The maximum number 5796// of results returned by this request. Currently, the 5797// default maximum is set to 1000. If `page_size` isn't provided or the 5798// size 5799// provided is a number larger than 1000, it's automatically set to 5800// 1000. 5801func (c *ServicesSearchCall) PageSize(pageSize int64) *ServicesSearchCall { 5802 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5803 return c 5804} 5805 5806// PageToken sets the optional parameter "pageToken": The continuation 5807// token, which is used to page through large result sets. 5808// To get the next page of results, set this parameter to the value 5809// of 5810// `nextPageToken` from the previous response. 5811func (c *ServicesSearchCall) PageToken(pageToken string) *ServicesSearchCall { 5812 c.urlParams_.Set("pageToken", pageToken) 5813 return c 5814} 5815 5816// Query sets the optional parameter "query": Set a query `{expression}` 5817// for querying tenancy units. Your `{expression}` 5818// must be in the format: `field_name=literal_string`. The `field_name` 5819// is the 5820// name of the field you want to compare. Supported fields 5821// are 5822// `tenant_resources.tag` and `tenant_resources.resource`. 5823// 5824// For example, to search tenancy units that contain at least one 5825// tenant 5826// resource with a given tag 'xyz', use the query 5827// `tenant_resources.tag=xyz`. 5828// To search tenancy units that contain at least one tenant resource 5829// with 5830// a given resource name 'projects/123456', use the 5831// query 5832// `tenant_resources.resource=projects/123456`. 5833// 5834// Multiple expressions can be joined with `AND`s. Tenancy units must 5835// match 5836// all expressions to be included in the result set. For 5837// example, 5838// `tenant_resources.tag=xyz AND 5839// tenant_resources.resource=projects/123456` 5840func (c *ServicesSearchCall) Query(query string) *ServicesSearchCall { 5841 c.urlParams_.Set("query", query) 5842 return c 5843} 5844 5845// Fields allows partial responses to be retrieved. See 5846// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5847// for more information. 5848func (c *ServicesSearchCall) Fields(s ...googleapi.Field) *ServicesSearchCall { 5849 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5850 return c 5851} 5852 5853// IfNoneMatch sets the optional parameter which makes the operation 5854// fail if the object's ETag matches the given value. This is useful for 5855// getting updates only after the object has changed since the last 5856// request. Use googleapi.IsNotModified to check whether the response 5857// error from Do is the result of In-None-Match. 5858func (c *ServicesSearchCall) IfNoneMatch(entityTag string) *ServicesSearchCall { 5859 c.ifNoneMatch_ = entityTag 5860 return c 5861} 5862 5863// Context sets the context to be used in this call's Do method. Any 5864// pending HTTP request will be aborted if the provided context is 5865// canceled. 5866func (c *ServicesSearchCall) Context(ctx context.Context) *ServicesSearchCall { 5867 c.ctx_ = ctx 5868 return c 5869} 5870 5871// Header returns an http.Header that can be modified by the caller to 5872// add HTTP headers to the request. 5873func (c *ServicesSearchCall) Header() http.Header { 5874 if c.header_ == nil { 5875 c.header_ = make(http.Header) 5876 } 5877 return c.header_ 5878} 5879 5880func (c *ServicesSearchCall) doRequest(alt string) (*http.Response, error) { 5881 reqHeaders := make(http.Header) 5882 for k, v := range c.header_ { 5883 reqHeaders[k] = v 5884 } 5885 reqHeaders.Set("User-Agent", c.s.userAgent()) 5886 if c.ifNoneMatch_ != "" { 5887 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5888 } 5889 var body io.Reader = nil 5890 c.urlParams_.Set("alt", alt) 5891 c.urlParams_.Set("prettyPrint", "false") 5892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:search") 5893 urls += "?" + c.urlParams_.Encode() 5894 req, err := http.NewRequest("GET", urls, body) 5895 if err != nil { 5896 return nil, err 5897 } 5898 req.Header = reqHeaders 5899 googleapi.Expand(req.URL, map[string]string{ 5900 "parent": c.parent, 5901 }) 5902 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5903} 5904 5905// Do executes the "serviceconsumermanagement.services.search" call. 5906// Exactly one of *SearchTenancyUnitsResponse or error will be non-nil. 5907// Any non-2xx status code is an error. Response headers are in either 5908// *SearchTenancyUnitsResponse.ServerResponse.Header or (if a response 5909// was returned at all) in error.(*googleapi.Error).Header. Use 5910// googleapi.IsNotModified to check whether the returned error was 5911// because http.StatusNotModified was returned. 5912func (c *ServicesSearchCall) Do(opts ...googleapi.CallOption) (*SearchTenancyUnitsResponse, error) { 5913 gensupport.SetOptions(c.urlParams_, opts...) 5914 res, err := c.doRequest("json") 5915 if res != nil && res.StatusCode == http.StatusNotModified { 5916 if res.Body != nil { 5917 res.Body.Close() 5918 } 5919 return nil, &googleapi.Error{ 5920 Code: res.StatusCode, 5921 Header: res.Header, 5922 } 5923 } 5924 if err != nil { 5925 return nil, err 5926 } 5927 defer googleapi.CloseBody(res) 5928 if err := googleapi.CheckResponse(res); err != nil { 5929 return nil, err 5930 } 5931 ret := &SearchTenancyUnitsResponse{ 5932 ServerResponse: googleapi.ServerResponse{ 5933 Header: res.Header, 5934 HTTPStatusCode: res.StatusCode, 5935 }, 5936 } 5937 target := &ret 5938 if err := gensupport.DecodeResponse(target, res); err != nil { 5939 return nil, err 5940 } 5941 return ret, nil 5942 // { 5943 // "description": "Search tenancy units for a managed service.", 5944 // "flatPath": "v1/services/{servicesId}:search", 5945 // "httpMethod": "GET", 5946 // "id": "serviceconsumermanagement.services.search", 5947 // "parameterOrder": [ 5948 // "parent" 5949 // ], 5950 // "parameters": { 5951 // "pageSize": { 5952 // "description": "The maximum number of results returned by this request. Currently, the\ndefault maximum is set to 1000. If `page_size` isn't provided or the size\nprovided is a number larger than 1000, it's automatically set to 1000.\n\nOptional.", 5953 // "format": "int32", 5954 // "location": "query", 5955 // "type": "integer" 5956 // }, 5957 // "pageToken": { 5958 // "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.\n\nOptional.", 5959 // "location": "query", 5960 // "type": "string" 5961 // }, 5962 // "parent": { 5963 // "description": "Service for which search is performed.\nservices/{service}\n{service} the name of a service, for example 'service.googleapis.com'.", 5964 // "location": "path", 5965 // "pattern": "^services/[^/]+$", 5966 // "required": true, 5967 // "type": "string" 5968 // }, 5969 // "query": { 5970 // "description": "Set a query `{expression}` for querying tenancy units. Your `{expression}`\nmust be in the format: `field_name=literal_string`. The `field_name` is the\nname of the field you want to compare. Supported fields are\n`tenant_resources.tag` and `tenant_resources.resource`.\n\nFor example, to search tenancy units that contain at least one tenant\nresource with a given tag 'xyz', use the query `tenant_resources.tag=xyz`.\nTo search tenancy units that contain at least one tenant resource with\na given resource name 'projects/123456', use the query\n`tenant_resources.resource=projects/123456`.\n\nMultiple expressions can be joined with `AND`s. Tenancy units must match\nall expressions to be included in the result set. For example,\n`tenant_resources.tag=xyz AND tenant_resources.resource=projects/123456`\n\nOptional.", 5971 // "location": "query", 5972 // "type": "string" 5973 // } 5974 // }, 5975 // "path": "v1/{+parent}:search", 5976 // "response": { 5977 // "$ref": "SearchTenancyUnitsResponse" 5978 // }, 5979 // "scopes": [ 5980 // "https://www.googleapis.com/auth/cloud-platform" 5981 // ] 5982 // } 5983 5984} 5985 5986// Pages invokes f for each page of results. 5987// A non-nil error returned from f will halt the iteration. 5988// The provided context supersedes any context provided to the Context method. 5989func (c *ServicesSearchCall) Pages(ctx context.Context, f func(*SearchTenancyUnitsResponse) error) error { 5990 c.ctx_ = ctx 5991 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5992 for { 5993 x, err := c.Do() 5994 if err != nil { 5995 return err 5996 } 5997 if err := f(x); err != nil { 5998 return err 5999 } 6000 if x.NextPageToken == "" { 6001 return nil 6002 } 6003 c.PageToken(x.NextPageToken) 6004 } 6005} 6006 6007// method id "serviceconsumermanagement.services.tenancyUnits.addProject": 6008 6009type ServicesTenancyUnitsAddProjectCall struct { 6010 s *APIService 6011 parent string 6012 addtenantprojectrequest *AddTenantProjectRequest 6013 urlParams_ gensupport.URLParams 6014 ctx_ context.Context 6015 header_ http.Header 6016} 6017 6018// AddProject: Add a new tenant project to the tenancy unit. 6019// There can be a maximum of 512 tenant projects in a tenancy unit. 6020// If there are previously failed `AddTenantProject` calls, you might 6021// need to 6022// call `RemoveTenantProject` first to resolve them before you can 6023// make 6024// another call to `AddTenantProject` with the same 6025// tag. 6026// Operation<response: Empty>. 6027func (r *ServicesTenancyUnitsService) AddProject(parent string, addtenantprojectrequest *AddTenantProjectRequest) *ServicesTenancyUnitsAddProjectCall { 6028 c := &ServicesTenancyUnitsAddProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6029 c.parent = parent 6030 c.addtenantprojectrequest = addtenantprojectrequest 6031 return c 6032} 6033 6034// Fields allows partial responses to be retrieved. See 6035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6036// for more information. 6037func (c *ServicesTenancyUnitsAddProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsAddProjectCall { 6038 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6039 return c 6040} 6041 6042// Context sets the context to be used in this call's Do method. Any 6043// pending HTTP request will be aborted if the provided context is 6044// canceled. 6045func (c *ServicesTenancyUnitsAddProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsAddProjectCall { 6046 c.ctx_ = ctx 6047 return c 6048} 6049 6050// Header returns an http.Header that can be modified by the caller to 6051// add HTTP headers to the request. 6052func (c *ServicesTenancyUnitsAddProjectCall) Header() http.Header { 6053 if c.header_ == nil { 6054 c.header_ = make(http.Header) 6055 } 6056 return c.header_ 6057} 6058 6059func (c *ServicesTenancyUnitsAddProjectCall) doRequest(alt string) (*http.Response, error) { 6060 reqHeaders := make(http.Header) 6061 for k, v := range c.header_ { 6062 reqHeaders[k] = v 6063 } 6064 reqHeaders.Set("User-Agent", c.s.userAgent()) 6065 var body io.Reader = nil 6066 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtenantprojectrequest) 6067 if err != nil { 6068 return nil, err 6069 } 6070 reqHeaders.Set("Content-Type", "application/json") 6071 c.urlParams_.Set("alt", alt) 6072 c.urlParams_.Set("prettyPrint", "false") 6073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addProject") 6074 urls += "?" + c.urlParams_.Encode() 6075 req, err := http.NewRequest("POST", urls, body) 6076 if err != nil { 6077 return nil, err 6078 } 6079 req.Header = reqHeaders 6080 googleapi.Expand(req.URL, map[string]string{ 6081 "parent": c.parent, 6082 }) 6083 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6084} 6085 6086// Do executes the "serviceconsumermanagement.services.tenancyUnits.addProject" call. 6087// Exactly one of *Operation or error will be non-nil. Any non-2xx 6088// status code is an error. Response headers are in either 6089// *Operation.ServerResponse.Header or (if a response was returned at 6090// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6091// to check whether the returned error was because 6092// http.StatusNotModified was returned. 6093func (c *ServicesTenancyUnitsAddProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6094 gensupport.SetOptions(c.urlParams_, opts...) 6095 res, err := c.doRequest("json") 6096 if res != nil && res.StatusCode == http.StatusNotModified { 6097 if res.Body != nil { 6098 res.Body.Close() 6099 } 6100 return nil, &googleapi.Error{ 6101 Code: res.StatusCode, 6102 Header: res.Header, 6103 } 6104 } 6105 if err != nil { 6106 return nil, err 6107 } 6108 defer googleapi.CloseBody(res) 6109 if err := googleapi.CheckResponse(res); err != nil { 6110 return nil, err 6111 } 6112 ret := &Operation{ 6113 ServerResponse: googleapi.ServerResponse{ 6114 Header: res.Header, 6115 HTTPStatusCode: res.StatusCode, 6116 }, 6117 } 6118 target := &ret 6119 if err := gensupport.DecodeResponse(target, res); err != nil { 6120 return nil, err 6121 } 6122 return ret, nil 6123 // { 6124 // "description": "Add a new tenant project to the tenancy unit.\nThere can be a maximum of 512 tenant projects in a tenancy unit.\nIf there are previously failed `AddTenantProject` calls, you might need to\ncall `RemoveTenantProject` first to resolve them before you can make\nanother call to `AddTenantProject` with the same tag.\nOperation\u003cresponse: Empty\u003e.", 6125 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:addProject", 6126 // "httpMethod": "POST", 6127 // "id": "serviceconsumermanagement.services.tenancyUnits.addProject", 6128 // "parameterOrder": [ 6129 // "parent" 6130 // ], 6131 // "parameters": { 6132 // "parent": { 6133 // "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 6134 // "location": "path", 6135 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 6136 // "required": true, 6137 // "type": "string" 6138 // } 6139 // }, 6140 // "path": "v1/{+parent}:addProject", 6141 // "request": { 6142 // "$ref": "AddTenantProjectRequest" 6143 // }, 6144 // "response": { 6145 // "$ref": "Operation" 6146 // }, 6147 // "scopes": [ 6148 // "https://www.googleapis.com/auth/cloud-platform" 6149 // ] 6150 // } 6151 6152} 6153 6154// method id "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig": 6155 6156type ServicesTenancyUnitsApplyProjectConfigCall struct { 6157 s *APIService 6158 name string 6159 applytenantprojectconfigrequest *ApplyTenantProjectConfigRequest 6160 urlParams_ gensupport.URLParams 6161 ctx_ context.Context 6162 header_ http.Header 6163} 6164 6165// ApplyProjectConfig: Apply a configuration to an existing tenant 6166// project. 6167// This project must exist in an active state and have the original 6168// owner 6169// account. The caller must have permission to add a project to the 6170// given 6171// tenancy unit. The configuration is applied, but any existing settings 6172// on 6173// the project aren't modified. 6174// Specified policy bindings are applied. Existing bindings aren't 6175// modified. 6176// Specified services are activated. No service is deactivated. 6177// If specified, new billing configuration is applied. 6178// Omit a billing configuration to keep the existing one. 6179// A service account in the project is created if previously non 6180// existed. 6181// Specified labels will be appended to tenant project, note that the 6182// value of 6183// existing label key will be updated if the same label key is 6184// requested. 6185// The specified folder is ignored, as moving a tenant project to a 6186// different 6187// folder isn't supported. 6188// The operation fails if any of the steps fail, but no rollback of 6189// already 6190// applied configuration changes is attempted. 6191// Operation<response: Empty>. 6192func (r *ServicesTenancyUnitsService) ApplyProjectConfig(name string, applytenantprojectconfigrequest *ApplyTenantProjectConfigRequest) *ServicesTenancyUnitsApplyProjectConfigCall { 6193 c := &ServicesTenancyUnitsApplyProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6194 c.name = name 6195 c.applytenantprojectconfigrequest = applytenantprojectconfigrequest 6196 return c 6197} 6198 6199// Fields allows partial responses to be retrieved. See 6200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6201// for more information. 6202func (c *ServicesTenancyUnitsApplyProjectConfigCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsApplyProjectConfigCall { 6203 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6204 return c 6205} 6206 6207// Context sets the context to be used in this call's Do method. Any 6208// pending HTTP request will be aborted if the provided context is 6209// canceled. 6210func (c *ServicesTenancyUnitsApplyProjectConfigCall) Context(ctx context.Context) *ServicesTenancyUnitsApplyProjectConfigCall { 6211 c.ctx_ = ctx 6212 return c 6213} 6214 6215// Header returns an http.Header that can be modified by the caller to 6216// add HTTP headers to the request. 6217func (c *ServicesTenancyUnitsApplyProjectConfigCall) Header() http.Header { 6218 if c.header_ == nil { 6219 c.header_ = make(http.Header) 6220 } 6221 return c.header_ 6222} 6223 6224func (c *ServicesTenancyUnitsApplyProjectConfigCall) doRequest(alt string) (*http.Response, error) { 6225 reqHeaders := make(http.Header) 6226 for k, v := range c.header_ { 6227 reqHeaders[k] = v 6228 } 6229 reqHeaders.Set("User-Agent", c.s.userAgent()) 6230 var body io.Reader = nil 6231 body, err := googleapi.WithoutDataWrapper.JSONReader(c.applytenantprojectconfigrequest) 6232 if err != nil { 6233 return nil, err 6234 } 6235 reqHeaders.Set("Content-Type", "application/json") 6236 c.urlParams_.Set("alt", alt) 6237 c.urlParams_.Set("prettyPrint", "false") 6238 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:applyProjectConfig") 6239 urls += "?" + c.urlParams_.Encode() 6240 req, err := http.NewRequest("POST", urls, body) 6241 if err != nil { 6242 return nil, err 6243 } 6244 req.Header = reqHeaders 6245 googleapi.Expand(req.URL, map[string]string{ 6246 "name": c.name, 6247 }) 6248 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6249} 6250 6251// Do executes the "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig" call. 6252// Exactly one of *Operation or error will be non-nil. Any non-2xx 6253// status code is an error. Response headers are in either 6254// *Operation.ServerResponse.Header or (if a response was returned at 6255// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6256// to check whether the returned error was because 6257// http.StatusNotModified was returned. 6258func (c *ServicesTenancyUnitsApplyProjectConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6259 gensupport.SetOptions(c.urlParams_, opts...) 6260 res, err := c.doRequest("json") 6261 if res != nil && res.StatusCode == http.StatusNotModified { 6262 if res.Body != nil { 6263 res.Body.Close() 6264 } 6265 return nil, &googleapi.Error{ 6266 Code: res.StatusCode, 6267 Header: res.Header, 6268 } 6269 } 6270 if err != nil { 6271 return nil, err 6272 } 6273 defer googleapi.CloseBody(res) 6274 if err := googleapi.CheckResponse(res); err != nil { 6275 return nil, err 6276 } 6277 ret := &Operation{ 6278 ServerResponse: googleapi.ServerResponse{ 6279 Header: res.Header, 6280 HTTPStatusCode: res.StatusCode, 6281 }, 6282 } 6283 target := &ret 6284 if err := gensupport.DecodeResponse(target, res); err != nil { 6285 return nil, err 6286 } 6287 return ret, nil 6288 // { 6289 // "description": "Apply a configuration to an existing tenant project.\nThis project must exist in an active state and have the original owner\naccount. The caller must have permission to add a project to the given\ntenancy unit. The configuration is applied, but any existing settings on\nthe project aren't modified.\nSpecified policy bindings are applied. Existing bindings aren't modified.\nSpecified services are activated. No service is deactivated.\nIf specified, new billing configuration is applied.\nOmit a billing configuration to keep the existing one.\nA service account in the project is created if previously non existed.\nSpecified labels will be appended to tenant project, note that the value of\nexisting label key will be updated if the same label key is requested.\nThe specified folder is ignored, as moving a tenant project to a different\nfolder isn't supported.\nThe operation fails if any of the steps fail, but no rollback of already\napplied configuration changes is attempted.\nOperation\u003cresponse: Empty\u003e.", 6290 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:applyProjectConfig", 6291 // "httpMethod": "POST", 6292 // "id": "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig", 6293 // "parameterOrder": [ 6294 // "name" 6295 // ], 6296 // "parameters": { 6297 // "name": { 6298 // "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 6299 // "location": "path", 6300 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 6301 // "required": true, 6302 // "type": "string" 6303 // } 6304 // }, 6305 // "path": "v1/{+name}:applyProjectConfig", 6306 // "request": { 6307 // "$ref": "ApplyTenantProjectConfigRequest" 6308 // }, 6309 // "response": { 6310 // "$ref": "Operation" 6311 // }, 6312 // "scopes": [ 6313 // "https://www.googleapis.com/auth/cloud-platform" 6314 // ] 6315 // } 6316 6317} 6318 6319// method id "serviceconsumermanagement.services.tenancyUnits.attachProject": 6320 6321type ServicesTenancyUnitsAttachProjectCall struct { 6322 s *APIService 6323 name string 6324 attachtenantprojectrequest *AttachTenantProjectRequest 6325 urlParams_ gensupport.URLParams 6326 ctx_ context.Context 6327 header_ http.Header 6328} 6329 6330// AttachProject: Attach an existing project to the tenancy unit as a 6331// new tenant 6332// resource. The project could either be the tenant project reserved 6333// by 6334// calling `AddTenantProject` under a tenancy unit of a service 6335// producer's 6336// project of a managed service, or from a separate project. 6337// The caller is checked against a set of permissions as if 6338// calling 6339// `AddTenantProject` on the same service consumer. 6340// To trigger the attachment, the targeted tenant project must be in 6341// a 6342// folder. Make sure the ServiceConsumerManagement service account 6343// is 6344// the owner of that project. These two requirements are already met 6345// if the project is reserved by calling 6346// `AddTenantProject`. 6347// Operation<response: Empty>. 6348func (r *ServicesTenancyUnitsService) AttachProject(name string, attachtenantprojectrequest *AttachTenantProjectRequest) *ServicesTenancyUnitsAttachProjectCall { 6349 c := &ServicesTenancyUnitsAttachProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6350 c.name = name 6351 c.attachtenantprojectrequest = attachtenantprojectrequest 6352 return c 6353} 6354 6355// Fields allows partial responses to be retrieved. See 6356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6357// for more information. 6358func (c *ServicesTenancyUnitsAttachProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsAttachProjectCall { 6359 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6360 return c 6361} 6362 6363// Context sets the context to be used in this call's Do method. Any 6364// pending HTTP request will be aborted if the provided context is 6365// canceled. 6366func (c *ServicesTenancyUnitsAttachProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsAttachProjectCall { 6367 c.ctx_ = ctx 6368 return c 6369} 6370 6371// Header returns an http.Header that can be modified by the caller to 6372// add HTTP headers to the request. 6373func (c *ServicesTenancyUnitsAttachProjectCall) Header() http.Header { 6374 if c.header_ == nil { 6375 c.header_ = make(http.Header) 6376 } 6377 return c.header_ 6378} 6379 6380func (c *ServicesTenancyUnitsAttachProjectCall) doRequest(alt string) (*http.Response, error) { 6381 reqHeaders := make(http.Header) 6382 for k, v := range c.header_ { 6383 reqHeaders[k] = v 6384 } 6385 reqHeaders.Set("User-Agent", c.s.userAgent()) 6386 var body io.Reader = nil 6387 body, err := googleapi.WithoutDataWrapper.JSONReader(c.attachtenantprojectrequest) 6388 if err != nil { 6389 return nil, err 6390 } 6391 reqHeaders.Set("Content-Type", "application/json") 6392 c.urlParams_.Set("alt", alt) 6393 c.urlParams_.Set("prettyPrint", "false") 6394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:attachProject") 6395 urls += "?" + c.urlParams_.Encode() 6396 req, err := http.NewRequest("POST", urls, body) 6397 if err != nil { 6398 return nil, err 6399 } 6400 req.Header = reqHeaders 6401 googleapi.Expand(req.URL, map[string]string{ 6402 "name": c.name, 6403 }) 6404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6405} 6406 6407// Do executes the "serviceconsumermanagement.services.tenancyUnits.attachProject" call. 6408// Exactly one of *Operation or error will be non-nil. Any non-2xx 6409// status code is an error. Response headers are in either 6410// *Operation.ServerResponse.Header or (if a response was returned at 6411// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6412// to check whether the returned error was because 6413// http.StatusNotModified was returned. 6414func (c *ServicesTenancyUnitsAttachProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6415 gensupport.SetOptions(c.urlParams_, opts...) 6416 res, err := c.doRequest("json") 6417 if res != nil && res.StatusCode == http.StatusNotModified { 6418 if res.Body != nil { 6419 res.Body.Close() 6420 } 6421 return nil, &googleapi.Error{ 6422 Code: res.StatusCode, 6423 Header: res.Header, 6424 } 6425 } 6426 if err != nil { 6427 return nil, err 6428 } 6429 defer googleapi.CloseBody(res) 6430 if err := googleapi.CheckResponse(res); err != nil { 6431 return nil, err 6432 } 6433 ret := &Operation{ 6434 ServerResponse: googleapi.ServerResponse{ 6435 Header: res.Header, 6436 HTTPStatusCode: res.StatusCode, 6437 }, 6438 } 6439 target := &ret 6440 if err := gensupport.DecodeResponse(target, res); err != nil { 6441 return nil, err 6442 } 6443 return ret, nil 6444 // { 6445 // "description": "Attach an existing project to the tenancy unit as a new tenant\nresource. The project could either be the tenant project reserved by\ncalling `AddTenantProject` under a tenancy unit of a service producer's\nproject of a managed service, or from a separate project.\nThe caller is checked against a set of permissions as if calling\n`AddTenantProject` on the same service consumer.\nTo trigger the attachment, the targeted tenant project must be in a\nfolder. Make sure the ServiceConsumerManagement service account is\nthe owner of that project. These two requirements are already met\nif the project is reserved by calling `AddTenantProject`.\nOperation\u003cresponse: Empty\u003e.", 6446 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:attachProject", 6447 // "httpMethod": "POST", 6448 // "id": "serviceconsumermanagement.services.tenancyUnits.attachProject", 6449 // "parameterOrder": [ 6450 // "name" 6451 // ], 6452 // "parameters": { 6453 // "name": { 6454 // "description": "Name of the tenancy unit that the project will be attached to.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 6455 // "location": "path", 6456 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 6457 // "required": true, 6458 // "type": "string" 6459 // } 6460 // }, 6461 // "path": "v1/{+name}:attachProject", 6462 // "request": { 6463 // "$ref": "AttachTenantProjectRequest" 6464 // }, 6465 // "response": { 6466 // "$ref": "Operation" 6467 // }, 6468 // "scopes": [ 6469 // "https://www.googleapis.com/auth/cloud-platform" 6470 // ] 6471 // } 6472 6473} 6474 6475// method id "serviceconsumermanagement.services.tenancyUnits.create": 6476 6477type ServicesTenancyUnitsCreateCall struct { 6478 s *APIService 6479 parent string 6480 createtenancyunitrequest *CreateTenancyUnitRequest 6481 urlParams_ gensupport.URLParams 6482 ctx_ context.Context 6483 header_ http.Header 6484} 6485 6486// Create: Creates a tenancy unit with no tenant resources. 6487func (r *ServicesTenancyUnitsService) Create(parent string, createtenancyunitrequest *CreateTenancyUnitRequest) *ServicesTenancyUnitsCreateCall { 6488 c := &ServicesTenancyUnitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6489 c.parent = parent 6490 c.createtenancyunitrequest = createtenancyunitrequest 6491 return c 6492} 6493 6494// Fields allows partial responses to be retrieved. See 6495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6496// for more information. 6497func (c *ServicesTenancyUnitsCreateCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsCreateCall { 6498 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6499 return c 6500} 6501 6502// Context sets the context to be used in this call's Do method. Any 6503// pending HTTP request will be aborted if the provided context is 6504// canceled. 6505func (c *ServicesTenancyUnitsCreateCall) Context(ctx context.Context) *ServicesTenancyUnitsCreateCall { 6506 c.ctx_ = ctx 6507 return c 6508} 6509 6510// Header returns an http.Header that can be modified by the caller to 6511// add HTTP headers to the request. 6512func (c *ServicesTenancyUnitsCreateCall) Header() http.Header { 6513 if c.header_ == nil { 6514 c.header_ = make(http.Header) 6515 } 6516 return c.header_ 6517} 6518 6519func (c *ServicesTenancyUnitsCreateCall) doRequest(alt string) (*http.Response, error) { 6520 reqHeaders := make(http.Header) 6521 for k, v := range c.header_ { 6522 reqHeaders[k] = v 6523 } 6524 reqHeaders.Set("User-Agent", c.s.userAgent()) 6525 var body io.Reader = nil 6526 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtenancyunitrequest) 6527 if err != nil { 6528 return nil, err 6529 } 6530 reqHeaders.Set("Content-Type", "application/json") 6531 c.urlParams_.Set("alt", alt) 6532 c.urlParams_.Set("prettyPrint", "false") 6533 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits") 6534 urls += "?" + c.urlParams_.Encode() 6535 req, err := http.NewRequest("POST", urls, body) 6536 if err != nil { 6537 return nil, err 6538 } 6539 req.Header = reqHeaders 6540 googleapi.Expand(req.URL, map[string]string{ 6541 "parent": c.parent, 6542 }) 6543 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6544} 6545 6546// Do executes the "serviceconsumermanagement.services.tenancyUnits.create" call. 6547// Exactly one of *TenancyUnit or error will be non-nil. Any non-2xx 6548// status code is an error. Response headers are in either 6549// *TenancyUnit.ServerResponse.Header or (if a response was returned at 6550// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6551// to check whether the returned error was because 6552// http.StatusNotModified was returned. 6553func (c *ServicesTenancyUnitsCreateCall) Do(opts ...googleapi.CallOption) (*TenancyUnit, error) { 6554 gensupport.SetOptions(c.urlParams_, opts...) 6555 res, err := c.doRequest("json") 6556 if res != nil && res.StatusCode == http.StatusNotModified { 6557 if res.Body != nil { 6558 res.Body.Close() 6559 } 6560 return nil, &googleapi.Error{ 6561 Code: res.StatusCode, 6562 Header: res.Header, 6563 } 6564 } 6565 if err != nil { 6566 return nil, err 6567 } 6568 defer googleapi.CloseBody(res) 6569 if err := googleapi.CheckResponse(res); err != nil { 6570 return nil, err 6571 } 6572 ret := &TenancyUnit{ 6573 ServerResponse: googleapi.ServerResponse{ 6574 Header: res.Header, 6575 HTTPStatusCode: res.StatusCode, 6576 }, 6577 } 6578 target := &ret 6579 if err := gensupport.DecodeResponse(target, res); err != nil { 6580 return nil, err 6581 } 6582 return ret, nil 6583 // { 6584 // "description": "Creates a tenancy unit with no tenant resources.", 6585 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits", 6586 // "httpMethod": "POST", 6587 // "id": "serviceconsumermanagement.services.tenancyUnits.create", 6588 // "parameterOrder": [ 6589 // "parent" 6590 // ], 6591 // "parameters": { 6592 // "parent": { 6593 // "description": "services/{service}/{collection id}/{resource id}\n{collection id} is the cloud resource collection type representing the\nservice consumer, for example 'projects', or 'organizations'.\n{resource id} is the consumer numeric id, such as project number: '123456'.\n{service} the name of a managed service, such as 'service.googleapis.com'.\nEnables service binding using the new tenancy unit.", 6594 // "location": "path", 6595 // "pattern": "^services/[^/]+/[^/]+/[^/]+$", 6596 // "required": true, 6597 // "type": "string" 6598 // } 6599 // }, 6600 // "path": "v1/{+parent}/tenancyUnits", 6601 // "request": { 6602 // "$ref": "CreateTenancyUnitRequest" 6603 // }, 6604 // "response": { 6605 // "$ref": "TenancyUnit" 6606 // }, 6607 // "scopes": [ 6608 // "https://www.googleapis.com/auth/cloud-platform" 6609 // ] 6610 // } 6611 6612} 6613 6614// method id "serviceconsumermanagement.services.tenancyUnits.delete": 6615 6616type ServicesTenancyUnitsDeleteCall struct { 6617 s *APIService 6618 name string 6619 urlParams_ gensupport.URLParams 6620 ctx_ context.Context 6621 header_ http.Header 6622} 6623 6624// Delete: Delete a tenancy unit. Before you delete the tenancy unit, 6625// there should be 6626// no tenant resources in it that aren't in a DELETED 6627// state. 6628// Operation<response: Empty>. 6629func (r *ServicesTenancyUnitsService) Delete(name string) *ServicesTenancyUnitsDeleteCall { 6630 c := &ServicesTenancyUnitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6631 c.name = name 6632 return c 6633} 6634 6635// Fields allows partial responses to be retrieved. See 6636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6637// for more information. 6638func (c *ServicesTenancyUnitsDeleteCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsDeleteCall { 6639 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6640 return c 6641} 6642 6643// Context sets the context to be used in this call's Do method. Any 6644// pending HTTP request will be aborted if the provided context is 6645// canceled. 6646func (c *ServicesTenancyUnitsDeleteCall) Context(ctx context.Context) *ServicesTenancyUnitsDeleteCall { 6647 c.ctx_ = ctx 6648 return c 6649} 6650 6651// Header returns an http.Header that can be modified by the caller to 6652// add HTTP headers to the request. 6653func (c *ServicesTenancyUnitsDeleteCall) Header() http.Header { 6654 if c.header_ == nil { 6655 c.header_ = make(http.Header) 6656 } 6657 return c.header_ 6658} 6659 6660func (c *ServicesTenancyUnitsDeleteCall) doRequest(alt string) (*http.Response, error) { 6661 reqHeaders := make(http.Header) 6662 for k, v := range c.header_ { 6663 reqHeaders[k] = v 6664 } 6665 reqHeaders.Set("User-Agent", c.s.userAgent()) 6666 var body io.Reader = nil 6667 c.urlParams_.Set("alt", alt) 6668 c.urlParams_.Set("prettyPrint", "false") 6669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6670 urls += "?" + c.urlParams_.Encode() 6671 req, err := http.NewRequest("DELETE", urls, body) 6672 if err != nil { 6673 return nil, err 6674 } 6675 req.Header = reqHeaders 6676 googleapi.Expand(req.URL, map[string]string{ 6677 "name": c.name, 6678 }) 6679 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6680} 6681 6682// Do executes the "serviceconsumermanagement.services.tenancyUnits.delete" call. 6683// Exactly one of *Operation or error will be non-nil. Any non-2xx 6684// status code is an error. Response headers are in either 6685// *Operation.ServerResponse.Header or (if a response was returned at 6686// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6687// to check whether the returned error was because 6688// http.StatusNotModified was returned. 6689func (c *ServicesTenancyUnitsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6690 gensupport.SetOptions(c.urlParams_, opts...) 6691 res, err := c.doRequest("json") 6692 if res != nil && res.StatusCode == http.StatusNotModified { 6693 if res.Body != nil { 6694 res.Body.Close() 6695 } 6696 return nil, &googleapi.Error{ 6697 Code: res.StatusCode, 6698 Header: res.Header, 6699 } 6700 } 6701 if err != nil { 6702 return nil, err 6703 } 6704 defer googleapi.CloseBody(res) 6705 if err := googleapi.CheckResponse(res); err != nil { 6706 return nil, err 6707 } 6708 ret := &Operation{ 6709 ServerResponse: googleapi.ServerResponse{ 6710 Header: res.Header, 6711 HTTPStatusCode: res.StatusCode, 6712 }, 6713 } 6714 target := &ret 6715 if err := gensupport.DecodeResponse(target, res); err != nil { 6716 return nil, err 6717 } 6718 return ret, nil 6719 // { 6720 // "description": "Delete a tenancy unit. Before you delete the tenancy unit, there should be\nno tenant resources in it that aren't in a DELETED state.\nOperation\u003cresponse: Empty\u003e.", 6721 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}", 6722 // "httpMethod": "DELETE", 6723 // "id": "serviceconsumermanagement.services.tenancyUnits.delete", 6724 // "parameterOrder": [ 6725 // "name" 6726 // ], 6727 // "parameters": { 6728 // "name": { 6729 // "description": "Name of the tenancy unit to be deleted.", 6730 // "location": "path", 6731 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 6732 // "required": true, 6733 // "type": "string" 6734 // } 6735 // }, 6736 // "path": "v1/{+name}", 6737 // "response": { 6738 // "$ref": "Operation" 6739 // }, 6740 // "scopes": [ 6741 // "https://www.googleapis.com/auth/cloud-platform" 6742 // ] 6743 // } 6744 6745} 6746 6747// method id "serviceconsumermanagement.services.tenancyUnits.deleteProject": 6748 6749type ServicesTenancyUnitsDeleteProjectCall struct { 6750 s *APIService 6751 name string 6752 deletetenantprojectrequest *DeleteTenantProjectRequest 6753 urlParams_ gensupport.URLParams 6754 ctx_ context.Context 6755 header_ http.Header 6756} 6757 6758// DeleteProject: Deletes the specified project resource identified by a 6759// tenant resource tag. 6760// The mothod removes a project lien with a 'TenantManager' origin if 6761// that was 6762// added. It will then attempt to delete the project. If that operation 6763// fails, 6764// this method also fails. 6765// After the project has been deleted, the tenant resource state is set 6766// to 6767// DELETED. To permanently remove resource metadata, call 6768// the 6769// `RemoveTenantProject` method. 6770// New resources with the same tag can't be added if there are 6771// existing 6772// resources in a DELETED state. 6773// Operation<response: Empty>. 6774func (r *ServicesTenancyUnitsService) DeleteProject(name string, deletetenantprojectrequest *DeleteTenantProjectRequest) *ServicesTenancyUnitsDeleteProjectCall { 6775 c := &ServicesTenancyUnitsDeleteProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6776 c.name = name 6777 c.deletetenantprojectrequest = deletetenantprojectrequest 6778 return c 6779} 6780 6781// Fields allows partial responses to be retrieved. See 6782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6783// for more information. 6784func (c *ServicesTenancyUnitsDeleteProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsDeleteProjectCall { 6785 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6786 return c 6787} 6788 6789// Context sets the context to be used in this call's Do method. Any 6790// pending HTTP request will be aborted if the provided context is 6791// canceled. 6792func (c *ServicesTenancyUnitsDeleteProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsDeleteProjectCall { 6793 c.ctx_ = ctx 6794 return c 6795} 6796 6797// Header returns an http.Header that can be modified by the caller to 6798// add HTTP headers to the request. 6799func (c *ServicesTenancyUnitsDeleteProjectCall) Header() http.Header { 6800 if c.header_ == nil { 6801 c.header_ = make(http.Header) 6802 } 6803 return c.header_ 6804} 6805 6806func (c *ServicesTenancyUnitsDeleteProjectCall) doRequest(alt string) (*http.Response, error) { 6807 reqHeaders := make(http.Header) 6808 for k, v := range c.header_ { 6809 reqHeaders[k] = v 6810 } 6811 reqHeaders.Set("User-Agent", c.s.userAgent()) 6812 var body io.Reader = nil 6813 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deletetenantprojectrequest) 6814 if err != nil { 6815 return nil, err 6816 } 6817 reqHeaders.Set("Content-Type", "application/json") 6818 c.urlParams_.Set("alt", alt) 6819 c.urlParams_.Set("prettyPrint", "false") 6820 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteProject") 6821 urls += "?" + c.urlParams_.Encode() 6822 req, err := http.NewRequest("POST", urls, body) 6823 if err != nil { 6824 return nil, err 6825 } 6826 req.Header = reqHeaders 6827 googleapi.Expand(req.URL, map[string]string{ 6828 "name": c.name, 6829 }) 6830 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6831} 6832 6833// Do executes the "serviceconsumermanagement.services.tenancyUnits.deleteProject" call. 6834// Exactly one of *Operation or error will be non-nil. Any non-2xx 6835// status code is an error. Response headers are in either 6836// *Operation.ServerResponse.Header or (if a response was returned at 6837// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6838// to check whether the returned error was because 6839// http.StatusNotModified was returned. 6840func (c *ServicesTenancyUnitsDeleteProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6841 gensupport.SetOptions(c.urlParams_, opts...) 6842 res, err := c.doRequest("json") 6843 if res != nil && res.StatusCode == http.StatusNotModified { 6844 if res.Body != nil { 6845 res.Body.Close() 6846 } 6847 return nil, &googleapi.Error{ 6848 Code: res.StatusCode, 6849 Header: res.Header, 6850 } 6851 } 6852 if err != nil { 6853 return nil, err 6854 } 6855 defer googleapi.CloseBody(res) 6856 if err := googleapi.CheckResponse(res); err != nil { 6857 return nil, err 6858 } 6859 ret := &Operation{ 6860 ServerResponse: googleapi.ServerResponse{ 6861 Header: res.Header, 6862 HTTPStatusCode: res.StatusCode, 6863 }, 6864 } 6865 target := &ret 6866 if err := gensupport.DecodeResponse(target, res); err != nil { 6867 return nil, err 6868 } 6869 return ret, nil 6870 // { 6871 // "description": "Deletes the specified project resource identified by a tenant resource tag.\nThe mothod removes a project lien with a 'TenantManager' origin if that was\nadded. It will then attempt to delete the project. If that operation fails,\nthis method also fails.\nAfter the project has been deleted, the tenant resource state is set to\nDELETED. To permanently remove resource metadata, call the\n`RemoveTenantProject` method.\nNew resources with the same tag can't be added if there are existing\nresources in a DELETED state.\nOperation\u003cresponse: Empty\u003e.", 6872 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:deleteProject", 6873 // "httpMethod": "POST", 6874 // "id": "serviceconsumermanagement.services.tenancyUnits.deleteProject", 6875 // "parameterOrder": [ 6876 // "name" 6877 // ], 6878 // "parameters": { 6879 // "name": { 6880 // "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 6881 // "location": "path", 6882 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 6883 // "required": true, 6884 // "type": "string" 6885 // } 6886 // }, 6887 // "path": "v1/{+name}:deleteProject", 6888 // "request": { 6889 // "$ref": "DeleteTenantProjectRequest" 6890 // }, 6891 // "response": { 6892 // "$ref": "Operation" 6893 // }, 6894 // "scopes": [ 6895 // "https://www.googleapis.com/auth/cloud-platform" 6896 // ] 6897 // } 6898 6899} 6900 6901// method id "serviceconsumermanagement.services.tenancyUnits.list": 6902 6903type ServicesTenancyUnitsListCall struct { 6904 s *APIService 6905 parent string 6906 urlParams_ gensupport.URLParams 6907 ifNoneMatch_ string 6908 ctx_ context.Context 6909 header_ http.Header 6910} 6911 6912// List: Find the tenancy unit for a managed service and service 6913// consumer. 6914// This method shouldn't be used in a service producer's runtime path, 6915// for 6916// example to find the tenant project number when creating VMs. 6917// Service 6918// producers must persist the tenant project's information after the 6919// project 6920// is created. 6921func (r *ServicesTenancyUnitsService) List(parent string) *ServicesTenancyUnitsListCall { 6922 c := &ServicesTenancyUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6923 c.parent = parent 6924 return c 6925} 6926 6927// Filter sets the optional parameter "filter": Filter expression over 6928// tenancy resources field. 6929func (c *ServicesTenancyUnitsListCall) Filter(filter string) *ServicesTenancyUnitsListCall { 6930 c.urlParams_.Set("filter", filter) 6931 return c 6932} 6933 6934// PageSize sets the optional parameter "pageSize": The maximum number 6935// of results returned by this request. 6936func (c *ServicesTenancyUnitsListCall) PageSize(pageSize int64) *ServicesTenancyUnitsListCall { 6937 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6938 return c 6939} 6940 6941// PageToken sets the optional parameter "pageToken": The continuation 6942// token, which is used to page through large result sets. 6943// To get the next page of results, set this parameter to the value 6944// of 6945// `nextPageToken` from the previous response. 6946func (c *ServicesTenancyUnitsListCall) PageToken(pageToken string) *ServicesTenancyUnitsListCall { 6947 c.urlParams_.Set("pageToken", pageToken) 6948 return c 6949} 6950 6951// Fields allows partial responses to be retrieved. See 6952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6953// for more information. 6954func (c *ServicesTenancyUnitsListCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsListCall { 6955 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6956 return c 6957} 6958 6959// IfNoneMatch sets the optional parameter which makes the operation 6960// fail if the object's ETag matches the given value. This is useful for 6961// getting updates only after the object has changed since the last 6962// request. Use googleapi.IsNotModified to check whether the response 6963// error from Do is the result of In-None-Match. 6964func (c *ServicesTenancyUnitsListCall) IfNoneMatch(entityTag string) *ServicesTenancyUnitsListCall { 6965 c.ifNoneMatch_ = entityTag 6966 return c 6967} 6968 6969// Context sets the context to be used in this call's Do method. Any 6970// pending HTTP request will be aborted if the provided context is 6971// canceled. 6972func (c *ServicesTenancyUnitsListCall) Context(ctx context.Context) *ServicesTenancyUnitsListCall { 6973 c.ctx_ = ctx 6974 return c 6975} 6976 6977// Header returns an http.Header that can be modified by the caller to 6978// add HTTP headers to the request. 6979func (c *ServicesTenancyUnitsListCall) Header() http.Header { 6980 if c.header_ == nil { 6981 c.header_ = make(http.Header) 6982 } 6983 return c.header_ 6984} 6985 6986func (c *ServicesTenancyUnitsListCall) doRequest(alt string) (*http.Response, error) { 6987 reqHeaders := make(http.Header) 6988 for k, v := range c.header_ { 6989 reqHeaders[k] = v 6990 } 6991 reqHeaders.Set("User-Agent", c.s.userAgent()) 6992 if c.ifNoneMatch_ != "" { 6993 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6994 } 6995 var body io.Reader = nil 6996 c.urlParams_.Set("alt", alt) 6997 c.urlParams_.Set("prettyPrint", "false") 6998 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits") 6999 urls += "?" + c.urlParams_.Encode() 7000 req, err := http.NewRequest("GET", urls, body) 7001 if err != nil { 7002 return nil, err 7003 } 7004 req.Header = reqHeaders 7005 googleapi.Expand(req.URL, map[string]string{ 7006 "parent": c.parent, 7007 }) 7008 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7009} 7010 7011// Do executes the "serviceconsumermanagement.services.tenancyUnits.list" call. 7012// Exactly one of *ListTenancyUnitsResponse or error will be non-nil. 7013// Any non-2xx status code is an error. Response headers are in either 7014// *ListTenancyUnitsResponse.ServerResponse.Header or (if a response was 7015// returned at all) in error.(*googleapi.Error).Header. Use 7016// googleapi.IsNotModified to check whether the returned error was 7017// because http.StatusNotModified was returned. 7018func (c *ServicesTenancyUnitsListCall) Do(opts ...googleapi.CallOption) (*ListTenancyUnitsResponse, error) { 7019 gensupport.SetOptions(c.urlParams_, opts...) 7020 res, err := c.doRequest("json") 7021 if res != nil && res.StatusCode == http.StatusNotModified { 7022 if res.Body != nil { 7023 res.Body.Close() 7024 } 7025 return nil, &googleapi.Error{ 7026 Code: res.StatusCode, 7027 Header: res.Header, 7028 } 7029 } 7030 if err != nil { 7031 return nil, err 7032 } 7033 defer googleapi.CloseBody(res) 7034 if err := googleapi.CheckResponse(res); err != nil { 7035 return nil, err 7036 } 7037 ret := &ListTenancyUnitsResponse{ 7038 ServerResponse: googleapi.ServerResponse{ 7039 Header: res.Header, 7040 HTTPStatusCode: res.StatusCode, 7041 }, 7042 } 7043 target := &ret 7044 if err := gensupport.DecodeResponse(target, res); err != nil { 7045 return nil, err 7046 } 7047 return ret, nil 7048 // { 7049 // "description": "Find the tenancy unit for a managed service and service consumer.\nThis method shouldn't be used in a service producer's runtime path, for\nexample to find the tenant project number when creating VMs. Service\nproducers must persist the tenant project's information after the project\nis created.", 7050 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits", 7051 // "httpMethod": "GET", 7052 // "id": "serviceconsumermanagement.services.tenancyUnits.list", 7053 // "parameterOrder": [ 7054 // "parent" 7055 // ], 7056 // "parameters": { 7057 // "filter": { 7058 // "description": "Filter expression over tenancy resources field. Optional.", 7059 // "location": "query", 7060 // "type": "string" 7061 // }, 7062 // "pageSize": { 7063 // "description": "The maximum number of results returned by this request.", 7064 // "format": "int32", 7065 // "location": "query", 7066 // "type": "integer" 7067 // }, 7068 // "pageToken": { 7069 // "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", 7070 // "location": "query", 7071 // "type": "string" 7072 // }, 7073 // "parent": { 7074 // "description": "Managed service and service consumer. Required.\nservices/{service}/{collection id}/{resource id}\n{collection id} is the cloud resource collection type representing the\nservice consumer, for example 'projects', or 'organizations'.\n{resource id} is the consumer numeric id, such as project number: '123456'.\n{service} the name of a service, such as 'service.googleapis.com'.", 7075 // "location": "path", 7076 // "pattern": "^services/[^/]+/[^/]+/[^/]+$", 7077 // "required": true, 7078 // "type": "string" 7079 // } 7080 // }, 7081 // "path": "v1/{+parent}/tenancyUnits", 7082 // "response": { 7083 // "$ref": "ListTenancyUnitsResponse" 7084 // }, 7085 // "scopes": [ 7086 // "https://www.googleapis.com/auth/cloud-platform" 7087 // ] 7088 // } 7089 7090} 7091 7092// Pages invokes f for each page of results. 7093// A non-nil error returned from f will halt the iteration. 7094// The provided context supersedes any context provided to the Context method. 7095func (c *ServicesTenancyUnitsListCall) Pages(ctx context.Context, f func(*ListTenancyUnitsResponse) error) error { 7096 c.ctx_ = ctx 7097 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7098 for { 7099 x, err := c.Do() 7100 if err != nil { 7101 return err 7102 } 7103 if err := f(x); err != nil { 7104 return err 7105 } 7106 if x.NextPageToken == "" { 7107 return nil 7108 } 7109 c.PageToken(x.NextPageToken) 7110 } 7111} 7112 7113// method id "serviceconsumermanagement.services.tenancyUnits.removeProject": 7114 7115type ServicesTenancyUnitsRemoveProjectCall struct { 7116 s *APIService 7117 name string 7118 removetenantprojectrequest *RemoveTenantProjectRequest 7119 urlParams_ gensupport.URLParams 7120 ctx_ context.Context 7121 header_ http.Header 7122} 7123 7124// RemoveProject: Removes the specified project resource identified by a 7125// tenant resource tag. 7126// The method removes the project lien with 'TenantManager' origin if 7127// that 7128// was added. It then attempts to delete the project. If that 7129// operation 7130// fails, this method also fails. 7131// Calls to remove already removed or non-existent tenant project 7132// succeed. 7133// After the project has been deleted, or if was already in a DELETED 7134// state, 7135// resource metadata is permanently removed from the tenancy 7136// unit. 7137// Operation<response: Empty>. 7138func (r *ServicesTenancyUnitsService) RemoveProject(name string, removetenantprojectrequest *RemoveTenantProjectRequest) *ServicesTenancyUnitsRemoveProjectCall { 7139 c := &ServicesTenancyUnitsRemoveProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7140 c.name = name 7141 c.removetenantprojectrequest = removetenantprojectrequest 7142 return c 7143} 7144 7145// Fields allows partial responses to be retrieved. See 7146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7147// for more information. 7148func (c *ServicesTenancyUnitsRemoveProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsRemoveProjectCall { 7149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7150 return c 7151} 7152 7153// Context sets the context to be used in this call's Do method. Any 7154// pending HTTP request will be aborted if the provided context is 7155// canceled. 7156func (c *ServicesTenancyUnitsRemoveProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsRemoveProjectCall { 7157 c.ctx_ = ctx 7158 return c 7159} 7160 7161// Header returns an http.Header that can be modified by the caller to 7162// add HTTP headers to the request. 7163func (c *ServicesTenancyUnitsRemoveProjectCall) Header() http.Header { 7164 if c.header_ == nil { 7165 c.header_ = make(http.Header) 7166 } 7167 return c.header_ 7168} 7169 7170func (c *ServicesTenancyUnitsRemoveProjectCall) doRequest(alt string) (*http.Response, error) { 7171 reqHeaders := make(http.Header) 7172 for k, v := range c.header_ { 7173 reqHeaders[k] = v 7174 } 7175 reqHeaders.Set("User-Agent", c.s.userAgent()) 7176 var body io.Reader = nil 7177 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetenantprojectrequest) 7178 if err != nil { 7179 return nil, err 7180 } 7181 reqHeaders.Set("Content-Type", "application/json") 7182 c.urlParams_.Set("alt", alt) 7183 c.urlParams_.Set("prettyPrint", "false") 7184 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:removeProject") 7185 urls += "?" + c.urlParams_.Encode() 7186 req, err := http.NewRequest("POST", urls, body) 7187 if err != nil { 7188 return nil, err 7189 } 7190 req.Header = reqHeaders 7191 googleapi.Expand(req.URL, map[string]string{ 7192 "name": c.name, 7193 }) 7194 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7195} 7196 7197// Do executes the "serviceconsumermanagement.services.tenancyUnits.removeProject" call. 7198// Exactly one of *Operation or error will be non-nil. Any non-2xx 7199// status code is an error. Response headers are in either 7200// *Operation.ServerResponse.Header or (if a response was returned at 7201// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7202// to check whether the returned error was because 7203// http.StatusNotModified was returned. 7204func (c *ServicesTenancyUnitsRemoveProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7205 gensupport.SetOptions(c.urlParams_, opts...) 7206 res, err := c.doRequest("json") 7207 if res != nil && res.StatusCode == http.StatusNotModified { 7208 if res.Body != nil { 7209 res.Body.Close() 7210 } 7211 return nil, &googleapi.Error{ 7212 Code: res.StatusCode, 7213 Header: res.Header, 7214 } 7215 } 7216 if err != nil { 7217 return nil, err 7218 } 7219 defer googleapi.CloseBody(res) 7220 if err := googleapi.CheckResponse(res); err != nil { 7221 return nil, err 7222 } 7223 ret := &Operation{ 7224 ServerResponse: googleapi.ServerResponse{ 7225 Header: res.Header, 7226 HTTPStatusCode: res.StatusCode, 7227 }, 7228 } 7229 target := &ret 7230 if err := gensupport.DecodeResponse(target, res); err != nil { 7231 return nil, err 7232 } 7233 return ret, nil 7234 // { 7235 // "description": "Removes the specified project resource identified by a tenant resource tag.\nThe method removes the project lien with 'TenantManager' origin if that\nwas added. It then attempts to delete the project. If that operation\nfails, this method also fails.\nCalls to remove already removed or non-existent tenant project succeed.\nAfter the project has been deleted, or if was already in a DELETED state,\nresource metadata is permanently removed from the tenancy unit.\nOperation\u003cresponse: Empty\u003e.", 7236 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:removeProject", 7237 // "httpMethod": "POST", 7238 // "id": "serviceconsumermanagement.services.tenancyUnits.removeProject", 7239 // "parameterOrder": [ 7240 // "name" 7241 // ], 7242 // "parameters": { 7243 // "name": { 7244 // "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 7245 // "location": "path", 7246 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 7247 // "required": true, 7248 // "type": "string" 7249 // } 7250 // }, 7251 // "path": "v1/{+name}:removeProject", 7252 // "request": { 7253 // "$ref": "RemoveTenantProjectRequest" 7254 // }, 7255 // "response": { 7256 // "$ref": "Operation" 7257 // }, 7258 // "scopes": [ 7259 // "https://www.googleapis.com/auth/cloud-platform" 7260 // ] 7261 // } 7262 7263} 7264 7265// method id "serviceconsumermanagement.services.tenancyUnits.undeleteProject": 7266 7267type ServicesTenancyUnitsUndeleteProjectCall struct { 7268 s *APIService 7269 name string 7270 undeletetenantprojectrequest *UndeleteTenantProjectRequest 7271 urlParams_ gensupport.URLParams 7272 ctx_ context.Context 7273 header_ http.Header 7274} 7275 7276// UndeleteProject: Attempts to undelete a previously deleted tenant 7277// project. The project must 7278// be in a DELETED state. 7279// There are no guarantees that an undeleted project will be in 7280// a fully restored and functional state. Call the 7281// `ApplyTenantProjectConfig` 7282// method to update its configuration and then validate all managed 7283// service 7284// resources. 7285// Operation<response: Empty>. 7286func (r *ServicesTenancyUnitsService) UndeleteProject(name string, undeletetenantprojectrequest *UndeleteTenantProjectRequest) *ServicesTenancyUnitsUndeleteProjectCall { 7287 c := &ServicesTenancyUnitsUndeleteProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7288 c.name = name 7289 c.undeletetenantprojectrequest = undeletetenantprojectrequest 7290 return c 7291} 7292 7293// Fields allows partial responses to be retrieved. See 7294// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7295// for more information. 7296func (c *ServicesTenancyUnitsUndeleteProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsUndeleteProjectCall { 7297 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7298 return c 7299} 7300 7301// Context sets the context to be used in this call's Do method. Any 7302// pending HTTP request will be aborted if the provided context is 7303// canceled. 7304func (c *ServicesTenancyUnitsUndeleteProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsUndeleteProjectCall { 7305 c.ctx_ = ctx 7306 return c 7307} 7308 7309// Header returns an http.Header that can be modified by the caller to 7310// add HTTP headers to the request. 7311func (c *ServicesTenancyUnitsUndeleteProjectCall) Header() http.Header { 7312 if c.header_ == nil { 7313 c.header_ = make(http.Header) 7314 } 7315 return c.header_ 7316} 7317 7318func (c *ServicesTenancyUnitsUndeleteProjectCall) doRequest(alt string) (*http.Response, error) { 7319 reqHeaders := make(http.Header) 7320 for k, v := range c.header_ { 7321 reqHeaders[k] = v 7322 } 7323 reqHeaders.Set("User-Agent", c.s.userAgent()) 7324 var body io.Reader = nil 7325 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletetenantprojectrequest) 7326 if err != nil { 7327 return nil, err 7328 } 7329 reqHeaders.Set("Content-Type", "application/json") 7330 c.urlParams_.Set("alt", alt) 7331 c.urlParams_.Set("prettyPrint", "false") 7332 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undeleteProject") 7333 urls += "?" + c.urlParams_.Encode() 7334 req, err := http.NewRequest("POST", urls, body) 7335 if err != nil { 7336 return nil, err 7337 } 7338 req.Header = reqHeaders 7339 googleapi.Expand(req.URL, map[string]string{ 7340 "name": c.name, 7341 }) 7342 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7343} 7344 7345// Do executes the "serviceconsumermanagement.services.tenancyUnits.undeleteProject" call. 7346// Exactly one of *Operation or error will be non-nil. Any non-2xx 7347// status code is an error. Response headers are in either 7348// *Operation.ServerResponse.Header or (if a response was returned at 7349// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7350// to check whether the returned error was because 7351// http.StatusNotModified was returned. 7352func (c *ServicesTenancyUnitsUndeleteProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7353 gensupport.SetOptions(c.urlParams_, opts...) 7354 res, err := c.doRequest("json") 7355 if res != nil && res.StatusCode == http.StatusNotModified { 7356 if res.Body != nil { 7357 res.Body.Close() 7358 } 7359 return nil, &googleapi.Error{ 7360 Code: res.StatusCode, 7361 Header: res.Header, 7362 } 7363 } 7364 if err != nil { 7365 return nil, err 7366 } 7367 defer googleapi.CloseBody(res) 7368 if err := googleapi.CheckResponse(res); err != nil { 7369 return nil, err 7370 } 7371 ret := &Operation{ 7372 ServerResponse: googleapi.ServerResponse{ 7373 Header: res.Header, 7374 HTTPStatusCode: res.StatusCode, 7375 }, 7376 } 7377 target := &ret 7378 if err := gensupport.DecodeResponse(target, res); err != nil { 7379 return nil, err 7380 } 7381 return ret, nil 7382 // { 7383 // "description": "Attempts to undelete a previously deleted tenant project. The project must\nbe in a DELETED state.\nThere are no guarantees that an undeleted project will be in\na fully restored and functional state. Call the `ApplyTenantProjectConfig`\nmethod to update its configuration and then validate all managed service\nresources.\nOperation\u003cresponse: Empty\u003e.", 7384 // "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:undeleteProject", 7385 // "httpMethod": "POST", 7386 // "id": "serviceconsumermanagement.services.tenancyUnits.undeleteProject", 7387 // "parameterOrder": [ 7388 // "name" 7389 // ], 7390 // "parameters": { 7391 // "name": { 7392 // "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", 7393 // "location": "path", 7394 // "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", 7395 // "required": true, 7396 // "type": "string" 7397 // } 7398 // }, 7399 // "path": "v1/{+name}:undeleteProject", 7400 // "request": { 7401 // "$ref": "UndeleteTenantProjectRequest" 7402 // }, 7403 // "response": { 7404 // "$ref": "Operation" 7405 // }, 7406 // "scopes": [ 7407 // "https://www.googleapis.com/auth/cloud-platform" 7408 // ] 7409 // } 7410 7411} 7412