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