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